Ask Your Question
6

Could not find a configuration file for package *

asked 2013-12-05 08:37:32 -0600

David Lu gravatar image

Here's a minimal catkin package.

Package.xml:

<?xml version="1.0"?>
<package>
  <name>sighdangitcatkin</name>
  <version>0.0.0</version>
  <description>The sighdangitcatkin package</description>
  <maintainer <a href="mailto:email="dlu@todo.todo">dlu</maintainer">email="dlu@todo.todo">dlu</maintainer</a>>
  <license>TODO</license>
  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>orocos_kdl</build_depend>
</package>

CMakeLists.txt:

cmake_minimum_required(VERSION 2.8.3)
project(sighdangitcatkin)

find_package(catkin REQUIRED COMPONENTS orocos_kdl )
catkin_package()

Seems pretty simple, yah? Here's the error I get when compiling.

-- +++ processing catkin package: 'sighdangitcatkin'
-- ==> add_subdirectory(sighdangitcatkin)
CMake Error at /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:72 (find_package):
  Could not find a configuration file for package orocos_kdl.

  Set orocos_kdl_DIR to the directory containing a CMake configuration file
  for orocos_kdl.  The file will have one of the following names:

    orocos_kdlConfig.cmake
    orocos_kdl-config.cmake

Call Stack (most recent call first):
  sighdangitcatkin/CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

What am I missing?

Note: It works fine if you use this CMake..

 cmake_minimum_required(VERSION 2.8.3)
 project(sighdangitcatkin)
 find_package(catkin REQUIRED COMPONENTS )
 find_package(orocos_kdl REQUIRED)
 catkin_package()
edit retag flag offensive close merge delete

Comments

Excuse me , Did this error happen after typing 1- cd ~/catkin_ws 2- then typing catkin_make

Eman gravatar imageEman ( 2013-12-05 09:12:51 -0600 )edit

Essentially.

David Lu gravatar imageDavid Lu ( 2013-12-05 10:07:43 -0600 )edit

please, would you make sure that ROS can see & find your package I mean by that Did you try typing command rospack find ( your_package_name) or using command roscd (your_package_name) then typing unix command pwd either using command rospack find or using commands roscd then pwd it should return your package path if ROS can find your package in the src folder of catkin_ws in your home please , make sure of that

Eman gravatar imageEman ( 2013-12-05 10:18:17 -0600 )edit

Thanks, but William found the real problem.

David Lu gravatar imageDavid Lu ( 2013-12-05 11:05:44 -0600 )edit

Thanks God . I am happy that your problem has been solved I just tried to help .Thanks to Mr William . God bless him amen

Eman gravatar imageEman ( 2013-12-05 11:15:24 -0600 )edit

@Real Loyalty For future edits of your posts / comments please consider checking the check box "minor edit - don't send alerts" if you modifications are minor (e.g. spelling and white space fixing) to avoid numerous notification emails to subscribed users. Thx.

Dirk Thomas gravatar imageDirk Thomas ( 2013-12-05 11:21:40 -0600 )edit

@Dirk Thomas Thx for your note . I will take care about that

Eman gravatar imageEman ( 2013-12-05 11:33:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
6

answered 2013-12-05 09:15:11 -0600

William gravatar image

It looks like orocos_kdl is not a catkin package:

https://github.com/orocos/orocos_kinematics_dynamics/blob/master/orocos_kdl/package.xml#L20

So having catkin find it will not work...

I would recommend you use the find_package(orocos_kdl REQUIRED) line in your catkin package.

edit flag offensive delete link more

Comments

So it is still a package, and a package you can build catkin on top of, but not a catkin package?

David Lu gravatar imageDavid Lu ( 2013-12-05 10:12:31 -0600 )edit

It is a non-catkin package as described in REP-136, just like opencv, console_bridge, and others. We support building it as part of a catkin workspace using catkin_make_isolated as a convenience, but no they are not catkin packages.

William gravatar imageWilliam ( 2013-12-05 11:19:24 -0600 )edit

Understood. Is there any way to shortcut the above error message so that it instead says "Attempting to make catkin depend on non-catkin package. Don't do that." or something more helpful than the CMake gobbeldygook?

David Lu gravatar imageDavid Lu ( 2013-12-06 04:24:07 -0600 )edit
1

I don't believe so, the problem is that orocos_kdl doesn't provide a file called orocos_kdlConfig.cmake or orocos_kdl-config.cmake, which is what CMake is complaining about. So we don't know if it is a missing package or a package which is not a catkin package. If orocos_kdl provided one of those files (as a coincident), then catkin would inform you that it found orocos_kdl, but that it is not a catkin package. Additionally, error handling like try-catch is really problematic in CMake, so we would have to completely rewrite parts of CMake's find_package to do better error handling.

William gravatar imageWilliam ( 2013-12-06 06:19:13 -0600 )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: 2013-12-05 08:37:32 -0600

Seen: 20,907 times

Last updated: Dec 05 '13