0
$\begingroup$

Rosanswers logo

When I compile my package with catkin_make I see this error:

prima@prima-UX32VD:~/catkin_ws$ catkin_make
Base path: /home/prima/catkin_ws
Source space: /home/prima/catkin_ws/src
Build space: /home/prima/catkin_ws/build
Devel space: /home/prima/catkin_ws/devel
Install space: /home/prima/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/prima/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/prima/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/prima/catkin_ws/devel;/opt/ros/hydro
-- This workspace overlays: /home/prima/catkin_ws/devel;/opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/prima/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.86
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - ompl_planner
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'ompl_planner'
-- ==> add_subdirectory(ompl_planner)
-- Using these message generators: gencpp;genlisp;genpy
CMake Error at /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:72 (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):
  ompl_planner/CMakeLists.txt:7 (find_package)


-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Errore 1
Invoking "make cmake_check_build_system" failed

but in my ompl package in /opt/ros/hydro/share/ompl/ there is the correct ompl-config.cmake file.

this is my CmakeLists.txt

cmake_minimum_required(VERSION 2.8.3)
project(ompl_planner)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  costmap_2d
  geometry_msgs
  nav_core
  nav_msgs
  pluginlib
  tf
  angles
  ompl
)

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES ompl_planner
  CATKIN_DEPENDS roscpp nav_core pluginlib
)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
)

 add_library(ompl_planner
   src/ompl_planner.cpp
 )

install(TARGETS ompl_planner
   LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
   RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
 )


 install(DIRECTORY include/ompl_planner/
   DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}

 )


 install(FILES
   bgp_plugin.xml
   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
 )

What can I do?


Originally posted by Stefano Primatesta on ROS Answers with karma: 402 on 2014-04-16

Post score: 0


Original comments

Comment by joq on 2014-04-17:
Most likely your workspace environment is wrong. Did you remember to source /opt/ros/hydro/setup.bash before first running catkin_make? Did you later source ~/catkin_ws/devel/setup.bash?

Comment by Stefano Primatesta on 2014-04-17:
I always do it. The problem is only with OMPL package, but not with other packages.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

ompl is not a catkin package: http://wiki.ros.org/ompl

Therefore you should not find it with find_package(catkin REQUIRED COMPONENTS ompl).

Instead use find_package(OMPL) to find it and then its custom variables:

OMPL_FOUND - OMPL was found
OMPL_INCLUDE_DIRS - The OMPL include directory
OMPL_LIBRARIES - The OMPL library
OMPLAPP_LIBRARIES - The OMPL.app library
OMPL_VERSION - The OMPL version in the form <major>.<minor>.<patchlevel>
OMPL_MAJOR_VERSION - Major version
OMPL_MINOR_VERSION - Minor version
OMPL_PATCH_VERSION - Patch version

Originally posted by Dirk Thomas with karma: 16276 on 2014-04-18

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by Stefano Primatesta on 2014-04-20:
Thanks!!! The answer is very useful

Comment by Tixiao on 2014-11-09:
I also met this problem and your answer solved it. Thank you so much!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.