当前位置:   article > 正文

ORB_SLAM3配置及修改——将图像、点云用ROS消息发布(基于无人机仿真)_orb-slam3的点云

orb-slam3的点云

        本文有点长,可以根据目录跳转到想看的部分。因为仿真和应用环境不同,可能例程的运行方式(输入话题等)有所不同,但第三部分有关ORB_SLAM3相机仿真标定、第四部分有关ORB_SLAM3源码修改的部分是通用的。

目录

一、仿真环境配置

1.双系统安装

① 工具准备

② 启动盘制作

    i. 格式化U盘

    ii. 制作启动盘

③ 系统安装

2. XTDrone仿真系统安装

二、ORB_SLAM3源码下载及编译

1. 源码下载

2. 编译

① ORB_SLAM3编译

② ROS例程编译

3. 测试

① realsense2安装

② realsense_ros安装

③ 重新编译ORB_SLAM3

④ 运行例程

三、ROS例程的运行与修改

1. 相机标定

① 制作标定世界

②制作launch文件

③ 运行世界并完成标定

    i. 启动Gazebo仿真

    ii. 启动XTDrone无人机控制模块

    iii. 启动标定节点完成标定

    iv.标定数据转换为orb_slam3的相机标定数据

2. 修改源码

3. 运行ROS例程

四、修改ORB_SLAM3源码实现点云、图像的ROS消息输出

1. 源码分析

① 初始化过程

② 显示输出过程

③ 应用方法

2. 利用pcl与ros实现点云转存与ROS消息发布

① 改写ORB_SLAM3

    i.修改MapDrawer.cc

        a.添加PCL头文件

        b.修改函数void MapDrawer::DrawMapPoints()

        c.修改函数申明

    ii.修改Viewer.cc

        a.添加PCL头文件,引用外部定义的全局变量

        b.修改 void Viewer::Run() 函数

    iii.修改system.h

        a.添加PCL头文件

         b.定义一个结构体变量,包含点云、图像、追踪信息

         c.申明新定义的函数

    iv. 修改system.cc

        a.添加PCL头文件,定义全局变量

        b.修改TrackMonocular函数,形成新函数

        c.修改CMakeList.txt

② 改写ROS应用层

    i. 修改ros_mono.cc

    ii. 修改CMakeList.txt

3. 运行

五、附录

附录一:测试使用的无人机模型文件

附录二:无人机测试环境及launch文件


一、仿真环境配置

        采用XTDrone实现无人机Gazebo仿真。

1.双系统安装

① 工具准备

  • Rufus软件

        点击链接下载安装Rufus软件,选择图示版本。

  • Usb3.0接口U盘一个,推荐容量大于16G
  • Ubuntu18.04桌面版镜像文件

         点击链接下载安装Ubuntu18.04系统镜像,选择桌面版镜像,并设置好下载路径确保能找到镜像。

image.png

② 启动盘制作

    i. 格式化U盘
    ii. 制作启动盘

        使用Rufus软件制作启动盘。选择对应的U盘,选择下载好的Ubuntu镜像文件,其余设置与图示相同。等待制作完成关闭即可。

③ 系统安装

        若为双系统安装,需压缩硬盘留出系统安装空间,单系统安装可跳过。需要注意的是,最好预留出90GB以上的空间,否则如果后期空间不够很麻烦。

        将U盘插上电脑、重启,进入boot模式,选择启动介质。(可自行搜索自己电脑进入boot的方法)

        选择启动盘后,选择安装Ubuntu。

        选择好语言,点击下一步(建议选择English(US))。

        选择Normal installation 选项,如下图所示。

        选择Something else 选项,如下图所示。

        设置分区根据电脑内存和存储不同而不同,具体参见Ubuntu分区,勾选后点击install now。

        最后设置好用户名和密码,等待安装完成后,重启。

2. XTDrone仿真系统安装

        仿真平台的所有配置根据XTDrone文档进行即可。

        仿真平台基础配置 · 语雀

二、ORB_SLAM3源码下载及编译

1. 源码下载

        原始代码下载地址:GitHub - UZ-SLAMLab/ORB_SLAM3: ORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAMORB-SLAM3: An Accurate Open-Source Library for Visual, Visual-Inertial and Multi-Map SLAM - UZ-SLAMLab/ORB_SLAM3icon-default.png?t=N7T8https://github.com/UZ-SLAMLab/ORB_SLAM3        建议使用注释版本,利于代码阅读(第三方提供中文注释):GitHub - electech6/ORB_SLAM3_detailed_comments: Detailed comments for ORB-SLAM3Detailed comments for ORB-SLAM3. Contribute to electech6/ORB_SLAM3_detailed_comments development by creating an account on GitHub.icon-default.png?t=N7T8https://github.com/electech6/ORB_SLAM3_detailed_comments        因为一些原因git clone可能网速很慢,可以下载.zip文件后解压。

2. 编译

① ORB_SLAM3编译

        在编译之前,需要安装OpenCV(建议安装3.2.0版本,这样与cv_bridge使用的OpenCV版对应,不容易出现版本冲突问题)、Eigen3(官方要求高于3.1.0版本)。

        OpenCV与Eigen3安装教程可以自行搜索。其他依赖在项目wiki中有写明。

        配置完依赖后,执行以下代码进行编译。

  1. cd ORB_SLAM3
  2. chmod +x build.sh
  3. ./build.sh

        成功编译完成后,会在/ORB_SLAM3/lib/目录下生成libORB_SLAM.so文件。

② ROS例程编译

        首先将以下代码加入~/.bashrc中。

export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:PATH/ORB_SLAM3/Examples/ROS

         随后运行:

  1. chmod +x build_ros.sh
  2. ./build_ros.sh

3. 测试

        可以使用数据集测试,我们这边用了T265 ROS版本测试。

