Build From Source - rbdl/rbdl-toolkit GitHub Wiki

Building from Source

Use cmake to build and install, make sure to recursively clone the repository.

git clone --recursive https://github.com/ORB-HD/rbdl-toolkit

Dependencies

  • RBDL with minimum version 3.0.0 with error handling rbdl-orb
    • Note: currently for urdf models to work there is a PR open on rbdl-orb: while it is not merged please use my fork of rbdl-orb this is only required if you want to build rbdl-toolkit yourself. Othewise use the provided AppImage or DMG!
  • Eigen3
  • Qt5 version >= 5.14
  • Qt3D and assimp for model loading

Building On Ubuntu

Warning The most stable experience is currently provided with QT version 5.13.2 other version might work but are not guarranted. This is due to the Qt3D Api no being stable yet.

Since our research group is mostly using Ubuntu here is a quick one line install command for all dependencies except RBDL.

sudo apt install qt5* qt3d* libeigen3-dev libassimp-dev mesa-common-dev libboost-dev

Ubuntu installs qt5.9 per default and rbdl-toolkit might work with the exception of the rendering plugin. In order use the rendering plugin you will have to install qt your self. To do this download the open source version of qt from the website and follow the installation instructions. Make sure to install at least version 5.14 lower versions are not guaranteed to work, since Qt3D is at the moment subject to many changes!

Afterwards build rbdl-toolkit with cmake and adding the CUSTOM_QT_PATH variable set to your [QT_INSTALL_DIR]/[QT_VERSION]/[COMPILER]. If you compiled QT yourself just set this variable to the -prefix you used for the compile/install.

There may be warnings in ccmake that it can't find UnitTest, but it's just a warning and is safe to continue.

From scratch, the following code works for me:

sudo apt install qt5* qt3d* libeigen3-dev libassimp-dev mesa-common-dev libboost-dev
git clone --recursive https://github.com/ORB-HD/rbdl-toolkit
cd rbdl-toolkit
mkdir build
cd build
cmake -DCUSTOM_QT_PATH=~/Qt5.13/5.13.2/gcc_64 ..
make
sudo make install

Plugins

To also build the optional plugins you will need to set the cmake option TOOLKIT_BUILD_OPTIONAL_PLUGINS to ON. This might mean that you will require additional dependencies like libffmpeg.

Building for Windows

To get RBDL-Tookit running on windows you will need to compile it from source yourself!

First you need to install some tools and libraries:

  • A windows C++ compiler (for example MinGW
    • make sure to add mingw to the system environment variable path
  • CMake for Windows
  • Git
  • Install Windows make command (GnuWin32.Make) and add it to the System Environment Variable Path
  • install Microsoft Visual C++ 17 Redistributable (x86) (before Qt)
  • Lua for Windows
  • Qt Opensource version > 5.14
  • Download Eigen library as Zip and extract it to a Library directory
  • Install Boost
  • optional step: install Catch2 by downloading the source and build it using cmake (this step is only required if you want to run the test suite of rbdl)
  • if you need support for the toolkit optional plugins you will need to install the ffmpeg dev version on windows

The first step is to build RBDL-ORB for windows

  • recursively clone the rbdl-orb repository git clone --recursive https://github.com/orb-hd/rbdl-orb
  • open cmake gui and select the Path where you downloaded rbdl-orb to
  • generate build files with cmake with the configure button
  • When using the MinGW compiler select MinGW Makefiles as the target for cmake
  • There will be some errors that need to be resolved by setting the correct CMake Variables via the Variable Editor of the Cmake Program:
    • Set the EIGEN_INCLUDE_DIR
    • Set the LUA_INCLUDE_DIR and LUA_LIBRARY paths
    • They may be more errors, you always need to set the INCLUDE and LIBRARY paths to the destinations where you installed the libraries
  • For the Toolkit to function correctly you need to enable the following addons: luamodel, urdf
  • Also you need to enable building rbdl as a static library, otherwise the build on windows will fail
  • generate the Makefile with the Generate button
  • go to the build directory with the cmd or powershell and run make
  • to install rbdl into the system you need to use a shell with administrator privledges and use the command make install

The next step is to build RBDL-Toolkit:

  • recursively clone the source code git clone --recursive https://github.com/orb-hd/rbdl-toolkit
  • open cmake gui and select the Path to where you just put the rbdl-toolkit source code
  • generate build files with the MinGW Makefile as the target for cmake
  • again you need to resolve all the not found library dependencies by setting the appropriate paths
  • generate the Makefile with the Generate button
  • go to the build directory with the cmd or powershell and run make
  • to install rbdl-toolkit into the system you need to use a shell with administrator privledges and use the command make install