-
Notifications
You must be signed in to change notification settings - Fork 0
/
kobuki.urdf.xacro
294 lines (272 loc) · 9.07 KB
/
kobuki.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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<?xml version="1.0" ?>
<!--
This is not a standalone urdf for kobuki. It simply defines the 'kobuki' tag that can
be incorporated by other urdf files (e.g. turtlebot).
See kobuki_standalone.urdf.xacro for a standalone urdf to be tested with
kobuki_description/launch/view_model.launch
-->
<robot name="kobuki" xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:include filename="$(find kobuki_description)/urdf/common_properties.urdf.xacro"/>
<xacro:include filename="$(find kobuki_description)/urdf/kobuki_gazebo.urdf.xacro"/>
<!-- Kobuki -->
<xacro:macro name="kobuki">
<link name="base_footprint"/>
<!--
Base link is set at the bottom of the base mould.
This is done to be compatible with the way base link
was configured for turtlebot 1. Refer to
https://github.com/turtlebot/turtlebot/issues/40
To put the base link at the more oft used wheel
axis, set the z-distance from the base_footprint
to 0.352.
-->
<joint name="base_joint" type="fixed">
<origin xyz="0 0 0.0102" rpy="0 0 0" />
<parent link="base_footprint"/>
<child link="base_link" />
</joint>
<link name="base_link">
<visual>
<geometry>
<!-- new mesh -->
<mesh filename="package://kobuki_description/meshes/main_body.dae" />
</geometry>
<origin xyz="0.001 0 0.05199" rpy="0 0 0"/>
</visual>
<collision name="base">
<geometry>
<cylinder length="0.10938" radius="0.178"/>
</geometry>
<origin xyz="0.0 0 0.05949" rpy="0 0 0"/>
</collision>
<inertial>
<!-- COM experimentally determined -->
<origin xyz="0.01 0 0"/>
<mass value="2.4"/> <!-- 2.4/2.6 kg for small/big battery pack -->
<!-- Kobuki's inertia tensor is approximated by a cylinder with homogeneous mass distribution
More details: http://en.wikipedia.org/wiki/List_of_moment_of_inertia_tensors
m = 2.4 kg; h = 0.09 m; r = 0.175 m
ixx = 1/12 * m * (3 * r^2 + h^2)
iyy = 1/12 * m * (3 * r^2 + h^2)
izz = 1/2 * m * r^2
-->
<inertia ixx="0.019995" ixy="0.0" ixz="0.0"
iyy="0.019995" iyz="0.0"
izz="0.03675" />
</inertial>
</link>
<joint name="wheel_left_joint" type="continuous">
<parent link="base_link"/>
<child link="wheel_left_link"/>
<origin xyz="0.00 ${0.23/2} 0.0250" rpy="${-M_PI/2} 0 0"/>
<axis xyz="0 0 1"/>
</joint>
<link name="wheel_left_link">
<visual>
<geometry>
<mesh filename="package://kobuki_description/meshes/wheel.dae"/>
</geometry>
<origin xyz="0 0 0" rpy="0 0 0"/>
</visual>
<collision>
<geometry>
<cylinder length="0.0206" radius="0.035"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
</collision>
<inertial>
<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"
izz="0.001" />
</inertial>
</link>
<joint name="wheel_right_joint" type="continuous">
<parent link="base_link"/>
<child link="wheel_right_link"/>
<origin xyz="0.00 -${0.23/2} 0.0250" rpy="${-M_PI/2} 0 0"/>
<axis xyz="0 0 1"/>
</joint>
<link name="wheel_right_link">
<visual>
<geometry>
<mesh filename="package://kobuki_description/meshes/wheel.dae"/>
</geometry>
<origin xyz="0 0 0" rpy="0 0 0"/>
</visual>
<collision>
<geometry>
<cylinder length="0.0206" radius="0.035"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
</collision>
<inertial>
<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"
izz="0.001" />
</inertial>
</link>
<joint name="caster_front_joint" type="fixed">
<parent link="base_link"/>
<child link="caster_front_link"/>
<origin xyz="0.115 0.0 0.007" rpy="${-M_PI/2} 0 0"/>
</joint>
<link name="caster_front_link">
<collision>
<geometry>
<cylinder length="0.0176" radius="0.017"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
</collision>
<inertial>
<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"
izz="0.001" />
</inertial>
</link>
<joint name="caster_back_joint" type="fixed">
<parent link="base_link"/>
<child link="caster_back_link"/>
<origin xyz="-0.135 0.0 0.009" rpy="${-M_PI/2} 0 0"/>
</joint>
<link name="caster_back_link">
<collision>
<geometry>
<cylinder length="0.0176" radius="0.017"/>
</geometry>
<origin rpy="0 0 0" xyz="0 0 0"/>
</collision>
<inertial>
<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"
izz="0.001" />
</inertial>
</link>
<!-- Kobuki's sensors -->
<joint name="gyro_joint" type="fixed">
<axis xyz="0 1 0"/>
<origin xyz="0.056 0.062 0.0202" rpy="0 0 0"/>
<parent link="base_link"/>
<child link="gyro_link"/>
</joint>
<link name="gyro_link">
<inertial>
<mass value="0.001"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
<inertia ixx="0.0001" ixy="0" ixz="0"
iyy="0.000001" iyz="0"
izz="0.0001"/>
</inertial>
</link>
<joint name="cliff_sensor_left_joint" type="fixed">
<origin xyz="0.08734 0.13601 0.0214" rpy="0 ${M_PI/2} 0" />
<parent link="base_link"/>
<child link="cliff_sensor_left_link" />
</joint>
<link name="cliff_sensor_left_link">
<inertial>
<mass value="0.0001" />
<origin xyz="0 0 0" />
<inertia ixx="0.0001" ixy="0.0" ixz="0.0"
iyy="0.0001" iyz="0.0"
izz="0.0001" />
</inertial>
</link>
<joint name="cliff_sensor_right_joint" type="fixed">
<origin xyz="0.085 -0.13601 0.0214" rpy="0 ${M_PI/2} 0" />
<parent link="base_link"/>
<child link="cliff_sensor_right_link" />
</joint>
<link name="cliff_sensor_right_link">
<inertial>
<mass value="0.0001" />
<origin xyz="0 0 0" />
<inertia ixx="0.0001" ixy="0.0" ixz="0.0"
iyy="0.0001" iyz="0.0"
izz="0.0001" />
</inertial>
</link>
<joint name="cliff_sensor_front_joint" type="fixed">
<origin xyz="0.156 0.00 0.0214" rpy="0 ${M_PI/2} 0" />
<parent link="base_link"/>
<child link="cliff_sensor_front_link" />
</joint>
<link name="cliff_sensor_front_link">
<inertial>
<mass value="0.0001" />
<origin xyz="0 0 0" />
<inertia ixx="0.0001" ixy="0.0" ixz="0.0"
iyy="0.0001" iyz="0.0"
izz="0.0001" />
</inertial>
</link>
<!-- my_camera add-->
<!-- my_camera left-->
<xacro:property name="cameraSize" value="0.04"/>
<xacro:property name="cameraMass" value="0.1"/>
<link name="my_left_camera">
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<sphere radius= "0.02"/>
</geometry>
</collision>
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<sphere radius= "0.02"/><!--"${cameraSize} ${cameraSize} ${cameraSize}"/>-->
</geometry>
<material name="green"/>
</visual>
<inertial>
<mass value="${cameraMass}" />
<origin xyz="0 0 0" rpy="0 0 0"/>
<box_inertia m="${cameraMass}" x="${cameraSize}" y="${cameraSize}" z="${cameraSize}" />
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>
</link>
<joint name="custom_camera_joint_right" type="fixed">
<axis xyz="0 1 0" />
<origin xyz=".12 .11 .153" rpy="0 0.3 0.7"/>
<parent link="base_link"/>
<child link="my_left_camera"/>
</joint>
<!-- my_camera -->
<link name="my_right_camera">
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<sphere radius= "0.02"/>
</geometry>
</collision>
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<sphere radius= "0.02"/>
</geometry>
<material name="green"/>
</visual>
<inertial>
<mass value="${cameraMass}" />
<origin xyz="0 0 0" rpy="0 0 0"/>
<box_inertia m="${cameraMass}" x="${cameraSize}" y="${cameraSize}" z="${cameraSize}" />
<inertia ixx="1e-6" ixy="0" ixz="0" iyy="1e-6" iyz="0" izz="1e-6" />
</inertial>
</link>
<joint name="custom_camera_joint_left" type="fixed">
<axis xyz="0 1 0" />
<origin xyz=".12 -.11 .153" rpy="0 0.3 -0.7"/>
<parent link="base_link"/>
<child link="my_right_camera"/>
</joint>
<!-- Kobuki Gazebo simulation details -->
<xacro:kobuki_sim/>
</xacro:macro>
</robot>