Install dartpy using pip3
Dependencies
# Required dependencies
sudo apt-get install build-essential cmake pkg-config git
sudo apt-get install libeigen3-dev libassimp-dev libccd-dev libfcl-dev libboost-regex-dev libboost-system-dev
sudo apt-get install libtinyxml2-dev liburdfdom-dev
sudo apt-get install libxi-dev libxmu-dev freeglut3-dev libopenscenegraph-dev
sudo apt-get install python3-pip
# Ubuntu 18.10 and older
git clone https://github.com/pybind/pybind11 -b 'v2.2.4' --single-branch --depth 1
cd pybind11
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF
make -j4
sudo make install
# Ubuntu 19.04 and newer
sudo apt-get install pybind11-dev
# Optional dependencies
sudo apt-get install libbullet-dev libode-dev liboctomap-dev
# Ubuntu 16.04 and 18.04
sudo apt-get install libnlopt-dev
# Ubuntu 18.10 and later
sudo apt-get install libnlopt-cxx-dev
dartpy
# This can take several minutes to build dartpy from source
pip3 install dartpy
Warning: Known issues: (1) Pip install of dartpy on Anaconda environment does’t work; import error. (2) Uninstalling pip-installed dartpy doesn’t completely remove dartpy.so, and this leads to incorrect re-installing.
Once installed, you can simply test if dartpy is successfully installed by running:
$ python3
>>> import dartpy as dart
>>> world = dart.simulation.World()
>>> world.step()
Install dartpy using apt
On Ubuntu 19.04, 19.10
In Ubuntu 19.04 and 19.10, dartpy can be installed using apt for both of Python 2 and Python 3.
sudo apt-add-repository ppa:dartsim/ppa
sudo apt install python-dartpy # for Python 2
sudo apt install python3-dartpy # for Python 3
Once installed, you can simply test if dartpy is successfully installed by running:
$ python3
>>> import dartpy as dart
>>> world = dart.simulation.World()
>>> world.step()
Install dartpy from Source
Dependencies
# Required dependencies
sudo apt-get install build-essential cmake pkg-config git
sudo apt-get install libeigen3-dev libassimp-dev libccd-dev libfcl-dev libboost-regex-dev libboost-system-dev
sudo apt-get install libtinyxml2-dev liburdfdom-dev
sudo apt-get install libxi-dev libxmu-dev freeglut3-dev libopenscenegraph-dev
sudo apt-get install python3-pip
# Ubuntu 18.10 and older
git clone https://github.com/pybind/pybind11 -b 'v2.2.4' --single-branch --depth 1
cd pybind11
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DPYBIND11_TEST=OFF
make -j4
sudo make install
# Ubuntu 19.04 and newer
sudo apt-get install pybind11-dev
# Optional dependencies
sudo apt-get install libbullet-dev libode-dev liboctomap-dev
# Ubuntu 16.04 and 18.04
sudo apt-get install libnlopt-dev
# Ubuntu 18.10 and later
sudo apt-get install libnlopt-cxx-dev
Build and Install dartpy
-
Clone the repository into a directory in your home folder:
git clone https://github.com/dartsim/dart.git
-
Change directory to the DART repository and checkout the latest release of DART 6, (e.g.,
v6.11.1
):cd dart git checkout tags/v6.11.1
-
Create a build directory:
mkdir build cd build
-
Configure and build DART:
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/ -DCMAKE_BUILD_TYPE=Release -DDART_BUILD_DARTPY=ON make -j4 dartpy
-
Install dartpy:
sudo make install-dartpy