Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Building a mobile robot URDF
📖 Scenario: You are creating a simple mobile robot model using URDF (Unified Robot Description Format) for ROS. This robot has a base and two wheels. You will build the URDF step-by-step to describe the robot's parts and their connections.
🎯 Goal: Build a basic URDF file describing a mobile robot with a base link and two wheel links connected by joints.
📋 What You'll Learn
Create the base link element with a box geometry
Define a parameter for wheel radius
Add two wheel links with cylinder geometry using the wheel radius parameter
Add joints connecting the wheels to the base link
💡 Why This Matters
🌍 Real World
Robots need URDF files to describe their physical shape and joints so simulators and controllers can understand their structure.
💼 Career
Robotics engineers use URDF to model robots for simulation, visualization, and control in ROS-based projects.
Progress0 / 4 steps
1
Create the base link element
Create a <link> element named base_link with a <visual> child containing a <geometry> element. Inside <geometry>, add a <box> with size 0.5 0.3 0.1.
ROS
Hint
Use the <link> tag with the attribute name="base_link". Inside it, add <visual> and then <geometry> with a <box> element specifying the size.
2
Define a wheel radius parameter
Add a <xacro:property> named wheel_radius with value 0.1 inside the <robot> element, before the <link> elements.
ROS
Hint
Use <xacro:property> to define a variable named wheel_radius with value 0.1. Remember to add the xmlns:xacro namespace to the <robot> tag.
3
Add two wheel links using the wheel radius
Add two <link> elements named left_wheel and right_wheel. Each should have a <visual> with a <geometry> containing a <cylinder> with radius="${wheel_radius}" and length="0.05".
ROS
Hint
Use two <link> tags named left_wheel and right_wheel. Inside each, add <visual> and <geometry> with a <cylinder> using the ${wheel_radius} property for radius and length 0.05.
4
Add joints connecting wheels to the base
Add two <joint> elements named left_wheel_joint and right_wheel_joint. Both should be of type continuous. Set parent to base_link and child to the respective wheel link. Position left_wheel_joint at 0 0.15 0 and right_wheel_joint at 0 -0.15 0 using <origin>.
ROS
Hint
Use two <joint> elements with names left_wheel_joint and right_wheel_joint. Set type to continuous. Use <parent> and <child> tags to connect links. Use <origin> to position joints.
Practice
(1/5)
1. What does a URDF file primarily describe in ROS for a mobile robot?
easy
A. The robot's parts (links) and how they connect (joints)
B. The robot's sensor data processing algorithms
C. The robot's network communication protocols
D. The robot's battery charging schedule
Solution
Step 1: Understand URDF purpose
A URDF (Unified Robot Description Format) file describes the physical structure of a robot, including its parts and connections.
Step 2: Identify mobile robot components
Mobile robots have links (like base and wheels) connected by joints, which URDF models.
Final Answer:
The robot's parts (links) and how they connect (joints) -> Option A
Quick Check:
URDF = robot parts and joints [OK]
Hint: URDF = robot structure, not software or data [OK]
Common Mistakes:
Confusing URDF with software algorithms
Thinking URDF handles communication
Assuming URDF manages battery or sensors
2. Which of the following is the correct syntax to define a link named base_link in a URDF file?
easy
A.
B.
C.
D.
Solution
Step 1: Recognize URDF link syntax
In URDF, links are defined with the <link> tag and a name attribute.
Step 2: Check option correctness
<link name="base_link"/> uses <link name="base_link"/>, which is correct syntax. Other options use wrong tags or attributes.