Robotics Library

Build RL on Mac OS

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

Please note that Mac OS support of the Robotics Library is in an experimental stage. The following tutorial has only been tested for High Sierra and may need to be adapted for other setups.

Prerequisites

In order to compile the dependencies of RL, this tutorial uses the Homebrew project. First, install the Xcode Command Line Tools (CLT) and Homebrew as described on the Homebrew website.

xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Add the RL Homebrew repository with the following command.

brew tap roboticslibrary/rl

In order to compile RL, install all of its dependencies from Homebrew with the following command.

brew install boost bullet cmake coin eigen nlopt ode pqp qt simage solid soqt

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

brew 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 the library by executing the following commands.

cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_PREFIX_PATH=/usr/local/opt/qt/lib/cmake ..
make
make install

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

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 the interactive interface of CMake ccmake.

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