.launch file in ROS 1 is an XML file that automates the process of starting and configuring multiple ROS nodes, parameters, and other system components from a single command. Instead of manually launching each node and setting parameters in separate terminals, you can use a launch file to start everything at once, in the correct order and with the desired configuration1246.

Key Features of a .launch File in ROS 1

Example Structure

`xml<launch> <!-- Start a node --> <node pkg="turtlesim" type="turtlesim_node" name="sim"/>

*<!-- Set a parameter -->*
<param name="background_r" value="255"/>

*<!-- Start another node -->*
<node pkg="turtlesim" type="turtle_teleop_key" name="teleop"/>

</launch>`

How to Use

Summary Table

Feature Description
File extension .launch
Format XML
Main purpose Start/configure multiple nodes and parameters at once
How to run roslaunch <package> <file.launch>
Example tags <launch><node><param><arg><group><include>
Key benefit Simplifies and automates complex ROS application startup

In summary:

A .launch file in ROS 1 is a powerful XML configuration file that lets you start and manage multiple nodes and parameters with a single command, making large-scale robotics development much more efficient1246.

Citations:

  1. https://roboticsbackend.com/what-is-a-ros-launch-file/
  2. https://www.youtube.com/watch?v=Da9qeDdMauY