Fix an issue with local BA and improve on-demand signature loading - #1753
Merged
Conversation
Member
|
Looks good to me! Letting CI catch up on the merge from master and will merge it afterwards... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
I discovered an issue introduced in #1569. If a signature only has 2D features and no 3D features, it will be incorrectly allowed to be used to build a local feature map, which will cause segfault when
s->getWords3()[jter->second]is called.After fixing this issue, I discovered that #1569 also did not perform on-demand loading of the neighbors of fromS. As you mentioned in your comments,
Mem/LoadVisualLocalFeaturesOnInitmay causeRGBD/LocalBundleOnLoopClosurenot to work properly. So I added this part of the implementation, which is similar to the on-demand loading of formS. Generally, only 3-4 nodes participate in local BA: fromS, toS, and the preceding and following neighbors of fromS. Therefore, loading 1-2 more signatures should not incur significant overhead.Additionally, if fromS and toS are linked by
Link::kNeighborMerged, we should also allow local BA between them if fromS has other neighbors and other conditions are met. If a region is scanned repeatedly, after graph reduction, a node may be linked to all its neighboring nodes asLink::kNeighborMerged. It would be not ideal if we only allowed registration refinement forLink::kNeighborMerged, since there were indeed one or more loop closures here. Even for loop closure links that have already been merged, performing a local BA is still helpful.