Google的cartographer SLAM算法在Turtlebot3上的仿真实现教程(上)

本人为了对比研究三大经典SLAM算法(Gmapping、Cartographer、Hector)的优缺

因此考虑在Turtlebot3仿真环境下对这三个SLAM算法进行测试。

没想到测试第一个算法(Google的cartographer)就花了我将近一天的时间,现在把个人实现过程记录下来。

一、环境准备

ubuntu16.04  + ROSkinetic版本

如果只想跑下google的cartographer 算法的 看本篇

如果想cartographer算法结合Turtlebot3上的仿真实现的 建议直接看中下篇

二、最简单跑起来cartographer算法的安装方法(建议人群:只想跑cartographer)

先甩一个链接https://www.cnblogs.com/hitcm/p/5939507.html 感谢 hitcm大神的贡献

同时借鉴了https://blog.csdn.net/xmy306538517/article/details/81455625

自己测试了下,果然一遍测试成功

1. 安装依赖项

sudo apt-get install -y google-mock libboost-all-dev  libeigen3-dev libgflags-dev libgoogle-glog-dev liblua5.2-dev libprotobuf-dev  libsuitesparse-dev libwebp-dev ninja-build protobuf-compiler python-sphinx  ros-kinetic-tf2-eigen libatlas-base-dev libsuitesparse-dev liblapack-dev

2.安装ceres solver 版本1.11

git clone https://github.com/hitcm/ceres-solver-1.11.0.git
cd ceres-solver-1.11.0
mkdir build
cd build
cmake ..
make -j4
sudo make install

3.安装cartographer

git clone https://github.com/hitcm/cartographer.git
cd cartographer
mkdir build
cd build
cmake .. -G Ninja
ninja
ninja test
sudo ninja install

4.安装cartographer_ros

#初始化工作空间
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
echo "source catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

#安装cartographer_ros
cd ~/catkin_ws/src
git clone https://github.com/hitcm/cartographer_ros.git
cd ~/catkin_ws
catkin_make

5.数据测试下载

2D数据下载:https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag

2D例程运行:

roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag

3D数据下载:https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/cartographer_3d_deutsches_museum.bag

3D例程运行

roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/cartographer_3d_deutsches_museum.bag

运行效果:

 

 

  • 0
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值