Launch Files – Starting All Your Nodes at Once
At this point, you know how to write nodes, how to make them communicate with topics, services, and actions, and how to make them more dynamic with parameters.
In this last chapter of Part 2, we will bring everything together and go one step further toward making your application more scalable. Here, we will talk about launch files, which allow you to start all your nodes and parameters at once.
To start with launch files, it’s important that you’re comfortable with the concepts seen in the previous chapters. As a starting point, we will use the code inside the ch8
folder from the book’s GitHub repository (https://github.com/PacktPublishing/ROS-2-from-Scratch). You can find the final code for launch files in the ch9
folder.
First, as always, I will use a real-life example to explain why you need launch files and what they are exactly. You will then dive into the code and create your own launch file...