The ROS 2 Content extensions comprise the main ROS 2 extensions, plus additional
settings to enable content sharing.
These extensions are split across ROS 2 versions and content types, and are declared
with the format ros2-<version>-<metapackage>. The available extensions are:
ros2-foxy-ros-core
ros2-foxy-ros-base
ros2-foxy-desktop
ros2-humble-ros-core
ros2-humble-ros-base
ros2-humble-desktop
ros2-jazzy-ros-core
ros2-jazzy-ros-base
ros2-jazzy-desktop
These extensions require Snapcraft 8 and higher, and are experimental.
The most important modification the content extensions make to the project file is to
connect the content plug which mounts
the provider snap content at $SNAP/opt/ros/underlay_ws and defines a default
provider.
First, the content extension includes all the runtime variables from the corresponding
ROS 2 extension.
It then expands the runtime environment required by ROS 2 to include the ROS 2 workspace
provided by the content-sharing snap – similar to the conventional chaining of ROS 2
workspaces.
Here is an example of the result of a project file that uses a content extension for
ROS 2 Jazzy Jalisco. It demonstrates the added plugs, packages, variables, and layouts
that the content extensions add to the project file immediately prior to build.
This example contains the difference between the original file and the output of the
snapcraft expand-extensions command. Some of the
text has been altered for ease of reading.