When external guess is provided, don't report lost for the first ever frame (only on reset). Updated Odom/ResetCountdown description. (#1588)

This commit is contained in:
matlabbe
2025-10-01 10:27:24 -07:00
committed by GitHub
parent 05f077b950
commit 11577fb553
3 changed files with 7 additions and 6 deletions

View File

@@ -133,9 +133,10 @@ void OdometryThread::mainLoop()
UDEBUG("Odom pose = %s", pose.prettyPrint().c_str());
if(!pose.isNull()) {
_previousGuessPose = event.info().odomPose;
if(!event.info().odomPose.isNull() && info.reg.covariance.at<double>(0,0) >= 9999)
if(!event.info().odomPose.isNull() && info.reg.covariance.at<double>(0,0) >= 9999 &&
(pose.x() != 0.0f || pose.y() != 0.0f || pose.z() != 0.0f)) // not the first frame
{
// In case of external guess, keep reporting lost till we
// In case of external guess and auto reset, keep reporting lost till we
// process the second frame with valid covariance. This way it
// won't trigger a new map.
pose = Transform();