Skip to content

Robust Graph Optimization does not work when Reduce Graph is enabled #1573

@borongyuan

Description

@borongyuan

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?

#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));
}

Robust_Graph_Optimization_Test.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions