Challenge - 5 Problems
ROS Launch XML Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📝 Syntax
intermediateIdentify the error in this ROS launch XML snippet
What error will this ROS launch file snippet cause when run?
ROS
<launch> <node pkg="turtlesim" type="turtlesim_node" name="sim"/> <param name="background_r" value="255"/> <param name="background_g" value="255"/> <param name="background_b" value="255"/> </launch>
Attempts:
2 left
💡 Hint
Check the closing tags carefully in XML.
✗ Incorrect
The closing launch tag is missing the closing angle bracket '>'. This causes XML parsing to fail.
❓ component_behavior
intermediateWhat happens when you use in a ROS launch file?
Given this snippet, what is the effect of the tag in a ROS launch file?
ROS
<launch>
<include file="$(find turtlesim)/launch/turtlesim.launch"/>
</launch>Attempts:
2 left
💡 Hint
Think about how you can reuse launch files.
✗ Incorrect
The tag imports another launch file, running its nodes and parameters as part of the current launch.
❓ state_output
advancedWhat is the value of the 'robot_name' parameter after launch?
Consider this launch file snippet. What will be the value of the 'robot_name' parameter in the ROS parameter server after launch?
ROS
<launch> <param name="robot_name" value="alpha"/> <param name="robot_name" value="beta"/> </launch>
Attempts:
2 left
💡 Hint
Later parameters override earlier ones.
✗ Incorrect
In ROS launch files, if the same parameter is set multiple times, the last value overrides previous ones.
🔧 Debug
advancedWhy does this launch file fail to start the node?
This launch file fails to start the node. What is the cause?
ROS
<launch> <node pkg="my_package" type="my_node" name="my_node"> </launch>
Attempts:
2 left
💡 Hint
Check if all tags are properly closed.
✗ Incorrect
The tag is not closed properly. It needs a closing tag or self-closing slash.
🧠 Conceptual
expertHow does the 'arg' tag affect launch file behavior?
What is the main purpose of the tag in a ROS launch file?
Attempts:
2 left
💡 Hint
Think about how you can pass values into a launch file.
✗ Incorrect
The tag declares arguments that can be set when running the launch file to customize behavior.
