Skip to content

Building from Source

Jeongseok Lee edited this page May 24, 2018 · 1 revision

Dependencies

On Ubuntu using CMake

Adding PPA

Several PPAs should be added to install the dependencies.

Xenial and Bionic

$ sudo add-apt-repository ppa:dartsim/ppa
$ sudo add-apt-repository ppa:personalrobotics/ppa

Trusty

$ sudo add-apt-repository ppa:libccd-debs/ppa
$ sudo add-apt-repository ppa:fcl-debs/ppa
$ sudo add-apt-repository ppa:dartsim/ppa
$ sudo add-apt-repository ppa:personalrobotics/ppa

Installing Dependencies

$ sudo apt-get install cmake libboost-dev libboost-python-dev libboost-python-numpy-dev libdart6-all-dev
$ sudo apt-get install python-dev python-numpy python-boost-numpy-eigen    # for Python 2
$ sudo apt-get install python3-dev python3-numpy python3-boost-numpy-eigen # for Python 3

Building dartpy

⚠️ Warning: The Boost.Python bindings generated by may not build in GCC. We suggest that you use Clang 3.7 or above to avoid potential issues. If you are on Ubuntu 14.04, builds of Clang are available in the LLVM Apt repository.

dartpy uses the CMake build system. You should follow the standard CMake build process. :

$ cd <dartpy_root_directory>
$ mkdir build
$ cd build
$ cmake .. -DDARTPY_PYTHON_VERSION=3  # Use -DDARTPY_PYTHON_VERSION=2 to build for Python 2

Once the CMake configuration is complete, you can generate the Boost.Python bindings of dartpy by running:

$ make binding

If you are using dart-<version>-binding (e.g., dart-6.3-binding) branch, you don't need to generate bindings as those branches already include generated bindings.

Once the binding generation is done, you can build and install dartpy by running:

$ make  # you may want to build dartpy using multi-core by executing `make -j4`
$ sudo make install

On Ubuntu using Catkin

Installing Dependencies

If wstool is available, you can use this .rosinstall file to checkout Chimera, Boost.Python, Boost.NumPy/Eigen, and DART from source:

- git:
    local-name: boost_numpy
    uri: https://github.com/personalrobotics/Boost.NumPy.git
    version: 0.0.1
- git:
    local-name: boost_numpy_eigen
    uri: https://github.com/personalrobotics/Boost.NumPy_Eigen.git
    version: 0.0.1
- git:
    local-name: chimera
    uri: https://github.com/personalrobotics/chimera.git
- git:
    local-name: dart
    uri: https://github.com/dartsim/dart.git
    version: release-6.3
- git:
    local-name: dartpy
    uri: https://github.com/personalrobotics/dartpy.git

If these packages are in a Catkin workspace, you can follow these instructions to use catkin-tools to build dartpy and its dependencies.

Building dartpy

If you are using catkin_tools, change your compiler to Clang 3.7 by running:

$ catkin config -a --cmake-args -DCMAKE_C_COMPILER=$(which clang-3.7) -DCMAKE_CXX_COMPILER=$(which clang++-3.7)

Then, you follow the standard Catkin build process:

$ catkin build