Open randoms opened 8 years ago
You are right! Thank you. Hope Raúl add this fix to orb-slam2 code. I already added it to mine :)
In that context, pKF1 is never NULL, and is highly improbably Bad.
pKF1 comes from vpKFs, which contains a vector with a copy content from Map::mspKeyFrames.
Keyframes are erased from mspKeyFrames some lines after setting their bad flag.
In line 995 Keyframes are added without checking if it is bad. You will get a bad bundle ajustment result if there are bad keyframes. Add the following code will help to fix this issue.