最近学习ORB SLAM ,按照github 指南,成功编译运行单目/立体/rgbd在数据集上到运行程序;
具体见https://github.com/raulmur/ORB_SLAM2;
_但是按照github指南结合ros运行orbslam时出现错误。具体情况如下:
ORB-SLAM2 Copyright (C) 2014-2016 Raul Mur-Artal, University of Zaragoza.
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions. See LICENSE.txt.
Input sensor was set to: Stereo
Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!
OpenCV Error: Bad argument (Invalid pointer to file storage) in cvGetFileNodeByName, file /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/core/src/persistence.cpp, line 709
terminate called after throwing an instance of 'cv::Exception'
what(): /tmp/binarydeb/ros-kinetic-opencv3-3.1.0/modules/core/src/persistence.cpp:709: error: (-5) Invalid pointer to file storage in function cvGetFileNodeByName
-------以上是报错内容
我用到是ubuntu 16.04,只能安装ros最新的kinetic; 根据报错内容,查到如下问题:
1.kinetic 默认用opencv 3;而我安装的是opencv2,似乎orbslam中也用的是opencv2,因此调用ros时出现版本兼容问题;
2. 查找响应解决方案,包括更改makelist和更改cvbridge,但是无果,个人觉得还有其他步骤;具体见 http://blog.csdn.net/gauxonz/article/details/52842099 ; 和http://wiki.ros.org/opencv3 ;
3. 所以个人感觉如果将ros-kinetic中默认的opencv3换成opencv2即可;由于刚接触ubuntu和ros,求各位帮忙指点啦!
提前感谢!