-
Notifications
You must be signed in to change notification settings - Fork 13
/
dingo-d.urdf.xacro
255 lines (231 loc) · 7.92 KB
/
dingo-d.urdf.xacro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?xml version="1.0"?>
<robot name="dingo" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="pacs_enabled" value="$(optenv DINGO_PACS_ENABLED 0)"/>
<xacro:property name="PI" value="3.1415926535897931" />
<xacro:property name="wheel_radius" value="0.049" />
<xacro:property name="wheel_mass" value="0.111" />
<xacro:property name="wheel_width" value="0.02032" />
<xacro:property name="wheel_x_offset" value="0.0989838" />
<xacro:property name="wheel_z_offset" value="0.0345" />
<xacro:property name="wheelbase" value="0.2160016" />
<xacro:property name="dummy_inertia" value="1e-09"/>
<material name="dark_grey"><color rgba="0.2 0.2 0.2 1.0" /></material>
<material name="light_grey"><color rgba="0.4 0.4 0.4 1.0" /></material>
<material name="yellow"><color rgba="0.8 0.8 0.0 1.0" /></material>
<material name="black"><color rgba="0.15 0.15 0.15 1.0" /></material>
<xacro:macro name="wheel" params="prefix *joint_pose">
<link name="${prefix}_wheel_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://dingo_description/meshes/wheel.stl"/>
</geometry>
<material name="black" />
</visual>
<collision>
<origin xyz="0 0 0" rpy="${PI/2} 0 0"/>
<geometry>
<cylinder radius="${wheel_radius}" length="${wheel_width}"/>
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0" rpy="0 0 0"/>
<mass value="${wheel_mass}"/>
<inertia
ixx="0.0003234" ixy="0" ixz="0"
iyy="0.0003234" iyz="0"
izz="0.00049015"/>
</inertial>
</link>
<gazebo reference="${prefix}_wheel_link">
<material>Gazebo/DarkGrey</material>
<selfCollide>false</selfCollide>
<mu1 value="0.5"/>
<mu2 value="0.5"/>
<kp value="10000000.0" />
<kd value="1" />
<fdir1 value="1 0 0"/>
</gazebo>
<joint name="${prefix}_wheel" type="continuous">
<parent link="chassis_link"/>
<child link="${prefix}_wheel_link" />
<xacro:insert_block name="joint_pose" />
<axis xyz="0 1 0" />
</joint>
<transmission name="${prefix}_wheel_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${prefix}_wheel">
<hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
</joint>
<actuator name="${prefix}_actuator">
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
</xacro:macro>
<xacro:wheel prefix="left">
<origin xyz="${wheel_x_offset} ${wheelbase+wheel_width/2} ${wheel_z_offset}" rpy="0 0 0" />
</xacro:wheel>
<xacro:wheel prefix="right">
<origin xyz="${wheel_x_offset} ${-wheelbase-wheel_width/2} ${wheel_z_offset}" rpy="0 0 0" />
</xacro:wheel>
<link name="rear_caster">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.01"/>
</geometry>
<material name="black"/>
</visual>
<collision>
<geometry>
<sphere radius="0.01"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
<surface>
<friction>
<ode>
<mu>0.0</mu>
<mu2>0.0</mu2>
<slip1>1.0</slip1>
<slip2>1.0</slip2>
</ode>
</friction>
</surface>
</collision>
<inertial>
<mass value="0.1" />
<origin xyz="0 0 0" />
<inertia ixx="0.001" ixy="0.0" ixz="0.0"
iyy="0.001" iyz="0.0"
izz="0.001" />
</inertial>
</link>
<joint name="rear_caster_joint" type="fixed">
<parent link="chassis_link"/>
<child link="rear_caster"/>
<origin xyz="-0.244 0 -0.00674" rpy="0 0 0"/>
</joint>
<gazebo reference="rear_caster">
<turnGravityOff>false</turnGravityOff>
<kp>1000000.0</kp>
<kd>100.0</kd>
<mu1>0.2</mu1>
<mu2>0.2</mu2>
<fdir1>1 0 0</fdir1>
<minDepth>0.00</minDepth>
<implicitSpringDamper>1</implicitSpringDamper>
</gazebo>
<link name="base_link"></link>
<joint name="base_link_joint" type="fixed">
<origin xyz="0 0 0" rpy="0 0 0" />
<parent link="base_link"/>
<child link="chassis_link" />
</joint>
<link name="chassis_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://dingo_description/meshes/diff_chassis.dae"/>
</geometry>
</visual>
<collision>
<origin xyz="0 0 0"/>
<geometry>
<mesh filename="package://dingo_description/meshes/diff_chassis_collision.stl"/>
</geometry>
</collision>
<inertial>
<!-- Center of mass -->
<origin xyz="0 0 0" rpy="0 0 0"/>
<mass value="10.0"/>
<!-- Moments of inertia: ( chassis without wheels ) -->
<inertia
ixx="0.2216" ixy="0" ixz="0"
iyy="0.2458" iyz="0"
izz="0.4474"/>
</inertial>
</link>
<link name="imu_link">
<inertial>
<mass value="0.001"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
<inertia ixx="${dummy_inertia}" ixy="0.0" ixz="0.0" iyy="${dummy_inertia}" iyz="0.0" izz="${dummy_inertia}"/>
</inertial>
</link>
<joint name="imu_joint" type="fixed">
<parent link="chassis_link" />
<child link="imu_link" />
</joint>
<!--
Mounting points for accessories in the top channel.
These are flush with the top of the robot and all oriented to face forwards.
Dingo-D has 6 evenly-spaced 80mm mounts
We name the mounts (from front to back)
- front
- front b
- front c
- rear c
- rear b
- rear
-->
<xacro:unless value="${pacs_enabled}">
<link name="front_mount"/>
<link name="front_b_mount"/>
<link name="front_c_mount"/>
<link name="rear_mount"/>
<link name="rear_b_mount"/>
<link name="rear_c_mount"/>
<joint name="front_c_mount_joint" type="fixed">
<origin xyz="0.040 0 0.064263" rpy="0 0 0" />
<parent link="chassis_link"/>
<child link="front_c_mount" />
</joint>
<joint name="front_b_mount_joint" type="fixed">
<origin xyz="0.080 0 0" rpy="0 0 0" />
<parent link="front_c_mount"/>
<child link="front_b_mount" />
</joint>
<joint name="front_mount_joint" type="fixed">
<origin xyz="0.080 0 0" rpy="0 0 0" />
<parent link="front_b_mount"/>
<child link="front_mount" />
</joint>
<joint name="rear_c_mount_joint" type="fixed">
<origin xyz="-0.040 0 0.064263" rpy="0 0 0" />
<parent link="chassis_link"/>
<child link="rear_c_mount" />
</joint>
<joint name="rear_b_mount_joint" type="fixed">
<origin xyz="-0.080 0 0" rpy="0 0 0" />
<parent link="rear_c_mount"/>
<child link="rear_b_mount" />
</joint>
<joint name="rear_moint_joint" type="fixed">
<origin xyz="-0.080 0 0" rpy="0 0 0" />
<parent link="rear_b_mount"/>
<child link="rear_mount" />
</joint>
</xacro:unless>
<!--
Mounting point for accessories on the front bumper.
Use with caution, but thin sensors (e.g Raspberry Pi NoIR camera) could
be mounted here for low-budget, front-facing capabilities
-->
<link name="front_bumper_mount"></link>
<joint name="front_bumper_mount_joint" type="fixed">
<origin xyz="0.274 0 0.0345125" rpy="0 0 0" />
<parent link="chassis_link"/>
<child link="front_bumper_mount" />
</joint>
<!-- PACS -->
<xacro:include filename="$(find dingo_description)/urdf/pacs.urdf.xacro"/>
<xacro:pacs/>
<!-- Bring in simulation data for Gazebo. -->
<xacro:include filename="$(find dingo_description)/urdf/dingo.gazebo" />
<!-- Optional standard accessories, including their simulation data. The rendering
of these into the final description is controlled by optenv variables, which
default each one to off.-->
<xacro:include filename="$(find dingo_description)/urdf/accessories.urdf.xacro" />
<!-- Optional custom includes. -->
<xacro:include filename="$(optenv DINGO_URDF_EXTRAS empty.urdf)" />
</robot>