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

Including files from another catkin workspace

asked 2016-02-17 10:20:21 -0500

I'm having difficulty setting the include paths that I need for a ros node I'm building.

I need to include some header files from a different catkin workspace in order to use some services from another custom node. The catkin workspace path of with the header files I need is '~/ptu47_wss' under this the path '/src/dp_ptu47_pan_tilt_stage/include/dp_ptu47_msgs' contains the include files I need.

The catkin workspace for the project I'm working on is called 'catkin_project' and is in my home directory the same as 'ptu47_wss'

How do I set up my CMakeLists.txt file so that these header files can be included in my project?

Thanks, Pete

edit retag flag offensive close merge delete

Comments

2

Could this be an xy-problem? Workspace overlaying as mentioned by @joq would certainly work, but do you have any particular reason for not placing the dp_ptu47_pan_tilt_stage package in the same workspace as your other node?

gvdhoorn gravatar image gvdhoorn  ( 2016-02-17 13:08:38 -0500 )edit
1

Good point. Overlays are not required if all your dependencies are together in your main workspace. (But technically, any dependencies on /opt/ros/indigo/ are also a sort of overlay.)

joq gravatar image joq  ( 2016-02-17 13:47:29 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-02-17 10:44:12 -0500

joq gravatar image

The feature you're looking for is called overlaying a catkin workspace.

edit flag offensive delete link more

Comments

That's exactly it, thank you. now I've got another problem round the circle goes. . .

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2016-02-17 13:16:43 -0500 )edit
0

answered 2016-02-19 16:30:40 -0500

I have had lots of bad luck trying to use more than a single workspace. Thankfully, you can organize your code into lots of different packages and lots of different executables within those packages.

edit flag offensive delete link more

Comments

There are sometimes good reasons for using multiple workspaces, but life is generally simpler with only one.

joq gravatar image joq  ( 2016-02-19 17:43:34 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-02-17 10:20:21 -0500

Seen: 2,842 times

Last updated: Feb 19 '16