robot_msgs

Violation

One limit broken, at the first sample that broke it.

Full docstring
`metric` uses compare's names (``positions/j1``, ``velocities/j2``, ``accelerations/j1``,
``position``, ``rotation``, ``linear_velocity``). `t` is the measured sample's time (the error
trajectory's `t`). `error` is the signed ``reference - measured`` for a joint and the
magnitude for a pose's position / rotation.
Import
from robot_msgs.compare import Violation
ROS 2no ROS equivalent

Fields

NameTypeDefault
phasestrrequired
metricstrrequired
tfloatrequired
errorfloatrequired
limitfloatrequired

Example

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

Violation(phase='path', metric='positions/j1', t=0.0, error=-0.20409191213851852, limit=0.01)
to_dict() as JSON
{
  "_type": "compare/Violation",
  "phase": "path",
  "metric": "positions/j1",
  "t": 0.0,
  "error": -0.20409191213851852,
  "limit": 0.01
}

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.

Used by

Types whose fields refer to it.

Outcome

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