cartographer 安装及报错

cartographer安装分为两种,一种为国内大神张明明修改安装版(自己实测没问题),一种为官方安装教程(装了n遍一直报错,最终改好了,不的不说官网就是个坑)....

向大神致敬,第一种国内大神修改版如下:

1.install dependency

$  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-kinetic(特别注意这个和你安装的ros版本相匹配,选择适合自己的)-tf2-eigen libatlas-base-dev libsuitesparse-dev liblapack-dev

2.install ceres solver (路径你可以自己随意,不过建议最好和和下面安装的放在一起;如: path:/home/zc/)

$  git clone https://github.com/hitcm/ceres-solver-1.11.0.git
$  mkdir build
$  cd ceres-solver-1.11.0/build
$  cmake ..
$  make –j
$  sudo make install
(err:check dependency 如果报错,请查看依赖项是否添加正确)

3.install cartographer

$  git clone https://github.com/hitcm/cartographer.git
$  mkdir build
$  cd cartographer/build
$  cmake .. -G Ninja
$  ninja
$  ninja test
$  sudo ninja install

4.install 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
$  cd src
$  git clone https://github.com/hitcm/cartographer_ros.git
$  cd
$  cd catkin_ws
$  catkin_make

最后为了避免每次都要加工作空间麻烦,所以可以执行下面的直接写好即可.
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc

到此国内大神修改版安装完成可以下载demo自己玩了,不过对电脑性能要求还是有点高的,通过建图你就可以看出来了,这里不啰嗦了.

官网安装
cartographer官方安装

  一、安装wstool,rosdep,ninja等

  1、sudo apt-get update

  2、sudo apt-get install -y python-wstool python-rosdep ninja-build

  二、创建cartographer的工作空间

  3、mkdir catkin_ws

  4、cd catkin_ws

  5、wstool init src
 三、下载ceres-solver、cartographer、cartographer_ros工程代码

  6. wstool merge -t src git: {local-name: cartographer, uri: 'https://github.com/googlecartographer/cartographer.git', version: '1.0.0'}
      wstool merge -t src git: {local-name: cartographer_ros, uri: 'https://github.com/googlecartographer/cartographer_ros.git', version: '1.0.0'}
     wstool merge -t src git: {local-name: ceres-solver, uri:'https://github.com/ceres-solver/ceres-solver.git', version: '1.13.0'}
    
  7.wstool update -t src
 
 四、安装proto3. (如果已经安装完ros,就不要在执行这条命名,亲测大坑)

  10、src/cartographer/scripts/install_proto3.sh

   该脚本实际上是进行下载protobuf,编译,安装。
 五、安装deb依赖

   11、sudo rosdep init

   12、rosdep update

   13、rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y

 六、编译

   14、catkin_make_isolated --install --use-ninja

   15、source install_isolated/setup.bash

到此官网也安装完成了,下载demo玩吧.

七、测试

   1、下载任意数据包

   http://google-cartographer-ros.readthedocs.io/en/latest/data.html

   2、roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=数据包路径

   3、如能正常建图,则cartographer安装成功。

 

  • 2
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值