当前位置:   article > 正文

ros-neodic安装ALOAM

ros-neodic安装ALOAM

一、安装ceres 

1. 下载依赖

sudo apt-get install  liblapack-dev libsuitesparse-dev libcxsparse3 libgflags-dev libgoogle-glog-dev libgtest-dev

2.下载

  1. git clone https://mirror.ghproxy.com/https://github.com/ceres-solver/ceres-solver.git (镜像加速)
  2. git clone http://gitee.com/liwuhaoooo/ceres-solver.git (gitee倒仓)

3.编译并安装

  1. mkdir build
  2. cd build
  3. cmake ..
  4. make
  5. sudo make install

4. 报错及解决方案

4.1 cmake .. 报错
  1. CMake Error at CMakeLists.txt:60 (add_subdirectory):
  2. The source directory
  3. /home/zwkj/ceres-solver/third_party/abseil-cpp
  4. does not contain a CMakeLists.txt file.
  5. -- Performing Test HAVE_BIGOBJ
  6. -- Performing Test HAVE_BIGOBJ - Failed

  解决方案:进入third_party文件夹执行

  1. git clone https://github.com/abseil/abseil-cpp.git
  2. git clone https://github.com/google/googletest.git

再重新编译

4.2.make报错

(1)

  1. home/zwkj/ceres-solver/internal/ceres/suitesparse.cc:187:7: error: ‘VLOG_IS_ON’ was not declared in this scope; did you mean ‘VLOG_FIRST_N’?
  2. 187 | if (VLOG_IS_ON(2)) {
  3. | ^~~~~~~~~~
  4. | VLOG_FIRST_N

解决方案:找到相应的.cc文件,加入头文件

#include <glog/logging.h>

(2)

 undefined reference to `google::kLogSiteUninitialized

解决方案:参考方法或注释所有与glog/logging.h相关的代码

二、安装PCL

sudo apt install libpcl-dev

三、安装ALOAM

参考链接

1报错及解决

报错

  1. CMake Error at A-LOAM/CMakeLists.txt:25 (find_package):
  2. Found package configuration file:
  3. /usr/local/lib/cmake/Ceres/CeresConfig.cmake
  4. but it set Ceres_FOUND to FALSE so package "Ceres" is considered to be NOT
  5. FOUND. Reason given by package:
  6. The following imported targets are referenced, but are missing: absl::log
  7. absl::check absl::fixed_array

解决

cmakelists 加入

  1. set(ABSEIL_DIR "/home/zwkj/aloam/ceres-solver/third_party/abseil" CACHE PATH "Path to Abseil libraries")
  2. find_package(absl REQUIRED HINTS ${ABSEIL_DIR})

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

闽ICP备14008679号