URDF for Humanoid Robots
Chapter Objectives
- Understand the Unified Robot Description Format (URDF)
- Create URDF models for humanoid robots
- Define kinematic chains and joint constraints
- Integrate URDF with ROS 2 simulation
Introduction to URDF
URDF (Unified Robot Description Format) is an XML format for representing robot models in ROS. It defines the physical and visual properties of a robot including:
- Links (rigid bodies)
- Joints (connections between links)
- Inertial properties
- Visual and collision geometry
- Transmission information
Why URDF for Humanoid Robots?
Humanoid robots have complex kinematic structures with multiple limbs and joints. URDF provides:
- A standardized way to represent complex robot kinematics
- Integration with ROS tools for visualization and simulation
- Compatibility with kinematics libraries like MoveIt
- Support for dynamics simulation in Gazebo
Basic URDF Structure
A URDF file has a basic structure:
<?xml version="1.0"?>
<robot name="humanoid_robot">
<!-- Links definition -->
<link name="base_link">
<!-- Visual and collision properties -->
</link>
<!-- Joints definition -->
<joint name="joint_name" type="revolute">
<!-- Joint properties -->
</joint>
</robot>
Link Definition
A link represents a rigid body in the robot:
<link name="base_link">
<inertial>
<mass value="1.0" />
<origin xyz="0 0 0" rpy="0 0 0" />
<inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1" />
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.2 0.2 0.2" />
</geometry>
<material name="blue">
<color rgba="0 0 1 1" />
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.2 0.2 0.2" />
</geometry>
</collision>
</link>
Joint Definition
Joints connect links and define their relative motion:
<joint name="hip_joint" type="revolute">
<parent link="torso" />
<child link="thigh" />
<origin xyz="0 0 -0.1" rpy="0 0 0" />
<axis xyz="0 0 1" />
<limit lower="-1.57" upper="1.57" effort="100" velocity="1" />
<dynamics damping="0.1" friction="0.0" />
</joint>