Skip to main content

Reference Frames

Frames

Each joint has standard input and output frames that, when coincident, connect the joints in their default position. Below is such an example of R105.

reference frames

Joint URDF Structure

<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- <xacro:property name="joint_material" value="0.019608 0.32549 1 1" /> -->

<xacro:macro name="revolute_l" params="prefix parent_connection input *origin
mass='1.6'
ixx='0.005898' ixy='0' ixz='0' iyy='0.003584' iyz='0.000096' izz='0.005765'
effort='10' velocity='1' lower='-3.141593' upper='3.141593'">

<!-- Actual joint geometry -->
<link name="${prefix}_revolute_l_link">
<visual>
<origin xyz="0 0 0" rpy="1.570796 0 0" />
<geometry><mesh filename="file://$(find revolute_l_description)/meshes/revolute_l_visual.glb" /></geometry>
<!-- <material name="joint_material" /> -->
</visual>
<collision>
<geometry><mesh filename="file://$(find revolute_l_description)/meshes/revolute_l_collision.stl" /></geometry>
</collision>
<inertial>
<mass value="${mass}" />
<inertia ixx="${ixx}" ixy="${ixy}" ixz="${ixz}" iyy="${iyy}" iyz="${iyz}" izz="${izz}" />
</inertial>
</link>

<joint name="${prefix}" type="revolute">
<origin xyz="0 -0.088002 0" rpy="1.570796 1.570796 0.0" />
<parent link="${prefix}_revolute_l_link" />
<child link="${prefix}_joint_out" />
<axis xyz="0 0 1" />
<limit effort="${effort}" velocity="${velocity}" lower="${lower}" upper="${upper}" />
</joint>

<joint name="${prefix}_joint_in_joint" type="fixed">
<origin xyz="0 0 0.070002" rpy="0 0 -1.570796" />
<parent link="${prefix}_joint_in" />
<child link="${prefix}_revolute_l_link" />
</joint>

<!-- Empty links to attach child joints to the input or output of this joint -->
<link name="${prefix}_joint_in" />
<link name="${prefix}_joint_out" />

<!-- attatch output of parent to input of this joint -->
<xacro:if value="${input == 'joint_in'}">
<joint name="${parent_connection}_to_${prefix}_joint" type="fixed">
<xacro:insert_block name="origin" />
<parent link="${parent_connection}" />
<child link="${prefix}_joint_in" />
</joint>
</xacro:if>

<!-- attatch input of parent to output of this joint -->
<xacro:if value="${input == 'joint_out'}">
<joint name="${prefix}_to_${parent_connection}_joint" type="fixed">
<xacro:insert_block name="origin" />
<parent link="${prefix}_joint_out" />
<child link="${parent_connection}" />
</joint>
</xacro:if>

</xacro:macro>
</robot>