前置条件
- 在Ubuntu中已经安装了ROS2(这里安装的是rolling)
- 已经具备在Gazebo中创建机器人模型的能力
创建仓储机器人
生成model.config
为model建立一个文件夹
mkdir -p ~/.gazebo/models/mobile_warehouse_robot
生成并编辑model.config文件
gedit ~/.gazebo/models/mobile_warehouse_robot/model.config
写入以下内容
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15<?xml version="1.0"?>
<model>
<name>Mobile Warehouse Robot</name>
<version>1.0</version>
<sdf version='1.4'>model.sdf</sdf>
<author>
<name>mwf</name>
<email>figoowen2003@126.com</email>
</author>
<description>
A basic differential drive mobile warehouse robot
</description>
</model>
下载Mesh文件
Mesh文件让机器人看起来更加的真实
添加Mesh文件的具体教程,参考http://gazebosim.org/tutorials/?tut=attach_meshes
所有的仓储机器人mesh文件都位于http://models.gazebosim.org/
下载步骤:
cd ~/.gazebo/models
```
wget -q -R index.html,*.tar.gz –no-parent -r -x -nH http://models.gazebosim.org/warehouse_robot/1
2
3
4
5
6
7
8
9
该网址的页面显示如下

- 下载文件[Hokuyo Laser Range Finder](https://www.hokuyo-aut.jp/) [mesh file](http://models.gazebosim.org/hokuyo/)
`cd ~/.gazebo/models`wget -q -R index.html,*.tar.gz –no-parent -r -x -nH http://models.gazebosim.org/hokuyo/
1
2
3
4
5
6
7
8
9
10
11
12
13
该网址的页面显示如下

## 创建model.sdf
- sdf: [Simulation Description Format](http://sdformat.org/)这个文件包含了创建一个mobile_warehouse_robot模型所需要的标签
- 步骤:
- ```
gedit ~/.gazebo/models/mobile_warehouse_robot/model.sdf写入以下内容
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<?xml version='1.0'?>
<!--
Gazebo ROS differential drive plugin
Try sending commands:
ros2 topic pub /demo/cmd_vel geometry_msgs/Twist '{linear: {x: 0.05}}' -1
ros2 topic pub /demo/cmd_vel geometry_msgs/Twist '{angular: {z: 0.1}}' -1
Try listening to odometry:
ros2 topic echo /demo/odom
Try listening to TF:
ros2 run tf2_ros tf2_echo odom chassis
ros2 run tf2_ros tf2_echo chassis right_wheel
ros2 run tf2_ros tf2_echo chassis left_wheel
-->
<sdf version='1.4'>
<model name="mobile_warehouse_robot">
<!-- If true, physics engine will ignore -->
<static>false</static>
<!-- Add the rectangular base of the robot -->
<link name='chassis'>
<!--Position of the center will be: -->
<!--x=0 meters, y=0 meters, z=0.1 meters-->
<!--Orientation of the center will be: -->
<!--Roll=0 rad, Pitch=0 rad, Yaw=0 rad -->
<pose>0 0 .04 0 0 0</pose>
<!-- Specify the shape for collisions -->
<collision name='collision'>
<geometry>
<box>
<!-- Box is 0.4 meters in length -->
<!-- 0.2 meters in width -->
<!-- 0.1 meters in height -->
<size>.4 .2 .1</size>
</box>
</geometry>
</collision>
<!-- Specify the shape for visualization -->
<visual name='visual'>
<pose> 0 0 0.02 0 0 0 </pose>
<geometry>
<mesh>
<uri>model://warehouse_robot/meshes/robot.dae</uri>
<scale>0.9 0.5 0.5 </scale>
</mesh>
</geometry>
</visual>
<!-- Add a caster wheel -->
<collision name='caster_collision'>
<pose>-0.19 0 0 0 0 0</pose>
<geometry>
<sphere>
<radius>.06</radius>
</sphere>
</geometry>
<surface>
<friction>
<ode>
<!-- Coefficients of friction -->
<mu>0</mu>
<mu2>0</mu2>
<!-- Force dependent slip -->
<slip1>1.0</slip1>
<slip2>1.0</slip2>
</ode>
</friction>
</surface>
</collision>
<visual name='caster_visual'>
<pose>-0.19 0 0 0 0 0</pose>
<geometry>
<sphere>
<radius>.06</radius>
</sphere>
</geometry>
</visual>
</link>
<!-- Add the left wheel -->
<link name="left_wheel">
<pose>0.12 0.19 0.1 0 1.5707 1.5707</pose>
<collision name="collision">
<geometry>
<cylinder>
<radius>.12</radius>
<length>.08</length>
</cylinder>
</geometry>
</collision>
<visual name="visual">
<geometry>
<cylinder>
<radius>.12</radius>
<length>.08</length>
</cylinder>
</geometry>
</visual>
</link>
<!-- Add the right wheel -->
<link name="right_wheel">
<pose>0.12 -0.19 0.1 0 1.5707 1.5707</pose>
<collision name="collision">
<geometry>
<cylinder>
<radius>.12</radius>
<length>.08</length>
</cylinder>
</geometry>
</collision>
<visual name="visual">
<geometry>
<cylinder>
<radius>.12</radius>
<length>.08</length>
</cylinder>
</geometry>
</visual>
</link>
<!-- Add the laser range finder -->
<link name="laser_link">
<inertial>
<!-- Mass of the laser range finder in kg -->
<mass>0.1</mass>
</inertial>
<!-- Position is towards the front of the robot -->
<!-- Laser finder is mounted on top -->
<pose>0.15 0 0.30 0 0 0</pose>
<!-- Add a mesh to make it more visually appealing -->
<visual name="visual">
<geometry>
<mesh>
<uri>model://hokuyo/meshes/hokuyo.dae</uri>
</mesh>
</geometry>
</visual>
<!-- Collision properties of the base of the laser range finder-->
<collision name="collision-base">
<pose>0 0 -0.0145 0 0 0</pose>
<geometry>
<box>
<size>0.05 0.05 0.041</size>
</box>
</geometry>
</collision>
<!-- Collision properties of the top of the laser range finder-->
<collision name="collision-top">
<pose>0 0 0.0205 0 0 0</pose>
<geometry>
<cylinder>
<radius>0.021</radius>
<length>0.029</length>
</cylinder>
</geometry>
</collision>
<!-- Describes the type and properties of the sensor -->
<sensor name="laser" type="ray">
<pose>0.01 0 0.0175 0 -0 0</pose>
<ray>
<scan>
<horizontal>
<samples>181</samples>
<resolution>1</resolution>
<min_angle>-1.57080</min_angle>
<max_angle>1.57080</max_angle>
</horizontal>
</scan>
<range>
<min>0.08</min>
<max>10</max>
<resolution>0.05</resolution>
</range>
</ray>
<always_on>1</always_on>
<update_rate>10</update_rate>
<visualize>true</visualize>
<plugin name='laser' filename='libgazebo_ros_ray_sensor.so'>
<ros>
<namespace>/demo</namespace>
<argument>--ros-args --remap ~/out:=scan</argument>
</ros>
<output_type>sensor_msgs/LaserScan</output_type>
</plugin>
</sensor>
</link>
<!-- Add motor for the left wheel -->
<joint type="revolute" name="left_wheel_hinge">
<pose>0 0 -0.03 0 0 0</pose>
<child>left_wheel</child>
<parent>chassis</parent>
<axis>
<xyz>0 1 0</xyz>
</axis>
</joint>
<!-- Add motor for the right wheel -->
<joint type="revolute" name="right_wheel_hinge">
<pose>0 0 0.03 0 0 0</pose>
<child>right_wheel</child>
<parent>chassis</parent>
<axis>
<xyz>0 1 0</xyz>
</axis>
</joint>
<!-- Connect laser range finder to the robot's body -->
<joint type="fixed" name="laser_joint">
<child>laser_link</child>
<parent>chassis</parent>
</joint>
<!-- Controls the differential drive robot -->
<plugin name='diff_drive' filename='libgazebo_ros_diff_drive.so'>
<ros>
<namespace>/demo</namespace>
<remapping>cmd_vel:=cmd_vel</remapping>
<remapping>odom:=odom</remapping>
</ros>
<!-- wheels -->
<left_joint>left_wheel_hinge</left_joint>
<right_joint>right_wheel_hinge</right_joint>
<!-- kinematics -->
<wheel_separation>0.26</wheel_separation>
<wheel_diameter>0.2</wheel_diameter>
<!-- limits -->
<max_wheel_torque>20</max_wheel_torque>
<max_wheel_acceleration>1.0</max_wheel_acceleration>
<!-- output -->
<publish_odom>true</publish_odom>
<publish_odom_tf>true</publish_odom_tf>
<publish_wheel_tf>true</publish_wheel_tf>
<odometry_frame>odom</odometry_frame>
<robot_base_frame>chassis</robot_base_frame>
</plugin>
</model>
</sdf>
测试一下你的robot
运行Gazebo
gazebo
在Gazebo界面的左侧,点击“Insert”的tab页,然后在左侧的列表中,单机”Mobile Warehouse Robot”
集成ROS2和Gazebo
安装gazebo_ros_pkgs
打开一个新的terminal,安装该pkg
我们需要安装完整的包,其中的差速插件(differential drive plugin)能让我们通过ROS2命令控制机器人的速度(此处选择了foxy版对应的pkg,尽量选择最新的版本)
sudo apt install ros-foxy-gazebo-ros-pkgs
测试ROS2和Gazebo的交互
打开一个新的terminal,安装一些额外的工具
sudo apt install ros-foxy-ros-core ros-foxy-geometry2
打开一个 新的terminal,加载一个demo robot
gazebo --verbose /opt/ros/foxy/share/gazebo_plugins/worlds/gazebo_ros_diff_drive_demo.world
在这个world文件中,提供了一些命令,来控制这个demo robot,如下
打开一个新的terminal,输入以下命令
ros2 topic pub /demo/cmd_demo geometry_msgs/Twist '{linear: {x: 1.0}}' -1
机器人将向前方运动
现在,CTRL + C关闭已经打开的Gazebo窗口,重新启动Gazebo
gazebo
加载之前创建的“Mobile Warehouse Robot”模型,在terminal窗口中,会显示以下信息
新开一个terminal,查看当前所有的topic
ros2 topic list -t
输入以下命令(/demo/cmd_vel是设置机器人速度的topic)
ros2 topic pub /demo/cmd_vel geometry_msgs/Twist '{linear: {x: 0.05}}' -1
建立仓库模型
创建model.config文件
新建文件夹
mkdir -p ~/.gazebo/models/small_warehouse
新建config 文件,写入以下的内容
gedit ~/.gazebo/models/small_warehouse/model.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15<?xml version="1.0"?>
<model>
<name>Small Warehouse</name>
<version>1.0</version>
<sdf version='1.4'>model.sdf</sdf>
<author>
<name>Automatic Addison</name>
<email>automaticaddison@todo.todo</email>
</author>
<description>
A small warehouse.
</description>
</model>
创建model.sdf文件
新建model.sdf文件,并写入以下内容
gedit ~/.gazebo/models/small_warehouse/model.sdf
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166<?xml version='1.0'?>
<sdf version='1.5'>
<model name='small_warehouse'>
<link name='Wall_10'>
<pose frame=''>-2.02568 2.92333 0 0 -0 3.14159</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_10_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>1.8711 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_10_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>1.8711 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_11'>
<pose frame=''>-2.887 0.69235 0 0 0 -1.5708</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_11_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>4.62378 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_11_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>4.62378 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_11_clone'>
<pose frame=''>-4.44208 0.738947 0 0 0 -1.5708</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='ModelPreview_2::Wall_11_clone::Wall_11_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>7.42809 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_11_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>7.42809 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_14'>
<pose frame=''>-0.409926 -1.55115 0 0 -0 3.14159</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_14_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>2.36648 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_14_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>2.36648 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_15'>
<pose frame=''>-1.53187 -0.513425 0 0 -0 1.5708</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_15_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>2.06622 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_15_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>2.06622 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_19'>
<pose frame=''>0.837565 0.010614 0 0 -0 3.14159</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_19_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>1.32777 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_19_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>1.32777 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_20'>
<pose frame=''>-0.484506 1.39698 0 0 -0 2.02352</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_20_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>3.22686 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_20_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>3.22686 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_24'>
<pose frame=''>1.8412 2.79579 0 0 0 -0.948986</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_24_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>3.76645 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_24_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>3.76645 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_24_clone'>
<pose frame=''>-1.0172 -1.00075 0 0 0 -0.803995</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='ModelPreview_2::Wall_24_clone::Wall_24_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>1.5 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_24_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>1.5 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_6'>
<pose frame=''>-0.787021 -2.89307 0 0 -0 0</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_6_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>7.34986 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_6_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>7.34986 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_6_clone'>
<pose frame=''>-0.718431 4.37517 0 0 -0 0</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='ModelPreview_2::Wall_6_clone::Wall_6_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>7.41907 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_6_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>7.41907 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='Wall_7'>
<pose frame=''>2.90228 0.736783 0 0 -0 1.5708</pose>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<visual name='Wall_7_Visual'>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>7.42238 0.15 1</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='Wall_7_Collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0.5 0 -0 0</pose>
<geometry>
<box>
<size>7.42238 0.15 1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='link_1'>
<pose frame=''>1 -1.44562 0.5 0 -0 0</pose>
<visual name='visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1</length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1</length>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='link_2'>
<pose frame=''>0.498835 4 0.5 0 -0 0</pose>
<visual name='visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1</length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1</length>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='link_3'>
<pose frame=''>0 1.56543 0.5 0 -0 0</pose>
<visual name='visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1</length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1</length>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<link name='link_4'>
<pose frame=''>2.54621 1.57728 0.5 0 -0 0</pose>
<visual name='visual'>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1</length>
</cylinder>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
<ambient>1 0.764706 0.305882 1</ambient>
<diffuse>0.7 0.7 0.7 1</diffuse>
<specular>0.01 0.01 0.01 1</specular>
<emissive>0 0 0 1</emissive>
<shader type='pixel'/>
</material>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
<cast_shadows>1</cast_shadows>
<transparency>0</transparency>
</visual>
<collision name='collision'>
<laser_retro>0</laser_retro>
<max_contacts>10</max_contacts>
<pose frame=''>0 0 0 0 -0 0</pose>
<geometry>
<cylinder>
<radius>0.5</radius>
<length>1</length>
</cylinder>
</geometry>
<surface>
<friction>
<ode>
<mu>1</mu>
<mu2>1</mu2>
<fdir1>0 0 0</fdir1>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0</restitution_coefficient>
<threshold>1e+06</threshold>
</bounce>
<contact>
<collide_without_contact>0</collide_without_contact>
<collide_without_contact_bitmask>1</collide_without_contact_bitmask>
<collide_bitmask>1</collide_bitmask>
<ode>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
<max_vel>0.01</max_vel>
<min_depth>0</min_depth>
</ode>
<bullet>
<split_impulse>1</split_impulse>
<split_impulse_penetration_threshold>-0.01</split_impulse_penetration_threshold>
<soft_cfm>0</soft_cfm>
<soft_erp>0.2</soft_erp>
<kp>1e+13</kp>
<kd>1</kd>
</bullet>
</contact>
</surface>
</collision>
</link>
<static>1</static>
<allow_auto_disable>1</allow_auto_disable>
</model>
</sdf>
测试仓库模型
打开terminal,输入gazebo
在“insert”标签下,点击“Small Warehouse”
使用ROS2启动机器人和仓库(python版)
创建package
打开一个新的terminal,新建workspace(以dev_ws为例)
mkdir -p ~/dev_ws/src
cd ~/dev_ws/src
创建名为warehouse_robot_spawner_pkg的功能包
ros2 pkg create --build-type ament_python warehouse_robot_spawner_pkg
package的初始设置
查看功能包目录中的内容
cd ~/dev_ws/src/warehouse_robot_spawner_pkg
dir
编辑package.xml文件,写入以下内容
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>warehouse_robot_spawner_pkg</name>
<version>0.0.0</version>
<description>how to spawn a mobile robot in warehouse</description>
<maintainer email="figoowen2003@126.com">ubuntu-ros</maintainer>
<license>Apache License 2.0</license>
<test_depend>ament_copyright</test_depend>
<test_depend>ament_flake8</test_depend>
<test_depend>ament_pep257</test_depend>
<test_depend>python3-pytest</test_depend>
<export>
<build_type>ament_python</build_type>
</export>
</package>编辑setup.py文件,写入以下内容
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
46import os # Operating system library
from glob import glob # Handles file path names
from setuptools import setup # Facilitates the building of packages
package_name = 'warehouse_robot_spawner_pkg'
# Path of the current directory
cur_directory_path = os.path.abspath(os.path.dirname(__file__))
setup(
name=package_name,
version='0.0.0',
packages=[package_name],
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
# Path to the launch file
(os.path.join('share', package_name,'launch'), glob('launch/*.launch.py')),
# Path to the world file
(os.path.join('share', package_name,'worlds/'), glob('./worlds/*')),
# Path to the warehouse sdf file
(os.path.join('share', package_name,'models/small_warehouse/'), glob('./models/small_warehouse/*')),
# Path to the mobile robot sdf file
(os.path.join('share', package_name,'models/mobile_warehouse_robot/'), glob('./models/mobile_warehouse_robot/*')),
# Path to the world file (i.e. warehouse + global environment)
(os.path.join('share', package_name,'models/'), glob('./worlds/*')),
],
install_requires=['setuptools'],
zip_safe=True,
maintainer='focalfossa',
maintainer_email='focalfossa@todo.todo',
description='TODO: Package description',
license='TODO: License declaration',
tests_require=['pytest'],
entry_points={
'console_scripts': [
'spawn_demo = warehouse_robot_spawner_pkg.spawn_demo:main'
],
},
)从~/.gazebo/models/路径下拷贝机器人模型和仓库模型
cd ~/.gazebo/models
cp -r mobile_warehouse_robot ~/dev_ws/src/warehouse_robot_spawner_pkg/models
cp -r small_warehouse ~/dev_ws/src/warehouse_robot_spawner_pkg/models
同时拷贝下载的meshes文件
cp -r hokuyo ~/dev_ws/src/warehouse_robot_spawner_pkg/models
cp -r warehouse_robot ~/dev_ws/src/warehouse_robot_spawner_pkg/models
检查以下所有的model都拷贝成功
cd ~/dev_ws/src/warehouse_robot_spawner_pkg/models
dir
创建后缀名为world的sdf文件
mkdir ~/dev_ws/src/warehouse_robot_spawner_pkg/worlds
cd ~/dev_ws/src/warehouse_robot_spawner_pkg/worlds
gedit warehouse.world
写入以下内容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<sdf version='1.4'>
<world name='default'>
<light name='sun' type='directional'>
<cast_shadows>1</cast_shadows>
<pose>0 0 10 0 -0 0</pose>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<attenuation>
<range>1000</range>
<constant>0.9</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
<direction>0.5 0.1 -0.9</direction>
</light>
<model name='ground_plane'>
<static>1</static>
<link name='link'>
<collision name='collision'>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<surface>
<friction>
<ode>
<mu>100</mu>
<mu2>50</mu2>
</ode>
</friction>
<bounce/>
<contact>
<ode/>
</contact>
</surface>
<max_contacts>10</max_contacts>
</collision>
<visual name='visual'>
<cast_shadows>0</cast_shadows>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
<velocity_decay>
<linear>0</linear>
<angular>0</angular>
</velocity_decay>
<self_collide>0</self_collide>
<kinematic>0</kinematic>
<gravity>1</gravity>
</link>
</model>
<scene>
<ambient>0.4 0.4 0.4 1</ambient>
<background>0.7 0.7 0.7 1</background>
<shadows>0</shadows>
</scene>
<physics type='ode'>
<max_step_size>0.01</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>0</real_time_update_rate>
<gravity>0 0 -9.8</gravity>
</physics>
<state world_name='default'>
<sim_time>0 0</sim_time>
<real_time>0 44986</real_time>
<wall_time>1377677575 940727583</wall_time>
</state>
<gui fullscreen='0'>
<camera name='user_camera'>
<pose>2.6 -1.69 12.2 0 1.56 3.14</pose>
<view_controller>orbit</view_controller>
</camera>
</gui>
<!-- A simple warehouse -->
<include>
<uri>model://small_warehouse</uri>
<pose>2.4 -2.1 0 0 0 0</pose>
</include>
<!-- mobile_warehouse_robot
<include>
<pose>0 0 0.33 0 0 0</pose>
<uri>model://mobile_warehouse_robot</uri>
</include> -->
</world>
</sdf>
创建一个世界孵化器的节点(Node)
cd ~/dev_ws/src/warehouse_robot_spawner_pkg/warehouse_robot_spawner_pkg/
新建名为spawn_demo.py的文件
gedit spawn_demo.py
写入以下内容
1 | """ |
创建launch文件
mkdir ~/dev_ws/src/warehouse_robot_spawner_pkg/launch/
cd ~/dev_ws/src/warehouse_robot_spawner_pkg/launch/
新建名为gazebo_world.launch.py的文件,写入以下内容
1 | # Copyright 2019 Open Source Robotics Foundation, Inc. |
编译功能包
cd ~/dev_ws/
安装setuptools
sudo pip3 install setuptools
编译
colcon build --packages-select warehouse_robot_spawner_pkg
启动
cd ~/dev_ws
ros2 launch warehouse_robot_spawner_pkg gazebo_world.launch.py
查看当前的topic
ros2 topic list -t
让机器人在仓库中运动起来(Python版)
创建运动和控制的功能包
cd ~/dev_ws/src
ros2 pkg create --build-type ament_python warehouse_robot_controller_pkg
功能包的基本配置
cd ~/dev_ws/src/warehouse_robot_controller_pkg
gedit package.xml
写入以下内容
1 | <?xml version="1.0"?> |
gedit setup.py
写入以下内容
1 | import os # Operating system library |
创建名为Estimator的节点(node)
cd ~/dev_ws/src/warehouse_robot_controller_pkg/warehouse_robot_controller_pkg/
gedit robot_estimator.py
写入以下内容
1 | # Author: Addison Sears-Collins |
创建名为Controller的节点
gedit robot_controller.py
写入以下内容
1 | # Author: Addison Sears-Collins |
创建launch文件
mkdir ~/dev_ws/src/warehouse_robot_controller_pkg/launch/
cd ~/dev_ws/src/warehouse_robot_controller_pkg/launch/
新建名为controller_estimator.launch.py的文件
gedit controller_estimator.launch.py
写入以下内容
1 | import os |
编译功能包
cd ~/dev_ws/
colcon build --packages-select warehouse_robot_controller_pkg
运行
新开一个terminal,依次输入以下命令,启动world孵化器
cd ~/dev_ws/
ros2 launch warehouse_robot_spawner_pkg gazebo_world.launch.py
再打开一个terminal,启动控制器
cd ~/dev_ws/
ros2 launch warehouse_robot_controller_pkg controller_estimator.launch.py
实际运行效果如下
查看topic
ros2 topic list -t
手动控制机器人(Python版)
安装turtlebot3功能包(目前是foxy版)
sudo apt install ros-foxy-turtlebot3*
详细信息,参考链接https://navigation.ros.org/getting_started/index.html
新开一个terminal,启动spawner
ros2 launch warehouse_robot_spawner_pkg gazebo_world.launch.py
再开一个terminal,输入remap操作,将键盘命令从发往/cmd_vel变更为发往/demo/cmd_vel
export TURTLEBOT3_MODEL=burger
ros2 run turtlebot3_teleop teleop_keyboard --ros-args --remap /cmd_vel:=/demo/cmd_vel