In ROS, launch files help automate the startup of multiple nodes. What is the main reason launch files simplify this process?
Think about how you would start many programs manually versus using a script.
Launch files let you start many ROS nodes with one command, saving time and reducing errors from manual startup.
Consider a ROS launch file that starts three nodes. What happens when you run this launch file?
Think about what automation means for starting multiple programs.
Running a launch file starts all listed nodes at once, so they run together without manual intervention.
Which XML tag correctly starts a node in a ROS launch file?
<launch> <!-- Choose the correct tag below --> </launch>
Look for the standard tag used in ROS launch files to start nodes.
The <node> tag is the standard way to specify a node to start in a ROS launch file.
Given this launch file snippet, why does the node fail to start?
<launch> <node type="my_node"/> </launch>
Check the required attributes for the node tag in ROS launch files.
The 'pkg' attribute is required to locate the package containing the node executable; missing it causes failure.
Consider this launch file starting two nodes. What will be the output in the terminal after running it?
<launch> <node pkg="pkg1" type="node1" name="node1" output="screen"/> <node pkg="pkg2" type="node2" name="node2" output="screen"/> </launch>
Think about what the 'output="screen"' attribute does for nodes.
Setting output="screen" makes each node print its output to the terminal, so outputs mix together.
