又在深夜配环境

编译之前检查依赖:

rosdep check --from-path src --ignore-src -r -y

rosdep install --from-path src --ignore-src -r -y

编译fast-lio-sam:

错误1:

CMake Error at FAST_LIO_SAM/CMakeLists.txt:61 (find_package):

By not providing "FindGeographicLib.cmake" in CMAKE_MODULE_PATH this

project has asked CMake to find a package configuration file provided by

"GeographicLib", but CMake did not find one.

Could not find a package configuration file provided by "GeographicLib"

with any of the following names:

GeographicLibConfig.cmake

geographiclib-config.cmake

Add the installation prefix of "GeographicLib" to CMAKE_PREFIX_PATH or set

"GeographicLib_DIR" to a directory containing one of the above files. If

"GeographicLib" provides a separate development package or SDK, be sure it

has been installed.

-- Configuring incomplete, errors occurred!

See also "/home/tx/fast_lio_sam_ws/build/CMakeFiles/CMakeOutput.log".

See also "/home/tx/fast_lio_sam_ws/build/CMakeFiles/CMakeError.log".

Invoking "cmake" failed

解决方法:

sudo apt install libgeographic-dev

然后在Cmakelists.txt里面修改以下

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "/usr/share/cmake/geographiclib/")

find_package (GeographicLib REQUIRED)

错误2:

usr/local/include/gtsam/base/Vector.h:75:52: error: static assertion failed: Error: GTSAM was built against a different version of Eigen

75 | GTSAM_EIGEN_VERSION_WORLD==EIGEN_WORLD_VERSION &&

原因是GTSAM自带的eigen和我系统安装的eigen之间有冲突。GTSAM编译的时候默认使用了自带的eigen,而系统中如果还手动安装过一个eigen的话,就会出现两个eigen的冲突。

解决方法(跟版本也有关系,4.0.3可以用这种,4.1.0不管用):

在CMakeLists.txt文件中添加:

set(GTSAM_USE_SYSTEM_EIGEN ON)

错误3:

laserMapping-1 process has died pid 186915, exit code 127, cmd /home/dlab/lesson8/fastlio_slam_ws/devel/lib/fast_lio_sam/fastlio_sam_mapping __name:=laserMapping __log:=/home/dlab/.ros/log/accb0f1a-8809-11ee-a2f5-f35b7aca3fd2/laserMapping-1.log.

log file: /home/dlab/.ros/log/accb0f1a-8809-11ee-a2f5-f35b7aca3fd2/laserMapping-1*.log

原因:

libmetis-gtsam.so这个文件位于路径"/usr/local/lib" 中,而程序默认找的位置是路径"/usr/lib",所以没有找到,看了很多方法,还挺麻烦的,所以自己想出来一种方法------把文件复制过去

解决方法:

sudo cp /usr/local/lib/libmetis-gtsam.so /usr/lib/

相关推荐
凡人叶枫15 分钟前
Effective C++ 条款24:若所有参数皆须要类型转换,请为此采用 non-member 函数
linux·前端·c++·算法·嵌入式开发
零陵上将军_xdr18 分钟前
Shell流程控制:if/case/for/while让脚本活起来
linux·运维·服务器
坤昱25 分钟前
cfs调度类深入解刨——pelt细节篇
linux·linux内核·cfs调度·eevdf·cfs调度类深入解刨·pelt·pelt细节篇
故渊at41 分钟前
第十二板块:Android 系统启动与初始化 | 第二十九篇:Init 进程、RC 脚本与属性服务(Property Service)
android·linux·内存映射·权限控制·init进程·rc脚本·属性服务
志栋智能43 分钟前
从云端到边缘:无处不在的超自动化巡检需求
运维·自动化
某林2121 小时前
ROS2 并行编译死锁与 Linux 后台声卡/提权踩坑实录:大型轮足机器人架构复盘
linux·架构·机器人·iassc
无足鸟ICT1 小时前
【RHCA+】末行模式
linux
拼搏的小浣熊1 小时前
【通用教程】Windows\+Linux\+银河麒麟系统 固定静态IP地址|解决打印机扫描IP变动、网络掉线问题
linux·网络·windows·麒麟·固定ip·麒麟系统·统信系统
小生不才yz1 小时前
Shell脚本精读 · S02-02 | 转义、续行与注释
linux
dust_and_stars1 小时前
Streamlit vs Gradio 完整对比
服务器·python