MoveIt - Planning with Orientation Constaint

asked 2021-05-31 05:25:36 -0600

vonunwerth gravatar image

updated 2021-05-31 05:29:14 -0600

Hi I'm planning a path between two poses with an UR10 robotic arm.

I would like the robots end-effector to just move in a planar like a pen on paper. (so without moving up and down or rotating)

Therefore i added an OrientationConstraint like that:

moveit_msgs::Constraints constraints;
moveit_msgs::OrientationConstraint ocm;

ocm.link_name = move_group.getEndEffectorLink();
ocm.header = move_group.getCurrentPose().header;
ocm.orientation.x = -0.707;
ocm.orientation.w = 0.707;
ocm.absolute_x_axis_tolerance = 0.01;
ocm.absolute_y_axis_tolerance = 0.01;
ocm.absolute_z_axis_tolerance = 0.01;
ocm.weight = 1.0;
constraints.orientation_constraints.push_back(ocm);
move_group.setPathConstraints(constraints);

Now I can plan from one position to an other and the ee should not change it rotation. But in some cases (I think when the robot traverses a shoulder or wrist singularity for example) the constraint could not be hold and the robot simply "ignores" it to reach the planned goal.

Is it possible to tell moveit to not move the robot, when the planned path violates the given constraints or am I doing something wrong to reach a "planar" moving ee without any rotation?

Is there an additional PositionConstraint neccassary? Is there an example on how to use those?

Thanks for your help

edit retag flag offensive close merge delete