cartographer 最新版安装测试
在官网的基础上稍加修改,但保证代码都是最新的
我的系统配置: Debian9 strech, ROS lunar 该方法对 ubuntu 系列操作系统以及其他ROS版本同样适用。
1. 安装依赖库
1 2 3 4 5 6 7 8 9 10 11 12 13 | sudo apt-get install -y \ g++ \ git \ google-mock \ libboost-all-dev \ libcairo2-dev \ libeigen3-dev \ libgflags-dev \ libgoogle-glog-dev \ liblua5.2-dev \ libsuitesparse-dev \ ninja-build \ python-sphinx |
2. 安装ceres-solver
google提供的地址下载太慢,在github上git clone 也是太慢, 索性直接Donload zip
https://github.com/ceres-solver/ceres-solver.git
然后编译安装:
1 2 3 4 5 6 | cd ceres-solver mkdir build cd build cmake .. make -j4 sudo make install |
3. 安装proto3
a. 重要说明: 如果你已经安装了ROS Lunar, 恭喜你,其实你已经安装了protobuf了, 但是你没有安装protobuf-compiler, 你只需要安装一下protobuf-compiler就可以了
1 | sudo apt-get install protobuf-compiler |
然后你可以执行 protoc --version 查看protobuf 的版本.
b. 如果你装的是ROS Kinetic, 你的protobuf 的版本应该是 2.x, 需要手动将其升级到 proto3
方法:
下载链接 https://github.com/google/protobuf/releases
官方安装手册:https://github.com/protocolbuffers/protobuf/blob/master/src/README.md
安装:(下载安装all版本)
1 2 3 4 5 6 7 | tar zxvf protobuf-all-3.6.0. tar .gz cd protobuf-3.6.0/ . /configure –prefix= /usr/local/ (安装路径,一般情况下,默认会安装到 /usr/include 文件下,我们需要指定安装到, /usr/local/include 文件下,安装完成会有一个goole文件在 /usr/local/include 下) make make check make install protoc –version #查看版本 |
c. 如果你没有装ROS那么执行下面的步骤吧:
安装依赖
1 | sudo apt-get install autoconf automake libtool curl make g++ unzip |
方式一(推荐):
1 2 | sudo apt-get install libprotobuf-dev sudo apt-get install protobuf-compiler |
方式二:
下载zip(git clone 太慢了)
地址: https://github.com/protocolbuffers/protobuf
编译安装:
1 2 3 4 5 6 | . /autogen .sh . /configure –prefix= /usr/local/ make -j4 make check sudo make install sudo ldconfig # refresh shared library cache. |
make check 会提示又一些错误,没关系啦,核心库已经编译好啦
4. 安装cartographer
clone cartographer代码,这个速度还可以
1 | git clone https: //github .com /googlecartographer/cartographer .git |
编译安装
1 2 3 4 5 6 | cd cartographer mkdir build cd build cmake .. make -j4 sudo make install |
5. 安装cartographer_ros
这个就简单了,地址:
https://github.com/googlecartographer/cartographer_ros
clone 或者下载到自己的ROS工作空间,编译一下就可以了.
6. 测试
2D:
1 2 | // launch 2D example roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME} /Downloads/cartographer_paper_deutsches_museum .bag |
3D:
1 2 | # Launch the 3D backpack demo. roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME} /Downloads/b3-2016-04-05-14-14-00 .bag |
OK, 到此结束!
作者:白菜菜白
出处:http://www.cnblogs.com/lvchaoshun/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】博客园社区专享云产品让利特惠,阿里云新客6.5折上折
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 解答了困扰我五年的技术问题
· 为什么说在企业级应用开发中,后端往往是效率杀手?
· 用 C# 插值字符串处理器写一个 sscanf
· Java 中堆内存和栈内存上的数据分布和特点
· 开发中对象命名的一点思考
· 为什么说在企业级应用开发中,后端往往是效率杀手?
· DeepSeek 解答了困扰我五年的技术问题。时代确实变了!
· 本地部署DeepSeek后,没有好看的交互界面怎么行!
· 趁着过年的时候手搓了一个低代码框架
· 推荐一个DeepSeek 大模型的免费 API 项目!兼容OpenAI接口!