raulmur / ORB_SLAM2

Real-Time SLAM for Monocular, Stereo and RGB-D Cameras, with Loop Detection and Relocalization Capabilities
Other
9.5k stars 4.71k forks source link

KeyFrames are getting closer as ORB SLAM2 continues #999

Open ghost opened 3 years ago

ghost commented 3 years ago

Hi, I am running with my own data and I found the keyframes in the Map viewer are getting denser (closer) to each other. As shown in the picture attached . Why is that?

Screenshot from 2021-06-29 12-28-13

AlejandroSilvestri commented 3 years ago

@deeprun

Hard to tell. There can be a lot of reasons.

First, I noticed you are turning right, that can explain the need of more keyframes while you discover previously unseen scene.

Second, there is a keyframe culling procedure that will eliminate redundant keyframes. May be there are keyframes waiting to be erased.

Third, I saw such a behaviour with bad calibration. I mean very bad calibration. If you can see a straight chessboard near the vertices of you undistorted images, then you have a good calibration. It is always a good idea to visually verify to calibration.

Fourth, may be your scale is shrinking, and you need to walk a shorter real distance to get a new keyframe. Often closing a loop solves this.

And there may be a lot of other reasons.

m-javadian-farzaneh commented 2 years ago

how to solve or prevent it?

AlejandroSilvestri commented 2 years ago

@M3000j

  1. Improve your calibration, specially your distortion coefficients
  2. Make a loop
  3. Wait to automatic keyframe culling take place