虚拟机使用ubuntu20.04
2022年2月初下载并安装最新ORBSLAM3(与网上教程对照,我的版本特点是无euroc_examples,且有Examples与Examples_old两个文件夹)
数据集放在文件夹Datasets中,结构为/home/sbr/ORB_SLAM3/Datasets/MH01/mav0
问题一
在尝试运行MH01时,发现用双目(Stereo)可顺利运行,代码为
./Examples/Stereo/stereo_euroc ./Vocabulary/ORBvoc.txt ./Examples/Stereo/EuRoC.yaml ./Datasets/MH01 ./Examples/Stereo/EuRoC_TimeStamps/MH01.txt
可顺利出现如图两个界面
./Examples/Monocular/mono_euroc ./Vocabulary/ORBvoc.txt ./Examples/Monocular/EuRoC.yaml ./Datasets/MH01 ./Examples/Monocular/EuRoC_TimeStamps/MH01.txt
运行结果主要为
Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!
Initialization of Atlas from scratch
Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name:
There are 1 cameras in the atlas
Camera 0 is pinhole
First KF:0; Map init KF:0
New Map created with 271 points
virtual int g2o::SparseOptimizer::optimize(int, bool): 0 vertices to optimize, maybe forgot to call initializeOptimization()
virtual int g2o::SparseOptimizer::optimize(int, bool): 0 vertices to optimize, maybe forgot to call initializeOptimization()
virtual int g2o::SparseOptimizer::optimize(int, bool): 0 vertices to optimize, maybe forgot to call initializeOptimization()
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Relocalized!!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Fail to track local map!
Shutdown
Saving trajectory to f_dataset-MH01_mono.txt ...
There are 1 maps in the atlas
Map 0 has 288 KFs
End of saving trajectory to f_dataset-MH01_mono.txt ...
当运行到New Map created with 271 points 处时 我的笔记本开始轰鸣并长时间卡死 但不会有任何新界面弹出 等待很久便会出现之后的Fail to track local map!之类的报错
我尝试了各种办法 比如用数据集MH02来替代 将Examples换成Examples_old 重新运行build.sh 但没用 单目总是卡死 按网上说 顺利的话应该会出现类似上图所示的两个窗口 但我实在不知道怎么办了
问题二
我还遇到了个可能有关的错误 我安装ros并成功编译orbslam3中的build_ros.sh 按教程更改路径 启动roscore 打开usb_cam并运行如下代码
rosrun ORB_SLAM3 Mono /home/sbr/ORB_SLAM3/Vocabulary/ORBvoc.txt /home/sbr/ORB_SLAM3/Examples_old/ROS/ORB_SLAM3/Asus.yaml
报错结果如下
Loading ORB Vocabulary. This could take a while...
Vocabulary loaded!
Initialization of Atlas from scratch
Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name:
Camera Parameters:
- Camera: Pinhole
- Image scale: 1
- fx: 535.4
- fy: 539.2
- cx: 320.1
- cy: 247.6
- k1: 0
- k2: 0
- p1: 0
- p2: 0
- fps: 30
- color order: RGB (ignored if grayscale)
ORB Extractor Parameters:
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7
There are 1 cameras in the atlas
Camera 0 is pinhole
Starting the Viewer
段错误 (核心已转储)
会在Loading ORB Vocabulary. This could take a while短暂停顿 后闪烁一次弹窗 并出现段错误 (核心已转储)等报错 我按教程删去一些cmakelist中的-march=native 但是没用 依教程 顺利的话应该出现类似下图结果
ORB-SLAM3 细读单目初始化过程(上)
https://www.cnblogs.com/yongqivisionimax/p/14248309.html
ORB-SLAM3 单目地图初始化(终结篇,超详细)
https://zhuanlan.zhihu.com/p/337979973
有没有运行日志呀
单目有个初始化过程
或者
单目需要配合惯导
超详细解读ORB-SLAM3单目初始化(下篇)
https://mp.weixin.qq.com/s/h1OIxdYQ5Eu-2OAHhsVcIQ
老哥,你解决了么?我的是这样报错
ORB Extractor Parameters:
请问解决了吗,一模一样的问题。
数据集为双目数据集 里面有两个摄像头信息 删掉一个
会不会是ASus.yaml的相机参数有问题?
我也是,千辛万苦编译过了。数据集测试也是很正常的。用自己的摄像头跑 ros 就报错,窗口一闪就消失了
ORB Extractor Parameters:
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7
There are 1 cameras in the atlas
Camera 0 is pinhole
Segmentation fault (core dumped)
请问
问题一有解决方法了吗?
问题二把项目中两个CMakeLists.txt中find_package(OpenCV 3.2 QUIET),opencv设置为3.2即可运行