Putting top-level launch files in a catkin metapackage [closed]
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:
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?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 boilerplateCMakeLists.txt
code. So would this even be supported? (If it's not supported does anybody know the reasoning behind that decision?)