Skip to content

Instantly share code, notes, and snippets.

@GerardMaggiolino
Last active April 7, 2021 04:01
Show Gist options
  • Save GerardMaggiolino/3c9fabfa4e94c28e00aa0f790074efbe to your computer and use it in GitHub Desktop.
Save GerardMaggiolino/3c9fabfa4e94c28e00aa0f790074efbe to your computer and use it in GitHub Desktop.
Intermediate steps of URDF specified toy car.
<?xml version="1.0"?>
<robot name="simplecar">
<material name="black">
<color rgba="0 0 0 1"/>
</material>
<material name="blue">
<color rgba="0.6 0.7 0.8 0.7"/>
</material>
<!-- Base Frame of Car -->
<link name="base_link">
<visual>
<geometry>
<box size="0.5 0.3 0.1"/>
</geometry>
<material name="blue"/>
</visual>
</link>
<!-- 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>
</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 - 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>
</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>
</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>
</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