Send rosbags to COS for robotics

In this how-to, we detail how to set up and configure a robot to send rosbags to the COS for robotics server.

We thus assume that a COS for robotics server is up and running. You may refer to the tutorial ‘Deploy COS for robotics server in the cloud’. to do so.

In addition, a cloud storage must be deployed and integrated with COS for robotics. Pick the tab below corresponding to the storage solution you deployed.

The following assumes that a file server is deployed and integrated with COS for robotics. You may refer to the how-to ‘Deploy a file server for COS for robotics’. to do so.

Setting up the agent

With the server side ready to receive rosbags, we shall now set up the device side.

The setup is as simple as installing the snap on the robot:

sudo snap install ros2-exporter-agent --channel=latest/beta

Once installed, we shall verify that its interfaces are connected:

$ snap connections ros2-exporter-agent
Interface     Plug                                     Slot                                           Notes
content       ros2-exporter-agent:configuration-read   rob-cos-demo-configuration:configuration-read  -
content       ros2-exporter-agent:rob-cos-common-read  rob-cos-data-sharing:rob-cos-common-read       -

and that its services have automatically started:

$ snap services ros2-exporter-agent
Service                                 Startup   Current   Notes
ros2-exporter-agent.auto-clean          enabled   active    timer-activated
ros2-exporter-agent.daily-rotation      enabled   active    timer-activated
ros2-exporter-agent.read-configuration  enabled   active    -
ros2-exporter-agent.recorder            enabled   active    -
ros2-exporter-agent.synchronization     enabled   active    timer-activated

In case the interfaces are not connected, or if you are using your own configuration snap, you can connect them with:

sudo snap connect ros2-exporter-agent:rob-cos-common-read <my-data-sharing>:rob-cos-common-read

And:

sudo snap connect ros2-exporter-agent:configuration-read <my-demo-configuration>:configuration-read

Once both interfaces are connected, the exporter agent will automatically start recording rosbags and send them to the file server on COS for robotics.

They can be start/stop with their respective command:

sudo snap stop ros2-exporter-agent.recorder

and:

sudo snap stop ros2-exporter-agent.synchronization