Robotics Library

Build RL on Ubuntu

CMake GUI
The Robotics Library uses CMake as a build system. It can generate project files for various platforms, e.g., Unix Makefiles.

Prerequisites

In order to compile RL and the dependencies on Ubuntu, you need to install a compiler (e.g., the GNU Compiler Collection) and the cross-platform build system CMake ≥ 2.8.11. You can install them on Ubuntu with the following command.

sudo apt-get install build-essential cmake

Optionally, you can also install one or both of the available user interfaces for CMake.

sudo apt-get install cmake-curses-gui cmake-gui

A number of third-party libraries is required to build all components. It is recommended to get these dependencies from binary packages included in the Ubuntu distribution or from the project's PPA. The latter can be added to the system with the following commands.

sudo add-apt-repository ppa:roblib/ppa
sudo apt-get update

In order to install the third-party dependencies required by the individual components, run the following command in a terminal. Please make sure to install the correct version of SOLID (≥ 3.5.6) from the PPA, as it is not included in any main repository. Also check for the version numbers of libboost-dev (≥ 1.46) and libeigen3-dev (≥ 3.2.0).

sudo apt-get install libboost-all-dev libbullet-dev libdc1394-22-dev libeigen3-dev libnlopt-dev libode-dev libsimage-dev libsolid3d-dev libsoqt-dev libxml2-dev libxslt1-dev

In order to generate the API documentation, you need to install the following software packages as well.

sudo apt-get install doxygen graphviz

For multi core compilation support (e.g., quad core), set these variables before running the other commands.

export MAKEFLAGS=-j4

Building the Robotics Library

Download the source code and additional examples and extract the archives. Open a terminal and change into the directory of the extracted source.

tar -xvzf rl-0.7.0.tar.gz
tar -xvzf rl-0.7.0-examples.tar.gz
cd rl-0.7.0

Create a build directory.

mkdir build
cd build

Build and install the library by executing the following commands.

cmake -D CMAKE_BUILD_TYPE=Release ..
make
sudo make install
sudo ldconfig

If CMake installs into platform-specific folders such as /usr/local/lib/x86_64-linux-gnu, libraries may not be automatically indexed (e.g., demos will fail to run because librlkin or librlsg are not found). You can add that directory to ldconfig following this Stackoverflow answer.

Additionally, the following commands can be used to build the API documentation on demand and to run tests included in the project.

make doc
ctest --output-on-failure

If tests fail without reason, please send us a bug report including detailed results from the test cases, state your operating system, kernel, and chipset.

lsb_release -a
uname -a
gcc --version
ctest -V --output-on-failure

Build Configuration

You can configure the build process by specifying a number of CMake options. Building of selected libraries, demos, or extra applications can be disabled in order to avoid certain dependencies if they are not required. The following table shows an overview of all RL specific parameters and their default values. These options can be directly appended to the cmake command. For a detailed overview of all options, you can run one of the available user interfaces of CMake, ccmake or cmake-gui.

.
Option Description Values
-D BUILD_DEMOS=ON Enable/disable building the demo applications. ON/OFF
-D BUILD_DOCUMENTATION=OFF Enable/disable building the API documentation. ON/OFF
-D BUILD_EXTRAS=ON Enable/disable building the extra applications. ON/OFF
-D BUILD_RL_HAL=ON Enable/disable building the RL::HAL library and its dependencies. ON/OFF
-D BUILD_RL_KIN=ON Enable/disable building the RL::KIN library and its dependencies. ON/OFF
-D BUILD_RL_MATH=ON Enable/disable building the RL::MATH library and its dependencies. ON/OFF
-D BUILD_RL_MDL=ON Enable/disable building the RL::MDL library and its dependencies. ON/OFF
-D BUILD_RL_PLAN=ON Enable/disable building the RL::PLAN library and its dependencies. ON/OFF
-D BUILD_RL_SG=ON Enable/disable building the RL::SG library and its dependencies. ON/OFF
-D BUILD_RL_UTIL=ON Enable/disable building the RL::UTIL library and its dependencies. ON/OFF
-D BUILD_RL_XML=ON Enable/disable building the RL::XML library and its dependencies. ON/OFF
-D BUILD_SHARED_LIBS=ON Enable/disable building shared libraries. ON/OFF
-D BUILD_TESTS=ON Enable/disable building the test applications. ON/OFF
-D USE_QT5=ON Prefer Qt5 over Qt4 if available. ON/OFF

Building the Dependencies

Robotics Library Components
The Robotics Library uses a number of external dependencies, some of which are optional. For definite and current information of the exact dependencies, please refer to the build files in the source code.

SOLID

For current Linux systems, SOLID is probably the only dependency you may want to compile manually, as it is not included in any of the main repositories, only in our PPA. It is an optional dependency for the scene graph component and can be used for collision detection and distance computation.

Download the SOLID source code and extract the archive. Open a terminal and change into the directory of the extracted source. Build and install the library by executing the following commands.

cmake -D CMAKE_BUILD_TYPE=Release ..
make
sudo make install
sudo ldconfig