Ask Your Question
0

Could not find a package configuration file in catkin workspace

asked 2018-11-22 03:27:41 -0600

RLoad gravatar image

updated 2018-11-23 07:04:11 -0600

hello everyone,

I want use a rosbuild package "seds" and "mathlib" in my catkin workspace (in which has a catkin package "iiwa_ros"), so based on the websit: http://wiki.ros.org/catkin/migrating_... I migrating the rosbuild package in catkin package and add into my catkin workspace. Every thing is ok, and the catkin build can build all the packages in the workspace. But when I try to add the "#include "seds/**.h" " in the .cpp files in my "iiwa_ros" package, catkin build said there are some thing wrong:

      Errors     << iiwa_ros:check /home/edward/kuka_catkin/logs/iiwa_ros/build.check.057.log
CMake Warning at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
  Could not find a package configuration file provided by "seds" with any of
  the following names:

    sedsConfig.cmake
    seds-config.cmake

  Add the installation prefix of "seds" to CMAKE_PREFIX_PATH or set
  "seds_DIR" to a directory containing one of the above files.  If "seds"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:6 (find_package)


CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "seds" with any of
  the following names:

    sedsConfig.cmake
    seds-config.cmake

  Add the installation prefix of "seds" to CMAKE_PREFIX_PATH or set
  "seds_DIR" to a directory containing one of the above files.  If "seds"
  provides a separate development package or SDK, be sure it has been
  installed.
Call Stack (most recent call first):
  CMakeLists.txt:6 (find_package)


make: *** [cmake_check_build_system] Error 1
cd /home/edward/kuka_catkin/build/iiwa_ros; catkin build --get-env iiwa_ros | catkin env -si  /usr/bin/make cmake_check_build_system; cd -
...............................................................................
Failed     << iiwa_ros:check                         [ Exited with code 2 ]    
Failed    <<< iiwa_ros                               [ 0.4 seconds ]           
[build] Summary: 18 of 19 packages succeeded.                                  
[build]   Ignored:   2 packages were skipped or are blacklisted.               
[build]   Warnings:  None.                                                     
[build]   Abandoned: None.                                                     
[build]   Failed:    1 packages failed.

and my CMakeList.txt is as follow, which only add seds in find_package:

cmake_minimum_required(VERSION 2.8.3)
project(iiwa_ros)
set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")

find_package(catkin REQUIRED COMPONENTS
  iiwa_msgs
  tf
  cmake_modules
  seds
)

catkin_package(
    INCLUDE_DIRS include
    LIBRARIES    ${PROJECT_NAME}
    CATKIN_DEPENDS  iiwa_msgs
)

## Specify additional locations of header files
include_directories(include
  ${catkin_INCLUDE_DIRS} 
)


## Declare a cpp library
add_library(${PROJECT_NAME}
    include/iiwaRos.h
    src/iiwaRos.cpp
        #~/kuka_catkin/src/seds/include/GMR.h

)

## Declare a cpp executable
add_executable(${PROJECT_NAME}-example
    src/main.cpp
)

## Add dependence to the iiwa_msg module for the executable
add_dependencies(${PROJECT_NAME}-example
                iiwa_msgs_generate_messages_cpp)

## Add dependence to the iiwa_msg module for the library
add_dependencies(${PROJECT_NAME}
                iiwa_msgs_generate_messages_cpp)


## Specify libraries to link a library or executable target against
target_link_libraries(${PROJECT_NAME}-example
    ${PROJECT_NAME}
    ${catkin_LIBRARIES}
)

install(DIRECTORY include/
        DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

and the package.xml

<?xml version="1.0"?>
<package>
  <name>iiwa_ros</name>
  <version>1.4.0</version>
  <description>The iiwa_ros package</description>
  <author email="salvo.virga@tum.de">Salvo Virga</author>
  <maintainer email="salvo.virga@tum.de">Salvo Virga</maintainer>

  <license>BSD</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>iiwa_msgs</build_depend>
  <run_depend>iiwa_msgs</run_depend>
  <build_depend>seds</build_depend>
  <run_depend ...
(more)
edit retag flag offensive close merge delete

Comments

1

@RLoad please use the preformatted text button (the one with 101010) on it, when copy-pasting code the next time. This just makes reading much easier :-)

So, what you are saying is: you converted seds and mathlib from rosbuild to catkin? There is probably something wrong there.

mgruhler gravatar imagemgruhler ( 2018-11-22 04:10:27 -0600 )edit

Please show the CMakeLists.txt and package.xml of the migrated packages.

mgruhler gravatar imagemgruhler ( 2018-11-22 04:11:10 -0600 )edit

Thanks a lot for help me change the text, it was my first time copy the code in ROS answer. And the CMakeLists.txt and package.xml of the migrated packages are shown.

RLoad gravatar imageRLoad ( 2018-11-22 04:38:41 -0600 )edit

thank your for your reminder @mgruhler I'm not familiar with the writing of CMakeLIst.txt, so I read the wiki page: http://wiki.ros.org/catkin/CMakeLists... and change my CMakeLIst.txt and package.xml. I call catkin_package and use include_directories and add_library to declear of the .h and .cpp.

RLoad gravatar imageRLoad ( 2018-11-22 21:44:32 -0600 )edit

while the problem is still exist, and I can't find where is the error, thanks a lot for your help~

RLoad gravatar imageRLoad ( 2018-11-22 21:47:23 -0600 )edit

the rosbuild_* calls are for rosbuild, not catkin.

Please check again the migration guide you linked, as well as the catkin documentation. This is crucial to make this work. If you have specific questions, please come back here.

mgruhler gravatar imagemgruhler ( 2018-11-23 02:28:39 -0600 )edit

Sorry for make you misunderstand, the rosbuild_* is in the CMakeList.txt of the old dry packages before migration, I show them to describe the migration process more clear. And the CMakeList.txt and package.xml of the wet packages have update as your advise. I will check them again based on the wiki

RLoad gravatar imageRLoad ( 2018-11-23 07:31:21 -0600 )edit

the problem is solved by catkin clean -- and rebuild the catkin workspace while I still thank you for your help @mgruhler . the migration process is right but there still some problem to use these two package, while it's not include in these discussion.

RLoad gravatar imageRLoad ( 2018-11-23 23:40:10 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-22 06:31:54 -0600

mgruhler gravatar image

updated 2019-01-23 14:09:32 -0600

130s gravatar image

thx for the update @RLoad.

There is something seriously wrong with the CMakeLists.txt that you have there. Did you really follow the migration guide?

Just as a hint, but not complete errors:

  • you need to find_package seds in the mathlib package, if you want to use this there.
  • you need to call catkin_package. This is commented.
  • you don't compile an executable or library. Or are both, mathlib and seds header only?
  • you should not change the output paths, afaik

There are quite some more things you could do to improve this, but i guess this is enough for now...

edit flag offensive delete link more

Comments

Thanks for your help, the code works now! I think I should learn more knowledge about ROS, it's so convenient for me!

RLoad gravatar imageRLoad ( 2019-04-18 02:13:05 -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

2 followers

Stats

Asked: 2018-11-22 03:27:41 -0600

Seen: 2,743 times

Last updated: Jan 23