Turtlebot3中级教程-Cartographer算法建图

Turtlebot3中级教程-Cartographer算法建图

说明:

  • 介绍如何使用burger来进行Cartographer算法建图

准备:

整合:

  • 远程PC和turtlebot3都需下载和安装源码turbot3
$ cd ~/catkin_ws/src
$ git clone https://github.com/ncnynl/turbot3
$ cd ..
$ catkin_make 
$ source ~/.bashrc

使用:

  • 远程PC,执行:
roscore 
  • turtlebot3, 新终端执行,启动底盘:
roslaunch turbot3_bringup  robot.launch
  • turtlebot3, 新终端执行,启动模型:
export TURTLEBOT3_MODEL=burger
roslaunch turbot3_bringup  remote.launch
  • turtlebot3, 新终端执行,启动cartographer:
roslaunch turbot3_slam cartographer.launch
  • 或者turtlebot3, 新终端执行,启动cartographer,不带imu:
roslaunch turbot3_slam cartographer_noimu.launch
  • 远程PC,新终端,启动rviz
roslaunch turbot3_rviz cartographer_rviz.launch
  • 远程PC,新终端,启动键盘控制
roslaunch turbot3_teleop keyboard.launch 
  • 控制turtlebot3移动完成建图

  • 效果图如下:

请输入图片描述

保存地图:

  • map_server方法:
  • 保存位置:~/map/Cartographer_map.pgm
mkdir ~/map
rosrun map_server map_saver -f ~/map/Cartographer_map

参考:

  • https://google-cartographer-ros.readthedocs.io/
  • https://google-cartographer-ros-for-turtlebots.readthedocs.io/
  • https://github.com/googlecartographer/cartographer_ros/issues/475#issuecomment-321261237

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: turtlebot3中级教程