Skip to main content

engine.solvers.estimation

engine.solvers.estimation

Spatial-memory solvers: state estimation, estimator consistency, drift, and belief expiry (added 2026-10-20).

Domain implementations behind mlsysim.solvers. The equations live in physics/robotics/estimation.py, physics/robotics/perception.py, physics/robotics/sensing.py, and physics/statistics.py; these models compose them for one stated estimator, sensor, benchmark, or belief, so a chapter, a slide deck, and a lab read the same arithmetic.

Classes

Name Description
BeliefExpiryModel A belief’s error bound E(dt) = E_0 + v dt + a dt^2 / 2, its invalidation horizon, and an admission check.
EpochGapModel Travel across the gap between two acquisition epochs, speed x \|t2 - t1\|.
EstimatorConsistencyModel The band a campaign’s mean NEES or NIS must fall in, and what single-update gates catch.
FreeSpaceExpiryModel Occluded free space eroding inward at the approach speed v_h, ahead and abreast of an occluder.
FrozenTransformModel A last transform republished every republish_period with fresh stamps while the object moves.
InertialCoastModel An IMU integrated open loop for duration, with the heading offset seen at target_range.
OdometryDriftModel A benchmark’s return error over its path as a drift rate, before and after calibration.
RangeFusionModel One scalar predict and two updates of a range, and the same second update misdated.
ReplayBufferModel Slots of a rewind buffer sampled at sample_rate that reach back horizon: ceil(horizon / dt).
SensorBiasDriftModel A bias drifting at drift_rate for span under a steady reading: the true value is the reading less the shift.
StaleTransformModel A cached sensor-to-target edge, one interval old, composed with the current wrist pose.

BeliefExpiryModel

engine.solvers.estimation.BeliefExpiryModel()

A belief’s error bound E(dt) = E_0 + v dt + a dt^2 / 2, its invalidation horizon, and an admission check.

The horizon is calc_quadratic_invalidation_horizon; dropping the acceleration term gives the constant-velocity horizon, at which the true bound has already overrun the tolerance. With use_age, the consumer’s age bound is use_age + age_bound (the clock-conversion bound), and the belief is admitted if the error there is within tolerance; the latest admissible use age is the horizon less age_bound.

Methods

Name Description
solve A belief’s error bound E(dt) = E_0 + v dt + a dt^2 / 2, its invalidation horizon, and an admission check.
solve
engine.solvers.estimation.BeliefExpiryModel.solve(
    initial_error,
    growth_rate,
    tolerance,
    growth_acceleration=None,
    use_age=None,
    age_bound=None,
)

A belief’s error bound E(dt) = E_0 + v dt + a dt^2 / 2, its invalidation horizon, and an admission check.

Parameters
Name Type Description Default
initial_error Quantity Nonnegative initial spatial error, length. required
growth_rate Quantity Positive error-growth rate, length/time. required
tolerance Quantity Positive allowed spatial error, length. required
growth_acceleration Quantity Nonnegative error-growth acceleration, length/time**2; None means zero. None
use_age Quantity Optional nonnegative consumer age, time; None omits use-time fields. None
age_bound Quantity Nonnegative additive clock-age bound, time; None means zero. None
Returns
Name Type Description
BeliefExpiryResult Initial error and tolerance in millimeters, growth rates in millimeters per second, expiry times in milliseconds, and dimensionless overshoot. Use-time fields remain absent when use_age is None.
See Also

calc_belief_error_bound : Composed numerical primitive. calc_quadratic_invalidation_horizon : Composed numerical primitive.

Notes

Equation: The horizon is calc_quadratic_invalidation_horizon; dropping the acceleration term gives the constant-velocity horizon, at which the true bound has already overrun the tolerance. With use_age, the consumer’s age bound is use_age + age_bound (the clock-conversion bound), and the belief is admitted if the error there is within tolerance; the latest admissible use age is the horizon less age_bound.

Assumptions: Nonnegative error-growth terms bound the full interval; optional clock uncertainty is an additive upper bound on observation age.

Excludes: Stochastic cancellation, abrupt changes in motion, and measurement updates that would reset the initial error.

References

Derivation: Integrate a constant growth rate and acceleration to obtain E0+v*t+a*t*t/2; solve its first crossing of tolerance and subtract the clock-age bound for latest admissible use.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import BeliefExpiryModel
>>> result = BeliefExpiryModel().solve(initial_error=Q_('1 mm'), growth_rate=Q_('1 mm/s'), tolerance=Q_('2 mm'))
>>> bool(result.horizon.to("s").magnitude == 1)
True

