This document covers motion execution in the grasping_control package.
For calibration of the workspace file consumed by this node, see creation.md.
motion_execution_node owns all robot-motion details after a client submits a MoveToPose goal.
Its major features are:
- Transforming the incoming pose into the configured planning frame
- Validating that the target lies inside the calibrated workspace area, when configured
- Loading collision objects from
workspace.yamlat startup - Applying those objects to MoveIt through
ApplyPlanningScene - Publishing the calibrated workspace area as an RViz marker
- Building MoveIt position and orientation constraints
- Submitting the final motion request to
moveit_msgs/action/MoveGroup
This keeps MoveIt, TF, and workspace handling centralized in one server.
For each MoveToPose goal, the node performs the following sequence:
- Publish feedback state
transforming_target_pose. - Transform the requested pose into
planning_frame. - Publish feedback state
validating_workspace_area. - Reject the goal if the target is outside the calibrated workspace area.
- Publish feedback state
planning_and_executing. - Build a
MotionPlanRequestand send it to MoveIt.
If the goal succeeds, the action returns success=true. If it fails, the action aborts with a status message describing the cause.
At startup, the node resolves a workspace configuration path and loads the YAML document written by workspace_creation.
In a colcon workspace, it prefers a root-level workspace.yaml when that file exists. Otherwise it falls back to the package config path, unless workspace_config_path explicitly points somewhere else.
From that file it reads:
objects, which are converted into MoveIt collision objectsworkspace_area, which is used as an acceptance filter for incoming goalsbase_frame, which is used as the workspace-area reference frame when needed
Unsupported geometry types are skipped with a warning. Supported runtime collision geometry types are:
boxcylinder
If workspace_area is not configured, the node accepts targets anywhere in the planning frame.
If workspace_area is configured, the node:
- checks the transformed target position against the saved four-corner polygon
- aborts the goal with
Target pose lies outside the calibrated workspace area.when the pose is outside - treats the check as planar, using the XY polygon only
The current filter does not enforce a Z band.
When a valid workspace area is present, the node publishes it as a semi-transparent green marker on workspace_area_marker_topic.
Marker details:
- frame: workspace base frame from the workspace YAML
- type: triangle-list plane built from the four saved corner points
- color: green with partial transparency
If no workspace area exists, the node publishes a delete marker so stale visuals are cleared.
The node converts a target TCP pose into MoveIt constraints.
- Position is represented as a spherical tolerance region around the requested pose.
- Orientation is normalized before building the orientation constraint.
- The request uses the configured planning group, planner, pipeline, planning time, and scaling factors.
The node sends the request to the configured MoveGroup action and reports any non-success MoveIt error code back to the caller.
action_name: action server name, defaultmove_arm_to_posemove_group_action_name: MoveIt action name, defaultmove_actionplanning_group: MoveIt group, defaultmanipulatorplanning_frame: planning frame, defaultbase_linkend_effector_link: constrained link, defaulttool0
allowed_planning_time: default5.0num_planning_attempts: default5max_velocity_scaling: default0.2max_acceleration_scaling: default0.2position_tolerance_m: default0.005orientation_tolerance_rad: default0.1planning_pipeline_id: optional planner pipeline overrideplanner_id: optional planner override
workspace_config_path: optional override for the workspace YAML pathapply_planning_scene_service: default/apply_planning_sceneworkspace_area_marker_topic: default/workspace_area_marker
On startup the node:
- resolves the workspace YAML path
- loads workspace objects and optional workspace area
- publishes the workspace marker state
- applies collision objects to the planning scene if
ApplyPlanningSceneis available - starts the
MoveToPoseaction server
If ApplyPlanningScene is unavailable, the node logs a warning and continues running without loading the planning scene.
Common failure sources are:
- incoming pose cannot be transformed into
planning_frame - workspace area is configured but invalid
- target pose lies outside the calibrated workspace area
MoveGroupaction server is unavailable- MoveIt rejects or fails the motion request