VINS_Mono,OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetFileNodeByName问题终于解决了

来源:互联网 发布:数据质量提升方案 编辑:程序博客网 时间:2024/05/29 17:13

跑VINS_Mono的时候每次运行

roslaunch vins_estimator euroc.launch

就报错:

OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetFileNodeByName, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/persistence.cpp, line 740
[INFO] [1498548740.315501276]: Loaded vins_folder: /home/duyl/catkin_ws/src/VINS-Mono/feature_tracker/../config/../
OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetFileNodeByName, file /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/persistence.cpp, line 740
terminate called after throwing an instance of ‘cv::Exception’
what(): /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/persistence.cpp:740: error: (-5) Invalid pointer to file storage in function cvGetFileNodeByName

terminate called after throwing an instance of ‘cv::Exception’
what(): /build/buildd/opencv-2.4.8+dfsg1/modules/core/src/persistence.cpp:740: error: (-5) Invalid pointer to file storage in function cvGetFileNodeByName

今天这个问题终于解决了.

查看issues里面说到可能是opencv的版本的问题,于是多方尝试。
刚开始装的是ros附带的opencv2.4.8,后来看slambook装了一个opencv3.1.0,看了这个issue之后,下载了opencv2.4.8,然后重新安装。(安装过程中还遇到了点小麻烦,百度之予以解决)装完2.4.8之后catkin_make然后运行roslaunch vins_estimator euroc.launch还是有错误。

然后回忆了一下自己的操作跟VINS的github主页上有什么不一样的地方,发现自己装了ros-indigo-opencv3,而主页上只说明让安装ros-kinetc-opencv3,并没有让Ubuntu14.04版本的用户去安装这个ros-indigo-opencv3,所以我就试一试把这个卸载了。

sudo apt-get remove ros-indigo-opencv3

然后重新清理catkin_ws里的build文件夹,重新catkin_make,再运行roslaunch的时候发现已经没有那个错误了!!!

真是波折啊

阅读全文
0 0
原创粉丝点击