Skip to content

Commit

Permalink
Make the kinematic chain start from base_link instead of base.
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed May 29, 2019
1 parent e42b021 commit bd98e5f
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions ur_description/urdf/ur10.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,34 @@
<xacro:property name="upper_arm_length" value="${-1 * __kinematics['forearm']['x']}" />
<xacro:property name="forearm_length" value="${-1 * __kinematics['wrist_1']['x']}" />

<!-- This is for compatibility reasons, as transformation between base and base_link was always 180 degree in the ur_description -->
<xacro:property name="base_correction" value="${pi}" />

<link name="${prefix}base_link" >
<visual>
<origin xyz="0 0 0" rpy="0 0 ${pi}"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur10/visual/base.dae"/>
</geometry>
<material name="LightGrey">
<color rgba="0.7 0.7 0.7 1.0"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 ${pi}"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur10/collision/base.stl"/>
</geometry>
</collision>
<xacro:cylinder_inertial radius="0.075" length="0.038" mass="${base_mass}">
<origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
</xacro:cylinder_inertial>
</link>

<joint name="${prefix}shoulder_pan_joint" type="revolute">
<parent link="${prefix}base" />
<parent link="${prefix}base_link" />
<child link = "${prefix}shoulder_link" />
<origin xyz="${__kinematics['shoulder']['x']} ${__kinematics['shoulder']['y']} ${__kinematics['shoulder']['z']}" rpy="${__kinematics['shoulder']['roll']} ${__kinematics['shoulder']['pitch']} ${__kinematics['shoulder']['yaw']}" />
<origin xyz="${__kinematics['shoulder']['x']} ${__kinematics['shoulder']['y']} ${__kinematics['shoulder']['z']}" rpy="${__kinematics['shoulder']['roll']} ${__kinematics['shoulder']['pitch']} ${__kinematics['shoulder']['yaw'] + base_correction}" />
<axis xyz="0 0 1" />
<xacro:unless value="${joint_limited}">
<limit lower="${-2.0 * pi}" upper="${2.0 * pi}" effort="330.0" velocity="2.16"/>
Expand Down Expand Up @@ -300,33 +321,14 @@
<xacro:ur_arm_gazebo prefix="${prefix}" />

<!-- ROS base_link to UR 'Base' Coordinates transform -->
<link name="${prefix}base">
<visual>
<origin xyz="0 0 0" rpy="0 0 ${pi}"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur10/visual/base.dae"/>
</geometry>
<material name="LightGrey">
<color rgba="0.7 0.7 0.7 1.0"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 ${pi}"/>
<geometry>
<mesh filename="package://ur_description/meshes/ur10/collision/base.stl"/>
</geometry>
</collision>
<xacro:cylinder_inertial radius="0.075" length="0.038" mass="${base_mass}">
<origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
</xacro:cylinder_inertial>
</link>
<link name="${prefix}base"/>

<joint name="${prefix}base_link-base_fixed_joint" type="fixed">
<!-- NOTE: this rotation is only needed as long as base_link itself is
not corrected wrt the real robot (ie: rotated over 180
degrees)
-->
<origin xyz="0 0 0" rpy="0 0 ${-pi}"/>
<origin xyz="0 0 0" rpy="0 0 ${-base_correction}"/>
<parent link="${prefix}base_link"/>
<child link="${prefix}base"/>
</joint>
Expand Down

0 comments on commit bd98e5f

Please sign in to comment.