You will learn how to operate Launch Files.
A Launch File in ROS is an XML file used to automate the process of starting multiple nodes and setting up their configurations. These files make it easier to manage complex robotic systems by launching multiple nodes, setting parameters, and defining how nodes interact with each other, all in a single command.
IMPORTANT
For the Wheelbots (wheel-based robots) appearing in the MiROS Project Manager, always launch the below launch file first:
turn_on_wheeltec_robot.launch.py
Here are the key functions of a ROS launch file:
1. Launch Multiple Nodes: Instead of manually starting each node, a launch file can start several nodes simultaneously.
2. Set Parameters: You can define and set global or node-specific parameters for the ROS system.
3. Remap Topics: Launch files allow remapping of topic names so nodes can communicate even if they are expecting different topic names.
4. Namespace Assignment: It can define namespaces to organize the nodes and topics in a structured way.
5. Include Other Launch Files: Complex systems can be modularized by including other launch files.
A basic example of a launch file (`example.launch`) looks like this:
```xml
<launch>
<!-- Launch node1 -->
<node name="node1" pkg="package_name" type="node_executable" output="screen">
<param name="param_name" value="param_value"/>
</node>
<!-- Launch node2 with remapped topic -->
<node name="node2" pkg="package_name" type="node_executable">
<remap from="/old_topic" to="/new_topic"/>
</node>
</launch>
```
This launch file starts two nodes (`node1` and `node2`), sets parameters, and remaps a topic for `node2`. You can run it using the following command in ROS 2:
roslaunch package_name example.launch
Using launch files simplifies the management of large and complex robot systems in ROS.
In Mission Control, the Launch Files are presented in a table view shown as the below screenshot:
The Launch File table contains the Launch File Name, Package Name where the file belongs to, a brief description and a “Launch” button to quickly send launch command to your robot.
IN THIS LESSON
IMPORTANT:
In order to send launch command from your MiROS project to your robot and maintain a constant ssh connection, the below requirements should be met:
Your localhost computer running MiROS and your robot should be connected to the same local Wifi network.
You should know the ssh login information of your robot including its IP.
Your robot has installed MiROS Linux version. Without MiROS installed on your robot, you still can connect to your robot from MiROS. However, the ssh connection is not constant.
-
Add a short summary or a list of helpful resources here.