Launch file

Launch files are useful for running multiple nodes simultaneously with a single roslaunch command. It can also be used to read parameters into the parameter server.

Note

The roslaunch automatically starts rosmaster if it isn’t already running.

  1. Go through the roslaunch wiki and get familiar with its syntax.
  2. From the wiki, find the information on:
  • how to pass and use command line arguments in the launch file;
  • how to use the <param /> tag and read parameters to the server;
  • how to use the <node /> tag to run nodes within roslaunch file.
  1. Your task is to create a launch file into the fake sonar driver package. Implement the following functionality in the launch file:
  1. Read the the frequency argument from the command line and pass it to the parameter server.
  2. Start the fake sonar driver node.

Bonus task

Add two more fake sonar driver nodes to the launch file:

  • For the first node, assign an anonymous name
  • Define the second node to be executed in a fake_ns namespace.