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

How to declare dependency on other ROS package for launch files

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

jayess gravatar image

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

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


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"> ( )

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

That explains why I was getting that error.

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

1 Answer

Sort by ยป oldest newest most voted

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

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


Perfect, thanks. This way makes more sense.

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

Question Tools



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

Seen: 1,523 times

Last updated: Jun 20 '17