Skip to content

Instantly share code, notes, and snippets.

@joshnewans
Last active April 14, 2024 17:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 9 You must be signed in to fork a gist
  • Save joshnewans/69cb8a049fb4606b0a6bdecd6933164e to your computer and use it in GitHub Desktop.
Save joshnewans/69cb8a049fb4606b0a6bdecd6933164e to your computer and use it in GitHub Desktop.
ROS Transform Gripper Example URDF
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="robot">
<material name="grey">
<color rgba="0.2 0.2 0.2 1"/>
</material>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
<material name="orange">
<color rgba="1 0.3 0.1 1"/>
</material>
<material name="blue">
<color rgba="0 0 1 1"/>
</material>
<link name="world"></link>
<joint name="world_to_base" type="fixed">
<parent link="world" />
<child link="base" />
<origin rpy="1.57 0 0" xyz="0 0 0" />
</joint>
<link name="base">
<visual>
<origin xyz="2 0 0" rpy="0 0 0"/>
<geometry>
<box size="5 0.1 3" />
</geometry>
<material name="grey" />
</visual>
</link>
<joint name="base_to_l3" type="revolute">
<parent link="base" />
<child link="l3" />
<origin rpy="0 0 0" xyz="0 0.25 0" />
<axis rpy="0 0 0" xyz="0 0 1" />
<limit effort="0.1" lower="-3.1" upper="3.1" velocity="0.2"/>
</joint>
<link name="l3">
<visual>
<origin xyz="0.75 0 0" rpy="0 1.57 0"/>
<geometry>
<cylinder length="1.5" radius="0.04" />
</geometry>
<material name="orange" />
</visual>
</link>
<joint name="l3_to_l2" type="revolute">
<parent link="l3" />
<child link="l2" />
<!-- <origin xyz="1 0 0" /> -->
<origin rpy="0 0 0" xyz="1.5 0 0" />
<axis rpy="0 0 0" xyz="0 0 1" />
<limit effort="0.1" lower="-3.1" upper="3.1" velocity="0.2"/>
</joint>
<link name="l2">
<visual>
<origin xyz="0.75 0 0" rpy="0 1.57 0"/>
<geometry>
<cylinder length="1.5" radius="0.04" />
</geometry>
<material name="orange" />
</visual>
</link>
<joint name="l2_to_l1" type="revolute">
<parent link="l2" />
<child link="l1" />
<origin rpy="0 0 0" xyz="1.5 0 0" />
<axis rpy="0 0 0" xyz="0 0 1" />
<limit effort="0.1" lower="-3.1" upper="3.1" velocity="0.2"/>
</joint>
<link name="l1">
<visual>
<origin xyz="0.5 0 0" rpy="0 1.57 0"/>
<geometry>
<cylinder length="1" radius="0.04" />
</geometry>
<material name="orange" />
</visual>
</link>
<joint name="l1_to_grip" type="revolute">
<parent link="l1" />
<child link="grip" />
<origin rpy="0 0 0" xyz="1 0 0" />
<axis rpy="0 0 0" xyz="0 0 1" />
<limit effort="0.1" lower="-3.1" upper="3.1" velocity="0.2"/>
</joint>
<link name="grip">
<visual>
<origin xyz="0.25 0 0"/>
<geometry>
<box size="0.5 0.5 0.05" />
</geometry>
<material name="white" />
</visual>
</link>
<joint name="world_to_camera" type="fixed">
<parent link="world" />
<child link="camera" />
<origin rpy="-2 0 2.5" xyz="4 1 2" />
</joint>
<link name="camera">
<visual>
<origin xyz="0 0 -0.2"/>
<geometry>
<box size="0.2 0.2 0.4" />
</geometry>
<material name="blue" />
</visual>
</link>
</robot>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment