Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does anyone run the demo without 'Segmentation fault (core dumped)' error? #3

Closed
SquirminatorHotHead opened this issue Jul 24, 2020 · 12 comments

Comments

@SquirminatorHotHead
Copy link

SquirminatorHotHead commented Jul 24, 2020

Does anyone run the demo without 'Segmentation fault (core dumped)' error?

Seems like an issue with the OpenCV version (currently OpenCV3.4 and Ubuntu18.04).

Is there anyone here tested it successfully with Ubuntu18.04 and OpenCV3.4?

### Anyone knows how to fix it or have no issue running the demos please share your experience here, it looks like a common issue for this segmentation fault.
Thank you!

@dimaxano
Copy link

Yep, run Euroc example successfully. Post, please, orb-slam output here

@michaelnguyen11
Copy link

michaelnguyen11 commented Jul 25, 2020

coredump happens when run stereo_kitti, while stereo_inertial_tum_tum_vi run successfully.

#0  0x00007f679f40cfe4 in ORB_SLAM3::EdgeSE3ProjectXYZOnlyPose::computeError() ()
    at /ORB_SLAM3/lib/libORB_SLAM3.so
#1  0x00007f679d2eed61 in g2o::SparseOptimizer::computeActiveErrors() ()
    at /ORB_SLAM3/Thirdparty/g2o/lib/libg2o.so
#2  0x00007f679d2f831e in g2o::OptimizationAlgorithmLevenberg::solve(int, bool) ()
    at /ORB_SLAM3/Thirdparty/g2o/lib/libg2o.so
#3  0x00007f679d2f02ad in g2o::SparseOptimizer::optimize(int, bool) ()
    at /ORB_SLAM3/Thirdparty/g2o/lib/libg2o.so
#4  0x00007f679f3d2d29 in ORB_SLAM3::Optimizer::PoseOptimization(ORB_SLAM3::Frame*) ()
    at /ORB_SLAM3/lib/libORB_SLAM3.so
#5  0x00007f679f322a2e in ORB_SLAM3::Tracking::TrackReferenceKeyFrame() () at /ORB_SLAM3/lib/libORB_SLAM3.so

@12138youbrotherdong
Copy link

I also have this kind of mistake, how to solve it?

@Kaiqi-Chen
Copy link

Kaiqi-Chen commented Jul 25, 2020

first I run eu_roc datatset successfully,
but when I run rgb_d datasets(rgbd_dataset_freiburg1_xyz), I also had the same mistake? I dont know where is mistakes?

./Examples/RGB-D/rgbd_tum ./Vocabulary/ORBvoc.txt ./Examples/RGB-D/TUM1.yaml /home/mk/data/rgbd_dataset_freiburg1_xyz /home/mk/data/rgbd_dataset_freiburg1_xyz/associations.txt
ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza.
ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, 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: RGB-D

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

Creation of new map with id: 0
Creation of new map with last KF id: 0
Seq. Name:

Camera Parameters:

  • fx: 517.306
  • fy: 516.469
  • cx: 318.643
  • cy: 255.314
  • bf: 40
  • k1: 0
  • k2: 0
  • p1: 0
  • p2: 0
  • k3: 1.16331
  • 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

Depth Threshold (Close/Far Points): 3.09294


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

Segmentation fault (core dumped)

@SquirminatorHotHead
Copy link
Author

@Ckq-Sugar I have the same output as yours.

@SquirminatorHotHead
Copy link
Author

#8 similar problem here

@aiyouaiyouhehehe
Copy link

the same problem

@squaresoft2015
Copy link

I encounter the same problem:
ailed to load image at: ~/EuRoC/MH01/mav0/cam0/data/1403636579763555584.png
./euroc_examples.sh: line 7: 2782 Segmentation fault (core dumped) ./Examples/Monocular/mono_euroc ./Vocabulary/ORBvoc.txt ./Examples/Monocular/EuRoC.yaml "$pathDatasetEuroc"/MH01 ./Examples/Monocular/EuRoC_TimeStamps/MH01.txt dataset-MH01_mono
Launching MH02 with Monocular sensor
num_seq = 1
file name: dataset-MH02_mono
Loading images for sequence 0...LOADED!
It appears that the program does not read the image sequence correctly. The image names contained in file "MH01.txt" do not match with the actual file names in EuRoC dataset. Do I need to reset the file content manually?

@yan99033
Copy link

Hi everyone,

I think I just found the error that causing the Segmentation fault (core dumped). I ran valgrind memcheck and found that the code was accessing an invalid memory address.

Specifically, it was caused by static_cast<Pinhole*>(mpCamera)->toK(); when instantiating a Frame ( mCurrentFrame = Frame(mImGray,timestamp,mpIniORBextractor,mpORBVocabulary,mpCamera,mDistCoef,mbf,mThDepth); in Tracking.cc).

To solve it, you need to add Camera.type: "PinHole" (assuming you are using PinHole camera model) in the yaml file in which the camera parameters are kept so that the initialization of Tracking would also initialize a Pinhole for camera tracking.

@SquirminatorHotHead
Copy link
Author

Hi everyone,

I think I just found the error that causing the Segmentation fault (core dumped). I ran valgrind memcheck and found that the code was accessing an invalid memory address.

Specifically, it was caused by static_cast<Pinhole*>(mpCamera)->toK(); when instantiating a Frame ( mCurrentFrame = Frame(mImGray,timestamp,mpIniORBextractor,mpORBVocabulary,mpCamera,mDistCoef,mbf,mThDepth); in Tracking.cc).

To solve it, you need to add Camera.type: "PinHole" (assuming you are using PinHole camera model) in the yaml file in which the camera parameters are kept so that the initialization of Tracking would also initialize a Pinhole for camera tracking.

Thank you! I will test it later and close this. It's really helpful for many of us experienced these errors :)

@SquirminatorHotHead
Copy link
Author

Add Camera.type: "PinHole" (assuming you are using PinHole camera model) in the yaml file in which the camera parameters are kept so that the initialization of Tracking would also initialize a Pinhole for camera tracking.
Thanks to @yan99033

@BeardyMan37
Copy link

I encounter the same problem:
ailed to load image at: ~/EuRoC/MH01/mav0/cam0/data/1403636579763555584.png
./euroc_examples.sh: line 7: 2782 Segmentation fault (core dumped) ./Examples/Monocular/mono_euroc ./Vocabulary/ORBvoc.txt ./Examples/Monocular/EuRoC.yaml "$pathDatasetEuroc"/MH01 ./Examples/Monocular/EuRoC_TimeStamps/MH01.txt dataset-MH01_mono
Launching MH02 with Monocular sensor
num_seq = 1
file name: dataset-MH02_mono
Loading images for sequence 0...LOADED!
It appears that the program does not read the image sequence correctly. The image names contained in file "MH01.txt" do not match with the actual file names in EuRoC dataset. Do I need to reset the file content manually?

"~/EuRoC/MH01/mav0/cam0/data/1403636579763555584.png" This image path won't work because bash doesn't recognize ~. You have to use cannonical path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants