1. 安装依赖
sudo apt install ros-noetic-gazebo-ros-pkgs ros-noetic-gazebo-ros-control
sudo apt-get install ros-noetic-turtlebot-*
sudo apt install ros-noetic-gmapping
sudo apt-get install ros-noetic-joy ros-noetic-teleop-twist-joy ros-noetic-teleop-twist-keyboard ros-noetic-laser-proc ros-noetic-rgbd-launch ros-noetic-depthimage-to-laserscan ros-noetic-rosserial-arduino ros-noetic-rosserial-python ros-noetic-rosserial-server ros-noetic-rosserial-client ros-noetic-rosserial-msgs ros-noetic-amcl ros-noetic-map-server ros-noetic-move-base ros-noetic-urdf ros-noetic-xacro ros-noetic-compressed-image-transport ros-noetic-rqt-image-view ros-noetic-gmapping ros-noetic-navigation ros-noetic-interactive-markers rviz
echo "export TURTLEBOT3_MODEL=burger" >> ~/.bashrc
2. 下载仿真功能包
git clone https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git
git clone https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3.git
git clone https://ghproxy.com/https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
3. gmapping建图仿真
roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
rosrun map_server map_saver -f ~/map
4. navigation导航仿真
roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml