ubuntu1804进行vins-fusion算法环境搭建遇到的问题汇总

  • Post author:
  • Post category:其他


简介:在ubuntu1804系统搭建vins-fusion环境并基于euroc数据集进行测试,对遇到的编译报错和解决办法进行汇总



1.vins-fusion算法环境搭建



报错1

Chessboard.cc:20:38: error: ‘CV_GRAY2BGR’ was not declared in this scope cv::cvtColor(image, mSketch, CV_GRAY2BGR);

解决



Chessboard.cc

代码文件中添加头文件

#include <opencv2/imgproc/types_c.h>



报错2

integer_sequence_algorithm.h:67:21: error: ‘integer_sequence’ is not a member of ‘std’ struct SumImpl<std::integer_sequence<T, N, Ns...>> {

在报错文件对应文件夹下的

CMakeLists.txt

中,将

set(CMAKE_CXX_FLAGS "-std=c++11")

改为

set(CMAKE_CXX_STANDARD 14)



报错3

编译时报错 error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope 、error: ‘CV_CALIB_CB_NORMALIZE_IMAGE’ was not declared in this scope、error: ‘CV_CALIB_CB_FILTER_QUADS’ was not declared in this scope 和 error: ‘CV_CALIB_CB_FAST_CHECK’ was not declared in this scope

在对应的CMakeLists.txt中将

find_package( OpenCV REQUIRED )

改为

find_package( OpenCV 3 REQUIRED )



2.基于EuRoC数据集运行vins-fusion

主要是跑一个双目+imu的程序,其他模式参考官方主页链接:

https://github.com/HKUST-Aerial-Robotics/VINS-Fusion

roslaunch vins vins_rviz.launch
rosrun vins vins_node ~/catkin_ws/src/VINS-Fusion/config/euroc/euroc_stereo_imu_config.yaml 
rosrun loop_fusion loop_fusion_node ~/catkin_ws/src/VINS-Fusion/config/euroc/euroc_stereo_imu_config.yaml 
rosbag play ~/SLAM/test_data/MH_04_difficult.bag

在这里插入图片描述



版权声明:本文为guanjing_dream原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。