robot_msgs

Tolerances

What a run must stay inside, as joint_trajectory_controller states it.

Full docstring
- `path`: limits that must hold at every sample while the reference is running; a breach ends
  the check (JTC aborts the goal). `goal`: limits that must hold once the reference has ended.
  Each is a tuple of `JointTolerance`, or one `PoseTolerance` for a `PoseTrajectory`.
- `goal_time_tolerance` (s after the reference ends): the goal must be met within it; 0 means
  wait as long as the data lasts (JTC: "potentially infinite").
- `stopped_velocity_tolerance`: JTC's default goal velocity limit, applied to EVERY joint's
  measured ``|velocity|`` (a pose: ``|linear velocity|``) unless that joint's goal
  `JointTolerance.velocity` is above 0. It only applies when `goal` has a limit of its own,
  and a measured run with no velocities skips it and says so in `Outcome.unchecked`.
Import
from robot_msgs.compare import Tolerances
ROS 2no ROS equivalent

Fields

NameTypeDefault
pathtuple[JointTolerance, ...] | PoseTolerance()
goaltuple[JointTolerance, ...] | PoseTolerance()
goal_time_tolerancefloat0.0
stopped_velocity_tolerancefloat0.01

Example

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

Tolerances(path=(JointTolerance(name='j1', position=0.01, velocity=0.0, acceleration=0.0), JointTolerance(name='j2', position=0.05, velocity=0.0, acceleration=0.0)), goal=(JointTolerance(name='j1', position=0.01, velocity=0.05, acceleration=0.0),), goal_time_tolerance=0.5, stopped_velocity_tolerance=0.01)
to_dict() as JSON
{
  "_type": "compare/Tolerances",
  "path": [
    {
      "_type": "compare/JointTolerance",
      "name": "j1",
      "position": 0.01,
      "velocity": 0.0,
      "acceleration": 0.0
    },
    {
      "_type": "compare/JointTolerance",
      "name": "j2",
      "position": 0.05,
      "velocity": 0.0,
      "acceleration": 0.0
    }
  ],
  "goal": [
    {
      "_type": "compare/JointTolerance",
      "name": "j1",
      "position": 0.01,
      "velocity": 0.05,
      "acceleration": 0.0
    }
  ],
  "goal_time_tolerance": 0.5,
  "stopped_velocity_tolerance": 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.

Uses

Types its fields refer to.

JointTolerance PoseTolerance

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