To compile OMPL the following two packages are required:
- Boost (recommended version 1.42 or higher) and
- CMake (required version 2.8.2 or higher).
For running the tests, you will also need GTest. For the python bindings you need to have the python libraries and header files installed. If you also want to be able to generate the python bindings, then you need to install Py++. To (re)generate this documentation locally you will need Doxygen.
Below are installation instructions for Linux, OS X, and Windows.
- Note:
- If you are using ROS, please see the ompl package in ROS.
Installation on Linux and Mac OS X
Below are installation instructions for Ubuntu Linux and Mac OS X. Similar steps can be taken for other distributions, but package names may not be identical.
Ubuntu Linux
- If using Ubuntu 10.04 or earlier, the supplied Boost version is too old. You will need to add another repository. For Ubuntu 9.10 or 10.04, this can be done with the following command:
sudo add-apt-repository ppa:gezakovacs/boost
For Ubuntu 9.04 or earlier, adding the repository will require a different approach.
- If using Ubuntu 9.10 or earlier, the supplied version of CMake is too old. You can download the latest version from here.
- Install Boost, CMake
sudo apt-get install libboost-all-dev cmake
- To be able to build tests, generate documentation, generate Python bindings, build the ODE extension, the following packages are also needed:
sudo apt-get install libgtest-dev doxygen graphviz python-dev libode-dev
- To be able to generate Python bindings, follow these instructions.
- Follow the common steps below.
Mac OS X
- It is easiest to install the dependencies through MacPorts, a package manager for OS X, so install MacPorts first.
- 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 selfupdate
sudo port install ompl
This is it. You are done. Demo programs can be found in /opt/local/share/ompl
.
- If you downloaded the source distribution of OMPL, then you need to install the dependencies Boost, and CMake. Optionally, you can also install the Open Dynamics Engine, Py++, and the Python libraries and headers. If you have MacPorts installed, type the following:
sudo port selfupdate
sudo port install boost +python27 \; install cmake ode py27-pyplusplus-devel
If you omit the +python27
part, Boost.Python will not be installed, and the Python bindings for OMPL cannot be compiled.
- It is very important that you use the same installed version of Python for all dependencies and OMPL.app. 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:
- To be able to build tests and generate documentation, Google Test and Doxygen are also needed:
sudo port install google-test doxygen
- Follow the common steps below.
Common steps
- Create a build directory and run cmake:
cd ompl
mkdir -p build/Release
cd build/Release
cmake -DCMAKE_BUILD_TYPE=Release ../.. [-DCMAKE_INSTALL_PREFIX=/path/to/install]
If you want a debug version of ompl, change "Release" to "Debug" above.
- If Python bindings are to be generated, type
make update_bindings
. (If this does not work and you are sure you have Py++ installed, you may have to run cmake
again.) Note: make update_bindings
is never run automatically. If you change any of the OMPL header files, you need to type make update_bindings
again for the changes to be reflected in the Python modules. The command make
needs to be executed after every call to make update_bindings
.
- Compile OMPL by typing
make
.
- Optionally, run the test programs by typing
make test
.
- Optionally, generate documentation by typing
make doc
.
- If you need to install the library, you can type
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.
Installation on Windows
At this point we support only Linux and OS X, and we have not done any extensive testing on Windows. That said, it is definitely possible to compile and install OMPL on Windows.
- Download and install CMake.
- If you plan to use Microsoft Visual Studio, you can download Boost here. If you want to use MinGW or Cygwin, follow the Unix installation instructions.
- Optionally, download and install Python.
- Run CMake (either the GUI or the command line version). From the GUI it is easy to generate project files for Visual Studio or Makefiles.
- Build the "solution" ALL in Visual Studio, or run
make
if you use MinGW/Cygwin.