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

How to declare dependency on other ROS package for launch files

asked 2017-06-20 17:11:21 -0500

jayess gravatar image

updated 2017-06-20 20:53:13 -0500

I'm creating a package that exclusively uses launch files from other ROS packages. In other words, I'm not creating any nodes I'm just making a package to conveniently group and launch nodes from other packages. How am I supposed to declare those other ROS packages as dependencies, if I do at all? Is it in the package.xml using the <run_depend> or some other tag such as <exec_depend>?

I've checked REP 140, REP 127, the package.xml wiki entry, and Roslaunch tips for large projects and I'm not 100% how to do it. From what I can tell, REP 140 says to use <exec_depend> for

...packages providing shared libraries, executable commands, Python modules, launch scripts or any other files required for running your package.

which, to me, sounds like if I want to use the launch files from another package then I should declare that package as a dependency in package.xml using <exec_depend>.

So, again, the question is how am I supposed to declare those other ROS packages as dependencies, if I do at all?

Edit: I should have tested the <exec_depend> tag before mentioning it because I get the following error:

The manifest (with format version 1) must not contain the following tags: exec_depend
edit retag flag offensive close merge delete

Comments

REP-140 describes package format version 2, and specifies that you should declare your package.xml as version 2 in the opening package tag at the top, with <package format="2"> ( http://www.ros.org/reps/rep-0140.html... )

ahendrix gravatar image ahendrix  ( 2017-06-20 21:03:54 -0500 )edit

That explains why I was getting that error.

jayess gravatar image jayess  ( 2017-06-20 21:12:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
5

answered 2017-06-20 21:07:14 -0500

ahendrix gravatar image

You've found the right documentation. Note that REP-127 is for the older package format 1, and REP-140 is for package.xml format version 2.

Version 1 is still the default; if you want to use version 2, you must have <package format="2"> at the top of your package.xml

In version 1, <run_depend> is the correct tag for launch file dependencies.

In version 2, <exec_depend> is the correct tag for launch file dependencies.

edit flag offensive delete link more

Comments

Perfect, thanks. This way makes more sense.

jayess gravatar image jayess  ( 2017-06-20 21:14:39 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-06-20 17:11:21 -0500

Seen: 1,574 times

Last updated: Jun 20 '17