Choose a Robot Payload
The catalog is three tiers behind one import path. Choose by the handoff you need to preserve, not by the ontology.
- Standard spatial (
retriever.types.spatial, re-exported byretriever_typing) — registry categoryspatial,@io-decorated, so they can be Flow ports directly. - Applied robot types (
retriever_typing.robotics_types) — registry categorygeneral, plain dataclasses carried as values and resolved by name. - Applied action/status (
retriever_typing.core_types) — categorygeneral, the lightweight exchange records with built-in Arrow round-trips.
Quick Decision Table
Section titled “Quick Decision Table”Start from the boundary you need to preserve, not the richest type available.
| Boundary | Start with | Use when |
|---|---|---|
| Local spatial math | Vector3, Quaternion, SE3Pose |
Frame, unit, and source are already local context. |
| Graph / process handoff | PoseStamped, TwistStamped, WrenchStamped |
The value crosses a Flow, process, replay, or robot boundary. |
| Robot state | RobotState, JointState |
A wrapper, monitor, policy, or sim needs current configuration. |
| Scene and memory | WorldState, BeliefGraph |
Perception, memory, grounding, and planning share a scene. |
| Planner handoff | TaskGoal, Skill, Plan, StructuredPlan |
A planner hands intent to a controller or monitor. |
| Motion and progress | Trajectory, ExecutionStatus |
A controller reports timed motion, progress, or terminal state. |
| Lightweight exchange | Action, Command, Status |
A smoke demo, Hub export, or dataset bridge needs compact records. |
Standard spatial types
Section titled “Standard spatial types”These are the @io payloads from retriever.types.spatial. Stamp a value with
a Header before it crosses a Flow, process, dataset, or robot boundary.
| Type | Fields | Notes |
|---|---|---|
Vector3 |
x, y, z |
Position, direction, velocity, or force component. |
Quaternion |
x, y, z, w |
norm(), is_unit(tol=1e-3). |
SE3Pose |
position, orientation |
Object, end-effector, or robot pose. |
Twist / Wrench |
linear, angular / force, torque |
Spatial velocity / force-torque. |
Header |
stamp_ns, frame_id, source |
Boundary metadata; attach before handoff. |
PoseStamped / TwistStamped / WrenchStamped |
header + pose/twist/wrench |
Stamped wrappers for cross-boundary values. |
JointState |
names, positions, velocities, efforts |
is_aligned() checks index alignment. |
Validators live beside them: validate_header, validate_quaternion,
validate_pose_stamped, validate_joint_state. Use them at the edge where
robot data changes meaning.
Applied robot types
Section titled “Applied robot types”Scene, memory, and planner-handoff payloads. Plain dataclasses — pick the narrowest one that preserves the boundary.
| Type | Fields (defaults omitted) | First use |
|---|---|---|
WorldState |
object_poses: Dict[str, SE3Pose], robot_pose: SE3Pose, timestamp |
Shared scene state for perception, memory, planning. |
RobotState |
position, orientation, objects_held, battery_level, last_error |
Robot wrapper / monitor / policy input. |
BeliefGraph |
nodes: Set[str], edges: Dict[str, Set[str]] |
Symbolic scene memory and grounding. |
Skill |
name, params, confidence, expected_duration |
One named capability with parameters. |
Plan |
skills: List[Skill], confidence |
Ordered skills; total_duration sums known durations. |
StructuredPlan |
steps: List[str], confidence, metadata |
Typed multi-step plan text. |
TaskGoal |
high_level_description, affordances, success_criteria |
User intent + available objects/actions. |
Trajectory |
poses: List[SE3Pose], timestamps |
Timed motion; duration from first/last stamp. |
ExecutionStatus |
status, metadata, progress, error_message |
Progress in [0,1]; is_complete for terminal states. |
Applied action and status types
Section titled “Applied action and status types”Lightweight exchange records from retriever_typing.core_types, used by smoke
demos, Hub exports, and dataset bridges. Action, Command, and Status
carry their own Arrow round-trips.
| Type | Fields | Notes |
|---|---|---|
Action |
type, parameters: dict, timestamp, priority |
__post_init__ rejects non-dict params; to_arrow / from_arrow. |
Command |
action: Action, robot_id, expected_duration, timeout |
action_type shortcut. |
Status |
state, message, progress, timestamp, error_code |
state is one of pending/running/completed/failed/cancelled; is_success. |
Timestamp |
seconds, nanoseconds |
now(), to_float(). |
ExecutionTimer |
start_time, expected_period, actual_period, iteration |
is_timing_violation at 50% tolerance. |
Authoring Pattern
Section titled “Authoring Pattern”Use direct imports inside example code — readers should not have to ask the
registry what a payload means. Use registry lookup (get_type) only at
package boundaries: manifests, Hub packs, replay readers, and dataset readers,
which resolve a name without importing optional robot integrations.
Validation Checklist
Section titled “Validation Checklist”Validate at the edge where robot data changes meaning, before it reaches a planner, controller, dataset, or another process.
- Frames — keep
frame_idnon-empty when world, camera, robot, or object frames can be confused (validate_header). - Time — keep
stamp_nspositive and monotonic per source so replay and event-time joins order correctly. - Rotations — check
Quaternion.is_unit()before a pose crosses into planning or a dataset (validate_quaternion). - Arrays — confirm
JointState.is_aligned()sonames/positions/velocities/effortsshare one length (validate_joint_state). - Progress — keep
ExecutionStatus.progressin[0, 1]so monitors and UI surfaces agree.
Keep the base catalog small. Add covariance-bearing poses, richer frame graphs, or domain-specific schemas as separate Hub packs only once these payloads are not enough.
Detailed field reference for implementers
The base catalog above covers the common handoffs. retriever_typing.robotics_types
also carries less-common applied payloads for specific examples:
ActionPlan—actions: List[Action],total_duration;num_actionsproperty.TaskInstance—goal: TaskGoal,initial_observation,seed.Observation/ObservationHistory— multi-sensor image bundles and a bounded deque.ObjectVariable/ObjectSymbol— symbolic placeholders and grounded object IDs.UnorderedObjectSet/ObjectDescriptionDict— object-id sets and id-to-description maps.
These stay source-only until an example needs them across a stable boundary.
Source: src/retriever_typing/robotics_types.py, src/retriever_typing/core_types.py,
retriever.types.spatial (re-exported via src/retriever_typing/v1.py).
