Ubuntu18.04+ROS melodic 跑通VINS-MONO的一些踩坑记录

VINS-MONO的一些踩坑记录

0 本机环境

笔者的环境为Ubuntu 18.04 + ros melodic + opencv 4.1.1 + Eigen 3.3.9 +ceres solver-1.14

  • 跟VINS-MONO官方环境 ( Ubuntu 16.04, ROS Kinetic, OpenCV 3.3.1, Eigen 3.3.3, ceres solver)不同

1 踩坑开始

  • 第一个报错:‘CV_GRAY2BGR’ was not declared in this scope
    这是由于opencv版本高引起的,解决方法添加头文件:
#include 
  • 第二个报错:‘CV_AA’ was not declared in this scope
    解决方法添加头文件:
#include 
  • 第三个报错:‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope
    解决方法添加头文件:
#include 
  • 第四个报错:‘CV_FONT_HERSHEY_SIMPLEX’ was not declared in this scope
    解决方法添加头文件:
#include 

2 坑里打滚

这个时候直接catkin_make虽然可以通过,但是运行起来会遇到怀疑人生的报错。

[vins_estimator-2] process has died [pid 12283, exit code -11, cmd /home/xzt/catkin_ws/devel/lib/vins_estimator/vins_estimator __name:=vins_estimator __log:=/home/xzt/.ros/log/80f99180-e248-11ec-a970-84c5a661654d/vins_estimator-2.log].
log file: /home/xzt/.ros/log/80f99180-e248-11ec-a970-84c5a661654d/vins_estimator-2*.log
[feature_tracker-1] process has died [pid 12282, exit code -11, cmd /home/xzt/catkin_ws/devel/lib/feature_tracker/feature_tracker __name:=feature_tracker __log:=/home/xzt/.ros/log/80f99180-e248-11ec-a970-84c5a661654d/feature_tracker-1.log].
log file: /home/xzt/.ros/log/80f99180-e248-11ec-a970-84c5a661654d/feature_tracker-1*.log
[pose_graph-3] process has died [pid 12284, exit code -11, cmd /home/xzt/catkin_ws/devel/lib/pose_graph/pose_graph __name:=pose_graph __log:=/home/xzt/.ros/log/80f99180-e248-11ec-a970-84c5a661654d/pose_graph-3.log].
log file: /home/xzt/.ros/log/80f99180-e248-11ec-a970-84c5a661654d/pose_graph-3*.log

实际上这个问题vins-mono的issue里面也有人提到,对方的解决方法是降低CV的版本,问题有效解决。这个时候我们大胆怀疑应该是ROS自带的CV——bridgeCV版本对不上的问题。
遇到一堆不靠谱的改cv_bridge的,最终最终终于遇到了一个靠谱的,这里放上链接:
https://blog.csdn.net/bigdog_1027/article/details/79092263?spm=1001.2014.3001.5502

3 问题解决

然后修改完之后,就可以跑通了。
Ubuntu18.04+ROS melodic 跑通VINS-MONO的一些踩坑记录_第1张图片

你可能感兴趣的:(视觉slam学习,自动驾驶,人工智能,机器学习)