MoveIt: How to constrain joint limit only at end of movement
Hey!
I'm doing a small side project with a UR10. My endeffector has rotation range of around (-200, 200) degrees, so that for some poses, two different rotation angles are possible. How can I select which configuration will be used? The JointConstraint is applied to the whole trajectory, but I only want to make sure that the last joint has a value of -180 (instead of +180) at the end of the movement.
One possibility is inspecting the last point on the trajectory and changing it. You can inspect the entire trajectory and change negative values to positive.
Another option is planning in joint space and selecting goal to be positive. The plan will then account for it throughout trajectory.
"You can inspect the entire trajectory and change negative values to positive. " But that could lead to collisions... I found move_group.set_joint_value_target. This should do the job (I use the IK to get a jointstate for the goal, set my wrist_angle to -pi and should get a plan).