Add New Packages to the Workspace

To add a new package to the CPM Lab, follow these steps:

  1. Create the package

    • Name the package with the prefix cpm_lab_, e.g. cpm_lab_lane_change_planner.

    • Set the version in package.xml to the current CPM Lab version. The release sets it to the new version afterwards.

    • Add a CHANGELOG.rst with a Forthcoming section that describes the package, see Releasing the CPM Lab:

      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      Changelog for package cpm_lab_lane_change_planner
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      
      Forthcoming
      -----------
      * Initial version of the lane change planner
      
    • Add a LICENSE file to the package.

    • Declare all dependencies in package.xml. Libraries the package links against at run time belong in <depend>, not only in <build_depend>: the Debian packages and the runtime Docker image of the workspace install only the run dependencies.

  2. Add it to a component repository

    Put the package into the component repository it belongs to, e.g. a planner into high-level-controller. A new component repository is added as git submodule in src/ of the lab workspace ros2-workspace-lab:

    cd <path-to-ros2-workspace-lab>
    git submodule add git@git.rwth-aachen.de:CPM/Project/Lab/ros2/components/<component>.git src/<component>
    

    The release finds the components through the submodules of the lab workspace, so a new component is released automatically. It needs a dev and a main branch, a CI pipeline, and the same protected branches and merge settings as the other components, see Releasing the CPM Lab.

  3. Add it to the meta package

    Declare the new package as dependency of the meta package cpm_lab in src/cpm_lab/package.xml of the lab workspace, so ros-<ros2-distro>-cpm-lab installs it:

    <exec_depend>cpm_lab_lane_change_planner</exec_depend>
    
  4. Vehicle workspace (only for packages that run on the muCars)

    A component that the vehicle controller needs is also added as submodule of ros2-workspace-vehicle. Every submodule of the vehicle workspace must be a component of the lab workspace as well, otherwise the release stops.