Capabilities2 0.3.0
Loading...
Searching...
No Matches
Terminal based capability usage

Using a capability requires the user to establish a bond with the capabilities2 server. The bond is used to maintain a persistent connection with the server.

first, inspect the available capabilities provided under this server on this robot.

ros2 service call /capabilities/get_capability_specs capabilities2_msgs/srv/GetCapabilitySpecs

then, request a bond id to become a persistent user

ros2 service call /capabilities/establish_bond capabilities2_msgs/srv/EstablishBond
# this bond needs to be updated every second by publishing a heartbeat the bond topic. Replace the ... with value received from above call
ros2 topic pub /capabilities/bonds ...

then request to use a capability

ros2 service call /capabilities/use_capability capabilities2_msgs/srv/UseCapability

running capabilities can also be connected together through the event system. this requires a valid bond and both the source and target capabilities to already be running.

ros2 service call /capabilities/connect_capability capabilities2_msgs/srv/ConnectCapability

This capability can be freed by calling the free_capability service, or just let the bond expire. The capability will be freed automatically.