Outcome
The verdict: a FollowJointTrajectory result code, the reason, and the room left.
Full docstring
- `error_code` is `SUCCESSFUL`, `PATH_TOLERANCE_VIOLATED` or `GOAL_TOLERANCE_VIOLATED`, taken from the earliest violation; `error_string` names the joint / metric and the numbers. - `violations`: the first violation per (phase, metric), by time. Empty on success, even when the run was still settling early in the goal phase: the goal was met. - `margins`: ``path/<metric>`` = limit - worst ``|error|`` over the path phase; ``goal/<metric>`` = limit - ``|error|`` at the sample where the goal was decided. Negative = violated by that much. - `goal_time`: seconds after the reference ends at which the goal was met; NaN if not met. - `unchecked`: what a limit asked for but the data could not give (a measured run without velocities cannot be held to `stopped_velocity_tolerance`); never silently a pass.
Fields
| Name | Type | Default |
|---|---|---|
error_code | int | required |
error_string | str | '' |
violations | tuple[Violation, ...] | () |
margins | Mapping[str, float] | {} |
goal_time | float | nan |
unchecked | tuple[str, ...] | () |
Example
One instance from the package's own test catalog; the output is its real repr().
Outcome(error_code=-4, error_string='path tolerance violated: positions/j1 error -0.2041 exceeds limit 0.01 at t=0 s', violations=(Violation(phase='path', metric='positions/j1', t=0.0, error=-0.20409191213851852, limit=0.01), Violation(phase='path', metric='positions/j2', t=0.0, error=0.25556650313141827, limit=0.05)), margins={'path/positions/j1': -0.1940919121385185, 'path/positions/j2': -0.20556650313141828}, goal_time=nan)to_dict() as JSON
{
"_type": "compare/Outcome",
"error_code": -4,
"error_string": "path tolerance violated: positions/j1 error -0.2041 exceeds limit 0.01 at t=0 s",
"violations": [
{
"_type": "compare/Violation",
"phase": "path",
"metric": "positions/j1",
"t": 0.0,
"error": -0.20409191213851852,
"limit": 0.01
},
{
"_type": "compare/Violation",
"phase": "path",
"metric": "positions/j2",
"t": 0.0,
"error": 0.25556650313141827,
"limit": 0.05
}
],
"margins": {
"path/positions/j1": -0.1940919121385185,
"path/positions/j2": -0.20556650313141828
},
"goal_time": NaN,
"unchecked": []
}Long arrays are cut after 16 values and say so with “…”.
Functions
Constructors
Classmethods and staticmethods: ways to build one.
Properties
Read-only views computed from the fields.