Use Joint Angles (Really)

So how do I convince the robot UR5e that I really, really want it to go to the actual joint angles specified?

I have a point, p_home, which has joint angles of [125,-54,-127,-43,79,-140] (verified these are the values stored in the installation.)

After making several moves using movej with “use joint angles” selected, I return to this point, but now it’s at [125,-76,-94,-234,281,-320].
This is fine at that point, but the next set of moves takes joints out of limits.

Any way to force the issue?

the robot moves to the equivalent closest position, taking the shortest route to get their. Sometimes it moves clockwise, other times counter clock wise. Two hacks to get what you want, 1) move to an intermediate point then to this location, ensuring proper path taken, or 2) Use IK/FK formulas with a “closest solution value” joint value set to what you want. This should also help to avoid having the robot coming up with an IK solution having elbow down instead of up…

My understanding was that the “equivalent position” is the default, but selecting “use joint angles” was supposed to take the robot to those specific angles no matter what. Bubble burst.

I’ve used intermediate points to get through singularities and keep from getting too lost.
I also occasionally resort to calling get_actual_joint_positions(), then stepping through 1 joint at a time to reach the desired position - actually have a program accessible to the operators which does this to bring the robot back to a known position in case it stops in some weird position/orientation.

So far, I’ve avoided using the inverse/forward kinematics functions - I thought the robot was supposed to do most of the hard thinking ;).

Yes, I once thought the same, too, that movej() just puts the robot into those joint positions. The problem is, although the motion is actually joint motion, as opposed to say a lineair move, the robot still needs to do the ik/fk thingy for the sake of computing torque values and speeds in order to remain within its cobot mode of operation, e.g. stopping when torques get out-of-range…

The robot already does option 2 when selecting MoveJ though…

It passes the pose, as well as the qnear (as a set of JointPositions when the waypoint is saved). It then does the IK to generate the JointPositions array closest to the joint configuration at the time of saving, and passes it to the MoveJ().

As opposed to selecting the Use Joint Angles checkbox, which just passes the saved Joint Positions array directly:
image

What exactly are you defining as an “equivalent position” for Joint Angles? I thought they were all unique? For example, set 2 waypoints, one with the Base joint set to -180 and another to +180. If you leave MoveL selected, it won’t even move. It thinks it’s already at both positions (equivalent positions). Change it to a MoveJ and it will instead spin back and forth (unique positions).