实验笔记之——基于移动机器人的自主探索与地图构建

2025-12-04

本博文对移动机器人自主建图的功能进行部署测试,特别地,是基于自主探索的功能包+SLAM算法来实现的。

本博文仅供本人学习记录用~

好多年前针对rrt_exploration这个功能包写过一篇博客ROS仿真笔记之——基于rrt_exploration的单个机器人自主探索建图,此处对代码进行再次的复现,详细的原理请见原博客。

  • 测试使用的代码:Github

  • 代码下载


git clone --recursive git@github.com:R-C-Group/auto-slam-turtlebot3.git

# 编译
cd ~/catkin_ws && catkin_make
  • 开启仿真模型,并用键盘控制建图
# export TURTLEBOT3_MODEL=burger
TURTLEBOT3_MODEL=waffle roslaunch turtlebot3_gazebo turtlebot3_world.launch

# 开启SLAM
TURTLEBOT3_MODEL=waffle  roslaunch turtlebot3_slam turtlebot3_slam.launch set_base_frame:=base_footprint set_odom_frame:=odom set_map_frame:=map

# 开启键盘控制
TURTLEBOT3_MODEL=waffle roslaunch turtlebot3_teleop turtlebot3_teleop_key.launch

  • 开启仿真模型,并采用explore_lite实现自动探索
TURTLEBOT3_MODEL=waffle roslaunch turtlebot3_gazebo single_world.launch

TURTLEBOT3_MODEL=waffle roslaunch explore_lite explore.launch
# sudo apt install ros-noetic-dwa-local-planner
  • rosrun rqt_tf_tree rqt_tf_treeTF关系如下图:

参考资料