Creating and installing an XML launch file
You will now create your first launch file. We will start with XML. Later in this chapter, we will also write Python launch files and compare the two languages, but let’s keep things simple to get started.
To properly create, install, and start a launch file, you need to do a bit of setup. In this section, we will follow all the necessary setup steps with a minimal launch file.
What we want to do here is to start the number application (number_publisher
and number_counter
nodes) from one terminal, with just one command line. Let’s get started.
Setting up a package for launch files
Where should you put your launch files? You could theoretically create a launch file in any existing package.
However, this method can quickly lead to a dependency mess between packages. If package A requires package B, and you create a launch file in package B to start nodes from both packages, then you have created what’s called...