move-base-ompl icon indicating copy to clipboard operation
move-base-ompl copied to clipboard

Could not find a package configuration file provided by "OMPL" with any of the following names:

Open DavidHan008 opened this issue 7 years ago • 12 comments

CMake Error at move-base-ompl/CMakeLists.txt:19 (find_package): By not providing "FindOMPL.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "OMPL", but CMake did not find one.

Could not find a package configuration file provided by "OMPL" with any of the following names:

OMPLConfig.cmake
ompl-config.cmake

Add the installation prefix of "OMPL" to CMAKE_PREFIX_PATH or set "OMPL_DIR" to a directory containing one of the above files. If "OMPL" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred! See also "/home/davidhan/catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/davidhan/catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed

DavidHan008 avatar Jun 18 '17 08:06 DavidHan008

i use apt-get install ros-indigo-ompl* it ok

DavidHan008 avatar Jun 18 '17 08:06 DavidHan008

have you slolved the problem , I have the same

mechaliomar avatar Apr 13 '19 05:04 mechaliomar

I have another fix for this in my fork. We can add a FindOMPL.cmake file in a CMakeModules folder inside the package and make a small change to the CMakeLists.txt. This makes it easy for the build system to find OMPL. Especially if you have built and installed OMPL from source rather than installing the pre-built binaries from the ROS build system.

https://github.com/sauravag/move-base-ompl/commit/4365c5eb1d7a6d56d37761aac88cd003931c183c

sauravag avatar Jul 07 '19 14:07 sauravag

How yo add ? @sauravag

EricWang1hitsz avatar Aug 27 '19 08:08 EricWang1hitsz

Install OMPL dependency $ sudo apt install libompl-dev

Do below change in CMakeList

Instead of find_package(OMPL REQUIRED) change to find_package(OMPL)

darshankt avatar Oct 16 '20 07:10 darshankt

@darshankt This doesn't search for the correct OMPL cmake file. use find_package(ompl REQUIRED) instead.

machinekoder avatar Nov 30 '20 11:11 machinekoder

Hey @machinekoder,

I tried find_package(ompl REQUIRED) but that started to give errors like:

/home/sakura/catkin_ws/src/path_planning/src/old_path_planning.cpp:28:10: fatal error: ompl/base/spaces/SE3StateSpace.h: No such file or directory
 #include <ompl/base/spaces/SE3StateSpace.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/home/sakura/catkin_ws/src/path_planning/src/path_planning.cpp:28:10: fatal error: ompl/base/spaces/SE3StateSpace.h: No such file or directory
 #include <ompl/base/spaces/SE3StateSpace.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Please let know if anyone found a solution to this, Thanks!

Mohit505Git avatar Dec 26 '20 17:12 Mohit505Git

@Mohit505Git , I have the same problem, and I'm sure I have the .h file. Did you solve it?

c0y0h avatar Dec 03 '21 03:12 c0y0h

@Mohit505Git I got it! It's because that the package ompl in opt/ros/noetic/include is named ompl1.5!!!

c0y0h avatar Dec 03 '21 04:12 c0y0h

@c0y0h how did you finally solve the problem then? I installed ros-noetic-ompl as well as from source. I can see the cmake files in /opt/ros/noetic/share/ompl/ .

But setting a custom PATH doesn't seem to be doing the trick.

find_package(OMPL PATHS /opt/ros/noetic/share/ompl/)
find_package(OMPL REQUIRED)

Any suggestions?

rohanblueboybaijal avatar May 20 '22 12:05 rohanblueboybaijal

@rohanblueboybaijal Maybe you can check if the package ompl is in path (/opt/ros/noetic/include), and I remember only find_package(OMPL REQUIRED) is need for my case.

c0y0h avatar May 20 '22 12:05 c0y0h

replace find_package(OMPL REQUIRED) = find_package(ompl REQUIRED)

txphuc2799 avatar Mar 20 '24 01:03 txphuc2799