Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can check some launch files tips here, there are some explanations that could help you. Especially the Top-level organization part.

What I would recommend is to have multiples launch file, each of them would be dedicated to a single task and have a (or maybe multiples) top-level launch file that would include all the required launch files. For example don't create a launch file to start a teleoperation and a laser scan filter, those tasks are unrelated.

A common practice is to have a launch file to start everything related to the robot (the mobile base, sensors etc..), you might have already seen some packages made for this, in general their name end with the suffix bringup or core.

Once all the nodes are correctly started, you can launch every node required for your application (mapping, navigation etc..) with another launch file. The benefits of doing so is that if you want to run your application multiple times you don't have to restart the robot, you just kill your application roslaunch and relaunch it.

In the end you can have only one launch file it's just about what you need/want but personnally I prefer to have multiples to improve their readability and reusability.