EpochGapModel

engine.solvers.estimation.EpochGapModel()

Travel across the gap between two acquisition epochs, speed x |t2 - t1|.

With separation, the slack is the separation less the committed terms (localization bound and protective clearance), which the travel across the gap must fit inside.

Methods

Name Description
solve Travel across the gap between two acquisition epochs, speed x \|t2 - t1\|.
solve
engine.solvers.estimation.EpochGapModel.solve(
    first_epoch,
    second_epoch,
    speed,
    separation=None,
    committed=(),
)

Travel across the gap between two acquisition epochs, speed x |t2 - t1|.

Parameters
Name Type Description Default
first_epoch Quantity First acquisition timestamp, time on a common clock. required
second_epoch Quantity Second acquisition timestamp on the same clock, time. required
speed Quantity Positive constant operating speed, length/time. required
separation Quantity Optional nonnegative available separation, length; None omits slack. None
committed sequence of Quantity Reserved length terms subtracted from separation; defaults to no reservations. ()
Returns
Name Type Description
EpochGapResult Absolute epoch gap in milliseconds, speed in meters per second, travel and optional remaining separation slack in millimeters.
Notes

Equation: With separation, the slack is the separation less the committed terms (localization bound and protective clearance), which the travel across the gap must fit inside.

Assumptions: Both acquisition timestamps use a common clock and speed bounds travel across their absolute difference.

Excludes: Clock offset uncertainty, acceleration, and the actual path geometry between acquisitions.

References

Derivation: Distance over an epoch gap is speed*abs(t2-t1); subtract the committed separation terms to obtain the comparison slack.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import EpochGapModel
>>> result = EpochGapModel().solve(first_epoch=Q_('1 s'), second_epoch=Q_('2 s'), speed=Q_('1 m/s'))
>>> bool(result.travel.to("m").magnitude == 1)
True

EstimatorConsistencyModel

engine.solvers.estimation.EstimatorConsistencyModel()

The band a campaign’s mean NEES or NIS must fall in, and what single-update gates catch.

calc_chi2_mean_band gives the band for runs statistics of dimension dimension; each gate is calc_chi2_gate at its confidence, and a biased update with mean NIS nis_expected exceeds it with calc_noncentral_gate_detection (noncentrality nis_expected - dimension).

Methods

Name Description
solve The band a campaign’s mean NEES or NIS must fall in, and what single-update gates catch.
solve
engine.solvers.estimation.EstimatorConsistencyModel.solve(
    runs,
    dimension,
    confidence,
    gate_confidences,
    nis_expected,
)

The band a campaign’s mean NEES or NIS must fall in, and what single-update gates catch.

Parameters
Name Type Description Default
runs int Positive independent trial count. required
dimension int Positive state or innovation dimension. required
confidence float Confidence probability in the open interval (0, 1). required
gate_confidences sequence of float Gate coverage probabilities in the open interval (0, 1). required
nis_expected float Expected dimensionless NIS, at least dimension. required
Returns
Name Type Description
EstimatorConsistencyResult Dimensionless lower and upper bounds on mean NEES/NIS, per-update chi-square gates, and probabilities of detecting the supplied bias.
See Also

calc_chi2_gate : Composed numerical primitive. calc_chi2_mean_band : Composed numerical primitive. calc_noncentral_gate_detection : Composed numerical primitive.

Notes

Equation: calc_chi2_mean_band gives the band for runs statistics of dimension dimension; each gate is calc_chi2_gate at its confidence, and a biased update with mean NIS nis_expected exceeds it with calc_noncentral_gate_detection (noncentrality nis_expected - dimension).

Assumptions: Independent campaign statistics with the stated chi-square dimension; biased single-update statistics have the stated noncentrality.

Excludes: Temporal correlation, distribution misspecification, and guarantees that a finite campaign detects every inconsistent estimator.

References

Derivation: Independent chi-square statistics add their degrees of freedom. Divide sum-statistic quantiles by runs for the mean band; evaluate noncentral chi-square upper tails for biased gate exceedance.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import EstimatorConsistencyModel
>>> result = EstimatorConsistencyModel().solve(runs=100, dimension=1, confidence=0.95, gate_confidences=[0.95], nis_expected=2)
>>> bool(result.band_low < result.band_high)
True

FreeSpaceExpiryModel

engine.solvers.estimation.FreeSpaceExpiryModel()

