robot_msgs

ErrorStats

Summary of one error signal over its finite samples, in the signal's own SI unit.

Full docstring
`mean`, `median`, `min`, `max` and `final` keep the error's sign; `rms`, `max_abs` and
`p95_abs` are of its magnitude. WHY this set: evo's rmse / mean / median / std / min / max
(the SLAM-evaluation standard), plus what tracking needs on top: the worst magnitude, a p95
that ignores a single glitch sample, and `final`, the error left when the motion ends.
Missing data is NaN with ``n == 0``, never 0.

`iae`, `ise` and `itae` are the control-loop integral criteria (∫|e|, ∫e², ∫(t - t₀)|e|, in
the signal's unit × s, unit² × s and unit × s²): trapezoids over the intervals whose both ends
were observed. WHY NaN by default: a series given without its time axis has no integral, and
data serialised before these fields existed still loads.
Import
from robot_msgs.compare import ErrorStats
ROS 2no ROS equivalent

Fields

NameTypeDefault
nintrequired
rmsfloatrequired
meanfloatrequired
medianfloatrequired
stdfloatrequired
minfloatrequired
maxfloatrequired
max_absfloatrequired
p95_absfloatrequired
finalfloatrequired
iaefloatnan
isefloatnan
itaefloatnan

Example

One instance from the package's own test catalog; the output is its real repr().

ErrorStats(n=3, rms=0.0021602468994692866, mean=0.0013333333333333333, median=0.002, std=0.0016996731711975948, min=-0.001, max=0.003, max_abs=0.003, p95_abs=0.0029, final=0.003, iae=nan, ise=nan, itae=nan)
to_dict() as JSON
{
  "_type": "compare/ErrorStats",
  "n": 3,
  "rms": 0.0021602468994692866,
  "mean": 0.0013333333333333333,
  "median": 0.002,
  "std": 0.0016996731711975948,
  "min": -0.001,
  "max": 0.003,
  "max_abs": 0.003,
  "p95_abs": 0.0029,
  "final": 0.003,
  "iae": NaN,
  "ise": NaN,
  "itae": NaN
}

Long arrays are cut after 16 values and say so with “…”.

Functions

Constructors

Classmethods and staticmethods: ways to build one.

from_dict

from Msg
from_dict(data: Mapping[str, Any]) -> M

No docstring.

Methods

Return new values; messages are never mutated.

as_dict() -> dict[str, Any]

No docstring.

replace

from Msg
replace(**changes: Any) -> M

A copy with some fields changed. Validation runs again.

to_dict

from Msg
to_dict() -> dict[str, Any]

JSON-safe dict with a "_type" key; arrays keep their dtype and shape.

Used by

Types whose fields refer to it.

Aggregate Comparison

robot_msgs 0.2.0 @ 22ec67fGitHub · MIT license · generated from the package, not written per type