Skip to content

Commit

Permalink
add transmission part to xacro
Browse files Browse the repository at this point in the history
  • Loading branch information
RJJxp committed Jul 21, 2020
1 parent 50e26c9 commit b57d49a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 27 deletions.
8 changes: 4 additions & 4 deletions src/robot_description/urdf/t_robot.gazebo.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@
<horizontal>
<samples>90</samples>
<resolution>1</resolution>
<min_angle>-0.5</min_angle>
<max_angle>+0.5</max_angle>
<min_angle>-1.0</min_angle>
<max_angle>+1.0</max_angle>
</horizontal>
<vertical>
<samples>16</samples>
<resolution>1</resolution>
<min_angle>-${15.0*3.1415/180.0}</min_angle>
<max_angle>+${15.0*3.1415/180.0}</max_angle>
<min_angle>-${20.0*3.1415/180.0}</min_angle>
<max_angle>+${05.0*3.1415/180.0}</max_angle>
</vertical>
</scan>
<range>
Expand Down
66 changes: 44 additions & 22 deletions src/robot_description/urdf/t_robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@

<inertial>
<origin xyz="0 0 0" rpy="0 0 0"/>
<mass value="8.2573504e-01"/>
<inertia ixx="2.2124416e-03" ixy="-1.2294101e-05" ixz="3.4938785e-05"
iyy="2.1193702e-03" iyz="-5.0120904e-06"
izz="2.0064271e-03" />
<mass value="100"/>
<inertia ixx="0.00001" ixy="0.00000" ixz="0.00000"
iyy="0.00001" iyz="0.00000"
izz="0.00001" />
</inertial>
</link>

Expand Down Expand Up @@ -84,7 +84,7 @@
</collision>

<inertial>
<mass value="0.114" />
<mass value="0.01" />
<origin xyz="0 0 0" />
<inertia ixx="0.001" ixy="0.0" ixz="0.0"
iyy="0.001" iyz="0.0"
Expand All @@ -104,27 +104,38 @@
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
<geometry>
<cylinder length="0.02" radius="0.05"/>
<cylinder length="0.02" radius="0.1"/>
</geometry>
<material name="green"/>
</visual>

<collision>
<origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
<geometry>
<cylinder length="0.02" radius="0.05"/>
<cylinder length="0.02" radius="0.1"/>
</geometry>
</collision>

<inertial>
<origin xyz="0 0 0" />
<mass value="2.8498940e-02" />
<inertia ixx="1.1175580e-05" ixy="-4.2369783e-11" ixz="-5.9381719e-09"
iyy="1.1192413e-05" iyz="-1.4400107e-11"
izz="2.0712558e-05" />
<mass value="1" />
<inertia ixx="0.0025" ixy="0" ixz="0"
iyy="0.0025" iyz="0"
izz="0.005" />
</inertial>
</link>

<transmission name="wheel_left_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="wheel_left_joint">
<hardwareInterface>VelocityJointInterface</hardwareInterface>
</joint>
<actuator name="wheel_left_motor">
<hardwareInterface>VelocityJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<!-- joint of robot body link and right wheel -->
<joint name="wheel_right_joint" type="continuous">
<parent link="robot_body_link"/>
Expand All @@ -137,27 +148,38 @@
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
<geometry>
<cylinder length="0.02" radius="0.05"/>
<cylinder length="0.02" radius="0.1"/>
</geometry>
<material name="green"/>
</visual>

<collision>
<origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
<geometry>
<cylinder length="0.02" radius="0.05"/>
<cylinder length="0.02" radius="0.1"/>
</geometry>
</collision>

<inertial>
<origin xyz="0 0 0" />
<mass value="2.8498940e-02" />
<inertia ixx="1.1175580e-05" ixy="-4.2369783e-11" ixz="-5.9381719e-09"
iyy="1.1192413e-05" iyz="-1.4400107e-11"
izz="2.0712558e-05" />
<mass value="1" />
<inertia ixx="0.0025" ixy="0" ixz="0"
iyy="0.0025" iyz="0"
izz="0.005" />
</inertial>
</link>

<transmission name="wheel_right_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="wheel_right_joint">
<hardwareInterface>VelocityJointInterface</hardwareInterface>
</joint>
<actuator name="wheel_right_motor">
<hardwareInterface>VelocityJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>

<!-- caster back joint -->
<joint name="caster_back_joint" type="fixed">
<parent link="robot_body_link"/>
Expand All @@ -169,15 +191,15 @@
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.030 0.03 0.05"/>
<box size="0.030 0.03 0.10"/>
</geometry>
<material name="white" />
</visual>

<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.03 0.03 0.05"/>
<box size="0.03 0.03 0.10"/>
</geometry>
</collision>

Expand All @@ -201,15 +223,15 @@
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.03 0.03 0.05"/>
<box size="0.03 0.03 0.10"/>
</geometry>
<material name="white" />
</visual>

c
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.030 0.03 0.05"/>
<box size="0.03 0.03 0.10"/>
</geometry>
</collision>

Expand Down
2 changes: 1 addition & 1 deletion src/robot_description/urdf/t_robot_args.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<xacro:property name="caster_radius" value="0.01"/>
<!-- Distance between groud and robot which indicates the wheel's origin -->
<!-- origin.z = wheel_radius - dis_robot_ground -->
<xacro:property name="dis_robot_groud" value="0.05"/>
<xacro:property name="dis_robot_groud" value="0.1"/>
<!-- Distance between wheels and robot body side -->
<!-- This arg determines the y coordinates of wheel -->
<xacro:property name="dis_robot_wheel" value="0.01"/>
Expand Down

0 comments on commit b57d49a

Please sign in to comment.