Skip to content

Commit

Permalink
Allow zero variances for some pose components
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Dec 13, 2024
1 parent f8ddad9 commit 777a019
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mola_navstate_fuse/src/NavStateFuse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,10 @@ void NavStateFuse::fuse_pose(
{
mrpt::poses::CPose3D incrPose;

// numerical sanity:
for (int i = 0; i < 6; i++) ASSERT_GT_(pose.cov(i, i), .0);
// numerical sanity: variances>=0 (==0 allowed for some components only)
for (int i = 0; i < 6; i++) ASSERT_GE_(pose.cov(i, i), .0);
// and the sum of all strictly >0
ASSERT_GT_(pose.cov.trace(), .0);

double dt = 0;
if (state_.last_pose_obs_tim)
Expand Down

0 comments on commit 777a019

Please sign in to comment.