-
Notifications
You must be signed in to change notification settings - Fork 13
/
t650.sdf.jinja
1353 lines (1251 loc) · 35.2 KB
/
t650.sdf.jinja
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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<sdf version='1.6'>
{%- import "mrs_robots_description/sdf/component_snippets.sdf.jinja" as components -%}
{# ================================================================== #}
{# || parameters definition || #}
{# ================================================================== #}
{# Robot parameters and arguments {--> #}
{%- set mass = 3.5 -%} {# [kg] #}
{%- set body_radius = 0.325 -%} {# [m] #}
{%- set body_height = 0.15 -%} {# [m] #}
{%- set mass_prop = 0.005 -%} {# [kg] #}
{%- set radius_rotor = 0.195 -%} {# [m] #}
{%- set rotor_offset = 0.021 -%} {# [m] #}
{%- set propeller_offset = 0.01 -%} {# [m] #}
{%- set arm_length = 0.3 -%} {# [m] #}
{%- set leg_height = 0.24 -%} {# [m] #}
{%- set leg_offset_r = 0.05 -%} {# [m] #}
{%- set leg_radius = 0.012 -%} {# [m] #}
{%- set use_battery_mount = true -%} {# [bool] #}
{%- set root = "base_link" -%}
{%- set enable_motor_crash = true -%}
{% if disable_motor_crash %}
{%- set enable_motor_crash = false -%}
{% endif %}
{# <!--}--> #}
{# Motor constants {--> #}
{%- set rotor_velocity_slowdown_sim = 0.0159236 -%}
{%- set motor_constant = 23.0 -%} {# [kg.m/s^2] #}
{%- set moment_constant = 0.016 -%} {# [m] #}
{%- set time_constant_up = 1.0 / 80.0 -%} {# [s] #}
{%- set time_constant_down = 1.0 / 40.0 -%} {# [s] #}
{%- set max_rot_velocity = 1 -%} {# [rad/s] #}
{%- set rotor_drag_coefficient = 0.1 -%} {# orig 8.06428e-04 #}
{%- set rolling_moment_coefficient = "1.0e-6" -%}
{# <!--}--> #}
{# Inertia constants {--> #}
{%- set inertia_body_radius = 0.25 -%} {# [m] #}
{%- set inertia_body_height = 0.05 -%} {# [m] #}
{# <!--}--> #}
{# Meshes {--> #}
{# Drone parts {--> #}
{%- set top_board_mesh_file = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_top_board.dae" -%}
{%- set bottom_board_mesh_file = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_bottom_board.dae" -%}
{%- set arm_mesh_file_front = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_arm_black.dae" -%}
{%- set arm_mesh_file_back = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_arm_red.dae" -%}
{%- set leg_mesh_file = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_leg.dae" -%}
{%- set rotor_mesh_file_front = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_motor_black.dae" -%}
{%- set rotor_mesh_file_back = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_motor_orange.dae" -%}
{%- set prop_mesh_file = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_prop_low_poly.dae" -%}
{%- set pixhawk_mesh_file = "model://mrs_robots_description/meshes/sensors/pixhawk.dae" -%}
{%- set nuc_mesh_file = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_nuc.dae" -%}
{# <!--}--> #}
{# Holders {--> #}
{%- set battery_mount_mesh = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_battery_mount.dae" -%}
{%- set bluefox_garmin_mount_mesh = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_bluefox_garmin_mount.dae" -%}
{%- set ouster_mount_mesh = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_ouster_mount.dae" -%}
{%- set rplidar_mount_mesh = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_rplidar_mount.dae" -%}
{%- set realsense_front_mount_mesh = "model://mrs_robots_description/meshes/tarot/t650/tarot_t650_realsense_front_mount.dae" -%}
{# <!--}--> #}
{# Scales {--> #}
{%- set mesh_scale = "1 1 1" -%}
{%- set mesh_scale_prop_ccw = "1 1 1" -%}
{%- set mesh_scale_prop_cw = "-1 1 1" -%}
{%- set mesh_scale_milimeters = "0.001 0.001 0.001" -%}
{# <!--}--> #}
{# <!--}--> #}
{# Inertias {--> #}
{%- set body_ixx = mass * (3 * inertia_body_radius * inertia_body_radius + inertia_body_height * inertia_body_height) / 12 -%}
{%- set body_ixy = 0 -%}
{%- set body_ixz = 0 -%}
{%- set body_iyy = mass * (3 * inertia_body_radius * inertia_body_radius + inertia_body_height * inertia_body_height) / 12 -%}
{%- set body_iyz = 0 -%}
{%- set body_izz = (mass * inertia_body_radius * inertia_body_radius) / 2 -%}
{%- set prop_ixx = 0.0001 -%}
{%- set prop_ixy = 0 -%}
{%- set prop_ixz = 0 -%}
{%- set prop_iyy = 0.0001 -%}
{%- set prop_iyz = 0 -%}
{%- set prop_izz = 0.0001 -%}
{# <!--}--> #}
<model name="{{ name }}">
<!-- ================================================================== -->
<!-- || bare body definitions || -->
<!-- ================================================================== -->
<link name="{{ root }}">
<!-- Body physics {-->
{{ components.multirotor_physics_macro(
mass = mass,
body_radius = body_radius,
body_height = body_height,
rotor_velocity_slowdown_sim = rotor_velocity_slowdown_sim,
ixx = body_ixx,
ixy = body_ixy,
ixz = body_ixz,
iyy = body_iyy,
iyz = body_iyz,
izz = body_izz)
}}
<!--}-->
<!-- Body visuals {-->
<!-- Boards {-->
{{ components.visual_mesh_macro(
name = "bottom_board",
mesh_file = bottom_board_mesh_file,
mesh_scale = mesh_scale,
color = "DarkGrey",
x = 0,
y = 0,
z = -1.7*body_height,
roll = 0,
pitch = 0,
yaw = 0)
}}
{{ components.visual_mesh_macro(
name = "top_board",
mesh_file = top_board_mesh_file,
mesh_scale = mesh_scale,
color = "DarkGrey",
x = 0,
y = 0,
z = -1.7*body_height,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
<!-- Arms {-->
{{ components.visual_mesh_macro(
name = "front_right_arm",
mesh_file = arm_mesh_file_front,
mesh_scale = mesh_scale,
color = "DarkGrey",
x = 0,
y = 0,
z = -1.7*body_height,
roll = 0,
pitch = 0,
yaw = components.rad(-45))
}}
{{ components.visual_mesh_macro(
name = "back_right_arm",
mesh_file = arm_mesh_file_back,
mesh_scale = mesh_scale,
color = "DarkGrey",
x = 0,
y = 0,
z = -1.7*body_height,
roll = 0,
pitch = 0,
yaw = components.rad(-135))
}}
{{ components.visual_mesh_macro(
name = "front_left_arm",
mesh_file = arm_mesh_file_front,
mesh_scale = mesh_scale,
color = "DarkGrey",
x = 0,
y = 0,
z = -1.7*body_height,
roll = 0,
pitch = 0,
yaw = components.rad(45))
}}
{{ components.visual_mesh_macro(
name = "back_left_arm",
mesh_file = arm_mesh_file_back,
mesh_scale = mesh_scale,
color = "DarkGrey",
x = 0,
y = 0,
z = -1.7*body_height,
roll = 0,
pitch = 0,
yaw = components.rad(135))
}}
<!--}-->
<!-- intel nuc {-->
{{ components.visual_mesh_macro(
name = "NUC",
mesh_file = nuc_mesh_file,
mesh_scale = mesh_scale,
color = "DarkGrey",
x = 0.002,
y = 0,
z = -1.7*body_height,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
<!-- pixhawk {-->
{{ components.visual_mesh_macro(
name = "pixhawk",
mesh_file = pixhawk_mesh_file,
mesh_scale = mesh_scale,
color = "DarkGrey",
x = 0,
y = 0,
z = 0.021,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
<!-- legs {-->
{{ components.leg_macro(
name = "front_right_leg",
mesh_file = leg_mesh_file,
mesh_scale = mesh_scale,
color = "DarkGrey",
parent = root,
x = (arm_length - leg_offset_r) * components.sin45,
y = -(arm_length - leg_offset_r) * components.sin45,
z = -0.9*body_height,
roll = 0,
pitch = 0,
yaw = components.rad(-45),
collision_height = leg_height,
collision_radius = leg_radius)
}}
{{ components.leg_macro(
name = "front_left_leg",
mesh_file = leg_mesh_file,
mesh_scale = mesh_scale,
color = "DarkGrey",
parent = root,
x = (arm_length - leg_offset_r) * components.sin45,
y = (arm_length - leg_offset_r) * components.sin45,
z = -0.9*body_height,
roll = 0,
pitch = 0,
yaw = components.rad(45),
collision_height = leg_height,
collision_radius = leg_radius)
}}
{{ components.leg_macro(
name = "rear_left_leg",
mesh_file = leg_mesh_file,
mesh_scale = mesh_scale,
color = "Orange",
parent = root,
x = -(arm_length - leg_offset_r) * components.sin45,
y = (arm_length - leg_offset_r) * components.sin45,
z = -0.9*body_height,
roll = 0,
pitch = 0,
yaw = components.rad(135),
collision_height = leg_height,
collision_radius = leg_radius)
}}
{{ components.leg_macro(
name = "rear_right_leg",
mesh_file = leg_mesh_file,
mesh_scale = mesh_scale,
color = "Orange",
parent = root,
x = -(arm_length - leg_offset_r) * components.sin45,
y = -(arm_length - leg_offset_r) * components.sin45,
z = -0.9*body_height,
roll = 0,
pitch = 0,
yaw = components.rad(-135),
collision_height = leg_height,
collision_radius = leg_radius)
}}
<!--}-->
<!-- motors {-->
{{ components.visual_mesh_textured_macro(
name = "front_right_motor",
mesh_file = rotor_mesh_file_front,
mesh_scale = mesh_scale,
x = arm_length * components.sin45,
y = -arm_length * components.sin45,
z = -rotor_offset,
roll = 0,
pitch = 0,
yaw = 0)
}}
{{ components.visual_mesh_textured_macro(
name = "back_right_rotor",
mesh_file = rotor_mesh_file_back,
mesh_scale = mesh_scale,
x = -arm_length * components.sin45,
y = -arm_length * components.sin45,
z = -rotor_offset,
roll = 0,
pitch = 0,
yaw = 0)
}}
{{ components.visual_mesh_textured_macro(
name = "front_left_rotor",
mesh_file = rotor_mesh_file_front,
mesh_scale = mesh_scale,
x = arm_length * components.sin45,
y = arm_length * components.sin45,
z = -rotor_offset,
roll = 0,
pitch = 0,
yaw = 0)
}}
{{ components.visual_mesh_textured_macro(
name = "back_left_rotor",
mesh_file = rotor_mesh_file_back,
mesh_scale = mesh_scale,
x = -arm_length * components.sin45,
y = arm_length * components.sin45,
z = -rotor_offset,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% if use_battery_mount %}
<!-- battery mount and battery {-->
{{ components.visual_mesh_macro(
name = "battery_mount",
mesh_file = battery_mount_mesh,
mesh_scale = mesh_scale_milimeters,
color = "DarkGrey",
x = 0,
y = 0,
z = -0.24*body_height,
roll = 0,
pitch = 0,
yaw = 0)
}}
{{ components.visual_colored_box_macro(
name = "battery",
size_x = 0.16,
size_y = 0.065,
size_z = 0.044,
color = "Grey",
x = 0,
y = 0,
z = -0.45*body_height,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{% if enable_bluefox_camera or enable_bluefox_camera_reverse or enable_rangefinder or wall_challenge %}
<!-- Bluefox mount {-->
{{ components.visual_mesh_macro(
name = "bluefox_garmin_mount",
mesh_file = bluefox_garmin_mount_mesh,
mesh_scale = mesh_scale_milimeters,
color = "White",
x = 0,
y = -0.145,
z = -0.025,
roll = 0,
pitch = 0,
yaw = -components.rad90)
}}
<!--}-->
{% endif %}
{% if enable_rplidar or fire_challenge_blanket %}
<!-- RPLidar mount {-->
{{ components.visual_mesh_macro(
name = "rplidar_mount",
mesh_file = rplidar_mount_mesh,
mesh_scale = mesh_scale_milimeters,
color = "White",
x = 0,
y = 0.0,
z = 0.075,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{% if enable_realsense_front %}
<!-- Realsense mount {-->
{{ components.visual_mesh_macro(
name = "realsense_front_mount",
mesh_file = realsense_front_mount_mesh,
mesh_scale = mesh_scale_milimeters,
color = "White",
x = 0.125,
y = 0.0,
z = -0.046,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{% if enable_ouster or enable_velodyne %}
<!-- Ouster mount {-->
{{ components.visual_mesh_macro(
name = "ouster_mount",
mesh_file = ouster_mount_mesh,
mesh_scale = mesh_scale_milimeters,
color = "White",
x = 0.0,
y = 0.0,
z = 0.068,
roll = 0,
pitch = 0,
yaw = components.rad90)
}}
<!--}-->
{% endif %}
<!--}-->
</link>
<!-- Propellers {-->
{{ components.prop_macro(
direction = "ccw",
rotor_velocity_slowdown_sim = rotor_velocity_slowdown_sim,
motor_constant = motor_constant,
moment_constant = moment_constant,
parent = root,
mass = mass_prop,
radius = radius_rotor,
time_constant_up = time_constant_up,
time_constant_down = time_constant_down,
max_rot_velocity = max_rot_velocity,
motor_number = 0,
rotor_drag_coefficient = rotor_drag_coefficient,
rolling_moment_coefficient = rolling_moment_coefficient,
enable_motor_crash = enable_motor_crash,
color = "Black",
mesh_file = prop_mesh_file,
mesh_scale = mesh_scale_prop_ccw,
x = arm_length * components.sin45,
y = -arm_length * components.sin45,
z = propeller_offset,
roll = 0,
pitch = 0,
yaw = 0,
ixx = prop_ixx,
ixy = prop_ixy,
ixz = prop_ixz,
iyy = prop_iyy,
iyz = prop_iyz,
izz = prop_izz)
}}
{{ components.prop_macro(
direction = "ccw",
rotor_velocity_slowdown_sim = rotor_velocity_slowdown_sim,
motor_constant = motor_constant,
moment_constant = moment_constant,
parent = root,
mass = mass_prop,
radius = radius_rotor,
time_constant_up = time_constant_up,
time_constant_down = time_constant_down,
max_rot_velocity = max_rot_velocity,
motor_number = 1,
rotor_drag_coefficient = rotor_drag_coefficient,
rolling_moment_coefficient = rolling_moment_coefficient,
enable_motor_crash = enable_motor_crash,
color = "Black",
mesh_file = prop_mesh_file,
mesh_scale = mesh_scale_prop_ccw,
x = -arm_length * components.sin45,
y = arm_length * components.sin45,
z = propeller_offset,
roll = 0,
pitch = 0,
yaw = 0,
ixx = prop_ixx,
ixy = prop_ixy,
ixz = prop_ixz,
iyy = prop_iyy,
iyz = prop_iyz,
izz = prop_izz)
}}
{{ components.prop_macro(
direction = "cw",
rotor_velocity_slowdown_sim = rotor_velocity_slowdown_sim,
motor_constant = motor_constant,
moment_constant = moment_constant,
parent = root,
mass = mass_prop,
radius = radius_rotor,
time_constant_up = time_constant_up,
time_constant_down = time_constant_down,
max_rot_velocity = max_rot_velocity,
motor_number = 2,
rotor_drag_coefficient = rotor_drag_coefficient,
rolling_moment_coefficient = rolling_moment_coefficient,
enable_motor_crash = enable_motor_crash,
color = "Black",
mesh_file = prop_mesh_file,
mesh_scale = mesh_scale_prop_cw,
x = arm_length * components.sin45,
y = arm_length * components.sin45,
z = propeller_offset,
roll = 0,
pitch = 0,
yaw = 0,
ixx = prop_ixx,
ixy = prop_ixy,
ixz = prop_ixz,
iyy = prop_iyy,
iyz = prop_iyz,
izz = prop_izz)
}}
{{ components.prop_macro(
direction = "cw",
rotor_velocity_slowdown_sim = rotor_velocity_slowdown_sim,
motor_constant = motor_constant,
moment_constant = moment_constant,
parent = root,
mass = mass_prop,
radius = radius_rotor,
time_constant_up = time_constant_up,
time_constant_down = time_constant_down,
max_rot_velocity = max_rot_velocity,
motor_number = 3,
rotor_drag_coefficient = rotor_drag_coefficient,
rolling_moment_coefficient = rolling_moment_coefficient,
enable_motor_crash = enable_motor_crash,
color = "Black",
mesh_file = prop_mesh_file,
mesh_scale = mesh_scale_prop_cw,
x = -arm_length * components.sin45,
y = -arm_length * components.sin45,
z = propeller_offset,
roll = 0,
pitch = 0,
yaw = 0,
ixx = prop_ixx,
ixy = prop_ixy,
ixz = prop_ixz,
iyy = prop_iyy,
iyz = prop_iyz,
izz = prop_izz)
}}
<!--}-->
<!-- ================================================================== -->
<!-- || compulsory sensor definitions || -->
<!-- ================================================================== -->
<!-- Mavlink interface {-->
{{ components.mavlink_interface_macro(
mavlink_addr = mavlink_addr,
mavlink_udp_port = mavlink_udp_port,
mavlink_tcp_port = mavlink_tcp_port,
serial_enabled = serial_enabled,
serial_device = serial_device,
baudrate = serial_baudrate,
qgc_addr = qgc_addr,
qgc_udp_port = qgc_udp_port,
sdk_addr = sdk_addr,
sdk_udp_port =sdk_udp_port,
hil_mode = hil_mode,
hil_state_level = hil_state_level,
send_vision_estimation = send_vision_estimation,
send_odometry = send_odometry,
enable_lockstep = use_lockstep,
use_tcp = use_tcp)
}}
<!--}-->
<!-- GPS {-->
{{ components.gps_macro(
gps_name = "gps0",
parent_link = root,
update_rate = 10,
gps_noise = true,
gps_xy_random_walk = 2.0,
gps_z_random_walk = 4.0,
gps_xy_noise_density = "2.0e-4",
gps_z_noise_density = "4.0e-4",
gps_vxy_noise_density = 0.2,
gps_vz_noise_density = 0.4,
x = 0,
y = 0,
z = 0,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
<!-- Magnetometer {-->
{{ components.magnetometer_plugin_macro(
pub_rate = 100,
noise_density = 0.0004,
random_walk = 0.0000064,
bias_correlation_time = 600,
mag_topic = "/mag")
}}
<!--}-->
<!-- GPS groundtruth {-->
{{ components.gps_groundtruth_plugin_macro(
home_latitude = 0,
home_longitude = 0,
home_altitude = 0)
}}
<!--}-->
<!-- Barometer {-->
{{ components.barometer_plugin_macro(
baro_topic = "/baro",
pub_rate = 50,
baro_drift_pa_per_sec = 0)
}}
<!--}-->
<!-- IMU {-->
{{ components.imu_plugin_macro(
imu_name = "imu",
parent_link = root,
imu_topic = "/imu",
gyroscope_noise_density = 0.00018665,
gyroscope_random_walk = 0.000038785,
gyroscope_bias_correlation_time = 1000.0,
gyroscope_turn_on_bias_sigma = 0.0087,
accelerometer_noise_density = 0.00186,
accelerometer_random_walk = 0.006,
accelerometer_bias_correlation_time = 300.0,
accelerometer_turn_on_bias_sigma = 0.1960,
x = 0,
y = 0,
z = 0,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
<!-- ================================================================== -->
<!-- || optional sensor definitions || -->
<!-- ================================================================== -->
{# Ground truth {--> #}
{% if enable_ground_truth %}
<!-- Ground truth {-->
{{ components.odometry_plugin_macro(
odometry_sensor_name = "ground_truth",
parent_link = root,
topic_name = "ground_truth",
noise = "0",
frame_name = "world",
frame_rate = "150",
x = 0,
y = 0,
z = 0,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{# <!--}--> #}
<!-- ======================= rangefinder sensors ======================-->
{# Garmin {--> #}
{% if enable_rangefinder %}
<!-- Garmin {-->
{# {{ components.garmin_macro("lidar0", root, -0.077, 0, -0.069, 0, components.rad(90), 0) }} - uncomment when simulation will work with pixgarm #}
{{ components.external_garmin_macro(
namespace = namespace,
parent_link = root,
orientation = "",
x = 0.0,
y = -0.221,
z = -0.035,
roll = 0,
pitch = components.rad(90),
yaw = components.rad(90))
}}
<!--}-->
{% endif %}
{# <!--}--> #}
{# Garmin Up {--> #}
{% if enable_rangefinder_up %}
<!-- Garmin Up {-->
{{ components.external_garmin_macro(
namespace = namespace,
parent_link = root,
orientation = "_up",
x = 0.0,
y = 0.08,
z = -0.0075,
roll = 0,
pitch = components.rad(-90),
yaw = components.rad(-90))
}}
<!--}-->
{% endif %}
{# <!--}--> #}
<!-- ========================== LIDAR sensors ========================= -->
{# Scanse Sweep {--> #}
{% if enable_scanse_sweep %}
<!-- Scanse Sweep {-->
{{ components.scanse_sweep_macro(
namespace = namespace,
parent_link = root,
x = 0.0,
y = 0.0,
z = 0.12,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{# <!--}--> #}
{# Rplidar {--> #}
{% if enable_rplidar %}
<!-- Rplidar {-->
{{ components.rplidar_macro(
namespace = namespace,
parent_link = root,
x = 0.0,
y = 0.0,
z = 0.107,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{# <!--}--> #}
{# Velodyne {--> #}
{% if enable_velodyne %}
<!-- Velodyne {-->
<!-- VLP-16 (default) -->
{{ components.velodyne_macro(
namespace = namespace,
parent_link = root,
sensor_name = "velodyne",
rot_freq = 20,
lasers = 16,
vfov_angle = 30,
max_range = 100,
noise = 0.01,
enable_gpu_ray = use_gpu_ray,
x = 0.0,
y = 0.0,
z = 0.073,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{# <!--}--> #}
{# Ouster {--> #}
{% if enable_ouster %}
<!-- Ouster {-->
{{ components.ouster_macro(
namespace = namespace,
parent_link = root,
sensor_name = "os",
ouster_model = ouster_model,
rot_freq = 10,
noise = 0.03,
enable_gpu_ray = use_gpu_ray,
x = 0.0,
y = 0.0,
z = 0.073,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{# <!--}--> #}
<!-- ========================= camera sensors ========================= -->
<!-- Bluefox camera placements{-->
{% if enable_bluefox_camera_reverse %}
<!-- bluefox reverse {-->
{{ components.bluefox_camera_macro(
namespace = namespace,
camera_name = "bluefox_optflow",
parent_link = root,
frame_rate = 100.0,
hfov = 2.1,
noise = 0.007,
x = 0.0,
y = -0.15,
z = -0.057,
roll = 0,
pitch = components.rad90,
yaw = components.rad180)
}}
<!--}-->
{% endif %}
{% if enable_bluefox_camera %}
<!-- bluefox classic {-->
{{ components.bluefox_camera_macro(
namespace = namespace,
camera_name = "bluefox_optflow",
parent_link = root,
frame_rate = 100.0,
hfov = 2.1,
noise = 0.007,
x = 0.0,
y = -0.15,
z = -0.057,
roll = 0,
pitch = components.rad90,
yaw = 0)
}}
<!--}-->
{% endif %}
<!--}-->
<!-- Realsense placements {-->
{% if enable_realsense_front %}
<!-- realsense front {-->
{{ components.realsense_macro(
namespace = namespace,
camera_name = "rgbd",
camera_suffix="",
parent_link = root,
enable_realistic_realsense = enable_realistic_realsense,
x = 0.17,
y = -0.011,
z = -0.063,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
{% if enable_realsense_up %}
<!-- realsense up {-->
{{ components.realsense_macro(
namespace = namespace,
camera_name = "rgbd",
camera_suffix="_up",
parent_link = root,
enable_realistic_realsense = enable_realistic_realsense,
x = 0.08,
y = 0,
z = 0.03,
roll = 0,
pitch = - components.rad90,
yaw = 0)
}}
<!--}-->
{% endif %}
{% if enable_realsense_down %}
<!-- realsense down {-->
{{ components.realsense_macro(
namespace = namespace,
camera_name = "rgbd",
camera_suffix="_down",
parent_link = root,
enable_realistic_realsense = enable_realistic_realsense,
x = 0.1,
y = 0,
z = -0.05,
roll = 0,
pitch = components.rad90,
yaw = 0)
}}
<!--}-->
{% endif %}
<!--}-->
<!-- Mobius placements {-->
{% if enable_mobius_camera_front %}
<!-- mobius front {-->
{{ components.mobius_camera_macro(
namespace = namespace,
camera_name = "mobius_front",
parent_link = root,
frame_rate = 30.0,
x = 0.2,
y = 0.0,
z = -0.04,
roll = 0,
pitch = 0,
yaw = 0)
}}
<!--}-->
{% endif %}
<!--} -->
{# Thermal cameras {--> #}
{% if enable_thermal_camera %}
<!-- Three thermal cameras {-->
{{ components.thermal_camera_macro(
camera_name = "thermal_top",
camera_topic_name = "/" + namespace + "/thermal/top",
parent_frame_name = namespace + "/fcu",
camera_frame_name = "thermal/top_optical",
sensor_base_frame_name = namespace + "/thermal/top",
parent_link = root,
frame_rate = 14.0,
hfov = 0.575959,
image_width = 32,
image_height = 32,
x = 0.15,
y = 0.06,
z = -0.025,
roll = 0,
pitch = components.rad(-30),
yaw = 0)
}}
{{ components.thermal_camera_macro(
camera_name = "thermal_middle",
camera_topic_name = "/" + namespace + "/thermal/middle",
parent_frame_name = namespace + "/fcu",
camera_frame_name = "thermal/middle_optical",
sensor_base_frame_name = namespace + "/thermal/middle",
parent_link = root,
frame_rate = 14.0,
hfov = 0.575959,
image_width = 32,
image_height = 32,
x = 0.16,
y = 0.06,
z = -0.055,
roll = 0,
pitch = 0,
yaw = 0)
}}
{{ components.thermal_camera_macro(
camera_name = "thermal_bottom",
camera_topic_name = "/" + namespace + "/thermal/bottom",
parent_frame_name = namespace + "/fcu",
camera_frame_name = "thermal/bottom_optical",
sensor_base_frame_name = namespace + "/thermal/bottom",
parent_link = root,
frame_rate = 14.0,
hfov = 0.575959,
image_width = 32,
image_height = 32,
x = 0.15,
y = 0.06,
z = -0.085,
roll = 0,
pitch = components.rad(30),