Occluded free space eroding inward at the approach speed v_h, ahead and abreast of an occluder.

Each horizon is calc_free_space_expiry; the observation age spends part of it before memory receives the frame. A walker approaching during a stop at speed covers v_h (tau_delay + v / a_brake).

Methods

Name Description
solve Occluded free space eroding inward at the approach speed v_h, ahead and abreast of an occluder.
solve
engine.solvers.estimation.FreeSpaceExpiryModel.solve(
    depth_ahead,
    depth_abreast,
    loc_bound,
    protective_clearance,
    approach_speed,
    observation_age,
    frame_period,
    speed,
    braking,
    pre_brake_delay,
    uniform_timeout=None,
)

Occluded free space eroding inward at the approach speed v_h, ahead and abreast of an occluder.

Parameters
Name Type Description Default
depth_ahead Quantity Nonnegative observed free depth ahead, length. required
depth_abreast Quantity Nonnegative observed free depth beside the occluder, length. required
loc_bound Quantity Nonnegative localization-error bound, length. required
protective_clearance Quantity Nonnegative reserved separation, length. required
approach_speed Quantity Positive constant approach speed, length/time. required
observation_age Quantity Nonnegative age since acquisition, time. required
frame_period Quantity Positive sampling period, time. required
speed Quantity Positive constant operating speed, length/time. required
braking Quantity Positive deceleration magnitude, length/time**2. required
pre_brake_delay Quantity Nonnegative delay before braking, time. required
uniform_timeout Quantity Optional nonnegative timeout, time; None omits timeout comparison. None
Returns
Name Type Description
FreeSpaceExpiryResult Remaining depths and erosion in millimeters, horizons in milliseconds, walker intrusion in meters, and dimensionless bridged-frame count. The optional timeout comparison is a signed time margin.
See Also

calc_free_space_expiry : Composed numerical primitive.

Notes

Equation: Each horizon is calc_free_space_expiry; the observation age spends part of it before memory receives the frame. A walker approaching during a stop at speed covers v_h (tau_delay + v / a_brake).

Assumptions: Constant approach speed erodes free depth; localization and protective clearance are reserved before assigning an expiry time.

Excludes: Occluder shape changes, approach acceleration, and safety certification from a single free-space observation.

References

Derivation: Subtract localization and clearance from observed depth, floor remaining depth at zero, then divide by approach speed. During robot delay plus speed/braking stop time, a walker advances at the supplied approach speed.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import FreeSpaceExpiryModel
>>> result = FreeSpaceExpiryModel().solve(depth_ahead=Q_('2 m'), depth_abreast=Q_('1 m'), loc_bound=Q_('10 mm'), protective_clearance=Q_('10 mm'), approach_speed=Q_('1 m/s'), observation_age=Q_('1 ms'), frame_period=Q_('10 ms'), speed=Q_('1 m/s'), braking=Q_('1 m/s**2'), pre_brake_delay=Q_('10 ms'))
>>> bool(result.horizon_ahead > result.horizon_abreast)
True

FrozenTransformModel

engine.solvers.estimation.FrozenTransformModel()

A last transform republished every republish_period with fresh stamps while the object moves.

Every copy passes a publish-time freshness_threshold; the object has moved speed x window from the frozen pose.

Methods

Name Description
solve A last transform republished every republish_period with fresh stamps while the object moves.
solve
engine.solvers.estimation.FrozenTransformModel.solve(
    speed,
    window,
    tolerance,
    republish_period,
    freshness_threshold,
)

A last transform republished every republish_period with fresh stamps while the object moves.

Parameters
Name Type Description Default
speed Quantity Positive constant operating speed, length/time. required
window Quantity Nonnegative interval since the frozen acquisition, time. required
tolerance Quantity Positive allowed spatial error, length. required
republish_period Quantity Positive period between repeated publications, time. required
freshness_threshold Quantity Positive allowed publish age, time. required
Returns
Name Type Description
FrozenTransformResult Republish frequency in hertz, displacement error in millimeters, and booleans for publish-age acceptance and spatial-tolerance violation.
See Also

calc_belief_error_bound : Composed numerical primitive.

Notes

Equation: Every copy passes a publish-time freshness_threshold; the object has moved speed x window from the frozen pose.

Assumptions: One acquired pose stays frozen while its timestamp is refreshed; the target moves at constant speed over the acquisition window.

Excludes: Actual pose updates, clock uncertainty, and acceleration.

References

