Performance: Why URDF describes robot structure
URDF affects the robot simulation and visualization load time and rendering performance in ROS tools.
Jump into concepts and practice - no test required
<robot name="good_robot"> <link name="base_link"> <inertial> <mass value="5.0" /> <inertia ixx="0.1" iyy="0.1" izz="0.1" ixy="0" ixz="0" iyz="0" /> </inertial> <collision> <geometry> <box size="1 1 1" /> </geometry> </collision> </link> <link name="arm_link"> <inertial> <mass value="2.0" /> <inertia ixx="0.05" iyy="0.05" izz="0.05" ixy="0" ixz="0" iyz="0" /> </inertial> <collision> <geometry> <cylinder radius="0.1" length="1.0" /> </geometry> </collision> </link> <joint name="joint1" type="revolute"> <parent link="base_link" /> <child link="arm_link" /> <axis xyz="0 0 1" /> </joint> </robot>
<robot name="bad_robot"> <link name="base_link" /> <link name="arm_link" /> <joint name="joint1" type="fixed"> <parent link="base_link" /> <child link="arm_link" /> </joint> <!-- Missing inertial and collision info --> </robot>
| Pattern | DOM Operations | Reflows | Paint Cost | Verdict |
|---|---|---|---|---|
| Incomplete URDF (missing inertial/collision) | N/A | N/A | Higher CPU load in simulation | [X] Bad |
| Complete URDF with inertial and collision | N/A | N/A | Lower CPU load, smoother simulation | [OK] Good |
<link name="base_link"/> <joint name="joint1" type="revolute"> <parent link="base_link"/> <child link="arm_link"/> </joint>
<joint name="joint1" type="fixed"> <parent link="base_link"/> <child link="arm_link"/> <axis xyz="0 0 1"/> </joint>