Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Completed URDF specified toy car.
<?xml version="1.0"?>
<robot name="simplecar">
<!-- Colors -->
<material name="black">
<color rgba="0 0 0 1"/>
</material>
<material name="blue">
<color rgba="0.6 0.7 0.8 1"/>
</material>
<!-- Base Frame of Car -->
<link name="base_link">
<visual>
<geometry>
<box size="0.5 0.3 0.1"/>
</geometry>
<material name="blue"/>
</visual>
<inertial>
<mass value="6"/>
<inertia ixx="0.2" ixy="0" ixz="0" iyy="0.2" iyz="0.0" izz="0.2"/>
</inertial>
</link>
<!-- Left Front Wheel -->
<link name="left_front_wheel">
<visual>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="1.57075 1.57075 0"/>
<material name="black"/>
</visual>
<collision>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="1.57075 1.57075 0"/>
</collision>
<inertial>
<origin rpy="1.57075 1.57075 0"/>
<mass value="0.3"/>
<inertia ixx="0.4" ixy="0" ixz="0" iyy="0.4" iyz="0.0" izz="0.2"/>
</inertial>
</link>
<joint name="left_hinge_to_left_front_wheel" type="continuous">
<parent link="left_hinge"/>
<child link="left_front_wheel"/>
<axis xyz="0 1 0"/>
<origin xyz="0 0.2 0"/>
</joint>
<!-- Left Front Wheel - Hinge -->
<link name="left_hinge">
<visual>
<geometry>
<box size="0.20 0.02 0.02"/>
</geometry>
<origin xyz="0 0.1 0 " rpy="0 0 1.57075"/>
<material name="black"/>
</visual>
<inertial>
<origin rpy="0 0 1.57075"/>
<mass value="0.01"/>
<inertia ixx="5E-6" ixy="0" ixz="0" iyy="5E-6" iyz="0" izz="5E-6"/>
</inertial>
</link>
<joint name="base_to_left_hinge" type="revolute">
<parent link="base_link"/>
<child link="left_hinge"/>
<axis xyz="0 0 1"/>
<origin xyz="0.2 0.0 0"/>
<limit effort="100" lower="-0.5" upper="0.5" velocity="100"/>
</joint>
<!-- Right Front Wheel -->
<link name="right_front_wheel">
<visual>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="-1.57075 -1.57075 0"/>
<material name="black"/>
</visual>
<collision>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="-1.57075 -1.57075 0"/>
</collision>
<inertial>
<origin rpy="-1.57075 -1.57075 0"/>
<mass value="0.3"/>
<inertia ixx="0.4" ixy="0" ixz="0" iyy="0.4" iyz="0.0" izz="0.2"/>
</inertial>
</link>
<joint name="right_hinge_to_right_front_wheel" type="continuous">
<parent link="right_hinge"/>
<child link="right_front_wheel"/>
<axis xyz="0 1 0"/>
<origin xyz="0 -0.2 0"/>
</joint>
<!-- Right Front Wheel - Hinge -->
<link name="right_hinge">
<visual>
<geometry>
<box size="0.20 0.02 0.02"/>
</geometry>
<origin xyz="0 -0.1 0 " rpy="0 0 -1.57075"/>
<material name="black"/>
</visual>
<inertial>
<origin rpy="0 0 -1.57075"/>
<mass value="0.01"/>
<inertia ixx="5E-6" ixy="0" ixz="0" iyy="5E-6" iyz="0" izz="5E-6"/>
</inertial>
</link>
<joint name="base_to_right_hinge" type="revolute">
<parent link="base_link"/>
<child link="right_hinge"/>
<axis xyz="0 0 1"/>
<origin xyz="0.2 0 0"/>
<limit effort="100" lower="-0.5" upper="0.5" velocity="100"/>
</joint>
<!-- Left Back Wheel -->
<link name="left_back_wheel">
<visual>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="1.57075 1.57075 0"/>
<material name="black"/>
</visual>
<collision>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="1.57075 1.57075 0"/>
</collision>
<inertial>
<origin rpy="1.57075 1.57075 0"/>
<mass value="0.3"/>
<inertia ixx="0.4" ixy="0" ixz="0" iyy="0.4" iyz="0.0" izz="0.2"/>
</inertial>
</link>
<joint name="base_to_left_back_wheel" type="continuous">
<parent link="base_link"/>
<child link="left_back_wheel"/>
<axis xyz="0 1 0"/>
<origin xyz="-0.2 0.175 0"/>
</joint>
<!-- Right Back Wheel -->
<link name="right_back_wheel">
<visual>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="-1.57075 -1.57075 0"/>
<material name="black"/>
</visual>
<collision>
<geometry>
<cylinder length="0.05" radius="0.1"/>
</geometry>
<origin rpy="-1.57075 -1.57075 0"/>
</collision>
<inertial>
<origin rpy="-1.57075 -1.57075 0"/>
<mass value="0.3"/>
<inertia ixx="0.4" ixy="0" ixz="0" iyy="0.4" iyz="0.0" izz="0.2"/>
</inertial>
</link>
<joint name="base_to_right_back_wheel" type="continuous">
<parent link="base_link"/>
<child link="right_back_wheel"/>
<axis xyz="0 1 0"/>
<origin xyz="-0.2 -0.175 0"/>
</joint>
</robot>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment