package
Tests.RuleChecks
Central-difference oracles and residual drivers for the LieGroups derivative rules
Each fd* function is a central difference of one LieGroups
primitive taken in exactly the trivialization that primitive's rule
declares: a group-valued slot is perturbed as
X*exp_map(h e), a group-valued result is read back as
log_map(Y^-1 Y_perturbed), and plain vectors are perturbed and
read back additively. The *Residuals drivers sweep randomized
points at a chosen magnitude and return the worst absolute disagreement
between rule and difference, one entry per rule.
The step is a caller argument because the two error sources move in opposite directions: the central difference truncates at O(h^2) times a third derivative and rounds at O(eps/h) times the value, so the floor sits near h = 1e-6 for double-precision quantities of order one.
Members
| Name | Kind | Description |
|---|---|---|
| pseudoRandom | function | Deterministic pseudo-random stream on [-1, 1] |
| fdSo3ExpMapJacobian | function | Central difference of SO(3) exp_map, right-trivialized output |
| fdSo3LogMapJacobian | function | Central difference of SO(3) log_map, right-trivialized input |
| fdSo3ProductJacobian | function | Central difference of the SO(3) product in one of its two slots |
| fdSo3InverseJacobian | function | Central difference of SO(3) inverse, right-trivialized on both sides |
| fdSo3RotateJacobian | function | Central difference of SO(3) rotate in one of its two slots |
| fdSe23ProductJacobian | function | Central difference of the SE_2(3) product in one of its two slots |
| fdSe23InverseJacobian | function | Central difference of SE_2(3) inverse, right-trivialized on both sides |
| fdExpMixedJacobian | function | Central difference of exp_mixed in one of its three differentiated slots |
| retrodictTangentError | function | Delayed-tangent error retrodict produces for one perturbation of the current state |
| fdRetrodictJacobian | function | Central difference of retrodict in the ESKF tangent, right-trivialized pose |
| retrodictChain | function | Tangent map of retrodict built by chaining LieGroups derivative rules |
| so3RuleResiduals | function | Worst |rule - central difference| over randomized SO(3) points |
| so3RuleResidualsSweep | function | Worst |rule - central difference| over a whole list of rotation magnitudes |
| so3JacobianFamilyResiduals | function | How far the rule-local SO(3) Jacobian family is from its own identities |
| se23GroupRuleResiduals | function | Worst |rule - central difference| for the SE_2(3) group rules |
| expMixedRuleResiduals | function | Worst |rule - central difference| for the exp_mixed rules |
| expMixedRuleResidualsSweep | function | Worst |rule - central difference| for the exp_mixed rules over a magnitude list |
| retrodictChainResiduals | function | Chained rules against the retrodict difference and against the transition construction |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
package RuleChecks
"Central-difference oracles and residual drivers for the LieGroups derivative rules"
annotation(Documentation(info="<html>
<p>Each <code>fd*</code> function is a central difference of one LieGroups
primitive taken in exactly the trivialization that primitive's rule
declares: a group-valued slot is perturbed as
<code>X*exp_map(h e)</code>, a group-valued result is read back as
<code>log_map(Y^-1 Y_perturbed)</code>, and plain vectors are perturbed and
read back additively. The <code>*Residuals</code> drivers sweep randomized
points at a chosen magnitude and return the worst absolute disagreement
between rule and difference, one entry per rule.</p>
<p>The step is a caller argument because the two error sources move in
opposite directions: the central difference truncates at O(h^2) times a
third derivative and rounds at O(eps/h) times the value, so the floor sits
near h = 1e-6 for double-precision quantities of order one.</p>
</html>"));
end RuleChecks;