MainWindow: fixed localization pose reset to latest pose in map when lost (localization mode)

This commit is contained in:
matlabbe
2017-05-23 12:00:33 -04:00
parent 48ba55d02c
commit 87a5f69335
+1 -1
View File
@@ -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);