aquanaute_description.urdf.xacro 9.34 KB
Newer Older
1
<?xml version="1.0"?>
2
<robot xmlns:xacro="http://ros.org/wiki/xacro" name="aquanaute">
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
3
4
5
6
7
8
9
10

    <material name="blue">
        <color rgba="0 0 0.8 1"/>
    </material>
    <material name="red">
        <color rgba="0.8 0 0 1"/>
    </material>
    <material name="green">
11
        <color rgba="0 0.8 0 0.5"/>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    </material>
    <material name="cyan">
        <color rgba="0 0.6 0.6 1"/>
    </material>
    <material name="yellow">
        <color rgba="0.8 0.8 0 1"/>
    </material>
    <material name="purple">
        <color rgba="0.5 0 0.5 1"/>
    </material>
    <material name="white">
        <color rgba="1 1 1 1"/>
    </material>
    <material name="gray">
        <color rgba="0.35 0.35 0.35 1"/>
    </material>
    <material name="black">
        <color rgba="0 0 0 1"/>
    </material>

32
    <!-- * * * Link Definitions * * * -->
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
33
    <link name="base_link">
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
34
35
36
37
38
39
40
41
42
43
        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <sphere radius="0.001"/>
            </geometry>
            <material name="blue"/>
        </visual>
    </link>

    <link name="platform_link">
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
44
        <inertial>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
45
46
47
            <origin xyz="-0.024 0 -0007" rpy="0 0 0"/>
            <mass value="16"/>
            <inertia ixx="4.206" ixy="0.0" ixz="-0.031" iyy="4.588" iyz="0.0" izz="8.785"/>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Platform.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Platform.stl"/>
            </geometry>
            <material name="yellow"/>
        </visual>
    </link>

    <link name="right_hull_link">
        <inertial>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
68
69
70
            <origin xyz="-0.124 0 -0.168" rpy="0 0 0"/>
            <mass value="10.45"/>
            <inertia ixx="0.244" ixy="3.346" ixz="0.009" iyy="4.974" iyz="-8.274" izz="4.965"/>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
71
        </inertial>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
72

Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Hull.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Hull.stl"/>
            </geometry>
            <material name="red"/>
        </visual>
    </link>

    <link name="left_hull_link">
        <inertial>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
91
92
93
            <origin xyz="-0.124 0 -0.168" rpy="0 0 0"/>
            <mass value="10.45"/>
            <inertia ixx="0.244" ixy="3.346" ixz="0.009" iyy="4.974" iyz="-8.274" izz="4.965"/>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Hull.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Hull.stl"/>
            </geometry>
            <material name="red"/>
        </visual>
    </link>

    <link name="motor_link">
        <inertial>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
114
115
116
            <origin xyz="-0.133 0 -0.391" rpy="0 0 0"/>
            <mass value="6.6"/>
            <inertia ixx="0.072" ixy="3.604" ixz="-0.011" iyy="0.111" iyz="5.484" izz="0.042"/>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
        </inertial>

        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Motor.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/Motor.stl"/>
            </geometry>
            <material name="purple"/>
        </visual>
    </link>

135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
    <link name="propeller_link">
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <cylinder radius="0.05" length="0.04"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0 0 0" xyz="0 0 0"/>
            <geometry>
                <cylinder radius="0.01" length="0.02"/>
            </geometry>
            <material name="green"/>
        </visual>
    </link>

Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
152
153
    <link name="sensor_frame_link">
        <inertial>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
154
155
            <origin xyz="-0.007 0 0.379" rpy="0 0 0"/>
            <mass value="1.8"/>
156
            <inertia ixx="0.308" ixy="0.00" ixz="0.007" iyy="0.297" iyz="0.00" izz="0.022"/>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
157
        </inertial>
158

Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
        <collision>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/sensor_frame.stl"/>
            </geometry>
        </collision>

        <visual>
            <origin rpy="0.0 0 0" xyz="0 0 0"/>
            <geometry>
                <mesh filename="package://aquanaute_description/models/meshes/sensor_frame.stl"/>
            </geometry>
            <material name="cyan"/>
        </visual>
    </link>

    <!-- * * * Joint Definitions * * * -->
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
176
    <joint name="platform_base_joint" type="fixed">
177
178
179
180
        <parent link="base_link"/>
        <child link="platform_link"/>
        <origin xyz="0 0 0.35" rpy="0 0 0"/>
    </joint>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
181
182

    <joint name="right_hull_platform_joint" type="fixed">
183
184
185
186
        <parent link="platform_link"/>
        <child link="right_hull_link"/>
        <origin xyz="-0.05 -0.7 -0.036" rpy="0 0 0"/>
    </joint>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
187
188

    <joint name="left_hull_platform_joint" type="fixed">
