All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Installation

To compile OMPL the following two packages are required:

  • Boost (required version 1.40, recommended version 1.44 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

Installation from repository

  • For Ubuntu 10.04 and 11.10, Willow Garage maintains deb packages for the latest version of OMPL. All you need to do is add the repository to your list of sources:
    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-fuerte-ompl
    

Installation from source

  • If using Ubuntu 11.04 or earlier, the supplied Boost version is too old. Ubuntu 10.04 and newer do include Boost 1.40+, which is sufficient, but for the complete functionality of OMPL (Python bindings and boost::numeric::odeint), you will need Boost 1.44+. You can install Boost from source, but it is simpler to add another repository:
    sudo add-apt-repository ppa:boost-latest/ppa
    
  • The default version of CMake should suffice. If needed, 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.

Fedora Linux

  • Thanks to Rich Mattes, there OMPL core is available as a package for Fedora:
    yum install ompl
    
  • Installation from source is also possible if dependencies listed above are installed.

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 +python27
    
    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:
    ls -l `which python`
    
  • 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. The CMAKE_INSTALL_PREFIX variable is set to /usr/local by default.
  • 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. See also the more detailed documentation on generating python 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 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).

Installation on Windows

It is possible to run OMPL natively on Windows, although it must be stressed that extensive testing on Windows is not performed at this time, and running OMPL on Windows is considered experimental. 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).

Required Dependencies

  • MinGW (recommended) or Visual Studio compiler
  • Boost: OMPL requires 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.

Optional Dependencies (Python bindings)

  • A 32-bit version of Python 2.7. Ensure that this is installed before building Boost so that Boost.Python is properly compiled.
  • Ensure that svn, cvs, and Python are all added to the system PATH.
  • Py++: To generate the Python bindings, Py++ and its dependencies must be installed. A batch file has been included to automate this process (analogous to the Linux/Mac installation) that can be executed via cmake. Instructions can be found here. Note that this process assumes the MinGW compiler, and installs gccxml to 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.

Build

  • Once the dependencies are installed, CMake can be used to generate MinGW makefiles or a Visual Studio solution by specifying a specific GENERATOR:
    cd ompl
    mkdir build
    cd build
    mkdir Release
    cd Release
    cmake -DCMAKE_BUILD_TYPE=Release -G "GENERATOR" ../.. [-DCMAKE_INSTALL_PREFIX=/path/to/install]
    
    If you want a debug version of OMPL, change "Release" to "Debug" above. The CMAKE_INSTALL_PREFIX variable is set to C:\Program Files (x86)\ompl by default.

MinGW

  • The CMake generator for MinGW is "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.
  • Use mingw32-make to build OMPL.
  • If you wish to install OMPL, use the install command to copy the binaries, demo code, and other resources to the cmake install prefix. Note that you will need to be in a shell with administrator privileges to install to the default directory.
    mingw32-make install
    
  • Make sure to add the install path's \lib subdirectory to the PATH so that the DLLs are found when code is loaded.

Visual Studio

  • The CMake generator for Visual Studio depends on the version of Visual Studio to generate a solution for. The generator for VS 2010 is "Visual Studio 10", and the generator for VS 2008 is "Visual Studio 9 2008". Consult the CMake documentation for other generators.
  • Open ompl.sln and build the solution. A static library will be created (ompl.lib) to link your code against, as well as several demo programs.
  • You can install OMPL by building the "INSTALL" project inside of the solution. Note that this will attempt to copy files to 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.