Canonical Snapcraft
Menu Close menu
  • Snap Store
  • About Snapcraft
  • Learn
    • Blog
    • Build
    • Docs
    • Tutorials
  • IoT
  • Forum
  • My account
    • My published snaps
    • My validation sets
    • My stores
    • Account details
    • Sign out
  • Sign in
Toggle side navigation
Toggle side navigation

Snap documentation

Using snaps

  • Snap tutorials
    • Get started
    • Install the daemon
      • AlmaLinux OS
      • Arch Linux
      • Debian
      • Elementary OS
      • Fedora
      • Linux Mint
      • Manjaro Linux
      • Raspberry Pi OS
      • openSUSE
      • Pop!_OS
      • Rocky Linux
      • Ubuntu
  • Snap how-to guides
    • Work with snaps
      • Manage updates
      • Connect interfaces
      • Configure snaps
      • Apps and aliases
    • Manage snaps
      • Create data snapshots
      • Use resource quotas
      • Disk space awareness
      • Set system options
      • Control services
      • Using components
      • Configure snaps with confdb
      • Validation sets
      • Snap deltas
      • Use the REST API
    • Fix common issues
      • Test snapd fixes
      • Debug snaps
  • Snap reference
    • Operations
      • Glossary
      • System options
      • System architecture
      • Interfaces
        • Hardware interfaces
        • Media interfaces
        • Network interfaces
        • Security interfaces
        • System interfaces
        • Super-privileged interfaces
    • Administration
      • Network requirements
      • Distribution support
    • Development
      • Environment variables
      • REST API
        • snapd REST API
        • Error responses
      • YAML schemas
        • The snap format
        • The gadget snap
        • The kernel snap
    • Release notes
  • Snap explanation
    • How snaps work
      • Refresh awareness
      • Channels and tracks
      • Revisions
      • Transactional updates
      • Snap components
      • Snap performance
    • Interfaces
      • All about interfaces
      • Interface auto-connection
      • Interface hooks
    • Security
      • Security policies
      • Snap confinement
      • Classic confinement
      • Assertions
      • Snapd release process

Snapcraft build-tool

  • Snapcraft tutorials
    • Create a new snap
  • Snapcraft how-to guides
    • Snapcraft overview
    • Quickstart
      • Installation and setup
      • How snapcraft builds a snap
      • Basic snapcraft.yaml example
      • Intermediate snapcraft.yaml example
      • Build and publishing example
    • Create a snap
      • Build a checklist
      • Start snapcraft.yaml
      • Add global metadata
      • Build apps with parts
      • Use extensions
      • Add dependencies
      • Platforms and architectures
      • Define a command
      • Define a service
      • Add interfaces
      • Add configuration options
      • Use external metadata
      • Map files with layouts
      • Exclude data from snapshots
      • Add desktop menu support
      • Build snaps remotely
      • Linting classic snaps
      • Linting libraries
      • Iterate over a build
      • Troubleshoot snap building
      • Using craftctl
      • Classic confinement
    • Craft a snap
      • Cross-compile an autotools project
      • Example pre-built app
      • Example Python app
      • Example C or C++ app
      • Example Java app
      • Example Go app
      • Example Rust app
      • Example Node app
      • Example Ruby app
      • Example GTK4 app
      • Example GTK3 app
      • Example GTK2 app
      • Example Qt5 KDE app
      • Example Flutter app
      • Example Electron app
      • Example .NET app
      • Example MOOS app
      • Example ROS 2 app
      • Example ROS 1 app
      • Other platforms
    • Publish a snap
      • Upload your snap
      • Access the Snap Store
      • Create a Store listing
      • Publish to a branch
      • Progressive releases
      • Manage releases
      • Upload deltas
      • Snapcraft authentication
      • View usage metrics
      • Control data with epochs
      • Build from a private repository
      • GitHub workflow from a private repository
      • Use gdb and gdbserver
    • Robotics
      • ROS quickstart
      • ROS2 quickstart
      • Build with GitHub Actions
      • Access shared memory
      • ROS with no extensions
  • Snapcraft reference
    • Build configuration
      • snapcraft.yaml schema
    • Supported plugins
      • core24
        • Autotools
        • Ant
        • CMake
        • Colcon
        • Conda
        • Dump
        • Flutter
        • Golang
        • Make
        • Matter-SDK
        • Maven
        • Meson
        • Nil
        • NPM
        • Python
        • Rust
        • Scons
      • core22
        • .NET/dotnet
        • Ant
        • Autotools
        • CMake
        • Colcon
        • Conda
        • Crystal
        • Dump
        • Flutter
        • Golang
        • Make
        • Matter-SDK
        • Maven
        • Meson
        • Nil
        • NPM
        • Python
        • Rust
        • Scons
      • core20
        • Ant
        • Autotools
        • Catkin tools
        • Catkin plugin
        • CMake
        • Colcon
        • Conda
        • Crystal
        • Dump
        • Golang
        • NPM
        • Meson
        • Nil
        • Python
        • Qmake
        • Rust
      • core18
        • .NET/dotnet
        • Ant
        • Ament
        • Autotools
        • Catkin tools
        • Catkin plugin
        • CMake
        • Conda
        • Crystal
        • Flutter
        • Golang
        • Godeps
        • Gradle
        • Gulp
        • KBuild
        • Kernel
        • Make
        • Maven
        • Meson
        • Node.js
        • Ruby
        • Rust
        • Python
        • Qmake
        • Scons
        • WAF
    • Extensions
      • env-injector
      • Qt5 and KDE Frameworks
      • Flutter
      • ROS 1 Noetic
      • ROS 1 Noetic Content Sharing
      • ROS2 Foxy
      • ROS2 Foxy Content Sharing
      • ROS2 Humble
      • ROS2 Humble Content Sharing
      • ROS2 Jazzy
      • ROS2 Jazzy Content Sharing
      • GNOME
    • Environment variables
    • Package repositories
    • Platforms and architectures
    • Build options
    • Build providers
    • Snapcraft linters
    • Classic confinement
    • Release notes
  • Snapcraft explanation
    • Parts lifecycle
    • Architectures
    • Advanced grammar
    • Migrate between bases
      • Migrate to core24
      • Migrate to core22
    • Hooks
    • Using snapctl
    • Robotics
      • ROS troubleshooting
      • ROS architectures

