-
Notifications
You must be signed in to change notification settings - Fork 869
Description
Hi, I only recently noticed this issue, because in most of the scenes we tested, there was no situation where the images captured at different positions were highly similar. But I later found a scene where it was easy to study this situation. In the staircase scene shown in the video below, the images on different floors are highly similar, resulting in many incorrect loop closure dections. Vertigo successfully rejected these constraints, so the graph was not damaged. But this is when Reduce Graph is not enabled. Once Reduce Graph is enabled, Robust Graph Optimization no longer takes effect. This is because switchable edge factor is not used for Link::kNeighborMerged. But using switchable edge factor for Link::kNeighborMerged is not a good idea either, because it might completely ignore constraints between neighbors. We probably need to solve this issue in other parts. Some nodes should not be merged in the first place because the detected loop closure is wrong. Is there a better fix for this?
rtabmap/corelib/src/optimizer/OptimizerGTSAM.cpp
Lines 724 to 737 in 52e770e
#ifdef RTABMAP_VERTIGO | |
if(this->isRobust() && | |
iter->second.type() != Link::kNeighbor && | |
iter->second.type() != Link::kNeighborMerged) | |
{ | |
// create switchable edge factor | |
graph.add(vertigo::BetweenFactorSwitchableLinear<gtsam::Pose3>(id1, id2, gtsam::Symbol('s', lastSwitchId_++), gtsam::Pose3(iter->second.transform().toEigen4d()), model)); | |
} | |
else | |
#endif | |
{ | |
graph.add(gtsam::BetweenFactor<gtsam::Pose3>(id1, id2, gtsam::Pose3(iter->second.transform().toEigen4d()), model)); | |
lastAddedConstraints_.push_back(ConstraintToFactor(id1, id2, -1)); | |
} |