This document covers the simple_grasping_node executable in the grasping_control package.
simple_grasping_node is a small sequence runner that calls two existing action servers:
grasping_msgs/action/MoveToNamedPosefor arm motioncontrol_msgs/action/GripperCommandfor gripper open and close commands
It is intended for simple scripted grasp routines where the robot should step through a fixed ordered sequence instead of waiting for an external planner or grasp pipeline.
The default sequence is:
pre_grasp -> workspace_center -> open -> grasp_pose -> close -> post_grasp
Internally this is configured as:
[[pose, pre_grasp], [pose, workspace_center], [gripper, open], [pose, grasp_pose], [gripper, close], [pose, post_grasp]]
Each step has two fields:
pose,<named_pose>: send aMoveToNamedPosegoalgripper,open|close: send aGripperCommandgoal using the configured open or close parameters
Run the node directly with:
source install/setup.bash
ros2 run grasping_control simple_grasping_nodeRun it through the shared launch file with:
source install/setup.bash
ros2 launch grasping_control simple_grasping.launch.pyRun it through the UR wrapper launch with:
source install/setup.bash
ros2 launch grasping_ur simple_grasping.launch.pyThe sequence is configured through one parameter named sequence.
Example:
source install/setup.bash
ros2 launch grasping_ur simple_grasping.launch.py \
sequence:="[[pose, pre_grasp], [pose, workspace_center], [gripper, open], [pose, grasp_pose], [gripper, close], [pose, post_grasp]]"You can reorder, remove, or replace steps. For example, to skip workspace_center:
source install/setup.bash
ros2 launch grasping_ur simple_grasping.launch.py \
sequence:="[[pose, pre_grasp], [gripper, open], [pose, grasp_pose], [gripper, close], [pose, post_grasp]]"The parser also accepts a simpler list form such as:
["pose:pre_grasp", "gripper:open", "pose:grasp_pose"]
arm_action_name: default/move_arm_to_named_posegripper_action_name: default/gripper_command
sequence: ordered list of[kind, value]pairs
open_position: default0.09open_max_effort: default0.0close_position: default0.0close_max_effort: default5.0
server_timeout_sec: default10.0result_timeout_sec: default120.0
The node stops at the first failed step.
- If a named pose is rejected or fails in MoveIt, the sequence aborts.
- If the gripper command does not reach its target, the sequence aborts.
- If either action server is unavailable, the sequence exits before sending commands.
This node does not retry failed steps or branch based on runtime conditions. It is a deterministic executor for one configured ordered sequence.