Derivation: Publication age depends on the republish period, whereas spatial error depends on speed times elapsed acquisition age. Comparing the two separately exposes why a fresh stamp cannot refresh data.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import FrozenTransformModel
>>> result = FrozenTransformModel().solve(speed=Q_('1 mm/s'), window=Q_('10 s'), tolerance=Q_('1 mm'), republish_period=Q_('1 ms'), freshness_threshold=Q_('2 ms'))
>>> bool(result.passes_freshness and result.exceeds_tolerance)
True

InertialCoastModel

engine.solvers.estimation.InertialCoastModel()

An IMU integrated open loop for duration, with the heading offset seen at target_range.

calc_inertial_coast_errors gives the four terms; the heading offset moves a point at range sideways by calc_lever_arm_error. The position offset is priced against reference (a localization bound).

Methods

Name Description
solve An IMU integrated open loop for duration, with the heading offset seen at target_range.
solve
engine.solvers.estimation.InertialCoastModel.solve(
    gyro_noise_density,
    gyro_bias,
    accel_noise_density,
    accel_bias,
    duration,
    target_range,
    reference,
)

An IMU integrated open loop for duration, with the heading offset seen at target_range.

Parameters
Name Type Description Default
gyro_noise_density Quantity Angular random-walk density, radians / sqrt(second). required
gyro_bias Quantity Constant angular-rate bias, radians/second. required
accel_noise_density Quantity Acceleration noise density, meters/second**1.5. required
accel_bias Quantity Constant acceleration bias, length/time**2. required
duration Quantity Positive open-loop integration time. required
target_range Quantity Nonnegative lever distance to target, length. required
reference Quantity Positive position-error comparison bound, length. required
Returns
Name Type Description
InertialCoastResult Angular noise and bias in radians, lateral and position errors in length units returned by the physics functions, and dimensionless position-bias ratios against the reference and noise.
See Also

calc_inertial_coast_errors : Composed numerical primitive. calc_lever_arm_error : Composed numerical primitive.

Notes

Equation: calc_inertial_coast_errors gives the four terms; the heading offset moves a point at range sideways by calc_lever_arm_error. The position offset is priced against reference (a localization bound).

Assumptions: Constant gyro and accelerometer biases, white independent noise, and small-angle lever-arm displacement during open-loop integration.

Excludes: Orientation-dependent gravity leakage, sensor cross-correlations, and external corrections during coasting.

References

Derivation: Integrate constant angular-rate bias once and acceleration bias twice. White-noise integrals produce the time powers in calc_inertial_coast_errors; a small angular error sweeps range times angle laterally.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import InertialCoastModel
>>> result = InertialCoastModel().solve(gyro_noise_density=Q_('0.01 rad/s**0.5'), gyro_bias=Q_('0.01 rad/s'), accel_noise_density=Q_('0.01 m/s**1.5'), accel_bias=Q_('0.01 m/s**2'), duration=Q_('1 s'), target_range=Q_('1 m'), reference=Q_('1 mm'))
>>> bool(result.bias_over_reference > 0)
True

OdometryDriftModel

engine.solvers.estimation.OdometryDriftModel()

A benchmark’s return error over its path as a drift rate, before and after calibration.

The rate eps = E / L spends a bound delta after delta / eps of travel, which takes delta / (eps v) at the operating speed; over a segment of length s the error is eps s.

Methods

Name Description
solve A benchmark’s return error over its path as a drift rate, before and after calibration.
solve
engine.solvers.estimation.OdometryDriftModel.solve(
    return_error_uncalibrated,
    return_error_calibrated,
    path_length,
    bound,
    speed,
    segment,
    test_speed,
)

A benchmark’s return error over its path as a drift rate, before and after calibration.

Parameters
Name Type Description Default
return_error_uncalibrated Quantity Positive benchmark return error before calibration, length. required
return_error_calibrated Quantity Positive benchmark return error after calibration, length. required
path_length Quantity Positive benchmark travel distance, length. required
bound Quantity Positive allowed position error, length. required
speed Quantity Positive constant operating speed, length/time. required
segment Quantity Nonnegative segment travel distance, length. required
test_speed Quantity Positive benchmark speed, length/time. required
Returns
Name Type Description
OdometryDriftResult Dimensionless drift rates and calibration gain, allowed travel in meters, operating times in seconds, and segment errors in millimeters.
Notes

Equation: The rate eps = E / L spends a bound delta after delta / eps of travel, which takes delta / (eps v) at the operating speed; over a segment of length s the error is eps s.

