Gmapping 之安装与配置
1. 概述
Gmapping从配置到运行,希望能帮助大家,也给自己留一个笔记,以供复习参考。
2. 安装
首先需要安装一些必要文件
sudo apt-get install ros-kinetic-slam-gmapping
然后在工作空间中获取Gmapping的源代码
gitclone https://github.com/ros-perception/slam_gmapping.git
2.1 github仓库
因为Gmapping的部分源代码在ubuntu下不能显示,跳转比较繁琐,建议直接将两个原始github仓库都拷贝到本地。
- 一个是调用封装好的函数实现Gmapping的代码,
slam_gmapping - 一个是Gmapping内部结构的具体源代码。
openslam_gmapping
gitclone https://github.com/ros-perception/slam_gmapping.git
gitclone https://github.com/ros-perception/openslam_gmapping.git
3. 运行
准备好需要的数据集,参考链接
- 启动roscore,注意source。
roscore - 运行bag,注意发布的节点话题
rosbag play --clock intel.bag - 启动slam_gmapping节点程序,注意激光接受的话题,设置使用仿真时间
rosparam set use_sim_time true以及rosrun gmapping slam_gmapping - 运行rviz添加发布的
占用栅格地图

本文详细介绍Gmapping的安装步骤,包括必要的软件包安装、源代码获取及运行过程。涵盖tf树、坐标变换信息解析,以及常见错误解决方法,适合初学者快速上手。
最低0.47元/天 解锁文章
7652





