The ROS2 Foxy extension

This extension helps you snap ROS2 applications for the Foxy Fitzroy distribution.

:information_source: This extension is currently undergoing active development and requires Snapcraft 4.2+. For this reason, it requires --enable-experimental-extensions to be used with snapcraft.

How to use it

Add extensions: [ ros2-foxy ] to the application definition in your snapcraft.yaml file. See for a complete tutorial on how to use this extension.

apps:
  colcon-ros2-foxy-rlcpp-hello:
    command: opt/ros/foxy/bin/ros2 run colcon_ros2_rlcpp_hello colcon_ros2_rlcpp_hello
    extensions: [ros2-foxy]
    ...

What it does for the build-time environment

  • Adds ROS2 APT package repository build-time configuration for the snap, installing the necessary GPG key.
  • Adds ros-foxy-ros-core to build-packages.

What it does for the run-time environment

  • Initializes runtime environment required by ROS2 before launching the application, similar to sourcing the typical ROS setup.sh or local_setup.sh.

Further reading

For a complete picture of what this extension does, add it to your app definition and run snapcraft expand-extensions.

:information_source: This is a snapcraft extension. See Snapcraft extensions and Supported extensions for further details on how extensions are used.

Last updated 25 days ago. Help improve this document in the forum.