June 2018
Intermediate to advanced
484 pages
11h 36m
English
In previous sections, we created nodes and have been executing them in different shells. Imagine working with 20 nodes and the nightmare of executing each one in a shell! However, with the launch file, we can do it in the same shell by launching a configuration file with the extension .launch. The launch file is a useful feature in ROS for launching more than one node.
To learn about the ROS launch file, we will create a new folder in the chapter2_tutorials package, as follows:
$ roscd chapter2_tutorials/ $ mkdir launch $ cd launch $ vim chapter2.launch
Add the following code inside the chapter2.launch file:
<?xml version="1.0"?> <launch> <node name ="example1a" pkg="chapter2_tutorials" type="example1a" ...