How to build without the ROS build tools#
In the installation instruction, we make use of two build tools from the ROS. Here we explain their role and how to build navground without them.
Colcon#
Colcon is a tool to build a collection of package. It takes care of building them in separate directories to avoid conflicts and in the correct order to avoid missing dependencies. It handles C++ packages using CMake and Python packages using setuptools. It merges all builds in a single install directory together with scripts like install/setup.bash to setup the environment (i.e., PYTHONPATH, PATH, and so on).
Once navground is built using colcon, there are no runtime dependencies, except for the need to setup the environment:
the install directory can be moved where we like and running navground does not require colcon to be installed.
Using colcon is typical in ROS 2 development. Even without ROS, it facilitates handling collection of packages. We recommend using it to users that want to extend navground, in particular if using C++. Yet, it is not needed to build navground.
Ament#
Ament provides packages to simplify the management of collection of packages. For navground, we make use of three ament packages if available:
- ament_cmake is a collection of cmake modules which implement common functionalities like exporting targets; 
- ament_index_cpp is a c++ library to interact with the ament resource index, which is a way for packages to share resources (like navground plugins); 
- ament_package is a Python package to keep track of installed packages and is needed by ament_cmake. 
Like for colcon, using ament is expected in ROS 2 but it is not necessary to build navground. In fact, you don’t need to change anything to build without ament, just don’t install it or
specify the option -DWITH_AMENT=OFF when building navground_core.
When ament is not used, navground plugins are registered on a ad-hoc index. This is the reason why, when not using colcon, we need to export the index location:
$ export NAVGROUND_PLUGINS_PREFIX=`pwd`:$NAVGROUND_PLUGINS_PREFIX