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

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: http://wiki.ros.org/catkin/Tutorials/... . 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:https://answers.ros.org/question/213264/catkin-library-in-rosbuild-package/ 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

Comments

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
1

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

Comments

thanks for your help, but I still have a question. Why in this website ( http://wiki.ros.org/catkin/Tutorials/... ) 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

Question Tools

Stats

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

Seen: 170 times

Last updated: Nov 22 '18