189
190
191
192
        <parent link="platform_link"/>
        <child link="left_hull_link"/>
        <origin xyz="-0.05 0.7 -0.036" rpy="0 0 0"/>
    </joint>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
193

194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
    <joint name="motor_platform_joint" type="revolute">
        <parent link="platform_link"/>
        <child link="motor_link"/>
        <origin xyz="-0.91 0.0 -0.09" rpy="0 0 0"/>
        <axis xyz="0 0 1"/>
        <limit effort="-1" velocity="-1" lower="-0.9" upper="0.9"/>
    </joint>

    <joint name="propeller_motor_joint" type="revolute">
        <parent link="motor_link"/>
        <child link="propeller_link"/>
        <origin xyz="-0.28 0 -0.42" rpy="0 1.57 0"/>
        <axis xyz="0 0 1"/>
        <limit effort="-1" velocity="-1" lower="-1e+12" upper="1e+12"/>
    </joint>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
209
210

    <joint name="sensor_frame_platform_joint" type="fixed">
211
212
213
214
        <parent link="platform_link"/>
        <child link="sensor_frame_link"/>
        <origin xyz="-0.55 0.0 0.0" rpy="0 0 0"/>
    </joint>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
215

Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
    <!-- * * * GAZEBO Definitions * * * -->

    <gazebo reference="base_link">
        <kp>100000.0</kp>
        <kd>100000.0</kd>
        <mu1>10.0</mu1>
        <mu2>10.0</mu2>
        <material>Gazebo/Grey</material>
    </gazebo>

    <gazebo reference="platform_link">
        <kp>100000.0</kp>
        <kd>100000.0</kd>
        <mu1>10.0</mu1>
        <mu2>10.0</mu2>
        <material>Gazebo/Grey</material>
    </gazebo>

    <gazebo reference="right_hull_link">
        <kp>100000.0</kp>
        <kd>100000.0</kd>
        <mu1>10.0</mu1>
        <mu2>10.0</mu2>
239
        <material>Gazebo/Red</material>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
240
241
242
243
244
245
246
    </gazebo>

    <gazebo reference="left_hull_link">
        <kp>100000.0</kp>
        <kd>100000.0</kd>
        <mu1>10.0</mu1>
        <mu2>10.0</mu2>
247
        <material>Gazebo/Red</material>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
248
249
250
251
252
253
254
    </gazebo>

    <gazebo reference="motor_link">
        <kp>100000.0</kp>
        <kd>100000.0</kd>
        <mu1>10.0</mu1>
        <mu2>10.0</mu2>
255
        <material>Gazebo/Black</material>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
256
257
258
259
260
261
262
    </gazebo>

    <gazebo reference="sensor_frame_link">
        <kp>100000.0</kp>
        <kd>100000.0</kd>
        <mu1>10.0</mu1>
        <mu2>10.0</mu2>
263
        <material>Gazebo/White</material>
Ricardo Rico Uribe's avatar
Ricardo Rico Uribe committed
264
    </gazebo>
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312

    <!-- * * * GAZEBO Plugins * * * -->

    <plugin name="ardupilot_plugin" filename="libArduPilotPlugin.so">
        <fdm_addr>127.0.0.1</fdm_addr>
        <fdm_port_in>9002</fdm_port_in>
        <fdm_port_out>9003</fdm_port_out>
        <modelXYZToAirplaneXForwardZDown>0 0 0 3.141593 0 0</modelXYZToAirplaneXForwardZDown>
        <gazeboXYZToNED>0 0 0 3.141593 0 0</gazeboXYZToNED>
        <!--<imuName></imuName>-->
        <connectionTimeoutMaxCount>5</connectionTimeoutMaxCount>
        <!--
          incoming control command [0, 1]
          so offset it by 0 to get [0, 1]
          and divide max target by 1.
          offset = 0
          multiplier = 838 max rpm / 1 = 838
        -->
        <control channel="0">
            <multiplier>1</multiplier>
            <offset>-0.5</offset>
            <type>RIC</type>
            <p_gain>1</p_gain>
            <i_gain>0</i_gain>
            <d_gain>0</d_gain>
            <i_max>0</i_max>
            <i_min>0</i_min>
            <cmd_max>1</cmd_max>
            <cmd_min>-1</cmd_min>
            <jointName>aquanaute::motor_platform_joint</jointName>
        </control>

        <control channel="1">
            <multiplier>1</multiplier>
            <offset>-0.5</offset>
            <type>THOMAS</type>
            <p_gain>1</p_gain>
            <i_gain>0</i_gain>
            <d_gain>0</d_gain>
            <i_max>0</i_max>
            <i_min>0</i_min>
            <cmd_max>1</cmd_max>
            <cmd_min>-1</cmd_min>
            <jointName>aquanaute::propeller_motor_joint</jointName>
        </control>

    </plugin>

313
</robot>