Skip to content

alphanome-ai/swarm_interfaces

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

swarm_interfaces

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.

What This Package Contains

  • 1 action definition:
    • action/RobotTask.action
  • 4 service definitions:
    • srv/AttachObject.srv
    • srv/DetachObject.srv
    • srv/GetBoxPose.srv
    • srv/SetBoxState.srv

CHARS Context

swarm_interfaces is the contract layer between CHARS components:

  • Allocator dispatches goals via RobotTask action.
  • 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.

Interface Definitions

RobotTask.action

Goal:

  • geometry_msgs/PoseStamped target_pose
  • string task_type (navigate, pick, place)

Result:

  • bool success
  • string message

Feedback:

  • string current_status
  • geometry_msgs/Pose current_pose

AttachObject.srv

Request:

  • string parent_model
  • string parent_link
  • string child_model
  • string child_link

Response:

  • bool success
  • string message
  • string joint_name

DetachObject.srv

Request:

  • string joint_name

Response:

  • bool success
  • string message

GetBoxPose.srv

Request:

  • string box_name

Response:

  • bool success
  • string message
  • geometry_msgs/Pose pose

SetBoxState.srv

Request:

  • string box_name
  • bool make_dynamic

Response:

  • bool success
  • string message

Dependencies

From package.xml:

  • geometry_msgs
  • action_msgs
  • rosidl_default_runtime

Build tools:

  • ament_cmake
  • rosidl_default_generators

Build

From your ROS 2 workspace root:

colcon build --packages-select swarm_interfaces
source install/setup.bash

Example CLI Usage

Send a RobotTask action goal

ros2 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}"

Attach object

ros2 service call /attach_object swarm_interfaces/srv/AttachObject \
"{parent_model: agent1, parent_link: tool0, child_model: aruco_box_35, child_link: link}"

Detach object

ros2 service call /detach_object swarm_interfaces/srv/DetachObject \
"{joint_name: gripper_joint_aruco_box_35_1234567890}"

Set box dynamic/static

ros2 service call /set_box_state swarm_interfaces/srv/SetBoxState \
"{box_name: aruco_box_26, make_dynamic: true}"

Get box pose

ros2 service call /get_box_pose swarm_interfaces/srv/GetBoxPose \
"{box_name: aruco_box_26}"

License

Apache-2.0

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages