cartographer安装--Ubuntu14.04--indigo
Posted F
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cartographer安装--Ubuntu14.04--indigo相关的知识,希望对你有一定的参考价值。
0.安装所有依赖项
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-indigo-tf2-eigen libatlas-base-dev libsuitesparse-dev liblapack-dev
1.首先安装ceres solver,选择的版本是1.11,路径随意
1. git clone https://github.com/hitcm/ceres-solver-1.11.0.git
2. cd ceres-solver-1.11.0/build
3. cmake ..
4 . make
5. sudo make install
2.然后安装 cartographer,路径随意
1. git clone https://github.com/hitcm/cartographer.git
2 . cd cartographer/build
3. cmake ..
4 . make
5. sudo make install
3.安装cartographer_ros。
mkdir ~/catkin_ws/src
cd ~/catkin_ws/src
git clone https://github.com/hitcm/cartographer_ros.git
然后到catkin_ws下面运行catkin_make即可:
cd ..
catkin_make
(=。=,如果编译过程出错internal compiler error: Killed,请看此链接https://blog.csdn.net/qq_29573053/article/details/69665996)
4.数据下载测试
2d数据,大概500M,用迅雷下载
https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
3d数据,8G左右,同样用迅雷下载
https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/cartographer_3d_deutsches_museum.bag
有同学反映上面链接失效了,请用下面的即可。
https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/b3-2016-04-05-14-14-00.bag
然后运行launch文件即可。
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag
roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/cartographer_3d_deutsches_museum.bag
刚开始使用ROS的同学运行下面两句是无法工作的,可能出现的错误如下。
[demo_backpack_2d.launch] is neither a launch file in package [cartographer_ros] nor is [cartographer_ros] a launch file name
The traceback for the exception was written to the log file
这种错误的主要原因是ros的catkin_ws配置问题,可以运行rospack profile试试。
实在不行还有如下所示的两种解决方法。推荐第二种。
最终结果如下图,左侧为2d,右侧为3d。
Good luck!关于代码的原理解析,接下来的文章可能会详细探讨。
以上是关于cartographer安装--Ubuntu14.04--indigo的主要内容,如果未能解决你的问题,请参考以下文章