Do not override smallMovement and fastMovement when converting to intermediate nodes to keep GUI visualization color working

This commit is contained in:
matlabbe
2026-05-14 00:03:24 -07:00
parent 24a5346fd6
commit a5541c8fa4
2 changed files with 11 additions and 5 deletions
+3 -5
View File
@@ -1592,9 +1592,6 @@ bool Rtabmap::process(
if(linkedToIntermediateNode && (smallDisplacement || tooFastMovement))
{
_memory->convertToIntermediate(signature->id());
// Intermediate nodes should stay in the graph to properly propagate loop closure hypotheses
smallDisplacement = false;
tooFastMovement = false;
}
}
@@ -2231,7 +2228,7 @@ bool Rtabmap::process(
}
} // if(_memory->getWorkingMemSize())
}// !isBadSignature
else if(!signature->isBadSignature() && (smallDisplacement || tooFastMovement))
else if(!signature->isBadSignature() && signature->getWeight()>=0 && (smallDisplacement || tooFastMovement))
{
_highestHypothesis = lastHighestHypothesis;
UDEBUG("smallDisplacement=%d tooFastMovement=%d", smallDisplacement?1:0, tooFastMovement?1:0);
@@ -4470,7 +4467,8 @@ bool Rtabmap::process(
signaturesRemoved.push_back(signature->id());
_memory->deleteLocation(signature->id());
}
else if((smallDisplacement || tooFastMovement) &&
else if((!_memory->isIncremental() || signature->getWeight()>=0) &&
(smallDisplacement || tooFastMovement) &&
_loopClosureHypothesis.first == 0 &&
lastProximitySpaceClosureId == 0 &&
(rejectedLoopClosure || landmarksDetected.empty()) &&
+8
View File
@@ -2459,6 +2459,14 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
{
_ui->imageView_source->setBackgroundColor(Qt::darkBlue);
}
else if(smallMovement)
{
_ui->imageView_source->setBackgroundColor(Qt::gray);
}
else if(fastMovement)
{
_ui->imageView_source->setBackgroundColor(Qt::magenta);
}
// PDF AND LIKELIHOOD
if(!stat.posterior().empty() && _ui->dockWidget_posterior->isVisible())