Specify the robot position configuration

Hi,

I am using a vision system that guides a UR3e to pick a part, let’s say the z axis of the TCP is coming out from the robot flange (axis 6), if the rotation around z axis gotten from the vision system is positive (20 degrees), the robot is doing the right move, but if the value is -20 degrees for example, the robot wrist is rotating 340 degrees instead of -20.

Is there a way to specify the position axis configuration when asking the robot to move ?

A few details:
The values gotten from the vision system are converted using the URScript function rpy2rotvec() and the result is put in a variable position
The robot firmware is SW5.11

Best regards

Hi,
There is not way to specify joint configuration when making a move (unfortunately). Have you tried this using moveJ?

Hi,

Yes I use movej, I finally understood why the robot was moving the wrong way. The robot was choosing the shortest way to reach the position,

The alternative way to specify the position is to specify the optional argument qnear to the get_inverse_Kin, this will force the robot to rotate the right direction even if the joint has to move more than 180 degrees

exemple:
movej(get_inverse_kin(pose, similiarpose))

if we want to move to pose related to a feature (User Frame):
movej(get_inverse_kin(pose_trans(UserFeature, pose), similiarpose))

Best regards