Challenge - 5 Problems
URDF Visualization Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ component_behavior
intermediateWhat will this ROS launch file display?
Given the following ROS launch snippet that loads a URDF robot model into RViz, what will be the visible output when RViz starts?
ROS
<launch> <param name="robot_description" command="$(find xacro)/xacro $(find my_robot_description)/urdf/robot.urdf.xacro"/> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find my_robot_description)/rviz/robot.rviz"/> </launch>
Attempts:
2 left
💡 Hint
Check how the robot_description parameter is set and how RViz uses it to display the model.
✗ Incorrect
The launch file sets the robot_description parameter by processing the URDF xacro file, then starts RViz with a config that visualizes the robot. This results in the full robot model being displayed.
📝 Syntax
intermediateIdentify the syntax error in this URDF snippet
What is the syntax error in this URDF snippet that prevents the robot model from loading correctly?
ROS
<robot name="simple_bot"> <link name="base_link"> <visual> <geometry> <box size="1 1 1"/> </geometry> </visual> </link> <joint name="joint1" type="revolute"> <parent link="base_link"/> <child link="link1"/> <origin xyz="0 0 1" rpy="0 0 0"/> <axis xyz="0 0 1"/> </joint> </robot>
Attempts:
2 left
💡 Hint
Check if all links referenced in joints are defined.
✗ Incorrect
The joint references a child link named "link1" which is not defined in the URDF. This causes the model to fail loading.
❓ state_output
advancedWhat is the effect of changing the tag in a URDF joint?
Consider a revolute joint in a URDF with origin xyz="0 0 1" rpy="0 0 0". If you change the origin to xyz="0 0 0" rpy="0 1.57 0", what will be the effect on the robot model display in RViz?
Attempts:
2 left
💡 Hint
The rpy attribute defines rotation in roll, pitch, yaw order.
✗ Incorrect
Changing rpy to "0 1.57 0" rotates the child link 90 degrees around the Y-axis, affecting how it appears connected to the parent in RViz.
🔧 Debug
advancedWhy does RViz fail to display the robot model?
You have a launch file that sets the robot_description parameter and starts RViz, but RViz shows no robot model. Which of the following is the most likely cause?
Attempts:
2 left
💡 Hint
Consider the order of parameter setting and node startup in ROS launch files.
✗ Incorrect
If RViz starts before the robot_description parameter is set, it will not load the robot model. Parameters must be set before RViz node starts.
🧠 Conceptual
expertHow does the robot_state_publisher use the URDF to update robot visualization?
In ROS, the robot_state_publisher node reads the URDF robot model and publishes TF transforms. What is the main purpose of these transforms for visualization in RViz?
Attempts:
2 left
💡 Hint
Think about how RViz knows where each part of the robot is in space.
✗ Incorrect
The robot_state_publisher publishes TF transforms that describe how each link is positioned and oriented relative to its parent link. RViz uses these transforms to draw the robot in its current pose.
