robot_msgs

GoalStats

How a run arrived at the reference's final point, from its samples at or after the end.

Full docstring
- `final_error`: ``reference - measured`` at the last measured sample (a pose: the distance);
  NaN when the run has no sample at or after the reference's end.
- `settling_time`: seconds after the reference's end of the first sample from which
  ``|error| <= band`` for every later sample (0 if inside at the end and staying); NaN if the
  last sample is outside the band or there are no such samples. WHY NaN, not the end of the
  data: a run that never settled must not look like one that settled at its last sample.
- `overshoot`: how far the run went past the final value along the reference's net move
  (same unit as the signal), 0 if it never did; `overshoot_percent`: of that move's size
  (MATLAB ``stepinfo``'s convention), NaN when the reference does not move.
- `band` is the settling band used; `samples_after_end` how many samples it rests on.
Import
from robot_msgs.compare import GoalStats
ROS 2no ROS equivalent

Fields

NameTypeDefault
final_errorfloatrequired
settling_timefloatrequired
overshootfloatrequired
overshoot_percentfloatrequired
bandfloatrequired
samples_after_endintrequired

Example

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

GoalStats(final_error=0.0886459943160588, settling_time=nan, overshoot=0.0886459943160588, overshoot_percent=3.0281693064513893, band=0.05, samples_after_end=1)
to_dict() as JSON
{
  "_type": "compare/GoalStats",
  "final_error": 0.0886459943160588,
  "settling_time": NaN,
  "overshoot": 0.0886459943160588,
  "overshoot_percent": 3.0281693064513893,
  "band": 0.05,
  "samples_after_end": 1
}

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.

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.

No other type refers to it, and it refers to none.

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