当前位置:   article > 正文

LVI-SAM遇到的错误_[lvi_sam_visual_loop-10] process has died [pid 517

[lvi_sam_visual_loop-10] process has died [pid 517083, exit code -6, cmd /da

1.编译错误

1.1opencv相关错误

error: ‘CV_RGB2GRAY’ was not declared in this scope
fatal error: opencv/cv.h: 没有那个文件或目录
error: ‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope

 不同opencv版本之间头文件与函数名不同,在《14讲》中出现过类似的错误,只需要在头文件引用与函数部分改正即可。这里可以参照LVI-SAM的安装与测试 - 古月居的博客进行修改。

1.2 GTSAM相关错误

error: no matching function for call to ‘gtsam::PreintegratedImuMeasurements::PreintegratedImuMeasurements(boost::shared_ptr<gtsam::PreintegrationParams>&, gtsam::imuBias::ConstantBias&)’
error: static assertion failed: Error: GTSAM was built against a different version of Eigen
error: conversion from ‘std::shared_ptr<gtsam::PreintegrationParams>to non-scalar type ‘boost::shared_ptr<gtsam::PreintegrationParams>’ requested

        上面的三处应该是由于GTSAM使用了自身携带的EIGEN库(3.2.5)而没有使用系统的EIGEN库(我这里是3.3.7)。在在最新版GTSAM4.2.0中,CMakeLists.txt文件中删除了关于使用系统EIGEN与自带EIGEN的选项,这里我看了一下从4.1.1版本后都没有这个选项,因此我选择了4.1.0版本,并在CMakeLists.txt中添加了

set(GTSAM_USE_SYSTEM_EIGEN ON)

        另外,如果使用的GTSAM版本比较早,CMake时会提示未安装MKL库,在github上有详细的安装说明,但密钥似乎已经过期导致无法安装,可以参照Ubuntu20.04安装GTSAM,运行LIO-SAM_ubuntu20安装gtsam-CSDN博客的博客。

        这个问题应该可以通过修改CMakeLists.txt文件解决,不过上文博客中提到4.0.3后的版本修改了必须下载MKL库的问题。

2.运行遇到的问题

2.1IMU预积分错误

  1. [lvi_sam_imuPreintegration-4] process has died [pid 82436, exit code 127, cmd /home/chiyb/lvisam_catkin_ws/devel/lib/lvi_sam/lvi_sam_imuPreintegration __name:=lvi_sam_imuPreintegration __log:=/home/chiyb/.ros/log/bddd9942-bcbd-11ee-bd82-63d00faa5641/lvi_sam_imuPreintegration-4.log].
  2. log file: /home/chiyb/.ros/log/bddd9942-bcbd-11ee-bd82-63d00faa5641/lvi_sam_imuPreintegration-4*.log

重新编译GTSAM库使用参数

cmake -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ..

2.2图优化错误

  1. [lvi_sam_mapOptmization-7] process has died [pid 82437, exit code 127, cmd /home/chiyb/lvisam_catkin_ws/devel/lib/lvi_sam/lvi_sam_mapOptmization __name:=lvi_sam_mapOptmization __log:=/home/chiyb/.ros/log/bddd9942-bcbd-11ee-bd82-63d00faa5641/lvi_sam_mapOptmization-7.log].
  2. log file: /home/chiyb/.ros/log/bddd9942-bcbd-11ee-bd82-63d00faa5641/lvi_sam_mapOptmization-7*.log

解决思路一:运行lego_loam报错[mapOptmization-7] process has died [pid 11653, exit code 127, cmd /home/p/legoloam/dev_[mapoptmization-7] process has died [pid 19146, ex-CSDN博客

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

没有效果

思路二:

运行loam时报错 process has died错误_[mapoptmization-8] process has died-CSDN博客

sudo cp /usr/local/lib/libmetis.so /opt/ros/melodic/lib/

 无效

        在lvisam的讨论区中有人使用GTSAM4.0.2版本解决了问题,但我尝试了多个GTSAM库,并没有效果,且GTSAM本身的依赖(MKL)也无法安装。最后不得已还是安装了ubuntu18.04+ros melodic

         这一次严格按照LVI-SAM的库进行,看看是否还有问题。等到安装了对应环境后在更新LVI-SAM上的问题

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

闽ICP备14008679号