MoveIt 2 in ROS 2: Architecture, Planners and Setup
827 words · 5 min read · 4 sources
MoveIt 2 is the ROS 2 version of MoveIt, the motion-planning framework for robot arms. A central node, move_group, combines your robot's URDF and SRDF, a planning scene, a planner (OMPL by default), an inverse-kinematics plugin (KDL by default) and your joint controllers to turn a goal into a collision-free arm motion.
MoveIt 2 is the robot-arm planner for ROS 2. One program sits in the middle: it knows what your arm looks like, what is around it, and how to solve the joint angles for a target. Ask it to move the gripper somewhere and it plans a safe path, works out the timing, and hands the motion to the arm's motor controllers.
🎯 Quick challenge
In MoveIt 2, which file tells move_group which joints form the "arm" group and which link pairs can skip collision checking?
MoveIt 2 is the ROS 2 version of MoveIt, the motion-planning framework for robot arms. Its documentation calls it "the robotic manipulation platform for ROS 2"; it was first released in 2019 (MoveIt 2 docs). This page is the practical view: what runs inside MoveIt 2, which planners and solvers it uses by default, and how you get your first arm moving. For the beginner's overview of what MoveIt is and why it exists, start at the MoveIt entry.
The architecture: one node in the middle
Everything goes through one node, move_group. The MoveIt docs describe it as an integrator: it pulls the pieces together and offers them to your code as ROS actions and services (MoveIt concepts: move_group).
Inside MoveIt 2
Your program sends a goal to move_group; it plans against the planning scene, adds timing, and sends the trajectory to the arm's controllers.
Piece
What it does
Default in MoveIt 2
Robot model
Links, joints and meshes from the URDF; planning groups, named poses and disabled collision pairs from the SRDF
Your robot's files; the SRDF comes from the Setup Assistant
Planning scene
The robot's current state plus the world: obstacles, sensor data, objects attached to the gripper
Kept up to date by the planning scene monitor
Motion planner
Finds a collision-free path for a planning group
OMPL; Pilz industrial motion planner and CHOMP also available (docs)
Turns a geometric path into a timed trajectory within velocity and acceleration limits
TOTG (Time-Optimal Trajectory Generation), the recommended algorithm in the docs as of January 2023 (docs)
Execution
Sends the trajectory to the arm and monitors it
FollowJointTrajectory action (docs), usually served by ros2_control controllers
Each planner and solver is a plugin, so you can swap OMPL for another planner, or KDL for a faster analytic solver for your arm, by changing configuration rather than code.
Choosing a planner
OMPL (Open Motion Planning Library) is a collection of sampling-based planners, including the RRT family. It is the default planning library in move_group (docs). Sampling-based paths are random by nature, so two plans to the same goal can differ.
Pilz industrial motion planner produces the predictable moves industrial users expect: point-to-point moves in joint space (PTP), plus straight-line (LIN) and circular-arc (CIRC) moves of the tool in Cartesian space (Pilz guide).
CHOMP treats planning as trajectory optimisation, bending an initial path away from obstacles while keeping it smooth.
A STOMP planner package (moveit_planners_stomp) is also released alongside MoveIt 2 (ROS Index).
From zero to a moving arm
Describe the robot. You need a working URDF; check it in RViz.
Run the MoveIt Setup Assistant. It generates the SRDF (planning groups such as arm and gripper, named poses, collision pairs that can be ignored) and a configuration package with planner, kinematics and controller settings (Northwestern ROS notes).
Connect controllers. MoveIt executes trajectories through low-level controllers, typically provided by ros2_control (Northwestern ROS notes). In simulation, ros2_control mock hardware or Gazebo (gz_ros2_control) stands in for real motors.
Plan interactively. Launch the demo, drag the goal marker in RViz's MotionPlanning panel, press Plan, check the preview, then Execute.
Move to code. Send goals from C++ or Python through move_group's interfaces, add obstacles to the planning scene, and attach grasped objects to the gripper so the planner avoids collisions with what you are carrying.
The official tutorials walk through steps 1–5 with a demo arm (MoveIt 2 docs).
Versions and distributions
MoveIt 2 is released for ROS 2 distributions listed on ROS Index, including Humble and Jazzy, with the documentation's main branch tracking Rolling (ROS Index; docs). The Humble documentation is marked as a stable version no longer developed further and points readers to main (Humble docs). Match the tutorial branch to your ROS 2 distribution: launch files and APIs change between releases. MoveIt 1, for ROS 1, lives in a separate repository.
Common questions
What is the difference between MoveIt and MoveIt 2?
MoveIt 2 is the ROS 2 generation of MoveIt. The concepts (move_group, planning scene, planning groups, planner plugins) are the same; the code, launch files and APIs are ROS 2. MoveIt 1 targets ROS 1. Use MoveIt 2 for new work.
What planner does MoveIt 2 use by default?
OMPL, the Open Motion Planning Library, which provides sampling-based planners such as RRT. The Pilz industrial motion planner and CHOMP are also available by default, and planners are plugins you can change in configuration.
Does MoveIt 2 need ros2_control?
MoveIt 2 needs something that accepts a FollowJointTrajectory action for each arm. In practice this is usually a joint trajectory controller from ros2_control, on the real robot or in simulation.