Step-by-step Instructions#

Here we describe the instructions to build dependencies and packages one-by-one.

Build tools#

ROS is not required (except for ROS-specific components, see below) but we do use build tools from ROS which you can install even without ROS:

  • colcon to coordinate the installation from source of different packages [and vcstool to simplify managing source code]

    $ pip install -U colcon-common-extensions
    
  • ament_cmake to manage resources and integrate better with ROS. If you installed ROS, you already have it, else you can build it from source (see below) or, only on Linux, possibly from binary

    $ sudo apt install -y ament-cmake
    
  • ament_package is needed by ament_cmake. On Linux, you may install it from binary

    $ sudo apt install -y python3-ament-package
    

    else you can build it from source (see below).

  • ament_index_cpp is a c++ library to share resources, like plugins. It is also distributed with ROS 2, else you need to build it from source (see below).

If you need to build the ament packages, clone them and build them with colcon.

git clone https://github.com/ament/ament_cmake.git src/ament_cmake
git clone https://github.com/ament/ament_package src/ament_package
git clone https://github.com/ament/ament_index src/ament_index
colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF --packages-up-to ament_cmake ament_index_cpp ament_package

Note

The ROS build tools are not required to build or run navground. Have a look at How to build without the ROS build tools to learn what they do and how to install navground without them.