From 87a5f69335d03943d91714e1af241529655efc39 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Tue, 23 May 2017 12:00:33 -0400 Subject: [PATCH] MainWindow: fixed localization pose reset to latest pose in map when lost (localization mode) --- guilib/src/MainWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index b06d8c9f..ee188183 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -1716,7 +1716,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat) Transform groundTruthOffset = alignPosesToGroundTruth(poses, groundTruth, stat.stamp(), stat.refImageId()); UDEBUG("time= %d ms", time.restart()); - if(!_odometryReceived && poses.size()) + if(!_odometryReceived && poses.size() && poses.rbegin()->first == stat.refImageId()) { _cloudViewer->updateCameraTargetPosition(poses.rbegin()->second);