ROS 2 interface package for CHARS swarm execution.
This package defines shared Action and Service contracts used across allocator, task servers, gripper/object state utilities, and simulation integration nodes.
- 1 action definition:
action/RobotTask.action
- 4 service definitions:
srv/AttachObject.srvsrv/DetachObject.srvsrv/GetBoxPose.srvsrv/SetBoxState.srv
swarm_interfaces is the contract layer between CHARS components:
- Allocator dispatches goals via
RobotTaskaction. - Robot task servers report feedback and result via the same action.
- Gripper and object lifecycle services use attach/detach and box state APIs.
- Perception/execution logic can query object pose via
GetBoxPose.
Goal:
geometry_msgs/PoseStamped target_posestring task_type(navigate,pick,place)
Result:
bool successstring message
Feedback:
string current_statusgeometry_msgs/Pose current_pose
Request:
string parent_modelstring parent_linkstring child_modelstring child_link
Response:
bool successstring messagestring joint_name
Request:
string joint_name
Response:
bool successstring message
Request:
string box_name
Response:
bool successstring messagegeometry_msgs/Pose pose
Request:
string box_namebool make_dynamic
Response:
bool successstring message
From package.xml:
geometry_msgsaction_msgsrosidl_default_runtime
Build tools:
ament_cmakerosidl_default_generators
From your ROS 2 workspace root:
colcon build --packages-select swarm_interfaces
source install/setup.bashros2 action send_goal /agent1/task_control swarm_interfaces/action/RobotTask \
"{target_pose: {header: {frame_id: map}, pose: {position: {x: 1.0, y: -2.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}}, task_type: navigate}"ros2 service call /attach_object swarm_interfaces/srv/AttachObject \
"{parent_model: agent1, parent_link: tool0, child_model: aruco_box_35, child_link: link}"ros2 service call /detach_object swarm_interfaces/srv/DetachObject \
"{joint_name: gripper_joint_aruco_box_35_1234567890}"ros2 service call /set_box_state swarm_interfaces/srv/SetBoxState \
"{box_name: aruco_box_26, make_dynamic: true}"ros2 service call /get_box_pose swarm_interfaces/srv/GetBoxPose \
"{box_name: aruco_box_26}"Apache-2.0