ORB_SLAM2 icon indicating copy to clipboard operation
ORB_SLAM2 copied to clipboard

Segmentation fault (core dumped)

Open ahuo002 opened this issue 7 years ago • 11 comments

dicl@ahuo:ORB_SLAM2$ ./Examples/Monocular/mono_kitti Vocabulary/ORBvoc.txt Examp les/Monocular/KITTI03.yaml /media/dicl/Woko/work_space/KITTI/dataset/sequences/00

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: Monocular

Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

Camera Parameters:

  • fx: 721.538
  • fy: 721.538
  • cx: 609.559
  • cy: 172.854
  • k1: 0
  • k2: 0
  • p1: 0
  • p2: 0
  • fps: 10
  • color order: RGB (ignored if grayscale)

ORB Extractor Parameters:

  • Number of Features: 2000
  • Scale Levels: 8
  • Scale Factor: 1.2
  • Initial Fast Threshold: 20
  • Minimum Fast Threshold: 7

Start processing sequence ... Images in the sequence: 4541

init done opengl support available New Map created with 171 points Segmentation fault (core dumped)

Then, I try the older vision:https://github.com/shomin/ORB_SLAM2, it works(but no map viewer update).

ahuo002 avatar Jun 16 '17 01:06 ahuo002

Can you try and run it with gdb?

DxsGeorge avatar Jun 16 '17 09:06 DxsGeorge

I agree with @DxsGeorge try run it in gdb and check where the error is. Although I don't think it's related but why are you running the yaml file of sequence 03 with sequence 00? you should use the 00-02 settings file.

HDaoud avatar Jun 17 '17 07:06 HDaoud

@HDaoud @DxsGeorge Thank you. It works now. Maybe I should not change CMakeList.txt with OpenCV3.2.0 and Eigen3.3.4. But the latest verison: "error: 'usleep' was not declared", then add #include<unistd.h> in each file.

ahuo002 avatar Jun 20 '17 06:06 ahuo002

Hello.

I am facing the same problem as you but I did not quite understand from your comments how you managed to fix it.

In my case I included #include<unistd.h> in every file that prompts the usleep error when building ORB SLAM 2. However, the issue persists and Segmentation fault (core dumped) is displayed when I try to run a EuRoC dataset example. I do not know how to make use of gdb as I just learned about this tool.

EDIT: I just made a fresh rebuild of ORB SLAM 2. It seems that the problem was the lack of usleep in some files. This is solved following #337 . However, I did not detect this issue since ORB SLAM 2 compiled. I believe it somehow managed to compile and the error went undetected, causing the Segmentation fault (core dumped).

EDIT 2: I believe that the fact that it went unnoticed has something to do with OpenCV as I changed from 3.2 to 3.4 recently and I initially did not build ORB SLAM again after the change.

InigoCastro avatar Jan 22 '18 16:01 InigoCastro

I meet the seam problem, but I don't know how to fix it. @ahuo002 @DxsGeorge

yingyingqin avatar Mar 09 '18 14:03 yingyingqin

You can run the executable with gdb for view where the core exceptions are. For use it you only need put that follow

gdb Examples/Monocular/mono_euroc

Later the gdb is launched, so you need to run the program with

run here_put_the_parameters_of_orbslam

The code will be executed and when the core dump success you could see in what thread and in what line of code

If you can see the track of the function when it crashes then you can use other command without exit of gdb

bt

And when you finish, you exit to gdb with

quit

richard-elvira avatar Mar 09 '18 15:03 richard-elvira

Thank You very much, I will try.

yingyingqin avatar Mar 09 '18 15:03 yingyingqin

The problem is caused by Eigen. Use version 3.2.10 instead of 3.3.X.

JeffreyYH avatar Nov 28 '18 16:11 JeffreyYH

Thanks @JeffreyYH , it worked for me

Ankita-Singh-21 avatar Mar 15 '21 14:03 Ankita-Singh-21

The problem is caused by Eigen. Use version 3.2.10 instead of 3.3.X.

Thanks, it worked. Eigen V3.3.9 is not compatiable, but 3.2.10 okay

zhuge2333 avatar Oct 27 '21 15:10 zhuge2333