F
Member
A transformed position can look correct in a map while the estimator treats its uncertainty in the wrong direction. This can happen when an adapter rotates the mean into a new frame but forwards the original covariance unchanged.
The symptom may be selective: measurements behave sensibly at one heading, then receive surprising weights or rejection decisions after a turn. Re-tuning a global noise parameter can obscure a frame-conversion defect rather than fix it.
### Start with a deliberately simple case
Suppose a three-dimensional position measurement is expressed in a sensor frame. Its uncertainty is much greater along one sensor axis than across it. Let a known, deterministic rigid transform map the position into a target frame:
`p_target = R * p_source + t`
For this position-only case, the error transforms as `e_target = R * e_source`, so its covariance must transform as:
`P_target = R * P_source * transpose(R)`
A deterministic translation changes the mean but not this position-error covariance. Rotating an elongated uncertainty region changes its direction. Copying the matrix unchanged is valid only in special cases, such as an isotropic covariance or a rotation that leaves that covariance invariant.
The example deliberately assumes the transform itself is known exactly. Uncertain extrinsics or an uncertain reference pose require additional modelling, including relevant correlations; the expression above does not account for them.
### A matrix can pass structural checks and still mean the wrong thing
An unchanged covariance may remain symmetric and positive semidefinite. Its diagonal entries can be plausible, and a plotted trajectory can remain smooth. None of those checks establishes that its axes match the transformed measurement.
An illustrative quarter-turn test with unequal horizontal variances should swap the corresponding principal directions. A test with equal variances would miss the bug. An oblique rotation is useful too, because it generally produces off-diagonal terms that a diagonal-only adapter might discard.
Diagnostic evidence should include:
- The measurement frame, target frame and transform actually applied.
- The covariance ordering, units and meaning before conversion.
- The full covariance before and after conversion, not only its diagonal.
- Residuals and gating decisions in the frame used by the receiving estimator.
- Anisotropic synthetic inputs with independently calculated expected outputs.
For a real sensor, compare directional residual behaviour with the predicted uncertainty only after accounting for reference uncertainty and timing. A reference track is not exact ground truth simply because another estimator produced it.
### Do not extrapolate the shortcut to every pose message
A six-dimensional pose covariance introduces orientation-error conventions and position-orientation cross terms. Changing frames can require more than applying the same three-dimensional rotation to two diagonal blocks. The correct mapping depends on what perturbation the covariance describes, where it is expressed and the convention used by each interface.
Likewise, a sensor's measurement uncertainty, a localisation estimate's covariance and the uncertainty of a moving reference frame are not interchangeable objects. Document those semantics before writing a generic covariance converter.
Keeping full matrices increases interface and testing complexity; discarding cross terms is simpler but can misrepresent uncertainty. Inflating every diagonal may reduce some visible overconfidence, yet it cannot reconstruct a missing direction or establish the right correlation structure.
**Open engineering question:** does your transform test suite rotate anisotropic uncertainty as well as positions? Which artifact proves that the receiving estimator interprets the covariance in the same frame and perturbation convention as the adapter that produced it?
The symptom may be selective: measurements behave sensibly at one heading, then receive surprising weights or rejection decisions after a turn. Re-tuning a global noise parameter can obscure a frame-conversion defect rather than fix it.
### Start with a deliberately simple case
Suppose a three-dimensional position measurement is expressed in a sensor frame. Its uncertainty is much greater along one sensor axis than across it. Let a known, deterministic rigid transform map the position into a target frame:
`p_target = R * p_source + t`
For this position-only case, the error transforms as `e_target = R * e_source`, so its covariance must transform as:
`P_target = R * P_source * transpose(R)`
A deterministic translation changes the mean but not this position-error covariance. Rotating an elongated uncertainty region changes its direction. Copying the matrix unchanged is valid only in special cases, such as an isotropic covariance or a rotation that leaves that covariance invariant.
The example deliberately assumes the transform itself is known exactly. Uncertain extrinsics or an uncertain reference pose require additional modelling, including relevant correlations; the expression above does not account for them.
### A matrix can pass structural checks and still mean the wrong thing
An unchanged covariance may remain symmetric and positive semidefinite. Its diagonal entries can be plausible, and a plotted trajectory can remain smooth. None of those checks establishes that its axes match the transformed measurement.
An illustrative quarter-turn test with unequal horizontal variances should swap the corresponding principal directions. A test with equal variances would miss the bug. An oblique rotation is useful too, because it generally produces off-diagonal terms that a diagonal-only adapter might discard.
Diagnostic evidence should include:
- The measurement frame, target frame and transform actually applied.
- The covariance ordering, units and meaning before conversion.
- The full covariance before and after conversion, not only its diagonal.
- Residuals and gating decisions in the frame used by the receiving estimator.
- Anisotropic synthetic inputs with independently calculated expected outputs.
For a real sensor, compare directional residual behaviour with the predicted uncertainty only after accounting for reference uncertainty and timing. A reference track is not exact ground truth simply because another estimator produced it.
### Do not extrapolate the shortcut to every pose message
A six-dimensional pose covariance introduces orientation-error conventions and position-orientation cross terms. Changing frames can require more than applying the same three-dimensional rotation to two diagonal blocks. The correct mapping depends on what perturbation the covariance describes, where it is expressed and the convention used by each interface.
Likewise, a sensor's measurement uncertainty, a localisation estimate's covariance and the uncertainty of a moving reference frame are not interchangeable objects. Document those semantics before writing a generic covariance converter.
Keeping full matrices increases interface and testing complexity; discarding cross terms is simpler but can misrepresent uncertainty. Inflating every diagonal may reduce some visible overconfidence, yet it cannot reconstruct a missing direction or establish the right correlation structure.
**Open engineering question:** does your transform test suite rotate anisotropic uncertainty as well as positions? Which artifact proves that the receiving estimator interprets the covariance in the same frame and perturbation convention as the adapter that produced it?