ros-gbp / ompl-release

8 stars 10 forks source link

ompl-config.cmake in wrong location? #12

Open jvgomez opened 6 years ago

jvgomez commented 6 years ago

I have installed ros-kinetic-ompl in Ubuntu 16.04. I am perhaps missing something, but the ompl-config.cmake file is installed under /opt/ros/kinetic/share/ompl/ but catkinConfig.cmake looks for it under the subfolder cmake. Therefore I get the error:

CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  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.
Call Stack (most recent call first):
  CMakeLists.txt:10 (find_package)

I wonder why is it this way, and what is a better solution. I didn't find a workaround yet, as doing a symlink shows:

Make Error at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:178 (message):
  catkin_package() CATKIN_DEPENDS on 'ompl', which has been found in
  '/opt/ros/indigo/share/ompl/cmake/ompl-config.cmake', but it is not a
  catkin package
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:100 (_catkin_package)
  CMakeLists.txt:16 (catkin_package)

Thanks!

mamoll commented 6 years ago

The cmake documentation for find_package indicates that the cmake file in <prefix>/share/ompl is in the search path: https://cmake.org/cmake/help/v3.10/command/find_package.html

I don't understand why catkin would override the default behavior.

jvgomez commented 6 years ago

Neither do I. AFAIK this is the code in which catkin searches for components, at it looks only in the cmake subfolder. Other ROS packages are distributed according to this.

I guess this should be fixed in catkin. But I think it would be faster to do a fix here. Also, I wonder why nobody reported this issue before.

mamoll commented 6 years ago

This is probably because ompl is a pure CMake package and not a catkin package. This can be fixed in the bloom packaging. See also another related bug in #9.

leiyinghanguang commented 6 years ago

I have the same problem