Getting the wrong feature

Hello all,

I am running into the following problem.
When i retrieve a plane with a standard movej waypoint, i get a different p[…] than when i retrieve this plane with my own script code.

for example, if I use plane_1 with a default moveJ waypointNode, then I see the script give a different p p[…] than when I retrieve this plane with this code:

feature.1

I get the pose from the selected feature with .getPose() and then put it in a moveJ scriptline
This is obviously the wrong p[… ] which makes my own waypoints not work when using any feature other than base (i tried it without getPose as well ofcourse) and i checked the value of it in a System.out.println() which is not the same as in the scriptline from the normal moveJ

I don’t really see how this can go wrong…

Can you share the result of the MoveJ command and the fully built command you are building and writing to the robot?

Hello Eric,
This is what i get back from a standard moveJ with Plane_1 as feature

This is what i get back from my custom moveNode with Plane_1 as feature

and this is wat i get back if i println the feature.getPose()

So the values of the plane_1 are different… (i am looking at the second trans_pose(p[…] )

They are the same values just in the opposite direction…I feel like I’ve seen that before somewhere, but can’t remember what I did to fix it. I’ll think about it some more

1 Like

So this is where I remember seeing this type of thing. The waypoint generated in Polyscope has opposite values to what gets used in the actual moveJ. Not sure if that means anything to you. However, looking back at the script I write for our CAP, I think you may be missing a pose_inv() call.

Maybe try adding that? I think you need to take the pose_inv(Plane_1.getPose()) and make that the first argument to the second pose_trans(). At least, looks like that’s what we were doing when we wrote this like 2 years ago lol

1 Like

Hello Eric,

Thankyou for sharing! it is working perfectly right now!

Kind regards.

Zoë