当前位置:   article > 正文

Cartographer官方安装流程遇到的坑_failed to process package 'cartographer': command

failed to process package 'cartographer': command '['/home/aktup/catkin_ws/i

现在Cartographer官方安装流程比较简单,本人也是参考官方的流程进行安装

https://google-cartographer-ros.readthedocs.io/en/latest/compilation.html#building-installation 

坑1:

在执行下列命令时出现了如下的问题

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

方法a: 这个命令主要是将cartographer_ros.rosinstall下载下来并放到carto_ws/src目录下,由于某些原因,国内可能无法访问,所以最好的办法就是自己创建一个.roinstall文件啦,参考下面的内容

  1. 命令:gedit src/.rosinstall, gedit src/cartographter_ros/cartographter_ros.rosinstall
  2. 填入下面的内容:
  3. - git: {local-name: cartographer, uri: 'https://github.com/googlecartographer/cartographer.git', version: '1.0.0'}
  4. - git: {local-name: cartographer_ros, uri: 'https://github.com/googlecartographer/cartographer_ros.git', version: '1.0.0'}
  5. - git: {local-name: ceres-solver, uri: 'https://ceres-solver.googlesource.com/ceres-solver.git', version: '1.13.0'}

方法b: 将

输入网址:ipaddress 查询 raw.githubusercontent.com 的IP地址,并修改hosts文件

  1. sudo gedit /etc/hosts
  2. 添加下面的内容
  3. 199.232.68.133 raw.githubusercontent.com

坑2:

无法下载ceres-solver, 

修改.roinstall里面ceres-solver的源地址为https://github.com/ceres-solver/ceres-solver.git (不要使用该方法!!!见下面的内容)

  1. - git: {local-name: cartographer, uri: 'https://github.com/googlecartographer/cartographer.git', version: '1.0.0'}
  2. - git: {local-name: cartographer_ros, uri: 'https://github.com/googlecartographer/cartographer_ros.git', version: '1.0.0'}
  3. - git: {local-name: ceres-solver, uri: 'https://github.com/ceres-solver/ceres-solver.git', version: '1.13.0'}

坑3:

在执行命令rosdep install --from-paths src --ignore-src -r -y 下载依赖包时遇到了如下的问题:

  1. ERROR: Rosdep experienced an error: rosdep data for [version] must be a dictionary
  2. Please go to the rosdep page [1] and file a bug report with the stack trace below.

处理方法:编辑lookup.py文件屏蔽该语句

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/lookup.py

 

坑4:在编译(catkin_make_isolated --install --use-ninja)的过程中,出现如下的问题 

  1. CMake Error at /home/ros/carto_ws/install_isolated/lib/cmake/Ceres/CeresConfig.cmake:88 (message):
  2. Failed to find Ceres - Missing requested Ceres components: [SuiteSparse]
  3. (components requested: [SuiteSparse]). Detected Ceres version: 1.13.0
  4. installed in: /home/ros/carto_ws/install_isolated with components: [LAPACK,
  5. SchurSpecializations, OpenMP].
  6. Call Stack (most recent call first):
  7. /home/ros/carto_ws/install_isolated/lib/cmake/Ceres/CeresConfig.cmake:392 (ceres_report_not_found)
  8. CMakeLists.txt:32 (find_package)

 

解决方法:当时我尝试手动编译Ceres没问题,但是使用catkin_make的时候就会失败,而且在catkin_make编译Ceres时没有使用SuiteSparse,当时尝试改过CMAKE文件,依然不行,最后我怀疑是由于ceres源的原因,因为我将官方指定的Ceres源由https://ceres-solver.googlesource.com/ceres-solver.git改为https://github.com/ceres-solver/ceres-solver.git ,所以只能借助代理下载ceres-solver安装包,并手动解压放置在src目录下。目录结构如下:

文件地址我已经上传到了CSDN:https://download.csdn.net/download/tracylining/12496279 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/笔触狂放9/article/detail/485781
推荐阅读
相关标签
  

闽ICP备14008679号