|
MoveIt Pro API
Core Behaviors for MoveIt Pro
|
The Planning Scene Monitor is a crucial component in MoveIt and MoveIt Pro that maintains an up-to-date representation of the robot's environment. It acts as a wrapper around the Planning Scene itself, providing thread-safe concurrent access and real-time updates from various sources.
The PlanningSceneMonitor class subscribes to various ROS topics to monitor changes in:
It maintains a consistent, thread-safe view of the planning scene that can be safely accessed by multiple planning threads simultaneously.
The Planning Scene Monitor provides thread-safe access to the planning scene through specialized locking mechanisms:
LockedPlanningSceneRO - Read-only access with shared lockingLockedPlanningSceneRW - Read-write access with exclusive lockingThe monitor continuously updates the planning scene by subscribing to:
/joint_states - Current robot joint positions/collision_object - Objects in the world/attached_collision_object - Objects attached to the robot /planning_scene - Full scene updates or diffs/planning_scene_world - World geometry updatesThe monitor categorizes updates into different types using the SceneUpdateType enum:
UPDATE_NONE - No updateUPDATE_STATE - Robot state updatedUPDATE_TRANSFORMS - Transform updatesUPDATE_GEOMETRY - World geometry changesUPDATE_SCENE - Complete scene updateThe Planning Scene Monitor consists of several key components:
Tracks the current joint states of the robot and updates the planning scene accordingly. This ensures that the planning scene always reflects the actual robot configuration.
Listens for collision object messages and updates the world representation in the planning scene. This includes both static objects and dynamic obstacles.
Manages coordinate frame transforms using TF2, ensuring that all objects in the scene are properly positioned relative to the robot's base frame.
Optionally integrates with occupancy mapping systems (like OctoMap) to incorporate sensor data about unknown or dynamic obstacles.
/joint_states/collision_object /attached_collision_object/planning_scene/planning_scene_world/get_planning_sceneThe monitor supports configurable collision checking parameters:
The monitor can maintain scene diffs to efficiently track changes:
The monitor can republish the maintained scene for other nodes:
Provide planning scene as a service for tools like RViz:
The Planning Scene Monitor includes several mechanisms to ensure robust operation:
In MoveIt Pro, the Planning Scene Monitor is typically configured through the robot configuration package and used by:
The monitor ensures that all components have access to a consistent, up-to-date view of the robot's environment, enabling safe and effective motion planning and execution.
For optimal performance, tune update frequencies based on your application's requirements and available computational resources.
moveit_pro/planning_scene_monitor/planning_scene_monitor.hpp - Main PlanningSceneMonitor classmoveit_pro/planning_scene_monitor/current_state_monitor.hpp - Robot state monitoringplanning_scene/planning_scene.hpp - Core planning scene representationmoveit_msgs/msg/planning_scene.hpp - ROS message definitions