|
1 | 1 | <?xml version='1.0'?> |
2 | 2 | <sdf version="1.9"> |
3 | 3 | <model name="iris_with_gimbal"> |
4 | | - <include> |
| 4 | + <include merge="true"> |
5 | 5 | <uri>model://iris_with_standoffs</uri> |
| 6 | + <name>iris</name> |
| 7 | + <pose degrees="true">0 0 0 0 0 0</pose> |
6 | 8 | </include> |
7 | 9 |
|
8 | | - <include> |
| 10 | + <include merge="true"> |
9 | 11 | <uri>model://gimbal_small_3d</uri> |
10 | 12 | <name>gimbal</name> |
11 | 13 | <pose degrees="true">0 -0.01 -0.124923 90 0 90</pose> |
12 | 14 | </include> |
13 | 15 |
|
14 | 16 | <joint name="gimbal_joint" type="revolute"> |
15 | | - <parent>iris_with_standoffs::base_link</parent> |
16 | | - <child>gimbal::base_link</child> |
| 17 | + <parent>base_link</parent> |
| 18 | + <child>gimbal_link</child> |
17 | 19 | <axis> |
18 | 20 | <limit> |
19 | 21 | <lower>0</lower> |
|
27 | 29 | <plugin filename="gz-sim-joint-state-publisher-system" |
28 | 30 | name="gz::sim::systems::JointStatePublisher"> |
29 | 31 | </plugin> |
| 32 | + |
30 | 33 | <plugin filename="gz-sim-lift-drag-system" |
31 | 34 | name="gz::sim::systems::LiftDrag"> |
32 | 35 | <a0>0.3</a0> |
|
42 | 45 | <cp>0.084 0 0</cp> |
43 | 46 | <forward>0 1 0</forward> |
44 | 47 | <upward>0 0 1</upward> |
45 | | - <link_name>iris_with_standoffs::rotor_0</link_name> |
| 48 | + <link_name>rotor_0</link_name> |
46 | 49 | </plugin> |
47 | 50 | <plugin filename="gz-sim-lift-drag-system" |
48 | 51 | name="gz::sim::systems::LiftDrag"> |
|
59 | 62 | <cp>-0.084 0 0</cp> |
60 | 63 | <forward>0 -1 0</forward> |
61 | 64 | <upward>0 0 1</upward> |
62 | | - <link_name>iris_with_standoffs::rotor_0</link_name> |
| 65 | + <link_name>rotor_0</link_name> |
63 | 66 | </plugin> |
64 | 67 |
|
65 | 68 | <plugin filename="gz-sim-lift-drag-system" |
|
77 | 80 | <cp>0.084 0 0</cp> |
78 | 81 | <forward>0 1 0</forward> |
79 | 82 | <upward>0 0 1</upward> |
80 | | - <link_name>iris_with_standoffs::rotor_1</link_name> |
| 83 | + <link_name>rotor_1</link_name> |
81 | 84 | </plugin> |
82 | 85 | <plugin filename="gz-sim-lift-drag-system" |
83 | 86 | name="gz::sim::systems::LiftDrag"> |
|
94 | 97 | <cp>-0.084 0 0</cp> |
95 | 98 | <forward>0 -1 0</forward> |
96 | 99 | <upward>0 0 1</upward> |
97 | | - <link_name>iris_with_standoffs::rotor_1</link_name> |
| 100 | + <link_name>rotor_1</link_name> |
98 | 101 | </plugin> |
99 | 102 |
|
100 | 103 | <plugin filename="gz-sim-lift-drag-system" |
|
112 | 115 | <cp>0.084 0 0</cp> |
113 | 116 | <forward>0 -1 0</forward> |
114 | 117 | <upward>0 0 1</upward> |
115 | | - <link_name>iris_with_standoffs::rotor_2</link_name> |
| 118 | + <link_name>rotor_2</link_name> |
116 | 119 | </plugin> |
117 | 120 | <plugin filename="gz-sim-lift-drag-system" |
118 | 121 | name="gz::sim::systems::LiftDrag"> |
|
129 | 132 | <cp>-0.084 0 0</cp> |
130 | 133 | <forward>0 1 0</forward> |
131 | 134 | <upward>0 0 1</upward> |
132 | | - <link_name>iris_with_standoffs::rotor_2</link_name> |
| 135 | + <link_name>rotor_2</link_name> |
133 | 136 | </plugin> |
134 | 137 |
|
135 | 138 | <plugin filename="gz-sim-lift-drag-system" |
|
147 | 150 | <cp>0.084 0 0</cp> |
148 | 151 | <forward>0 -1 0</forward> |
149 | 152 | <upward>0 0 1</upward> |
150 | | - <link_name>iris_with_standoffs::rotor_3</link_name> |
| 153 | + <link_name>rotor_3</link_name> |
151 | 154 | </plugin> |
152 | 155 | <plugin filename="gz-sim-lift-drag-system" |
153 | 156 | name="gz::sim::systems::LiftDrag"> |
|
164 | 167 | <cp>-0.084 0 0</cp> |
165 | 168 | <forward>0 1 0</forward> |
166 | 169 | <upward>0 0 1</upward> |
167 | | - <link_name>iris_with_standoffs::rotor_3</link_name> |
168 | | - </plugin> |
169 | | - |
170 | | - <plugin filename="gz-sim-apply-joint-force-system" |
171 | | - name="gz::sim::systems::ApplyJointForce"> |
172 | | - <joint_name>iris_with_standoffs::rotor_0_joint</joint_name> |
173 | | - </plugin> |
174 | | - <plugin filename="gz-sim-apply-joint-force-system" |
175 | | - name="gz::sim::systems::ApplyJointForce"> |
176 | | - <joint_name>iris_with_standoffs::rotor_1_joint</joint_name> |
177 | | - </plugin> |
178 | | - <plugin filename="gz-sim-apply-joint-force-system" |
179 | | - name="gz::sim::systems::ApplyJointForce"> |
180 | | - <joint_name>iris_with_standoffs::rotor_2_joint</joint_name> |
181 | | - </plugin> |
182 | | - <plugin filename="gz-sim-apply-joint-force-system" |
183 | | - name="gz::sim::systems::ApplyJointForce"> |
184 | | - <joint_name>iris_with_standoffs::rotor_3_joint</joint_name> |
| 170 | + <link_name>rotor_3</link_name> |
185 | 171 | </plugin> |
186 | 172 |
|
187 | 173 | <plugin name="ArduPilotPlugin" |
|
199 | 185 | <gazeboXYZToNED degrees="true">0 0 0 180 0 90</gazeboXYZToNED> |
200 | 186 |
|
201 | 187 | <!-- Sensors --> |
202 | | - <imuName>iris_with_standoffs::imu_link::imu_sensor</imuName> |
| 188 | + <imuName>imu_link::imu_sensor</imuName> |
203 | 189 |
|
204 | 190 | <!-- |
205 | 191 | incoming control command [0, 1] |
|
209 | 195 | multiplier = 838 max rpm / 1 = 838 |
210 | 196 | --> |
211 | 197 | <control channel="0"> |
212 | | - <jointName>iris_with_standoffs::rotor_0_joint</jointName> |
| 198 | + <jointName>rotor_0_joint</jointName> |
213 | 199 | <useForce>1</useForce> |
214 | 200 | <multiplier>838</multiplier> |
215 | 201 | <offset>0</offset> |
|
227 | 213 | </control> |
228 | 214 |
|
229 | 215 | <control channel="1"> |
230 | | - <jointName>iris_with_standoffs::rotor_1_joint</jointName> |
| 216 | + <jointName>rotor_1_joint</jointName> |
231 | 217 | <useForce>1</useForce> |
232 | 218 | <multiplier>838</multiplier> |
233 | 219 | <offset>0</offset> |
|
245 | 231 | </control> |
246 | 232 |
|
247 | 233 | <control channel="2"> |
248 | | - <jointName>iris_with_standoffs::rotor_2_joint</jointName> |
| 234 | + <jointName>rotor_2_joint</jointName> |
249 | 235 | <useForce>1</useForce> |
250 | 236 | <multiplier>-838</multiplier> |
251 | 237 | <offset>0</offset> |
|
263 | 249 | </control> |
264 | 250 |
|
265 | 251 | <control channel="3"> |
266 | | - <jointName>iris_with_standoffs::rotor_3_joint</jointName> |
| 252 | + <jointName>rotor_3_joint</jointName> |
267 | 253 | <useForce>1</useForce> |
268 | 254 | <multiplier>-838</multiplier> |
269 | 255 | <offset>0</offset> |
|
282 | 268 |
|
283 | 269 | <!-- roll range is -30 to +30 deg --> |
284 | 270 | <control channel="8"> |
285 | | - <jointName>gimbal::roll_joint</jointName> |
| 271 | + <jointName>roll_joint</jointName> |
286 | 272 | <multiplier>1.047197551196</multiplier> |
287 | 273 | <offset>-0.5</offset> |
288 | 274 | <servo_min>1100</servo_min> |
|
294 | 280 |
|
295 | 281 | <!-- pitch range is -135 to +45 deg --> |
296 | 282 | <control channel="9"> |
297 | | - <jointName>gimbal::pitch_joint</jointName> |
| 283 | + <jointName>pitch_joint</jointName> |
298 | 284 | <multiplier>-3.14159265</multiplier> |
299 | 285 | <offset>-0.75</offset> |
300 | 286 | <servo_min>1100</servo_min> |
|
306 | 292 |
|
307 | 293 | <!-- yaw range is -160 to +160 deg --> |
308 | 294 | <control channel="10"> |
309 | | - <jointName>gimbal::yaw_joint</jointName> |
| 295 | + <jointName>yaw_joint</jointName> |
310 | 296 | <multiplier>-5.5850536</multiplier> |
311 | 297 | <offset>-0.5</offset> |
312 | 298 | <servo_min>1100</servo_min> |
|
321 | 307 | <plugin |
322 | 308 | filename="gz-sim-joint-position-controller-system" |
323 | 309 | name="gz::sim::systems::JointPositionController"> |
324 | | - <joint_name>gimbal::roll_joint</joint_name> |
| 310 | + <joint_name>roll_joint</joint_name> |
325 | 311 | <topic>/gimbal/cmd_roll</topic> |
326 | 312 | <p_gain>2</p_gain> |
327 | 313 | </plugin> |
328 | 314 | <plugin |
329 | 315 | filename="gz-sim-joint-position-controller-system" |
330 | 316 | name="gz::sim::systems::JointPositionController"> |
331 | | - <joint_name>gimbal::pitch_joint</joint_name> |
| 317 | + <joint_name>pitch_joint</joint_name> |
332 | 318 | <topic>/gimbal/cmd_pitch</topic> |
333 | 319 | <p_gain>2</p_gain> |
334 | 320 | </plugin> |
335 | 321 | <plugin |
336 | 322 | filename="gz-sim-joint-position-controller-system" |
337 | 323 | name="gz::sim::systems::JointPositionController"> |
338 | | - <joint_name>gimbal::yaw_joint</joint_name> |
| 324 | + <joint_name>yaw_joint</joint_name> |
339 | 325 | <topic>/gimbal/cmd_yaw</topic> |
340 | 326 | <p_gain>2</p_gain> |
341 | 327 | </plugin> |
|
0 commit comments