Assumptions: Benchmark return-error per path length is extrapolated as a constant linear drift rate at the supplied operating speed.

Excludes: Path-dependent cancellation, nonlinear drift, and evidence that a calibration gain transfers to different surfaces or motion regimes.

References

Derivation: Divide return error by benchmark path length to estimate error per unit distance; solve bound=rate*distance and distance=speed*time.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import OdometryDriftModel
>>> result = OdometryDriftModel().solve(return_error_uncalibrated=Q_('2 mm'), return_error_calibrated=Q_('1 mm'), path_length=Q_('1 m'), bound=Q_('10 mm'), speed=Q_('1 m/s'), segment=Q_('1 m'), test_speed=Q_('1 m/s'))
>>> bool(result.calibration_gain > 1)
True

RangeFusionModel

engine.solvers.estimation.RangeFusionModel()

One scalar predict and two updates of a range, and the same second update misdated.

Prediction adds (sigma_v dt)^2; each update applies calc_scalar_kalman_update. A reading paired with the wrong pose is off by misdating_bias; the update moves the estimate g b while the reported spread, which uses only the modeled noise, is unchanged. Its innovation’s NIS has mean 1 + b^2 / S. comparison_scale reruns the second update with that sensor’s spread scaled.

Methods

Name Description
solve One scalar predict and two updates of a range, and the same second update misdated.
solve
engine.solvers.estimation.RangeFusionModel.solve(
    prior_sigma,
    speed_sigma,
    interval,
    first_sigma,
    second_sigma,
    misdating_bias,
    comparison_scale=2.0,
)

One scalar predict and two updates of a range, and the same second update misdated.

Parameters
Name Type Description Default
prior_sigma Quantity Prior range standard deviation, positive length. required
speed_sigma Quantity Speed standard deviation, nonnegative length/time. required
interval Quantity Elapsed time, positive. required
first_sigma Quantity First sensor standard deviation, positive length. required
second_sigma Quantity Second sensor standard deviation, positive length. required
misdating_bias Quantity Signed range offset caused by using the wrong epoch, length. required
comparison_scale float Positive dimensionless multiplier for the second sensor standard deviation; default 2. 2.0
Returns
Name Type Description
RangeFusionResult Posterior range standard deviations and bias shift in millimeters, innovation variance in square millimeters, and dimensionless gains, normalized shifts, and expected NIS.
See Also

calc_scalar_kalman_update : Composed numerical primitive.

Notes

Equation: Prediction adds (sigma_v dt)^2; each update applies calc_scalar_kalman_update. A reading paired with the wrong pose is off by misdating_bias; the update moves the estimate g b while the reported spread, which uses only the modeled noise, is unchanged. Its innovation’s NIS has mean 1 + b^2 / S. comparison_scale reruns the second update with that sensor’s spread scaled.

Assumptions: Scalar linear observations with independent Gaussian noises; velocity uncertainty contributes independent variance during prediction.

Excludes: Correlated sensors, nonlinear range geometry, and changes in bias during the update sequence.

References

Derivation: Add independent variances for prediction, then apply K=P/(P+R) and P_post=(1-K)P. A deterministic observation bias shifts the posterior by Kb and adds b squared over innovation variance to NIS.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import RangeFusionModel
>>> result = RangeFusionModel().solve(prior_sigma=Q_('2 mm'), speed_sigma=Q_('1 mm/s'), interval=Q_('1 s'), first_sigma=Q_('1 mm'), second_sigma=Q_('1 mm'), misdating_bias=Q_('1 mm'))
>>> bool(result.second_gain > 0)
True

ReplayBufferModel

engine.solvers.estimation.ReplayBufferModel()

Slots of a rewind buffer sampled at sample_rate that reach back horizon: ceil(horizon / dt).

Methods

Name Description
solve Count slots of a rewind buffer sampled at sample_rate that reach back horizon: ceil(horizon / dt).
solve
engine.solvers.estimation.ReplayBufferModel.solve(horizon, sample_rate)

Count slots of a rewind buffer sampled at sample_rate that reach back horizon: ceil(horizon / dt).

Parameters
Name Type Description Default
horizon Quantity Nonnegative retained time span. required
sample_rate Quantity Positive sampling frequency, inverse time. required
Returns
Name Type Description
ReplayBufferResult Sampling period in milliseconds and integer retained sample slots.
Notes

Equation: Slots of a rewind buffer sampled at sample_rate that reach back horizon: ceil(horizon / dt).

