Skip to content

Fix/covariances#2384

Open
JzHuai0108 wants to merge 5 commits intoborglab:fix/covariancesfrom
JzHuai0108:fix/covariances
Open

Fix/covariances#2384
JzHuai0108 wants to merge 5 commits intoborglab:fix/covariancesfrom
JzHuai0108:fix/covariances

Conversation

@JzHuai0108
Copy link

@JzHuai0108 JzHuai0108 commented Feb 3, 2026

  1. straighten the ManifoldPreintegration cov computation, making it consistent with the Jacobians; 2. unit test covariance of PreintegratedImuMeasurements and PreintegratedCombinedMeasurements derived from ManifoldPreintegration or TangentPreintegration by comparing with ImuEKF; 3. unit test that preintegrated measurements derived from ManifoldPreintegration and TangentPreintegration have almost identical cov as the residual is defined the same; 4. largely fix the NEES computation.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for working with me on this. This is very important to me.

// controls which class PreintegratedImuMeasurements uses):
using PreintegratedImuMeasurements = PreintegratedImuMeasurementsT<DefaultPreintegrationType>;

// For TangentPreintegration, the perturbation on deltaXij is dXt, the 3D perturbation of the rotation tangent space +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comments might be better in the respective pre-integration classes. Also, it's hard to understand exactly what is meant.

Maybe to clarify, I use

  • left perturbation as exp(xi)*T (which is, ironically, right-invariant)
  • right perturbation as T*exp(xi) (which is left-invariant)

Copy link
Author

@JzHuai0108 JzHuai0108 Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Will move them to their respective class headers. I am comfortable with left perturbation exp(xi)*T notations. These comments are not easy to understand since they refer to evidence in other files. I put them here mainly for your reference, and will simplify them as I move them around.

&& equal_with_abs_tol(delVdelBiasOmega_, other.delVdelBiasOmega_, tol);
}

NavState ManifoldPreintegration::UpdatePreintegrated(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, so you're saying the manifold pre-integration was wrong? Not the tangent pre-integration?

And I am right in interpreting that you see the manifold pre-integration as using the right-invariant error instead of the left-invariant?

Please forgive my questions: I have relatively little time today to take the time I should really take to figure it out, so hoping the dialogue will make things easier.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the manifold preintegration's covariance/Jacobian computation is problematic, but the manifold preintegration's value is OK. The original code of manifold preintegration computes the preint measurement covariance using the error definition: dXn = [\delta \phi_ij, \delta p_ij, \delta v_ij] where R_ij = \hat{R}_ij Exp(\delta \phi_ij)
p_ij = \hat{p}ij + R_ij \delta p{ij} and v_ij = \hat{v}ij + R_ij \delta v{ij}; but computes its bias Jacobians using the error definition:
dXt = [\delta \phi_ij, \delta p_ij, \delta v_ij] where R_ij = \hat{R}_ij Exp(\delta \phi_ij) p_ij = \hat{p}ij + \delta p{ij} and v_ij = \hat{v}ij + \delta v{ij}. Therefore, there is an inconsistency between covariance and Jacobian of the preint measurement.

To me, the tangent preintegration is OK in value and Jacobians.
I think all error states in gtsam are left-invariant based on my observations.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In writing the extended abstract, I found some inconsistency in my derivations :(. I will double check it in the coming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments