Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Moveit2 Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-moveit2-knowledge-patch-nevaberry-plugins)
---
name: moveit2-knowledge-patch
description: MoveIt 2
version: "2.14.3"
license: MIT
metadata:
author: Nevaberry
---
# MoveIt 2
Use this skill when configuring planning pipelines, Python planning and scene
access, Servo control, Task Constructor stages, or MoveIt build dependencies.
The references contain parameter details and code examples.
Legacy adapter and OMPL guidance retains its MoveIt 1 tutorial attribution.
## Reference index
| Reference | Topics |
| --- | --- |
| [Planning pipelines and Python](references/planning-pipelines-and-python.md) | Exported CMake targets, dependencies, distribution support, source branches, package paths, loop timing, parallel planning, adapters, workspace bounds, subframes, multi-DOF trajectories, Python request profiles, goals, scene access |
| [OMPL, CHOMP, and trajectory processing](references/ompl-chomp-and-trajectory-processing.md) | CHOMP initialization and tuning, legacy optimizer adapters, OMPL objectives, termination, sampling, smoothing, roadmap reuse |
| [Pilz industrial motion](references/pilz-industrial-motion.md) | Pipeline configuration, limits, PTP/LIN/CIRC requests, circular constraints, blending, sequence service and action |
| [Servo control](references/servo-control.md) | IK parameters, realtime priority, C++ commands, ROS topics and services, smoothing filters, OSQP dependencies, demos |
| [Task Constructor](references/task-constructor.md) | Branches, node setup, stage connections, property inheritance, grasp and placement IK, collisions, execution, RViz diagnostics |
## Build and API integration changes
For the MoveIt 2.15.0 migration from `ament_target_dependencies` to exported
CMake targets, downstream packages should link the namespaced target:
```cmake
find_package(moveit_ros_planning REQUIRED)
target_link_libraries(my_target PRIVATE moveit_ros_planning::moveit_ros_planning)
```
For `AccelerationLimitedPlugin`, `moveit_core` uses OSQP 1.0 from the MoveIt
`osqp_vendor` fork on Lyrical and Rolling, and apt-packaged OSQP 0.6.x on Humble,
Jazzy, and Kilted. `MOVEIT_OSQP_V1` selects the revised 1.0 C API.
Jazzy's pipeline API separates request adapters that preprocess inputs from
response adapters that postprocess results. Multiple pipelines can run in
parallel to produce candidate plans for the same planning problem.
Jazzy supports executing multi-DOF joint trajectories. MoveIt 2.15.0 also
populates `velocities` and `accelerations` alongside transforms in
`multi_dof_joint_trajectory.points`.
## Python requests and planning scenes
`planning_pipelines.pipeline_names` lists the configured pipeline instances.
Top-level `plan_request_params` supplies defaults for `plan()`; each named
profile uses `<profile>.plan_request_params` to select its pipeline and settings
independently of the profile name.
With a configured `MoveItPy` instance and a planning component that has a start
state and goal, pass profile names to `MultiPipelinePlanRequestParameters`:
```python
params = MultiPipelinePlanRequestParameters(robot, ["ompl_rrtc", "chomp"])
result = arm.plan(multi_plan_parameters=params)
```
For an explicit single request, use `single_plan_parameters`. Build joint goal
constraints from a `RobotState` with the target positions and matching joint
model group, then pass them in the `motion_plan_constraints` list.
Set monitor topics and the initial-state wait in `planning_scene_monitor_options`.
Use `read_write()` to apply a populated `CollisionObject` and update the scene's
current state. Remove an object by applying its ID with `CollisionObject.REMOVE`,
or clear all objects with `scene.remove_all_collision_objects()`.
For collision queries, update the candidate state's transforms after changing
joints or solving IK, then acquire `read_only()` and call `scene.is_state_colliding()`.
`ValidateWorkspaceBounds` fills in a 10 m cube when bounds are omitted.
With `ResolveConstraintFrames` in the request adapter chain, goal constraints
can use object subframes such as `cup/handle`; the adapter resolves them into
the corresponding object or robot frame.
## CHOMP configuration and legacy adapters
In `config/chomp_planning.yaml`, `trajectory_initialization_method` accepts
`quintic-spline`, `linear`, or `cubic` for start-to-goal interpolation. Use
`fillTrajectory` to seed CHOMP with a path from another planner such as OMPL.
`planning_time_limit` and `max_iterations` cap overall optimization.
`max_iterations_after_collision_free` caps iterations after finding a
collision-free path. `enable_failure_recovery: true` retries with varied
optimizer parameters; `max_recovery_attempts` caps retries after the initial try.
`smoothness_cost_weight` and `obstacle_cost_weight` set overall contributions;
`obstacle_cost_weight: 0.0` removes the obstacle term. Individual smoothness
terms use `smoothness_cost_velocity`, `smoothness_cost_acceleration`, and
`smoothness_cost_jerk`.
The MoveIt 1 Melodic tutorial puts `chomp/OptimizerAdapter` in the base planner's
ordered `planning_adapters` launch argument. Load the base planner's YAML and
`chomp_planning.yaml`, and set `trajectory_initialization_method` to `fillTrajectory`.
The adapter calls OMPL or STOMP before optimizing its result.
That tutorial marks `stomp_moveit/StompSmoothingAdapter` as work in progress.
It shows smoothing OMPL or CHOMP paths: load both planners' YAML files and set
`initialization_method: 4` in `stomp_planning.yaml` to seed STOMP with the base path.
## OMPL configuration from the MoveIt 1 guide
Set `optimization_objective` in a planner configuration in `ompl_planning.yaml`.
`PathLengthOptimizationObjective` is the default; the reference lists all
available values and the associated planner configuration example.
`termination_condition` accepts `Iteration[num]` with a positive integer,
`ExactSolution`, or `CostConvergence[solutionsWindow,epsilon]`.
Convergence uses the moving average of solution costs and a relative threshold,
and requires OMPL 1.5.0 or newer. `MotionPlanRequest.allowed_planning_time` caps
all three modes.
For orientation path constraints, default sampling uses Cartesian poses and IK.
The planning group's `enforce_joint_model_state_space: true` switches to
joint-space rejection sampling. Geometric smoothing uses the time left in
`allowed_planning_time`; more `num_planning_attempts` gives path hybridization
more candidate paths to combine.
`multi_query_planning_enabled` keeps roadmaps between requests for PRM, PRM*,
LazyPRM, and LazyPRM*. Lazy variants revalidate as needed for small scene changes;
non-lazy variants assume a static scene. Large changes call for a fresh roadmap.
Roadmap disk I/O requires OMPL 1.5.0 or newer; writing occurs on planner destruction.
## Pilz requests, limits, and sequences
Before starting `move_group`, set the pipeline's `planning_plugins` list and load
`pilz_cartesian_limits.yaml` under `<robot_description_parameter>_planning.cartesian_limits`.
Pilz uses the strictest combination of joint limits as common limits for all
joints. Node parameters must be at least as strict as the URDF.
Choose `PTP`, `LIN`, or `CIRC` with `MotionPlanRequest.planner_id` and supply a
joint or Cartesian goal. Velocity and acceleration scaling apply to joint
limits for `PTP` and Cartesian limits for `LIN` and `CIRC`.
`LIN` and `CIRC` require zero start velocity and may need lower scaling when
the resulting joint trajectory exceeds joint limits.
For `CIRC`, a path constraint named `center` selects the shorter arc, which must
be less than a half-circle. `interim` requires passage through the supplied point
on an arc shorter than a full circle.
Each `MotionSequenceItem` has a motion request in `req` and a `blend_radius` in
meters. A positive radius permits transition before reaching the current goal;
adjacent radii must sum to less than the distance between their goals.
Reserve an explicit start state for the first goal; later segments chain from
preceding goals. Execution starts only after all items plan successfully.
Load the sequence capabilities through `move_group`'s space-separated
`capabilities` parameter. `/plan_sequence_path` provides plan-only service use.
The `/sequence_move_group` action executes by default, even if the robot already
satisfies the goal. Set `planning_options.plan_only = true` to return the plan
without execution. See the reference for capability and message type names.
## Servo command interfaces and smoothing
Pass `moveit_config.robot_description_kinematics` in the Servo node's launch
parameters to load IK plugin settings. The plugin must declare custom solver
parameters on the Servo node before using them. With a realtime kernel, the main
`ServoNode` thread automatically attempts `SCHED_FIFO` at priority 40.
For direct C++ control, construct `Servo` with a parameter listener in the
`moveit_servo` namespace and a planning-scene monitor. Select
`CommandType::JOINT_JOG`, `TWIST`, or `POSE` to match `getNextJointState()` input.
The returned `KinematicState` contains names, positions, velocities, and
accelerations; `getStatus()` reports the latest command's status.
Publish `control_msgs/msg/JointJog` on `joint_command_in_topic`,
`geometry_msgs/msg/TwistStamped` on `cartesian_command_in_topic`, or
`geometry_msgs/msg/PoseStamped` on `pose_command_in_topic`.
Both Cartesian types need `header.frame_id`; twist commands use the robot's
planning frame. `command_out_type` selects `trajectory_msgs/JointTrajectory`
or `std_msgs/Float64MultiArray` on `command_out_topic`.
Use `/<node_name>/switch_command_type` to select input, the boolean
`/<node_name>/pause_servo` service to pause, and `/<node_name>/status` for
`moveit_msgs/msg/ServoStatus`. A switch request with `command_type: 1` selects `TWIST`.
`use_smoothing` enables or disables smoothing; `smoothing_filter_plugin_name`
selects the filter. `online_signal_smoothing::ButterworthFilterPlugin` avoids
joint-space overshoot but can deviate from straight Cartesian motion and leaves
jerk and acceleration unconstrained by the filter.
`online_signal_smoothing::AccelerationLimitedPlugin` respects joint acceleration
limits when feasible and preserves the requested direction when kinematics permit; it can
overshoot and leaves jerk unconstrained by the filter.
`online_signal_smoothing::RuckigFilterPlugin` obeys joint and acceleration limits
but can overshoot or swirl at sharp corners. Preventing swirl requires shaping
incoming commands outside Servo.
## Task Constructor setup, stages, and execution
Use the `humble` branch of `moveit_task_constructor` with ROS 2 Humble, or `ros2`
when building against MoveIt 2 `main`. Pass the robot description, SRDF, and
planning pipeline configuration to the task node itself. The tutorial uses
`rclcpp::NodeOptions().automatically_declare_parameters_from_overrides(true)`
and spins the executor on a separate thread during planning and execution.
Place `Connect` between chains that generate independent states; one connector
can specify separate solvers for each group. Expose task properties on a serial
container, then configure it to initialize them from its parent.
Save a pointer to `CurrentState` before moving it into the task so
`GenerateGraspPose` can monitor its scene snapshot. `ComputeIK` takes `target_pose` from the generated
interface state and `eef` and `group` from the parent.
For placement, save a pointer to the attachment stage before inserting it so
`GeneratePlacePose` can monitor the attachment. Set the IK wrapper's frame to
the object ID to solve for the object's target pose.
In the forward pick sequence, permit hand contact before closing the gripper,
then attach the object in a later `ModifyPlanningScene` stage before lifting.
After opening at placement, restore collision checking before a later detach
stage. Backward propagation reverses the collision change: pass `false` to
`allowCollisions()` to permit the specified contact in that direction.
`task.init()` can throw `mtc::InitStageException`. `task.plan(5)` caps successful
solutions at five. Publish a selected solution through `task.introspection()`
and check the MoveIt error code returned by `execute()`.
The reference includes stage examples, relative-motion frames,
RViz task solutions, propagation diagnostics, and introspection ID lookup.