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
      

Introduction

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.

Customization

You can find many ROS specific customization hooks on the rosbuilder manual page. For ament_python, which invokes pybuild, 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.