reprocess: fixed crash when odometry returns empty covariance. Also added more checks about that in the code in general.

This commit is contained in:
matlabbe
2025-10-09 14:44:13 -07:00
parent d60c15593d
commit 059cda85dc
7 changed files with 18 additions and 14 deletions
+1
View File
@@ -134,6 +134,7 @@ void OdometryThread::mainLoop()
UDEBUG("Odom pose = %s", pose.prettyPrint().c_str());
if(!pose.isNull()) {
_previousGuessPose = event.info().odomPose;
UASSERT(event.info().odomPose.isNull() || !info.reg.covariance.empty());
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
{