Assumptions: Periodic sampling at a constant rate and a horizon measured from the newest sample; slot count follows the implemented ceiling convention.

Excludes: Per-record byte size, indexing overhead, and scheduling jitter.

References

Derivation: A sample occupies one period 1/r. Covering horizon H requires ceil(H/(1/r)) slots under this retention convention.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import ReplayBufferModel
>>> result = ReplayBufferModel().solve(horizon=Q_('1 s'), sample_rate=Q_('10 Hz'))
>>> bool(result.slots == 10)
True

SensorBiasDriftModel

engine.solvers.estimation.SensorBiasDriftModel()

A bias drifting at drift_rate for span under a steady reading: the true value is the reading less the shift.

Methods

Name Description
solve A bias drifting at drift_rate for span under a steady reading: the true value is the reading less the shift.
solve
engine.solvers.estimation.SensorBiasDriftModel.solve(reading, drift_rate, span)

A bias drifting at drift_rate for span under a steady reading: the true value is the reading less the shift.

Parameters
Name Type Description Default
reading Quantity Nonzero observed quantity whose units define the result. required
drift_rate Quantity Signed sensor-bias change per unit time, reading units/time. required
span Quantity Nonnegative elapsed drift time. required
Returns
Name Type Description
SensorBiasDriftResult Bias shift and inferred true value in reading units, plus a signed dimensionless shift-to-reading ratio.
Notes

Equation: A bias drifting at drift_rate for span under a steady reading: the true value is the reading less the shift.

Assumptions: A constant signed bias-drift rate acts for the supplied span while the observed reading remains steady and nonzero.

Excludes: Random drift, sensor saturation, and any separately changing physical process that also contributes to the reading.

References

Derivation: Integrate constant drift to get shift=rate*span; infer the underlying value by subtracting that shift from the reading.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import SensorBiasDriftModel
>>> result = SensorBiasDriftModel().solve(reading=Q_('10 mm'), drift_rate=Q_('1 mm/s'), span=Q_('1 s'))
>>> bool(result.true_value.to("mm").magnitude == 9)
True

StaleTransformModel

engine.solvers.estimation.StaleTransformModel()

A cached sensor-to-target edge, one interval old, composed with the current wrist pose.

The finger error is the initial error, plus the unobserved drift over the interval v dt, plus the lever-arm swing l omega dt of the rotation the cached edge never saw. Composing the edge with the wrist pose of its own epoch removes the lever term and leaves the belief’s own bound.

Methods

Name Description
solve A cached sensor-to-target edge, one interval old, composed with the current wrist pose.
solve
engine.solvers.estimation.StaleTransformModel.solve(
    belief,
    lever,
    angular_rate,
    interval,
)

A cached sensor-to-target edge, one interval old, composed with the current wrist pose.

Parameters
Name Type Description Default
belief BeliefExpiryResult Previously computed belief with error, growth rate, and tolerance quantities. required
lever Quantity Nonnegative distance from rotation axis, length. required
angular_rate Quantity Angular rate, radians/time. required
interval Quantity Elapsed time, positive. required
Returns
Name Type Description
StaleTransformResult Drift, lever swing, total error and same-epoch error in millimeters; interval in milliseconds and dimensionless tolerance/drift ratios.
See Also

calc_lever_arm_error : Composed numerical primitive.

Notes

Equation: The finger error is the initial error, plus the unobserved drift over the interval v dt, plus the lever-arm swing l omega dt of the rotation the cached edge never saw. Composing the edge with the wrist pose of its own epoch removes the lever term and leaves the belief’s own bound.

Assumptions: The cached transform misses a constant-rate small-angle rotation. The stale total uses the belief initial error and linear growth term.

Excludes: Higher-order rotational geometry and acceleration in the stale linear sum; same_epoch_error uses the belief full error function.

References

Derivation: Add initial error, v*dt drift, and lever*angular_rate*dt. Comparing with the belief evaluated at dt separates stale-frame lever error from same-epoch belief growth.

Examples
>>> from mlsysim.core.units import Q_
>>> from mlsysim.engine.solvers.estimation import StaleTransformModel
>>> from mlsysim.engine.solvers.estimation import BeliefExpiryModel
>>> result = StaleTransformModel().solve(belief=BeliefExpiryModel().solve(Q_('1 mm'), Q_('1 mm/s'), Q_('10 mm')), lever=Q_('1 m'), angular_rate=Q_('0.01 rad/s'), interval=Q_('1 s'))
>>> bool(result.total > result.same_epoch_error)
True
Back to top