友情提示:380元/半年,儿童学编程,就上码丁实验室。
Turtlebot3中级教程-Cartographer算法建图
说明:
- 介绍如何使用turbot3来进行Cartographer算法建图
操作步骤:
- [Remote PC] 执行:
$ roscore
- [TurBot3] 新终端执行,启动底盘:
$ roslaunch turbot3_bringup minimal.launch
- [TurBot3] 新终端执行,启动cartographer:
$ roslaunch turbot3_slam cartographer.launch
- 或者[TurBot3] 新终端执行,启动cartographer,不带imu:
$ roslaunch turbot3_slam cartographer_noimu.launch
- [Remote PC] 新终端,启动rviz
$ roslaunch turbot3_rviz cartographer_rviz.launch
- [Remote PC] 新终端,启动键盘控制
$ roslaunch turbot3_teleop keyboard.launch
-
控制turbot3移动完成建图
-
效果图如下:
保存地图:
- [TurBot3] map_server方法:
- 保存位置:~/map/Cartographer_map.pgm
$ mkdir ~/map
$ rosrun map_server map_saver -f ~/map/Cartographer_map