说明:

  • 介绍如何使用统一的建图入口

相关设备:

  • Turbot4机器人套件:​​​

步骤:

  • 启动底盘

ros2 launch turbot4_bringup  robot.launch.py

  • 启动建图

#slam_toolbox同步建图
ros2 launch turbot4_slam slam.launch.py slam_type:=slam_toolbox_sync

#slam_toolbox异步建图
ros2 launch turbot4_slam slam.launch.py slam_type:=slam_toolbox_async

#gmapping建图
ros2 launch turbot4_slam slam.launch.py slam_type:=gmapping

#cartographer建图
ros2 launch turbot4_slam slam.launch.py slam_type:=cartographer

  • 启动键盘控制

ros2 launch turbot4_teleop keyboard.launch.py

  • 保存地图
  • 指定地图位置和名称,不需要加后缀
  • 默认是/home/ubuntu/map/map.yaml 和/home/ubuntu/map/map.pgm

ros2 launch turbot4_slam save_map.launch.py  map:=${HOME}/map/map