Ask Your Question
0

Problem with catkin depends

asked 2014-04-16 23:57:44 -0500

Stefano Primatesta gravatar image

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?

edit retag flag offensive close merge delete

Comments

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?

joq gravatar imagejoq ( 2014-04-17 04:33:40 -0500 )edit

I always do it. The problem is only with OMPL package, but not with other packages.

Stefano Primatesta gravatar imageStefano Primatesta ( 2014-04-17 21:46:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2014-04-18 10:15:06 -0500

Dirk Thomas gravatar image

updated 2014-04-18 10:15:35 -0500

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
edit flag offensive delete link more

Comments

1

Thanks!!! The answer is very useful

Stefano Primatesta gravatar imageStefano Primatesta ( 2014-04-20 04:06:14 -0500 )edit
1

I also met this problem and your answer solved it. Thank you so much!

Tixiao gravatar imageTixiao ( 2014-11-09 20:37:09 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-04-16 23:57:44 -0500

Seen: 2,258 times

Last updated: Apr 18 '14