Quick Start

  1. Add dh-ros to Build-Depends in debian/control

  2. Add cmake and/or dh-sequence-python3 to Build-Depends as needed

  3. Use the ROS build system in debian/rules:

    • #!/usr/bin/make -f
              dh $@ --buildsystem=ros


dh-ros is a Debian helper for ROS. The ros build system looks for package.xml files in the sources to discover all ROS packages and builds them individually, in the correct order according to their dependencies.

The ros buildsystem is a meta buildsystem that will not actually perform the build itself. Instead it will look at the build type in the package.xml of each ROS package and invoke the appropriate build system:

Build type Build system Build-Depends
cmake cmake cmake
catkin cmake cmake
ament_cmake cmake cmake
ament_python pybuild dh-sequence-python3

It is your responsibility to add the required build dependencies to debian/control.


For technical reasons, all operations are carried out as part of the dh_auto_install step. This is unfortunately required so that ROS packages can discover each other as build dependencies.

In order to customize the individual build stages, you can export ROS_ variables in your debian/rules, similar to the way pybuild is customized:

You can also export PYBUILD_ variables as needed.

Each variable name (including the PYBUILD_ ones) can be suffixed with _<ros_package_name>. This will limit their effect to the specified ROS package. Replace all non-alphanumeric characters in package names with underscore (_) to create a valid identifier.

You can exclude ROS packages from the build by listing them in ROS_SKIP_PACKAGES.