Visit the OMPL installation page for detailed installation instructions.
OMPL has the following required dependencies:
The following dependencies are optional:
- ODE (needed to compile support for planning using the Open Dynamics Engine)
- Py++ (needed to generate Python bindings)
- Doxygen (needed to create a local copy of the documentation at https://ompl.kavrakilab.org/core)
Once dependencies are installed, you can build OMPL on Linux, macOS, and MS Windows. Go to the top-level directory of OMPL and type the following commands:
mkdir -p build/Release
cd build/Release
cmake ../..
# next step is optional
make -j 4 update_bindings # if you want Python bindings
make -j 4 # replace "4" with the number of cores on your machine
The implementation mianly includes the following
-
Create a new type of cost function using simplified_elastic_band_model (
src/ompl/base/objectives/src/DeformedPathOptimizationObjective.cpp
) -
Modify BiTRRT algorithm in
src/ompl/geometric/planners/rrt/BiTRRT.hdistanceFunction
(a) Add the input of the position of the elastic band
(b) Modify the
distanceFunction
(c) Modify the condition that two tree merges
(d) use the cost
DeformedPathOptimizationObjective
-
You should first change the path defined in the
ompl/CMakeLists.txt
: set theCONTACT_DETECTION_PATH
to the path of the contact_detection package. -
To use moveit with local installed ompl library, you need to remove the default-installed ompl version inside ros, see moveit/moveit_ros#623 and https://ompl.kavrakilab.org/buildSystem.html
cd build/Release
cmake ../.. -DPYTHON_EXEC=/usr/bin/python${PYTHONV}
make
sudo make install
Note that, after the modification of the contact_detection package, you should build and install ompl first, then build your ros workspace.