If you use Linux or OS X, then all dependencies can be installed either through a package manager or by OMPL's build system. In other words, you probably don't have to compile dependencies from source.
To compile OMPL the following two packages are required:
The build system includes a number of options that you can enable or disable. To be able to generate python bindings you need to install the Python library and header files.
Below are more detailed installation instructions for Linux, OS X, and Windows.
Below are installation instructions for Ubuntu Linux. Similar steps can be taken for other distributions, but package names may not be identical.
For recent versions of Ubuntu, deb packages for the latest version of OMPL are found in ROS distributions. All you need to do is add the repository to your list of sources (you probably have added this already if you are using ROS):
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list' wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
and install OMPL:
sudo apt-get update sudo apt-get install ros-`rosversion -d`-ompl
sudo add-apt-repository ppa:boost-latest/ppa sudo apt-get update
Install Boost and CMake
sudo apt-get install libboost-all-dev cmake
Some versions of Linux offer multiple versions of Boost. It is strongly advised to install only one version.
sudo apt-get install doxygen graphviz python-dev libode-dev
cd ompl mkdir -p build/Release cd build/Release cmake ../..
make installpyplusplus && cmake . # download & install Py++ make -j 4 update_bindings
make -j 4
.make test
.make doc
.sudo make install
. The install location is specified by CMAKE_INSTALL_PREFIX
. If you install in a non-standard location, you have to set the environment variable PYTHONPATH to the directory where the OMPL python module is installed (e.g., $HOME/lib/python2.7/site-packages).Thanks to Rich Mattes, OMPL core is available as a package for Fedora:
yum install ompl
This package may not be the latest version, though. The source installation instructions for Fedora Linux are mostly the same as for Ubuntu Linux, although the packages have slightly different names. On Fedora 18, you can install the dependencies like so:
sudo yum install boost-devel cmake python-devel
The optional dependencies can be installed like so:
sudo yum install doxygen graphviz ode-devel
The build steps are the same as for Ubuntu Linux:
cd omplapp mkdir -p build/Release cd build/Release cmake ../.. make installpyplusplus && cmake . # download & install Py++ make -j 4 update_bindings make -j 4
Thanks to Leopold Palomo-Avellaneda, OMPL core is available as a collection of packages for Debian:
apt-get install libompl-dev ompl-demos
It is easiest to install the OMPL through MacPorts, a package manager for OS X. However, if you feel adventurous, it is possible to install OMPL's dependencies with HomeBrew and compile OMPL yourself.
If you do not need to modify or see the source code of OMPL, then the easiest way to install OMPL is with the MacPorts port
command:
sudo port sync sudo port install ompl
This is it. You are done. It will take quite a while, though, to download, build, and install OMPL and all its dependencies. It is recommended to let this running overnight. Demo programs can be found in /opt/local/share/ompl
.
sudo port sync sudo port install boost cmake ode py27-pyplusplus-devel
It is very important that you use the same installed version of Python for all dependencies and OMPL. If you are using MacPorts, then you must use the MacPorts version of python 2.7 (most likely installed in /opt/local/bin
). To make this version the default python version, make sure /opt/local/bin
appears before /usr/bin
in your PATH. You can add a line like this to your ${HOME}/.bash_profile
:
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
Next, execute the following command:
sudo port select python python27
You can check if the MacPorts-installed python 2.7 is the default one by typing the following command:
ls -l `which python`
sudo port install doxygen
cd ompl mkdir -p build/Release cd build/Release cmake ../..
make -j 4 update_bindings
make -j 4
.make test
.make doc
.sudo make install
. The install location is specified by CMAKE_INSTALL_PREFIX
. If you install in a non-standard location, you have to set the environment variable PYTHONPATH to the directory where the OMPL python module is installed (e.g., $HOME/lib/python2.7/site-packages).Thanks to Andrew Dobson for these instructions! These instructions are somewhat experimental, however, and we haven't tested them ourselves. Email us if you have suggestions to improve these instructions.
brew doctor
to make sure that everything is ready to go. If not, follow its instructions until it is ready.brew install boost cmake assimp ode
brew install doxygen graphviz
cd ompl mkdir -p build/Release cd build/Release cmake ../..
make installpyplusplus cmake . make update_bindings
make
.make test
.make doc
.sudo make install
. The install location is specified by CMAKE_INSTALL_PREFIX
. If you install in a non-standard location, you have to set the environment variable PYTHONPATH to the directory where the OMPL python module is installed (e.g., $HOME/lib/python2.7/site-packages).For best performance, the MinGW compiler is recommended. Visual Studio can also be used to build the core OMPL library, but currently it is not possible to generate the python bindings for OMPL with this compiler. However, if the bindings are generated with MinGW, the bindings can be compiled by Visual Studio with some minor tweaks to the code (not recommended, unless you are an experienced Windows developer).
Boost, version 1.44 or greater.
It is recommended to make a complete Boost compilation from source. If using Visual Studio, this process can be automated using the BoostPro installer. Once complete, set the environment variables BOOST_ROOT
and BOOST_LIBRARYDIR
to the locations where Boost and its libraries are installed. The default locations are C:\Boost
and C:\Boost\lib
. Ensure that BOOST_LIBRARYDIR
is also in the system PATH so that any necessary Boost dlls are loaded properly at runtime.
PATH
.C:\gccxml
. You will need to be in a shell with administrator privileges to execute this batch file. Once installed, it is recommended that you open a new shell to realize the new environment settings.cd ompl mkdir build cd build mkdir Release cd Release cmake -G "GENERATOR" ../.. [-DCMAKE_INSTALL_PREFIX=/path/to/install]
The CMAKE_INSTALL_PREFIX variable is set to C:\Program Files (x86)\ompl
by default.
"MinGW Makefiles"
To generate the python bindings (optional), execute the update_bindings make command before compiling:
mingw32-make update_bindings
Note: update_bindings
is never run automatically. If you change any of the OMPL header files, you need to regenerate the bindings for the changes to be reflected in the Python modules. See also the more detailed documentation on generating python bindings.
mingw32-make
to build OMPL.mingw32-make install
"Visual Studio 10"
, and the generator for VS 2008 is "Visual Studio 9 2008"
. Consult the CMake documentation for other generators.C:\Program Files (x86)\ompl
(the default). The installation will fail unless Visual Studio is opened with administrator privileges, or a non-system install prefix is specified when cmake is run.