Contribute to our docs

The catkin plugin

On this page

The catkin plugin is useful when building ROS 1 parts.

Plugin-specific features and syntax are dependent on which base is being used, as outlined below:

  • base: core20
  • base: core18 | core

This plugin uses the common plugin keywords as well as those for “sources”. For more information, see Snapcraft parts metadata.

base: core20

For core20, this plugin is designed to work with the ROS 1 Noetic extension. If not using this extension, it is required to set the ROS_DISTRO environment variable to noetic using build-environment.

This plugin enables the following plugin-specific keywords on core20:

Additionally, this plugin uses the following plugin-specific keywords:

  • catkin-packages (list of strings) List of catkin packages to build. If not specified, all packages in the workspace will be built. If set to an empty list ([]), no packages will be built, which could be useful if you only want ROS debs in the snap.

  • catkin-packages-ignore (list of strings) List of catkin packages to ignore (i.e. not build or install). If not specified or set to an empty list (), no packages will be ignored.

  • catkin-cmake-args (list of strings) Arguments to pass to cmake projects.

base: core | core18

Snapcraft 7.x or lower is required to build core18 snaps. Snapcraft 8 does not support core18.
Switch with: sudo snap refresh snapcraft --channel=7.x/stable.

For core, this plugin is designed to work with the ROS Kinetic distro.

For core18, this plugin is designed to work with the ROS Melodic distro.

This plugin enables the following plugin-specific keywords on core|core18:

  • catkin-packages (list of strings) List of catkin packages to build. If not specified, all packages in the workspace will be built. If set to an empty list ([]), no packages will be built.
  • source-space (string) The source space containing Catkin packages. By default this is src.
  • include-roscore (boolean) Whether or not to include roscore with the part. Defaults to true.
  • rosinstall-files (list of strings) List of rosinstall files to merge while pulling. Paths are relative to the source.
  • recursive-rosinstall (boolean) Whether or not to recursively merge/update rosinstall files from fetched sources. Will continue until all rosinstall files have been merged. Defaults to false.
  • catkin-cmake-args (list of strings) Configure flags to pass onto the cmake invocation from catkin.
  • underlay (object) Used to inform Snapcraft that this snap isn’t standalone, and is actually overlaying a workspace from another snap via content sharing. Made up of two properties:
    • build-path (string) Build-time path to existing workspace to underlay the one being built, for example $SNAPCRAFT_STAGE/opt/ros/kinetic.
    • run-path (string) Run-time path of the underlay workspace (e.g. a subdirectory of the content interface’s ‘target’ attribute.)
  • catkin-ros-master-uri (string) The URI to ros master setting the env variable ROS_MASTER_URI. Defaults to http://localhost:11311.

With core18, using the catkin plugin creates an external link that causes the security check of snapcraft to fail. This can be resolved by explicitly removing this link.

   stage:
     - -lib/systemd/system/sudo.service

See the catkin-tools plugin plugin for additional methods for building ROS 1 parts. Also see the colcon plugin for building ROS 2 parts.

For a simple example, see ROS applications, or search GitHub for projects already using the plugin.

This is a snapcraft plugin. See Snapcraft plugins and Supported plugins for further details on how plugins are used.


Last updated 1 year, 3 months ago.

Help improve this document in the forum.

Back to top

© 2025 Canonical Ltd.

Ubuntu and Canonical are registered trademarks of Canonical Ltd.
Powered by Charmed Kubernetes

Join the forum, contribute to or report problems with, snapd, Snapcraft, or this site.

  • Terms of Service
  • Data privacy
  • Manage your tracker settings
  • Service status
  • Other functions
  • Share on Twitter
  • Share on Facebook
  • Share on YouTube