Cartographer安装流程
安装与编译
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
$ git clone https://github.com/hitcm/ceres-solver-1.11.0.git
$ cd ceres-solver-1.11.0/build
$ cmake ..
1.3.PNG
$ make
1.4.PNG
$ sudo make install
1.5.PNG
2. 安装cartographer
$ git clone https://github.com/hitcm/cartographer.git
$ cd cartographer/build
$ cmake ..
2.3.PNG
$ make
2.4.PNG
$ sudo make install
2.5.PNG
3. 安装cartographer_ros
$ sudo apt-get update
$ sudo apt-get install -y python-wstool python-rosdep ninja-build
$ mkdir catkin_ws
$ cd catkin_ws
$ wstool init src
下载到catkin_ws下面的src文件夹下面
$ git clone https://github.com/hitcm/cartographer_ros.git
到catkin_ws下面运行catkin_make
$ catkin_make
4. 数据下载测试
$ catkin_make_isolated --install --use-ninja
注意: 上面这一步需要翻墙才能访问网址
$ source install_isolated/setup.bash
4.运行样例
1. 下载2D样例包并运行
$ 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
运行结果:
Experimental Experience——实验心得
在本次实验中主要是跟着教程安装与配置cartographer,需要注意的是在首次运行时会报错,此时执行以下两句:
$ source ~/catkin_ws/devel/setup.bash
$ rospack profile
即可正常运行。
网友评论