micro-ROS Agent on snap!

We have great news: like the XRCE-DDS Agent before it, now the micro-ROS Agent is wrapped and delivered as a snap package, too!

Snap is a package manager designed to bundle and handle applications and their dependencies on several Linux distros, like Ubuntu.
The micro-ROS Agent bridges the micro-ROS nodes with the ROS 2 dataspace. It is the same as the Micro XRCE-DDS Agent, with the addition of the recently implemented Graph manager. Indeed, ever since we added introspection capabilities to micro-ROS, the micro-ROS Agent started to diverge from that of XRCE for including a special DDS participant whose job is to scan the network in search of available ROS 2 entities, which it then publishes into a specific topic. This topic is fetched by the micro-ROS rmw implementation, which uses Micro XRCE-DDS underneath, to provide micro-ROS with ROS 2 graph introspection capabilities.

We prepared the Agent snap release in collaboration with @kyrofa from Canonical.

So, how to use this new feature?

The snap packaging of the Agent comes with two ways of running it: as a simple executable or by means of a Linux service.

The first implies the usage of the Agent’s built-in CLI, where you can specify the standard configuration parameters (such as transport, port…) directly, as follows:

micro-ros-agent <transport> <args>

The second launches the Agent as a Linux service running in the background; to do so, simply execute:

snap set micro-ros-agent daemon=true

In this case, instead of specifying the Agent’s launch parameters via the CLI, users can configure them thanks to the snap services interface, using the snap set micro-ros-agent <param>=<value> command. These parameters’ values are only valid when the daemon option is set to true, while they are ignored in snap run mode.

To have a look at the full list of configurable parameters, click here.