/
Ament/Colcon

Ament/Colcon



Resources

A Minimal Environment

On Ubuntu, setup the ROS2 repository and install the colcon packages, e.g.

sudo apt install curl
curl http://repo.ros2.org/repos.key | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64,arm64] http://repo.ros2.org/ubuntu/main xenial main" > /etc/apt/sources.list.d/ros2-latest.list'
sudo apt update
sudo apt install python3-vcstool python3-colcon-core python3-colcon-common-extensions
sudo apt install 

Check out my source cross-compile kobuki for something that configures a very minimal environment for compilation. The lads from OSRC/Ekumen also embarked on using binary dockerised recipes of the same for ci github actions for the maliput libraries.

Topics

  • Build Folder
    • Separated into many build/<package> subdirectories
    • Each folder it's own CMake build directory
    • All the usual things apply for cmake
      • ccmake for changing cached variables
      • make clean / make -j5 for building
  • PkgConfig
    • Missing at the moment (2018Q1), so accessing from a non-cmake build system will be difficult

Package Manifests

  • catkin_pkg still provides libraries for parsing package.xml files, even though it is no longer aptly named (should be ament)
  • There is a command line tool, ament_index, that helps find the root directory for any package in a runtime environment.
    • Check ament_index_python for code snippets
    • Example commande line usage: ament_index packages py_trees

ToDo

  • Pure CMake Projects in Colcon - write up how to map pure cmake packages between cmake project names and ament package.xml dependency names (did for Sophus in the kobuki cross-compile builds)
  • How to find a package.xml


Related content

Actions
More like this
Environment Hooks
Environment Hooks
More like this
VSCode
More like this
Launch
More like this
Eclipse
More like this
VirtualEnv
VirtualEnv
More like this