All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Integrate your own code with OMPL's build system

OMPL uses CMake for its build system. CMake can generate Makefiles and project files for many IDE's. When developing your own code that relies on OMPL, you have two options:

  1. Add your own code in OMPL's directory structure: If you create C++ code under ompl/src/ompl/[folder], you need to re-run CMake. CMake will detect your code if [folder] is one of the directories already included by OMPL. If you want your code to be in a different location, you should update ompl/src/ompl/CMakeLists.txt accordingly. See the Python documentation for specific instructions on how to create python bindings for your own code. If you write new C++ command line programs, we suggest you look at the second option.
  2. Install OMPL and use your own build system:
    • If you haven't installed OMPL yet, run the following commands in your OMPL build directory:
      cmake -DCMAKE_INSTALL_PREFIX=/some/path
      make install
      
      Alternatively, you can change CMAKE_INSTALL_PREFIX through the CMake GUI (“ccmake .” on UNIX-like systems). With this approach, your code is built completely independently from OMPL's code and you would use OMPL as any other library. Note that it's not required to install OMPL; you can just as easily use the headers from the OMPL source tree and the libraries from the build directory.
    • If you use Makefiles, add “-I/usr/local/include” (or, e.g., “-I${HOME}/ompl/src”) to your compile flags, and “-L/usr/local/lib -lompl” (or, e.g., “-L${HOME}/ompl/build/Release/lib -lompl”) to your link flags. For ease of use with CMake, we have included a CMake file that finds OMPL: FindOMPL.cmake.