TurtleBot3入门教程-11.Gazebo仿真

注意:

使用官方树莓派版本的用户,请在Remote PC端进行仿真操作;

第一次在Remote PC端进行仿真操作时候,可能需要等待几分钟的环境初始化操作。

安装仿真功能包

对于Ubuntu16.04:

前提:已经安装了turtlebot3包和turtlebot3_msgs包,参考:安装

cd catkin_ws/src

git clone -b kinetic-devel https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git

编译

catkin_make

安装仿真包(Noetic)

cd ~/catkin_ws/src/

git clone -b noetic-devel http://mirror.ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git

cd ~/catkin_ws && catkin_make

turtlebot3_gazebo.jpg

export TURTLEBOT3_MODEL=waffle_pi

roslaunch turtlebot3_gazebo turtlebot3_world.launch

turtlebot3_world_bugger.png

roslaunch turtlebot3_slam turtlebot3_slam.launch

控制小车移动实现建图

roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

效果如图:

gazebo1.png

保存地图:

rosrun map_server map_saver -f  ~/map_world

地图自动保存在~/home/map目录下,名为map_world.yaml和map_world.pgm

gazebo2.png

    关键词:TurtleBot3-入门