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

Putting top-level launch files in a catkin metapackage [closed]

asked 2013-10-15 09:51:14 -0600

dpkoch gravatar image

updated 2013-10-15 09:52:40 -0600

I have a metapackage that is set up as specified on the package.xml ROS wiki page (I don't have enough karma to publish the link). I would like to use this metapackage to hold the top-level launch files I will use for this particular collection of packages. I have added a launch/ directory to my metapackage's top-level directory and created a launch file in that directory, but when I try to run it with roslaunch (roslaunch <package_name> <launch_file>), I get the following error:

[<launch_file>] is neither a launch file in package [<package_name>] nor is [<package_name>] a launch file name

I have two questions regarding this:

  1. Is it good practice---or even supported---to put top-level launch files in a metapackage? Or do I need to place the launch files in their own package? The advantage that I see to putting them in the metapackage is that I would only have to maintain a list of dependencies in one package.xml file, as opposed to two if I had both a metapackage and a launch file package. But is there a reason why this would be a bad idea?

  2. If it is good practice to keep the launch files in the metapackage, what can I do to fix the roslaunch error? I thought maybe I might need to add a line to my CMakeLists.txt file, but the wiki page mentioned above recommends not deviating from the boilerplate CMakeLists.txt code. So would this even be supported? (If it's not supported does anybody know the reasoning behind that decision?)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by dpkoch
close date 2013-12-05 19:19:13

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-10-15 10:29:51 -0600

joq gravatar image

updated 2013-10-25 05:59:07 -0600

  1. A metapackage may not install any files, except its package.xml, which is done automatically.

  2. No, don't use a metapackage, convert it to an ordinary catkin package. Then, you can add the necessary install() commands to your CMakeLists.txt. An ordinary package with the same dependencies will serve much the same purpose as your metapackage did.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-10-15 09:51:14 -0600

Seen: 1,195 times

Last updated: Oct 25 '13