【安装学习】安装Cartographer ROS(noetic)

【Cartographer介绍】

2016年10月5日,谷歌宣布开放一个名为cartographer的即时定位与地图建模库,开发人员可以使用该库实现机器人在二维或三维条件下的定位及建图功能。cartograhper的设计目的是在计算资源有限的情况下,实时获取相对较高精度的2D地图。考虑到基于模拟策略的粒子滤波方法在较大环境下对内存和计算资源的需求较高,cartographer采用基于图网络的优化方法。

cartographer是google开发的实时室内SLAM项目,cartographer采用基于google自家开发的ceres非线性优化的方法,cartographer的量点在于代码规范与工程化,非常适合于商业应用和再开发。并且cartographer基于submap子图构建全局地图的思想,能有效的避免建图过程中环境中移动物体的干扰。并且cartographer支持多传感器数据(odometry、IMU、LaserScan等) 建图 ,支持2D_SLAM和3D_SLAM 建图 。

此处感谢:

https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755https://zhuanlan.zhihu.com/p/64747755 【安装学习】安装Cartographer ROS(noetic)https://zhuanlan.zhihu.com/p/64747755 ;以及《ROS机器人开发实践》

安装Cartographer功能包有两种方法:

1,ROS集成版,使用命令sudo apt install ros-

2.源码编译的方式进行安装。

参照官网教程:

Compiling Cartographer ROS — Cartographer ROS documentation

【安装编译】

  1. 创建工作空间
mkdir -p ~/catkin_google_ws/src
cd catkin_google_ws/src
catkin_init_workspace

2.安装工具

sudo apt update
sudo apt install -y python3-wstool python3-rosdep ninja-build stow

3.初始化工作空间

cd catkin_google_ws
wstool init src
wstool merge -t src https://raw.githubusercontent.com/cartographer-project/cartographer_ros/master/cartographer_ros.rosinstall
wstool update -t src

4 .安装依赖并下载cartographer相关功能包

此处推荐使用国内用户用的rosdepc

sudo pip install rosdepc
sudo rosdepc init
rosdepc update

感谢小鱼:

https://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Qhttps://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Q 【安装学习】安装Cartographer ROS(noetic)https://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Q ;

rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y

此过程可能会出现报错信息,原因可能与ROS版本相关 ,根据提示手动安装缺少的库或依赖即可

5.安装abseil cpp库

src/cartographer/scripts/install_abseil.sh

若与已装库冲突,需要卸载之前的库

sudo apt-get remove ros-${ROS_DISTRO}-abseil-cpp

6.编译与安装

catkin_make_isolated --install --use-ninja
source devel_isolated/setup.bash

7.下载并运行2d demo

wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag

效果如下图

【安装学习】安装Cartographer ROS(noetic)

Original: https://blog.csdn.net/weixin_44362628/article/details/122540297
Author: Howe_xixi
Title: 【安装学习】安装Cartographer ROS(noetic)

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/597399/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球