CentroEPiaggio / kuka-lwr

Software related to the KUKA LWR 4+: for real and for simulation.
The Unlicense
101 stars 81 forks source link

lwr_controllers: 'kdl' is not a valid build or run depends #27

Closed gavanderhoorn closed 9 years ago

gavanderhoorn commented 9 years ago

The package manifest of the lwr_controllers pkg lists kdl as a build_depend and a run_depend (here). rosdep cannot resolve that key, and I can also not find it in the online rosdistro/rosdep/base.yaml file.

carlosjoserg commented 9 years ago

Thanks. Actually in the CMakeLists.txt is listed as a non-catkin package, and twice, here and here.

But I'm actually linking to the one delivered with ros, that is, this one.

So, I'm gonna use <build_depend>orocos_kdl</build_depend> and <run_depend>orocos_kdl</run_depend>, and in the CMakeLists.txt I'll use it as an actual catkin component like

find_package(catkin REQUIRED COMPONENTS
  controller_interface
  control_msgs
  forward_command_controller
  control_toolbox
  realtime_tools
  urdf
  roscpp
  kdl_parser
  message_generation
  cmake_modules
  orocos_kdl
)

catkin_package(
#  DEPENDS 
  CATKIN_DEPENDS
    controller_interface
    control_msgs
    control_toolbox
    realtime_tools
    urdf
    forward_command_controller
    kdl_parser
    message_runtime
    orocos_kdl
  INCLUDE_DIRS include
  LIBRARIES ${PROJECT_NAME}
)

It works for me, I'll be pushing this change in while unless you see other inconveniences.

nrontsis commented 9 years ago

After the changes you introduced in the CMakeLists.txt (mentioned above), I have trouble compiling:

CMake Error at /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:176 (message):
  catkin_package() CATKIN_DEPENDS on 'orocos_kdl', which has been found in
  '/opt/ros/indigo/share/orocos_kdl/orocos_kdl-config.cmake', but it is not a
  catkin package
Call Stack (most recent call first):
  /opt/ros/indigo/share/catkin/cmake/catkin_package.cmake:98 (_catkin_package)
  kuka-lwr/lwr_controllers/CMakeLists.txt:40 (catkin_package)

-- Configuring incomplete, errors occurred!

I am too linking to http://wiki.ros.org/orocos_kdl

After reading this: http://answers.ros.org/question/107346/could-not-find-a-configuration-file-for-package/ I essential reverted your changes, and I was able to compile

carlosjoserg commented 9 years ago

Thanks, with all tests, I pushed the wrong version !

It is fixed e78ec82c5ead9979cb11530ff212e482e495819d

nrontsis commented 9 years ago

Thanks :+1:

nrontsis commented 9 years ago

Actually, I think that there might be still an issue.

When compiling to a new workspace errors pop up.

However, with the following change, it seems there is no issue:

find_package(catkin REQUIRED COMPONENTS
  controller_interface
  control_msgs
  forward_command_controller
  control_toolbox
  realtime_tools
  urdf
  roscpp
  kdl_parser
  message_generation
  cmake_modules
)

find_package(orocos_kdl REQUIRED)
carlosjoserg commented 9 years ago

Oh, the old new workspace technique always reveals errors, this is where travis will be of great help.

However, if you type roscd orocos_kdl it will take you to /opt/ros/indigo/share/orocos_kdl, where there is a package.xml defining the catkin package and cmake config files. I think the problem is where @gavanderhoorn pointed it above. I issued it as a question in ros/rosdistro#8702

carlosjoserg commented 9 years ago

Ok, I just realized that kdl_parser already depends on orocos_kdl. So, there is no need to use find_package(orocos_kdl REQUIRED).

In a new catkin_ws, 1242b8a1f138424ce287ed3b48a1c0b3f07750ba works for me, links to orocos-kdl, and so on.

marcoesposito1988 commented 9 years ago

It also compiles for me in a new workspace.

@nrontsis: can we close this?

nrontsis commented 9 years ago

Sure!

marcoesposito1988 commented 9 years ago

Very good, thanks! @carlosjoserg: we can kill this issue.

carlosjoserg commented 9 years ago

Good, thanks.