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

Problems building a node which depends on another node.

asked 2016-02-17 13:34:52 -0500

Hopefully someone can help, I've been trying to get this to work for quite a while now.

I have a custom node which provides services and messages called dp_ptu47 (it's a pan tilt unit). I'm trying to get access to the services of the dp_ptu47 node from another client node, which will be running on a different machine.

I get the following error when I catkin_make my client node:

-- +++ processing catkin package: 'sme_awareness'
-- ==> add_subdirectory(sme_awareness)
-- Using these message generators: gencpp;genlisp;genpy
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkinConfig.cmake:75 (find_package):
  Could not find a package configuration file provided by "dp_ptu47_msgs"
  with any of the following names:

    dp_ptu47_msgsConfig.cmake
    dp_ptu47_msgs-config.cmake

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

I've checked that the 'dp_ptu47_msgs' package exists and it's there and ros seems happy, I've also looked for the file that the error message says it can't find 'dp_ptu47_msgsConfig.cmake' and this exists in the 'install/share/dp_ptu47_msgs/cmake' path of the node. The error message doesn't say where it it's looking for the file so I'm not sure if this is in the right place or not.

I've tried all sorts of things to find out what's going on, and I'm out of ideas. Does anyone have any ideas what could be causing this.

Thanks

edit retag flag offensive close merge delete

Comments

Can you put up your package.xml and CMakeLists.txt for the package that depends on dp_ptu47?

Thomas D gravatar image Thomas D  ( 2016-02-17 15:49:31 -0500 )edit

And seeing your other question: please add some info on the order in which you build & source your workspaces, their (relative) locations, etc.

gvdhoorn gravatar image gvdhoorn  ( 2016-02-18 05:03:59 -0500 )edit

Thanks, guys. I've managed to get to the bottom of this now. I needed to run the devel/setup.bash script for the dp_ptu47_msgs package. Now it builds fine.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2016-02-18 05:33:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-02-18 05:35:02 -0500

I've found a solution to this. Not sure if I was missing something really obvious, but this is what I did.

Executing the devel/setup.bash script for the 'depended on' package before running catkin_make on the package I'm trying to make has fixed the problem.

edit flag offensive delete link more

Comments

Not sure if I was missing something really obvious [..]

Well if you are overlaying (or chaining) workspaces, then yes, you always need to source your workspaces in the correct order before trying to do anything with the next one up the stack. Isn't that described in the overlaying docs?

gvdhoorn gravatar image gvdhoorn  ( 2016-02-18 05:42:50 -0500 )edit

And just making sure: only workspaces have setup.bash scripts, packages do not. Are you using a single-package-per-workspace layout?

gvdhoorn gravatar image gvdhoorn  ( 2016-02-18 05:44:01 -0500 )edit

I hadn't realised that I needed to overlay workspaces, if messages or services were being passed between nodes in different workspaces. I had been used to using the built in message types up till now.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2016-02-18 18:10:12 -0500 )edit

To answer your other question, no there are plenty of packages in the workspaces. We have one which contains a hardware interface and tools for a pan tilt unit. The other contains our navigation system. It's a shared system so we didn't want to mix up too much code!

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2016-02-18 18:11:50 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-02-17 13:34:52 -0500

Seen: 297 times

Last updated: Feb 18 '16