ROS Noetic turtlebot3建图导航仿真教程(极简版)

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建图仿真

# 启动gazebo
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导航仿真

# 启动gazebo
roslaunch turtlebot3_gazebo turtlebot3_world.launch
# 启动导航节点
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_41821678/article/details/125711393