From 95a76cb696727241125bad6b256f6ee1580815a4 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Mon, 19 Sep 2022 12:23:18 -0700 Subject: [PATCH] gui: fixed wrongly showing landmark rejected when it was not (because a loop closure was rejected at the same time) --- corelib/src/Rtabmap.cpp | 1 + guilib/src/MainWindow.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/corelib/src/Rtabmap.cpp b/corelib/src/Rtabmap.cpp index 922b70be..b7ae35a0 100644 --- a/corelib/src/Rtabmap.cpp +++ b/corelib/src/Rtabmap.cpp @@ -2907,6 +2907,7 @@ bool Rtabmap::process( { UINFO("Landmark %d observed again! Seen the first time by node %d.", -iter->first, *_memory->getLandmarksIndex().find(iter->first)->second.begin()); landmarksDetected.insert(std::make_pair(iter->first, _memory->getLandmarksIndex().find(iter->first)->second)); + rejectedGlobalLoopClosure = false; // If it was true, it will be set back to false if landmarks are rejected on graph optimization } } } diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index eb6a4e25..b68b331f 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -2103,6 +2103,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat) } else if(landmarkId!=0) { + highestHypothesisId = landmarkNodeRef; if(rejectedHyp) { show = _preferencesDialog->imageRejectedShown();