MoveIt Reference
Free reference guide: MoveIt Reference
About MoveIt Reference
The MoveIt2 Reference is a searchable cheat sheet for robotics engineers and ROS2 developers working with the MoveIt motion planning framework. It provides complete C++ API examples for the MoveGroupInterface, including setPoseTarget() for TCP positioning, setJointValueTarget() for joint-space goals, setNamedTarget() for SRDF-defined poses, and computeCartesianPath() for straight-line path tracking used in welding and dispensing applications.
The planner section covers all major OMPL algorithms with configuration examples: RRTConnect (default bidirectional RRT for fast planning), RRTstar (asymptotically optimal paths), PRM (probabilistic roadmap for repeated queries), STOMP (trajectory optimization for smooth paths), and Pilz Industrial Motion Planner (PTP/LIN/CIRC commands for predictable industrial motion). Each entry includes the setPlannerId() call, recommended planning time, and YAML configuration parameters.
Additional sections cover Planning Scene management (collision objects with box/mesh primitives, Allowed Collision Matrix), SRDF configuration (group definitions, named states, end-effector attachment, virtual joints), inverse kinematics solvers (KDL, IKFast analytical solver, TRAC-IK with SQP optimization, BioIK evolutionary algorithm), the complete Pick and Place pipeline (pre-grasp approach, grasp posture, post-grasp retreat), and move_group launch file setup with MoveIt Setup Assistant workflow.
Key Features
- MoveGroupInterface API reference with setPoseTarget(), setJointValueTarget(), setNamedTarget(), and computeCartesianPath() C++ examples
- OMPL planner comparison: RRTConnect, RRTstar, PRM, STOMP, and Pilz Industrial Planner with YAML configs
- Planning Scene management including box/mesh CollisionObject creation and Allowed Collision Matrix (ACM) setup
- Complete SRDF reference: group chains, group_state named poses, end_effector definitions, and virtual_joint types
- IK solver comparison: KDL (default numeric), IKFast (analytical), TRAC-IK (SQP+KDL parallel), BioIK (evolutionary multi-objective)
- Pick and Place pipeline with pre-grasp approach, grasp posture, post-grasp retreat, and place sequence configuration
- move_group launch file template and MoveIt Setup Assistant step-by-step workflow (URDF to config package)
- Bilingual Korean/English with category filtering across MoveGroup, Planning Scene, OMPL Planners, SRDF, IK Solvers, and more
Frequently Asked Questions
How do I move a robot arm to a target pose using MoveIt2?
Create a MoveGroupInterface for your planning group, then call setPoseTarget() with a geometry_msgs::msg::Pose containing position (x, y, z) and orientation (quaternion). Call plan() to generate a trajectory, check the success flag, then call execute() to move the robot. Set planning time and velocity scaling factor for tuning.
What is the difference between RRTConnect and RRTstar planners?
RRTConnect is the default bidirectional RRT planner that finds paths quickly (typically 5s planning time) and works well in most environments. RRTstar is an asymptotically optimal planner that produces shorter, smoother paths but requires much longer planning time (30s+). Use RRTConnect for speed and RRTstar when path quality matters.
How do I plan a straight-line Cartesian path for welding or dispensing?
Use computeCartesianPath() with a vector of waypoints (geometry_msgs::msg::Pose), an end-effector step size (e.g., 0.01m), and a jump threshold (0.0 to disable). The function returns a fraction (0.0-1.0) indicating what percentage of the path was successfully planned. A fraction of 1.0 means the complete path is collision-free.
Which IK solver should I choose for my robot?
KDL is the default numeric solver, good for 6DOF+ robots but can be slow and miss solutions. IKFast is an analytical solver generated from OpenRAVE that is very fast and accurate for 6DOF robots. TRAC-IK runs SQP optimization and KDL in parallel for higher success rates. BioIK uses evolutionary algorithms and excels with multi-objective constraints and 7DOF+ redundant robots.
What is the Allowed Collision Matrix (ACM) and why does it matter?
The ACM is defined in SRDF and specifies pairs of robot links that should skip collision checking (typically adjacent links that always touch). Without proper ACM configuration, MoveIt will report false collisions between connected links. The MoveIt Setup Assistant auto-generates ACM entries in the Self-Collisions step.
How does the Pick and Place pipeline work in MoveIt?
The Pick action consists of three phases: pre-grasp approach (move toward object), grasp posture (close gripper), and post-grasp retreat (lift object). Place reverses this: pre-place approach (move to target), place posture (open gripper), and post-place retreat (back away). Each phase specifies direction vectors and min/desired distances.
What is an SRDF file and how do I create one?
The Semantic Robot Description Format (SRDF) defines planning groups (joint chains), named poses (home, ready), end-effector assignments, virtual joints (fixed/planar/floating base-to-world connection), and the collision matrix. The easiest way to create one is using the MoveIt Setup Assistant GUI, which walks through each configuration step.
How do I set up a move_group launch file in ROS2?
Create a launch.py file that instantiates the move_group Node from moveit_ros_move_group with parameters including robot_description, robot_description_semantic (SRDF), kinematics_yaml, ompl_planning_yaml, and joint_limits_yaml. The MoveIt Setup Assistant generates a complete config package with all required YAML files and launch scripts.