-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Fix bugs in loop detection #745
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: Nicolas Soncini <[email protected]>
Hello @fishmarch, I am creating a community version of ORB_SLAM3 at https://github.com/jeremysalwen/ORB_SLAM_COMMUNITY since this repository seems to be inactive. These bugfixes seem very interesting but I am having a hard time understanding some of them. I have already merged most of your patches, but the Sim3Solver and DetectNBestCandidates changes are not self-evident to me. Could you explain a bit more the reasoning behind those changes? |
Hi @jeremysalwen , I am glad to help. You mean those bugs fixed in my repo https://github.com/fishmarch/ORB_SLAM3_Fixed ? Sim3SolverBefore Sim3Solver, the current keyframe Therefore in Sim3Solver, the flag DetectNBestCandidatesThe first bug is to update the iteration for bad keyframe for ORB_SLAM3/src/KeyFrameDatabase.cc Lines 712 to 713 in 4452a3c
The similarity score is accumulated in neighbors in ORB_SLAM3/src/KeyFrameDatabase.cc Line 689 in 4452a3c
Thus it needs to ensure the similarity score is calculated with the current candidate keyframe. But it was calculated only under the following condition: ORB_SLAM3/src/KeyFrameDatabase.cc Lines 659 to 665 in 4452a3c
|
Hmm, ok the Sim3Solver code makes sense to me and I merged it, but for the DetectNBestCandidates, Are you sure that it is calculating the right score?
Shouldn't it be scoring pKF2? |
Yes, it is pKF2 in my repo. pKFi is the original codes. |
Oh I see you fixed it in later commits. Okay that makes sense. I'm still not clear if the original intention was to ignore covisibility keyframes that don't have enough common words, or to dynamically score then like you have. I assume it works fine to ignore them, since the original code was using invalid scores? |
Yes, agree with you. These similarity score can also be set to zero directly. It is hard to say which one is better, but setting to zeros can be faster than my codes. Anyway the original codes need to be modified, since using wrong scores computed from previous keyframes. |
Hmm, something else I noticed, |
Line 112 in 4452a3c
|
The iterator is not updated when the pKFi is bad, thus it will get stuck in the loop. In our modified SLAM system, this would happen. But I am not sure in the origin version whether pKFi could be bad thus causing this problem. Please check.