Cartographer是一个跨多个平台和传感器配置提供 2D 和 3D实时同步定位和映射 ( SLAM ) 的系统。
使用Cartographer有Ros集成环境和无Ros环境,对于新手快速入门,推荐使用ROS集成。
下面介绍在Ros集成环境下快速安装Cartographer:
推荐教程:
官方:https://google-cartographer-ros.readthedocs.io/en/latest/compilation.html#building-installation
非官方:https://blog.csdn.net/qq_26482237/article/details/92676267
以下是个人安装流程,简化优化了相关步骤:
1:安装依赖
sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
2:创建工作区
cd catkin_ws
wstool init src
3:下载使用cartographer_ros安装脚本
wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall
下载完成之后修改脚本中ceres-solver的下载地址url:
gedit src/.rosinstall
https://ceres-solver.googlesource.com/ceres-solver.git → https://github.com/ceres-solver/ceres-solver.git
能翻墙可以不修改
git下载速度缓慢可以将使用git镜像:
github.com → github.com.cnpmjs.org
保存退出
wstool update -t src
等待下载完成
4:安装其他库
在工作区安装proto:
src/cartographer/scripts/install_proto3.sh
安装ros
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=kinetic -y
kinetic根据自己对应ROS版本相应替换
catkin_make_isolated --install --use-ninja
source install_isolated/setup.bash
source ~/catkin_ws/install_isolated/setup.bash
可以将上面命令放到bashrc文件中,以后运行就不用反复输入了
等待编译完成,即完成全部安装流程
【完】