Orientation Constrained Planning
For certain applications, motion plans that are generated require orientation constraints on things like the robot's gripper. One example of this is moving a glass of water - the robot's gripper needs to be oriented in a way that doesn't spill any water while moving the glass.
This how-to guide will walk through an example Objective that executes a motion plan with orientation constraints, and explain how to enforce orientation constraints when building Objectives.
Launch MoveIt Pro
We assume you have already installed MoveIt Pro to the default install location. Launch the application using:
moveit_pro run -c lab_sim
1. Run the Move Beakers to Burners
Objective
To get an understanding of what orientation constrained motion planning looks like in practice, run the Move Beakers to Burners
Objective.
You'll see that the robot gripper keeps the same orientation throughout the motion plan, avoiding any sideways tilt so that no liquid is spilled.
2. Inspecting the Orientation Constraints in the Move Beakers to Burners
Objective
After running the Objective, edit the Behavior Tree to learn about how the orientation constraints are implemented.
Expand a Constrained Pick And Place
Subtree block, and look at the Move to Waypoint
port values.
You will notice three port names that are used to enforce orientation constraints:
keep_orientation
: If true, an orientation constraint will be enforced at the links specified inkeep_orientation_link_names
.keep_orientation_tolerance
: Specifies the maximum angular error allowed with respect to the initial orientation, for the entire motion.keep_orientation_link_names
: Specifies the link names where the orientation constraint will be enforced. Multiple links can be specified by separating them with semicolons, but note that the planning time will increase considerably with the number of constrained links.
Make sure the orientation of the constrained joint at the goal is within the tolerance of its initial orientation. If attempting an infeasible goal, MoveIt Pro will report the error that "The goal joint position are not valid".
See the PlanToJointGoal
Behavior description in the Objective editor for more detailed information about how the constraint is enforced.