ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Catkin enviornmental variables do not resolve

asked 2014-03-22 19:28:53 -0500

St3am gravatar image

updated 2016-10-24 08:59:24 -0500

ngrennan gravatar image

When trying to compile moveit from the wiki directions I run into a cmake error:

-- +++ processing catkin package: 'moveit_planners_ompl'
-- ==> add_subdirectory(moveit_planners/ompl)
-- Boost version: 1.49.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   date_time
--   thread
--   serialization
CMake Error at moveit_planners/ompl/CMakeLists.txt:20 (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!
Invoking "cmake" failed

What I interpret from this error is that some of the magic that is performed by catkin as it ingests the CMakeList.txt didn't work quite right despite the fact that the file looks fine:

cmake_minimum_required(VERSION 2.8.3)
project(moveit_planners_ompl)

if(NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release)
endif()

find_package(Boost REQUIRED system filesystem date_time thread serialization)
find_package(catkin REQUIRED COMPONENTS
  moveit_core 
  moveit_ros_planning
  roscpp
  rosconsole
  pluginlib
  tf
  dynamic_reconfigure
  eigen_conversions
  )

find_package(OMPL REQUIRED)

generate_dynamic_reconfigure_options("ompl_interface/cfg/OMPLDynamicReconfigure.cfg")

catkin_package(
  LIBRARIES
    moveit_ompl_interface
    ${OMPL_LIBRARIES}
  INCLUDE_DIRS
    ompl_interface/include
    ${OMPL_INCLUDE_DIRS}
  CATKIN_DEPENDS
    moveit_core
)

include_directories(SYSTEM
                    ${Boost_INCLUDE_DIRS})

include_directories(ompl_interface/include
                    ${catkin_INCLUDE_DIRS}
            ${OMPL_INCLUDE_DIRS})

link_directories(${catkin_LIBRARY_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
link_directories(${OMPL_LIBRARY_DIRS})

add_subdirectory(ompl_interface)

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

The component I thought it was complaining about is the find package OMPL, but I tried including it in the catkin included components like recommended in the CMakeList.txt docs and this thread but the exact same error is produced. Has anyone encountered this problem before?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
1

answered 2014-03-23 03:18:54 -0500

demmeln gravatar image

ompl is a dependecy of moveit that is not part of the default ROS install. Do what @dirk-thomas suggests in his answer and use rosdep to install all those dependencies. This is is "step 3" of the moveit compile-from-source instructions that you linked above.

If you are not on Ubuntu, you have to install the dependecies from source. rosinstall_generator helps. Let us know if you need help with that.

edit flag offensive delete link more

Comments

Thanks for the tip on rosinstall_generator, I was confused about how other packages were supposed to be merged in, I think this is the solution: cd ros_catkin_ws; rosinstall_generator moveit --rosdistro hydro --deps --wet-only > moveit.rosinstal; wstool init src moveit.rosinstall

St3am gravatar image St3am  ( 2014-03-23 15:51:26 -0500 )edit

You might want to add a `--exclude RPP` to that rosinstall_generator call if you already have a base install of ROS (be sure to have sourced the /opt/ros/hydro/setup.bash before).

demmeln gravatar image demmeln  ( 2014-03-23 16:12:49 -0500 )edit
1

answered 2014-03-22 19:52:13 -0500

Dirk Thomas gravatar image

If you have source the setup file from e.g. /opt/ros/hydro then you might just lack the ompl package. Have you tried using rosdep (as described here http://wiki.ros.org/hydro/Installatio... under "Resolving Dependencies") to install all dependencies of moveit?cies of moveit?

edit flag offensive delete link more

Comments

Thanks that was it, I forgot about the internal dependencies after I finished getting the external ones installed.

St3am gravatar image St3am  ( 2014-03-23 15:48:42 -0500 )edit
0

answered 2020-10-16 02:28:27 -0500

Install OMPL dependency $ sudo apt install libompl-dev

Do below change in CMakeList

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

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2014-03-22 19:28:53 -0500

Seen: 2,463 times

Last updated: Mar 23 '14