ROS2版Turbot3-Multi仿真教程-单机frontier自主探索建图
说明
- 介绍如何实现单机frontier自主探索建图
- 基于m-explore实现
步骤
- 新开终端,启动仿真
./multi_scripts/single_gazebo.sh
- 效果如图:
- 新开终端,启动导航
./multi_scripts/single_nav.sh
- 新开终端,启动建图
./multi_scripts/single_slam.sh
- 新开终端,启动rviz
./multi_scripts/single_rviz_slam.sh
- 效果如图:
- 新开终端,启动frontier探索
./multi_scripts/single_explore.sh
- 过一会,小车就开始自主探索,需要一定时间来完成
- 完成之后,效果如图:
- 保存地图
$ ./multi_scripts/single_save_map.sh explore
save map into /home/ubuntu/ros2_tb3_multi_ws/src/turtlebot3_multi/map/explore
[INFO] [1682245303.087541872] [map_saver]:
map_saver lifecycle node launched.
Waiting on external lifecycle transitions to activate
See https://design.ros2.org/articles/node_lifecycle.html for more information.
[INFO] [1682245303.090970522] [map_saver]: Creating
[INFO] [1682245303.103192032] [map_saver]: Configuring
[INFO] [1682245303.112582279] [map_saver]: Saving map from 'map' topic to '/home/ubuntu/ros2_tb3_multi_ws/src/turtlebot3_multi/map/explore' file
[WARN] [1682245303.112675583] [map_saver]: Free threshold unspecified. Setting it to default value: 0.250000
[WARN] [1682245303.112711447] [map_saver]: Occupied threshold unspecified. Setting it to default value: 0.650000
[WARN] [map_io]: Image format unspecified. Setting it to: pgm
[INFO] [map_io]: Received a 384 X 384 map @ 0.05 m/pix
[INFO] [map_io]: Writing map occupancy data to /home/ubuntu/ros2_tb3_multi_ws/src/turtlebot3_multi/map/explore.pgm
[INFO] [map_io]: Writing map metadata to /home/ubuntu/ros2_tb3_multi_ws/src/turtlebot3_multi/map/explore.yaml
[INFO] [map_io]: Map saved
[INFO] [1682245303.726892178] [map_saver]: Map saved successfully
[INFO] [1682245303.767018045] [map_saver]: Destroying
- 查看图片
eog /home/ubuntu/ros2_tb3_multi_ws/src/turtlebot3_multi/map/explore.pgm
- 效果图
演示视频
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号