① realsense2安装

        安装参考:T265驱动安装_英特尔t265驱动-CSDN博客

        值得注意的是,因为T265已经停产,最新版本的realsense2已经不支持T265。建议使用2.50.0版本(librealsense-2.50.0.zip),ROS驱动对应的是2.3.2版本(realsense-ros-2.3.2.zip

        下载完成后,先配置依赖后编译realsense2:

  1. # 依赖
  2. sudo apt-get install libudev-dev pkg-config libgtk-3-dev
  3. sudo apt-get install libusb-1.0-0-dev pkg-config
  4. sudo apt-get install libglfw3-dev
  5. sudo apt-get install libssl-dev
  6. ./scripts/setup_udev_rules.sh
  7. ./scripts/patch-realsense-ubuntu-lts.sh
  8. # 编译
  9. mkdir build
  10. cd build
  11. cmake ../ -DBUILD_EXAMPLES=true
  12. make
  13. sudo make install

        编译过程中,由于网络问题,curl可能无法下载安装。可以从github上下载.zip压缩包,随后在CmakeList中修改源即可。参考:realsense git libcurl 失败解决的方法(亲测)git失败 改本地压缩包_realsense2安装中curl失败-CSDN博客

② realsense_ros安装

         ROS驱动对应的是2.3.2版本(realsense-ros-2.3.2.zip),编译过程如下:

  1. mkdir -p realsense_ros_ws/src
  2. cd realsense_ros_ws/src # 复制解压好的realsense-ros-2.3.2到此目录下
  3. catkin_init_workspace
  4. cd ..
  5. catkin_make clean
  6. catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
  7. catkin_make install
  8. echo "source ~/YOUR_WORKSAPCE/devel/setup.bash" >> ~/.bashrc
  9. source ~/.bashrc
  10. # 测试运行
  11. roslaunch realsense2_camera rs_t265.launch

③ 重新编译ORB_SLAM3

        因为ORB_SLAM3在编译时检测到未安装realsense2,则不会编译相关例程。所以,安装测试号realsense2后,重新编译一次即可。

④ 运行例程

  1. # T265 ORBSLAM3
  2. cd <your_dir>/ORB_SLAM3
  3. ./Examples/Stereo-InInertial/stereo_inertial_realsense_t265 Vocabulary/ORBvoc.txt ./Examples/Stereo-InInertial/RealSense_T265.yaml

         等待初始化完成后 ,弹出两个弹窗,一个是点云显示与相机追踪,还有一个是双目相机的图像与特征点标注。

         T265的特征点识别效果一般,也可能是测试环境比较简单。

三、ROS例程的运行与修改

1. 相机标定

        ROS有一个标定模块camera_calibration,用起来非常方便。具体可以参考:相机标定原理 用ROS camera_calibration 功能包 在gazebo中进行 相机校准_gazebo相机标定世界-CSDN博客

① 制作标定世界

        首先需要制作Gazebo世界,需要有无人机(装有需要标定的相机)及标定板。世界文件calibration.world如下:

  1. <sdf version='1.6'>
  2. <world name='default'>
  3. <light name='sun' type='directional'>
  4. <cast_shadows>1</cast_shadows>
  5. <pose frame=''>0 0 10 0 -0 0</pose>
  6. <diffuse>0.8 0.8 0.8 1</diffuse>
  7. <specular>0.2 0.2 0.2 1</specular>
  8. <attenuation>
  9. <range>1000</range>
  10. <constant>0.9</constant>
  11. <linear>0.01</linear>
  12. <quadratic>0.001</quadratic>
  13. </attenuation>
  14. <direction>-0.5 0.1 -0.9</direction>
  15. </light>
  16. <!-- 无人机 -->
  17. <model name='ground_plane'>
  18. <static>1</static>
  19. <link name='link'>
  20. <collision name='collision'>
  21. <geometry>
  22. <plane>
  23. <normal>0 0 1</normal>
  24. <size>300 300</size>
  25. </plane>
  26. </geometry>
  27. <surface>
  28. <friction>
  29. <ode>
  30. <mu>100</mu>
  31. <mu2>50</mu2>
  32. </ode>
  33. <torsional>
  34. <ode/>
  35. </torsional>
  36. </friction>
  37. <contact>
  38. <ode/>
  39. </contact>
  40. <bounce/>
  41. </surface>
  42. <max_contacts>10</max_contacts>
  43. </collision>
  44. <visual name='visual'>
  45. <cast_shadows>0</cast_shadows>
  46. <geometry>
  47. <plane>
  48. <normal>0 0 1</normal>
  49. <size>300 300</size>
  50. </plane>
  51. </geometry>
  52. <material>
  53. <script>
  54. <uri>file://media/materials/scripts/gazebo.material</uri>
  55. <name>Gazebo/Grey</name>
  56. </script>
  57. </material>
  58. </visual>
  59. <self_collide>0</self_collide>
  60. <enable_wind>0</enable_wind>
  61. <kinematic>0</kinematic>
  62. </link>
  63. </model>
  64. <gravity>0 0 -9.8</gravity>
  65. <magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>
  66. <atmosphere type='adiabatic'/>
  67. <physics name='default_physics' default='0' type='ode'>
  68. <max_step_size>0.001</max_step_size>
  69. <real_time_factor>1</real_time_factor>
  70. <real_time_update_rate>1000</real_time_update_rate>
  71. </physics>
  72. <scene>
  73. <ambient>0.4 0.4 0.4 1</ambient>
  74. <background>0.7 0.7 0.7 1</background>
  75. <shadows>1</shadows>
  76. </scene>
  77. <wind/>
  78. <spherical_coordinates>
  79. <surface_model>EARTH_WGS84</surface_model>
  80. <latitude_deg>0</latitude_deg>
  81. <longitude_deg>0</longitude_deg>
  82. <elevation>0</elevation>
  83. <heading_deg>0</heading_deg>
  84. </spherical_coordinates>
  85. <!-- 起飞标志点(非必须) -->
  86. <include>
  87. <uri>model://takeoff</uri>
  88. <pose>-0 -0.5 0 0 1.57 1.57</pose>
  89. </include>
  90. <!-- 标定板(注意,此标定板为单面的模型,从背面看为透明) -->
  91. <include>
  92. <uri>model://checkerboard_plane</uri>
  93. <pose>5 0 2 0 1.57 3.14</pose>
  94. </include>
  95. <state world_name='default'>
  96. <sim_time>135 449000000</sim_time>
  97. <real_time>136 177712649</real_time>
  98. <wall_time>1656128132 28380767</wall_time>
  99. <iterations>135449</iterations>
  100. <model name='ground_plane'>
  101. <pose frame=''>0 0 0 0 -0 0</pose>
  102. <scale>1 1 1</scale>
  103. <link name='link'>
  104. <pose frame=''>0 0 0 0 -0 0</pose>
  105. <velocity>0 0 0 0 -0 0</velocity>
  106. <acceleration>0 0 0 0 -0 0</acceleration>
  107. <wrench>0 0 0 0 -0 0</wrench>
  108. </link>
  109. </model>
  110. <light name='sun'>
  111. <pose frame=''>0 0 10 0 -0 0</pose>
  112. </light>
  113. </state>
  114. <gui fullscreen='0'>
  115. <camera name='user_camera'>
  116. <pose frame=''>-1.41507 9.30903 47.355 -0 1.4338 -1.39902</pose>
  117. <view_controller>orbit</view_controller>
  118. <projection_type>perspective</projection_type>
  119. </camera>
  120. </gui>
  121. </world>
  122. </sdf>

②制作launch文件

        launch文件的制作比较简单,可以直接参考XTDrone的其他启动节点。修改后的calibration.launch文件如下:

  1. <?xml version="1.0"?>
  2. <launch>
  3. <!-- MAVROS posix SITL environment launch script -->
  4. <!-- launches Gazebo environment and 2x: MAVROS, PX4 SITL, and spawns vehicle -->
  5. <!-- vehicle model and world -->
  6. <arg name="est" default="ekf2"/>
  7. <arg name="world" default="/home/xtdrone/user_ws/modules/slam/Gazebo_Calibration/calibration.world"/>
  8. <!-- gazebo configs -->
  9. <arg name="gui" default="true"/>
  10. <arg name="debug" default="false"/>
  11. <arg name="verbose" default="false"/>
  12. <arg name="paused" default="false"/>
  13. <!-- Gazebo sim -->
  14. <include file="$(find gazebo_ros)/launch/empty_world.launch">
  15. <arg name="gui" value="$(arg gui)"/>
  16. <arg name="world_name" value="$(arg world)"/>
  17. <arg name="debug" value="$(arg debug)"/>
  18. <arg name="verbose" value="$(arg verbose)"/>
  19. <arg name="paused" value="$(arg paused)"/>
  20. </include>
  21. <!-- iris_0 -->
  22. <group ns="iris_0">
  23. <!-- MAVROS and vehicle configs -->
  24. <arg name="ID" value="0"/>
  25. <arg name="ID_in_group" value="0"/>
  26. <arg name="fcu_url" default="udp://:24540@localhost:34580"/>
  27. <!-- PX4 SITL and vehicle spawn -->
  28. <include file="$(find px4)/launch/single_vehicle_spawn_xtd.launch">
  29. <arg name="x" value="0"/>
  30. <arg name="y" value="0"/>
  31. <arg name="z" value="0.5"/>
  32. <arg name="R" value="0"/>
  33. <arg name="P" value="0"/>
  34. <arg name="Y" value="0"/>
  35. <arg name="vehicle" value="iris"/>
  36. <arg name="sdf" value="iris_zhihang"/>
  37. <arg name="mavlink_udp_port" value="18570"/>
  38. <arg name="mavlink_tcp_port" value="4560"/>
  39. <arg name="ID" value="$(arg ID)"/>
  40. <arg name="ID_in_group" value="$(arg ID_in_group)"/>
  41. </include>
  42. <!-- MAVROS -->
  43. <include file="$(find mavros)/launch/px4.launch">
  44. <arg name="fcu_url" value="$(arg fcu_url)"/>
  45. <arg name="gcs_url" value=""/>
  46. <arg name="tgt_system" value="$(eval 1 + arg('ID'))"/>
  47. <arg name="tgt_component" value="1"/>
  48. </include>
  49. </group>
  50. </launch>
  51. <!--the launch file is generated by XTDrone multi-vehicle generator.py -->

        其中第七行为上一步calibration.world的存储地址。

③ 运行世界并完成标定

    i. 启动Gazebo仿真
  1. cd ~/user_ws/modules/slam/Gazebo_Calibration # 进入到存储launch文件的目录下
  2. roslaunch ./calibration.launch
    ii. 启动XTDrone无人机控制模块
  1. # 无人机通讯控制节点
  2. cd ~/XTDrone/communication/
  3. python multirotor_communication.py iris 0
  1. # 用键盘控制无人机飞行
  2. cd ~/XTDrone/control/keyboard
  3. python multirotor_keyboard_control.py iris 0 vel

        启动后Gazebo界面如图所示,键盘控制可以控制无人机解锁、起飞等。解锁后,切换到offboard模式,并起飞无人机。

    iii. 启动标定节点完成标定

        运行cameracalibrator.py。其中,--size参数是标定板点数,设横向黑白格共n个,纵向黑白格共m个,则参数为(n-1)x(m-1),这里我们是7x7;--square参数是标定板每个小格子的边长,单位是米,这里模型每个小格边长0.25m;image:=是相机图像消息名称;camera:=是相机服务名称。

rosrun camera_calibration cameracalibrator.py --size 7x7 --square 0.25 image:=/iris_0/realsense/depth_camera/color/image_raw camera:=/iris_0/realsense/depth_camera

        启动后如图:

        此时,运动无人机使得X,Y,Size,Skew均达到绿色(横向、纵向、前后、旋转),calibrate按钮亮起,即可完成标定。

         点击calibrate按钮,等待完成计算,save按钮会亮起。

         点击save按钮,会存储标定数据到“/tmp/calibrationdata.tar.gz”中。点击commit退出。

    iv.标定数据转换为orb_slam3的相机标定数据

        参考:ROS+Opencv的双目相机标定和orbslam双目参数匹配_opencvsharp 双目相机-CSDN博客

        标定数据解压后找到ost.yaml,我标定完数据如下:

  1. image_width: 1280
  2. image_height: 720
  3. camera_name: narrow_stereo
  4. camera_matrix:
  5. rows: 3
  6. cols: 3
  7. data: [1109.51051, 0. , 637.897 ,
  8. 0. , 1109.55019, 358.77075,
  9. 0. , 0. , 1. ]
  10. distortion_model: plumb_bob
  11. distortion_coefficients:
  12. rows: 1
  13. cols: 5
  14. data: [0.000544, -0.003422, -0.000323, -0.000315, 0.000000]
  15. rectification_matrix:
  16. rows: 3
  17. cols: 3
  18. data: [1., 0., 0.,
  19. 0., 1., 0.,
  20. 0., 0., 1.]
  21. projection_matrix:
  22. rows: 3
  23. cols: 4
  24. data: [1109.35156, 0. , 637.53416, 0. ,
  25. 0. , 1109.77466, 358.61387, 0. ,
  26. 0. , 0. , 1. , 0. ]

        复制/ORB_SLAM3/Example/ROS/ORB_SLAM3/Asus.yaml文件,并对其进行修改,修改方法如下:

  1. %YAML:1.0
  2. #--------------------------------------------------------------------------------------------
  3. # Camera Parameters. Adjust them!
  4. #--------------------------------------------------------------------------------------------
  5. File.version: "1.0"
  6. Camera.type: "PinHole" # 针孔相机
  7. # Camera calibration and distortion parameters (OpenCV)
  8. Camera1.fx: 1109.35156 # 对应projection_matrix.data的第1个参数
  9. Camera1.fy: 1109.77466 # 对应projection_matrix.data的第6个参数
  10. Camera1.cx: 637.53416 # 对应projection_matrix.data的第3个参数
  11. Camera1.cy: 358.61387 # 对应projection_matrix.data的第7个参数
  12. # 畸变纠正,对应distortion_coefficients矩阵
  13. Camera1.k1: 0.000544
  14. Camera1.k2: -0.003422
  15. Camera1.p1: -0.000323
  16. Camera1.p2: -0.000315
  17. Camera1.k3: 0.000000
  18. # Camera frames per second
  19. Camera.fps: 30
  20. # Color order of the images (0: BGR, 1: RGB. It is ignored if images are grayscale)
  21. Camera.RGB: 0
  22. # Camera resolution
  23. Camera.width: 1280 # 对应image_width
  24. Camera.height: 720 # 对应image_height
  25. #--------------------------------------------------------------------------------------------
  26. # ORB Parameters 以下为ORB的参数,基本不需要修改
  27. #--------------------------------------------------------------------------------------------
  28. # ORB Extractor: Number of features per image
  29. ORBextractor.nFeatures: 1000
  30. # ORB Extractor: Scale factor between levels in the scale pyramid
  31. ORBextractor.scaleFactor: 1.2
  32. # ORB Extractor: Number of levels in the scale pyramid
  33. ORBextractor.nLevels: 8
  34. # ORB Extractor: Fast threshold
  35. # Image is divided in a grid. At each cell FAST are extracted imposing a minimum response.
  36. # Firstly we impose iniThFAST. If no corners are detected we impose a lower value minThFAST
  37. # You can lower these values if your images have low contrast
  38. ORBextractor.iniThFAST: 20
  39. ORBextractor.minThFAST: 7
  40. #--------------------------------------------------------------------------------------------
  41. # Viewer Parameters
  42. #--------------------------------------------------------------------------------------------
  43. Viewer.KeyFrameSize: 0.05
  44. Viewer.KeyFrameLineWidth: 1.0
  45. Viewer.GraphLineWidth: 0.9
  46. Viewer.PointSize: 2.0
  47. Viewer.CameraSize: 0.08
  48. Viewer.CameraLineWidth: 3.0
  49. Viewer.ViewpointX: 0.0
  50. Viewer.ViewpointY: -0.7
  51. Viewer.ViewpointZ: -1.8
  52. Viewer.ViewpointF: 500.0

2. 修改源码

        找到/ORB_SLAM3/Examples/ROS/ORB_SLAM3/src/ros_mono.cc,将第62行中订阅的消息名称修改为自己的消息名称。

ros::Subscriber sub = nodeHandler.subscribe("/camera/image_raw", 1, &ImageGrabber::GrabImage,&igb);

        例如XTDrone例程中无人机的RGB-D相机的RGB图像作为单目输入源,消息名称为:“/iris_0/realsense/depth_camera/color/image_raw”:

  1. #define cfg_ROS_IMG_INPUT_TOPIC "/iris_0/realsense/depth_camera/color/image_raw"
  2. ros::Subscriber sub = nodeHandler.subscribe(cfg_ROS_IMG_INPUT_TOPIC, 1, &ImageGrabber::GrabImage, &igb);

3. 运行ROS例程

        重新编译后,运行(其中depth_camera.yaml是上一步标定完成后的标定文件):

  1. # 启动一个无人机飞行场景
  2. roslaunch px4 zhihang2.launch
  3. # 启动控制及通讯节点
  4. cd ~/user_ws/modules/gui/scripts
  5. python multirotor_communication.py iris 0
  6. cd ~/XTDrone/control/keyboard
  7. python multirotor_keyboard_control.py iris 0 vel
  8. # 启动ORB_SLAM3
  9. rosrun ORB_SLAM3 Mono ~/user_ws/modules/slam/ORB_SLAM3/Vocabulary/ORBvoc.txt ~/user_ws/modules/slam/Gazebo_Calibration/data/depth_camera.yaml

        运行效果如图:

四、修改ORB_SLAM3源码实现点云、图像的ROS消息输出

        通过观察节点代码可以发现,在ros_mono.cc的倒数第二行调用ORB_SLAM3算法:

mpSLAM->TrackMonocular(cv_ptr->image,cv_ptr->header.stamp.toSec());

        此函数返回值只有相机追踪后的估计位置,并不能输出点云与图像。而算法内部则已经全部封装到了/ORB_SLAM3/lib/libORB_SLAM3.so中。因此,如果需要将点云及标注过特征点的图像发布到ROS消息以供其他处理,则需要修改源码。

1. 源码分析

① 初始化过程

        第一步是初始化ORB_SLAM3系统:

ORB_SLAM3::System SLAM(argv[1],argv[2],ORB_SLAM3::System::MONOCULAR,true);

        这一步会调用/src/system.cc下的初始化函数:

  1. System::System(const string &strVocFile, const string &strSettingsFile, const eSensor sensor,
  2. const bool bUseViewer, const int initFr, const string &strSequence):
  3. mSensor(sensor), mpViewer(static_cast<Viewer*>(NULL)), mbReset(false), mbResetActiveMap(false),
  4. mbActivateLocalizationMode(false), mbDeactivateLocalizationMode(false), mbShutDown(false)
  5. { ... }

        在这个函数中,会完成导入数据、开启Tracking线程、LocalMapping线程、LoopClosing线程,开启显示线程。其中,我使用的方法是通过显示线程将数据导出。

        在该函数的最后,有创建显示线程的代码:

  1. //Initialize the Viewer thread and launch 创建并开启显示线程
  2. if(bUseViewer)
  3. //if(false) // TODO
  4. {
  5. mpViewer = new Viewer(this, mpFrameDrawer,mpMapDrawer,mpTracker,strSettingsFile,settings_);
  6. mptViewer = new thread(&Viewer::Run, mpViewer);
  7. mpTracker->SetViewer(mpViewer);
  8. mpLoopCloser->mpViewer = mpViewer;
  9. mpViewer->both = mpFrameDrawer->both;
  10. }

② 显示输出过程

        显而易见,算法通过mptViewer线程运行Viewer::Run函数实现显示功能。因此,找到/src/Viewer.cc文件,其中定义了Viewer::Run函数:

void Viewer::Run() { ... }

        其中,以下这段代码是处理标注过特征点的图像。显然,toShow变量就是存储了处理完成的图像。

  1. cv::Mat toShow;
  2. cv::Mat im = mpFrameDrawer->DrawFrame(trackedImageScale);
  3. if(both){
  4. cv::Mat imRight = mpFrameDrawer->DrawRightFrame(trackedImageScale);
  5. cv::hconcat(im,imRight,toShow);
  6. }
  7. else{
  8. toShow = im;
  9. }
  10. if(mImageViewerScale != 1.f) {
  11. int width = toShow.cols * mImageViewerScale;
  12. int height = toShow.rows * mImageViewerScale;
  13. cv::resize(toShow, toShow, cv::Size(width, height));
  14. }
  15. cv::imshow("ORB-SLAM3: Current Frame",toShow);
  16. cv::waitKey(mT);

        以下这段代码是处理点云图显示的。然而,我们并不能从这里获取点云数据,因为算法利用了DrawMapPoints函数完成了点云的绘制。

  1. d_cam.Activate(s_cam);
  2. glClearColor(1.0f,1.0f,1.0f,1.0f);
  3. mpMapDrawer->DrawCurrentCamera(Twc);
  4. if(menuShowKeyFrames || menuShowGraph || menuShowInertialGraph || menuShowOptLba)
  5. mpMapDrawer->DrawKeyFrames(menuShowKeyFrames,menuShowGraph, menuShowInertialGraph, menuShowOptLba);
  6. if(menuShowPoints)
  7. mpMapDrawer->DrawMapPoints(); // 画出点云

        因此,找到/src/MapDrawer.cc文件,找到DrawMapPoints函数:

void MapDrawer::DrawMapPoints() { ... }

        其中,这一部分实现了点云的绘制:

  1. for(set<MapPoint*>::iterator sit=spRefMPs.begin(), send=spRefMPs.end(); sit!=send; sit++)
  2. {
  3. if((*sit)->isBad())
  4. continue;
  5. Eigen::Matrix<float,3,1> pos = (*sit)->GetWorldPos();
  6. glVertex3f(pos(0),pos(1),pos(2));
  7. }

③ 应用方法

        当一帧图像输入到节点后,会调用TrackMonocular函数完成视觉SLAM(以ros_mono.cc为例):

mpSLAM->TrackMonocular(cv_ptr->image, cv_ptr->header.stamp.toSec());

        由于ORB_SLAM编译后生成的是lib文件,因此难以在其中嵌入ROS。考虑到需要将数据输出,可以考虑改写TrackMonocular函数,使得函数能够返回点云、图像等数据。

2. 利用pcl与ros实现点云转存与ROS消息发布

① 改写ORB_SLAM3

        将点云数据及图像数据存储到一个全局变量中,然后用修改后的TrackMonocular函数(TrackMonocularOutput函数)返回结构体,结构体中包含相机追踪数据、点云数据、图像数据。

    i.修改MapDrawer.cc
        a.添加PCL头文件
  1. #include <pcl/point_types.h>
  2. #include <pcl/point_cloud.h>
  3. #include <pcl/io/pcd_io.h>
  4. #include <pcl_conversions/pcl_conversions.h>
        b.修改函数void MapDrawer::DrawMapPoints()

        修改函数中以下for循环:

  1. // 修改前
  2. for(set<MapPoint*>::iterator sit=spRefMPs.begin(), send=spRefMPs.end(); sit!=send; sit++)
  3. {
  4. if((*sit)->isBad())
  5. continue;
  6. Eigen::Matrix<float,3,1> pos = (*sit)->GetWorldPos();
  7. glVertex3f(pos(0),pos(1),pos(2));
  8. }

         在遍历点云中的点时,存入pcl点云变量。修改后如下:

  1. // 创建点云图
  2. pcl::PointCloud<pcl::PointXYZ>::Ptr point_cloud(new pcl::PointCloud<pcl::PointXYZ>());
  3. for(set<MapPoint*>::iterator sit=spRefMPs.begin(), send=spRefMPs.end(); sit!=send; sit++)
  4. {
  5. if((*sit)->isBad())
  6. continue;
  7. Eigen::Matrix<float,3,1> pos = (*sit)->GetWorldPos();
  8. glVertex3f(pos(0),pos(1),pos(2));
  9. // 将点插入点云图
  10. pcl::PointXYZ point;
  11. point.x = pos(0);
  12. point.y = pos(1);
  13. point.z = pos(2);
  14. point_cloud->points.push_back(point);
  15. }
  16. // TEST 保存点云图像到本地
  17. //if(point_cloud->points.size())
  18. // pcl::io::savePCDFileBinary("orb_slam3.pcd", *point_cloud);

        这里,可以直接将point_cloud变量存储到全局变量中。这里我的处理方法是,修改函数定义,让其返回 pcl::PointCloud<pcl::PointXYZ>::Ptr 数据。修改好的函数如下:

  1. pcl::PointCloud<pcl::PointXYZ>::Ptr MapDrawer::DrawMapPoints()
  2. {
  3. // 创建点云图
  4. pcl::PointCloud<pcl::PointXYZ>::Ptr point_cloud(new pcl::PointCloud<pcl::PointXYZ>());
  5. Map* pActiveMap = mpAtlas->GetCurrentMap();
  6. if(!pActiveMap)
  7. return point_cloud;
  8. const vector<MapPoint*> &vpMPs = pActiveMap->GetAllMapPoints();
  9. const vector<MapPoint*> &vpRefMPs = pActiveMap->GetReferenceMapPoints();
  10. set<MapPoint*> spRefMPs(vpRefMPs.begin(), vpRefMPs.end());
  11. if(vpMPs.empty())
  12. return point_cloud;
  13. glPointSize(mPointSize);
  14. glBegin(GL_POINTS);
  15. glColor3f(0.0,0.0,0.0);
  16. for(size_t i=0, iend=vpMPs.size(); i<iend;i++)
  17. {
  18. if(vpMPs[i]->isBad() || spRefMPs.count(vpMPs[i]))
  19. continue;
  20. Eigen::Matrix<float,3,1> pos = vpMPs[i]->GetWorldPos();
  21. glVertex3f(pos(0),pos(1),pos(2));
  22. }
  23. glEnd();
  24. glPointSize(mPointSize);
  25. glBegin(GL_POINTS);
  26. glColor3f(1.0,0.0,0.0);
  27. for(set<MapPoint*>::iterator sit=spRefMPs.begin(), send=spRefMPs.end(); sit!=send; sit++)
  28. {
  29. if((*sit)->isBad())
  30. continue;
  31. Eigen::Matrix<float,3,1> pos = (*sit)->GetWorldPos();
  32. glVertex3f(pos(0),pos(1),pos(2));
  33. // 将点插入点云图
  34. pcl::PointXYZ point;
  35. point.x = pos(0);
  36. point.y = pos(1);
  37. point.z = pos(2);
  38. point_cloud->points.push_back(point);
  39. }
  40. // 保存点云图像到本地
  41. //if(point_cloud->points.size())
  42. // pcl::io::savePCDFileBinary("orb_slam3.pcd", *point_cloud);
  43. glEnd();
  44. return point_cloud;
  45. }
        c.修改函数申明

        在修改函数返回值后,需要在/include/MapDrawer.h文件中修改函数申明:

pcl::PointCloud<pcl::PointXYZ>::Ptr DrawMapPoints();

        (如果直接将变量存入全局变量则无需这一步操作)

    ii.修改Viewer.cc
        a.添加PCL头文件,引用外部定义的全局变量
  1. #include <pcl/point_types.h>
  2. #include <pcl/point_cloud.h>
  3. #include <pcl/io/pcd_io.h>
  4. #include <pcl_conversions/pcl_conversions.h>
  5. // 全局变量定义在/src/system.cc
  6. // 本文 <四.2.iv.b> 中介绍
  7. extern pcl::PointCloud<pcl::PointXYZ>::Ptr G_pcToShow;
  8. extern cv::Mat G_imToShow;
        b.修改 void Viewer::Run() 函数

        原始点云显示代码如下,原始的DrawMapPoints函数没有返回值。

  1. if(menuShowPoints)
  2. mpMapDrawer->DrawMapPoints();

        将其修改为以下样式,用全局变量G_pcToShow接收返回的点云数据

  1. if(menuShowPoints)
  2. G_pcToShow = mpMapDrawer->DrawMapPoints(); // 处理后的点云显示
  3. // TEST
  4. //if(G_pcToShow->points.size())
  5. // pcl::io::savePCDFileBinary("orb_slam3.pcd", *G_pcToShow);

        原始图片显示代码如下:

  1. cv::Mat toShow;
  2. cv::Mat im = mpFrameDrawer->DrawFrame(trackedImageScale);
  3. if(both){
  4. cv::Mat imRight = mpFrameDrawer->DrawRightFrame(trackedImageScale);
  5. cv::hconcat(im,imRight,toShow);
  6. }
  7. else{
  8. toShow = im;
  9. }
  10. if(mImageViewerScale != 1.f){
  11. int width = toShow.cols * mImageViewerScale;
  12. int height = toShow.rows * mImageViewerScale;
  13. cv::resize(toShow, toShow, cv::Size(width, height));
  14. }
  15. cv::imshow("ORB-SLAM3: Current Frame",toShow);
  16. cv::waitKey(mT);

        修改将其接受图片的变量换为全局变量G_imToShow,修改后如下:

  1. cv::Mat im = mpFrameDrawer->DrawFrame(trackedImageScale);
  2. if(both){
  3. cv::Mat imRight = mpFrameDrawer->DrawRightFrame(trackedImageScale);
  4. cv::hconcat(im,imRight,G_imToShow);
  5. }
  6. else{
  7. G_imToShow = im;
  8. }
  9. if(mImageViewerScale != 1.f){
  10. int width = G_imToShow.cols * mImageViewerScale;
  11. int height = G_imToShow.rows * mImageViewerScale;
  12. cv::resize(G_imToShow, G_imToShow, cv::Size(width, height));
  13. }
  14. cv::imshow("ORB-SLAM3: Current Frame",G_imToShow); // 处理后的视频流显示
  15. cv::waitKey(mT);
    iii.修改system.h
        a.添加PCL头文件
  1. #include <pcl/point_types.h>
  2. #include <pcl/point_cloud.h>
  3. #include <pcl/io/pcd_io.h>
  4. #include <pcl_conversions/pcl_conversions.h>
         b.定义一个结构体变量,包含点云、图像、追踪信息
  1. // 利用结构体返回位置、点云、图像(在 namespace ORB_SLAM3 下)
  2. typedef struct {
  3. pcl::PointCloud<pcl::PointXYZ>::Ptr pointcloud;
  4. cv::Mat image;
  5. Sophus::SE3f pos;
  6. }SLAM_Output;
         c.申明新定义的函数
  1. // 返回相机追踪信息、点云数据、图像数据(位置在原TrackMonocular函数之后即可)
  2. SLAM_Output TrackMonocularOutput(const cv::Mat &im, const double &timestamp, const vector<IMU::Point>& vImuMeas = vector<IMU::Point>(), string filename="");
    iv. 修改system.cc
        a.添加PCL头文件,定义全局变量
  1. #include <pcl/point_types.h>
  2. #include <pcl/point_cloud.h>
  3. #include <pcl/io/pcd_io.h>
  4. #include <pcl_conversions/pcl_conversions.h>
  5. // 全局变量(用于传出输出点云与输出图像)
  6. pcl::PointCloud<pcl::PointXYZ>::Ptr G_pcToShow(new pcl::PointCloud<pcl::PointXYZ>());
  7. cv::Mat G_imToShow;
        b.修改TrackMonocular函数,形成新函数
  1. SLAM_Output System::TrackMonocularOutput(const cv::Mat &im, const double &timestamp, const vector<IMU::Point>& vImuMeas, string filename)
  2. {
  3. SLAM_Output data;
  4. {
  5. unique_lock<mutex> lock(mMutexReset);
  6. if(mbShutDown)
  7. return data;
  8. }
  9. // 确保是单目或单目VIO模式
  10. if(mSensor!=MONOCULAR && mSensor!=IMU_MONOCULAR)
  11. {
  12. cerr << "ERROR: you called TrackMonocular but input sensor was not set to Monocular nor Monocular-Inertial." << endl;
  13. exit(-1);
  14. }
  15. cv::Mat imToFeed = im.clone();
  16. if(settings_ && settings_->needToResize()){
  17. cv::Mat resizedIm;
  18. cv::resize(im,resizedIm,settings_->newImSize());
  19. imToFeed = resizedIm;
  20. }
  21. // Check mode change
  22. {
  23. // 独占锁,主要是为了mbActivateLocalizationMode和mbDeactivateLocalizationMode不会发生混乱
  24. unique_lock<mutex> lock(mMutexMode);
  25. // mbActivateLocalizationMode为true会关闭局部地图线程,仅跟踪模式
  26. if(mbActivateLocalizationMode)
  27. {
  28. mpLocalMapper->RequestStop();
  29. // Wait until Local Mapping has effectively stopped
  30. while(!mpLocalMapper->isStopped())
  31. {
  32. usleep(1000);
  33. }
  34. // 局部地图关闭以后,只进行追踪的线程,只计算相机的位姿,没有对局部地图进行更新
  35. mpTracker->InformOnlyTracking(true);
  36. // 关闭线程可以使得别的线程得到更多的资源
  37. mbActivateLocalizationMode = false;
  38. }
  39. if(mbDeactivateLocalizationMode)
  40. {
  41. mpTracker->InformOnlyTracking(false);
  42. mpLocalMapper->Release();
  43. mbDeactivateLocalizationMode = false;
  44. }
  45. }
  46. // Check reset
  47. {
  48. unique_lock<mutex> lock(mMutexReset);
  49. if(mbReset)
  50. {
  51. mpTracker->Reset();
  52. mbReset = false;
  53. mbResetActiveMap = false;
  54. }
  55. // 如果检测到重置活动地图的标志为true,将重置地图
  56. else if(mbResetActiveMap)
  57. {
  58. cout << "SYSTEM -> Reseting active map in monocular case" << endl;
  59. mpTracker->ResetActiveMap();
  60. mbResetActiveMap = false;
  61. }
  62. }
  63. // 如果是单目VIO模式,把IMU数据存储到队列mlQueueImuData
  64. if (mSensor == System::IMU_MONOCULAR)
  65. for(size_t i_imu = 0; i_imu < vImuMeas.size(); i_imu++)
  66. mpTracker->GrabImuData(vImuMeas[i_imu]);
  67. // 计算相机位姿
  68. Sophus::SE3f Tcw = mpTracker->GrabImageMonocular(imToFeed,timestamp,filename);
  69. // 更新跟踪状态和参数
  70. unique_lock<mutex> lock2(mMutexState);
  71. mTrackingState = mpTracker->mState;
  72. mTrackedMapPoints = mpTracker->mCurrentFrame.mvpMapPoints;
  73. mTrackedKeyPointsUn = mpTracker->mCurrentFrame.mvKeysUn;
  74. data.pointcloud = G_pcToShow;
  75. data.image = G_imToShow;
  76. data.pos = Tcw;
  77. return data;
  78. }
        c.修改CMakeList.txt

        需要再其中添加PCL库,在CMakeList中添加如下三行:

  1. ...
  2. find_package(PCL REQUIRED) # 添加行
  3. include_directories(
  4. ${PROJECT_SOURCE_DIR}
  5. ${PROJECT_SOURCE_DIR}/include
  6. ${PROJECT_SOURCE_DIR}/include/CameraModels
  7. ${PROJECT_SOURCE_DIR}/Thirdparty/Sophus
  8. ${EIGEN3_INCLUDE_DIR}
  9. ${Pangolin_INCLUDE_DIRS}
  10. ${PCL_INCLUDE_DIRS} # 添加行
  11. )
  12. ...
  13. target_link_libraries(${PROJECT_NAME}
  14. ${OpenCV_LIBS}
  15. ${EIGEN3_LIBS}
  16. ${Pangolin_LIBRARIES}
  17. ${PCL_LIBRARIES} # 添加行
  18. ${PROJECT_SOURCE_DIR}/Thirdparty/DBoW2/lib/libDBoW2.so
  19. ${PROJECT_SOURCE_DIR}/Thirdparty/g2o/lib/libg2o.so
  20. -lboost_serialization
  21. -lcrypto
  22. )

        完成后以上步骤后,可以重新编译ORB_SLAM3。

② 改写ROS应用层

    i. 修改ros_mono.cc

        ROS节点改写后如下:

  1. #include<iostream>
  2. #include<algorithm>
  3. #include<fstream>
  4. #include<chrono>
  5. #include<ros/ros.h>
  6. #include<cv_bridge/cv_bridge.h>
  7. #include<opencv2/core/core.hpp>
  8. #include<sensor_msgs/PointCloud2.h>
  9. #include<sensor_msgs/Image.h>
  10. #include<std_msgs/Header.h>
  11. #include"../../../include/System.h"
  12. #include <pcl/point_types.h>
  13. #include <pcl/point_cloud.h>
  14. #include <pcl/io/pcd_io.h>
  15. #include <pcl_conversions/pcl_conversions.h>
  16. using namespace std;
  17. /***************** <WSJ> CODE ******************/
  18. #define cfg_NODE_NAME "mono"
  19. #define cfg_ROS_IMG_INPUT_TOPIC "/iris_0/realsense/depth_camera/color/image_raw"
  20. #define cfg_ROS_IMG_OUTPUT_TOPIC "/orb_slam3/output/image"
  21. #define cfg_ROS_PC_OUTPUT_TOPIC "/orb_slam3/output/pointcloud2"
  22. #define RED "\e[1;31m"
  23. #define YELLOW "\e[1;33m"
  24. #define GREEN "\e[1;32m"
  25. #define BLUE "\e[1;34m"
  26. #define COLOR_TILE "\e[0m"
  27. ros::Publisher img_pub;
  28. ros::Publisher pc_pub;
  29. sensor_msgs::ImagePtr img_msg;
  30. sensor_msgs::PointCloud2 pc_msg;
  31. /*************** <WSJ> CODE END ****************/
  32. class ImageGrabber
  33. {
  34. public:
  35. ImageGrabber(ORB_SLAM3::System* pSLAM):mpSLAM(pSLAM){}
  36. void GrabImage(const sensor_msgs::ImageConstPtr& msg);
  37. ORB_SLAM3::System* mpSLAM; // 创建SLMA系统指针
  38. };
  39. int main(int argc, char **argv)
  40. {
  41. ros::init(argc, argv, cfg_NODE_NAME);
  42. ros::start();
  43. if(argc != 3)
  44. {
  45. cerr << endl << "Usage: rosrun ORB_SLAM3 Mono path_to_vocabulary path_to_settings" << endl;
  46. ros::shutdown();
  47. return 1;
  48. }
  49. // Create SLAM system. It initializes all system threads and gets ready to process frames.
  50. ORB_SLAM3::System SLAM(argv[1],argv[2],ORB_SLAM3::System::MONOCULAR,true);
  51. ImageGrabber igb(&SLAM);
  52. ros::NodeHandle nodeHandler;
  53. ros::Subscriber sub = nodeHandler.subscribe(cfg_ROS_IMG_INPUT_TOPIC, 1, &ImageGrabber::GrabImage, &igb);
  54. img_pub = nodeHandler.advertise<sensor_msgs::Image>(cfg_ROS_IMG_OUTPUT_TOPIC, 10);
  55. pc_pub = nodeHandler.advertise<sensor_msgs::PointCloud2>(cfg_ROS_PC_OUTPUT_TOPIC, 10);
  56. cout << GREEN << "\n\n[INFO]<ros_mono.cc>: Node Start." << COLOR_TILE << endl;
  57. cout << "---------------------------------------------------------------------" << endl;
  58. ros::spin();
  59. // Stop all threads
  60. SLAM.Shutdown();
  61. // Save camera trajectory
  62. SLAM.SaveKeyFrameTrajectoryTUM("KeyFrameTrajectory.txt");
  63. ros::shutdown();
  64. return 0;
  65. }
  66. // ROS接收消息回调函数
  67. void ImageGrabber::GrabImage(const sensor_msgs::ImageConstPtr& msg)
  68. {
  69. // Copy the ros image message to cv::Mat.
  70. cv_bridge::CvImageConstPtr cv_ptr;
  71. try
  72. {
  73. cv_ptr = cv_bridge::toCvShare(msg);
  74. }
  75. catch (cv_bridge::Exception& e)
  76. {
  77. ROS_ERROR("[ROS]<%s> cv_bridge r2c exception: %s", cfg_NODE_NAME, e.what());
  78. return;
  79. }
  80. //mpSLAM->TrackMonocular(cv_ptr->image, cv_ptr->header.stamp.toSec()); // SLAM系统追踪单目相机 返回相机位置数据
  81. ORB_SLAM3::SLAM_Output data;
  82. data = mpSLAM->TrackMonocularOutput(cv_ptr->image, cv_ptr->header.stamp.toSec());
  83. // 发布IMG到ROS消息
  84. std_msgs::Header header;
  85. header.frame_id = "camera";
  86. header.stamp = ros::Time::now();
  87. try
  88. {
  89. img_msg = cv_bridge::CvImage(header, "rgb8", data.image).toImageMsg();
  90. img_pub.publish(*img_msg);
  91. }
  92. catch (cv_bridge::Exception& e)
  93. {
  94. ROS_ERROR("[ROS]<%s> cv_bridge c2r exception: %s", cfg_NODE_NAME, e.what());
  95. return;
  96. }
  97. // 发布PC到ROS消息
  98. pcl::toROSMsg(*(data.pointcloud), pc_msg);
  99. pc_msg.header = header;
  100. pc_pub.publish(pc_msg);
  101. //cout << data.pos.matrix() << endl << endl;
  102. //if((data.pointcloud)->points.size())
  103. //pcl::io::savePCDFileBinary("orb_slam3.pcd", *(data.pointcloud)); //此行会莫名其妙导致运行<Tracking.cc>623行报错退出
  104. }

         应用层中,主要是调用了上一步已经修改好的TrackMonocularOutput函数替换原来使用的TrackMonocular函数,并将返回值通过ROS发布。

    ii. 修改CMakeList.txt

        需要在其中添加PCL库,在CMakeList中添加如下2行:

  1. ...
  2. find_package(PCL REQUIRED) # 添加行
  3. include_directories(
  4. ${PROJECT_SOURCE_DIR}
  5. ${PROJECT_SOURCE_DIR}/../../../
  6. ${PROJECT_SOURCE_DIR}/../../../include
  7. ${PROJECT_SOURCE_DIR}/../../../include/CameraModels
  8. ${PROJECT_SOURCE_DIR}/../../../Thirdparty/Sophus
  9. ${Pangolin_INCLUDE_DIRS}
  10. ${PCL_INCLUDE_DIRS} # 添加行
  11. )

一些参考资料:

PCL转ROSMSG PointCloud2:ROS与PCL中各种点云数据格式之间的转换(大总结)_pcl::torosmsg-CSDN博客文章浏览阅读2.3k次,点赞11次,收藏63次。ROS与PCL中各种点云数据格式之间的转换(大总结)三种常用点云数据格式:pcl::PointCloud< PointT>pcl::PCLPointCloud2snesor_msgs::PointCloud21.sensor_msgs::PointCloud2转pcl::PCLPointCloud2pcl_conversion::toPCl(sensor_msgs::PointCloud2,pcl::PCLPointCloud2)2.sensor_msgs::PointClo_pcl::torosmsghttps://blog.csdn.net/m0_45388819/article/details/113794706OpenCV转ROSMSG Image:利用opencv将本地图片转换成ROS格式_opencv 图像类型转换为rosmsg类型-CSDN博客文章浏览阅读884次。转自:http://blog.csdn.net/yake827/article/details/44593621本文主要讲解如何将本地的图片通过ROS来显示出来。主要利用了OpenCV库,一样是来源于ROS官网.创建一个ROS工作区工作区还是存放和编译我们的文件[plain] view plain copy$ mkdi_opencv 图像类型转换为rosmsg类型https://blog.csdn.net/mxgsgtc/article/details/72143054将ORBSLAM中的Map转换为点云:ORB SLAM3 点云地图保存_orbslam3 点云-CSDN博客文章浏览阅读5.1k次,点赞17次,收藏90次。简单修改ORB_SLAM3源码, 使其能保存pcd格式的点云地图。_orbslam3 点云https://blog.csdn.net/qq_43591054/article/details/125693886

3. 运行

        使用 <三、3> 介绍的步骤运行即可,可以在其他节点接收点云消息和图像消息。

        正常运行后,可以通过rqt_image_view来查看图像数据是否正确发布:

        可以通过 rostopic echo / rostopic hz 来查看点云数据是否正确发布。如需要通过rviz来查看点云数据是否正确,则需要新增一个tf转换(上面代码中,点云的frame_id为camera)。

        改写双目与RGB-D方法与单目相同,因此不再赘述。

五、附录

附录一:测试使用的无人机模型文件

iris_all_sensor.sdf

  1. <?xml version="1.0" ?>
  2. <sdf version='1.5'>
  3. <model name='iris_all_sensor'>
  4. <!--iris body-->
  5. <link name='base_link'>
  6. <pose frame=''>0 0 0 0 -0 0</pose>
  7. <inertial>
  8. <pose frame=''>0 0 0 0 -0 0</pose>
  9. <mass>1.5</mass>
  10. <inertia>
  11. <ixx>0.029125</ixx>
  12. <ixy>0</ixy>
  13. <ixz>0</ixz>
  14. <iyy>0.029125</iyy>
  15. <iyz>0</iyz>
  16. <izz>0.055225</izz>
  17. </inertia>
  18. </inertial>
  19. <collision name='base_link_inertia_collision'>
  20. <pose frame=''>0 0 0 0 -0 0</pose>
  21. <geometry>
  22. <box>
  23. <size>0.47 0.47 0.11</size>
  24. </box>
  25. </geometry>
  26. <surface>
  27. <contact>
  28. <ode>
  29. <min_depth>0.001</min_depth>
  30. <max_vel>0</max_vel>
  31. </ode>
  32. </contact>
  33. <friction>
  34. <ode/>
  35. </friction>
  36. </surface>
  37. </collision>
  38. <visual name='base_link_inertia_visual'>
  39. <pose frame=''>0 0 0 0 -0 0</pose>
  40. <geometry>
  41. <mesh>
  42. <scale>1 1 1</scale>
  43. <uri>model://rotors_description/meshes/iris.stl</uri>
  44. </mesh>
  45. </geometry>
  46. <material>
  47. <script>
  48. <name>Gazebo/DarkGrey</name>
  49. <uri>file://media/materials/scripts/gazebo.material</uri>
  50. </script>
  51. </material>
  52. </visual>
  53. <gravity>1</gravity>
  54. <velocity_decay/>
  55. </link>
  56. <link name='/imu_link'>
  57. <pose frame=''>0 0 0 0 -0 0</pose>
  58. <inertial>
  59. <pose frame=''>0 0 0 0 -0 0</pose>
  60. <mass>0.015</mass>
  61. <inertia>
  62. <ixx>1e-05</ixx>
  63. <ixy>0</ixy>
  64. <ixz>0</ixz>
  65. <iyy>1e-05</iyy>
  66. <iyz>0</iyz>
  67. <izz>1e-05</izz>
  68. </inertia>
  69. </inertial>
  70. </link>
  71. <joint name='/imu_joint' type='revolute'>
  72. <child>/imu_link</child>
  73. <parent>base_link</parent>
  74. <axis>
  75. <xyz>1 0 0</xyz>
  76. <limit>
  77. <lower>0</lower>
  78. <upper>0</upper>
  79. <effort>0</effort>
  80. <velocity>0</velocity>
  81. </limit>
  82. <dynamics>
  83. <spring_reference>0</spring_reference>
  84. <spring_stiffness>0</spring_stiffness>
  85. </dynamics>
  86. <use_parent_model_frame>1</use_parent_model_frame>
  87. </axis>
  88. </joint>
  89. <link name='rotor_0'>
  90. <pose frame=''>0.13 -0.22 0.023 0 -0 0</pose>
  91. <inertial>
  92. <pose frame=''>0 0 0 0 -0 0</pose>
  93. <mass>0.005</mass>
  94. <inertia>
  95. <ixx>9.75e-07</ixx>
  96. <ixy>0</ixy>
  97. <ixz>0</ixz>
  98. <iyy>0.000273104</iyy>
  99. <iyz>0</iyz>
  100. <izz>0.000274004</izz>
  101. </inertia>
  102. </inertial>
  103. <collision name='rotor_0_collision'>
  104. <pose frame=''>0 0 0 0 -0 0</pose>
  105. <geometry>
  106. <cylinder>
  107. <length>0.005</length>
  108. <radius>0.128</radius>
  109. </cylinder>
  110. </geometry>
  111. <surface>
  112. <contact>
  113. <ode/>
  114. </contact>
  115. <friction>
  116. <ode/>
  117. </friction>
  118. </surface>
  119. </collision>
  120. <visual name='rotor_0_visual'>
  121. <pose frame=''>0 0 0 0 -0 0</pose>
  122. <geometry>
  123. <mesh>
  124. <scale>1 1 1</scale>
  125. <uri>model://rotors_description/meshes/iris_prop_ccw.dae</uri>
  126. </mesh>
  127. </geometry>
  128. <material>
  129. <script>
  130. <name>Gazebo/Blue</name>
  131. <uri>file://media/materials/scripts/gazebo.material</uri>
  132. </script>
  133. </material>
  134. </visual>
  135. <gravity>1</gravity>
  136. <velocity_decay/>
  137. </link>
  138. <joint name='rotor_0_joint' type='revolute'>
  139. <child>rotor_0</child>
  140. <parent>base_link</parent>
  141. <axis>
  142. <xyz>0 0 1</xyz>
  143. <limit>
  144. <lower>-1e+16</lower>
  145. <upper>1e+16</upper>
  146. </limit>
  147. <dynamics>
  148. <spring_reference>0</spring_reference>
  149. <spring_stiffness>0</spring_stiffness>
  150. </dynamics>
  151. <use_parent_model_frame>1</use_parent_model_frame>
  152. </axis>
  153. </joint>
  154. <link name='rotor_1'>
  155. <pose frame=''>-0.13 0.2 0.023 0 -0 0</pose>
  156. <inertial>
  157. <pose frame=''>0 0 0 0 -0 0</pose>
  158. <mass>0.005</mass>
  159. <inertia>
  160. <ixx>9.75e-07</ixx>
  161. <ixy>0</ixy>
  162. <ixz>0</ixz>
  163. <iyy>0.000273104</iyy>
  164. <iyz>0</iyz>
  165. <izz>0.000274004</izz>
  166. </inertia>
  167. </inertial>
  168. <collision name='rotor_1_collision'>
  169. <pose frame=''>0 0 0 0 -0 0</pose>
  170. <geometry>
  171. <cylinder>
  172. <length>0.005</length>
  173. <radius>0.128</radius>
  174. </cylinder>
  175. </geometry>
  176. <surface>
  177. <contact>
  178. <ode/>
  179. </contact>
  180. <friction>
  181. <ode/>
  182. </friction>
  183. </surface>
  184. </collision>
  185. <visual name='rotor_1_visual'>
  186. <pose frame=''>0 0 0 0 -0 0</pose>
  187. <geometry>
  188. <mesh>
  189. <scale>1 1 1</scale>
  190. <uri>model://rotors_description/meshes/iris_prop_ccw.dae</uri>
  191. </mesh>
  192. </geometry>
  193. <material>
  194. <script>
  195. <name>Gazebo/DarkGrey</name>
  196. <uri>file://media/materials/scripts/gazebo.material</uri>
  197. </script>
  198. </material>
  199. </visual>
  200. <gravity>1</gravity>
  201. <velocity_decay/>
  202. </link>
  203. <joint name='rotor_1_joint' type='revolute'>
  204. <child>rotor_1</child>
  205. <parent>base_link</parent>
  206. <axis>
  207. <xyz>0 0 1</xyz>
  208. <limit>
  209. <lower>-1e+16</lower>
  210. <upper>1e+16</upper>
  211. </limit>
  212. <dynamics>
  213. <spring_reference>0</spring_reference>
  214. <spring_stiffness>0</spring_stiffness>
  215. </dynamics>
  216. <use_parent_model_frame>1</use_parent_model_frame>
  217. </axis>
  218. </joint>
  219. <link name='rotor_2'>
  220. <pose frame=''>0.13 0.22 0.023 0 -0 0</pose>
  221. <inertial>
  222. <pose frame=''>0 0 0 0 -0 0</pose>
  223. <mass>0.005</mass>
  224. <inertia>
  225. <ixx>9.75e-07</ixx>
  226. <ixy>0</ixy>
  227. <ixz>0</ixz>
  228. <iyy>0.000273104</iyy>
  229. <iyz>0</iyz>
  230. <izz>0.000274004</izz>
  231. </inertia>
  232. </inertial>
  233. <collision name='rotor_2_collision'>
  234. <pose frame=''>0 0 0 0 -0 0</pose>
  235. <geometry>
  236. <cylinder>
  237. <length>0.005</length>
  238. <radius>0.128</radius>
  239. </cylinder>
  240. </geometry>
  241. <surface>
  242. <contact>
  243. <ode/>
  244. </contact>
  245. <friction>
  246. <ode/>
  247. </friction>
  248. </surface>
  249. </collision>
  250. <visual name='rotor_2_visual'>
  251. <pose frame=''>0 0 0 0 -0 0</pose>
  252. <geometry>
  253. <mesh>
  254. <scale>1 1 1</scale>
  255. <uri>model://rotors_description/meshes/iris_prop_cw.dae</uri>
  256. </mesh>
  257. </geometry>
  258. <material>
  259. <script>
  260. <name>Gazebo/Blue</name>
  261. <uri>file://media/materials/scripts/gazebo.material</uri>
  262. </script>
  263. </material>
  264. </visual>
  265. <gravity>1</gravity>
  266. <velocity_decay/>
  267. </link>
  268. <joint name='rotor_2_joint' type='revolute'>
  269. <child>rotor_2</child>
  270. <parent>base_link</parent>
  271. <axis>
  272. <xyz>0 0 1</xyz>
  273. <limit>
  274. <lower>-1e+16</lower>
  275. <upper>1e+16</upper>
  276. </limit>
  277. <dynamics>
  278. <spring_reference>0</spring_reference>
  279. <spring_stiffness>0</spring_stiffness>
  280. </dynamics>
  281. <use_parent_model_frame>1</use_parent_model_frame>
  282. </axis>
  283. </joint>
  284. <link name='rotor_3'>
  285. <pose frame=''>-0.13 -0.2 0.023 0 -0 0</pose>
  286. <inertial>
  287. <pose frame=''>0 0 0 0 -0 0</pose>
  288. <mass>0.005</mass>
  289. <inertia>
  290. <ixx>9.75e-07</ixx>
  291. <ixy>0</ixy>
  292. <ixz>0</ixz>
  293. <iyy>0.000273104</iyy>
  294. <iyz>0</iyz>
  295. <izz>0.000274004</izz>
  296. </inertia>
  297. </inertial>
  298. <collision name='rotor_3_collision'>
  299. <pose frame=''>0 0 0 0 -0 0</pose>
  300. <geometry>
  301. <cylinder>
  302. <length>0.005</length>
  303. <radius>0.128</radius>
  304. </cylinder>
  305. </geometry>
  306. <surface>
  307. <contact>
  308. <ode/>
  309. </contact>
  310. <friction>
  311. <ode/>
  312. </friction>
  313. </surface>
  314. </collision>
  315. <visual name='rotor_3_visual'>
  316. <pose frame=''>0 0 0 0 -0 0</pose>
  317. <geometry>
  318. <mesh>
  319. <scale>1 1 1</scale>
  320. <uri>model://rotors_description/meshes/iris_prop_cw.dae</uri>
  321. </mesh>
  322. </geometry>
  323. <material>
  324. <script>
  325. <name>Gazebo/DarkGrey</name>
  326. <uri>file://media/materials/scripts/gazebo.material</uri>
  327. </script>
  328. </material>
  329. </visual>
  330. <gravity>1</gravity>
  331. <velocity_decay/>
  332. </link>
  333. <joint name='rotor_3_joint' type='revolute'>
  334. <child>rotor_3</child>
  335. <parent>base_link</parent>
  336. <axis>
  337. <xyz>0 0 1</xyz>
  338. <limit>
  339. <lower>-1e+16</lower>
  340. <upper>1e+16</upper>
  341. </limit>
  342. <dynamics>
  343. <spring_reference>0</spring_reference>
  344. <spring_stiffness>0</spring_stiffness>
  345. </dynamics>
  346. <use_parent_model_frame>1</use_parent_model_frame>
  347. </axis>
  348. </joint>
  349. <plugin name='rosbag' filename='libgazebo_multirotor_base_plugin.so'>
  350. <robotNamespace/>
  351. <linkName>base_link</linkName>
  352. <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
  353. </plugin>
  354. <plugin name='front_right_motor_model' filename='libgazebo_motor_model.so'>
  355. <robotNamespace/>
  356. <jointName>rotor_0_joint</jointName>
  357. <linkName>rotor_0</linkName>
  358. <turningDirection>ccw</turningDirection>
  359. <timeConstantUp>0.0125</timeConstantUp>
  360. <timeConstantDown>0.025</timeConstantDown>
  361. <maxRotVelocity>1100</maxRotVelocity>
  362. <motorConstant>8.54858e-06</motorConstant>
  363. <momentConstant>0.06</momentConstant>
  364. <commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
  365. <motorNumber>0</motorNumber>
  366. <rotorDragCoefficient>0.000175</rotorDragCoefficient>
  367. <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
  368. <motorSpeedPubTopic>/motor_speed/0</motorSpeedPubTopic>
  369. <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
  370. </plugin>
  371. <plugin name='back_left_motor_model' filename='libgazebo_motor_model.so'>
  372. <robotNamespace/>
  373. <jointName>rotor_1_joint</jointName>
  374. <linkName>rotor_1</linkName>
  375. <turningDirection>ccw</turningDirection>
  376. <timeConstantUp>0.0125</timeConstantUp>
  377. <timeConstantDown>0.025</timeConstantDown>
  378. <maxRotVelocity>1100</maxRotVelocity>
  379. <motorConstant>8.54858e-06</motorConstant>
  380. <momentConstant>0.06</momentConstant>
  381. <commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
  382. <motorNumber>1</motorNumber>
  383. <rotorDragCoefficient>0.000175</rotorDragCoefficient>
  384. <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
  385. <motorSpeedPubTopic>/motor_speed/1</motorSpeedPubTopic>
  386. <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
  387. </plugin>
  388. <plugin name='front_left_motor_model' filename='libgazebo_motor_model.so'>
  389. <robotNamespace/>
  390. <jointName>rotor_2_joint</jointName>
  391. <linkName>rotor_2</linkName>
  392. <turningDirection>cw</turningDirection>
  393. <timeConstantUp>0.0125</timeConstantUp>
  394. <timeConstantDown>0.025</timeConstantDown>
  395. <maxRotVelocity>1100</maxRotVelocity>
  396. <motorConstant>8.54858e-06</motorConstant>
  397. <momentConstant>0.06</momentConstant>
  398. <commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
  399. <motorNumber>2</motorNumber>
  400. <rotorDragCoefficient>0.000175</rotorDragCoefficient>
  401. <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
  402. <motorSpeedPubTopic>/motor_speed/2</motorSpeedPubTopic>
  403. <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
  404. </plugin>
  405. <plugin name='back_right_motor_model' filename='libgazebo_motor_model.so'>
  406. <robotNamespace/>
  407. <jointName>rotor_3_joint</jointName>
  408. <linkName>rotor_3</linkName>
  409. <turningDirection>cw</turningDirection>
  410. <timeConstantUp>0.0125</timeConstantUp>
  411. <timeConstantDown>0.025</timeConstantDown>
  412. <maxRotVelocity>1100</maxRotVelocity>
  413. <motorConstant>8.54858e-06</motorConstant>
  414. <momentConstant>0.06</momentConstant>
  415. <commandSubTopic>/gazebo/command/motor_speed</commandSubTopic>
  416. <motorNumber>3</motorNumber>
  417. <rotorDragCoefficient>0.000175</rotorDragCoefficient>
  418. <rollingMomentCoefficient>1e-06</rollingMomentCoefficient>
  419. <motorSpeedPubTopic>/motor_speed/3</motorSpeedPubTopic>
  420. <rotorVelocitySlowdownSim>10</rotorVelocitySlowdownSim>
  421. </plugin>
  422. <plugin name='gps_plugin' filename='libgazebo_gps_plugin.so'>
  423. <robotNamespace/>
  424. <gpsNoise>1</gpsNoise>
  425. </plugin>
  426. <plugin name='magnetometer_plugin' filename='libgazebo_magnetometer_plugin.so'>
  427. <robotNamespace/>
  428. <pubRate>100</pubRate>
  429. <noiseDensity>0.0004</noiseDensity>
  430. <randomWalk>6.4e-06</randomWalk>
  431. <biasCorrelationTime>600</biasCorrelationTime>
  432. <magTopic>/mag</magTopic>
  433. </plugin>
  434. <plugin name='barometer_plugin' filename='libgazebo_barometer_plugin.so'>
  435. <robotNamespace/>
  436. <pubRate>50</pubRate>
  437. <baroTopic>/baro</baroTopic>
  438. </plugin>
  439. <plugin name='mavlink_interface' filename='libgazebo_mavlink_interface.so'>
  440. <robotNamespace/>
  441. <imuSubTopic>/imu</imuSubTopic>
  442. <gpsSubTopic>/gps</gpsSubTopic>
  443. <magSubTopic>/mag</magSubTopic>
  444. <baroSubTopic>/baro</baroSubTopic>
  445. <mavlink_addr>INADDR_ANY</mavlink_addr>
  446. <mavlink_udp_port>14560</mavlink_udp_port>
  447. <mavlink_tcp_port>4560</mavlink_tcp_port>
  448. <serialEnabled>0</serialEnabled>
  449. <serialDevice>/dev/ttyACM0</serialDevice>
  450. <baudRate>921600</baudRate>
  451. <qgc_addr>INADDR_ANY</qgc_addr>
  452. <qgc_udp_port>14550</qgc_udp_port>
  453. <sdk_addr>INADDR_ANY</sdk_addr>
  454. <sdk_udp_port>14540</sdk_udp_port>
  455. <hil_mode>0</hil_mode>
  456. <hil_state_level>0</hil_state_level>
  457. <vehicle_is_tailsitter>0</vehicle_is_tailsitter>
  458. <send_vision_estimation>1</send_vision_estimation>
  459. <send_odometry>0</send_odometry>
  460. <enable_lockstep>1</enable_lockstep>
  461. <use_tcp>1</use_tcp>
  462. <motorSpeedCommandPubTopic>/gazebo/command/motor_speed</motorSpeedCommandPubTopic>
  463. <control_channels>
  464. <channel name='rotor1'>
  465. <input_index>0</input_index>
  466. <input_offset>0</input_offset>
  467. <input_scaling>1000</input_scaling>
  468. <zero_position_disarmed>0</zero_position_disarmed>
  469. <zero_position_armed>100</zero_position_armed>
  470. <joint_control_type>velocity</joint_control_type>
  471. </channel>
  472. <channel name='rotor2'>
  473. <input_index>1</input_index>
  474. <input_offset>0</input_offset>
  475. <input_scaling>1000</input_scaling>
  476. <zero_position_disarmed>0</zero_position_disarmed>
  477. <zero_position_armed>100</zero_position_armed>
  478. <joint_control_type>velocity</joint_control_type>
  479. </channel>
  480. <channel name='rotor3'>
  481. <input_index>2</input_index>
  482. <input_offset>0</input_offset>
  483. <input_scaling>1000</input_scaling>
  484. <zero_position_disarmed>0</zero_position_disarmed>
  485. <zero_position_armed>100</zero_position_armed>
  486. <joint_control_type>velocity</joint_control_type>
  487. </channel>
  488. <channel name='rotor4'>
  489. <input_index>3</input_index>
  490. <input_offset>0</input_offset>
  491. <input_scaling>1000</input_scaling>
  492. <zero_position_disarmed>0</zero_position_disarmed>
  493. <zero_position_armed>100</zero_position_armed>
  494. <joint_control_type>velocity</joint_control_type>
  495. </channel>
  496. <channel name='rotor5'>
  497. <input_index>4</input_index>
  498. <input_offset>1</input_offset>
  499. <input_scaling>324.6</input_scaling>
  500. <zero_position_disarmed>0</zero_position_disarmed>
  501. <zero_position_armed>0</zero_position_armed>
  502. <joint_control_type>velocity</joint_control_type>
  503. <joint_control_pid>
  504. <p>0.1</p>
  505. <i>0</i>
  506. <d>0</d>
  507. <iMax>0.0</iMax>
  508. <iMin>0.0</iMin>
  509. <cmdMax>2</cmdMax>
  510. <cmdMin>-2</cmdMin>
  511. </joint_control_pid>
  512. <joint_name>zephyr_delta_wing::propeller_joint</joint_name>
  513. </channel>
  514. <channel name='rotor6'>
  515. <input_index>5</input_index>
  516. <input_offset>0</input_offset>
  517. <input_scaling>0.524</input_scaling>
  518. <zero_position_disarmed>0</zero_position_disarmed>
  519. <zero_position_armed>0</zero_position_armed>
  520. <joint_control_type>position</joint_control_type>
  521. <joint_name>zephyr_delta_wing::flap_left_joint</joint_name>
  522. <joint_control_pid>
  523. <p>10.0</p>
  524. <i>0</i>
  525. <d>0</d>
  526. <iMax>0</iMax>
  527. <iMin>0</iMin>
  528. <cmdMax>20</cmdMax>
  529. <cmdMin>-20</cmdMin>
  530. </joint_control_pid>
  531. </channel>
  532. <channel name='rotor7'>
  533. <input_index>6</input_index>
  534. <input_offset>0</input_offset>
  535. <input_scaling>0.524</input_scaling>
  536. <zero_position_disarmed>0</zero_position_disarmed>
  537. <zero_position_armed>0</zero_position_armed>
  538. <joint_control_type>position</joint_control_type>
  539. <joint_name>zephyr_delta_wing::flap_right_joint</joint_name>
  540. <joint_control_pid>
  541. <p>10.0</p>
  542. <i>0</i>
  543. <d>0</d>
  544. <iMax>0</iMax>
  545. <iMin>0</iMin>
  546. <cmdMax>20</cmdMax>
  547. <cmdMin>-20</cmdMin>
  548. </joint_control_pid>
  549. </channel>
  550. <channel name='rotor8'>
  551. <input_index>7</input_index>
  552. <input_offset>0</input_offset>
  553. <input_scaling>0.524</input_scaling>
  554. <zero_position_disarmed>0</zero_position_disarmed>
  555. <zero_position_armed>0</zero_position_armed>
  556. <joint_control_type>position</joint_control_type>
  557. </channel>
  558. </control_channels>
  559. </plugin>
  560. <static>0</static>
  561. <plugin name='rotors_gazebo_imu_plugin' filename='libgazebo_imu_plugin.so'>
  562. <robotNamespace/>
  563. <linkName>/imu_link</linkName>
  564. <imuTopic>/imu</imuTopic>
  565. <gyroscopeNoiseDensity>0.00018665</gyroscopeNoiseDensity>
  566. <gyroscopeRandomWalk>3.8785e-05</gyroscopeRandomWalk>
  567. <gyroscopeBiasCorrelationTime>1000.0</gyroscopeBiasCorrelationTime>
  568. <gyroscopeTurnOnBiasSigma>0.0087</gyroscopeTurnOnBiasSigma>
  569. <accelerometerNoiseDensity>0.00186</accelerometerNoiseDensity>
  570. <accelerometerRandomWalk>0.006</accelerometerRandomWalk>
  571. <accelerometerBiasCorrelationTime>300.0</accelerometerBiasCorrelationTime>
  572. <accelerometerTurnOnBiasSigma>0.196</accelerometerTurnOnBiasSigma>
  573. </plugin>
  574. <include>
  575. <uri>model://realsense_camera</uri>
  576. <pose>0.1 0 0 0 0 0</pose>
  577. </include>
  578. <joint name="realsense_camera_joint" type="revolute">
  579. <child>realsense_camera::link</child>
  580. <parent>base_link</parent>
  581. <axis>
  582. <xyz>0 0 1</xyz>
  583. <limit>
  584. <upper>0</upper>
  585. <lower>0</lower>
  586. </limit>
  587. </axis>
  588. </joint>
  589. <include>
  590. <uri>model://monocular_camera</uri>
  591. <pose>0 0 -0.03 0 1.5707963 0</pose>
  592. </include>
  593. <joint name="monocular_down_joint" type="fixed">
  594. <child>monocular_camera::link</child>
  595. <parent>base_link</parent>
  596. <axis>
  597. <xyz>0 0 1</xyz>
  598. <limit>
  599. <upper>0</upper>
  600. <lower>0</lower>
  601. </limit>
  602. </axis>
  603. </joint>
  604. <!-- For Hokuyo Lidar Payload -->
  605. <include>
  606. <uri>model://hokuyo_lidar</uri>
  607. <pose>0 0 0.06 0 0 0</pose>
  608. </include>
  609. <joint name="lidar_joint" type="fixed">
  610. <child>hokuyo_lidar::link</child>
  611. <parent>base_link</parent>
  612. <axis>
  613. <xyz>0 0 1</xyz>
  614. <limit>
  615. <upper>0</upper>
  616. <lower>0</lower>
  617. </limit>
  618. </axis>
  619. </joint>
  620. <!-- For laser Range Finder Payload -->
  621. <include>
  622. <uri>model://laser_rangefinder</uri>
  623. <pose>0 0 -0.05 0 1.570796 0</pose>
  624. </include>
  625. <joint name="laser_1d_joint" type="fixed">
  626. <child>laser_rangefinder::link</child>
  627. <parent>base_link</parent>
  628. <axis>
  629. <xyz>0 0 1</xyz>
  630. <limit>
  631. <upper>0</upper>
  632. <lower>0</lower>
  633. </limit>
  634. </axis>
  635. </joint>
  636. <!-- For IMU-->
  637. <include>
  638. <uri>model://imu_gazebo</uri>
  639. <pose>0 0 0.3 0 0 0</pose>
  640. </include>
  641. <joint name="imu_gazebo_joint" type="fixed">
  642. <child>imu_gazebo::link</child>
  643. <parent>base_link</parent>
  644. <axis>
  645. <xyz>0 0 1</xyz>
  646. <limit>
  647. <upper>0</upper>
  648. <lower>0</lower>
  649. </limit>
  650. </axis>
  651. </joint>
  652. </model>
  653. </sdf>
  654. <!-- vim: set noet fenc=utf-8 ff=unix sts=0 sw=4 ts=4 : -->

model.config

  1. <?xml version="1.0"?>
  2. <model>
  3. <name>Iris with all sensor</name>
  4. <version>1.0</version>
  5. <sdf version='1.5'>iris_all_sensor.sdf</sdf>
  6. <author>
  7. <name>wsj</name>
  8. <email>wangshujie@nuaa.edu.cn</email>
  9. </author>
  10. <description>
  11. This is a model of the 3DR Iris Quadrotor for Zhihangcup competition.
  12. </description>
  13. </model>

附录二:无人机测试环境及launch文件

map_maze_target.world

  1. <sdf version='1.6'>
  2. <world name='default'>
  3. <light name='sun' type='directional'>
  4. <cast_shadows>1</cast_shadows>
  5. <pose frame=''>0 0 10 0 -0 0</pose>
  6. <diffuse>0.8 0.8 0.8 1</diffuse>
  7. <specular>0.2 0.2 0.2 1</specular>
  8. <attenuation>
  9. <range>1000</range>
  10. <constant>0.9</constant>
  11. <linear>0.01</linear>
  12. <quadratic>0.001</quadratic>
  13. </attenuation>
  14. <direction>-0.5 0.1 -0.9</direction>
  15. </light>
  16. <model name='ceiling'>
  17. <link name='link'>
  18. <inertial>
  19. <pose frame=''>0 0 0 0 0 0</pose>
  20. <mass>100000</mass>
  21. <inertia>
  22. <ixx>100000</ixx>
  23. <ixy>0</ixy>
  24. <ixz>0</ixz>
  25. <iyy>100000</iyy>
  26. <iyz>0</iyz>
  27. <izz>100000</izz>
  28. </inertia>
  29. </inertial>
  30. <collision name='collision'>
  31. <pose frame=''>0 0 0 0 -0 0</pose>
  32. <geometry>
  33. <box>
  34. <size>300 300 0.5</size>
  35. </box>
  36. </geometry>
  37. <friction>
  38. <ode>
  39. <mu>1</mu>
  40. <mu2>1</mu2>
  41. </ode>
  42. <torsional>
  43. <ode/>
  44. </torsional>
  45. </friction>
  46. <contact>
  47. <ode>
  48. <kp>1e+07</kp>
  49. <kd>1</kd>
  50. <min_depth>0.001</min_depth>
  51. <max_vel>0.1</max_vel>
  52. </ode>
  53. </contact>
  54. <bounce/>
  55. <max_contacts>10</max_contacts>
  56. </collision>
  57. <self_collide>0</self_collide>
  58. <enable_wind>0</enable_wind>
  59. <kinematic>0</kinematic>
  60. </link>
  61. <pose frame=''>0 0 5 0 0 0</pose>
  62. </model>
  63. <model name='ground_plane'>
  64. <static>1</static>
  65. <link name='link'>
  66. <collision name='collision'>
  67. <geometry>
  68. <plane>
  69. <normal>0 0 1</normal>
  70. <size>300 300</size>
  71. </plane>
  72. </geometry>
  73. <surface>
  74. <friction>
  75. <ode>
  76. <mu>100</mu>
  77. <mu2>50</mu2>
  78. </ode>
  79. <torsional>
  80. <ode/>
  81. </torsional>
  82. </friction>
  83. <contact>
  84. <ode/>
  85. </contact>
  86. <bounce/>
  87. </surface>
  88. <max_contacts>10</max_contacts>
  89. </collision>
  90. <visual name='visual'>
  91. <cast_shadows>0</cast_shadows>
  92. <geometry>
  93. <plane>
  94. <normal>0 0 1</normal>
  95. <size>300 300</size>
  96. </plane>
  97. </geometry>
  98. <material>
  99. <script>
  100. <uri>file://media/materials/scripts/gazebo.material</uri>
  101. <name>Gazebo/Grey</name>
  102. </script>
  103. </material>
  104. </visual>
  105. <self_collide>0</self_collide>
  106. <enable_wind>0</enable_wind>
  107. <kinematic>0</kinematic>
  108. </link>
  109. </model>
  110. <gravity>0 0 -9.8</gravity>
  111. <magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>
  112. <atmosphere type='adiabatic'/>
  113. <physics name='default_physics' default='0' type='ode'>
  114. <max_step_size>0.001</max_step_size>
  115. <real_time_factor>1</real_time_factor>
  116. <real_time_update_rate>1000</real_time_update_rate>
  117. </physics>
  118. <scene>
  119. <ambient>0.4 0.4 0.4 1</ambient>
  120. <background>0.7 0.7 0.7 1</background>
  121. <shadows>1</shadows>
  122. </scene>
  123. <wind/>
  124. <spherical_coordinates>
  125. <surface_model>EARTH_WGS84</surface_model>
  126. <latitude_deg>0</latitude_deg>
  127. <longitude_deg>0</longitude_deg>
  128. <elevation>0</elevation>
  129. <heading_deg>0</heading_deg>
  130. </spherical_coordinates>
  131. <model name='map2_1'>
  132. <pose frame=''>1.002 -6.58047 0 0 -0 0</pose>
  133. <link name='Wall_0'>
  134. <collision name='Wall_0_Collision'>
  135. <geometry>
  136. <box>
  137. <size>7.75 0.2 2.5</size>
  138. </box>
  139. </geometry>
  140. <pose frame=''>0 0 1.25 0 -0 0</pose>
  141. <max_contacts>10</max_contacts>
  142. <surface>
  143. <contact>
  144. <ode/>
  145. </contact>
  146. <bounce/>
  147. <friction>
  148. <torsional>
  149. <ode/>
  150. </torsional>
  151. <ode/>
  152. </friction>
  153. </surface>
  154. </collision>
  155. <visual name='Wall_0_Visual'>
  156. <pose frame=''>0 0 1.25 0 -0 0</pose>
  157. <geometry>
  158. <box>
  159. <size>7.75 0.2 2.5</size>
  160. </box>
  161. </geometry>
  162. <material>
  163. <script>
  164. <uri>file://media/materials/scripts/gazebo.material</uri>
  165. <name>Gazebo/Bricks</name>
  166. </script>
  167. <ambient>1 1 1 1</ambient>
  168. </material>
  169. <meta>
  170. <layer>0</layer>
  171. </meta>
  172. </visual>
  173. <pose frame=''>-18.6196 5.51467 0 0 -0 1.5708</pose>
  174. <self_collide>0</self_collide>
  175. <enable_wind>0</enable_wind>
  176. <kinematic>0</kinematic>
  177. </link>
  178. <link name='Wall_1'>
  179. <collision name='Wall_1_Collision'>
  180. <geometry>
  181. <box>
  182. <size>37.3896 0.2 2.5</size>
  183. </box>
  184. </geometry>
  185. <pose frame=''>0 0 1.25 0 -0 0</pose>
  186. <max_contacts>10</max_contacts>
  187. <surface>
  188. <contact>
  189. <ode/>
  190. </contact>
  191. <bounce/>
  192. <friction>
  193. <torsional>
  194. <ode/>
  195. </torsional>
  196. <ode/>
  197. </friction>
  198. </surface>
  199. </collision>
  200. <visual name='Wall_1_Visual'>
  201. <pose frame=''>0 0 1.25 0 -0 0</pose>
  202. <geometry>
  203. <box>
  204. <size>37.3896 0.2 2.5</size>
  205. </box>
  206. </geometry>
  207. <material>
  208. <script>
  209. <uri>file://media/materials/scripts/gazebo.material</uri>
  210. <name>Gazebo/Bricks</name>
  211. </script>
  212. <ambient>1 1 1 1</ambient>
  213. </material>
  214. <meta>
  215. <layer>0</layer>
  216. </meta>
  217. </visual>
  218. <pose frame=''>0.0002 9.31467 0 0 -0 0</pose>
  219. <self_collide>0</self_collide>
  220. <enable_wind>0</enable_wind>
  221. <kinematic>0</kinematic>
  222. </link>
  223. <link name='Wall_10'>
  224. <collision name='Wall_10_Collision'>
  225. <geometry>
  226. <box>
  227. <size>3.93638 0.2 2.5</size>
  228. </box>
  229. </geometry>
  230. <pose frame=''>0 0 1.25 0 -0 0</pose>
  231. <max_contacts>10</max_contacts>
  232. <surface>
  233. <contact>
  234. <ode/>
  235. </contact>
  236. <bounce/>
  237. <friction>
  238. <torsional>
  239. <ode/>
  240. </torsional>
  241. <ode/>
  242. </friction>
  243. </surface>
  244. </collision>
  245. <visual name='Wall_10_Visual'>
  246. <pose frame=''>0 0 1.25 0 -0 0</pose>
  247. <geometry>
  248. <box>
  249. <size>3.93638 0.2 2.5</size>
  250. </box>
  251. </geometry>
  252. <material>
  253. <script>
  254. <uri>file://media/materials/scripts/gazebo.material</uri>
  255. <name>Gazebo/Bricks</name>
  256. </script>
  257. <ambient>1 1 1 1</ambient>
  258. </material>
  259. <meta>
  260. <layer>0</layer>
  261. </meta>
  262. </visual>
  263. <pose frame=''>-13.0365 1.84322 0 0 -0 -0.012287</pose>
  264. <self_collide>0</self_collide>
  265. <enable_wind>0</enable_wind>
  266. <kinematic>0</kinematic>
  267. </link>
  268. <link name='Wall_11'>
  269. <collision name='Wall_11_Collision'>
  270. <geometry>
  271. <box>
  272. <size>3.84334 0.2 2.5</size>
  273. </box>
  274. </geometry>
  275. <pose frame=''>0 0 1.25 0 -0 0</pose>
  276. <max_contacts>10</max_contacts>
  277. <surface>
  278. <contact>
  279. <ode/>
  280. </contact>
  281. <bounce/>
  282. <friction>
  283. <torsional>
  284. <ode/>
  285. </torsional>
  286. <ode/>
  287. </friction>
  288. </surface>
  289. </collision>
  290. <visual name='Wall_11_Visual'>
  291. <pose frame=''>0 0 1.25 0 -0 0</pose>
  292. <geometry>
  293. <box>
  294. <size>3.84334 0.2 2.5</size>
  295. </box>
  296. </geometry>
  297. <material>
  298. <script>
  299. <uri>file://media/materials/scripts/gazebo.material</uri>
  300. <name>Gazebo/Bricks</name>
  301. </script>
  302. <ambient>1 1 1 1</ambient>
  303. </material>
  304. <meta>
  305. <layer>0</layer>
  306. </meta>
  307. </visual>
  308. <pose frame=''>-11.1667 -0.073086 0 0 -0 -1.58339</pose>
  309. <self_collide>0</self_collide>
  310. <enable_wind>0</enable_wind>
  311. <kinematic>0</kinematic>
  312. </link>
  313. <link name='Wall_12'>
  314. <collision name='Wall_12_Collision'>
  315. <geometry>
  316. <box>
  317. <size>11.25 0.2 2.5</size>
  318. </box>
  319. </geometry>
  320. <pose frame=''>0 0 1.25 0 -0 0</pose>
  321. <max_contacts>10</max_contacts>
  322. <surface>
  323. <contact>
  324. <ode/>
  325. </contact>
  326. <bounce/>
  327. <friction>
  328. <torsional>
  329. <ode/>
  330. </torsional>
  331. <ode/>
  332. </friction>
  333. </surface>
  334. </collision>
  335. <visual name='Wall_12_Visual'>
  336. <pose frame=''>0 0 1.25 0 -0 0</pose>
  337. <geometry>
  338. <box>
  339. <size>11.25 0.2 2.5</size>
  340. </box>
  341. </geometry>
  342. <material>
  343. <script>
  344. <uri>file://media/materials/scripts/gazebo.material</uri>
  345. <name>Gazebo/Bricks</name>
  346. </script>
  347. <ambient>1 1 1 1</ambient>
  348. </material>
  349. <meta>
  350. <layer>0</layer>
  351. </meta>
  352. </visual>
  353. <pose frame=''>-5.63996 -1.96613 0 0 -0 0</pose>
  354. <self_collide>0</self_collide>
  355. <enable_wind>0</enable_wind>
  356. <kinematic>0</kinematic>
  357. </link>
  358. <link name='Wall_14'>
  359. <collision name='Wall_14_Collision'>
  360. <geometry>
  361. <box>
  362. <size>4 0.2 2.5</size>
  363. </box>
  364. </geometry>
  365. <pose frame=''>0 0 1.25 0 -0 0</pose>
  366. <max_contacts>10</max_contacts>
  367. <surface>
  368. <contact>
  369. <ode/>
  370. </contact>
  371. <bounce/>
  372. <friction>
  373. <torsional>
  374. <ode/>
  375. </torsional>
  376. <ode/>
  377. </friction>
  378. </surface>
  379. </collision>
  380. <visual name='Wall_14_Visual'>
  381. <pose frame=''>0 0 1.25 0 -0 0</pose>
  382. <geometry>
  383. <box>
  384. <size>4 0.2 2.5</size>
  385. </box>
  386. </geometry>
  387. <material>
  388. <script>
  389. <uri>file://media/materials/scripts/gazebo.material</uri>
  390. <name>Gazebo/Bricks</name>
  391. </script>
  392. <ambient>1 1 1 1</ambient>
  393. </material>
  394. <meta>
  395. <layer>0</layer>
  396. </meta>
  397. </visual>
  398. <pose frame=''>-0.08996 -0.041134 0 0 -0 1.5708</pose>
  399. <self_collide>0</self_collide>
  400. <enable_wind>0</enable_wind>
  401. <kinematic>0</kinematic>
  402. </link>
  403. <link name='Wall_15'>
  404. <collision name='Wall_15_Collision'>
  405. <geometry>
  406. <box>
  407. <size>4 0.2 2.5</size>
  408. </box>
  409. </geometry>
  410. <pose frame=''>0 0 1.25 0 -0 0</pose>
  411. <max_contacts>10</max_contacts>
  412. <surface>
  413. <contact>
  414. <ode/>
  415. </contact>
  416. <bounce/>
  417. <friction>
  418. <torsional>
  419. <ode/>
  420. </torsional>
  421. <ode/>
  422. </friction>
  423. </surface>
  424. </collision>
  425. <visual name='Wall_15_Visual'>
  426. <pose frame=''>0 0 1.25 0 -0 0</pose>
  427. <geometry>
  428. <box>
  429. <size>4 0.2 2.5</size>
  430. </box>
  431. </geometry>
  432. <material>
  433. <script>
  434. <uri>file://media/materials/scripts/gazebo.material</uri>
  435. <name>Gazebo/Bricks</name>
  436. </script>
  437. <ambient>1 1 1 1</ambient>
  438. </material>
  439. <meta>
  440. <layer>0</layer>
  441. </meta>
  442. </visual>
  443. <pose frame=''>1.83504 1.88387 0 0 -0 0</pose>
  444. <self_collide>0</self_collide>
  445. <enable_wind>0</enable_wind>
  446. <kinematic>0</kinematic>
  447. </link>
  448. <link name='Wall_17'>
  449. <collision name='Wall_17_Collision'>
  450. <geometry>
  451. <box>
  452. <size>3.75 0.2 2.5</size>
  453. </box>
  454. </geometry>
  455. <pose frame=''>0 0 1.25 0 -0 0</pose>
  456. <max_contacts>10</max_contacts>
  457. <surface>
  458. <contact>
  459. <ode/>
  460. </contact>
  461. <bounce/>
  462. <friction>
  463. <torsional>
  464. <ode/>
  465. </torsional>
  466. <ode/>
  467. </friction>
  468. </surface>
  469. </collision>
  470. <visual name='Wall_17_Visual'>
  471. <pose frame=''>0 0 1.25 0 -0 0</pose>
  472. <geometry>
  473. <box>
  474. <size>3.75 0.2 2.5</size>
  475. </box>
  476. </geometry>
  477. <material>
  478. <script>
  479. <uri>file://media/materials/scripts/gazebo.material</uri>
  480. <name>Gazebo/Bricks</name>
  481. </script>
  482. <ambient>1 1 1 1</ambient>
  483. </material>
  484. <meta>
  485. <layer>0</layer>
  486. </meta>
  487. </visual>
  488. <pose frame=''>-7.48571 -3.74848 0 0 -0 -1.5708</pose>
  489. <self_collide>0</self_collide>
  490. <enable_wind>0</enable_wind>
  491. <kinematic>0</kinematic>
  492. </link>
  493. <link name='Wall_19'>
  494. <collision name='Wall_19_Collision'>
  495. <geometry>
  496. <box>
  497. <size>3.84422 0.2 2.5</size>
  498. </box>
  499. </geometry>
  500. <pose frame=''>0 0 1.25 0 -0 0</pose>
  501. <max_contacts>10</max_contacts>
  502. <surface>
  503. <contact>
  504. <ode/>
  505. </contact>
  506. <bounce/>
  507. <friction>
  508. <torsional>
  509. <ode/>
  510. </torsional>
  511. <ode/>
  512. </friction>
  513. </surface>
  514. </collision>
  515. <visual name='Wall_19_Visual'>
  516. <pose frame=''>0 0 1.25 0 -0 0</pose>
  517. <geometry>
  518. <box>
  519. <size>3.84422 0.2 2.5</size>
  520. </box>
  521. </geometry>
  522. <material>
  523. <script>
  524. <uri>file://media/materials/scripts/gazebo.material</uri>
  525. <name>Gazebo/Bricks</name>
  526. </script>
  527. <ambient>1 1 1 1</ambient>
  528. </material>
  529. <meta>
  530. <layer>0</layer>
  531. </meta>
  532. </visual>
  533. <pose frame=''>5.64847 5.54188 0 0 -0 -3.1164</pose>
  534. <self_collide>0</self_collide>
  535. <enable_wind>0</enable_wind>
  536. <kinematic>0</kinematic>
  537. </link>
  538. <link name='Wall_2'>
  539. <collision name='Wall_2_Collision'>
  540. <geometry>
  541. <box>
  542. <size>18.7327 0.2 2.5</size>
  543. </box>
  544. </geometry>
  545. <pose frame=''>0 0 1.25 0 -0 0</pose>
  546. <max_contacts>10</max_contacts>
  547. <surface>
  548. <contact>
  549. <ode/>
  550. </contact>
  551. <bounce/>
  552. <friction>
  553. <torsional>
  554. <ode/>
  555. </torsional>
  556. <ode/>
  557. </friction>
  558. </surface>
  559. </collision>
  560. <visual name='Wall_2_Visual'>
  561. <pose frame=''>0 0 1.25 0 -0 0</pose>
  562. <geometry>
  563. <box>
  564. <size>18.7327 0.2 2.5</size>
  565. </box>
  566. </geometry>
  567. <material>
  568. <script>
  569. <uri>file://media/materials/scripts/gazebo.material</uri>
  570. <name>Gazebo/Bricks</name>
  571. </script>
  572. <ambient>1 1 1 1</ambient>
  573. </material>
  574. <meta>
  575. <layer>0</layer>
  576. </meta>
  577. </visual>
  578. <pose frame=''>18.5502 -0.023168 0 0 -0 -1.5733</pose>
  579. <self_collide>0</self_collide>
  580. <enable_wind>0</enable_wind>
  581. <kinematic>0</kinematic>
  582. </link>
  583. <link name='Wall_20'>
  584. <collision name='Wall_20_Collision'>
  585. <geometry>
  586. <box>
  587. <size>7.5 0.2 2.5</size>
  588. </box>
  589. </geometry>
  590. <pose frame=''>0 0 1.25 0 -0 0</pose>
  591. <max_contacts>10</max_contacts>
  592. <surface>
  593. <contact>
  594. <ode/>
  595. </contact>
  596. <bounce/>
  597. <friction>
  598. <torsional>
  599. <ode/>
  600. </torsional>
  601. <ode/>
  602. </friction>
  603. </surface>
  604. </collision>
  605. <visual name='Wall_20_Visual'>
  606. <pose frame=''>0 0 1.25 0 -0 0</pose>
  607. <geometry>
  608. <box>
  609. <size>7.5 0.2 2.5</size>
  610. </box>
  611. </geometry>
  612. <material>
  613. <script>
  614. <uri>file://media/materials/scripts/gazebo.material</uri>
  615. <name>Gazebo/Bricks</name>
  616. </script>
  617. <ambient>1 1 1 1</ambient>
  618. </material>
  619. <meta>
  620. <layer>0</layer>
  621. </meta>
  622. </visual>
  623. <pose frame=''>3.75542 1.77383 0 0 -0 -1.5708</pose>
  624. <self_collide>0</self_collide>
  625. <enable_wind>0</enable_wind>
  626. <kinematic>0</kinematic>
  627. </link>
  628. <link name='Wall_21'>
  629. <collision name='Wall_21_Collision'>
  630. <geometry>
  631. <box>
  632. <size>3.75 0.2 2.5</size>
  633. </box>
  634. </geometry>
  635. <pose frame=''>0 0 1.25 0 -0 0</pose>
  636. <max_contacts>10</max_contacts>
  637. <surface>
  638. <contact>
  639. <ode/>
  640. </contact>
  641. <bounce/>
  642. <friction>
  643. <torsional>
  644. <ode/>
  645. </torsional>
  646. <ode/>
  647. </friction>
  648. </surface>
  649. </collision>
  650. <visual name='Wall_21_Visual'>
  651. <pose frame=''>0 0 1.25 0 -0 0</pose>
  652. <geometry>
  653. <box>
  654. <size>3.75 0.2 2.5</size>
  655. </box>
  656. </geometry>
  657. <material>
  658. <script>
  659. <uri>file://media/materials/scripts/gazebo.material</uri>
  660. <name>Gazebo/Bricks</name>
  661. </script>
  662. <ambient>1 1 1 1</ambient>
  663. </material>
  664. <meta>
  665. <layer>0</layer>
  666. </meta>
  667. </visual>
  668. <pose frame=''>5.60195 -1.85465 0 0 -0 0</pose>
  669. <self_collide>0</self_collide>
  670. <enable_wind>0</enable_wind>
  671. <kinematic>0</kinematic>
  672. </link>
  673. <link name='Wall_23'>
  674. <collision name='Wall_23_Collision'>
  675. <geometry>
  676. <box>
  677. <size>7.5 0.2 2.5</size>
  678. </box>
  679. </geometry>
  680. <pose frame=''>0 0 1.25 0 -0 0</pose>
  681. <max_contacts>10</max_contacts>
  682. <surface>
  683. <contact>
  684. <ode/>
  685. </contact>
  686. <bounce/>
  687. <friction>
  688. <torsional>
  689. <ode/>
  690. </torsional>
  691. <ode/>
  692. </friction>
  693. </surface>
  694. </collision>
  695. <visual name='Wall_23_Visual'>
  696. <pose frame=''>0 0 1.25 0 -0 0</pose>
  697. <geometry>
  698. <box>
  699. <size>7.5 0.2 2.5</size>
  700. </box>
  701. </geometry>
  702. <material>
  703. <script>
  704. <uri>file://media/materials/scripts/gazebo.material</uri>
  705. <name>Gazebo/Bricks</name>
  706. </script>
  707. <ambient>1 1 1 1</ambient>
  708. </material>
  709. <meta>
  710. <layer>0</layer>
  711. </meta>
  712. </visual>
  713. <pose frame=''>7.40195 -5.52965 0 0 -0 -1.5708</pose>
  714. <self_collide>0</self_collide>
  715. <enable_wind>0</enable_wind>
  716. <kinematic>0</kinematic>
  717. </link>
  718. <link name='Wall_25'>
  719. <collision name='Wall_25_Collision'>
  720. <geometry>
  721. <box>
  722. <size>3.75 0.2 2.5</size>
  723. </box>
  724. </geometry>
  725. <pose frame=''>0 0 1.25 0 -0 0</pose>
  726. <max_contacts>10</max_contacts>
  727. <surface>
  728. <contact>
  729. <ode/>
  730. </contact>
  731. <bounce/>
  732. <friction>
  733. <torsional>
  734. <ode/>
  735. </torsional>
  736. <ode/>
  737. </friction>
  738. </surface>
  739. </collision>
  740. <visual name='Wall_25_Visual'>
  741. <pose frame=''>0 0 1.25 0 -0 0</pose>
  742. <geometry>
  743. <box>
  744. <size>3.75 0.2 2.5</size>
  745. </box>
  746. </geometry>
  747. <material>
  748. <script>
  749. <uri>file://media/materials/scripts/gazebo.material</uri>
  750. <name>Gazebo/Bricks</name>
  751. </script>
  752. <ambient>1 1 1 1</ambient>
  753. </material>
  754. <meta>
  755. <layer>0</layer>
  756. </meta>
  757. </visual>
  758. <pose frame=''>-3.76379 -7.45273 0 0 -0 1.5708</pose>
  759. <self_collide>0</self_collide>
  760. <enable_wind>0</enable_wind>
  761. <kinematic>0</kinematic>
  762. </link>
  763. <link name='Wall_26'>
  764. <collision name='Wall_26_Collision'>
  765. <geometry>
  766. <box>
  767. <size>7.75 0.2 2.5</size>
  768. </box>
  769. </geometry>
  770. <pose frame=''>0 0 1.25 0 -0 0</pose>
  771. <max_contacts>10</max_contacts>
  772. <surface>
  773. <contact>
  774. <ode/>
  775. </contact>
  776. <bounce/>
  777. <friction>
  778. <torsional>
  779. <ode/>
  780. </torsional>
  781. <ode/>
  782. </friction>
  783. </surface>
  784. </collision>
  785. <visual name='Wall_26_Visual'>
  786. <pose frame=''>0 0 1.25 0 -0 0</pose>
  787. <geometry>
  788. <box>
  789. <size>7.75 0.2 2.5</size>
  790. </box>
  791. </geometry>
  792. <material>
  793. <script>
  794. <uri>file://media/materials/scripts/gazebo.material</uri>
  795. <name>Gazebo/Bricks</name>
  796. </script>
  797. <ambient>1 1 1 1</ambient>
  798. </material>
  799. <meta>
  800. <layer>0</layer>
  801. </meta>
  802. </visual>
  803. <pose frame=''>0.036208 -5.65273 0 0 -0 0</pose>
  804. <self_collide>0</self_collide>
  805. <enable_wind>0</enable_wind>
  806. <kinematic>0</kinematic>
  807. </link>
  808. <link name='Wall_28'>
  809. <collision name='Wall_28_Collision'>
  810. <geometry>
  811. <box>
  812. <size>4 0.2 2.5</size>
  813. </box>
  814. </geometry>
  815. <pose frame=''>0 0 1.25 0 -0 0</pose>
  816. <max_contacts>10</max_contacts>
  817. <surface>
  818. <contact>
  819. <ode/>
  820. </contact>
  821. <bounce/>
  822. <friction>
  823. <torsional>
  824. <ode/>
  825. </torsional>
  826. <ode/>
  827. </friction>
  828. </surface>
  829. </collision>
  830. <visual name='Wall_28_Visual'>
  831. <pose frame=''>0 0 1.25 0 -0 0</pose>
  832. <geometry>
  833. <box>
  834. <size>4 0.2 2.5</size>
  835. </box>
  836. </geometry>
  837. <material>
  838. <script>
  839. <uri>file://media/materials/scripts/gazebo.material</uri>
  840. <name>Gazebo/Bricks</name>
  841. </script>
  842. <ambient>1 1 1 1</ambient>
  843. </material>
  844. <meta>
  845. <layer>0</layer>
  846. </meta>
  847. </visual>
  848. <pose frame=''>11.1704 -7.37425 0 0 -0 1.5708</pose>
  849. <self_collide>0</self_collide>
  850. <enable_wind>0</enable_wind>
  851. <kinematic>0</kinematic>
  852. </link>
  853. <link name='Wall_30'>
  854. <collision name='Wall_30_Collision'>
  855. <geometry>
  856. <box>
  857. <size>4 0.2 2.5</size>
  858. </box>
  859. </geometry>
  860. <pose frame=''>0 0 1.25 0 -0 0</pose>
  861. <max_contacts>10</max_contacts>
  862. <surface>
  863. <contact>
  864. <ode/>
  865. </contact>
  866. <bounce/>
  867. <friction>
  868. <torsional>
  869. <ode/>
  870. </torsional>
  871. <ode/>
  872. </friction>
  873. </surface>
  874. </collision>
  875. <visual name='Wall_30_Visual'>
  876. <pose frame=''>0 0 1.25 0 -0 0</pose>
  877. <geometry>
  878. <box>
  879. <size>4 0.2 2.5</size>
  880. </box>
  881. </geometry>
  882. <material>
  883. <script>
  884. <uri>file://media/materials/scripts/gazebo.material</uri>
  885. <name>Gazebo/Bricks</name>
  886. </script>
  887. <ambient>1 1 1 1</ambient>
  888. </material>
  889. <meta>
  890. <layer>0</layer>
  891. </meta>
  892. </visual>
  893. <pose frame=''>9.28042 1.81996 0 0 -0 0</pose>
  894. <self_collide>0</self_collide>
  895. <enable_wind>0</enable_wind>
  896. <kinematic>0</kinematic>
  897. </link>
  898. <link name='Wall_32'>
  899. <collision name='Wall_32_Collision'>
  900. <geometry>
  901. <box>
  902. <size>4 0.2 2.5</size>
  903. </box>
  904. </geometry>
  905. <pose frame=''>0 0 1.25 0 -0 0</pose>
  906. <max_contacts>10</max_contacts>
  907. <surface>
  908. <contact>
  909. <ode/>
  910. </contact>
  911. <bounce/>
  912. <friction>
  913. <torsional>
  914. <ode/>
  915. </torsional>
  916. <ode/>
  917. </friction>
  918. </surface>
  919. </collision>
  920. <visual name='Wall_32_Visual'>
  921. <pose frame=''>0 0 1.25 0 -0 0</pose>
  922. <geometry>
  923. <box>
  924. <size>4 0.2 2.5</size>
  925. </box>
  926. </geometry>
  927. <material>
  928. <script>
  929. <uri>file://media/materials/scripts/gazebo.material</uri>
  930. <name>Gazebo/Bricks</name>
  931. </script>
  932. <ambient>1 1 1 1</ambient>
  933. </material>
  934. <meta>
  935. <layer>0</layer>
  936. </meta>
  937. </visual>
  938. <pose frame=''>13.0603 5.5884 0 0 -0 3.14159</pose>
  939. <self_collide>0</self_collide>
  940. <enable_wind>0</enable_wind>
  941. <kinematic>0</kinematic>
  942. </link>
  943. <link name='Wall_33'>
  944. <collision name='Wall_33_Collision'>
  945. <geometry>
  946. <box>
  947. <size>7.70353 0.2 2.5</size>
  948. </box>
  949. </geometry>
  950. <pose frame=''>0 0 1.25 0 -0 0</pose>
  951. <max_contacts>10</max_contacts>
  952. <surface>
  953. <contact>
  954. <ode/>
  955. </contact>
  956. <bounce/>
  957. <friction>
  958. <torsional>
  959. <ode/>
  960. </torsional>
  961. <ode/>
  962. </friction>
  963. </surface>
  964. </collision>
  965. <visual name='Wall_33_Visual'>
  966. <pose frame=''>0 0 1.25 0 -0 0</pose>
  967. <geometry>
  968. <box>
  969. <size>7.70353 0.2 2.5</size>
  970. </box>
  971. </geometry>
  972. <material>
  973. <script>
  974. <uri>file://media/materials/scripts/gazebo.material</uri>
  975. <name>Gazebo/Bricks</name>
  976. </script>
  977. <ambient>1 1 1 1</ambient>
  978. </material>
  979. <meta>
  980. <layer>0</layer>
  981. </meta>
  982. </visual>
  983. <pose frame=''>11.1499 1.81166 0 0 -0 -1.56694</pose>
  984. <self_collide>0</self_collide>
  985. <enable_wind>0</enable_wind>
  986. <kinematic>0</kinematic>
  987. </link>
  988. <link name='Wall_34'>
  989. <collision name='Wall_34_Collision'>
  990. <geometry>
  991. <box>
  992. <size>4 0.2 2.5</size>
  993. </box>
  994. </geometry>
  995. <pose frame=''>0 0 1.25 0 -0 0</pose>
  996. <max_contacts>10</max_contacts>
  997. <surface>
  998. <contact>
  999. <ode/>
  1000. </contact>
  1001. <bounce/>
  1002. <friction>
  1003. <torsional>
  1004. <ode/>
  1005. </torsional>
  1006. <ode/>
  1007. </friction>
  1008. </surface>
  1009. </collision>
  1010. <visual name='Wall_34_Visual'>
  1011. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1012. <geometry>
  1013. <box>
  1014. <size>4 0.2 2.5</size>
  1015. </box>
  1016. </geometry>
  1017. <material>
  1018. <script>
  1019. <uri>file://media/materials/scripts/gazebo.material</uri>
  1020. <name>Gazebo/Bricks</name>
  1021. </script>
  1022. <ambient>1 1 1 1</ambient>
  1023. </material>
  1024. <meta>
  1025. <layer>0</layer>
  1026. </meta>
  1027. </visual>
  1028. <pose frame=''>13.0895 -1.96508 0 0 -0 0</pose>
  1029. <self_collide>0</self_collide>
  1030. <enable_wind>0</enable_wind>
  1031. <kinematic>0</kinematic>
  1032. </link>
  1033. <link name='Wall_35'>
  1034. <collision name='Wall_35_Collision'>
  1035. <geometry>
  1036. <box>
  1037. <size>4 0.2 2.5</size>
  1038. </box>
  1039. </geometry>
  1040. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1041. <max_contacts>10</max_contacts>
  1042. <surface>
  1043. <contact>
  1044. <ode/>
  1045. </contact>
  1046. <bounce/>
  1047. <friction>
  1048. <torsional>
  1049. <ode/>
  1050. </torsional>
  1051. <ode/>
  1052. </friction>
  1053. </surface>
  1054. </collision>
  1055. <visual name='Wall_35_Visual'>
  1056. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1057. <geometry>
  1058. <box>
  1059. <size>4 0.2 2.5</size>
  1060. </box>
  1061. </geometry>
  1062. <material>
  1063. <script>
  1064. <uri>file://media/materials/scripts/gazebo.material</uri>
  1065. <name>Gazebo/Bricks</name>
  1066. </script>
  1067. <ambient>1 1 1 1</ambient>
  1068. </material>
  1069. <meta>
  1070. <layer>0</layer>
  1071. </meta>
  1072. </visual>
  1073. <pose frame=''>14.968 -0.040077 0 0 -0 1.5708</pose>
  1074. <self_collide>0</self_collide>
  1075. <enable_wind>0</enable_wind>
  1076. <kinematic>0</kinematic>
  1077. </link>
  1078. <link name='Wall_36'>
  1079. <collision name='Wall_36_Collision'>
  1080. <geometry>
  1081. <box>
  1082. <size>3.72116 0.2 2.5</size>
  1083. </box>
  1084. </geometry>
  1085. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1086. <max_contacts>10</max_contacts>
  1087. <surface>
  1088. <contact>
  1089. <ode/>
  1090. </contact>
  1091. <bounce/>
  1092. <friction>
  1093. <torsional>
  1094. <ode/>
  1095. </torsional>
  1096. <ode/>
  1097. </friction>
  1098. </surface>
  1099. </collision>
  1100. <visual name='Wall_36_Visual'>
  1101. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1102. <geometry>
  1103. <box>
  1104. <size>3.72116 0.2 2.5</size>
  1105. </box>
  1106. </geometry>
  1107. <material>
  1108. <script>
  1109. <uri>file://media/materials/scripts/gazebo.material</uri>
  1110. <name>Gazebo/Bricks</name>
  1111. </script>
  1112. <ambient>1 1 1 1</ambient>
  1113. </material>
  1114. <meta>
  1115. <layer>0</layer>
  1116. </meta>
  1117. </visual>
  1118. <pose frame=''>16.7999 1.86166 0 0 -0 -0.013028</pose>
  1119. <self_collide>0</self_collide>
  1120. <enable_wind>0</enable_wind>
  1121. <kinematic>0</kinematic>
  1122. </link>
  1123. <link name='Wall_38'>
  1124. <collision name='Wall_38_Collision'>
  1125. <geometry>
  1126. <box>
  1127. <size>4 0.2 2.5</size>
  1128. </box>
  1129. </geometry>
  1130. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1131. <max_contacts>10</max_contacts>
  1132. <surface>
  1133. <contact>
  1134. <ode/>
  1135. </contact>
  1136. <bounce/>
  1137. <friction>
  1138. <torsional>
  1139. <ode/>
  1140. </torsional>
  1141. <ode/>
  1142. </friction>
  1143. </surface>
  1144. </collision>
  1145. <visual name='Wall_38_Visual'>
  1146. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1147. <geometry>
  1148. <box>
  1149. <size>4 0.2 2.5</size>
  1150. </box>
  1151. </geometry>
  1152. <material>
  1153. <script>
  1154. <uri>file://media/materials/scripts/gazebo.material</uri>
  1155. <name>Gazebo/Bricks</name>
  1156. </script>
  1157. <ambient>1 1 1 1</ambient>
  1158. </material>
  1159. <meta>
  1160. <layer>0</layer>
  1161. </meta>
  1162. </visual>
  1163. <pose frame=''>-11.1611 7.38531 0 0 -0 -1.5708</pose>
  1164. <self_collide>0</self_collide>
  1165. <enable_wind>0</enable_wind>
  1166. <kinematic>0</kinematic>
  1167. </link>
  1168. <link name='Wall_39'>
  1169. <collision name='Wall_39_Collision'>
  1170. <geometry>
  1171. <box>
  1172. <size>3.84305 0.2 2.5</size>
  1173. </box>
  1174. </geometry>
  1175. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1176. <max_contacts>10</max_contacts>
  1177. <surface>
  1178. <contact>
  1179. <ode/>
  1180. </contact>
  1181. <bounce/>
  1182. <friction>
  1183. <torsional>
  1184. <ode/>
  1185. </torsional>
  1186. <ode/>
  1187. </friction>
  1188. </surface>
  1189. </collision>
  1190. <visual name='Wall_39_Visual'>
  1191. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1192. <geometry>
  1193. <box>
  1194. <size>3.84305 0.2 2.5</size>
  1195. </box>
  1196. </geometry>
  1197. <material>
  1198. <script>
  1199. <uri>file://media/materials/scripts/gazebo.material</uri>
  1200. <name>Gazebo/Bricks</name>
  1201. </script>
  1202. <ambient>1 1 1 1</ambient>
  1203. </material>
  1204. <meta>
  1205. <layer>0</layer>
  1206. </meta>
  1207. </visual>
  1208. <pose frame=''>-9.31457 5.46031 0 0 -0 0</pose>
  1209. <self_collide>0</self_collide>
  1210. <enable_wind>0</enable_wind>
  1211. <kinematic>0</kinematic>
  1212. </link>
  1213. <link name='Wall_4'>
  1214. <collision name='Wall_4_Collision'>
  1215. <geometry>
  1216. <box>
  1217. <size>37.3438 0.2 2.5</size>
  1218. </box>
  1219. </geometry>
  1220. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1221. <max_contacts>10</max_contacts>
  1222. <surface>
  1223. <contact>
  1224. <ode/>
  1225. </contact>
  1226. <bounce/>
  1227. <friction>
  1228. <torsional>
  1229. <ode/>
  1230. </torsional>
  1231. <ode/>
  1232. </friction>
  1233. </surface>
  1234. </collision>
  1235. <visual name='Wall_4_Visual'>
  1236. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1237. <geometry>
  1238. <box>
  1239. <size>37.3438 0.2 2.5</size>
  1240. </box>
  1241. </geometry>
  1242. <material>
  1243. <script>
  1244. <uri>file://media/materials/scripts/gazebo.material</uri>
  1245. <name>Gazebo/Bricks</name>
  1246. </script>
  1247. <ambient>1 1 1 1</ambient>
  1248. </material>
  1249. <meta>
  1250. <layer>0</layer>
  1251. </meta>
  1252. </visual>
  1253. <pose frame=''>-0.023062 -9.27664 0 0 -0 -3.14113</pose>
  1254. <self_collide>0</self_collide>
  1255. <enable_wind>0</enable_wind>
  1256. <kinematic>0</kinematic>
  1257. </link>
  1258. <link name='Wall_40'>
  1259. <collision name='Wall_40_Collision'>
  1260. <geometry>
  1261. <box>
  1262. <size>3.75 0.2 2.5</size>
  1263. </box>
  1264. </geometry>
  1265. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1266. <max_contacts>10</max_contacts>
  1267. <surface>
  1268. <contact>
  1269. <ode/>
  1270. </contact>
  1271. <bounce/>
  1272. <friction>
  1273. <torsional>
  1274. <ode/>
  1275. </torsional>
  1276. <ode/>
  1277. </friction>
  1278. </surface>
  1279. </collision>
  1280. <visual name='Wall_40_Visual'>
  1281. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1282. <geometry>
  1283. <box>
  1284. <size>3.75 0.2 2.5</size>
  1285. </box>
  1286. </geometry>
  1287. <material>
  1288. <script>
  1289. <uri>file://media/materials/scripts/gazebo.material</uri>
  1290. <name>Gazebo/Bricks</name>
  1291. </script>
  1292. <ambient>1 1 1 1</ambient>
  1293. </material>
  1294. <meta>
  1295. <layer>0</layer>
  1296. </meta>
  1297. </visual>
  1298. <pose frame=''>-7.51457 3.66031 0 0 -0 -1.5708</pose>
  1299. <self_collide>0</self_collide>
  1300. <enable_wind>0</enable_wind>
  1301. <kinematic>0</kinematic>
  1302. </link>
  1303. <link name='Wall_42'>
  1304. <collision name='Wall_42_Collision'>
  1305. <geometry>
  1306. <box>
  1307. <size>7.75 0.2 2.5</size>
  1308. </box>
  1309. </geometry>
  1310. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1311. <max_contacts>10</max_contacts>
  1312. <surface>
  1313. <contact>
  1314. <ode/>
  1315. </contact>
  1316. <bounce/>
  1317. <friction>
  1318. <torsional>
  1319. <ode/>
  1320. </torsional>
  1321. <ode/>
  1322. </friction>
  1323. </surface>
  1324. </collision>
  1325. <visual name='Wall_42_Visual'>
  1326. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1327. <geometry>
  1328. <box>
  1329. <size>7.75 0.2 2.5</size>
  1330. </box>
  1331. </geometry>
  1332. <material>
  1333. <script>
  1334. <uri>file://media/materials/scripts/gazebo.material</uri>
  1335. <name>Gazebo/Bricks</name>
  1336. </script>
  1337. <ambient>1 1 1 1</ambient>
  1338. </material>
  1339. <meta>
  1340. <layer>0</layer>
  1341. </meta>
  1342. </visual>
  1343. <pose frame=''>-3.76379 5.46379 0 0 -0 -1.5708</pose>
  1344. <self_collide>0</self_collide>
  1345. <enable_wind>0</enable_wind>
  1346. <kinematic>0</kinematic>
  1347. </link>
  1348. <link name='Wall_44'>
  1349. <collision name='Wall_44_Collision'>
  1350. <geometry>
  1351. <box>
  1352. <size>4 0.2 2.5</size>
  1353. </box>
  1354. </geometry>
  1355. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1356. <max_contacts>10</max_contacts>
  1357. <surface>
  1358. <contact>
  1359. <ode/>
  1360. </contact>
  1361. <bounce/>
  1362. <friction>
  1363. <torsional>
  1364. <ode/>
  1365. </torsional>
  1366. <ode/>
  1367. </friction>
  1368. </surface>
  1369. </collision>
  1370. <visual name='Wall_44_Visual'>
  1371. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1372. <geometry>
  1373. <box>
  1374. <size>4 0.2 2.5</size>
  1375. </box>
  1376. </geometry>
  1377. <material>
  1378. <script>
  1379. <uri>file://media/materials/scripts/gazebo.material</uri>
  1380. <name>Gazebo/Bricks</name>
  1381. </script>
  1382. <ambient>1 1 1 1</ambient>
  1383. </material>
  1384. <meta>
  1385. <layer>0</layer>
  1386. </meta>
  1387. </visual>
  1388. <pose frame=''>-1.83879 5.54188 0 0 -0 0</pose>
  1389. <self_collide>0</self_collide>
  1390. <enable_wind>0</enable_wind>
  1391. <kinematic>0</kinematic>
  1392. </link>
  1393. <link name='Wall_5'>
  1394. <collision name='Wall_5_Collision'>
  1395. <geometry>
  1396. <box>
  1397. <size>7.5 0.2 2.5</size>
  1398. </box>
  1399. </geometry>
  1400. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1401. <max_contacts>10</max_contacts>
  1402. <surface>
  1403. <contact>
  1404. <ode/>
  1405. </contact>
  1406. <bounce/>
  1407. <friction>
  1408. <torsional>
  1409. <ode/>
  1410. </torsional>
  1411. <ode/>
  1412. </friction>
  1413. </surface>
  1414. </collision>
  1415. <visual name='Wall_5_Visual'>
  1416. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1417. <geometry>
  1418. <box>
  1419. <size>7.5 0.2 2.5</size>
  1420. </box>
  1421. </geometry>
  1422. <material>
  1423. <script>
  1424. <uri>file://media/materials/scripts/gazebo.material</uri>
  1425. <name>Gazebo/Bricks</name>
  1426. </script>
  1427. <ambient>1 1 1 1</ambient>
  1428. </material>
  1429. <meta>
  1430. <layer>0</layer>
  1431. </meta>
  1432. </visual>
  1433. <pose frame=''>-18.6196 -5.61033 0 0 -0 1.5708</pose>
  1434. <self_collide>0</self_collide>
  1435. <enable_wind>0</enable_wind>
  1436. <kinematic>0</kinematic>
  1437. </link>
  1438. <link name='Wall_7'>
  1439. <collision name='Wall_7_Collision'>
  1440. <geometry>
  1441. <box>
  1442. <size>11.5 0.2 2.5</size>
  1443. </box>
  1444. </geometry>
  1445. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1446. <max_contacts>10</max_contacts>
  1447. <surface>
  1448. <contact>
  1449. <ode/>
  1450. </contact>
  1451. <bounce/>
  1452. <friction>
  1453. <torsional>
  1454. <ode/>
  1455. </torsional>
  1456. <ode/>
  1457. </friction>
  1458. </surface>
  1459. </collision>
  1460. <visual name='Wall_7_Visual'>
  1461. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1462. <geometry>
  1463. <box>
  1464. <size>11.5 0.2 2.5</size>
  1465. </box>
  1466. </geometry>
  1467. <material>
  1468. <script>
  1469. <uri>file://media/materials/scripts/gazebo.material</uri>
  1470. <name>Gazebo/Bricks</name>
  1471. </script>
  1472. <ambient>1 1 1 1</ambient>
  1473. </material>
  1474. <meta>
  1475. <layer>0</layer>
  1476. </meta>
  1477. </visual>
  1478. <pose frame=''>-14.9546 -0.004511 0 0 -0 -1.5708</pose>
  1479. <self_collide>0</self_collide>
  1480. <enable_wind>0</enable_wind>
  1481. <kinematic>0</kinematic>
  1482. </link>
  1483. <link name='Wall_8'>
  1484. <collision name='Wall_8_Collision'>
  1485. <geometry>
  1486. <box>
  1487. <size>3.9604 0.2 2.5</size>
  1488. </box>
  1489. </geometry>
  1490. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1491. <max_contacts>10</max_contacts>
  1492. <surface>
  1493. <contact>
  1494. <ode/>
  1495. </contact>
  1496. <bounce/>
  1497. <friction>
  1498. <torsional>
  1499. <ode/>
  1500. </torsional>
  1501. <ode/>
  1502. </friction>
  1503. </surface>
  1504. </collision>
  1505. <visual name='Wall_8_Visual'>
  1506. <pose frame=''>0 0 1.25 0 -0 0</pose>
  1507. <geometry>
  1508. <box>
  1509. <size>3.9604 0.2 2.5</size>
  1510. </box>
  1511. </geometry>
  1512. <material>
  1513. <script>
  1514. <uri>file://media/materials/scripts/gazebo.material</uri>
  1515. <name>Gazebo/Bricks</name>
  1516. </script>
  1517. <ambient>1 1 1 1</ambient>
  1518. </material>
  1519. <meta>
  1520. <layer>0</layer>
  1521. </meta>
  1522. </visual>
  1523. <pose frame=''>-13.0498 -5.63906 0 0 -0 0.021236</pose>
  1524. <self_collide>0</self_collide>
  1525. <enable_wind>0</enable_wind>
  1526. <kinematic>0</kinematic>
  1527. </link>
  1528. <static>1</static>
  1529. </model>
  1530. <state world_name='default'>
  1531. <sim_time>493 628000000</sim_time>
  1532. <real_time>421 177324053</real_time>
  1533. <wall_time>1659794100 482234418</wall_time>
  1534. <iterations>420094</iterations>
  1535. <model name='map2_1'>
  1536. <pose frame=''>1.79516 0.071786 0 0 -0 0</pose>
  1537. <scale>1 1 1</scale>
  1538. <link name='Wall_0'>
  1539. <pose frame=''>-16.8244 5.58646 0 0 -0 1.5708</pose>
  1540. <velocity>0 0 0 0 -0 0</velocity>
  1541. <acceleration>0 0 0 0 -0 0</acceleration>
  1542. <wrench>0 0 0 0 -0 0</wrench>
  1543. </link>
  1544. <link name='Wall_1'>
  1545. <pose frame=''>1.79536 9.38646 0 0 -0 0</pose>
  1546. <velocity>0 0 0 0 -0 0</velocity>
  1547. <acceleration>0 0 0 0 -0 0</acceleration>
  1548. <wrench>0 0 0 0 -0 0</wrench>
  1549. </link>
  1550. <link name='Wall_10'>
  1551. <pose frame=''>-11.2413 1.91501 0 0 0 -0.012287</pose>
  1552. <velocity>0 0 0 0 -0 0</velocity>
  1553. <acceleration>0 0 0 0 -0 0</acceleration>
  1554. <wrench>0 0 0 0 -0 0</wrench>
  1555. </link>
  1556. <link name='Wall_11'>
  1557. <pose frame=''>-9.37154 -0.001304 0 0 0 -1.58339</pose>
  1558. <velocity>0 0 0 0 -0 0</velocity>
  1559. <acceleration>0 0 0 0 -0 0</acceleration>
  1560. <wrench>0 0 0 0 -0 0</wrench>
  1561. </link>
  1562. <link name='Wall_12'>
  1563. <pose frame=''>-3.8448 -1.89434 0 0 -0 0</pose>
  1564. <velocity>0 0 0 0 -0 0</velocity>
  1565. <acceleration>0 0 0 0 -0 0</acceleration>
  1566. <wrench>0 0 0 0 -0 0</wrench>
  1567. </link>
  1568. <link name='Wall_14'>
  1569. <pose frame=''>1.7052 0.030656 0 0 -0 1.5708</pose>
  1570. <velocity>0 0 0 0 -0 0</velocity>
  1571. <acceleration>0 0 0 0 -0 0</acceleration>
  1572. <wrench>0 0 0 0 -0 0</wrench>
  1573. </link>
  1574. <link name='Wall_15'>
  1575. <pose frame=''>3.6302 1.95566 0 0 -0 0</pose>
  1576. <velocity>0 0 0 0 -0 0</velocity>
  1577. <acceleration>0 0 0 0 -0 0</acceleration>
  1578. <wrench>0 0 0 0 -0 0</wrench>
  1579. </link>
  1580. <link name='Wall_17'>
  1581. <pose frame=''>-5.69055 -3.67674 0 0 0 -1.5708</pose>
  1582. <velocity>0 0 0 0 -0 0</velocity>
  1583. <acceleration>0 0 0 0 -0 0</acceleration>
  1584. <wrench>0 0 0 0 -0 0</wrench>
  1585. </link>
  1586. <link name='Wall_19'>
  1587. <pose frame=''>7.44363 5.61367 0 0 0 -3.1164</pose>
  1588. <velocity>0 0 0 0 -0 0</velocity>
  1589. <acceleration>0 0 0 0 -0 0</acceleration>
  1590. <wrench>0 0 0 0 -0 0</wrench>
  1591. </link>
  1592. <link name='Wall_2'>
  1593. <pose frame=''>20.3454 0.048616 0 0 0 -1.5733</pose>
  1594. <velocity>0 0 0 0 -0 0</velocity>
  1595. <acceleration>0 0 0 0 -0 0</acceleration>
  1596. <wrench>0 0 0 0 -0 0</wrench>
  1597. </link>
  1598. <link name='Wall_20'>
  1599. <pose frame=''>5.55058 1.84562 0 0 0 -1.5708</pose>
  1600. <velocity>0 0 0 0 -0 0</velocity>
  1601. <acceleration>0 0 0 0 -0 0</acceleration>
  1602. <wrench>0 0 0 0 -0 0</wrench>
  1603. </link>
  1604. <link name='Wall_21'>
  1605. <pose frame=''>7.39711 -1.78286 0 0 -0 0</pose>
  1606. <velocity>0 0 0 0 -0 0</velocity>
  1607. <acceleration>0 0 0 0 -0 0</acceleration>
  1608. <wrench>0 0 0 0 -0 0</wrench>
  1609. </link>
  1610. <link name='Wall_23'>
  1611. <pose frame=''>9.19711 -5.45784 0 0 0 -1.5708</pose>
  1612. <velocity>0 0 0 0 -0 0</velocity>
  1613. <acceleration>0 0 0 0 -0 0</acceleration>
  1614. <wrench>0 0 0 0 -0 0</wrench>
  1615. </link>
  1616. <link name='Wall_25'>
  1617. <pose frame=''>-1.96863 -7.38094 0 0 -0 1.5708</pose>
  1618. <velocity>0 0 0 0 -0 0</velocity>
  1619. <acceleration>0 0 0 0 -0 0</acceleration>
  1620. <wrench>0 0 0 0 -0 0</wrench>
  1621. </link>
  1622. <link name='Wall_26'>
  1623. <pose frame=''>1.83137 -5.58094 0 0 -0 0</pose>
  1624. <velocity>0 0 0 0 -0 0</velocity>
  1625. <acceleration>0 0 0 0 -0 0</acceleration>
  1626. <wrench>0 0 0 0 -0 0</wrench>
  1627. </link>
  1628. <link name='Wall_28'>
  1629. <pose frame=''>12.9656 -7.30244 0 0 -0 1.5708</pose>
  1630. <velocity>0 0 0 0 -0 0</velocity>
  1631. <acceleration>0 0 0 0 -0 0</acceleration>
  1632. <wrench>0 0 0 0 -0 0</wrench>
  1633. </link>
  1634. <link name='Wall_30'>
  1635. <pose frame=''>11.0756 1.89175 0 0 -0 0</pose>
  1636. <velocity>0 0 0 0 -0 0</velocity>
  1637. <acceleration>0 0 0 0 -0 0</acceleration>
  1638. <wrench>0 0 0 0 -0 0</wrench>
  1639. </link>
  1640. <link name='Wall_32'>
  1641. <pose frame=''>14.8555 5.66019 0 0 -0 3.14159</pose>
  1642. <velocity>0 0 0 0 -0 0</velocity>
  1643. <acceleration>0 0 0 0 -0 0</acceleration>
  1644. <wrench>0 0 0 0 -0 0</wrench>
  1645. </link>
  1646. <link name='Wall_33'>
  1647. <pose frame=''>12.9451 1.88345 0 0 0 -1.56694</pose>
  1648. <velocity>0 0 0 0 -0 0</velocity>
  1649. <acceleration>0 0 0 0 -0 0</acceleration>
  1650. <wrench>0 0 0 0 -0 0</wrench>
  1651. </link>
  1652. <link name='Wall_34'>
  1653. <pose frame=''>14.8847 -1.89329 0 0 -0 0</pose>
  1654. <velocity>0 0 0 0 -0 0</velocity>
  1655. <acceleration>0 0 0 0 -0 0</acceleration>
  1656. <wrench>0 0 0 0 -0 0</wrench>
  1657. </link>
  1658. <link name='Wall_35'>
  1659. <pose frame=''>16.7632 0.031706 0 0 -0 1.5708</pose>
  1660. <velocity>0 0 0 0 -0 0</velocity>
  1661. <acceleration>0 0 0 0 -0 0</acceleration>
  1662. <wrench>0 0 0 0 -0 0</wrench>
  1663. </link>
  1664. <link name='Wall_36'>
  1665. <pose frame=''>18.5951 1.93345 0 0 0 -0.013028</pose>
  1666. <velocity>0 0 0 0 -0 0</velocity>
  1667. <acceleration>0 0 0 0 -0 0</acceleration>
  1668. <wrench>0 0 0 0 -0 0</wrench>
  1669. </link>
  1670. <link name='Wall_38'>
  1671. <pose frame=''>-9.36594 7.4571 0 0 0 -1.5708</pose>
  1672. <velocity>0 0 0 0 -0 0</velocity>
  1673. <acceleration>0 0 0 0 -0 0</acceleration>
  1674. <wrench>0 0 0 0 -0 0</wrench>
  1675. </link>
  1676. <link name='Wall_39'>
  1677. <pose frame=''>-7.51941 5.5321 0 0 -0 0</pose>
  1678. <velocity>0 0 0 0 -0 0</velocity>
  1679. <acceleration>0 0 0 0 -0 0</acceleration>
  1680. <wrench>0 0 0 0 -0 0</wrench>
  1681. </link>
  1682. <link name='Wall_4'>
  1683. <pose frame=''>1.7721 -9.20484 0 0 0 -3.14113</pose>
  1684. <velocity>0 0 0 0 -0 0</velocity>
  1685. <acceleration>0 0 0 0 -0 0</acceleration>
  1686. <wrench>0 0 0 0 -0 0</wrench>
  1687. </link>
  1688. <link name='Wall_40'>
  1689. <pose frame=''>-5.71941 3.7321 0 0 0 -1.5708</pose>
  1690. <velocity>0 0 0 0 -0 0</velocity>
  1691. <acceleration>0 0 0 0 -0 0</acceleration>
  1692. <wrench>0 0 0 0 -0 0</wrench>
  1693. </link>
  1694. <link name='Wall_42'>
  1695. <pose frame=''>-1.96863 5.53558 0 0 0 -1.5708</pose>
  1696. <velocity>0 0 0 0 -0 0</velocity>
  1697. <acceleration>0 0 0 0 -0 0</acceleration>
  1698. <wrench>0 0 0 0 -0 0</wrench>
  1699. </link>
  1700. <link name='Wall_44'>
  1701. <pose frame=''>-0.043632 5.61367 0 0 -0 0</pose>
  1702. <velocity>0 0 0 0 -0 0</velocity>
  1703. <acceleration>0 0 0 0 -0 0</acceleration>
  1704. <wrench>0 0 0 0 -0 0</wrench>
  1705. </link>
  1706. <link name='Wall_5'>
  1707. <pose frame=''>-16.8244 -5.53854 0 0 -0 1.5708</pose>
  1708. <velocity>0 0 0 0 -0 0</velocity>
  1709. <acceleration>0 0 0 0 -0 0</acceleration>
  1710. <wrench>0 0 0 0 -0 0</wrench>
  1711. </link>
  1712. <link name='Wall_7'>
  1713. <pose frame=''>-13.1594 0.067276 0 0 0 -1.5708</pose>
  1714. <velocity>0 0 0 0 -0 0</velocity>
  1715. <acceleration>0 0 0 0 -0 0</acceleration>
  1716. <wrench>0 0 0 0 -0 0</wrench>
  1717. </link>
  1718. <link name='Wall_8'>
  1719. <pose frame=''>-11.2546 -5.56724 0 0 -0 0.021236</pose>
  1720. <velocity>0 0 0 0 -0 0</velocity>
  1721. <acceleration>0 0 0 0 -0 0</acceleration>
  1722. <wrench>0 0 0 0 -0 0</wrench>
  1723. </link>
  1724. </model>
  1725. <model name='ground_plane'>
  1726. <pose frame=''>0 0 0 0 -0 0</pose>
  1727. <scale>1 1 1</scale>
  1728. <link name='link'>
  1729. <pose frame=''>0 0 0 0 -0 0</pose>
  1730. <velocity>0 0 0 0 -0 0</velocity>
  1731. <acceleration>0 0 0 0 -0 0</acceleration>
  1732. <wrench>0 0 0 0 -0 0</wrench>
  1733. </link>
  1734. </model>
  1735. <model name='landing2'>
  1736. <pose frame=''>18.3012 -0.3 0 0 1.57 1.57</pose>
  1737. <scale>1 1 1</scale>
  1738. <link name='link'>
  1739. <pose frame=''>18.3012 -0.3 0 0 1.57 1.57</pose>
  1740. <velocity>0 0 0 0 -0 0</velocity>
  1741. <acceleration>0 0 0 0 -0 0</acceleration>
  1742. <wrench>0 0 0 0 -0 0</wrench>
  1743. </link>
  1744. </model>
  1745. <model name='takeoff'>
  1746. <pose frame=''>-16 -0.5 0 0 1.57 1.57</pose>
  1747. <scale>1 1 1</scale>
  1748. <link name='link'>
  1749. <pose frame=''>-16 -0.5 0 0 1.57 1.57</pose>
  1750. <velocity>0 0 0 0 -0 0</velocity>
  1751. <acceleration>0 0 0 0 -0 0</acceleration>
  1752. <wrench>0 0 0 0 -0 0</wrench>
  1753. </link>
  1754. </model>
  1755. <model name='target_red'>
  1756. <pose frame=''>-8.97289 -3.7558 0 0 -0 0</pose>
  1757. <scale>1 1 1</scale>
  1758. <link name='link'>
  1759. <pose frame=''>-8.97289 -3.7558 0 0 -0 0</pose>
  1760. <velocity>0 0 0 0 -0 0</velocity>
  1761. <acceleration>0 0 0 0 -0 0</acceleration>
  1762. <wrench>0 0 0 0 -0 0</wrench>
  1763. </link>
  1764. </model>
  1765. <model name='target_blue'>
  1766. <pose frame=''>10.9445 8.81946 0.18348 0 -0 0</pose>
  1767. <scale>1 1 1</scale>
  1768. <link name='link'>
  1769. <pose frame=''>10.9445 8.81946 0.18348 0 -0 0</pose>
  1770. <velocity>0 0 0 0 -0 0</velocity>
  1771. <acceleration>0 0 0 0 -0 0</acceleration>
  1772. <wrench>0 0 0 0 -0 0</wrench>
  1773. </link>
  1774. </model>
  1775. <model name='target_green'>
  1776. <pose frame=''>18.5856 -8.05752 0 0 -0 0</pose>
  1777. <scale>1 1 1</scale>
  1778. <link name='link'>
  1779. <pose frame=''>18.5856 -8.05752 0 0 -0 0</pose>
  1780. <velocity>0 0 0 0 -0 0</velocity>
  1781. <acceleration>0 0 0 0 -0 0</acceleration>
  1782. <wrench>0 0 0 0 -0 0</wrench>
  1783. </link>
  1784. </model>
  1785. <light name='sun'>
  1786. <pose frame=''>0 0 10 0 -0 0</pose>
  1787. </light>
  1788. </state>
  1789. <gui fullscreen='0'>
  1790. <camera name='user_camera'>
  1791. <pose frame=''>16.8887 -5.88816 80.8158 0 1.398 2.67275</pose>
  1792. <view_controller>orbit</view_controller>
  1793. <projection_type>perspective</projection_type>
  1794. </camera>
  1795. </gui>
  1796. <model name='landing2'>
  1797. <static>1</static>
  1798. <link name='link'>
  1799. <visual name='visual'>
  1800. <geometry>
  1801. <mesh>
  1802. <uri>model://landing2/meshes/landing2.dae</uri>
  1803. <scale>2 4 4</scale>
  1804. </mesh>
  1805. </geometry>
  1806. </visual>
  1807. <collision name='Landing_2_Collision'>
  1808. <geometry>
  1809. <mesh>
  1810. <uri>model://landing2/meshes/landing2.dae</uri>
  1811. <scale>2 4 4</scale>
  1812. </mesh>
  1813. </geometry>
  1814. <max_contacts>10</max_contacts>
  1815. <surface>
  1816. <contact>
  1817. <ode/>
  1818. </contact>
  1819. <bounce/>
  1820. <friction>
  1821. <torsional>
  1822. <ode/>
  1823. </torsional>
  1824. <ode/>
  1825. </friction>
  1826. </surface>
  1827. </collision>
  1828. <collision name='Landing_2_Collision'>
  1829. <geometry>
  1830. <mesh>
  1831. <uri>model://landing2/meshes/landing2.dae</uri>
  1832. <scale>2 4 4</scale>
  1833. </mesh>
  1834. </geometry>
  1835. <max_contacts>10</max_contacts>
  1836. <surface>
  1837. <contact>
  1838. <ode/>
  1839. </contact>
  1840. <bounce/>
  1841. <friction>
  1842. <torsional>
  1843. <ode/>
  1844. </torsional>
  1845. <ode/>
  1846. </friction>
  1847. </surface>
  1848. </collision>
  1849. <self_collide>0</self_collide>
  1850. <enable_wind>0</enable_wind>
  1851. <kinematic>0</kinematic>
  1852. </link>
  1853. <pose frame=''>17 0 0 0 1.57 1.57</pose>
  1854. </model>
  1855. <model name='takeoff'>
  1856. <static>1</static>
  1857. <link name='link'>
  1858. <visual name='visual'>
  1859. <geometry>
  1860. <mesh>
  1861. <uri>model://takeoff/meshes/takeoff.dae</uri>
  1862. <scale>2 2 2</scale>
  1863. </mesh>
  1864. </geometry>
  1865. </visual>
  1866. <collision name='Takeoff_Collision'>
  1867. <geometry>
  1868. <mesh>
  1869. <uri>model://takeoff/meshes/takeoff.dae</uri>
  1870. <scale>2 2 2</scale>
  1871. </mesh>
  1872. </geometry>
  1873. <max_contacts>10</max_contacts>
  1874. <surface>
  1875. <contact>
  1876. <ode/>
  1877. </contact>
  1878. <bounce/>
  1879. <friction>
  1880. <torsional>
  1881. <ode/>
  1882. </torsional>
  1883. <ode/>
  1884. </friction>
  1885. </surface>
  1886. </collision>
  1887. <self_collide>0</self_collide>
  1888. <enable_wind>0</enable_wind>
  1889. <kinematic>0</kinematic>
  1890. </link>
  1891. <pose frame=''>-18 -0.5 0 0 1.57 1.57</pose>
  1892. </model>
  1893. <model name='target_red'>
  1894. <static>0</static>
  1895. <link name='link'>
  1896. <pose frame=''>0 0 0 0 0 0</pose>
  1897. <collision name='Target_Red_Collision'>
  1898. <geometry>
  1899. <mesh>
  1900. <uri>model://target_red/meshes/target_red.dae</uri>
  1901. <scale>0.9 0.9 0.9</scale>
  1902. </mesh>
  1903. </geometry>
  1904. <max_contacts>10</max_contacts>
  1905. <surface>
  1906. <contact>
  1907. <ode/>
  1908. </contact>
  1909. <bounce/>
  1910. <friction>
  1911. <torsional>
  1912. <ode/>
  1913. </torsional>
  1914. <ode/>
  1915. </friction>
  1916. </surface>
  1917. <pose frame=''>0 0 -0.225 0 0 3.1415</pose>
  1918. </collision>
  1919. <visual name='visual'>
  1920. <geometry>
  1921. <mesh>
  1922. <uri>model://target_red/meshes/target_red.dae</uri>
  1923. <scale>0.9 0.9 0.9</scale>
  1924. </mesh>
  1925. </geometry>
  1926. <pose frame=''>0 0 -0.225 0 0 3.1415</pose>
  1927. </visual>
  1928. <self_collide>0</self_collide>
  1929. <enable_wind>0</enable_wind>
  1930. <kinematic>0</kinematic>
  1931. <gravity>0</gravity>
  1932. </link>
  1933. <pose frame=''>-8.97289 -3.7558 0 0 -0 0</pose>
  1934. </model>
  1935. <model name='target_blue'>
  1936. <static>0</static>
  1937. <link name='link'>
  1938. <pose frame=''>0 0 0 0 0 0</pose>
  1939. <collision name='Target_Blue_Collision'>
  1940. <geometry>
  1941. <mesh>
  1942. <uri>model://target_blue/meshes/target_blue.dae</uri>
  1943. <scale>0.9 0.9 0.9</scale>
  1944. </mesh>
  1945. </geometry>
  1946. <max_contacts>10</max_contacts>
  1947. <surface>
  1948. <contact>
  1949. <ode/>
  1950. </contact>
  1951. <bounce/>
  1952. <friction>
  1953. <torsional>
  1954. <ode/>
  1955. </torsional>
  1956. <ode/>
  1957. </friction>
  1958. </surface>
  1959. <pose frame=''>0 0 -0.225 0 0 3.1415</pose>
  1960. </collision>
  1961. <visual name='visual'>
  1962. <geometry>
  1963. <mesh>
  1964. <uri>model://target_blue/meshes/target_blue.dae</uri>
  1965. <scale>0.9 0.9 0.9</scale>
  1966. </mesh>
  1967. </geometry>
  1968. <pose frame=''>0 0 -0.225 0 0 3.1415</pose>
  1969. </visual>
  1970. <self_collide>0</self_collide>
  1971. <enable_wind>0</enable_wind>
  1972. <kinematic>0</kinematic>
  1973. <gravity>0</gravity>
  1974. </link>
  1975. <pose frame=''>11.0983 1.98454 0 0 -0 0</pose>
  1976. </model>
  1977. <model name='target_green'>
  1978. <static>0</static>
  1979. <link name='link'>
  1980. <pose frame=''>0 0 0 0 0 0</pose>
  1981. <collision name='Target_Green_Collision'>
  1982. <geometry>
  1983. <mesh>
  1984. <uri>model://target_green/meshes/target_green.dae</uri>
  1985. <scale>0.9 0.9 0.9</scale>
  1986. </mesh>
  1987. </geometry>
  1988. <max_contacts>10</max_contacts>
  1989. <surface>
  1990. <contact>
  1991. <ode/>
  1992. </contact>
  1993. <bounce/>
  1994. <friction>
  1995. <torsional>
  1996. <ode/>
  1997. </torsional>
  1998. <ode/>
  1999. </friction>
  2000. </surface>
  2001. <pose frame=''>0 0 -0.225 0 0 3.1415</pose>
  2002. </collision>
  2003. <visual name='visual'>
  2004. <geometry>
  2005. <mesh>
  2006. <uri>model://target_green/meshes/target_green.dae</uri>
  2007. <scale>0.9 0.9 0.9</scale>
  2008. </mesh>
  2009. </geometry>
  2010. <pose frame=''>0 0 -0.225 0 0 3.1415</pose>
  2011. </visual>
  2012. <self_collide>0</self_collide>
  2013. <enable_wind>0</enable_wind>
  2014. <kinematic>0</kinematic>
  2015. <gravity>0</gravity>
  2016. </link>
  2017. <pose frame=''>15.6869 -7.2778 0 0 -0 0</pose>
  2018. </model>
  2019. </world>
  2020. </sdf>

map_maze_target.launch

  1. <?xml version="1.0"?>
  2. <launch>
  3. <!-- MAVROS posix SITL environment launch script -->
  4. <!-- launches Gazebo environment and 2x: MAVROS, PX4 SITL, and spawns vehicle -->
  5. <!-- vehicle model and world -->
  6. <arg name="est" default="ekf2"/>
  7. <arg name="world" default="/home/xtdrone/user_ws/run/uav_env/map_maze_target.world"/>
  8. <!-- gazebo configs -->
  9. <arg name="gui" default="true"/>
  10. <arg name="debug" default="false"/>
  11. <arg name="verbose" default="false"/>
  12. <arg name="paused" default="false"/>
  13. <!-- Gazebo sim -->
  14. <include file="$(find gazebo_ros)/launch/empty_world.launch">
  15. <arg name="gui" value="$(arg gui)"/>
  16. <arg name="world_name" value="$(arg world)"/>
  17. <arg name="debug" value="$(arg debug)"/>
  18. <arg name="verbose" value="$(arg verbose)"/>
  19. <arg name="paused" value="$(arg paused)"/>
  20. </include>
  21. <!-- iris_0 -->
  22. <group ns="iris_0">
  23. <!-- MAVROS and vehicle configs -->
  24. <arg name="ID" value="0"/>
  25. <arg name="ID_in_group" value="0"/>
  26. <arg name="fcu_url" default="udp://:24540@localhost:34580"/>
  27. <!-- PX4 SITL and vehicle spawn -->
  28. <include file="$(find px4)/launch/single_vehicle_spawn_xtd.launch">
  29. <arg name="x" value="-16"/> <!-- -16 for map2-1, -18 for map2-2, -18 for map2-3 -->
  30. <arg name="y" value="0"/>
  31. <arg name="z" value="0.5"/>
  32. <arg name="R" value="0"/>
  33. <arg name="P" value="0"/>
  34. <arg name="Y" value="0"/>
  35. <arg name="vehicle" value="iris"/>
  36. <arg name="sdf" value="iris_all_sensor"/>
  37. <arg name="mavlink_udp_port" value="18570"/>
  38. <arg name="mavlink_tcp_port" value="4560"/>
  39. <arg name="ID" value="$(arg ID)"/>
  40. <arg name="ID_in_group" value="$(arg ID_in_group)"/>
  41. </include>
  42. <!-- MAVROS -->
  43. <include file="$(find mavros)/launch/px4.launch">
  44. <arg name="fcu_url" value="$(arg fcu_url)"/>
  45. <arg name="gcs_url" value=""/>
  46. <arg name="tgt_system" value="$(eval 1 + arg('ID'))"/>
  47. <arg name="tgt_component" value="1"/>
  48. </include>
  49. </group>
  50. </launch>
  51. <!--the launch file is generated by XTDrone multi-vehicle generator.py -->

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/453487
推荐阅读
相关标签
  

闽ICP备14008679号