ROS gmapping SLAM建图并保存

运行roslaunch turtlebot3_gazebo slam.launch,启动slam

roslaunch turtlebot3_gazebo slam.launch

slam.launch文件如下:


    
    
    
    
    
    

    
    
        
        
        
        
    

在rviz中添加map

ROS gmapping SLAM建图并保存_第1张图片

运行rosrun teleop_twist_keyboard teleop_twist_keyboard.py,手动控制机器人探索地图

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

最后运行下面的命令保存地图

rosrun map_server map_saver -f ~/catkin_ws/src/turtlebot3/turtlebot3_simulations/turtlebot3_gazebo/map

你可能感兴趣的:(人工智能)