Ask Your Question

Include Header file of rosbuild package into a catkin package

asked 2018-11-21 22:05:51 -0500

RLoad gravatar image

hello all,

I'm new for ROS and I try to run a catkin package in which I use some function of a rosbuild package. I make a catkin workspace for the catkin package and a rosbuild workspace for the rosbuild package, and I link the rosbuild and catkin workspace as: . And I add the "include /.h" in the cpp file in catkin workspace.

but I can't find a right way to let the catkin workspace find the rosbuild package in rosbuild workspace. The webpage: tell me similar things but just in the opposite way. I can't find the way to do what I want. So can anybody help?

edit retag flag offensive close merge delete


You provide very little actual information other than "it doesn't work". Please update your question with actual error messages, pkgs that are involved (if possible, otherwise create an MWE), changes you made to CMakeLists.txt (if any), etc, etc.

gvdhoorn gravatar image gvdhoorn  ( 2018-11-22 00:17:16 -0500 )edit

Thanks for you advise, actually I didn't make any change in the CMakeLists.txt etc. because I don't know how to do it. but now I know catkin packages cannot depend on rosbuild packages. thanks.

RLoad gravatar image RLoad  ( 2018-11-22 00:55:25 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2018-11-22 00:21:43 -0500

gvdhoorn gravatar image

The main issue here is that Catkin packages cannot depend on rosbuild packages. From wiki/catkin/migrating_from_rosbuild - Prerequisites:

1.1 Prerequisites

Catkin packages cannot depend on rosbuild packages. Therefore before migrating a package from rosbuild to catkin make sure that all package dependencies have already been migrated to catkin.

The reason that #q213264 goes in the other direction is because rosbuild depending on Catkin is supported.

edit flag offensive delete link more


thanks for your help, but I still have a question. Why in this website ( ) and in the book (ros by example vol 1 indigo) said that there is a way to mixing catkin and rosbuild Workspaces, while the wet package can't depend on dry package?

RLoad gravatar image RLoad  ( 2018-11-22 01:01:51 -0500 )edit

Is this means that we can rosrun the files in both workspaces in one roscore?

RLoad gravatar image RLoad  ( 2018-11-22 01:03:21 -0500 )edit

You can mix them (ie: have them both on your pkg path), but Catkin packages just cannot depend on rosbuild pkgs (meaning: they cannot #include anything from them etc). This was done to make migration to Catkin easier (ie: from dry to wet (a "rising tide")).

gvdhoorn gravatar image gvdhoorn  ( 2018-11-22 03:16:44 -0500 )edit

I think I understand the use of mixing the workspaces, thanks for your help~

RLoad gravatar image RLoad  ( 2018-11-22 04:34:05 -0500 )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


Asked: 2018-11-21 22:05:51 -0500

Seen: 55 times

Last updated: Nov 22 '18