cartographer安装

注:ubuntu16.04+ros kinetic
安装时间 2019.2.18

安装工具wstool,rosdep,ninja

sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build

初始化工作空间

cd google_ws
wstool  init src

设置下载地址

wstool merge -t src https://raw.githubusercontent.com/googlecartographer/cartographer_ros/master/cartographer_ros.rosinstall 
wstool update -t src

报错 网络问题

ERROR in config: Error processing ‘ceres-solver’ : [ceres-solver] Checkout of https://ceres-solver.googlesource.com/ceres-solver.git version 1.13.0 into /home/kong/google_ws/src/ceres-solver failed.

自行下载ceres-solver后再wstool update -t src
或者科学上网

git clone https://github.com/ceres-solver/ceres-solver.git

下载功能包 很多博客给的是如下操作 我是看的深蓝学院的ppt也是如下 但是会报错 此部分仅是给已经这样报错的朋友一个参考 没执行的不要按下列步骤操作

rosdep update
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y

报错

cartographer/mapping/proto/scan_matching/real_time_correlative_scan_matcher_options.proto:15:10: Unrecognized syntax identifier “proto3”. This parser only recognizes “proto2”.
ninja: build stopped: subcommand failed.
<== Failed to process package ‘cartographer’:
Command ‘[’/home/kong/google_ws/install_isolated/env.sh’, ‘ninja’, ‘-j1’, ‘-l1’]’ returned non-zero exit status 1
Reproduce this error by running:
==> cd /home/kong/google_ws/build_isolated/cartographer && /home/kong/google_ws/install_isolated/env.sh ninja -j1 -l1

解决 不要自行下载protobuf最新版!(git clone https://github.com/google/protobuf.git或下载相应版本.tar.gz之类的)我进行这种操作后不管是最新的3.7.0还是之前的3.4.0 会出现版本相关的问题或者与goole::protobuf相关未定义的引用 按官网下载就好了

src/cartographer/scripts/install_proto3.sh
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro kinetic -y

最后编译

catkin_make_isolated --install --use-ninja

每次用carto时要在此工作空间文件夹下的终端

source install_isolated/setup.bash

如果没输的话会报错 报啥错来着忘了 反正是哪个节点不能launch来着

你可能感兴趣的:(cartographer安装)