RoboticsBeatGuides
Conceptual illustration of joint-state signals and depth observations combining into a robot arm’s spatial environment model.
AI-generated conceptual illustration.

AI & Components

How MoveIt keeps its planning scene up to date

Joint messages, frame transforms, scene changes and occupancy-map plugins each supply a different part of MoveIt’s collision-world representation.

RoboticsBeat · Published

MoveIt’s PlanningSceneMonitor combines robot-state updates from CurrentStateMonitor, collision-object changes received through planning-scene messages, and sensor-derived occupancy updates from OccupancyMapMonitor. The supplied documentation on moveit.picknik.ai describes it as the recommended interface for maintaining an up-to-date planning scene through ROS interfaces.

The distinction starts with stored data versus the components that update it. RobotState is a snapshot containing the RobotModel and a set of joint values. PlanningScene is a broader snapshot containing the RobotState and collision objects, usable for collision checking and obtaining information about the environment. PlanningSceneMonitor wraps that scene with update interfaces. For access to the underlying scene, the documentation specifies LockedPlanningSceneRO and LockedPlanningSceneRW. PlanningSceneMonitor supports thread-safe reading and writing.

CurrentStateMonitor supplies the robot-state path. It subscribes to a configured topic carrying JointState messages and updates its internal RobotState with sensor values for joints with one degree of freedom, such as revolute or prismatic joints. Floating and planar joints require transforms that describe multiple degrees of freedom. For these, CurrentStateMonitor stores a TF2 Buffer and uses a TF2 TransformListener to maintain transform information for links and other attached frames.

Scene messages provide another update path. PlanningSceneMonitor has a subscriber for planning-scene diffs, meaning changes supplied by other publishers. The documented world geometry monitor combines information from sensors, such as LIDARs or depth cameras, with user input. It uses the occupancy map monitor to build a 3D environment representation and augments it with object information from the planning_scene topic. Explicit collision objects and sensor-derived geometry therefore contribute through distinct interfaces to the scene’s representation of the surrounding world.

The move_group node and the RViz planning scene plugin each maintain their own Planning Scene Monitor. In the documented arrangement, move_group’s monitor listens to /planning_scene and publishes its planning-scene state on monitored_planning_scene. RViz’s planning scene plugin listens to that latter topic. This describes a message connection between separate monitors; it does not establish that they share one scene object or remain synchronized at every instant.

Sensor input reaches the occupancy map through plugins. PointCloudOccupancyMapUpdater handles point clouds, while DepthImageOccupancyMapUpdater handles depth images; the architecture also allows custom updater plugins. OccupancyMapMonitor tracks occupancy-map changes through ROS topics and services and maintains the environment representation in an Octomap. The supplied documentation says this map can be passed directly to FCL, MoveIt’s collision-checking library. It also distinguishes Octomap’s ability to encode probabilities for individual cells from their use: the documented MoveIt behavior does not use that probabilistic information.

Robot state also participates in processing sensor observations. DepthImageOccupancyMapUpdater includes a self-filter that uses current robot-state information to remove visible parts of the robot from the depth map. This is a concrete connection between the robot-state and perception paths: the state helps identify the robot’s own geometry within a sensor observation.

Collision checking therefore operates on the world represented in the PlanningScene: the monitors maintain the data that gives those checks their context.

Sources and references