Skip to content

Layer 0 — Core Schemas & Exceptions

Part of the OpenRAL public-symbol inventory. Hand-curated; (LNN) markers are refreshed by tools/refresh_methods_linenos.py.

Authoritative Pydantic v2 contracts. Anything imported from openral_core.__init__ is API. On-disk schemas (RobotDescription, RSkillManifest, SceneGraph, …) are versioned via schema_version and evolve in place unless a change breaks compatibility.

python/core/src/openral_core/schemas.py

openral schema v0 — normative Pydantic v2 contracts for all layers.

Enums

  • class EmbodimentKind(str, Enum) — Top-level kinematic class. (L85) HUMANOID, MANIPULATOR, BIMANUAL, QUADRUPED, MOBILE_BASE, MOBILE_MANIPULATOR, DRONE
  • class JointType(str, Enum) — URDF joint type. (L97) REVOLUTE, PRISMATIC, CONTINUOUS, FIXED, FLOATING, PLANAR
  • class ClockOrigin(str, Enum) — Authoritative source for stamp_ns values; /clock is a projection, not an origin. (L108) HOST_WALL, SIMULATION, HARDWARE_SYNCED
  • class ClockEpoch(str, Enum) — Epoch a stamp_ns value is measured from. (L120) UNIX, SIMULATION_ELAPSED, HARDWARE
  • JointRole: TypeAlias = Literal[…] — Structural role of a JointSpec (arm/base/gripper/…), read instead of name-substring matching; defaults to "unknown" so legacy manifests stay loadable. (L128) "arm", "base", "gripper", "torso", "leg", "head", "neck", "wheel", "unknown". Used by runner/safety/dataset-bridge to identify a channel without name-substring heuristics. Default "unknown" keeps legacy manifests loadable.
  • class ControlMode(str, Enum) — Action space / control interface. (L232) JOINT_POSITION, JOINT_VELOCITY, JOINT_TORQUE, JOINT_TRAJECTORY, CARTESIAN_POSE, CARTESIAN_DELTA, CARTESIAN_TWIST, BODY_TWIST, FOOT_PLACEMENT, GRIPPER_BINARY, GRIPPER_POSITION, DEX_HAND_JOINT, COMPOSITE_MODE
  • CONTROL_MODE_TO_UINT8: dict[ControlMode, int] — Wire encoding for ActionChunk.control_mode; mirrors the C++ kernel's validator.hpp::ControlMode enum. (L262)
  • UINT8_TO_CONTROL_MODE: dict[int, ControlMode] — Inverse of CONTROL_MODE_TO_UINT8. (L280)
  • const BODY_TWIST_DIM: int = 6 — Width of a BODY_TWIST / CARTESIAN_* twist row (vx, vy, vz, wx, wy, wz); shared by the HAL packers and safety supervisor that validate 6-vec twist payloads. (L285)
  • class SensorModality(str, Enum) — Physical sensing modality. (L300) RGB, DEPTH, STEREO, IR, POINT_CLOUD, LIDAR_2D, IMU, FORCE_TORQUE, JOINT_STATE, TACTILE_VISION, TACTILE_ARRAY, AUDIO, GPS, BATTERY
  • class Hand(str, Enum) — End-effector laterality. (L319) LEFT, RIGHT, NA
  • class StateRepresentation(str, Enum) — State vector format. (L2258) JOINT_POSITIONS, EEF_POS_AXISANGLE, EEF_POS_EULER, EEF_POS_QUAT, EEF_POS_AXISANGLE_GRIPPER
  • class ActionRepresentation(str, Enum) — Action vector format: which coordinates and gripper encoding a policy's output represents. (L2268)
  • class JointUnits(str, Enum) — Angular convention a joint-position checkpoint was trained in. The runner converts deg↔rad at the policy boundary; a joint-position skill reaching the runner without a declaration raises ROSConfigError rather than guessing. (L2283) JOINT_POSITIONS, JOINT_VELOCITIES, DELTA_EE_6D_PLUS_GRIPPER, DELTA_EE_6D, CARTESIAN_POSE
  • class RSkillAction(str, Enum) — Closed vocabulary of action verbs an rSkill can perform; declared on RSkillManifest.actions and surfaced to the reasoner's tool palette so it can pick a skill by what it does. (L2301) Manipulation primitives: PICK, PLACE, PICK_AND_PLACE, TRANSFER, GRASP, RELEASE; articulated / contact-rich: OPEN, CLOSE, PUSH, PULL, SLIDE, INSERT, POUR, WIPE, ROTATE; motion: REACH; mobile: NAVIGATE; social/expressive: WAVE, SHAKE; generalist marker (foundation / multi-task checkpoints): GENERALIST; perception producer: DETECT (for kind: "detector" rSkills); scene VLM: QUERY (for kind: "vlm" rSkills); reward monitor: MONITOR (for kind: "reward" rSkills); playbook decision procedure: PLAN (for kind: "playbook" rSkills). New entries are additive.
  • class QuantizationDtype(str, Enum) — Weight numeric format. (L7536) FP32, FP16, BF16, INT8, INT4, FP4_NVFP4
  • class QuantizationBackend(str, Enum) — Inference backend. (L7570) PYTORCH, ONNX, TENSORRT, GGUF, MLX
  • class RSkillState(str, Enum) — Skill lifecycle. (L7672) UNCONFIGURED, INACTIVE, ACTIVE, FINALIZED, ERROR
  • class RSkillLicensePosture(str, Enum) — License posture. (L7753)
  • RSkillLicensePosture.allows_commercial_use -> bool (property) — Whether the posture permits commercial deployment (_LICENSES_ALLOWING_COMMERCIAL); the one source the loader guard (RSkillManifest.is_commercial_use_allowed), the model card and the SKILL.md generator read. (L7779) APACHE_2_0, MIT, BSD, PERMISSIVE_RESEARCH, NVIDIA_NON_COMMERCIAL, NVIDIA_OPEN_MODEL, RLWRLD_NON_COMMERCIAL, PROPRIETARY, UNKNOWN (NVIDIA_OPEN_MODEL = GR00T N1.7+, commercial OK)
  • class RSkillRuntime(str, Enum) — Manifest runtime hint. (L7796) PYTORCH, ONNX, TENSORRT, TRT_LLM, VLLM, GGUF, MLX, JAX
  • class PhysicsBackend(str, Enum) — Sim backend. (L12846) MUJOCO, MUJOCO_MJX, PYBULLET, SAPIEN, ISAACSIM, COPPELIASIM, GENESIS, MOCK (SAPIEN = ManiSkill3 / RoboTwin engine; RoboTwin uses it via a py3.12 sidecar; COPPELIASIM = CoppeliaSim/PyRep RLBench backend, out-of-process py3.10 sidecar)

Pydantic models — robot manifest hierarchy

  • class IntrinsicsPinhole(BaseModel) — Pinhole camera intrinsics. (L330) fields: width, height, fx, fy, cx, cy, distortion_model, distortion_coeffs
  • scale_intrinsics_to(base, width, height) -> IntrinsicsPinhole — Rescales pinhole intrinsics to a new render resolution, preserving FOV and distortion; used when deploy-sim renders at a different resolution than the manifest declares. (L364)
  • class ClockAuthority(BaseModel) — Named origin for OpenRAL timestamps across sim, rSkills, ROS, and hardware; construct via host_wall(), simulation(), or hardware_synced(). A validator rejects impossible origin/epoch pairs and competing hardware /clock publishers. (L152)
  • host_wall(cls) -> ClockAuthority [@classmethod] — Real-deployment wall/ROS system time origin. (L184)
  • simulation(cls, clock_id, timestep_s=None, publishes_ros_clock=True) -> ClockAuthority [@classmethod] — Simulator elapsed time projected to /clock. (L189)
  • hardware_synced(cls, clock_id, epoch=UNIX) -> ClockAuthority [@classmethod] — Future synchronized controller/PTP clock origin. (L206)
  • class CameraSimPlacement(BaseModel) — Where an RGB sensor's camera sits in the sim MJCF, so the generic HAL camera rig can splice it into a bare-arm MJCF for deploy sim. Replaces per-robot scene_defaults.composition for camera-only deploy twins. (L418)
  • class SensorSpec(BaseModel) — Generalizable sensor descriptor covering all modalities; sim_camera_name names the MJCF camera when it differs from the sensor name, sim_placement carries the camera's sim pose, shares_mount_with names the sensor of the same physical device whose (per-unit calibrated) mount this one rides (validated by RobotDescription: one level, onto a sensor with parent_frame + static_transform_xyz_rpy), and deploy_binding is the real-hardware counterpart (host-specific; a robot camera's lives in its host's RobotUnit overlay or robot.yaml, a workcell camera's on its own DeployScene.sensors entry). ros2_topic names only an external driver's image topic (ADR-0108); None (every in-tree manifest) means OpenRAL publishes the sensor under camera_topic(name, kind). (L462)
  • is_depth_camera [@property] (L582) — A depth / point-cloud camera with intrinsics: the one test for "can this be back-projected into a cloud", shared by the sim bridge's depth synth (openral_hal.depth_cloud.is_depth_sensor delegates to it), the sim cloud topic (deploy_cloud_topic), the Nav2-over-visual-SLAM guard and the launch's depth-camera pick.
  • is_cloud_source [@property] (L597) — Any depth or point_cloud sensor (a 3D lidar needs no intrinsics): a real driver can feed octomap its cloud, so on deploy run it auto-enables the octomap leg, which then needs the driver topic pinned. fields: name, modality, frame_id, parent_frame, static_transform_xyz_rpy, rate_hz, intrinsics, encoding, fov_h_deg, fov_v_deg, sim_camera_name, sim_placement, n_channels, range_min_m, range_max_m, accel_noise_density, gyro_noise_density, n_axes, tactile_grid, vla_feature_key, ros2_topic, ros2_msg_type, qos_profile, catalog_id, vendor, model, driver_pkg, metadata
  • CAMERA_TOPIC_PREFIX: Final[str] — "/openral/cameras", the root of the canonical camera topic layout (ADR-0108). Consumers that need a pattern use re.escape(CAMERA_TOPIC_PREFIX). (L616)
  • class CameraTopicKind(StrEnum) — Per-camera stream suffix: IMAGE (image), CAMERA_INFO, DEPTH_IMAGE (depth/image), DEPTH_CAMERA_INFO (depth/camera_info), POINTS, ROBOT_MASK (robot_mask: the robot self-filter's mono8 robot mask, 0 free / 128 uncertain / 255 robot, at the depth stamp; issue #418). (L619)
  • camera_topic(name, kind=CameraTopicKind.IMAGE, *, prefix=CAMERA_TOPIC_PREFIX) -> str — <prefix>/<name>/<kind>; the only place the camera layout is spelled. Every producer (sim bridge, sensor leg) and consumer (world state, perception, reasoner, Foxglove, SLAM, deploy launch, record profiles) builds through it; tests/unit/test_camera_topic_layout.py rejects a hand-built string. Raises ROSConfigError on an empty or /-containing name. (L632)
  • class SensorBundle(BaseModel) — Multi-modal sensor group. (L667)
  • sensor_name_to_slot(description) -> dict[str, str] — Maps each RGB sensor name to its VLA slot (vla_feature_key suffix, else the name). The one camera namespace shared by openral sim run, deploy sim and deploy run; used by rskill_runner_node, DatasetRecorderBridge, SimSensorBridge and SimRunner. (L683)
  • check_scene_sensor_overrides(manifest_sensors, scene_sensors) -> None (L728) — Raises ROSConfigError when a DeployScene.sensors entry reuses the name of a sensor the robot manifest defines. A deploy scene never redefines a robot camera: its name, modality and frames live in robots/<robot_id>/robot.yaml, its per-host binding / per-unit calibration in a RobotUnit overlay; the scene only adds workcell cameras under new names. Called by merge_deploy_sensors, resolve_launch_invocation (so deploy sim/run/validate) and openral check.
  • merge_deploy_sensors(manifest_sensors, scene_sensors) -> list[SensorSpec] (L764) — The deploy's sensor set: the manifest's sensors, then the scene's workcell sensors; a checked concatenation (check_scene_sensor_overrides refuses a name clash). Shared by the CLI, the launch and compose_runtime.
  • sim_scene_description(description, backend_options) -> RobotDescription (L787) — The robot as a sim scene runs it: backend_options.control_freq_hz replaces action_spec.control_freq_hz (scene_control_rate_hz), and backend_options.sim_sensors (depth cameras with intrinsics, no deploy_binding, names the manifest and the other entries do not use; ROSConfigError otherwise) are appended to its sensors, and backend_options.gripper_joint_curve ({gripper joint: [(value, urdf value), …]}, any point order) replaces each named joint's JointSpec.urdf_curve for that twin (#533; ROSConfigError on a non-gripper name or a curve check_urdf_curve refuses). The merged robot is re-validated as a RobotDescription (model_copy skips its validators), so e.g. a dangling shares_mount_with raises ROSConfigError. backend_options.link_attachments entries with collision (#773) add the carried prim as a fixed link of the carrying link (allowed pairs: links rigid with it, and the hand links), only this robot's ($OPENRAL_SCENE_ROBOT) entries. Returns description itself when no key is set. Pure (core has no logging dependency). The one place deploy sim re-times / re-equips a robot: called by resolve_launch_invocation (sim only; refused on a bare twin), deploy_e2e.launch.py (kernel rates, the runner's rate_hz, octomap cloud), build_hal's scene-attach branch and the Isaac scene's _with_sim_sensors. A real deploy never calls it.
  • link_attachment_carrier_links(backend_options) -> list[str] (L980) — The links sim_scene_description adds for this robot's collision-bearing link_attachments (#773); deploy_e2e.launch.py hands them to the kernel as collision_carrier_links (sim only: not checked against the world grid or an attached payload, held or frozen after release).
  • link_attachment_contents(backend_options) -> dict[str, object] (L1011) — robot_self_filter params (carrier_contents_links, carrier_contents_boxes) for the contents of this robot's carriers: each carrier's box bounds raised by contents_above_m, dropped from the cloud while the base drives (#773). {} with none; ROSConfigError on a contents_above_m that is not a finite number >= 0, or on non-box collision.
  • check_urdf_curve(points, what) -> None (L1722) — Refuses a calibration curve JointSpec.urdf_curve cannot hold (ValueError): fewer than two points, a non-finite or non-pair point, values not strictly increasing, URDF values not strictly monotonic. Shared by JointSpec, IsaacSimOptions.gripper_joint_curve and the HAL's urdf_joint_curves.
  • curve_value(points, x) -> float (L1749) — Piecewise-linear points (sorted by strictly increasing x) at x, clamped to the end points like numpy.interp; its slope there (the segment ending at a breakpoint; 0 outside the end points). The Python half of the kernel's link_joint_value / link_joint_gain.
  • curve_slope(points, x) -> float (L1768) — d curve_value / dx: the segment's slope (the one ending at a breakpoint), 0 outside the end points; the HAL's curved-joint rate.
  • ROBOT_UNIT_ENV: str — "OPENRAL_ROBOT_UNIT", names the host's robots/<id>/units/<unit>.yaml; wins over DeployScene.robot_unit. (L1131)
  • UNIT_SERIAL_ENV: str — "OPENRAL_UNIT_SERIAL", this unit's serial; wins over RobotUnit.serial. (L1136)
  • ORG_ID_ENV: str — "OPENRAL_ORG_ID", the operating organisation; wins over RobotUnit.org_id. (L1138)
  • SITE_ID_ENV: str — "OPENRAL_SITE_ID", the deployer site (env only). (L1140)
  • class UnitIdentity(NamedTuple) — serial, org_id, site_id: which machine is running, stamped on the OTel resource as openral.unit.serial / openral.org.id / openral.site.id (issue #467). (L1147)
  • resolve_unit_identity(robot_yaml, scene_unit, *, required) -> UnitIdentity — Env var, else the selected RobotUnit's field; each value must be a plain token (it rides in OTEL_RESOURCE_ATTRIBUTES); required (real deploy) without a serial → ROSConfigError. Called by deploy_sim.resolve_launch_invocation and deploy_e2e.launch.py. (L1159)
  • apply_sensor_overlays(sensors, overlays) -> list[SensorSpec] — Lays each SensorOverlay's set fields (binding, driver topic, mount pose, intrinsics) over the named manifest sensor and re-validates; ROSConfigError on an unknown or repeated name. Applied by resolve_launch_invocation, deploy_e2e.launch.py, compose_runtime(sensor_overlays=), deploy validate and openral check. (L1215)
  • load_robot_unit(robot_yaml, unit) -> RobotUnit — Loads <robot_yaml dir>/units/<unit>.yaml; ROSConfigError when missing (lists the available units) or when its robot_id/unit disagree with the directory / request. (L1256)
  • gripper_hands(description) -> tuple[tuple[str, ...], ...] — The robot's hands: its role: gripper joints' child_links grouped per hand (joints sharing a parent_link, a chained finger joining its parent's hand). SO-101 → one hand; OpenArm → two one-link hands; R1 Pro's four finger joints → two two-finger hands. Used by the reasoner's grasp grounding (re-exported as openral_reasoner.gripper_hands), the rSkill runner's goal-scope approach declaration and the HAL's approach-armed grasp target. (L1283)
  • hand_joint(description, contact_links) -> str | None — The one role: gripper joint whose child_link the links name, else None (a hand of several finger joints, or links of no gripper joint): the ObjectQuery.hand hint (issue #418). Used by the reasoner node and the rSkill runner (re-exported as openral_reasoner.hand_joint). (L1307)
  • resolve_sensor_overlays(robot_yaml, scene_unit, *, required) -> list[SensorOverlay] — The host's overlays: unit = $OPENRAL_ROBOT_UNIT or the scene's robot_unit; none → [], except required (real deploy) on a robot that ships units/ → ROSConfigError. (L1333)
  • unit_gripper_curves(description, robot_yaml, scene_unit) -> RobotDescription — The real-deploy counterpart of sim_scene_description's gripper_joint_curve: the selected unit's ($OPENRAL_ROBOT_UNIT or scene_unit) RobotUnit.gripper_joint_curve replaces each named gripper's JointSpec.urdf_curve and RobotUnit.joint_curve any named joint's, so the kernel, the self-filter and /tf pose the link by that unit's servo calibration (the SO-101 bench jaw, and its wrist roll a quarter turn off). description itself with no unit or no curves; ROSConfigError on an unknown name (a non-gripper in gripper_joint_curve), a joint in both maps, or a bad curve. Called by deploy_e2e.launch.py on hal_mode == "real". (L1364)
  • publishing_sensors(manifest_sensors, scene_sensors, hal_mode) -> list[SensorSpec] (L1417) — The sensors that actually publish a camera topic on a deploy: sim → the manifest's (the sim bridge renders them); real → merge_deploy_sensors filtered to sensors with a deploy_binding. The one rule openral deploy (detector auto-downgrade) and deploy_e2e.launch.py (completion, detector, reward-monitor and scene-VLM cameras) share.
  • deploy_cloud_topic(manifest_sensors, *, pinned, hal_mode, estimated_camera=None) -> str (L1444) — The PointCloud2 topic octomap's cloud_in and the world-state object-lift fallback read: a pinned runtime.octomap_cloud_topic wins; then estimated_camera (runtime.estimated_depth_camera) → camera_topic(<it>, POINTS) in sim and real (the depth provider's DA3 cloud); sim → camera_topic(<the one is_depth_camera>, POINTS) (the sim bridge's back-projection); real → "" (nothing in-tree publishes a cloud). Raises ROSConfigError in sim for several depth cameras and no pin (declared choice, not first-wins). Shared by openral deploy's pre-launch refusal and deploy_e2e.launch.py.
  • required_vla_camera_slots(manifest, description) -> tuple[str, ...] — The robot's RGB slots trimmed to those the rSkill's sensors_required[].vla_feature_key names (all slots when it names none); the policy camera keys on deploy and on an empty-scene.cameras sim run. (L707) fields: bundle_name, sensors, sync, sync_tolerance_ms fields: dim, representation, slots, cartesian_delta_scale, joint_names, gripper_scale, joint_units — joint_names (policy joint order in robot joint names; forbidden with slots, must match dim, unique) and gripper_scale (policy gripper units per HAL [0, 1] unit, > 0) are consumed by openral_rskill._policy_io.PolicyIOCodec on every dispatch path.
  • class GripperClosureCalibration(BaseModel) — Per-gripper-joint calibration of the position-stall grasp trigger (openral_hal._grasp_trigger.PositionStallTrigger), in the joint's own units, frozen/extra="forbid": closed_position (the fully-closed command; must be an end of position_limits), closed_rest_offset >= 0 (where an empty close rests), stall_gap > 0 (how far beyond the rest offset a settled jaw must sit short of a close command to read as holding something; halved, the hysteresis; the close-command band when close_band is unset), settle_tolerance > 0 (position span that counts as stationary), close_band: float | None > 0 (how far from closed a command still counts as a close command; None = stall_gap), property command_band (the band in force). Robot-type constants of the gripper mechanism, derived from teleop data (not per cell; no unit overrides them), never library defaults. (L1498)
  • (property) command_band -> float (L1552) — the close-command band in force: close_band, else stall_gap.
  • class JointSpec(BaseModel) — URDF-derived joint spec; origin_xyz/origin_rpy/axis_xyz let the kernel compute FK for self-collision, role identifies gripper/base/arm DoFs structurally instead of by name-substring, and sim_joint_name names the MJCF joint when it differs from the logical name (needed only when a sim adapter looks the joint up by name and the loaded MJCF renames it); closure_calibration (a role: gripper joint's GripperClosureCalibration, None = uncalibrated, the vision attachment leg refuses it); fixed_jaw_link (a role: gripper joint only: the body link carrying a fixed jaw, the SO-101's gripper; read only by the kernel's K2 exemption); urdf_curve (any joint — a gripper's stroke, or a servo whose calibrated zero is not the URDF's, such as a wrist roll a quarter turn off: the piecewise-linear ((value, urdf value), …) calibration from its reported value to the URDF value its link moves by, check_urdf_curve-valid, None = identity — the Robotiq's pi/4 (1 - f), the Metal's finger stroke; every consumer that poses the link applies it: the kernel and the self-filter via collision_curve_*, /tf via urdf_joint_map, the Isaac sidecar, openral_core.kinematics; #533) with urdf_value(value) / urdf_slope(value). (L1557)
  • urdf_value(value) -> float (L1692) — The URDF value its link is posed at: curve_value(urdf_curve, value), or value without a curve.
  • urdf_slope(value) -> float (L1711) — d urdf_value / d value (curve_slope; 1 without a curve). fields: name, joint_type, parent_link, child_link, axis_xyz, origin_xyz, origin_rpy, position_limits, velocity_limit, effort_limit, has_position_sensor, has_velocity_sensor, has_torque_sensor, backlash_estimate, actuator_kind, sim_joint_name, role, closure_calibration
  • class EndEffectorSpec(BaseModel) — End-effector spec; actuated=False marks a passive tool (inert flange, kinematic-only mount) so the safety kernel rejects chunks addressed at it. command_convention / command_range declare the GRIPPER_* value this end effector's HAL consumes (range defaults from a normalized convention, required for a physical one). Optional parent_link names the link it hangs from (the MuJoCo twin routes a lone GRIPPER_POSITION by end-effector name to the gripper joint on it). (L1830)
  • resolved_command_range() -> tuple[float, float] | None — The safety kernel's bound for this end effector, or None when undeclared. (L1923)
  • GRIPPER_CONVENTION_RANGES: dict[str, tuple[float, float]] — The value range of each normalized GripperConvention; physical conventions have none. (L1822) fields: name, kind, hand, n_dof, max_grip_force_n, max_payload_kg, workspace_radius_m, tactile_sensors, actuated
  • class ComputeSpec(BaseModel) — Compute profile for one deployment tier (edge/local/cloud), populated by openral_detect._enrich_compute from GPU probe results and attached to RobotDescription.compute_edge/local/cloud. (L1959) fields: compute_tops, system_memory_gb, num_gpus, gpu_vram_gb, cuda_compute_capability, cuda_toolkit_version, tensorrt_version, gpu_supported_runtimes, gpu_supported_dtypes, nvmm_available, endpoint, network_latency_ms
  • supports_cumotion() -> bool — True when the host meets the cuMotion (Isaac ROS) GPU floor on compute capability, CUDA toolkit version, and VRAM; used by the MoveIt planner gate to pick cuMotion vs OMPL. (L2026)
  • prop _CUMOTION_MIN_COMPUTE_CAPABILITY, _CUMOTION_MIN_CUDA_MAJOR, _CUMOTION_MIN_VRAM_GIB — The cuMotion GPU floor supports_cumotion() checks against. (L1941–1943)
  • ReasonerDialect = Literal["anthropic", "openai"] — Wire dialect a ReasonerModel / named endpoint speaks; only needed on OPENRAL_REASONER_DIALECT for a bare, unclassified URL. (L16403)
  • ReasonerHosting = Literal["cloud", "managed_local", "byo_local"] — Where a ReasonerModel runs; drives ReasonerModel.is_local. (L16406)
  • class ReasonerModel(BaseModel) — Frozen curated S2 model registry entry. REASONER_MODELS is the curated map; membership with measured=True means the model passed the robotics tool-calling contract. measured=False marks the *-openrouter / *-cloud entries offered on declared tools + vision (the client logs reasoner.model.unmeasured, doctor warns); timeout_s is a slow model's own per-call timeout (OPENRAL_REASONER_TIMEOUT_S still wins). (L16416)
  • is_local(self) -> bool [@property] — True for managed_local / byo_local hosting (needs local compute); False for cloud. (L16513)
  • REASONER_MANAGED_ENDPOINT: str = "managed" — Sentinel for ReasonerModel.default_endpoint meaning OpenRAL spawns and manages the local server, resolved to the model's managed loopback endpoint at client-build time. (L16413)
  • OPENROUTER_BASE_URL: str — OpenRouter's OpenAI-compatible endpoint URL; default gateway for the curated GPT-5.x entries and the openrouter preset, and the endpoint that makes a curated model run on OPENROUTER_API_KEY (reasoner_model_options). (L16530)
  • _CLAUDE5_MAX_TOKENS: int = 16000 — Completion cap of the Claude 5 entries: they think by default and thinking tokens count against max_tokens. (L16536)
  • reasoner_model_options() -> list[ReasonerModelOption] (L16890) — The curated models a settings form offers, in registry order: keys lists every key setting that serves a model, any one enough, in preference order — [ANTHROPIC_API_KEY] (Anthropic dialect), [OPENAI_API_KEY, OPENROUTER_API_KEY] (an openai/ model on OpenRouter: OpenAI's own API wins when both are set), [OPENROUTER_API_KEY] (any other model on OpenRouter), [OLLAMA_API_KEY] (an Ollama Cloud *-cloud model) or [] (no auth, runs on the robot); needs is keys[0] (or None) for consumers that predate keys; other providers are left out. Shared by openral.com's model drop-down (tools/export_reasoner_models.py).
  • class ReasonerModelOption(BaseModel) (L16840) — Frozen, extra="forbid". One drop-down entry: id, label, needs: str | None, keys: list[str]; serialized with model_dump(). The label drops "(Anthropic)" / "(OpenAI)" / "(via OpenRouter)" and keeps "(OpenRouter)" / "(Ollama Cloud)" / "(Ollama, on the robot)", since a family is offered on several.
  • ANTHROPIC_KEY_SETTING: str (L16834) — "ANTHROPIC_API_KEY": the account-setting name of the Anthropic key.
  • OPENAI_KEY_SETTING: str (L16835) — "OPENAI_API_KEY": the account-setting name of the OpenAI key.
  • OPENROUTER_KEY_SETTING: str (L16836) — "OPENROUTER_API_KEY": the account-setting name of the OpenRouter key.
  • OLLAMA_KEY_SETTING: str (L16837) — "OLLAMA_API_KEY": the account-setting name of the Ollama Cloud (ollama.com) key; the robot's own Ollama needs none.
  • OLLAMA_CLOUD_BASE_URL: str (L16525) — "https://ollama.com/v1": Ollama Cloud's OpenAI-compatible API; default endpoint of the *-cloud registry entries (_OLLAMA_CLOUD_MODELS, offered on declared tools + vision capability, not yet measured) and the ollama_cloud preset.
  • REASONER_MODELS: dict[str, ReasonerModel] — The curated model registry keyed by id (claude-opus-4-8, claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5, gpt-5.5, gpt-5.6, cosmos3-edge); adding a model means adding one entry here after it clears the tool-calling bar. (L16791)
  • class ReasonerEndpointPreset(NamedTuple) — Everything a named OPENRAL_REASONER_ENDPOINT implies beyond its URL (dialect, auth, cold-start timeout, tool_choice, plus vendor and wire_api — the openai preset takes bare model ids and speaks the Responses API). (L16953)
  • served_model_id(self, model_id) -> str — model_id as this endpoint expects it: strips a <vendor>/ OpenRouter prefix on that vendor's own endpoint (openai/gpt-5.5 → gpt-5.5). (L16988)
  • REASONER_ENDPOINT_PRESETS: dict[str, ReasonerEndpointPreset] — Presets for the accepted OPENRAL_REASONER_ENDPOINT names. (L17010)
  • REASONER_TOOL_CHOICES: tuple[str, ...] — ("auto", "required"), the values OPENRAL_REASONER_TOOL_CHOICE accepts. (L17041)
  • parse_reasoner_tool_choice(raw) -> str | None — Validate (case-insensitively) an OPENRAL_REASONER_TOOL_CHOICE value, None when unset; ROSConfigError otherwise. Shared by the reasoner client factory and openral doctor. (L17046)
  • prop ANTHROPIC_BASE_URL, OPENROUTER_BASE_URL, OLLAMA_BASE_URL, OLLAMA_CLOUD_BASE_URL, VLLM_BASE_URL, GEMINI_BASE_URL, XAI_BASE_URL, DEEPSEEK_BASE_URL, HUGGINGFACE_BASE_URL — Base URLs backing the named OPENRAL_REASONER_ENDPOINT presets. (L16520–16950)
  • prop ANTHROPIC_BASE_URL, OPENAI_BASE_URL, OPENROUTER_BASE_URL, OLLAMA_BASE_URL, OLLAMA_CLOUD_BASE_URL, VLLM_BASE_URL, GEMINI_BASE_URL, XAI_BASE_URL, DEEPSEEK_BASE_URL, HUGGINGFACE_BASE_URL — Base URLs backing the named OPENRAL_REASONER_ENDPOINT presets. (L16520–16950)
  • prop ANTHROPIC_BASE_URL, OPENROUTER_BASE_URL, OLLAMA_BASE_URL, OLLAMA_CLOUD_BASE_URL, VLLM_BASE_URL, GEMINI_BASE_URL, XAI_BASE_URL, DEEPSEEK_BASE_URL, HUGGINGFACE_BASE_URL — Base URLs backing the named OPENRAL_REASONER_ENDPOINT presets. (L16520–16950)
  • prop ANTHROPIC_BASE_URL, OPENAI_BASE_URL, OPENROUTER_BASE_URL, OLLAMA_BASE_URL, OLLAMA_CLOUD_BASE_URL, VLLM_BASE_URL, GEMINI_BASE_URL, XAI_BASE_URL, DEEPSEEK_BASE_URL, HUGGINGFACE_BASE_URL — Base URLs backing the named OPENRAL_REASONER_ENDPOINT presets. (L16520–16950)
  • prop ANTHROPIC_BASE_URL, OPENROUTER_BASE_URL, OLLAMA_BASE_URL, OLLAMA_CLOUD_BASE_URL, VLLM_BASE_URL, GEMINI_BASE_URL, XAI_BASE_URL, DEEPSEEK_BASE_URL, HUGGINGFACE_BASE_URL — Base URLs backing the named OPENRAL_REASONER_ENDPOINT presets. (L16520–16950)
  • prop ANTHROPIC_BASE_URL, OPENAI_BASE_URL, OPENROUTER_BASE_URL, OLLAMA_BASE_URL, OLLAMA_CLOUD_BASE_URL, VLLM_BASE_URL, GEMINI_BASE_URL, XAI_BASE_URL, DEEPSEEK_BASE_URL, HUGGINGFACE_BASE_URL — Base URLs backing the named OPENRAL_REASONER_ENDPOINT presets. (L16520–16950)
  • class RobotCapabilities(BaseModel) — Physical capability flags for skill compatibility; has_vision_slam gates the camera-based SLAM backend for lidar-less robots, independent of has_lidar (lidar backend wins when both set). (L2052) fields: locomotion, can_lift_kg, has_dexterous_hands, has_tactile, has_force_control, has_vision, has_lidar, has_vision_slam, has_audio, bimanual, supported_control_modes, supported_vla_embodiments, embodiment_tags
  • class SafetyEnvelope(BaseModel) — Constraints handed to the C++ safety kernel (not every field is enforced yet — see the enforcement note below); self_collision_margin_m can go negative to tolerate a compact arm's known in-distribution grazing contact while gross folds still trip. Also carries the runner's starting-pose approach per joint type (starting_pose_max_joint_speed_rad_s / starting_pose_tolerance_rad for non-prismatic joints, starting_pose_max_joint_speed_m_s / starting_pose_tolerance_m for prismatic ones) and joint_state_staleness_limit_s, the one place a rig declares its joint-state freshness window (read by build_hal and deploy_e2e.launch.py). (L2100) fields: workspace_box_min_xyz, workspace_box_max_xyz, no_go_zones, max_ee_speed_m_s, max_ee_accel_m_s2, max_joint_speed_factor, max_force_n, max_torque_nm, deadman_required, e_stop_topic, e_stop_qos, contact_force_threshold_n, cycle_time_violation_threshold_ms, human_in_loop_required + per-mode bounds (max_cartesian_step_m/_rad, max_ee_angular_speed_rad_s, max_base_linear/angular_speed_rad_s) + self_collision_margin_m: float = 0.0 + max_external_joint_torque_nm: dict[str, float] = {} (#373: per-joint ceiling on the kernel observer's external-torque estimate; over it the kernel latches KIND_FORCE; a deploy scene / rSkill may add or lower a joint, never raise or drop one; needs RobotDescription.force_observer). Enforcement: the kernel checks joint position/velocity/torque (max_torque_nm), the workspace box (CARTESIAN_POSE only), max_ee_speed_m_s / max_ee_angular_speed_rad_s (CARTESIAN_TWIST), the per-mode bounds and self_collision_margin_m. contact_force_threshold_n caps the additive calibrated place-force refusal (not a general contact monitor). Declared, not enforced by the kernel: max_force_n (the enforced contact bound is per joint, max_external_joint_torque_nm, #373), max_ee_accel_m_s2, deadman_required (loaded, never consulted; the deploy launch runs the deadman watchdog unconditionally). Declared, not read by any runtime component: no_go_zones, e_stop_topic (the kernel uses /openral/estop), e_stop_qos, cycle_time_violation_threshold_ms, human_in_loop_required
  • class ObservationSpec(BaseModel) — VLA observation config. (L2359) fields: state_key, state_shape, state_representation, image_flip_180 (image_flip_180 deprecated, no effect on image processing — setting it emits a FutureWarning; use RSkillManifest.image_preprocessing.flip_180)
  • class ActionSpec(BaseModel) — VLA action config. (L2401) dim is optional (issue #303): a robot with no committed policy action contract declares only control_freq_hz, and the dataset recorder takes the width from the action itself. fields: dim, representation, control_freq_hz, chunk_size
  • class ActionSlot(BaseModel) — One contiguous slice of an rSkill's action vector, with per-mode field requirements enforced by a validator; discard=True drops a slice silently. (L8169) fields: range, control_mode, discard, ee, frame, joint_names, input_bounds
  • class ActionContract(BaseModel) — Per-rSkill action-vector contract; when slots is set, every index is covered by exactly one ActionSlot, else the legacy single-Action JOINT_POSITION path applies. Optional control_freq_hz is the rate the checkpoint was trained at; the skill runner refuses a goal whose tick rate differs (no resampler). (L8346) fields: dim, representation, slots, cartesian_delta_scale, joint_names, gripper_scale, joint_units, joint_calibration — joint_names (policy joint order in robot joint names; forbidden with slots, must match dim, unique), gripper_scale (policy gripper units per HAL [0, 1] unit, > 0) and joint_calibration (robot joint name → JointCalibration, policy = scale * robot + offset, overriding joint_units / gripper_scale for the joints it names; non-empty, forbidden with slots and with gripper_scale != 1.0) are consumed by openral_rskill._policy_io.PolicyIOCodec on every dispatch path.
  • class JointCalibration(BaseModel) — Frozen per-joint affine from robot units (arm rad, normalized [0, 1] jaw) to a checkpoint's policy units, policy = scale * robot + offset (finite, non-zero scale; finite offset, default 0). A property of the training data (LeIsaac's SO-101 motor map), declared on ActionContract.joint_calibration. (L8315) fields: scale, offset
  • prop _JOINT_MODES, _CARTESIAN_MODES, _GRIPPER_MODES — The ControlMode partitions used by ActionSlot's and ControlModeSemantics's per-mode validators. (L8304–8310)
  • prop _EE_6D_WIDTH, _EE_3D_WIDTH — Cartesian slice widths canonical_slots_for_representation uses to size a representation-only ActionContract's slots. (L8542–8543)
  • class TaskSpaceFamily(str, Enum) — Coarse classification of a ControlMode for task-space views (DRAFT). (L8741)
  • _FAMILY_FOR_MODE: dict[ControlMode, TaskSpaceFamily] — Exhaustive mapping from every ControlMode to its TaskSpaceFamily, lockstep-tested. (L8761)
  • class TaskSpaceSegment(BaseModel) — One typed slice of an action vector, layer-neutral; the gripper is an explicit 1-D segment. (L8778) fields: family, control_mode, width (>0), target
  • class TaskSpaceMatch(BaseModel) — Result of task_space_compatible. (L8820) fields: ok, reasons
  • class TaskSpace(BaseModel) — Layer-neutral view of an action interface as ordered TaskSpaceSegments (DRAFT); derived via from_action_contract, never hand-authored, so it cannot drift from the primitives. (L8835)
  • total_dim(self) -> int [@property] — Sum of segment widths — the flat action-vector dimensionality. (L8886)
  • control_modes(self) -> set[ControlMode] [@property] — The distinct ControlModes this space drives. (L8891)
  • from_action_contract(cls, action: ActionContract, robot: RobotDescription) -> TaskSpace [@classmethod] — Builds the task space an rSkill emits, expanding slots / representation. (L8896)
  • class SceneTaskSpace(BaseModel) — The control interface a scene-adapter family executes, declared once per family in SCENE_FAMILY_TASK_SPACE; runs_via_default_packers=False marks dedicated-controller adapters. (L9112)
  • prop _JOINT_MODES, _CARTESIAN_MODES, _GRIPPER_MODES — The ControlMode partitions used by ActionSlot's and ControlModeSemantics's per-mode validators. (L8304–8310)
  • prop _EE_6D_WIDTH, _EE_3D_WIDTH — Cartesian slice widths canonical_slots_for_representation uses to size a representation-only ActionContract's slots. (L8542–8543) fields: modes (frozenset[ControlMode]), action_dim (int|None), runs_via_default_packers (bool)
  • class SphereShape(BaseModel) — Sphere collision primitive; discriminator shape="sphere", field radius_m (>0). (L2807)
  • class CapsuleShape(BaseModel) — Capsule collision primitive (segment along local +Z swept by a radius); discriminator shape="capsule", fields radius_m (>0), length_m (>=0). (L2825)
  • class BoxShape(BaseModel) — Oriented box (OBB) collision primitive for blocky links; fits a near-cubic link far tighter than a capsule, whose round section over-reports clearance past flat faces. (L2854)
  • CollisionShape: TypeAlias = Annotated[CapsuleShape | SphereShape | BoxShape, Field(discriminator="shape")] — Discriminated union of convex collision primitives; mesh shapes excluded so the allocation-free kernel checks only analytic convex volumes. The shape discriminator is enforced, not just documented, so a bad tag fails clearly rather than silently resolving to the wrong member. Never dump with exclude_defaults=True — it drops the tag field. (L2885)
  • DOP_AXES: tuple[tuple[float, float, float], ...] — The 26-DOP's 13 unit axis directions, in the owning box's own local frame; mirrors kDopAxis in the C++ safety kernel. Its first three entries are the box's own axes, which is load-bearing — checking those three proves containment for the whole polytope without enumerating a vertex. (L2907)
  • MAX_TIGHT_HULL_VERTICES: int — 320; ceiling on a stage-2 hull's vertex count, mirroring kMaxTightHullVertices — a cost bound, not a safety one, since a link over the ceiling still runs the DOP-only stage 1. (L2936)
  • TIGHT_CONTAINMENT_EPSILON_M: float — 1e-9 m of floating-point slack when checking a hull vertex against its own DOP slab; mirrors kTightContainmentEpsilonM. The box-containment check on LinkCollisionGeometry takes no slack at all. (L2946)
  • class TightCollisionGeometry(BaseModel) — Tight convex geometry refining one link's BoxShape, used by the safety kernel for the arm-link-vs-world-voxel check only; drives a staged narrow phase (26-DOP bound, then GJK on the exact hull). Generated by tools/generate_tight_geometry.py, not hand-authored. (L2956)
  • check_tight_geometry_fits_box(shape, tight, owner) -> None — Raises unless tight refines a BoxShape and stays inside its half_extents_m — the containment check that must not be deferred to the kernel, since a representation reaching outside the box would make the kernel skip cells it should visit. Shared by LinkCollisionGeometry and AttachedCollisionPrimitive so neither is held to a weaker standard. (L3060)
  • class LinkCollisionGeometry(BaseModel) — One convex collision volume attached to a robot link; hand-authored or emitted by the offline lowering tool from MJCF/URDF. (L3115) fields: link_name, shape: CollisionShape, origin_xyz_rpy, tight_geometry: TightCollisionGeometry | None
  • _tight_geometry_fits_inside_the_box(self) -> Self [@model_validator(mode="after")] — Rejects tight_geometry on any non-BoxShape, or a DOP whose slabs reach outside half_extents_m; no slack is allowed here. (L3162)
  • class CollisionGeometryImport(BaseModel) — {robot, link_map}: collision volumes reused from robots/<robot>/robot.yaml, every entry of a link_map key renamed to its value. RobotDescription.collision_geometry_imports lists them; RobotDescription.from_yaml resolves them into collision_geometry (_resolve_collision_geometry_imports), refusing a link both authored and imported; a manifest validated without resolution is refused (no imported link may lack geometry). OpenAMRobot v2 imports the OpenArm arms. (L3171)
  • class FixedAttachment(BaseModel) — One rigid, zero-DoF parent→child link of the kinematic tree, completing the connectivity joints alone cannot express (a bolted-on hand or bimanual pedestal would otherwise present as disconnected trees). Origins must come from the real URDF/MJCF, never estimated. Optional sweep_xyz declares an unreported straight travel of the child in its own frame (the Galaxea A1's fingers): the kernel poses the link at origin, the URDF lowering fits its geometry over the whole travel, and the MJCF lowering refuses it. (L3240) fields: name, parent_link, child_link, origin_xyz, origin_rpy
  • class MimicJoint(BaseModel) — A link posed by another joint's value, q = multiplier * u[mimics] + offset, u the leader's URDF value (JointSpec.urdf_value: through its urdf_curve, if any) (the URDF <mimic> / MuJoCo joint equality): the OpenArm's follower finger, the third edge kind of the collision tree beside joints and fixed_attachments — moving, but no command channel, invisible to every joints consumer. The kernel poses child_link rigidly at the mimicked value (JointKind::kMimicRevolute / kMimicPrismatic); docs/reference/finger-mimic-geometry.md. (L3304) fields: name, parent_link, child_link, mimics, multiplier, offset, joint_type: JointType, axis_xyz, origin_xyz, origin_rpy, sim_joint_name
  • _check_relation(self) -> Self [@model_validator(mode="after")] — Refuses a self-attachment, a non-finite relation, a zero multiplier (a fixed link wearing a moving kind) and joint_type: fixed. (L3376)
  • value_at(leader_value) -> float — This joint's value at the mimicked joint's leader_value. (L3398)
  • class LinkInertial(BaseModel) — One kinematic-tree link's rigid-body inertial in the manifest's own link frame, for the kernel's external-torque observer (#373); lowered from the MJCF by openral_safety.dynamics_lowering, never hand-written. (L3407) fields: link, mass_kg, com_xyz_m, inertia_kgm2 ((ixx, iyy, izz, ixy, ixz, iyz) about the COM)
  • class JointFriction(BaseModel) — One joint's rotor + friction model for the observer: offset + coulomb·tanh(q̇/v_c) + viscous·q̇ is subtracted from the measured effort, armature added to M's diagonal. (L3451) fields: joint, armature_kgm2, viscous_nm_s_per_rad, coulomb_nm, offset_nm
  • class ForceObserverSpec(BaseModel) — The kernel observer's dynamics model (RobotDescription.force_observer): enforces nothing alone; SafetyEnvelope.max_external_joint_torque_nm sets the per-joint ceilings. Unique link / joint names. (L3477) fields: source, gravity_xyz_m_s2, gain_per_s, coulomb_velocity_rad_s, limit_margin_rad, links: list[LinkInertial], joints: list[JointFriction]
  • class RobotDescription(BaseModel) — Top-level robot manifest, one per robot; assets is the single URDF/MJCF/SRDF reference block, compute_edge/local/cloud hold per-tier compute profiles, collision_geometry/allowed_collision_pairs carry the safety-kernel-facing self-collision data, and fixed_attachments completes the kinematic tree with rigid zero-DoF mounts that joints alone can't express. home_pose (joint name -> target, optional) is a pose that keeps the arms clear of the robot's cameras and footprint: the runner parks the arms there before a drive and on start_from_home; _validate_home_pose refuses base joints, unknown joints, out-of-range targets and a pose naming only grippers. (L3638) fields: name, embodiment_kind, assets, base_frame, odom_frame, map_frame, joints, end_effectors, sensors, sensor_bundles, capabilities, safety, ros2_namespace, middleware, onboard_compute, sdk_kind, hal, observation_spec, action_spec, sim, scene_defaults, base_joints, footprint_radius, base_kinematics, collision_geometry, allowed_collision_pairs, fixed_attachments, mimic_joints, footprint_polygon, compute_edge, compute_local, compute_cloud, schema_version
  • scene_defaults: SceneDefaults | None = None — Optional scene-level defaults (top-camera POV, etc.) consumed by the MJCF composers as the fallback when an environment does not pin its own values.
  • validate_for_e2e_pipeline(self) -> None — Asserts every actuated joint has position_limits/velocity_limit/effort_limit set, so a misshapen manifest fails at launch-parse time rather than mid-actuation. (L4426)
  • lidar_sensor(self) -> SensorSpec | None [@property] — First declared lidar_2d sensor, or None; single source of truth for the synthetic /scan envelope. (L4289)
  • nav2_footprint_param(self) -> str — This base's Nav2 footprint parameter string from footprint_polygon; "[]" when undeclared so a radius-only robot keeps its own circular footprint instead of inheriting the shared param file's shape. (L4305)
  • nav2_param_overrides(self) -> dict[str, str] — Nav2 param substitutions derived from footprint_radius, footprint_polygon (its circumscribed radius sets inflation_radius) and base_kinematics, so one shared base param file serves any mobile base; {} for fixed-base arms. (L4331)
  • control_rate_hz(self) -> float | None [@property] (L3820) — action_spec.control_freq_hz when positive, else None. The one place a robot's rate lives: the skill runner ticks at it, the HAL node publishes proprio at it, the real ros2_control HAL derives every trajectory deadline from it, and the recorder stamps it as fps (issue #303).
  • REAL_HARDWARE_SAFETY_FIELDS [ClassVar] — the SafetyEnvelope fields the kernel's envelope loader reads and that carry a schema default (max_ee_speed_m_s, max_ee_accel_m_s2, max_joint_speed_factor, max_force_n, max_torque_nm, contact_force_threshold_n, deadman_required, self_collision_margin_m).
  • UNENFORCED_REAL_HARDWARE_SAFETY_FIELDS [ClassVar] — the subset of REAL_HARDWARE_SAFETY_FIELDS the kernel loads but no check consults yet (max_ee_accel_m_s2, max_force_n (#373 enforces per-joint max_external_joint_torque_nm instead), deadman_required). Still required on a real manifest; the validator's error names them as declared-not-enforced.
  • _validate_real_hardware_contract(self) -> RobotDescription [model_validator] (L3859) — a manifest with hal.real set must declare control_rate_hz, every REAL_HARDWARE_SAFETY_FIELDS entry explicitly in safety (an explicit value equal to the default is fine; inheriting it silently is not), safety.joint_state_staleness_limit_s, and the starting-pose approach for each joint type it has — safety.starting_pose_max_joint_speed_rad_s / starting_pose_tolerance_rad with a non-prismatic joint, ..._m_s / ..._m with a prismatic one (the runner's approach has no default speed; deriving one from rated velocity_limit put the OpenArm at 2 rad/s, and a rad tolerance on a 0.041 m gripper always "arrived"). On any manifest, declaring both safety.joint_state_staleness_limit_s and hal.parameters.defaults.staleness_limit_s is refused. Every gap is reported in one error, at load time — before deploy validate, build_hal or any node. Sim-only manifests keep the schema defaults.
  • _validate_force_observer(self) -> RobotDescription [model_validator] (L4198) — every safety.max_external_joint_torque_nm key is a joint and has a force_observer to enforce it; force_observer needs collision_geometry and names only tree links / joints (#373).
  • _validate_fixed_attachments(self) -> RobotDescription [model_validator] (L3977) — each link is defined by exactly one edge (a joint, a fixed_attachments row or a mimic_joints row), no edge attaches a link to itself, and every mimic_joints.mimics names a joints entry.
  • grasp_contact_links(self) -> tuple[str, ...] (L4009) — the links a grasp may touch: every role: gripper joint's child_link, then the child_link of every mimic_joints row following one of those joints (the other jaw of the same gripper), then every fixed_attachments child rigid on one of those mimic fingers, transitively (the Robotiq's *_bar outer fingers; user-approved 2026-10-16, Safety-WG review + hazard-log row owed); the launch passes it as the kernel's grasp_contact_links allowlist (ADR-0115).
  • hand_links(self, wrist_links=1) -> tuple[str, ...] (L4078) — grasp_contact_links() plus, once per hand, the link the hand's gripper hangs off (a chained finger climbed to its arm, as gripper_hands), then the wrist that link hangs off (never a root link; a carrier welded on through fixed_attachments hangs off the first actuated link of that rigid chain — DROID / franka_panda: panda_link7); OpenArm: both finger pairs, both followers, both link7, both link6 (#349 r23: a hand at a tote rim brings the wrist within one 15 mm voxel of it). Each carrier's wrist comes from wrist_links_of(carrier, wrist_links) -> tuple[str, ...] (the carrier's joint parent, or the first actuated link of a welded-on rigid chain, then up the joint chain; never a root link; also the tracker's HandModel hand). wrist_links=2 climbs one more actuated link (DROID: panda_link6; OpenArm: both link5), anything outside 1–2 raises ValueError. The launch passes it as the kernel's workspace_contact_links (issue #349), with DeployRuntime.workspace_contact_wrist_links.
  • wrist_links_of(self, carrier, wrist_links=1) -> tuple[str, ...] (L4130) — The wrist_links (1–2) actuated links a gripper carrier hangs off, nearest first: its joint parent, or for a carrier welded on through fixed_attachments (DROID's Robotiq base → panda_link8 → panda_link7) the first actuated link of that rigid chain, then up the joint chain; never a root link; ValueError outside 1–2. hand_links and the tracker's HandModel hand both read it, so the kernel and the tracker share one wrist (Isaac R87).
  • from_yaml(cls, path: str) -> RobotDescription [@classmethod] — Load and validate a RobotDescription YAML manifest from disk. (L4405)
  • grasp_contact_links(self, gripper_joints=None) -> tuple[str, ...] (L4009) — the links a grasp may touch: every role: gripper joint's child_link, then the child_link of every mimic_joints row following one of those joints (the other jaw of the same gripper), then every fixed_attachments child rigid on one of those mimic fingers, transitively (the Robotiq's *_bar outer fingers; user-approved 2026-10-16, Safety-WG review + hazard-log row owed); the launch passes it as the kernel's grasp_contact_links allowlist (ADR-0115). gripper_joints restricts it to those gripper joints (one hand: the attachment producers' touch links, the release window's exempt links).
  • fixed_jaw_links(self, gripper_joints=None) -> tuple[str, ...] (L4051) — the role: gripper joints' fixed_jaw_links not already in grasp_contact_links; the launch passes them as the kernel's tracked_grasp_extra_contact_links when K2 is on, i.e. only with an exemption provider (issue #418, OT-6 amendment; ADR-0121). SO-101: ('gripper',).
  • _refuse_old_schema_version(cls, data: object) -> object [model_validator(mode="before")] (L3838) — refuses any mapping whose schema_version is not "0.2" with a ROSConfigError that says how to update it; there is no migrator.
  • def extract_base_sim_joint_names(description: RobotDescription) -> tuple[str, str, str] | None — Returns (forward, side, yaw) MJCF joint names for any mobile-base description declaring both base_joints and sim_joint_name. (L4471)
  • const NAV2_INFLATION_CLEARANCE_M: float = 0.05 — Costmap inflation clearance added to the circumscribed footprint radius for nav2_param_overrides. (L297)
  • class GripperReadMode(str, Enum) — How MujocoArmHAL reports the gripper qpos. Values: SUM_OVER_SCALE (Franka parallel — normalised to [0,1]), AFFINE_LOW_HIGH (SO-100 revolute Jaw — normalised to [0,1]), PASSTHROUGH (Aloha prismatic / OpenArm revolute — raw qpos in MJCF units). (L2425)
  • class GripperWriteMode(str, Enum) — How MujocoArmHAL maps an Action's gripper value to ctrl. Values: NORMALISED ([0,1] → ctrl_range), PASSTHROUGH (raw → ctrl; MuJoCo clips). (L2447)
  • class SimGripperDescription(BaseModel) — Gripper wiring inside a MuJoCo MJCF. Exactly one of joint (a manifest joint, commanded in JOINT_POSITION rows) and end_effector (an end effector with no manifest joint, commanded by GRIPPER_POSITION and reported in health; needs actuator_index + write_mode: normalised), validated by _one_target. (L2463) fields: joint, ctrl_range, qpos_addrs, qpos_scale, read_mode, write_mode, actuator_index, mirror_actuator_index
  • class UrdfAsset(BaseModel) — A URDF asset reference plus its robot_state_publisher wiring. (L2565) fields: ref: str (validated against the resolve_asset scheme grammar), root_frame: str | None (URDF root link when it differs from base_frame), base_to_root_xyz_rpy: tuple[float×6] | None (static base_frame→root_frame transform [x,y,z,roll,pitch,yaw], metres+radians)
  • class AssetRefs(BaseModel) — Unified RobotDescription.assets block: one URDF/MJCF/SRDF reference set replacing the former scattered asset fields. (L2602)
  • prop _ASSET_SCHEMES, _ROS2_DYNAMIC — Manifest-side mirror of openral_core.assets's scheme grammar, kept in lock-step with the resolver. (L2540–2553) fields: urdf: UrdfAsset | None, mjcf: str | None, srdf: str | None (the last two are bare refs, validated against the same scheme grammar; all default None)
  • class SimDescription(BaseModel) — Optional RobotDescription.sim block holding MuJoCo joint↔qpos/qvel/actuator wiring for MujocoArmHAL.from_description. (L2633) fields: floating_base, joint_qpos_addr, joint_qvel_addr, actuator_index, grippers, settle_steps_default, keyframe_index, seed_ctrl_from_qpos
  • class HalEntrypoints(BaseModel) — RobotDescription.hal block: the robot's sim + real-hardware HAL import strings, resolved by openral_hal.build_hal, plus optional real_bringup: str | None ("<ros_pkg>:<file>.launch.py") — the vendor ros2_control bringup deploy run includes; None falls back to the HAL package's launch/real_bringup.launch.py convention. sim / real are validated by check_code_ref (openral_* modules only). (L3582) fields: sim: str | None (null → derive MujocoArmHAL.from_description when a sim: block exists), real: str | None (null → simulation-only robot), parameters: HalParameters (per-robot HAL construction defaults)
  • class HalParameters(BaseModel) — RobotDescription.hal.parameters block: per-robot HAL construction defaults merged into the constructor by openral_hal.build_hal, so a parameterised robot needs no bespoke lifecycle subclass. (L3524) fields: defaults: dict[str, object]
  • class TopCameraDefaults(BaseModel) — Default placement for the scene-level "top"/"base" camera consumed by sim backends that render an overview camera. (L2695) fields: pos: tuple[float, float, float], target: tuple[float, float, float], fovy: float (gt=0, lt=180)
  • A backend YAML override still wins — this submodel is only the default fed to the composer.
  • class SceneDefaults(BaseModel) — Per-robot scene rendering defaults consulted when the scene YAML does not override them. (L2772) fields: top_camera: TopCameraDefaults | None, composition: SceneComposition | None
  • class SceneComposition(BaseModel) — Declarative MJCF scene composition; composer: "module:fn" returns (xml, meshdir). composer is validated by check_code_ref (openral_* modules only). (L2725) fields: composer: str, params: dict[str, object]
  • First consumer is the openarm_tabletop_pnp MJCF composer; future scenes can extend this as more backend hardcodes are pulled out.

Pydantic models — runtime snapshots

  • class JointState(BaseModel) — Real-time joint state snapshot. (L4564) fields: name, position, velocity, effort, stamp_ns
  • class Pose6D(BaseModel) — 6D pose (position + xyzw quaternion). (L4584) fields: xyz, quat_xyzw, frame_id
  • class DetectedObject(BaseModel) — Object detection. existence is the object memory's belief (probability) that it is still there; None when no belief is kept. (L4598) fields: label, confidence, pose, bbox_3d, track_id
  • class AttachmentEvidenceKind(str, Enum) — Evidence source confirming an attachment or its support contact. The two sim kinds are not interchangeable: a simulator's contact list is not a proximity oracle, so sim_geom_distance (a distance probe) can see contact the contact list hides. map_support_proximity is proximity to a support plane the producer measured in the voxel map under the carried payload — never sensed contact, never a proven support. gripper_closure is a position-only gripper that stalled short of its close command with vision unable to confirm the shape (the conservative jaw box); grasp_target_region is the grasp-target leg's pre-grasp measured region reused as the payload at ATTACH. Issue #418: tracked_object (the tracker bound a TrackedObject meeting the pinch volume; kernel retires (object_id, epoch)) and pinch_fallback (untracked grasp: the pinch-volume box, never toward the palm, no identity clearing). gripper_force stays for force-sensing grippers and old records; no in-tree producer stamps it. (L4620)
  • class AttachedCollisionPrimitive(BaseModel) — One sphere/capsule/OBB plus pose_in_object, with an optional tight_geometry refining it for the kernel's payload-vs-world-voxel check; None is not a defect — sphere/box/capsule sim geoms lower exactly, only mesh geoms leave a gap. Produced by openral_hal._sim_attachment_evidence._tight_geometry_from_points. (L6017) geometry_source (fallback default / measured / grown; issue #418, hazard OT-10): where the primitive's geometry came from; the exemption provider's payload-own-cell rule (ADR-0121) reads only measured and grown, and an unknown wire code is fallback.
  • _tight_geometry_fits_inside_the_box(self) -> Self [@model_validator(mode="after")] — Delegates to check_tight_geometry_fits_box at the producer boundary; the kernel's ingest re-runs the same proof and drops what it can't verify.
  • from_idl(cls, msg, *, object_id) -> AttachedCollisionPrimitive [@classmethod] — Decode one duck-typed IDL message without importing ROS; raises ValueError on an unknown shape_type. (L6079)
  • fill_idl(self, msg) -> None — Populate a duck-typed OpenRAL ROS IDL message without importing ROS. (L6120)
  • fill_idl(self, msg) -> None — Encode to a duck-typed IDL message without importing ROS; raises ROSConfigError for a shape it cannot represent, rather than publishing a default-tagged message with no dimensions. (L6120)
  • class PlaceRegion(BaseModel) — The producer-measured bounded region of a declared place target; inside it, the payload's world-collision margin is reduced so it can reach its earned support contact. Oriented, base-frame only, and producer-specific — no allowance without a measurement (on real hardware the default-off place-target leg measures the slab under the carried payload), and a refusal means no allowance, never a dropped message. Also carries a GraspDeclaration's measured region, under that declaration's tighter caps and with geometry empty. (L4677)
  • volume_m3(self) -> float — Volume of the region box in cubic metres. (L4806)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed OpenRAL ROS IDL message without importing ROS. (L4812)
  • fill_idl(self, msg, *, primitive_factory=None) -> None — Populate a duck-typed OpenRAL ROS IDL message without importing ROS. (L4837)
  • class ObjectRole(StrEnum) — Issue #418: what a prompt-named object is to the task: target | destination | context (neighbours, supports). (L4883)
  • class ObjectQueryStatus(StrEnum) — Issue #418 Addendum G: status of one standing ObjectQuery in the tracker, separate from TrackStatus: unresolved | resolving | resolved | exhausted (search budget spent, terminal for this goal, emits typed evidence to bounded reasoner recovery). (L4894)
  • class ObjectQuery(BaseModel) — Issue #418: a class a prompt names, never geometry the kernel uses: label, count: "one" | "all" (one still tracks every match), role, hand (gripper joint hint), seed: PlaceRegion | None (search hint, geometry empty), min_instances (≥ 1; exactly 1 for one). A standing query in the Layer-2 tracker for its goal's lifetime. synonyms: tuple[str, ...] = () (additive): other names for the class, sent with label to an open-vocabulary locator as one comma-separated class list (the tracker's TrackerRequest.prompt); IDL string[] synonyms. (L4908)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed openral_msgs/ObjectQuery; seed only when seed_valid. (L4964)
  • fill_idl(self, msg) -> None — Populate a duck-typed openral_msgs/ObjectQuery. (L4976)
  • class StaticBox(BaseModel) (L13306) — One declared static fixture as an oriented box in the robot's base_frame: kind="box", source, xyz, quat_xyzw (unit within UNIT_QUAT_TOL = 0.1), half_extents (≥ 0); all finite. (#349)
  • class StaticMesh(BaseModel) (L13340) — One declared static fixture as a triangle mesh in base_frame: kind="mesh", source, file (an .npz of vertices (N,3) m and triangles (M,3), relative to the listing YAML), optional triangles count. (#349)
  • class StaticGeometry(BaseModel) (L13359) — A cell's declared static geometry, static_geometry: list[StaticBox | StaticMesh] (discriminated by kind); the file DeployRuntime.static_geometry_file names. Only ever ADDS occupancy to the kernel's world grid (docs/reference/manipulation-workspace-contact.md §3.1). (#349)
  • class USDLocalPose(BaseModel) — Bounded authored xyz metres + normalized xyzw quaternion in the named catalog/object frame; never read from a live USD xform. (L13387)
  • class USDObjectPrimitive(BaseModel) — An authored analytic shape plus required dimension_semantics: nominal | maximum; shape dimensions are capped at 2 m and semantics remain metadata. (L13407)
  • class USDDeclaredObject(BaseModel) — Typed external USD prim identity, optional object-local shape, label, and workspace references. (L13431)
  • class USDDeclaredWorkspace(BaseModel) — Typed external USD prim with a bounded box, role, location, and stage-frame pose. (L13458)
  • class CatalogMeasurementCalibration(BaseModel) — Explicit independently established attributed-point error bound, calibration reference, supported sensor IDs and freshness policy; no physical defaults. (L13480)
  • class USDObjectCatalog(BaseModel) — Version 1 record with required source revision, metre units, named stage frame, ≤512 objects and ≤64 workspaces; rejects duplicate names/paths, unresolved workspace refs, and extra fields. Metadata only. (L13516)
  • class USDObjectCatalogRef(BaseModel) — DeployScene.object_catalog: local USD path, prim path (/ selects root layer customLayerData), required expected_revision, and optional absolute reader_python executable path for a separately provisioned USD Python. This reader setting exists only in the scene YAML. (L13561)
  • class SurfaceFreeSpaceCalibration(BaseModel) — Explicit independently established sensor IDs, calibration reference, depth/relative-pose/pixel bounds and freshness limit for diagnostic owned-cell retirement; no defaults or world-map clearing permission. (L13606)
  • class ObjectSurfaceModelConfig(BaseModel) — Optional DeployRuntime.object_surface_model; explicitly required and capped surface-registration resource/convergence bounds. Needs object tracking; does not authorize safety behavior. (L13635)
  • class PlaceDeclaration(BaseModel) — Dispatch's typed statement that a place phase is active for a payload; region, when set, is the only thing that lifts the pick witness's mid-carry anti-scope, and is never inferred from motion or sim introspection; optional search_box is a hint naming the surface (geometry empty, relayed untouched). Drafted amendment: the real place-target producer attaches the surface it measured under the carried payload as the region of dispatch's goal-scope declaration (target_id="surface", the runner's place_approach_enabled); it never declares on its own. is_live fails toward dead (retracted, past timeout_s, or future-stamped), and its now_ns must read the same clock domain that produced stamp_ns — never wall-clock time. Issue #418: destination_query: ObjectQuery | None (role DESTINATION) names the destination class the tracker grounds; arms nothing. invocation_id is the 32-hex ExecuteRskill action goal UUID, retained through runner restamping for exact delayed-failure correlation. (L4989)
  • is_live(self, *, now_ns) -> bool — Same rule and clock-domain contract as PlaceDeclaration.is_live; retracted, expired and future-stamped are dead. (L5123)
  • is_live(self, *, now_ns) -> bool — Whether this declaration is still in force at now_ns; fails toward dead. See the class docstring for the clock-domain contract on now_ns. (L5123)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed OpenRAL ROS IDL message without importing ROS. (L5157)
  • fill_idl(self, msg, *, primitive_factory=None) -> None — Populate a duck-typed OpenRAL ROS IDL message without importing ROS. (L5186)
  • class PlaceZone(BaseModel) — A named place zone on fixed station furniture (a shelf slot) that no detector grounds: name / aliases (lower-case words joined by _), region: PlaceRegion (geometry empty) in the robot base frame or, "station mode", in its map_frame; name and aliases distinct within a zone; target_id → zone:<name> (TARGET_PREFIX). Declared in DeployScene.place_zones (resolve_launch_invocation → _check_place_zone_frames refuses a base-frame zone unless embodiment_kind is manipulator / bimanual, an alias repeated among base-frame zones, a map-frame zone when the deploy publishes no map (SLAM off, no platform navigation) or that is not yaw-only (geometry.is_gravity_aligned), an odom_frame zone (odometry drifts), and any other frame; region.pose must be in region.frame_id); the object tracker re-expresses a fixed-frame zone in the grid frame through tf2 at the grid's source_stamp (rebase_box; no tf2 or a tilted base → no region); a goal-scope place declaration naming it gets its box as the place region from the object tracker while a payload is held. Declared, not measured — an ADR-0097 exception; Safety-WG review / hazard-log row / ADR owed. (L5228)
  • (property) target_id -> str (L5329) — zone:<name>, the PlaceDeclaration.target_id naming this zone.
  • class NavGoal(BaseModel) (L5339) — A named navigation goal, a station of the cell a mobile robot drives to (ADR-0133): name / aliases (lower-case words joined by _), pose: Pose6D, planar (z = 0, a unit yaw-only quaternion) in the robot's map frame (RobotDescription.map_frame, checked by the deploy), optional description for the reasoner; node_id is nav_goal:<name>. Declared task knowledge that grants nothing. Listed in DeployScene.nav_goals (names/aliases unique, repeated_nav_goal_names); deploy sim/run forward them as nav_goals_json, refused without a mobile base, without a navigation stack, or outside the map frame; the reasoner seeds them as declared spatial-memory PLACE nodes.
  • (property) node_id -> str (L5394) — nav_goal:<name>, the spatial-memory PLACE node it is seeded as.
  • repeated_nav_goal_names(goals) -> list[str] (L5399) — Names or aliases used more than once across goals, sorted (DeployScene and the reasoner's decode refuse them).
  • place_zone_for_prompt(prompt, zones) -> PlaceZone | None — The one declared zone a prompt names: lower-cased, non-alphanumeric runs read as _, name or alias matched as whole words ("upper slot 2" → upper_slot_2); none or several → None (fail closed). Used by the rSkill runner's goal-scope place declaration. (L5410)
  • class GraspDeclaration(BaseModel) — Grasp-phase mirror of PlaceDeclaration (real pick-and-place design §2.1): dispatch names target_id + gripper contact_links (non-empty while active), the producer measures region (a PlaceRegion, geometry empty in v1) from the optional search_box (a PlaceRegion that only seeds perception — on the generic path the reasoner grounds it from a named GraspTargetRef; a direct-dispatch scene may also supply it; the runner passes it through; geometry must be empty), the kernel bounds it (consumer lands separately, default off). Caps MAX_TIMEOUT_S 120 s / MAX_HALF_EXTENT_M 0.20 m / MAX_VOLUME_M3 0.03 m³ are Safety-WG placeholders. Since #349: workspace_box (a scene-declarable manipulation workspace, like search_box, arms nothing) and workspace_region (the producer-confirmed workspace — the same box re-stamped with the confirming grid's source_stamp; producer-only, rejected from scenes and stripped by the runner), both capped by MAX_WORKSPACE_HALF_EXTENT_M 0.50 m / MAX_WORKSPACE_VOLUME_M3 0.25 m³ (Safety-WG placeholders) with geometry empty. is_live has the same clock-domain contract as the place one; from_idl / fill_idl mirror it. Issue #418: target_queries: tuple[ObjectQuery, ...] (≤ MAX_TARGET_QUERIES 8, role TARGET/CONTEXT only) names the classes the Layer-2 tracker grounds; they arm nothing. invocation_id carries the 32-hex ExecuteRskill action goal UUID across runner restamping. search_box is pending deprecation (a set box emits PendingDeprecationWarning; still the HAL grasp-target leg's input while object_tracking is off; removal owed after #418 phase 5 with a schema_version bump + migrator). (L5443) TIMEOUT_MARGIN_S = 10.0 (ClassVar): seconds a goal-built declaration outlives its goal's budget (the reasoner's DECLARATION_TIMEOUT_MARGIN_S, the runner's merge_grasp_declarations floor).
  • is_live(self, *, now_ns) -> bool — Same rule and clock-domain contract as PlaceDeclaration.is_live; retracted, expired and future-stamped are dead. (L5639)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed openral_msgs/GraspDeclaration without importing ROS; region only when region_valid, search_box only when search_box_valid, workspace_box / workspace_region only when their *_valid flag is set. (L5662)
  • fill_idl(self, msg, *, query_factory=None) -> None — Populate a duck-typed openral_msgs/GraspDeclaration; no primitive factory, a grasp region carries no geometry. query_factory builds one openral_msgs/ObjectQuery and is required (else ROSConfigError) when target_queries is non-empty. (L5699)
  • class ContactForceWitness(BaseModel) — Layer 2's bounded attestation of a measured contact force between a payload and its declared place target; the gate it feeds only ever adds a refusal, never licenses a contact or widens an allowance. magnitude_n is newtons only when magnitude_calibrated. Absence of a witness is not evidence of absent contact. (L5860)
  • fill_idl(self, msg) -> None — Populate a duck-typed OpenRAL ROS IDL message without importing ROS. (L5957)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed OpenRAL ROS IDL message without importing ROS. (L5938)
  • class SupportContactWitness(BaseModel) — World State's bounded attestation that a payload rests on a named support surface; geometry is in the attached object's own frame, and max_penetration_m is the physical depth (occupancy quantisation is accounted for separately). (L5747)
  • fill_idl(self, msg) -> None — Populate a duck-typed OpenRAL ROS IDL message without importing ROS. (L5845)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed OpenRAL ROS IDL message without importing ROS. (L5829)
  • class AttachedCollisionObject(BaseModel) — Collision-active payload rigidly attached to one robot link; support_contact=None (the default) means the safety kernel exempts no payload-vs-world contact. Issue #418: epoch (the tracked object's epoch, the kernel's retirement key with object_id) and geometry_revision (bound-geometry revision; the kernel unions revisions), both default 0. released_by_link (default None = held): set, the payload was let go by that link and is re-attached to a link FK never moves (refused when it equals attach_link); the kernel freezes it, never world-checks it, and exempts that link and touch_links only through its release window. (L6178)
  • fill_idl(self, msg, *, primitive_factory) -> None — Populate a duck-typed OpenRAL ROS IDL message without importing ROS. (L6334)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed OpenRAL ROS IDL message without importing ROS. (L6273)
  • class TrackStatus(StrEnum) — Issue #418: lifecycle of one TrackedObject: tentative | confirmed | occluded | split | bound | released | lost. (L6379)
  • class FitKind(StrEnum) — Issue #418: how a track's containing geometry was fitted: silhouette_cone | multi_view_cone | pinch_fallback. (L6395)
  • class TrackedObject(BaseModel) — Issue #418: one object the Layer-2 tracker grounds, tracks, binds and releases (Appendix F of the issue); provisional (last fit taken with the robot hiding more than the occluder band: exemption / identity-clearing geometry only, never a payload; cleared by a clear refit; IDL bool provisional): object_id (trk:<n>), epoch, label, role, declaration_key, status, box (gravity-aligned containing PlaceRegion in the grid frame, under the grasp-region caps 0.20 m / 0.03 m³, geometry empty), tight (≤ MAX_TIGHT_HULLS 4 AttachedCollisionPrimitive hulls posed in box.frame_id, each ≤ MAX_HULL_VERTICES 64 vertices), fit_kind, support_z / support_ref / floor_z (≥ support_z; the clearing floor), visible_cells / occupied_cells, source-clock last_fit_stamp_ns / last_confirmed_stamp_ns, and while BOUND the required bound_hand / attach_link / pose_in_link (frame = attach_link), identity_inferred. Python proposes; the kernel re-verifies and decides. (L6413)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed openral_msgs/TrackedObject; empty strings decode to None, pose_in_link only when pose_in_link_valid. (L6540)
  • fill_idl(self, msg, *, primitive_factory) -> None — Populate a duck-typed openral_msgs/TrackedObject. (L6575)
  • class TrackedObjectSet(BaseModel) — Issue #418: the tracker's whole set, one revision, on /openral/tracked_objects and WorldStateStamped.tracked_objects: schema_version: Literal["1"], frame_id (= the voxel grid frame; every box must be in it), stamp_ns, revision (strictly increasing; the kernel enforces), objects (≤ MAX_OBJECTS 32, unique object_id). (L6613)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed openral_msgs/TrackedObjectSet. (L6657)
  • fill_idl(self, msg, *, object_factory, primitive_factory) -> None — Populate a duck-typed openral_msgs/TrackedObjectSet. (L6667)
  • class TaskVerdict(StrEnum) — Issue #635: whether a policy run did what it was asked: unknown (its own verdict, never a success), succeeded, failed. (L6686)
  • class TaskOutcome(BaseModel) — Issue #635: the typed outcome of one ExecuteRskill run (ExecuteRskill.Result.task_outcome_json, the rskill.execute span, the reasoner's ## EXECUTION line): verdict, source (success_condition | scene | skill | checker | none; scene = deploy sim's own grade of the prompt, which wins over the tracker's), a bounded reason (MAX_REASON_CHARS = 240), and what it was read from (object_ids, resting of required, held_s of tracker evidence). It is the task's verdict; Result.success stays the execution's. (L6698)
  • class SuccessCondition(BaseModel) — Issue #635: what success means for a policy run, as a predicate over world state: at least min_count (default 1) objects labelled object_label rest, released, with their box centres inside region (the tracker's grid frame; geometry empty, a finite centre, a real rotation) for settle_s of tracker evidence (default 1 s, > 0), with no gap between two published sets longer than max_evidence_gap_s (default 2 s). Declared per goal (ExecuteRskill.Goal.success_condition, which wins) or per scene and prompt (DeployScene.success_conditions). end_on_success (default off) also ends the run once it has settled; off, the verdict only labels the result. Judged by openral_core.success.SuccessJudge. Advisory, never a kernel input. (L6740)
  • from_idl(cls, msg) -> Self [@classmethod] — Decode the duck-typed openral_msgs/SuccessCondition; a zero min_count / settle_s / max_evidence_gap_s (an unset wire field) reads as the schema default. (L6806)
  • fill_idl(self, msg) -> None — Populate a duck-typed openral_msgs/SuccessCondition. (L6823)
  • success_condition_for_prompt(prompt, conditions) -> SuccessCondition | None (L6833) — Issue #635: the condition a scene's {prompt: SuccessCondition} declares for a goal's prompt (case and whitespace ignored, nothing else), or None: a goal with another prompt is judged by none of them.

  • class OccupancyGridRef(BaseModel) — Reference to a 2D occupancy grid for mobile-base world-collision, mirroring nav_msgs/OccupancyGrid metadata. (L6862) fields: frame_id, resolution_m (>0), width (>=0), height (>=0), origin: Pose6D, data_topic

  • class WorldState(BaseModel) — Snapshot consumed by Reasoner and Skills; policy_state carries a checkpoint-specific proprio vector when joint state alone can't represent it, and place_declaration relays the resolved place phase (region included) to the safety kernel — None means no place phase, no witness, no allowance; grasp_declaration relays the grasp phase the same way. (L7010) fields: stamp_ns, joint_state, base_pose, base_twist, ee_poses, contact_forces, images, image_frames, point_clouds, tactile, detected_objects, battery_pct, diagnostics, attached_objects, attachment_revision, attachment_stamp_ns, occupancy_grid
  • occupancy_grid — Optional 2D occupancy-grid reference for mobile-base footprint checks; an absent or stale grid is treated as unavailable (fail-closed).
  • attached_objects / attachment_revision / attachment_stamp_ns — Collision-active payloads plus the producer-owned revision and freshness timestamp; republishing WorldState does not refresh stale attachment evidence.
  • image_frames — Optional in-process frame carrier for no-ROS deployments; None keeps the existing images topic-ref path unchanged.
  • tracked_objects — Issue #418: the Layer-2 tracker's TrackedObjectSet, relayed on the fast stream for the kernel and the voxel bridge; None = no tracker.

Persistent spatial memory — scene graph

Advisory, queryable Layer-2 world model the S2 Reasoner consults to recall objects/places/agents. Never a safety input — the kernel gates only on the geometric world. Poses anchored in the tf2 map frame.

  • class SpatialNodeKind(str, Enum) — OBJECT | PLACE | ROOM | AGENT. (L7083)
  • class SpatialRelationKind(str, Enum) — CONTAINS | AT_PLACE | TRAVERSABLE_TO | ON | NEAR. (L7099)
  • class SpatialNode(BaseModel) — A typed scene-graph node; superset of DetectedObject for kind=OBJECT. (L7147) aliases / description / declared mark a declared station (DeployScene.nav_goals): resolve_place matches its label and aliases exactly (never by substring) and refuses a reference that ties a declared node with another, and the reasoner lists it as declared. fields: node_id, kind, pose: Pose6D, label, confidence, bbox_3d, embedding_ref, is_container, occludes_contents, first_seen_ns, last_seen_ns, observation_count
  • class SpatialEdge(BaseModel) — Directed relation between two nodes. (L7231) fields: src, dst, kind: SpatialRelationKind
  • class SceneGraph(BaseModel) — Persistent scene-graph memory; validates unique node ids and that every edge references an existing node. schema_version "0.2" (added the SpatialNode station fields); a "0.1" file migrates on load (_migrate_scene_graph, version restamp only). (L7247) fields: schema_version="0.1", nodes: list[SpatialNode], edges: list[SpatialEdge]
  • class RecallObjectQuery(BaseModel) — Read-only object recall query. (L7299) fields: text, label, near: Pose6D | None, max_age_ns, limit
  • class ApproachViewpoint(BaseModel) — Camera-facing standoff goal. (L7331) fields: pose: Pose6D, standoff_m (>0), camera_frame_id
  • class RecallObjectMatch(BaseModel) — One ranked recall result. (L7348) fields: node_id, label, pose: Pose6D, score, last_seen_ns, approach: ApproachViewpoint | None, inside_container_id: str | None
  • class RecallObjectResult(BaseModel) — matches list; empty means unknown, so the caller raises ROSObjectNotInMemory. (L7376)
  • class ResolvePlaceQuery(BaseModel) — Resolve a place/room/agent reference. (L7391) fields: reference, kind: SpatialNodeKind | None
  • class ResolvePlaceResult(BaseModel) — Resolved node plus a traversable_to path. (L7406) fields: node_id, goal: Pose6D, path_node_ids: list[str]
  • class Action(BaseModel) — Action step or chunk produced by a Skill; tick_index preserves multi-slot atomicity across the safety wire, runner_session_id (uint64, 0 = unknown / session-less) names the runner process that numbered it so a HAL can tell a restart from a replay, and optional joint_names names which joints a sub-slot targets (needed since a zero-padded slot would otherwise read 0.0 as a legal target). (L7431) fields: control_mode, horizon, joint_targets, joint_velocities, joint_torques, cartesian_pose, cartesian_delta, cartesian_delta_scale, cartesian_twist, body_twist, foot_placements, gripper, dex_hand_joints, confidence, stamp_ns, ee_name, frame_id, safety_overrides
  • class QuantizationConfig(BaseModel) — Quantization recipe; extra["pro_dtype"] (validated as a QuantizationDtype) names the dtype to run at when OpenRAL Pro is installed. (L7592)
  • runtime_dtype(self, *, pro_installed: bool = False) -> QuantizationDtype — extra["pro_dtype"] under Pro, else dtype. (L7632) fields: dtype, backend, per_channel, calibration_dataset, extra
  • class DeviceInfo(BaseModel) — Host compute snapshot. (L7646) fields: device_str, gpu_memory_bytes, cuda_compute_capability, cpu_count, arch
  • class RSkillInfo(BaseModel) — Skill runtime state snapshot. (L7698)
  • class ObjectBeliefState(str, Enum) — PRESENT | UNCERTAIN | ABSENT: whether a remembered object is believed still where it was seen (issue #636); carried by SpatialNode.state and RecallObjectMatch.state. (L7116)
  • belief_state(existence: float | None) -> ObjectBeliefState — The state a DetectedObject.existence reads as: PRESENT above 0.5 (and for None, a producer that keeps no belief), else UNCERTAIN; never ABSENT (an absent object is one the memory dropped). The one threshold every layer uses. (L7131) fields: node_id, kind, pose: Pose6D, label, confidence, bbox_3d, embedding_ref, is_container, occludes_contents, first_seen_ns, last_seen_ns, observation_count, state: ObjectBeliefState
  • class SceneGraph(BaseModel) — Persistent scene-graph memory; validates unique node ids and that every edge references an existing node. schema_version "0.3" ("0.2" added the SpatialNode station fields, "0.3" its belief state); a "0.1" or "0.2" file migrates on load (_migrate_scene_graph, version restamp only). (L7247) fields: name, version, state, weights_loaded, quantized, warmed_up, embodiment_tags, role, latency_budget_ms, last_inference_ms, error_msg, stamp_ns

Pydantic models — skill packaging (rSkill)

  • class RSkillLatencyBudget(BaseModel) — Per-stage latency budget; max_execution_s is the total execution budget for one execute_rskill goal in seconds on the clock the robot moves on (graph clock under use_sim_time, else wall), bounding a VLA that never self-terminates. (L7809) fields: per_chunk_ms, warmup_ms, load_ms, max_execution_s
  • class SensorRequirement(BaseModel) — One sensor an rSkill needs the robot to provide. (L7836) fields: modality, vla_feature_key, min_width, min_height, count
  • class ImagePreprocessing(BaseModel) — Per-rSkill checkpoint image-preprocessing contract, so the sim adapter doesn't need to learn a checkpoint's frame conventions from a YAML override. aliases keys are VLA slots (camera1), never sensor/scene camera names. (L7893)
  • unknown_alias_slots(sensors_required) -> list[str] — Alias keys no sensors_required[].vla_feature_key declares as a slot; resolve_image_preprocessing raises on any. (L7970)
  • class ControlModeSemantics(BaseModel) — Action-space semantics on each ActuatorRequirement. (L9309) fields: mode: Literal["absolute","delta"], gripper_convention, joint_order, reference_frame
  • Cross-validator on ActuatorRequirement: gripper kinds require gripper_convention; cartesian kinds require reference_frame; other kinds forbid both.
  • GripperConvention (TypeAlias = Literal[...]) — Closed gripper-action encoding set. Members: normalized_open_unit, normalized_open_symmetric, normalized_close_symmetric, binary_close_one, raw_joint_rad, width_meters. Declared on both sides of the wire: the rSkill's gripper actuator, and the robot end effector or simulated scene. (L1787)
  • class ActuatorRequirement(BaseModel) — One actuator slot an rSkill emits actions for; n_dof/vla_action_key auto-fill from the robot YAML for canonical embodiments, required for the "custom" hatch. (L9358) fields: kind, n_dof, vla_action_key, control_mode_semantics
  • kind reuses ControlMode; n_dof / vla_action_key auto-fill from the robot YAML for canonical embodiments, required on the manifest for the "custom" hatch.
  • control_mode_semantics is required: declares absolute-vs-delta and, when applicable, gripper convention / reference frame.
  • class EmbodimentExtra(BaseModel) — Sensor + actuator surface for the "custom" embodiment hatch. (L9456) fields: sensors: list[SensorRequirement] (≥1), actuators: list[ActuatorRequirement] (≥1)
  • class RSkillProcessors(BaseModel) — Explicit lerobot PolicyProcessorPipeline artefact pointers. (L9709) fields: preprocessor_uri, postprocessor_uri
  • Per-file URI shape hf://owner/repo[@rev]/path/to/file.ext — the file tail is required; a bare repo URI is the implicit-snapshot shape this deliberately replaced.
  • Cross-validator rejects identical pre/post URIs.
  • _PROCESSOR_URI_PATTERN: str — Validates RSkillProcessors.preprocessor_uri/postprocessor_uri requires a file tail. (L9679)
  • class RosIntegration(BaseModel) — Wiring for a wrapped ROS 2 action/service; required when RSkillManifest.kind is ros_action/ros_service, forbidden otherwise. package must be a ROS IDL package name (check_ros_interface_package). (L9882) fields: package, interface_type, interface_name, result_trajectory_field, default_goal_json, ros_dependencies, completes_task_on_success, goal_builder
  • completes_task_on_success (default False) — opt-in: the wrapped action's own success completes the reasoner's active mission task (Nav2 NavigateToPose: SUCCEEDED = within goal tolerance). Never for a planner whose success only means a plan exists.
  • result_trajectory_field is None → result-only mode (Nav2 shape); set → trajectory mode (MoveIt shape, replaying one waypoint per step()).
  • default_goal_json validator round-trips the literal through json.loads and rejects non-dict payloads.
  • RSKILL_ROLE_BY_KIND: dict[RSkillKind, Literal["s1", "s2"]] — The slot each kind runs in (s1: vla/wam/ros_action/ros_service/detector/segmenter; s2: vlm/reward/playbook). RSkillManifest fills an omitted role from it (_default_role_from_kind) and refuses a declared one that differs (_check_role_matches_kind). No kind maps to s0: S0 ships as ros2_control controllers. (L9851)
  • EXECUTE_RSKILL_KINDS: frozenset[str] — POLICY_KINDS | ROS_WRAPPER_KINDS: the kinds the ExecuteRskill runner dispatches. The one set read by the reasoner palette (build_tool_palette), the runner's pre-load gate (rSkill.check_dispatchable) and ManifestSkillResolver.build. (L9868)
  • POLICY_KINDS: frozenset[str] — {"vla", "wam"}, the kinds that run the policy-adapter path (same manifest rules, resolver, and reasoner palette filters); a WAM also predicts future frames. (L9843)
  • ROS_WRAPPER_KINDS: frozenset[str] — {"ros_action", "ros_service"}, the kinds that wrap an existing ROS 2 action / service server: no weights, no VRAM, dispatchable only while ros_integration.interface_name is on the ROS graph. Used by the manifest validator, the reasoner palette seed and the deploy reward VRAM preflight. (L9838)
  • class SegmenterEngine(str, Enum) — Backend selector for kind: "segmenter" rSkills; required on SegmenterContract.engine (no legacy fallback, unlike DetectorEngine). (L10226)
  • class SegmenterContract(BaseModel) — Manifest contract for kind: "segmenter" rSkills, the sibling of DetectorContract for models answering a geometric prompt rather than a semantic one. Deliberately carries no labels/score_threshold — a segmenter never classifies and its consumer never gates on model confidence. (L10254)
  • class DepthEstimatorFamily(str, Enum) — Network a kind: "depth_estimator" rSkill runs: da3 (Depth Anything 3) or depth_pro2 (Apple Depth Pro 2); with runtime: pytorch it picks the in-tree sidecar. (L10309)
  • class DepthOutput(str, Enum) — What a depth estimator's raw output means: metric (metres, given f_px), canonical_focal (metres = mean focal × raw / canonical_focal_px), relative (never converted to metres). (L10328)
  • class DepthEstimatorContract(BaseModel) — Manifest contract for kind: "depth_estimator" rSkills: family, output, canonical_focal_px (exactly when canonical_focal), process_res, predicts_intrinsics (required by the SLAM path). Consumed by depth_provider_node and tools/depth_estimator_sidecar.py. (L10353)
  • class DetectorEngine(str, Enum) — Backend selector for kind: "detector" rSkills, disambiguating backends that otherwise share a runtime; None keeps the legacy runtime-keyed dispatch. (L10015)
  • class DetectorMode(str, Enum) — Invocation mode of a detector, orthogonal to DetectorEngine: CONTINUOUS (always-on, feeds WorldState.detected_objects, not dispatchable) vs ON_DEMAND (prompted via the locate_in_view tool). (L10064)
  • class OvbDetectorConfig(BaseModel) — Diffusion settings for an engine: ovb_sidecar detector: the pinned base FLUX.2 [klein] pipeline (base_pipeline_uri, hf://repo@<40-hex sha>), the OVB transformer_subfolder inside weights_uri, and num_inference_steps (28) / guidance_scale (3.5) / seed (0). (L10100)
  • class DetectorContract(BaseModel) — Manifest contract for kind: "detector" rSkills; max_side caps the VLM-sidecar's resize before grounding, trading detection resolution for lower activation VRAM. (L10140) fields: labels: list[str] (min_length=1; class-label list indexed by model class-id), input_size: tuple[int, int] (width × height, both > 0; default (640, 640)), score_threshold: float (ge=0.0 le=1.0; default 0.5), engine: DetectorEngine | None, mode: DetectorMode (default continuous), max_side: int | None, ovb: OvbDetectorConfig | None (required iff engine is ovb_sidecar, forbidden otherwise)
  • class RewardContract(BaseModel) — Manifest contract for kind: "reward" rSkills; a reward monitor is a pure perception consumer with no actuators or action/state contract, so its progress/success signal is advisory only. (L10411)
  • class PlaybookContract(BaseModel) — Manifest contract for kind: "playbook" rSkills (human-authored S2 decision procedure); content the reasoner reads into its system prompt, never code it executes — no weights, actuators, or action/state contract. (L10514)
  • class RSkillManifest(BaseModel) — rskill.yaml manifest; a pre-publish surface extended in place several times at schema_version: "0.1"; "0.2" (current default) made role derived from kind, and 0.1 files still load through the role migration in _derive_role. (L10571) fields: schema_version, name, version, license, role, kind, model_family, embodiment_tags, embodiment_extra, capabilities_required, sensors_required, actuators_required, runtime, quantization, weights_uri, chunk_size, latency_budget, min_vram_gb, fallback_skill_id, benchmarks, evaluated_tasks, sim_env_control_mode, policy_extras, paper_url, dataset_uri, source_repo, description, default_prompt, actions, objects, scenes, processors, image_preprocessing, state_contract, action_contract, n_action_steps, ros_integration, detector, reward, reward_rskill_name, playbook. kind gates which other fields are required or forbidden (see _check_kind_consistency below). evaluated_tasks gates a scene's task against what the checkpoint was trained on, raising ROSCapabilityMismatch when it doesn't cover the scene. reward_rskill_name names the reward monitor a VLA pairs with, since a VLA emits no success signal of its own; None defers to the deployment default reward model rather than meaning "run without reward". default_prompt is the literal conditioning string a single-task checkpoint was trained on — distinct from description, which is prose for the LLM to pick the skill by.
  • from_yaml(cls, path: str) -> RSkillManifest [@classmethod] — Load and validate an rskill.yaml. (L11584)
  • reads_world_state_policy_state [@property] -> bool — Truthiness of policy_extras.use_world_state_policy_state: the runner feeds this policy WorldState.policy_state, not the joint vector. The one reader of the key (runner obs["state"] selection + the reasoner palette's state-contract gate, issue #474). (L11572)
  • active_min_vram_gb(self) -> float | None — Declared VRAM for this skill at its active quantization dtype, or None when undeclared; consumed by assert_vla_reward_fits. (L10763)
  • active_min_vram_gb(self, *, pro_installed: bool = False, dtype: QuantizationDtype | None = None) -> float | None (L10763) — Declared VRAM at dtype when the caller passes the dtype the load resolved to (openral_sim._quantization.resolved_runtime_dtype: $OPENRAL_QUANTIZATION_DTYPE / VLASpec overrides beat the manifest; core cannot read them), else at quantization.runtime_dtype(pro_installed=...) (callers pass pro_quantization_installed(); core cannot detect Pro); None when undeclared for that dtype; consumed by assert_vla_reward_fits.
  • is_commercial_use_allowed: bool [@property] — Derived from license: True for apache-2.0/mit/bsd, False otherwise. (L10917)
  • is_scaffold_placeholder: bool [@property] — True when name/weights_uri/base_weights_uri/source_repo still carry an unresolved template sentinel, i.e. this is the rskills/template/ scaffold; the reasoner palette gate and the publish gate both use it to keep the scaffold from being dispatched or published. (L10930)
  • actuates_manipulator: bool | None [@property] — From actuators_required: True when any actuator is outside the base family (arm / gripper / hand / Cartesian), False when every one is body_twist / foot_placement (Nav2, a VLN policy), None when it actuates nothing. The one predicate behind the runner's station mode and per-goal object grounding (station_perception_wanted) and the reasoner palette's RSkillToolEntry.object_target. (L10946)
  • Cross-validators: "custom" ∈ embodiment_tags ↔ embodiment_extra is not None; a "custom" entry requires n_dof and vla_action_key on every actuator.
  • rSkill self-containment audit cross-validator: processors required for the families in _MODERN_PROCESSOR_FAMILIES (smolvla, pi05, xvla); others may omit it.
  • Cross-validator (_check_kind_consistency): each kind requires and forbids a specific field set (e.g. vla needs model_family+weights_uri, detector needs detector+weights_uri and no actuators); wam validates schema-side but the loader rejects it at resolve time.
  • Role validator _derive_role (before): sets role to RSKILL_ROLE_BY_KIND[kind]; refuses role: s0 in every version; refuses a declared mismatch under schema 0.2, while a 0.1 file's declared s1/s2 mismatch is migrated with a UserWarning (a playbook not declaring s2, or an unknown value, stays refused as in 0.1). A non-string kind (YAML list / map) is left for field validation, never a raw TypeError. The published JSON Schema states no role default (_drop_json_schema_default).
  • Cross-validator (_check_n_action_steps_within_chunk): n_action_steps <= chunk_size (None = the adapter's default, resolved by openral_rskill._vla_core.resolve_n_action_steps).
  • The historical policy_id field was removed in favour of dispatching on model_family directly.
  • prop _HF_HUB_ID_PATTERN, _SEMVER_PATTERN, _WEIGHTS_URI_PATTERN, _HF_DATASET_URI_PATTERN, _HTTPS_URL_PATTERN — Regexes validating RSkillManifest's URI/version/URL fields, pinned at module scope so the patterns stay greppable. (L9637–9646)
  • _LICENSES_ALLOWING_COMMERCIAL: frozenset[RSkillLicensePosture] — Licenses RSkillManifest.is_commercial_use_allowed treats as commercial-OK: apache_2_0/mit/bsd, plus nvidia_open_model (GR00T N1.7+) and openmdw-1.1 (NVIDIA Cosmos 3). (L9684)
  • _MODERN_PROCESSOR_FAMILIES: frozenset[str] — Model families requiring RSkillManifest.processors; act may omit it via the legacy norm-stats-in-safetensors path. (L9706)
  • RSKILL_TEMPLATE_SENTINELS: tuple[str, ...] = ("TEMPLATE_ORG", "TEMPLATE_ID") — Canonical unresolved-scaffold sentinels the openral rskill new scaffolder rewrites; shared by the reasoner palette gate and the publish gate so the "is this a published skill?" rule can't drift. (L9656)
  • def contains_rskill_template_sentinel(text: str | None) -> bool — True when text carries an RSKILL_TEMPLATE_SENTINELS substring; the text-level primitive behind is_scaffold_placeholder. (L9659)
  • def assert_vla_reward_fits(vla: RSkillManifest, reward: RSkillManifest, gpu_total_gb: float, *, margin_gb: float = 0.5) -> float — Pre-load gate verifying a VLA and its paired reward model co-reside in GPU VRAM; raises ROSConfigError if either size is undeclared, ROSGPUMemoryError if they don't fit, else returns the combined GB. (L12033)
  • def assert_vla_reward_fits(vla: RSkillManifest, reward: RSkillManifest, gpu_total_gb: float, *, margin_gb: float = 0.5, pro_installed: bool = False, vla_dtype: QuantizationDtype | None = None) -> float (L12033) — Pre-load gate verifying a VLA and its paired reward model co-reside in GPU VRAM at their runtime dtypes (pro_installed selects quantization.extra.pro_dtype; vla_dtype is the VLA's resolved load dtype from resolved_runtime_dtype, so an env/spec override is budgeted — the reward model loads at its manifest dtype); raises ROSConfigError if either size is undeclared for its dtype, ROSGPUMemoryError if they don't fit, else returns the combined GB.
  • rSkill HF-repo naming, enforced by tools/rskill_publisher.py. Hyphens are only the segment separator; a name parses by split("-") into one of three shapes — rskill-<model>-<robot>-<task>-<quant> (weight-bearing kinds), rskill-<model>-<robot>-<task> (ros_action/ros_service, no weights), or rskill-playbook-<name>.
  • _DEFAULT_RSKILL_OWNER: str = "OpenRAL" — Owner used when a manifest name carries no <owner>/ prefix. (L11631)
  • _RSKILL_NAME_SEGMENT_RE: re.Pattern[str] — Every name segment must match ^[a-z0-9][a-z0-9_]*$. (L11634)
  • prop _RSKILL_NAME_PARTS, _RSKILL_ROS_NAME_PARTS, _RSKILL_PLAYBOOK_NAME_PARTS — Expected hyphen-segment counts for the three name shapes. (L11641–11643)
  • CANONICAL_MODEL_TOKENS: frozenset[str] — Versioned <model> checkpoint vocabulary; distinct from ModelFamily since several tokens can share one family, and tool models have no family. (L11672)
  • CANONICAL_ROBOT_NAME_TOKENS: frozenset[str] — The reserved robot-agnostic <robot> tokens {"any", "multi"} (multi = a skill declaring more than one concrete robot). Concrete robot tokens are an open registry: repo_name_is_canonical checks them by shape, and CI (tests/unit/test_manifest_registry_ids.py) checks in-tree names against robots/*/robot.yaml tags. (L11783)
  • CANONICAL_QUANT_TOKENS: frozenset[str] — {fp32, fp16, bf16, int8, nf4}; the weightless ROS-wrapper kinds omit the <quant> segment entirely. (L11645)
  • _WEIGHTLESS_KINDS: frozenset[str] — {"ros_action", "ros_service"} — kinds carrying no weights, so their name omits <quant>. (L11650)
  • _NAME_TAIL_QUANT_LIKE: frozenset[str] — Trailing tokens the author-slug fallback strips from a name tail. (L11654)
  • _QUANT_DTYPE_TO_TOKEN: dict[QuantizationDtype, str] — Maps quantization.dtype to its <quant> name token. (L11658)
  • _MODEL_FAMILY_ALLOWED_TOKENS: dict[str, frozenset[str]] — Per-family allowlist of <model> tokens; only the special cases (versioned / multi-token families) need an entry. (L11742)
  • def _allowed_model_tokens(model_family: str) -> frozenset[str] — _MODEL_FAMILY_ALLOWED_TOKENS lookup defaulting to {model_family}, so a new family needs no schema edit. (L11770)
  • _MODEL_FAMILY_TO_TOKEN: dict[str, str] — model_family → canonical <model> suggestion token; a family absent from the map suggests its own id. (L11720)
  • _EMBODIMENT_TO_ROBOT_TOKEN: dict[str, str] — Robot tags whose bare form would collide, mapped to a distinct <robot> token; every other tag uses its bare id. (L11775)
  • def repo_name_is_canonical(name: str, *, kind: RSkillKind, model_family: str \| None = None) -> bool — The enforced validator: kind-selected shape plus <model> vocab (CANONICAL_MODEL_TOKENS, or the family's allowed tokens when model_family is set); <robot> and <task> are checked by shape only. (L11892)
  • def expected_repo_name(manifest: RSkillManifest) -> str — The canonical name suggestion printed on a mismatch and written by --fix-name; always satisfies repo_name_is_canonical for the manifest's kind. (L11968)
  • _REGISTRY_ID_PATTERN: str — ^[a-z][a-z0-9_]*$, the shape of the four open registry ids below (StateLayout, EmbodimentTag, BenchmarkName, ModelFamily). Membership is checked by the registries and CI, not the core schema. (L7986)
  • EmbodimentTag (TypeAlias = Annotated[str, StringConstraints(pattern=_REGISTRY_ID_PATTERN)]) — Open robot-embodiment id: the tags robots/*/robot.yaml declare, plus "custom" escape hatch, "mobile_base" class tag, "any" (embodiment-agnostic wildcard for perception/playbook kinds), and "multi" (repo-name aggregate). Typo guard: openral_rskill.loader.intree_embodiment_tags + CI. (L9503)
  • StateLayout (TypeAlias = Annotated[str, StringConstraints(pattern=_REGISTRY_ID_PATTERN)]) — Open per-checkpoint proprioception layout id, naming the trained shape (field order, frame convention, gripper encoding, quaternion handedness); per-robot source bindings live on StateContractBindings. Membership: openral_state_adapter.registered_layouts() (palette drop / assemble_state refusal) + CI. (L7998)
  • WRAPPED_TASK_SPACE_LAYOUTS: frozenset[StateLayout] — Subset of StateLayout covering Cartesian/FK-derived composites, which require StateContract.bindings; joint-space layouts are excluded and served verbatim from raw JointState.position. (L8033)
  • class StateContract(BaseModel) — Per-rSkill state-vector contract, surfacing the proprioception layout a checkpoint was trained against so the runtime adapter doesn't learn it from a YAML override; requires bindings when layout is in WRAPPED_TASK_SPACE_LAYOUTS, forbids it otherwise. (L8095) fields: layout: StateLayout | None, dim: int | None, bindings: StateContractBindings | None
  • StateContractBindings (Pydantic model) — Per-robot source bindings for an rSkill's state_contract.layout; the state-side symmetric counterpart of ControlModeSemantics. (L8049) fields: eef_frame: str | None, base_frame: str | None, world_frame: str | None = "map", gripper_qpos_joints: list[str], quaternion_convention: Literal["xyzw","wxyz"] = "xyzw"
  • BenchmarkName (TypeAlias = Annotated[str, StringConstraints(pattern=_REGISTRY_ID_PATTERN)]) — Open benchmark id (RSkillManifest.benchmarks keys). Membership: openral_rskill.loader.known_benchmark_ids (benchmarks/*.yaml ∪ scenes/benchmark/*.yaml stems) at writeback / CI; from_pretrained only warns. (L9540)
  • ModelFamily (TypeAlias = Annotated[str, StringConstraints(pattern=_REGISTRY_ID_PATTERN)]) — Open VLA/policy family id used by the eval/runner adapter dispatch; required only when RSkillManifest.kind == "vla" (forbidden on every other kind). Membership: openral_sim.POLICIES + CI. Several families run out-of-process via a dedicated ZMQ sidecar rather than in-process. (L9561)
  • RSkillKind (TypeAlias = Literal["vla","wam","ros_action","ros_service","detector","vlm","reward","playbook"]) — Discriminator selecting the loader/runner branch; wam runs the vla policy path (POLICY_KINDS), adapters from the openral.policies entry-point group. (L9756)

Pydantic models — skill benchmark results (rskills/<id>/eval/<benchmark>.json)

  • class RSkillEvalSource(BaseModel) — Provenance of a benchmark block. (L12114) fields: paper, arxiv, model_variant, evaluated_by, reproduced_locally, reproduction_planned, reproduction_cli, table, status
  • class RSkillEvalBenchmark(BaseModel) — Suite identity for a benchmark block. (L12152) fields: name, dataset, protocol, robot, simulator
  • class RSkillEvalResult(BaseModel) — On-disk shape of rskills/<id>/eval/*.json; optional trace_id cross-references the OTel trace tree when the run had an OTLP endpoint to export to; optional grade_counts (episodes per final placement grade on a graded scene). (L12174) fields: schema_version, source, benchmark, eval_config, results, baselines
  • from_json(cls, path: str) -> RSkillEvalResult [@classmethod] — Load and validate a single benchmark JSON. (L12228)
  • prop _HF_HUB_ID_PATTERN, _SEMVER_PATTERN, _WEIGHTS_URI_PATTERN, _HF_DATASET_URI_PATTERN, _HTTPS_URL_PATTERN — Regexes validating RSkillManifest's URI/version/URL fields, pinned at module scope so the patterns stay greppable. (L9637–9646)
  • prop _RSKILL_NAME_PARTS, _RSKILL_ROS_NAME_PARTS, _RSKILL_PLAYBOOK_NAME_PARTS — Expected hyphen-segment counts for the three name shapes. (L11641–11643)

Pydantic models — validation-matrix round verdicts (outputs/validation-matrix/<round>/verdicts.json)

Written by tools/validation_matrix.py; the machine-readable half of docs/reference/collision-validation-evidence.md. The kernel's verdict is transcribed verbatim and adjudicated only against the simulator's own ground truth.

  • ValidationOutcome (TypeAlias = Literal[...]) — How one scene ended. Members: completed, estop-collision-real, estop-collision-false-positive, estop-collision-within-quantization, estop-collision-unadjudicated, estop-initial-configuration, deadline-after-grasp, deadline-no-grasp, harness-error.
  • GroundTruthAdjudication (TypeAlias = Literal["real-contact","false-positive","within-quantization","unadjudicated"]) — Verdict of the simulator's distance probe on a kernel stop; real-contact requires a solid-geom pair at or below 0 m, an unfiltered snapshot reads as unadjudicated.
  • class ValidationStopEvidence(BaseModel) — The kernel's safety.collision line, transcribed field for field. (L12311) fields: kind, party_a, party_b, horizon_step, min_distance_m, sweep_min_distance_m, place_allowance_active, place_target, depth_is_box_bound
  • exemption_active [@property] — Whether a support witness exempted a deeper cell at the trip. (L12375)
  • involves_payload [@property] — Either party is attached:<object_id>. (L12382)
  • class ValidationGroundTruthAdjudication(BaseModel) — Adjudication of a stop against sim.estop_ground_truth_snapshot; withdraws to unadjudicated when the probe's distances carry no certified proof, since the simulator's own distance function is known wrong on this pair class. (L12387) fields: verdict, stop_class, sim_time_s, grid_resolution_m, quantization_budget_m, admissible_gap_m, budget_source, probe_collidability_filtered, probe_distance_certified, unadjudicated_reason, nearest_any_m, nearest_tripping_party_m, nearest_pair, discrepancy_m, probed_pairs, probe_truncated, distmax_m, payload_contacts
  • class ValidationWitnessTimeline(BaseModel) — Attach/witness/place-declaration lifecycle, recorded from both the monitor and the kernel's own log lines since a disagreement is itself a finding. (L12465) fields: attach_t_s, detach_t_s, support_id, kernel_witness_armed, kernel_witness_separated, place_declaration_seen, place_region_armed, place_allowance_active_lines
  • class ValidationSceneVerdict(BaseModel) — One scene of one round, queryable; config_sha256 pins the exact YAML bytes that ran. (L12504) fields: scene, config_path, config_sha256, seed, prompt, rskill_id, outcome, task_success_final, task_success_ever, task_success_steps, task_success_transitions, stop, ground_truth, witness, monitor_records, dispatch_failure_reason, wall_s, artifacts, harness_error_reason
  • class ValidationRoundMetadata(BaseModel) — The reproducibility half of a round; every field exists because a past round could not be reproduced without it. (L12577) fields: round_id, started_at, host, executed_sha, worktree_clean, overlay_built_at_ns, launcher_path, repo_root, robot_manifest_path, robot_id, sync_groups, stack_argv, safety_overrides_absent, gpu_name, notes_path, scene_dirs, seed, artifact_stem, imported_from, scene_pins
  • class ValidationRoundVerdicts(BaseModel) — On-disk verdicts.json. (L12666) fields: schema_version, metadata, scenes
  • from_json(cls, path: str) -> ValidationRoundVerdicts [@classmethod] — Load and validate a round's verdicts. (L12698)
  • scene(self, name: str) -> ValidationSceneVerdict | None — The verdict for one scene key. (L12717)
  • class ValidationSceneDelta(BaseModel) — How one scene moved between rounds. (L12729) fields: scene, baseline_outcome, outcome, changed, changed_fields
  • class ValidationRoundDiff(BaseModel) — Round-over-round comparison. (L12763) fields: schema_version, round_id, baseline_round_id, executed_sha, baseline_executed_sha, seed, baseline_seed, scenes
  • same_sha [@property] — Both rounds ran the same code. (L12805)
  • same_seed [@property] — Both rounds pinned the same scene seed. (L12810)
  • is_reproducibility [@property] — same_sha and same_seed; anything else is a before/after, since a seed change moves the scene's initial configuration however equal the SHAs are. (L12815)
  • changed_scenes [@property] — Scene keys whose outcome moved. (L12825)

Pydantic models — sim eval

  • class SceneSpec(BaseModel) — Physics scene declaration. (L12877) fields: id, backend, assets_uri, observation_height, observation_width, cameras, backend_options
  • class TaskSpec(BaseModel) — What the robot must achieve. (L12922) fields: id, scene_id, instruction, max_steps: int | None, success_key: str | None, metadata
  • class VLASpec(BaseModel) — Policy / brain declaration. (L12976) fields: id, weights_uri, device, runtime, quantization, deterministic, extra
  • class SimEnvironment(BaseModel) — Runtime (robot × scene × task × VLA) tuple, composed at the CLI from a SimScene/BenchmarkScene YAML plus an RSkillManifest; never loaded from YAML directly. (L13017) fields: robot_id, scene, task, vla, base_pose, seed, n_episodes, record_video, save_dir, metadata
  • base_pose: Pose6D | None = None — Per-rollout robot mounting pose in the scene's world frame; honoured by free-axis scenes only.
  • model_post_init(_context: object) -> None — Cross-field validation: len(seeds) >= n_episodes and min_reps <= n_episodes. (L13080)
  • model_post_init(_context: object) -> None — Cross-field validation task.scene_id == scene.id. (L13080)
  • class BenchmarkMetadata(BaseModel) — Provenance block required on every BenchmarkScene; suite invariants treat it as byte-identical across scenes. (L13090)
  • class LaunchInclude — A vendor ROS 2 launch a deploy must bring up alongside the graph, since a SensorDeployBinding names a topic to subscribe to but not who publishes it. Carried by DeployScene.drivers, real path only. (L13114)
  • class VisionAttachmentRuntime(BaseModel) — DeployRuntime.vision_attachment: the real-hardware vision attachment leg (SAM 2.1 segmenter lifecycle node + the HAL's attachment-evidence bridge). Fields: enabled: bool = False, camera: str (manifest sensor), rgb_topic / rgb_camera_info_topic / depth_topic / depth_camera_info_topic: str | None (all four required when enabled: the leg projects only through the driver's CameraInfo, never the manifest's nominal intrinsics), segmenter_manifest: str (SAM 2.1 rSkill default), device: str = "auto", deadline_s: float = 0.25, evidence_timeout_s: float = 0.5 (jaw-position liveness for the heartbeat), tf_frames: dict[str, str] (manifest link → TF frame), grasp_target_enabled / place_target_enabled: bool = False (the bridge's pre-grasp target and real place producer legs; HAL params vision_attachment_grasp_target_enabled / _place_target_enabled; through deploy_e2e the place one also turns on the runner's place_approach_enabled goal-scope place declaration; both legs are off in tracking / on, where deploy_e2e arms that declaration anyway with the tracker measuring its region, TrackerSession.place_region — non-monotone, sim-only, Safety-WG review owed), grasp_target_approach_m: float | None = None (in (0, GraspDeclaration.MAX_HALF_EXTENT_M], needs grasp_target_enabled; the approach-armed grasp target with no named target, HAL param vision_attachment_grasp_target_approach_m, and through deploy_e2e the runner's grasp_approach_enabled when grasp_allowance_enabled is on), grasp_target_premeasure: bool = False (needs grasp_target_enabled; HAL param vision_attachment_grasp_target_premeasure: the grasp-target leg pre-measures every object instance near a hand from head-camera segmentation before any hand arms, each box confirmed by the voxel map, and arms the region from the tracked instance nearest the hand — camera first, map confirms and holds while the hand occludes — so it exists before contact without the policy pausing — docs/reference/object-primitives-design.md, issue #349, prototype), grasp_target_margin_m: float = 0.0 (in [0, MAX_GRASP_TARGET_MARGIN_M] = [0, 0.05] m, ClassVars MAX_GRASP_TARGET_MARGIN_M / DEFAULT_GRASP_TARGET_MARGIN_M = 0.0 — no bloat unless a scene names it, the real OpenArm cell scenes name 0.03; HAL param vision_attachment_grasp_target_margin_m; the grasp-target bloat: the kernel's pre-handover region is the held region grown by it on every face, downward too — finger links may press up to it into the support under the target — the attached payload, which is also the region the kernel latches at the handover, lowered onto the measured support and grown on the sides and top only; Safety-WG, HZ-0115-32), release_timeout_s: float = 3.0 (> 0; the release window's bound, HAL param vision_attachment_release_timeout_s; its grid age and clearance are launch-derived, not scene knobs). Coupling rule: enabled on real it always turns the kernel's attached check on (attached_collision_enabled, 1000 ms deadline), never the leg alone. Default off pending Safety-WG review. The grasp trigger's thresholds are not scene knobs: they are the manifest's JointSpec.closure_calibration. (L13152)
  • class DeployRuntime(BaseModel) — Committed deploy-posture toggles for a workcell scene (SLAM, Nav2, octomap, object detector, reward monitor, critic, spatial-memory ingest), all tri-state with explicit CLI flag > scene runtime: > auto/built-in default precedence. preload_rskill_id / preload_rskill_revision / preload_prompt (optional, scene-only): the rSkill the skill_runner resolves and loads right after it activates, in a worker thread, so the first execute_rskill goal finds it resident — the deadman watchdog opens its first-chunk window on goal ACCEPT, so a multi-minute cold load inside a goal is E-stopped, correctly; revision must be exactly what later goals send (the policy is resident per id + revision); the prompt only warms the inference path, each goal's own prompt reaching the policy per step. Forwarded as preload_rskill_id:= / preload_rskill_revision:= / preload_prompt:= only when set. (L13658) joint_states_topic: str | None (scene-only): explicit override for the JointState topic the deploy runtime's Python nodes ingest; None = derived by openral_hal.hal_joint_states_topic (a real ros2_control HAL's rate-limited /<hal_node>/joint_states, else /joint_states). The C++ kernel keeps the full-rate topic. clock_origin (host_wall | simulation | None) pins the graph's clock authority; None on a twin whose octomap_cloud_topic lies outside /openral/cameras/ already selects host_wall (simulation with it is refused). world_voxel_deadline_s: float = 1.0 / max_octree_age_s: float | None: the kernel's voxel deadline and the octomap bridge's octree-age bound, per rig (a source slower than ~1 Hz raises both); a validator refuses an age above the deadline so the kernel, not the bridge, fails closed (hazard log Entry 033). Hard caps (_check_perception_caps, 2x the pre-2026-09-25 values, refused at load with the field, the cap and why): world_voxel_deadline_s <= 2.0, world_voxel_data_age_budget_s <= 3.0, robot_self_filter_padding_m <= 0.10; also exported as the JSON Schema maximum, and enforced again by the nodes themselves (kernel configure, self-filter, voxel bridge; a deliberate mirror pinned by tests/unit/test_perception_caps_mirror.py). world_voxel_data_age_budget_s: float = 1.5 (> 0): how old the world behind a grid may be at check time, from the grid's source_stamp; the kernel's world_voxel_data_age_budget_ms (Entry 034). Default = the Thor ZED-M measurement (p99 ~1.0 s, max 1.09 s, 2026-09-24); declare a measured value per rig. Independent of the deadline pair (they bound receipt, this bounds the world's age), so no ordering is imposed; smaller is only stricter. robot_self_filter_padding_m: float = 0.02 (>= 0; measured at rest on the OpenArm Thor and Orin cells, 2026-09-25: the robot's own returns end 5-7.5 mm outside its hulls; the moving-arm tail is unmeasured): how far past the collision model a real depth return is removed as the robot by robot_self_filter; derive per rig from depth noise + extrinsic error + capture/joint-state sync motion + half a voxel. Also the width of the blind shell around the arm (Entry 035). grasp_allowance_enabled: bool = False: turns on the safety kernel's grasp-target exemption (grasp_allowance_enabled:=true; deploy_e2e passes grasp_contact_links = the role: gripper joints' child_links); on deploy run (real HAL) it is refused unless vision_attachment.enabled and vision_attachment.grasp_target_enabled are on with no --hal override turning them off. workspace_contact_enabled: bool = False / workspace_contact_max_speed_mps: float | None (0 < v ≤ 1.0; required when enabled, a calibration point — the measured hand speed from /joint_states velocity; commanded speed, row 0 from the previously accepted command, as the fallback without one) / workspace_contact_max_lead_m: float | None (0 < d ≤ 0.10; required when enabled, a calibration point — the hand's lead over its measured pose, the push bound) / workspace_explained_cells: bool = True (issue #418 K7 with object_tracking: on, an exemption-provider rule since ADR-0121 step 3: workspace contact only on explained cells; false keeps the workspace contact rule alone, for a scene whose neighbours the depth cameras cannot track — shelf scene, 2026-10-23 decision; forwarded as the launch arg workspace_explained_cells); workspace_contact_wrist_links: int = 1 (1–2; 2 adds the next actuated link up the chain as a wrist link for the contact rule only — DROID's panda_link6, 2026-10-21 decision, Isaac R50–R82 commanded-pose stops with no physical contact; the self-filter mask keeps the one-link set; Safety-WG review owed): the safety kernel's manipulation-workspace contact rule (issue #349) — hand links (RobotDescription.hand_links(wrist_links=...)) may touch cells inside a live declaration's confirmed workspace_region while the hand is slow and its lead small; requires grasp_allowance_enabled and both bounds (_check_workspace_contact); sim-only until Safety-WG review (deploy run and a non-sim deploy_e2e refuse it). vision_attachment: VisionAttachmentRuntime | None = None: the real-hardware vision attachment leg (see VisionAttachmentRuntime). payload_sweep_clear_enabled: bool = False: the octomap bridge clears the carried payload's own posed boxes from the octree (clear_bbox); sim-only until Safety-WG review (deploy run and the launch on a non-sim HAL refuse it). exemption_provider: str = "": the safety kernel's ADR-0121 exemption provider (a pluginlib class deriving openral_safety_kernel::ExemptionProvider), forwarded as the launch arg exemption_provider; empty = none; sim-only (deploy run, the launch and the kernel each refuse it off sim).
  • voxel_freshness_s -> tuple[float, float] [@property] (L14138) — (world_voxel_deadline_s, max_octree_age_s) with the age defaulted to the deadline; what openral deploy forwards to the launch.
  • object_tracking / grounding_wait_s / grounding_required — Issue #418: tracker posture off (default) | tracking | on (shadow / bind map to tracking with a FutureWarning, _map_deprecated_tracking_modes); any mode but off requires an explicit grounding_wait_s (source time; calibration point, _check_object_tracking), and on requires exemption_provider (ADR-0121 step 3: its tracked-object rules are the provider's; _check_object_tracking); grounding_required refuses a goal whose queries do not ground in time.
  • DeployRuntime.object_surface_model: ObjectSurfaceModelConfig | None — Optional bounded observation-only registration settings; every resource and convergence bound is explicit, and the config is invalid while object_tracking is off.
  • SHARED_SCENE_FRAME: str (L14236) — "world", the frame several robots of one scene share (openral deploy fleet, OpenRAL Pro).
  • class DeployScene(BaseModel) — Unified deploy/workcell scene for openral deploy sim/run; nav_goals: list[NavGoal] names the cell's navigation stations (ADR-0133); success_conditions (issue #635) is what success means for the scene's tasks by prompt, forwarded to the rSkill runner as success_conditions_json for goals that carry none; place_declaration is the committed place-phase declaration for a direct dispatch (None means no place witness can arm), and a scene may not supply its own place_declaration.region since that must be producer-measured; grasp_declaration is the grasp-phase sibling under the same no-region rule (_reject_scene_supplied_place_region refuses both). No tasks field — deploy goals come from the operator via --initial-task / /openral/prompt. robot_unit names the cell's RobotUnit overlay ($OPENRAL_ROBOT_UNIT overrides). object_catalog: USDObjectCatalogRef | None optionally pins an external USD catalog for the shared deploy sim/run resolver; it is forwarded to the tracker as plain JSON and refused when tracking is off. Declarations do not override conflicting sensor evidence or alter safety checks. from_yaml warns (FutureWarning, naming the file) when the scene's grasp_declaration sets the pending-deprecation search_box (issue #418); GraspDeclaration itself never warns. place_zones: list[PlaceZone] — the station's declared place zones (names/aliases unique across zones), forwarded as place_zones_json to the runner and the object tracker. A scene with a robots key is refused before extra="forbid", naming openral deploy fleet (OpenRAL Pro); SimScene/BenchmarkScene inherit the refusal. (L14239)
  • from_yaml(cls, path: str) -> Self [@classmethod] — Load and validate a scene YAML from disk; inherited by SimScene/BenchmarkScene, which validate against their own stricter schemas. (L14514)
  • class SimScene(DeployScene) — Extends DeployScene with task, seed, n_episodes, record_video, save_dir, metadata; cross-validates task.scene_id == scene.id; accepted by openral sim run. (L14549)
  • class BenchmarkScene(SimScene) — Extends SimScene with required eval fields (n_episodes, seed, metadata, task.success_key, task.max_steps); consumed by openral benchmark. (L14576)
  • class ProtocolSpec(BaseModel) — Standalone eval-protocol schema, retained for decision-record drafts and report tooling that quote a published protocol verbatim; never embedded in a benchmark suite. (L14621) fields: n_episodes, seeds, success_key, max_steps, min_reps
  • model_post_init(_context: object) -> None — Cross-field validation: len(seeds) >= n_episodes and min_reps <= n_episodes. (L14664)
  • class DeployScene(BaseModel) — Unified deploy/workcell scene for openral deploy sim/run; nav_goals: list[NavGoal] names the cell's navigation stations (ADR-0133); place_declaration is the committed place-phase declaration for a direct dispatch (None means no place witness can arm), and a scene may not supply its own place_declaration.region since that must be producer-measured; grasp_declaration is the grasp-phase sibling under the same no-region rule (_reject_scene_supplied_place_region refuses both). No tasks field — deploy goals come from the operator via --initial-task / /openral/prompt. robot_unit names the cell's RobotUnit overlay ($OPENRAL_ROBOT_UNIT overrides). object_catalog: USDObjectCatalogRef | None optionally pins an external USD catalog for the shared deploy sim/run resolver; it is forwarded to the tracker as plain JSON and refused when tracking is off. Declarations do not override conflicting sensor evidence or alter safety checks. from_yaml warns (FutureWarning, naming the file) when the scene's grasp_declaration sets the pending-deprecation search_box (issue #418); GraspDeclaration itself never warns. place_zones: list[PlaceZone] — the station's declared place zones (names/aliases unique across zones), forwarded as place_zones_json to the runner and the object tracker. A scene with a robots key is refused before extra="forbid", naming openral deploy fleet (OpenRAL Pro); SimScene/BenchmarkScene inherit the refusal. (L14239)

Pydantic models — inference runner

On-disk + runtime contracts for the hardware inference runner (openral deploy --config R.yaml), sibling of SimEnvironment / openral sim run. Schemas are additive — SimEnvironment / RSkillEvalResult / BenchmarkScene are untouched.

  • class FrameEncoding(str, Enum) — How SensorFrame bytes are interpreted. (L6890) BGR8, RGB8, MONO8, DEPTH16, JPEG, PNG, CUDA_NV12, CUDA_RGBA, RAW — CUDA_NV12 is the Tegra NVMM handle layout, CUDA_RGBA the x86 DeepStream one
  • class SensorFrame(BaseModel) — Single sensor frame: metadata plus optional inline/topic/handle payload; JSON-serializes the binary payload as base64. (L6912) fields: sensor_id, stamp_monotonic_ns, stamp_wall_ns, encoding, width, height, channels, data, topic, handle, metadata
  • _decode_data(cls, value: Any) -> bytes | None [@field_validator("data", mode="before")] — Accepts raw bytes or a base64-encoded str on JSON parse. (L6979)
  • _encode_data(self, value: bytes | None) -> str | None [@field_serializer("data", when_used="json")] — JSON-serializes the binary payload as base64. (L6995)
  • model_post_init(_context: object) -> None — Cross-field validation: exactly one of (data, topic, handle) must be set. (L6999)
  • class SensorReaderBackend(str, Enum) — Which SensorReader implementation a sensor uses. (L14694) OPENCV_THREAD, ROS2_IMAGE, GSTREAMER
  • class DeadlineOverrunPolicy(str, Enum) — Behaviour when a tick exceeds 1 / rate_hz. (L14722) WARN, DROP, RAISE
  • class SensorReaderConfig(BaseModel) — Per-sensor reader backend plus optional ROS-tee. (L14736) fields: sensor_id, backend, backend_params, max_age_ms, publish_to_ros, publish_topic, publish_rate_hz, publish_frame_id, publish_camera_info — publish_frame_id stamps the tee's Image/CameraInfo headers (default sensor_id); publish_camera_info: IntrinsicsPinhole | None makes the tee also publish CameraInfo on the image topic's sibling.
  • model_post_init(self, _context: object) -> None — Cross-field validation for the ROS tee: publish_to_ros ↔ publish_topic; publish_frame_id / publish_camera_info require publish_to_ros. (L14798)
  • class SensorDeployBinding(BaseModel) — Optional SensorSpec.deploy_binding payload letting openral deploy run open the physical camera; the runtime counterpart of sim_placement. Robot cameras carry it in their host's unit overlay (or robot.yaml); a deploy scene never touches them. (L14828)
  • class SensorOverlay(BaseModel) — Per-host / per-unit values for one robot-manifest sensor: deploy_binding, ros2_topic, static_transform_xyz_rpy, intrinsics; extra="forbid" refuses identity/semantics (frame_id, parent_frame, modality, …). (L14869) fields: name, deploy_binding, ros2_topic, static_transform_xyz_rpy, intrinsics
  • class RobotUnit(BaseModel) — One physical unit / host of a robot type, robots/<robot_id>/units/<unit>.yaml; selected by $OPENRAL_ROBOT_UNIT or DeployScene.robot_unit. gripper_joint_curve ({gripper joint: [(value, urdf value), …]}) is the unit's jaw calibration and joint_curve the same for any joint (an offset is a two-point slope-1 curve), applied on a real deploy by unit_gripper_curves. (L14900) fields: schema_version, robot_id, unit, sensors, serial, org_id (serial / org_id optional plain tokens, issue #467; env wins, see resolve_unit_identity)
  • from_yaml(path) -> RobotUnit [@classmethod] (L14941)
  • class HalConfig(BaseModel) — Which HAL adapter to instantiate plus transport params (serial port / FCI URI / ROS namespace). (L14967) fields: adapter, transport, params
  • class TickResult(BaseModel) — One tick's record returned by InferenceRunner.tick; optional sim-only fields and trace context default to None so hardware ticks serialize unchanged from v1. (L15000) fields: stamp_ns, tick_idx, sensors_ms, world_state_ms, inference_ms, safety_ms, hal_ms, tick_ms, chunk_index, safety_violations, action_applied, step_idx, episode_idx, reward, terminated, truncated
  • class RunResult(BaseModel) — Aggregated summary returned by InferenceRunner.run. (L15086) fields: n_ticks, success, budget_violations, avg_inference_ms, p99_inference_ms, avg_tick_ms, p99_tick_ms, trace_id, save_dir, metadata

Pydantic models — failure evidence

Discriminated union backing the evidence_json field of openral_msgs/msg/FailureTrigger. Discriminator is kind; decode via pydantic.TypeAdapter(FailureEvidence).validate_json(...). All variants are frozen and reject extra fields.

  • class _FailureEvidenceBase(BaseModel) — Private base. (L15122)
  • class TimeoutEvidence (L15133) — kind="timeout"; fields operation, deadline_s, elapsed_s.
  • class ForceEvidence (L15150) — kind="force"; fields joint_or_ee, measured_n, limit_n, unit ("N" default, "Nm" for the kernel observer's per-joint trip, #373).
  • class WorkspaceEvidence (L15169) — kind="workspace"; fields ee_name, measured_xyz, box_min, box_max.
  • class PerceptionStaleEvidence (L15187) — kind="perception"; fields sensor_id, staleness_ms, threshold_ms. The safety kernel emits it for its stale-input drops with sensor_id = the input's topic.
  • class CriticEvidence (L15206) — kind="critic"; fields critic_id, score, threshold.
  • class ControllerEvidence (L15222) — kind="controller"; fields controller_name, state, detail.
  • class SelfVerifyEvidence (L15238) — kind="selfverify"; fields check, expected, observed.
  • class HumanEvidence (L15254) — kind="human"; fields actor, reason.
  • class WamEvidence (L15268) — kind="wam"; fields horizon, discrepancy, wam_id.
  • class ReasonerTimeoutEvidence (L15284) — kind="reasoner_timeout"; fields model, deadline_s, elapsed_s.
  • class CollisionEvidence (L15303) — kind="collision"; horizon_step=-1 (REACTIVE_HORIZON_STEP) marks the kernel's reactive measured-state check rather than a predicted chunk step; joint_positions_rad is the FK'd configuration for that step, making a predicted stop adjudicatable. grasp_exemption_source (region / tracked / provider / none) and grasp_exemption_provider name the grasp exemption the check ran under (ADR-0121; backward-compatible additions). workspace_declaration_live says whether the grasp declaration's workspace was live at the stop, whoever applies it (workspace_contact_active is only the in-tree #349 rule, off under a provider). On a world-voxel stop, world_cell_center_m is that voxel_<n> cell's base-frame centre (both optional; older producers omit them). place_allowance_active and place_target disclose the ADR-0097 place-approach allowance at the stop (optional, backward-compatible; place_target only while place_allowance_active is true). Maps to FailureTrigger.KIND_COLLISION. fields: collision_kind: Literal["self"|"world"|"peer"], link_a, link_b_or_object, horizon_step, min_distance_m, joint_positions_rad: list[float]
  • REACTIVE_HORIZON_STEP: ClassVar[int] — the -1 sentinel; use it instead of a literal.
  • is_reactive (property) — True when horizon_step == REACTIVE_HORIZON_STEP. (L15466)
  • class ObjectQueryObservation — One refused camera observation: bounded camera, source stamp_ns, and refusal reason. Object-query evidence retains at most eight. (L15471)
  • class ObjectQueryEvidence (L15487) — kind="object_query", issue #418 Addendum G: a standing object query the World State tracker could not resolve — escalation, goal_id, query_id, label, role, waited_s, detector attempts, last refusal reason, exact 32-hex action invocation_id, optional declared workspace, up to eight typed observations, and last_seen (search prior only). to_exception() -> ROSObjectNotInMemory is the typed failure it records. The reasoner requires the UUID to match the active dispatch, consumes the task's persisted budget and stops at its cap without human handoff. Maps to FailureTrigger.KIND_OBJECT_QUERY on /openral/failure/world_state.
  • to_exception() -> ROSObjectNotInMemory — The typed failure (CLAUDE.md §5) with label, role, query id, waited seconds and attempts in its message. (L15541)
  • class GraspOutcomeEvidence (L15550) — kind="grasp_outcome", issue #353: one hand's close ended without an ATTACH (outcome="miss"), or an ATTACH ending that hand's run of misses — its own, or another hand attaching the same declared target (outcome="attach", the recovery; an ATTACH ending no run publishes none) — gripper_joint, jaw_link (the GraspTargetRef.contact_links name for the hand), hand_link (the trigger's attach link), consecutive_misses >= 1 (the hand's run on one target; a different target restarts it), target_id (the live declaration's, when it named this jaw; "" = undeclared close), region_armed, and the trigger's last short_of_command / settle_spread (finite or None). Task evidence, never a kernel drop cause. Maps to FailureTrigger.KIND_GRASP_OUTCOME on /openral/failure/hal, published by VisionAttachmentBridge._report_outcome; consumed by ContextRenderer.append_failure.
  • class SuppressedSummaryEvidence (L15612) — kind="suppressed_summary"; fields window_s, kinds: list[int], severities: list[int], counts: list[int]. A model-validator enforces the arrays stay parallel.
  • FailureEvidence: TypeAlias (L15646) — Discriminated union over the fourteen variants above.

Pydantic models — compliance records

Record kinds the compliance recorder writes to the on-robot log and exports as OTLP log records (issue #467). Discriminator is kind; decode via pydantic.TypeAdapter(ComplianceRecord).validate_json(...). All kinds are frozen and reject extra fields. Unit and org identity ride on the OTel resource, not on each record.

  • class RetentionClass(StrEnum) (L15690) — ai_log_6m (AI Act Art. 19/26(6)), mr_safety_decision_1y, mr_trace_5y (MR Annex III §1.2.1(f)), incident_10y, telemetry_raw. Follows from the record kind; callers never set it.
  • RETENTION_FLOOR_DAYS: Mapping[RetentionClass, int] (L15709) — Read-only minimum days per class (184 / 366 / 1827 / 3653 / 0: the longest six months, a year spanning 29 Feb, five and ten years). Org policy may keep longer, never shorter.
  • trace_ids_from_wire(wire) -> tuple[str | None, str | None] (L15731) — (trace_id, span_id) from a W3C traceparent, raw 32 hex or "" (ISSUE-109); ValueError otherwise. The envelope's before-validator and ComplianceEmitter both parse through it.
  • ACTOR_KEY_ENV: str (L15755) — "OPENRAL_ACTOR_KEY", the deployer-held key operator identities are pseudonymised under.
  • pseudonymous_actor_id(identity, key) -> str (L15759) — HMAC-SHA256 hex of an operator identity under the deployer's key: the Actor.actor_id value (issue #468); ValueError on an empty identity or key.
  • class Actor (L15778) — channel_label, actor_id (64-hex HMAC-SHA256 pseudonym under a deployer-held org key, or None). Never a name.
  • class SoftwareComponent (L15799) — name, version, sha256, safety_relevant, signature_ok (MR §1.1.9 identification).
  • class _ComplianceRecordBase(BaseModel) (L15821) — Private envelope: schema_version, record_id (32-hex), stream_id (32-hex, the emitter;seqis gap-free within it), seq, ts_ns (both ≤ int64), clock_source, trace_id, span_id, parent_record_id; a before-validator accepts the wire trace_id forms (W3C traceparent → id + span, "" → None, ISSUE-109); retention_class property from the class-level _retention.
  • class FailureRecord (L15878) — kind="failure"; source, failure_kind (KIND_*), severity (SEVERITY_*), evidence: FailureEvidence | None, rskill_id. Class ai_log_6m.
  • class SafetyStopRecord (L15913) — kind="safety_stop"; trigger_source, drop_reason, detail, evidence, stop_cmd_ts_ns, halt_ts_ns, latched, rskill_id, risk_ref. Class mr_safety_decision_1y.
  • class SafetyDecisionRecord (L15954) — kind="safety_decision"; decision (pass/scale/drop), check_name, rskill_id, chunk_index, inputs_digest. Class mr_safety_decision_1y.
  • class PlanDecisionRecord (L15989) — kind="plan_decision"; model, tool, rskill_id, ladder_rung, prompt_digest, mission_task_id. Class mr_safety_decision_1y.
  • class InterventionRecord (L16027) — kind="intervention"; intervention_kind, actor: Actor, channel, legitimate (None = unknown), before_digest, after_digest, diff_ref. Class mr_trace_5y.
  • class SoftwareInventoryRecord (L16078) — kind="software_inventory"; components: list[SoftwareComponent] (≥1). Class mr_trace_5y.
  • class SessionRecord (L16106) — kind="session"; start_ts_ns, end_ts_ns, run_mode, site_id, shift. Class ai_log_6m.
  • class SecurityIncidentRecord (L16139) — kind="security_incident"; actively_exploited, malicious_suspected, summary (CRA Art. 14). Class incident_10y.
  • ComplianceRecord: TypeAlias (L16169) — Discriminated union over the eight kinds above.

Pydantic models — perception event metadata

Discriminated union backing the metadata_json field of openral_msgs/msg/PromptStamped when published on /openral/perception/<kind>. Discriminator is kind; decode via pydantic.TypeAdapter(PerceptionEventMetadata).validate_json(...). New kinds mean new topics, not a schema bump.

  • class _PerceptionEventBase(BaseModel) — Private base; carries sensor_id. (L16202)
  • class ObjectDetection2D(BaseModel) (L16221) — Single 2D detection inside ObjectsMetadata; det_id is a stable per-detector/per-camera identity assigned at detection time, letting an object be de-duplicated without the 3D lift, then propagated into DetectedObject.track_id. fields: label, confidence, bbox_xyxy, det_id: int = -1
  • class MotionMetadata (L16256) — kind="motion"; fields magnitude, threshold, region_bbox.
  • class ObjectsMetadata (L16279) — kind="objects"; frame_width/frame_height make the pixel space of bbox_xyxy explicit so the voxel lifter can scale it to the camera's intrinsics resolution. Optional camera_frame_id + camera_intrinsics (set together or not at all, validator-enforced) carry the driver CameraInfo's optical frame and K, which the world-state lift projects through instead of the SensorSpec named by sensor_id. fields: detections: list[ObjectDetection2D], model_id, frame_width: int (>0), frame_height: int (>0)
  • class OcrMetadata (L16335) — kind="ocr"; fields text, confidence, region_bbox.
  • class SceneChangeMetadata (L16353) — kind="scene_change"; fields distance, threshold, metric.
  • PerceptionEventMetadata: TypeAlias (L16376) — Discriminated union over the four variants above.

Pydantic models — reasoner tool calls

Discriminated union over the closed palette of typed tool calls the reasoner can emit each tick. Discriminator is tool; decode via pydantic.TypeAdapter(ReasonerToolCall).validate_json(...). All variants are frozen and reject extra fields so an LLM cannot smuggle ad-hoc ones onto the wire. The reasoner holds no direct actuation authority — it never publishes ActionChunk itself; ExecuteRskillTool dispatches indirectly via the action server, which gates through safety.

  • class _ReasonerToolBase(BaseModel) — Private base; carries optional rationale. (L17074)
  • class GraspTargetRef(BaseModel) (L17117) — Frozen, extra="forbid". label: str (min_length=1; open-vocabulary, matched case-insensitively against live lifted detections), object_id: str | None (a recall_object node_id; required when several objects share the label), contact_links: list[str] (ALL role: gripper child_links of ONE hand — the gripper joints hanging off one arm — in any order; empty only on a single-hand robot, where it means that hand; with several hands an empty list, links of two hands, a non-gripper link, or part of a hand is refused at grounding). Names; arms nothing.
  • class PlaceTargetRef(BaseModel) (L17172) — Frozen, extra="forbid". An OPTIONAL hint naming the surface a goal places onto (the real producer measures the surface under the carried payload without it): label: str (min length 1), and at most one of object_id / place_node_id (spatial-memory node ids); grounded at dispatch to PlaceDeclaration.search_box.
  • class ReloadGstPipelineTool (L17371) — tool="reload_gst_pipeline"; fields sensor_id, pipeline_yaml.
  • class LifecycleTransitionTool (L17397) — tool="lifecycle_transition"; shutdown is deliberately absent — that authority belongs to the safety supervisor. Canonical primitive for managing long-lived background services (slam_toolbox, RTAB-Map, perception trees), which are LifecycleNode peers, not rSkills. fields: node, transition: Literal["configure"|"activate"|"deactivate"|"cleanup"]
  • const EMIT_PROMPT_TOPICS: tuple[str, ...] = ("/openral/prompt", "/openral/prompt_in/auto") — The only topics an LLM-chosen EmitPromptTool may publish on: the self-cascade and the prompt router's machine-priority auto input; never a human-priority router input (cli / dashboard) or an arbitrary topic. Re-checked by the reasoner node at dispatch. (L17426)
  • class EmitPromptTool (L17437) — tool="emit_prompt"; the reasoner node publishes on target_topic itself via a per-topic publisher cache. fields: target_topic: Literal["/openral/prompt", "/openral/prompt_in/auto"] (EMIT_PROMPT_TOPICS), text, metadata_json
  • class WaitTool — deliberate no-op; tool="wait", until: Literal["next_event","skill_result","operator","timeout"] = "next_event", timeout_s: float = 30.0 (0 < t ≤ 300). Lets the LLM choose "observe and wait"; ReasonerCore holds the timer beat until until or timeout_s (any forced tick ends it early, issue #620). No actuation authority. (L17876)
  • class RecallObjectTool — read-only query; tool="recall_object"; recalls an object from the scene-graph memory. No actuation authority. Dispatch is planned Phase 2, not yet in the live provider palette. (L17472) fields: query (free-text/label), limit
  • class ResolvePlaceTool — read-only query; tool="resolve_place"; resolves a place/room/agent to a goal pose plus path. No actuation authority. Dispatch is planned Phase 2. (L17496) fields: reference ("the kitchen", "where I was standing")
  • class LocateInViewTool — read-only query; tool="locate_in_view"; asks a live VLM detector whether an object is in the current frame (vs recall_object's remembered objects). No actuation authority. (L17516) fields: query (concrete object noun(s)), camera (optional viewpoint id, default primary), detector (optional locator selector, default the deployment default)
  • class QuerySceneTool — read-only query; tool="query_scene"; asks a scene VLM an open-ended question about the current frame, answer fed back as a re-prompt. Distinct from locate_in_view: returns free text, not boxes. (L17572) fields: question (open-ended scene-state question, min_length=1), camera (optional viewpoint id)
  • class QueryTaskProgressTool — read-only query; tool="query_task_progress"; asks the reward monitor for a windowed progress/success assessment, fed back to drive the replanning ladder. Distinct from query_scene: returns normalized scalars, not free text. (L17610) fields: window_s (seconds of recent frames to assess, > 0, default 8.0), task (optional instruction override)
  • MemorySection: TypeAlias = Literal[...] — the five fixed sections of the self-maintained MEMORY.md core: home_map, preferences, lessons, object_locations, open_tasks.
  • class MemoryWriteTool — write; the reasoner's first write-capable variant; tool="memory_write"; edits the advisory MEMORY.md via an explicit add/update/supersede/delete op. Writes the memory file only — no actuation authority. (L17657) fields: op (add/update/supersede/delete), section: MemorySection, content (required unless delete), importance (0–1, default 0.5), target (required for update/supersede/delete)
  • class MemorySearchTool — read-only; tool="memory_search"; pages archived entries evicted from the bounded core back in. No actuation. (L17705) fields: query (min_length=1), section: MemorySection | None, limit (1–100, default 5)
  • is_collective_target(text) -> bool — True when text targets a set rather than one specific object (a quantifier or bare generic plural); shared by GroundedSubtask's validator and the reasoner node's runtime execute gate. (L17741)
  • _COLLECTIVE_TARGET_RE: re.Pattern[str] — Backing regex for is_collective_target. (L17735)
  • class GroundedSubtask — One subtask bound to exactly one specific object; a validator forbids a collective object_ref/text and requires text to name object_ref, so "the first batch of objects" isn't representable. (L17757) fields: object_ref: str (min_length=1), text: str (min_length=1)
  • render(self) -> str — The instruction string handed to MissionState / the skill. (L17824)
  • class DecomposeMissionTool — task-ledger write; tool="decompose_mission"; the typed path for a playbook to write the deterministic MissionState — empty target_task_id replaces the whole queue, a set one flat-splices into that blocked task. Edits the S2 task ledger only, no actuation authority. (L17829) fields: subtasks: list[GroundedSubtask] (min_length=1), target_task_id: str (default "")
  • rendered_subtasks(self) -> list[str] — The ordered subtask instruction strings for MissionState. (L17871)
  • class ExecuteRskillTool (L17229) — tool="execute_rskill"; fields rskill_id: str (min_length=1), prompt: str (default ""), goal_params_json: str (default ""), deadline_s: float (ge=0.0; default 0.0; 0 = use manifest latency budget), patience_s: float | None (default None; gt=0.0; task-adaptive execution ceiling override — None uses the reward model's default_patience_s), progress_tolerance: float | None (default None; ge=0.0; overrides the reward model's plateau_tolerance for a noisy critic — None uses the model default), grasp_target: GraspTargetRef | None and place_target: PlaceTargetRef | None (default None; the targets the LLM names, grounded by the reasoner at dispatch into the goal's GraspDeclaration / PlaceDeclaration, or the dispatch is refused — real pick-and-place design §2.2), final_step: bool (default True; False = the goal is one step of the active mission task, so a completes_task_on_success skill's success completes only that step, not the task — #562), start_from_home: bool (default False; the arms go to the robot's home_pose before the skill, refused on a robot without one).
  • ReasonerToolCall: TypeAlias — Discriminated union over the thirteen variants above.

Module-level functions (Layer 0)

  • def control_modes_for_representation(rep: ActionRepresentation) -> set[ControlMode] (L8546) — Maps a VLA's declared ActionRepresentation to the ControlModes it drives; single source of truth for the reasoner's deploy-path palette gate (a skill is offered only when the target robot advertises every returned mode).
  • SIM_EXECUTABLE_CONTROL_MODES: frozenset[ControlMode] (L8608) — Canonical set of ControlModes the default sim HAL action-packers can execute; single source of truth for the reasoner's sim-mode palette gate, pinned to the packers by a lockstep test. Excludes modes that are decoded but never pack-executed (would E-stop mid-run) or have no sim controller.
  • def canonical_slots_for_representation(rep: ActionRepresentation, *, dim: int, description: RobotDescription) -> list[ActionSlot] | None (L8620) — Builds the canonical ActionSlot layout the skill_runner dispatches a representation-only ActionContract through. Joint representations return None (legacy whole-vector path). Raises ROSConfigError when the representation needs an EE the robot lacks, or dim is too small.
  • def task_space_compatible(skill_space: TaskSpace, robot: RobotDescription, *, hal_mode: Literal["sim", "real"] = "real") -> TaskSpaceMatch (L8998) — DRAFT cross-layer gate subsuming today's implicit embodiment-tag/dim/adapter wiring; checks control-mode executability plus EE existence and joint-width bounds, returning ok + a reason per incompatibility. Wired warn-only so far.
  • def scene_family(task_id: str) -> str — Reduces an evaluated_tasks entry to its scene-family key (leading token before any /). (L9149)
  • SCENE_FAMILY_TASK_SPACE: dict[str, SceneTaskSpace] — Single source of truth for the control interface each scene-adapter family executes, keyed by scene_family(evaluated_task). (L9170)
  • def scene_task_space_compatible(family: str, skill_space: TaskSpace) -> TaskSpaceMatch — Third leg of the cross-layer gate: every ControlMode the rSkill emits must be in the scene family's executed set. Pairs with task_space_compatible to close the rSkill × robot × scene triangle. (L9254)

python/core/src/openral_core/code_refs.py

The one gate for "module.path:attribute" code references named in config (hal.sim, hal.real, composition.composer).

  • const ALLOW_EXTERNAL_PLUGINS_ENV: Final[str] = "OPENRAL_ALLOW_EXTERNAL_PLUGINS" — =1 admits a module outside openral_*, with a code_ref.external_plugin_allowed warning on every use. (L32)
  • def check_code_ref(ref: str, *, setting: str) -> str — Refuses (ROSConfigError naming setting) a malformed reference or one whose top-level module is not openral_* (open packages and OpenRAL Pro's openral_pro_*). Called by the HalEntrypoints / SceneComposition validators at schema load, which re-raise it as ValueError (so a load fails with a pydantic ValidationError). (L58)
  • def check_ros_interface_package(package: str, *, setting: str) -> str — Refuses (ROSConfigError) a RosIntegration.package that is not a single rosidl IDL package name (*_msgs / *_srvs / *_interfaces): ROSActionRskill imports <package>.action, which runs its __init__. OPENRAL_ALLOW_EXTERNAL_PLUGINS=1 admits any name with a warning. Called by the RosIntegration validator (as ValueError) and again in _import_action_or_service. (L96)
  • def check_ros_interface_package(package: str, *, setting: str) -> str — Refuses (ROSConfigError) a RosIntegration.package that is not one lowercase identifier ending _msgs / _srvs / _interfaces, since ROSActionRskill imports <package>.action (running its __init__). Same OPENRAL_ALLOW_EXTERNAL_PLUGINS=1 opt-in. Runs at schema load and in _import_action_or_service.
  • def import_code_ref(ref: str, *, setting: str) -> object — check_code_ref, then import + getattr; the object must also be defined in an openral_* module (its __module__), so a re-exported foreign callable is refused; ROSConfigError when unimportable or missing. The import seam for openral_hal.resolver._import_object and ManifestHALLifecycleNode._compose_scene_mjcf — do not hand-roll importlib on a config string. (L127)

python/core/src/openral_core/_safe_yaml.py

yaml.safe_load without exponential merge-key (<<) expansion (CWE-776).

  • def safe_load(stream: str | bytes | IO[str] | IO[bytes]) -> object (L34) — One YAML document through the safe constructor with exact duplicate keys dropped after each merge flatten, so <<: [*a, *a] chains cost linear work; constructs the same mapping as yaml.safe_load. Used by loaders.py, _load_yaml_model (every schema from_yaml) and DeployScene.from_yaml; private module, not re-exported.

python/core/src/openral_core/loaders.py

Strict YAML loaders for the three scene tiers.

  • def load_scene_strict(path: str, expected: type[DeployScene | SimScene | BenchmarkScene]) -> DeployScene | SimScene | BenchmarkScene (L38) — Loads path as exactly expected, rejecting other tiers with a redirect message naming the right CLI command, so a YAML one tier too rich isn't silently widened.
  • def load_benchmark_suite(path: str) -> list[BenchmarkScene] (L150) — Loads a bare list[BenchmarkScene] from benchmarks/<id>.yaml, each entry's relative paths anchored beside the file; per-scene validation runs here, suite-level invariants do not — call raise_on_invalid_suite separately. Raises FileNotFoundError/ROSConfigError, never a bare ValidationError.
  • def load_suite_task(path: str, task_id: str | None) -> SimScene (L226) — One entry of a suite YAML as a SimScene, for openral sim run --config <suite> --task <id>: picked by task.id (optional for a one-task suite), relative paths anchored beside the suite file, metadata dropped. An unknown or missing task_id raises ROSConfigError listing the suite's task ids.
  • def raise_on_invalid_suite(scenes: list[BenchmarkScene], *, suite_id: str) -> None (L277) — Enforces the suite invariants: non-empty, every task.id unique, and robot_id/n_episodes/seed/metadata identical across scenes (per-scene success_key/max_steps may differ). First violation wins; raises ROSConfigError.

python/core/src/openral_core/scene_paths.py

Resolve a scene YAML's relative file references beside the scene file.

  • SCENE_PEERS_ENV: str (L37) — OPENRAL_SCENE_PEERS: the scene's other robots, a JSON list of {name, robot_id, domain}; each robot's graph runs a peer producer on it, whose grid its safety kernel checks with no exemption (ADR-0137).
  • class ScenePeer(BaseModel) (L44) — One of a scene's other robots, as SCENE_PEERS_ENV names it: name (^[a-z][a-z0-9]{0,23}$), robot_id and domain (0-232); frozen, extra forbidden. The manifest is looked up from robot_id where the graph runs.
  • format_scene_peers(peers: list[ScenePeer]) -> str (L64) — The peers as SCENE_PEERS_ENV carries them (a JSON list of objects).
  • parse_scene_peers(value: str | None) -> list[ScenePeer] (L74) — The inverse of format_scene_peers; empty for None or ""; a ValueError naming OPENRAL_SCENE_PEERS on a bad value.
  • require_peer_domains(peers: list[ScenePeer], own_domain: str | None) -> None (L97) — With peers listed, ROSConfigError unless own_domain (the exported ROS_DOMAIN_ID) is a set integer in 0-232 distinct from every peer's, and no two peers share a name or a domain.
  • SCENE_ROBOT_ENV: str (L33) — OPENRAL_SCENE_ROBOT: this robot's name in a world it shares with others, set by openral deploy fleet (OpenRAL Pro) on each robot's graph, whose scene is that robot's one-robot slice; the Isaac sidecar join and the launch's world-pose gate read it.
  • def anchor_scene_paths(raw: _T, scene_dir: Path) -> _T (L179) — raw (a scene's YAML mapping, unmodified) with scene.assets_uri, backend_options.objects[].usd, runtime.static_geometry_file, runtime.object_detector_onnx, runtime.object_detector_manifest, runtime.reward_monitor_manifest, runtime.scene_vlm_manifest and runtime.vision_attachment.segmenter_manifest made absolute when the file exists beside the scene, hal.defaults.calibration_dir when that directory does, and every drivers[].args *_path when it exists (every scene-relative reference the CLI and the launch resolve, so a copy of the scene written elsewhere — an OpenRAL Pro fleet slice — still points at them); schemes, absolute paths and paths with nothing beside the scene are left for the repo-root / cwd lookups. Applied by load_scene_strict, load_benchmark_suite, load_suite_task, DeployScene.from_yaml and tools/deploy_sim_batch.py, so a scene shipping its own assets (in this repo or another) runs from any directory.

python/core/src/openral_core/clock_sync.py

Host-clock check for a real robot with peers (openral#765, HZ-0137-11): peer data is checked against a 300 ms budget, so chrony must discipline the clock. Run by openral deploy run and by deploy_e2e.launch.py's _scene_peers under hal_mode:=real, so a direct ros2 launch is checked too.

  • CLOCK_LIMIT_S — 0.010; the largest worst-case clock error a real robot with peers accepts; provisional until the Safety-WG sign-off (openral-pro#106 step 5). (L21)
  • class ChronyTracking(NamedTuple) — offset_s, root_delay_s, root_dispersion_s, leap (seconds). (L25)
  • ChronyTracking.worst_case_s -> float — chrony's bound on the error against true time: |offset| + root dispersion + root delay / 2. (L34)
  • chrony_tracking(run=subprocess.run) -> ChronyTracking | None — Fields 4, 10, 11 and the last of chronyc -c tracking; None when chronyc is missing, hangs, fails or prints something unparsable. (L44)
  • require_synced_clock(tracking, limit_s=CLOCK_LIMIT_S) -> None — ROSConfigError unless chrony answered, the leap status is Normal and worst_case_s <= limit_s (fails closed on NaN); the refusal gives the worst case and its parts in ms. (L68)

python/core/src/openral_core/usd_catalog.py

Optional OpenUSD reader for deploy scene declarations; it never imports or starts Isaac Sim.

  • USD_OBJECT_CATALOG_CUSTOM_DATA_KEY: str — Namespaced USD customData key openral:object_catalog_json; on a prim, USD stores it as a nested openral dictionary, while prim_path: "/" reads the equivalent namespaced entry from root-layer customLayerData. (L19)
  • def load_usd_object_catalog(scene: DeployScene, *, scene_path: str | Path) -> USDObjectCatalog | None — Resolves a scene-relative local USD path, lazily imports pxr.Usd by default or invokes the configured reader_python worker, decodes/validates bounded JSON, checks its pinned revision and every referenced prim path, and returns plain typed records. Does not read xforms or simulator state. Requires just sync --group scene-usd only when a scene opts in without an external reader. (L173)

python/core/src/openral_core/tracking_thresholds.py

The one home of the object-tracking and pick-and-place thresholds: python/core/src/openral_core/data/tracking_thresholds.yaml, shipped as openral_core package data so it resolves in a wheel install (every entry commented with units and calibration history). Modules read it; none hard-codes these numbers.

  • class TrackingThresholds(BaseModel) — Frozen, extra="forbid" model with a schema_version and sections fit, tracker, cover, binding, late_bind, release, stall, caps (the kernel's C++ constexpr caps and the schema MAX_* bounds, pinned equal by tests; the schema constants stay literals), hal (vision-leg defaults and gates), deploy (sim/real DeployModeThresholds plus shared launch values, read by deploy_e2e.launch.py), each a frozen range-validated section model. The tracker's TrackerParams / FitParams defaults and every module constant of object_tracker/ read it; the C++ defaults tracked_release_clear_m / tracked_release_timeout_s (kernel) and kReleasedClearTimeoutS (voxel bridge) mirror release.* and are pinned equal by tests/unit/test_tracking_thresholds.py. (L309)
  • DEFAULT_PATH: Path — the packaged openral_core/data/tracking_thresholds.yaml (resolved with importlib.resources). (L25)
  • class DeployModeThresholds(BaseModel) — The deploy.sim / deploy.real launch values: octomap resolution, occupancy / clamping thresholds, world-voxel margin, self-filter trailing sweep, attached-collision and safe-action deadlines. deploy.sim / deploy.real validate through private subclasses whose bounds sit at the reviewed (formerly hard-coded) values, one-directional so the file can only tighten them; the caps section, the shared collision_state_deadline_ms / sensor_model_miss / coverage_margin_m and the hal section's vision-attachment safety gates (grid/evidence ages, segmentation deadline, release-clear ceiling, freeze ceiling, containment radius, payload extents/volume, occluder/support reach ceilings as ceilings; depth-valid fraction and grasp-target min cells/cover as floors) are bounded the same way. (L252)
  • def load_tracking_thresholds(path: Path | None = None) -> TrackingThresholds — Parse and validate the default file (or path); cached per path. A missing file, bad YAML, or a missing, unknown or out-of-range key raises ROSConfigError (no defaults; fails closed at import of every reader). (L332)

python/core/src/openral_core/assets.py

The single resolver for robot description assets — URDF / MJCF / SRDF.

  • class AssetRefError(ValueError) (L82) — A description-asset reference is malformed or cannot be resolved.
  • class AssetFetchError(AssetRefError) (L86) — A well-formed reference whose pinned upstream could not be fetched on this host (raised by resolve_package_uri); the one resolution failure an offline host may skip on, so tests check the type instead of matching the message.
  • def resolve_asset(ref: str, kind: AssetKind, *, manifest_dir: Path | None = None) -> Path | None (L94) — Resolves one asset ref to a concrete file path for the requested kind; one grammar replacing several prior scheme-specific loaders (rd:, file:, gym_aloha:, openarm:, unitree:, makermods:, dispatched through _SCHEME_RESOLVERS — unitree: fetches Unitree's official URDF/MJCF pinned via openral_hal._unitree_h2_assets, AssetFetchError when offline; makermods:<metal|metal_station> (URDF / MJCF only) derives from openral_hal._makermods_metal_assets, its failed clone an AssetFetchError and a derive failure (including an OSError writing into the cache) an AssetRefError; galaxea:a1 (URDF, or the MJCF twin derived from it) is Galaxea's A1 from openral_hal._galaxea_a1_assets, a failed download an AssetFetchError and a digest mismatch an AssetRefError; robotwin:aloha_agilex (URDF / MJCF) is RoboTwin 2.0's URDF, or the MuJoCo twin derived from it, from openral_hal._robotwin_aloha_agilex_assets, a failed read an AssetFetchError and a digest mismatch or failed derive an AssetRefError; robosuite:<robot> (MJCF only) is that robosuite >= 1.5 robot with its default base and grippers composed by openral_hal._robosuite_assets (panda_mobile: PandaOmron), every failure an AssetRefError; behavior:r1pro is the BEHAVIOR-1K R1 Pro from openral_hal._behavior_r1pro_assets — its URDF, or as an MJCF the deploy-sim twin built from it — a failed download an AssetFetchError and a failed MJCF build an AssetRefError; simpler:<file> (URDF only) is a SimplerEnv robot description from the Apache-2.0 simpler-env/ManiSkill2_real2sim via openral_hal._simpler_assets (google_robot), a failed download an AssetFetchError). openarm:<variant> is MJCF-only: bimanual, anvil_v2_bimanual, or openamrobot_v2 (built from the vendored URDF by openral_hal._openamrobot_v2_assets). Raises AssetRefError for an unresolvable or malformed ref.
  • def resolve_package_uri(uri: str) -> Path (L134) — Resolves one ROS package://<pkg>/<relpath> mesh URI to a file inside the pinned clone OpenRAL fetches for <pkg> (openral_hal.ros_package_overlay.PUBLIC_ROS_PACKAGES, lazily imported as _resolve_openarm does); a sourced ROS workspace is not consulted. Raises AssetFetchError when the clone cannot be fetched (cause: the fetcher's ROSConfigError), AssetRefError for a malformed URI, a package OpenRAL does not fetch, or a missing file.
  • def expand_rd_mesh_refs(urdf_xml: str, *, cached_only: bool = False) -> str (L212) — urdf_xml with every filename="rd:<module>:<relpath>" made the absolute <REPOSITORY_PATH>/<relpath> (the pinned robot_descriptions clone, fetched on first use); other refs untouched. For consumers that do not know the scheme: the Isaac importer (openral_sim.backends.isaac_sim._isaac_importable_urdf) and foxglove_bridge (deploy_e2e._portable_robot_description, whose absolute paths _robot_mesh_package then serves as package:// — the bridge's ASSET_URI_ALLOWLIST refuses file://). cached_only never clones or fetches (GIT_ALLOW_PROTOCOL=file while importing the module): an uncached clone raises AssetFetchError at once — the deploy launch's mode. Raises AssetFetchError on a failed clone, AssetRefError without robot_descriptions or on a missing file. The collision lowering keeps its own yourdfpy handler (openral_safety.urdf_lowering._rd_mesh_filename_handler).
  • _REPO_ROOT: Path — Resolved repo root; the base file:<relpath> refs resolve against after the manifest dir. (L77)
  • _ROS2_DYNAMIC: str = "ros2://robot_description" — The dynamic-detection marker scheme; resolve_asset returns None for it so the caller subscribes at runtime instead. (L78)
  • _RD_ATTR: dict[AssetKind, str] — Maps kind to the robot_descriptions module attribute it reads for the rd:<module> scheme. (L79)

HalParameters also carries can_bus_bindings: dict[str, str], mapping a defaults key to the role token naming which physical CAN bus fills it — matched by token, never position, since a CAN interface name is a host property, not a robot one.

python/core/src/openral_core/gpu.py

Torch-free GPU probes shared across layers: one nvidia-smi VRAM query for the CLI and the reasoner ROS node, and one Tegra/L4T host probe for the CLI, the GStreamer platform probe and the hardware detector.

  • const TEGRA_RELEASE_PATH: Final[Path] — /etc/nv_tegra_release, present on every L4T (Jetson) image. (L23)
  • is_tegra_host(release_path=None) -> bool — The one Tegra/L4T probe (None reads TEGRA_RELEASE_PATH at call time, so tests point that constant at a captured fixture), shared by openral_sim._sidecar_common.default_expandable_segments (allocator default), openral_runner…gstreamer.pipeline.detect_platform and openral_detect.probes.gpu._probe_jetson. Answers "L4T image", not "unified memory": DGX Spark (GB10) runs DGX OS. (L26)
  • detect_gpu_vram_gb(field) -> float (L42) — One nvidia-smi --query-gpu=<field> value for GPU 0 in GB; 0.0 on any failure so callers skip their check rather than block.

python/core/src/openral_core/ros_graph_scope.py

Whether a process's ROS graph reaches beyond this host — the one decision shared by openral_cli._dds_scope.confine_real_scope (deploy run) and deploy_e2e.launch.py's _require_host_confined_real_graph (a hand-run hal_mode:=real) and every in-tree vendor real_bringup launch (require_host_confined_real_bringup, issue #556). Lives in core because the launch cannot import openral_cli. Threat model: docs/reference/ros-graph-security.md.

  • const ALLOW_NETWORK_ROS_ENV: Final[str] — "OPENRAL_ALLOW_NETWORK_ROS"; only "1" opts a real robot's graph into spanning hosts. (L39)
  • const RESERVED_DOMAINS: Final[frozenset[int]] — Domains a real robot is never hashed onto (openral_cli._dds_scope.real_domain_id): 0, 42 (tools/_demo_env.sh), 77 (the sim's SIM_DOMAIN_ID), 50–99 (per-PID test domains, covering the lab harnesses' 76/80–92), 100–101 (package conftests' 100 + pid % 100). Public so OpenRAL Pro's fleet domain plan refuses them too. (L55)
  • discovery_range_is_ros_default(env: Mapping[str, str]) -> bool — True when ROS_AUTOMATIC_DISCOVERY_RANGE is unset/empty, or SUBNET without env[ALLOW_NETWORK_ROS_ENV] == "1": source /opt/ros/jazzy/setup.bash exports SUBNET whenever it is unset (set-if-unset in ros_environment's 1.ros_discovery.dsv), so the variable alone cannot mark a choice. Used by confine_sim_scope / confine_real_scope to decide when to default LOCALHOST. (L101)
  • networked_ros_scope(env: Mapping[str, str]) -> str | None — The scope description when env reaches other hosts (ROS_STATIC_PEERS set, or ROS_AUTOMATIC_DISCOVERY_RANGE unset/empty — SUBNET to ROS — or anything but LOCALHOST/OFF; and always a Fast DDS ROS_DISCOVERY_SERVER, RMW_IMPLEMENTATION=rmw_zenoh_cpp, or a vendor XML config that lists peers or cannot be read — CYCLONEDDS_URI <Peers>, a FASTRTPS_/FASTDDS_DEFAULT_PROFILES_FILE initialPeersList / discoveryServersList), else None; ROS_LOCALHOST_ONLY=1 overrides the range and peers, as in rcl. (L127)
  • require_host_confined_ros_scope(env: Mapping[str, str]) -> str | None — Raises ROSConfigError on ROS_AUTOMATIC_DISCOVERY_RANGE=OFF (it hides the robot's own nodes from each other), on a networked scope unless env[ALLOW_NETWORK_ROS_ENV] == "1", and on an opted-in networked scope without SROS2 or on rmw_zenoh_cpp (ADR-0130). Whenever ROS_SECURITY_ENABLE=true, whatever the scope, it also applies openral_core.ros_security.require_secure_ros_graph. Returns the scope when opted in and secured, so the caller logs the hazard (deploy_e2e.launch.py's gate does, once per deploy; confine_real_scope deliberately does not, #558); None when confined. (L166)
  • require_host_confined_real_bringup(launch: str, env: Mapping[str, str], *, included_by_deploy: bool) -> None — The gate every in-tree vendor real_bringup launch (openral_hal_openarm, openral_hal_unitree) runs on its own os.environ before composing any node (issue #556): require_host_confined_ros_scope, plus a structlog ros_graph_scope.real_bringup_networked warning for an opted-in scope on a hand run only (under deploy_e2e, whose hal_mode the launch sees, the deploy gate is the one emitter, #558). Pinned per launch by tests/integration/test_real_bringup_graph_gate_live.py. (L237)

python/core/src/openral_core/ros_security.py

SROS2 (DDS-Security) enclaves for an OpenRAL graph (ADR-0130): the enclave names, the per-robot policy and the keystore check shared by the scope gate, openral deploy, the deploy launch and the operator CLIs. Threat model and the enclave table: docs/reference/ros-graph-security.md.

  • const ENCLAVE_OVERRIDE_ENV: Final[str] — "ROS_SECURITY_ENCLAVE_OVERRIDE"; rcl reads it before --enclave, so it pins one process's enclave. (L43)
  • const DEFAULT_ENCLAVE: Final[str] — "/": every process the launch does not name, and any peer given the default key. (L46)
  • const KERNEL_ENCLAVE: Final[str] — "/openral/safety_kernel": the C++ kernel, the only enclave allowed to publish /openral/safe_action. (L48)
  • const HAL_ENCLAVE: Final[str] — "/openral/hal": the HAL plus the vendor ros2_control bringup and scene drivers. (L50)
  • const LAUNCH_ENCLAVE: Final[str] — "/openral/launch": ros2 launch and tools/lifecycle_autostart.py, the only enclaves besides the kernel's allowed change_state on protected nodes. (L52)
  • const OPERATOR_ENCLAVE: Final[str] — "/openral/operator": the dashboard, openral estop reset, openral prompt. (L54)
  • const OPENRAL_ENCLAVES: Final[tuple[str, ...]] — all five; a keystore must hold each. (L56)
  • ros_security_enabled(env: Mapping[str, str]) -> bool — ROS_SECURITY_ENABLE is exactly "true", as rcl reads it. (L75)
  • require_secure_ros_graph(env: Mapping[str, str]) -> Path — Raises ROSConfigError unless ROS_SECURITY_ENABLE=true, ROS_SECURITY_STRATEGY=Enforce, ROS_SECURITY_KEYSTORE holds every enclave in OPENRAL_ENCLAVES with its keys and signed files, the signed governance (governance.p7s, what DDS loads) admits ROS_DOMAIN_ID (unset = 0, non-numeric refused), and every enclave but the kernel's has signed permissions denying /openral/safe_action publication (the default enclave also estop_reset and the kernel's change_state), so an allow-everything keystore is refused; returns the keystore path. (L135)
  • default_operator_enclave(env: MutableMapping[str, str]) -> None — When security is on, defaults ROS_SECURITY_ENCLAVE_OVERRIDE to OPERATOR_ENCLAVE in place (an exported one wins); called by openral estop reset, openral prompt and openral dashboard. (L208)
  • render_sros2_policy(onboard_compute: Mapping[str, object]) -> str — The sros2 0.2.0 policy for one robot: per enclave, deny rules for the protected surfaces it does not need (command topics incl. the manifest's command_topic / gripper_command_topic, state topics incl. joint_state_topic, /openral/estop_reset, /controller_manager/*, the trajectory action, and change_state / set_parameters* on the kernel, HAL, E-stop producers, compliance recorder and safety_controller), then allow /*. The operator keeps /safety_controller parameters (the G1 blend-in). (L265)

python/core/src/openral_core/can.py

Robot-agnostic SocketCAN transport discovery — a CAN-bus robot is invisible to USB/serial discovery, so this is the one place that reads the kernel's view of CAN links. Linux-only, dependency-free, needs no root, and never perturbs a running robot.

  • _ARPHRD_CAN: int = 280 — The /sys/class/net/<if>/type value marking a CAN link. (L40)
  • _CLASSIC_CAN_MTU: int = 16 — Classic CAN's MTU; CAN FD needs 72, so MTU is the FD indicator on hosts without ip. (L44)
  • SYSFS_NET: str = "/sys/class/net" — Sysfs root for network devices, as a module constant so tests can point enumeration at a fixture tree. (L48)
  • class CanInterface(NamedTuple) — One SocketCAN interface on the host; state is the field to check when a detected arm won't move. (L51)
  • enumerate_can_interfaces(*, sysfs_net=None) -> list[CanInterface] — Lists CAN interfaces from sysfs, enriched with bitrate/FD/state via ip -details -json link show when available. (L208)
  • can_link_state(interface, *, sysfs_net=None) -> tuple[bool, str] — Single-interface counterpart: (is_up, reason) naming the specific problem. (L274)
  • preflight_can_links(interfaces, *, hal_label, remedy="", sysfs_net=None) -> dict[str, str] — The connect-time gate every CAN robot needs; reports every failing bus in one message and raises ROSConfigError otherwise. (L303)

python/core/src/openral_core/depth_extrinsic.py

The depth-camera extrinsic a real world-voxel deploy runs on. OpenRAL does not measure it: the operator calibrates the mount and declares it in the manifest (static_transform_calibrated: true) or a unit overlay; this module states the accuracy that needs (MAX_*, derived from the real world-voxel margin) and the provenance gate openral deploy run applies. numpy-free, outside openral_core.__init__, so the launch file can import the margin cheaply.

  • REAL_WORLD_VOXEL_MARGIN_M: Final[float] = 0.02 (L35) — The kernel's real-deploy world_voxel_margin_m (deploy_e2e.launch.py::_world_voxel_margin_m returns it); the required accuracy below derives from it.
  • CHECKED_RANGE_M: Final[float] = 1.0 (L40) — Range at which an angular error is converted to metres.
  • MAX_HEIGHT_ERR_M: Final[float] (L43) — Half the margin (10 mm).
  • MAX_TILT_DEG: Final[float] (L44) — atan(MAX_HEIGHT_ERR_M / CHECKED_RANGE_M) (~0.57°): tilt error at 1 m plus height error never exceed the margin.
  • MAX_PLANAR_ERR_M: Final[float] (L47) — Three quarters of the margin (15 mm): the camera's horizontal error.
  • DEFAULT_ESTIMATED_DEPTH_RSKILL: Final[str] (L52) — rskill-da3metric_large-any-metric_depth-bf16: the depth_estimator rSkill an estimated-depth camera runs when DeployRuntime.estimated_depth_rskill names none (the launch's _ESTIMATED_DEPTH_RSKILL and openral deploy's auto-pick WARN read it).
  • MAX_YAW_DEG: Final[float] (L48) — atan(MAX_PLANAR_ERR_M / CHECKED_RANGE_M) (~0.86°).
  • depth_extrinsic_problems(description, overlays, scene_sensors=(), *, estimated_camera=None) -> list[str] (L55) — Every cloud source whose mount a real world-voxel deploy may not trust (estimated_camera's mount — its own or the one it shares_mount_with — counts as one): a robot-mounted one (SensorSpec.is_cloud_source) must get its static_transform_xyz_rpy from one of the unit's SensorOverlays, never the manifest's nominal value; a scene-mounted one must declare parent_frame + static_transform_xyz_rpy. Provenance, not correctness. Empty = go.
  • class EstimatedDepthMount(NamedTuple) (L122) — cloud_frame (REP-103 optical frame DA3's depth/CameraInfo/cloud are stamped in), optical_parent (body-convention mount the launch hangs it under, or None), mount_sensor (whose mount places the camera; the real extrinsic gate checks it), problems.
  • resolve_estimated_depth_camera(sensors, camera, *, hal_mode, scene_sensor_names=(), calibrated_intrinsics=()) -> EstimatedDepthMount (L142) — Any RGB camera with intrinsics (top, context, wrist) tied to the robot: a declared parent_frame + static_transform_xyz_rpy on it or on its shares_mount_with sensor (sim and real; body mounts get a <frame>_optical_frame child), or in sim an *_optical_frame the bridge places from the MJCF. Refuses world, bare robot links, depth sensors, missing intrinsics, on a real deploy a camera with no deploy_binding or with only the manifest's nominal intrinsics (DA3's metres scale with the focal: it needs its driver's CameraInfo — a ros2_image binding with a topic — or this unit's calibrated intrinsics, calibrated_intrinsics = the overlays that set them) or a non-bool backend_params.rectified, and REFUSES any camera whenever the robot or the scene has any measured depth or point-cloud sensor (is_cloud_source), in sim and real, no override — naming each such sensor as robot or scene (scene_sensor_names) (HZ-0382-6). Shared by openral deploy and deploy_e2e.launch.py.
  • auto_estimated_depth_camera(sensors, *, hal_mode, scene_sensor_names=(), calibrated_intrinsics=()) -> str (L305) — runtime.enable_octomap: true (explicit) with no cloud (no pinned octomap_cloud_topic, no measured sensor's cloud: deploy_cloud_topic empty) and no estimated_depth_camera: the one RGB camera resolve_estimated_depth_camera accepts (same args). ROSConfigError when none qualifies (every RGB camera's problems listed, so a measured sensor's HZ-0382-6 refusal shows) or several do (named; set runtime.estimated_depth_camera) — never first-wins. Never reached with enable_octomap unset (an estimate never auto-enables octomap). Shared by openral deploy (resolve_launch_invocation, which forwards the pick as estimated_depth_camera:=) and deploy_e2e.launch.py (a direct ros2 launch).
  • optical_frame_id(frame_id) -> str (L382) — The REP-103 optical frame of a camera mount frame: an *_optical_frame as is, else <frame_id>_optical_frame. The one copy of this rule (resolve_estimated_depth_camera, openral_hal.depth_cloud.depth_optical_frame_id, image_frame_id).
  • class OpticalMount(NamedTuple) (L429) — sensor (the SensorSpec whose mount places the camera: itself, or the one it shares_mount_with), frame (that mount's frame_id), optical (its optical_frame_id; where it differs from frame, a child a publisher must hang under frame).
  • policy_depth_source(sensors, camera, *, estimated_depth_camera=None) -> str (L486) — The camera whose DEPTH_IMAGE stream carries depth for a policy's RGB camera: itself when it is estimated_depth_camera (the depth provider runs a depth_estimator rSkill on it) or a depth sensor, else the depth sensor sharing its mount (shares_mount_with, either direction). A depth sensor elsewhere does not count. ROSConfigError naming both fixes (set runtime.estimated_depth_camera, or declare an RGB-D partner) when none. Called by the internvla_n1 adapter for a depth_input: metric checkpoint.
  • optical_mount(spec, sensors) -> OpticalMount | None (L446) — Issue #641: the one rule for the mount a camera's pixels are placed through. A camera that shares_mount_with another sensor of sensors → that sensor's mount (no pose needed on the camera); one with its own parent_frame + static_transform_xyz_rpy → its own frame_id; any other → None (it keeps its frame_id). Read by image_frame_id (the object lift), resolve_estimated_depth_camera (DA3, which adds its own "mount is declared" refusal), depth_extrinsic_problems (which mount an estimated-depth camera's calibration is checked on), deploy_e2e.launch.py::_optical_mounts (real) and openral_hal.sim_sensor_bridge._static_optical_mount (sim), so a frame one names is a frame another publishes.
  • image_frame_id(spec, sensors) -> str (L399) — The tf2 frame a camera's pixels are in: a camera that shares_mount_with another sensor of sensors is in that mount's optical_frame_id (OpenAMRobot / OpenArm top on head_zed → zed_camera_link_optical_frame), one with its own mount (parent_frame + static_transform_xyz_rpy) in its optical_frame_id (MakerMods top_camera → top_camera_optical_frame, latched by the sim bridge), any other its own frame_id — optical_mount(...).optical, else spec.frame_id. Used by the sim bridge's RGB Image header and CameraInfo and the world-state lift's manifest fallback.

python/core/src/openral_core/robot_ui.py

Contracts between a robot and its dashboard UI (ADR-0129): the robot manifest (Interface A) the deploy emits and GET /api/manifest serves, and the robot enrolment (Interface B) openral robot link writes. Re-exported by openral_core.__init__.

  • RSKILLS_ENV = "OPENRAL_RSKILLS" (L86) — The robot's curated rSkill list (comma-separated rSkill ids), set per robot on openral.com and applied as an account setting; the reasoner's palette and the manifest's skill:* actions admit only these. Unset or empty: every installed rSkill.
  • allowed_rskills_from_env(environ=None) -> frozenset[str] | None (L294) — The ids in OPENRAL_RSKILLS (os.environ when environ is None), trimmed and casefolded (Hugging Face repo ids are case-insensitive), so compare with rskill_listed, never in; None when it lists none (no restriction).
  • rskill_listed(rskill_id, allowed) -> bool (L321) — Whether the robot's rSkill list (allowed_rskills_from_env) admits rskill_id: True when allowed is None, else a casefolded membership test.
  • casefold_rskills(ids) -> frozenset[str] | None (L333) — A caller's rSkill list casefolded, as rskill_listed compares it; None kept.
  • CORRELATION_ID_PATTERN = r"[A-Za-z0-9][A-Za-z0-9._:-]{0,127}" (L132) — A caller's id for one prompt (echoed into the mission, telemetry and the dashboard): 1–128 chars, alphanumeric first, no spaces, quotes or control characters. Match it with re.fullmatch (under re.search a $ lets a trailing newline through); the prompt action's args_schema anchors it with (?![\s\S]).
  • WRITE_CONTROLS_ENV = "OPENRAL_DASHBOARD_WRITE_CONTROLS" (L82) — 1 (only) puts skill:* actions in the manifest and lets the dashboard run them.
  • REMOTE_CONTROL_ENV = "OPENRAL_DASHBOARD_REMOTE_CONTROL" (L84) — 1 (only) allows reset, prompt and skills over the tunnel listener.
  • ENROLMENT_PATH_ENV = "OPENRAL_ROBOT_ENROLMENT" (L91) — Overrides where the enrolment lives.
  • TRUSTED_ISSUERS: tuple[str, ...] (L93) — ("https://www.openral.com", "https://dev.openral.com"): the origins a link code's iss may name.
  • TRUSTED_ISSUERS_ENV = "OPENRAL_TRUSTED_ISSUERS" (L95) — Comma-separated origins that replace TRUSTED_ISSUERS (self-hosted issuer, tests); a listed origin may also serve another issuer's jwks.
  • CameraPosition (L148) — Literal["left", "center", "right"]: a camera tile's slot in the console's camera row.
  • camera_position(sensor) -> CameraPosition (L154) — From the sensor's name, frame_id and parent_frame: left/right when one names a side; left when one says wrist, hand, gripper or eef; center otherwise (overhead, head, torso, base, world). Used by build_robot_manifest for camera panels.
  • class ManifestPanel(BaseModel) (L184) — id, type (identity | camera | joints | map | pointcloud | reasoner | rskill | reward | safety_status | safety_ledger | system | metrics | events | world_state | viz3d), title, source (camera sensor name), position (CameraPosition for camera panels, else None). Frozen, extra="forbid".
  • class ManifestAction(BaseModel) (L205) — id, kind (estop | estop_reset | prompt | skill), label, min_role (viewer | operator), remote, confirm, args_schema (JSON Schema or None).
  • class RobotManifest(BaseModel) (L229) — schema_version (wire alias schema, 1), robot_id, name, embodiment_kind, unit_serial, base_frame (the 3D view's follow frame), panels, actions.
  • rskill_matches_robot(skill, capabilities, *, commercial_deployment=False) -> bool (L259) — The one "may this robot offer this rSkill" predicate: not the scaffold template, kind in EXECUTE_RSKILL_KINDS, an embodiment_tags overlap, every capabilities_required key a True flag, and a commercial-use licence on a commercial deployment. Shared by build_tool_palette and build_robot_manifest.
  • build_robot_manifest(robot, runtime, installed, *, bridge_on, write_controls, remote_control, commercial_deployment=False, unit_serial=None, allowed_rskill_ids=None) -> RobotManifest (L338) — Panels from the robot's image sensors (each with its camera_position), joints, the resolved DeployRuntime toggles (None reads as off) and the bridge; actions estop (viewer, always remote), estop_reset (operator, confirm), prompt (operator, when the reasoner runs) and, with write controls, one skill:<name> per installed rSkill rskill_matches_robot admits and, when given, allowed_rskill_ids lists (args_schema = goal_params_schema or an empty object schema); remote on all but estop = remote_control.
  • robot_instance_id() -> str (python/core/src/openral_core/robot_ui.py L558) — Which robot this is, for RobotManifest.instance_id: its openral.com robot id when linked (the enrolment's robot), else local:<host>:<ROS_DOMAIN_ID>; an unreadable enrolment falls back to the local id. Both manifest builders set it (the deploy launch's file and the reasoner's re-emission), so two robots of one model, or two sims on one machine, differ (#663).
  • class RobotEnrolment(BaseModel) (L468) — v (1), robot, aud (https), org ("" for a free robot), iss (https), jwks (https, or http on loopback). Frozen, extra="forbid". A model validator pins iss's origin to TRUSTED_ISSUERS (or $OPENRAL_TRUSTED_ISSUERS) and jwks to iss's origin unless the override lists the jwks origin, so both parse_robot_link_code and every stored-enrolment load refuse a foreign issuer.
  • enrolment_path() -> Path (L547) — $OPENRAL_ROBOT_ENROLMENT, else ~/.config/openral/robot.json.
  • robot_secret_path() -> Path (L553) — robot.secret beside enrolment_path(): the robot's openral.com credential openral robot link writes; read by openral_cli.robot.apply_account_settings and the dashboard's /api/robot-settings relay.
  • parse_robot_link_code(code) -> tuple[RobotEnrolment, str, str | None] (L583) — Decode a base64url (padding optional) link code into the enrolment, the tunnel token and the robot's settings secret (ors_…, optional); ROSConfigError on anything malformed.

python/core/src/openral_core/geometry.py

Shared rotation geometry — look-at/camera gaze poses plus planar yaw↔quaternion helpers, so every layer uses one implementation instead of duplicating them. Import-on-demand, not re-exported by openral_core.__init__, so schemas stay numpy-free on the fast CLI path.

  • ViewAxis (TypeAlias = Literal["-z", "+z", "+x"]) — Camera forward-axis conventions: "-z" MuJoCo, "+z" ROS optical frames, "+x" body-frame forward.
  • _ZERO_NORM: float = 1e-9 — Below this vector norm, look_at_quat_wxyz treats the gaze direction as degenerate. (L62)
  • _PARALLEL: float = 0.999 — Above this |cos| between gaze and up, look_at_quat_wxyz swaps to the alternate up vector. (L63)
  • _QUAT_NORM_EPS: float = 1e-12 — Below this squared norm, a quaternion is treated as degenerate. (L64)
  • look_at_quat_wxyz(eye, target, *, up=(0,0,1), view_axis="-z") -> tuple[float, float, float, float] — Unit quaternion orienting a camera at eye so view_axis points at target; never raises, falling back to a fixed orientation on degenerate input. (L199)
  • compute_gaze_pose(camera_xyz, target_xyz, *, frame_id="map", up=(0,0,1), view_axis="+z") -> Pose6D — Full 6-DOF camera pose whose view axis hits target_xyz. (L262)
  • rotation_to_quat_wxyz(rot: 3x3) -> tuple[w, x, y, z] — Matrix→quaternion conversion (Shepperd's method). (L185)
  • homogeneous_from_quat_xyz(translation, quat_xyzw) -> NDArray[np.float64] — The canonical TF2 transform→4x4-matrix step; raises ROSConfigError on a degenerate rotation rather than guessing. (L67)
  • freeze_released_attachment(held, *, base_link, t_base_from_link, stamp_ns) -> AttachedCollisionObject (L298) — The released payload re-expressed on the collision model's root link at its DETACH pose, stamped stamp_ns (the release instant, not the attach one: the kernel opens a release window closed when its record's stamp predates the last base motion, so a payload carried across a drive kept its attach stamp and lost its window): geometry, evidence and force attestation kept, support_contact dropped (the held payload's own is the grasp-time map_support_under:* witness, a claim about the ATTACH pose that would ride the record misplaced through the window; the place leg's set-down witness is decorated per publish, PlaceTargetLeg.decorate, and still rides the record); touch_links = the held attach link + its touch links (nothing the held record did not already exempt); evidence_ref suffixed |frozen_release; released_by_link = the held attach link, which makes the kernel treat it as a frozen payload (never world-checked; Spark v_off_dr, 2026-11-02: without it the frozen banana latched a world stop on the bowl). The root link stays put only while the base does: on a mobile base a base move invalidates the record (the release window closes). Root, not hand: the kernel places a record at link_world[attach_link] in every predicted configuration, so a hand-attached record would follow the retreat. Shared by the HAL release window and the object tracker's release (moved from openral_hal.vision_attachment_bridge, 2026-11-02).
  • yaw_to_quat_xyzw(yaw: float) -> tuple[x, y, z, w] — Unit quaternion (ROS order) for Rz(yaw). (L121)
  • is_gravity_aligned(quat_xyzw) -> bool (L375) — Whether a box orientation is yaw-only (its z axis the frame's, within _GRAVITY_TOL); the one predicate rebase_box and the deploy's _check_place_zone_frames share.
  • rebase_box(box, t_frame_from_box, frame) -> PlaceRegion (L391) — A gravity-aligned declared box re-expressed in frame through tf2 frame <- box, still yaw-only (the transform's tilt, at most 0.5°, dropped; more, or a tilted box, is a ROSConfigError). Shared by the HAL grasp-target leg (search_box / workspace_box in odom / map) and the object tracker (TrackerSession._zone_region, a PlaceZone in map / odom); moved down from openral_hal._grasp_target_leg so Layer 2 need not import Layer 0.
  • rebase_pose(pose, t_frame_from_pose, frame) -> Pose6D (L441) — pose re-expressed in frame through t_frame_from_pose (tf2 frame <- pose), the full rigid motion, tilt included (rebase_box keeps a declared box yaw-only). The object tracker carries payload primitives and released records across a base move with it.
  • base_displaced(reference, now, prismatic, *, planar_m, turn_rad) -> bool (L468) — Whether a mobile base's base_joints positions left reference: the prismatic dofs' planar distance past planar_m, or a revolute dof's wrapped angle past turn_rad; None or a non-finite value on either side counts as moved (fail closed). One copy for the HAL's release window / grasp-target leg (openral_hal.vision_attachment_bridge.base_displaced, at BASE_STILL_*) and the Layer-2 object tracker's base-move carry (TrackerSession.on_joint_state, at STATION_*).
  • base_prismatic(description) -> tuple[bool, ...] (L519) — Per base_joints entry, whether it is prismatic (base_displaced's mask).
  • yaw_to_quat_wxyz(yaw: float) -> tuple[w, x, y, z] — Same rotation in MuJoCo order. (L132)
  • quat_xyzw_to_yaw(x, y, z, w) -> float — Planar yaw in [-pi, pi], roll/pitch ignored. (L143)

python/core/src/openral_core/kinematics.py

Manifest forward kinematics and oriented-box helpers, moved down from openral_hal.vision_attachment_bridge (issue #418) so the Layer-2 object tracker poses the hand from joint states without importing the HAL; the HAL imports them from here. URDF / kernel convention (origin · motion(q), R = Rz Ry Rx), mimic followers through MimicJoint.value_at; pinned against the URDF by tests/unit/test_urdf_joint_map.py. Not re-exported from openral_core.__init__.

  • Box (TypeAlias) — (centre (3,), rotation (3, 3), half_extents (3,)) oriented box. (L43)
  • bounding_half_extents(shape) -> NDArray (L51) — Half extents of the box containing a box / sphere / capsule primitive (distances on it are lower bounds).
  • transform_from_xyz_rpy(xyz, rpy) -> NDArray (L73) — (4, 4) from translation + URDF fixed-axis RPY.
  • joint_motion(joint, q) -> NDArray (L93) — Revolute/continuous (Rodrigues) or prismatic motion after the joint origin; any other type is ROSConfigError.
  • edge_chain(description, root, link) -> tuple[tuple[edge, origin], ...] | None (L128) — The (edge, origin) chain from root down to link through joints, mimic_joints and fixed_attachments; None off root's subtree.
  • link_transform(description, root, link, positions) -> NDArray (L160) — T_root<-link at joint positions by name, mimic- and urdf_curve-aware (never tf's jaw-fraction-as-radians); ROSConfigError off the subtree or on a missing position.
  • box_gap_lower_bound_m(a, b) -> float (L198) — Separating-axis (15 axes) lower bound on the distance between two oriented boxes; exact on a face normal, <= 0 exactly on overlap. Not a kernel mirror (see 14-duplication-watch.md "Convex distance").

python/core/src/openral_core/moveit_config.py

MoveIt's robot model for any robot, generated from its manifest so move_group agrees with the safety kernel: the URDF tree with manifest joint names, the kernel's collision_geometry as the only collision shapes (tight hulls as STL meshes), allowed_collision_pairs as the only self-collision exemptions, one openral_home group. The deploy launch passes the strings as parameters (_moveit_home_nodes).

  • const MOVEIT_HOME_GROUP = "openral_home" — The planning group a move home plans in. (L36)
  • const ACCEL_RAMP_S = 0.5 — Seconds a planned joint takes to reach its velocity limit (calibration point; manifests carry no acceleration limit). (L94)
  • home_group_joints(desc) -> list[str] (L82) — The joints home_pose names, grippers excluded, in manifest order.
  • moveit_joint_limits(desc) -> dict[str, dict[str, float | bool]] (L97) — robot_description_planning.joint_limits for the home group: velocity_limit, and that over ACCEL_RAMP_S.
  • const MOVEIT_ALL_GROUP = "openral_all" — The group of every joint MoveIt may move (a joint goal over several arms). (L39)
  • const PATH_CHECK_FRACTION = 0.0005 — OMPL's collision-check step along a path (calibration point: 0.005 let an r1pro finger pass through its torso). (L71)
  • all_group_joints(desc) -> list[str] (L47) — Every joint but the planar base's and the grippers.
  • end_effector_tip_link(desc, ee_name) -> str (L768) — The link an arm chain ends at: parent_link, the parent of the joint named after it, the parent of the only gripper joint, else its own name.
  • manifest_link_aliases(desc, urdf_text) -> dict[str, str] (L218) — Manifest links the URDF names differently (an MJCF-derived manifest), mapped through the matched joints.
  • model_link(desc, urdf_text, link) -> str (L731) — The name the generated model gives a manifest link: the model renames vendor/MJCF links to the manifest's names, except one the manifest also names by its URDF name.
  • moveit_groups(desc, urdf_text) -> dict[str, tuple[str, str]] (L799) — One chain group per end effector and per camera a joint chain moves: (base_link, tip_link).
  • moveit_kinematics(desc, urdf_text) -> dict[str, dict[str, object]] (L848) — KDL per chain group; position-only under six joints.
  • moveit_ompl_groups(desc, urdf_text) -> dict[str, dict[str, float]] (L74) — ompl.<group>.longest_valid_segment_fraction for every group.
  • moveit_source_urdf(desc, manifest_dir=None) -> str (L257) — The URDF text the model is built from: assets.urdf, else assets.mjcf converted by mjcf_to_urdf; ROSConfigError with neither (pusht_2d) or a runtime-only URDF, AssetRefError when the ref does not resolve. A manifest gripper joint the model lacks (sawyer's bare-arm MJCF) is left out of the model; any other unmatched joint raises.
  • moveit_urdf(desc, urdf_text, mesh_dir=None) -> str (L411) — The URDF with every manifest joint renamed (mimics too), ±inf bounds dropped (urdfdom cannot parse them), collisions replaced by the kernel primitives (capsule = cylinder + 2 spheres; a tight-hull box = its hull mesh in mesh_dir), visuals and transmission / ros2_control / Gazebo blocks dropped.
  • moveit_srdf(desc, urdf_text) -> str (L875) — The openral_home group and disable_collisions = allowed_collision_pairs; no virtual joint (the URDF root is the model frame). ROSConfigError without a home pose.

python/core/src/openral_core/mjcf_urdf.py

An MJCF's kinematic tree as a URDF (MJCF names kept), for MoveIt's model of a robot that ships no URDF. Lazy mujoco import.

  • mjcf_to_urdf(path) -> str (L91) — Bodies → links (the world body is the root world), hinge / slide → revolute (continuous unlimited) / prismatic with the joint's range, no joint or a free joint → fixed (the floating base is the identity root, as in the kernel's MJCF lowering); an off-origin anchor or several joints on one body get <body>__<joint> intermediate links so the URDF moves exactly as MuJoCo does (qpos0 folded into the origin); a linear joint <equality> → <mimic>. No inertia, visuals or collisions. ROSConfigError without mujoco, on a non-compiling MJCF, or on a ball joint.

python/core/src/openral_core/urdf_joints.py

URDF joints and which one each manifest joint drives, by the URDF's own structure (moved here from the Isaac backend, which re-exports them; MoveIt's model needs them too).

  • class UrdfJoint — One <joint>: name, type, parent, child, limits, mimic. (L23)
  • parse_urdf_joints(source) -> dict[str, UrdfJoint] (L35) — Every joint of a URDF file (Path) or XML text (str).
  • urdf_subtree_links(urdf, root) -> set[str] (L74) — Every link below root.
  • match_urdf_joint(j, urdf, claimed) -> str (L89) — The URDF joint a manifest joint drives: its name, the same (parent, child), sim_joint_name, else the one unclaimed movable non-mimic joint below its parent link; ROSConfigError otherwise.

python/core/src/openral_core/moveit_scene.py

ROS-free maths behind the MoveIt world-octomap bridge (moveit_scene_node): decode the kernel's oriented OccupancyVoxels lattice, drop cells near the robot's manifest collision volume (MoveIt 2.12 refuses a start state in collision), encode the rest as an OcTree binary stream (octomap depth 16, key = cell index + 32768, so the octomap pose is the grid pose). Byte-checked against liboctomap writeBinaryData.

  • const OCTREE_KEY_OFFSET = 32768 — Added to a cell index to get its octree key. (L41)
  • occupied_cell_indices(occupancy, size_x, size_y, size_z) -> NDArray[int64] (L48) — (N, 3) indices of non-zero cells (row-major, x fastest).
  • quat_to_matrix(q_xyzw) -> NDArray (L78) — Rotation of a unit quaternion; ROSConfigError when not unit (incl. all-zero).
  • grid_pose(origin, q_xyzw) -> NDArray (L104) — (4, 4) lattice pose in the message frame.
  • cells_clear_of_robot(indices, resolution, t_frame_grid, geometry, link_poses, padding_m) -> NDArray[int64] (L132) — Cells whose centre is more than padding_m from every capsule/sphere/box primitive; links without a pose are skipped.
  • octree_binary(keys) -> bytes (L176) — OcTree binary stream of the occupied keys, unpruned; b"" when empty; ROSConfigError for a key outside [0, 65536).

python/core/src/openral_core/perception_geometry.py

Pre-grasp target geometry (design note docs/reference/real-pick-place-design.md §2.2): seed from the voxel map, SAM prompt projection, a measured region from mask + depth, a map cross-check and a re-prompt tracking gate. Pure numpy, no ROS; the producer node that wires it is a follow-up. Every threshold is a calibration point; the caps are the Safety-WG placeholders. Moved down from openral_hal._grasp_target (issue #418) so the Layer-2 tracker can import it.

  • class TargetRefusal(StrEnum) (L130) — TOO_FEW_CELLS, AMBIGUOUS (another cluster ≥ ambiguity_ratio of the anchored target's — HZ-0115-2), TOO_FEW_POINTS, NO_HEIGHT_ABOVE_SUPPORT, NOT_ON_SUPPORT (the mask cloud ends > 2 voxels above the support — HZ-0115-6), HALF_EXTENT_CAP, VOLUME_CAP, STACKED (a candidate mask holding a nested candidate refused NOT_ON_SUPPORT with ≥ 2 voxels of height — HZ-0115-6). _REFUSAL_SEVERITY orders them most severe first.
  • class VoxelLattice(frame_id, origin, orientation_xyzw, resolution, size, occupancy) (L174) — The OccupancyVoxels fields, same convention as bucket2_markers.occupied_voxel_centers (re-derived, cross-checked in tests/unit/test_grasp_target.py). Raises ROSConfigError on a length mismatch, non-positive resolution or non-unit orientation. occupied_centers() is computed once per lattice and cached read-only (the producer legs warm it at grid receipt, outside the vision bridge's lock).
  • rotation() -> NDArray (L219) — lattice axes → frame_id.
  • occupied_centers() -> NDArray (L223) — (N, 3) occupied cell centres in frame_id, vectorised.
  • class TargetSeed (L261) — point | None, refusal | None, cluster_sizes (the anchored target's first, the rest descending), bottom_z | None (the selected cluster's lowest cell's bottom face).
  • module const EXTRINSIC_ERROR_M = 0.01 (L157) — Camera-mount error budget of a target fit (target_region_from_mask's default). Calibration point.
  • fit_pad_m(resolution, extrinsic_error_m=EXTRINSIC_ERROR_M) -> float (L160) — The padding a target fit adds to its sides and top: half a cell diagonal plus the mount error.
  • class TargetRegionFit (L279) — region: PlaceRegion | None, refusal | None, point_count, depth_valid_fraction, half_extents, box: PlaceRegion | None = None (the fitted box on a NOT_ON_SUPPORT refusal — the visible part — for the leg's occlusion test, _refused_fit), z_span: float = 0.0 (trimmed cloud height, top minus lowest point; target_region_from_masks vetoes on it), support_z: float | None = None (the support the region stands on: measured, or one voxel under the target's own lowest kept point when unseen — the lower face is always support_z + resolution), support_unseen: bool = False.
  • occupied_centers_in_box(grid, box: PlaceRegion) -> NDArray (L327) — Occupied centres inside an oriented box (the declaration's search box — reasoner-grounded, or a direct-dispatch scene's); refuses a frame mismatch with ROSConfigError.
  • support_top_from_voxels(grid, centers, *, near_xy, min_cells, probe_margin_m=0.05, surface_centers=None) -> float | None (L369) — The measured support the target stands on (HZ-0115-6): scanning the column's z-layers top-down, the first layer holding ≥ min_cells top-surface cells (nothing occupied directly above) in the ring between one cell and probe_margin_m around the footprint of the component above it holding the anchor (the highest cell of the occupied column nearest near_xy, the same cell at every layer, so a taller neighbour never turns the target's top into its support, HZ-0115-2) — a surface extends past what stands on it, the target's own layers (a dense top included) do not; the probe scales with the target. The ring is counted on surface_centers (default centers) — it lies outside the target's footprint, so mostly outside a tightly padded search column; the leg passes the column grown by probe_margin_m + one cell. None when no layer qualifies. Ceiling: a target flaring > 1 cell can stop the scan inside it (region stands higher — less exemption). The ring dilation is clipped to the occupied+around cells' xy span, so a near-zero message resolution cannot request an ~(2·margin/resolution)² square. ROSConfigError on a tilted (non-z-up) lattice or a probe_margin_m under two cells (an empty ring; never silently widened — the leg checks first and reports a probe_margin_under_two_cells lost view).
  • target_seed_from_voxels(grid, centers, *, near_xy, support_z, min_cells, ambiguity_ratio=0.5) -> TargetSeed (L548) — Drops cells within one voxel of the support plane, labels 26-connected components on the lattice, returns the top-centre of the cluster holding the anchor (the highest cell of the occupied column nearest near_xy — never merely the largest); refuses too few cells or any other cluster ≥ ambiguity_ratio of the target's size (HZ-0115-2: a taller neighbour is ambiguous, not the target).
  • project_point(point_base, t_cam_from_base, intrinsics) -> tuple[float, float] | None (L688) — Base-frame point → REP-103 optical pixel (u, v) (pixel-centre convention of backproject_masked_depth); None behind the camera or outside the image. SAM 2.1's positive point prompt.
  • target_region_from_mask(mask, depth_m, intrinsics, t_base_from_cam, *, support_z: float | None, resolution, frame_id, evidence_ref, stamp_ns=0, erode_px=2, extrinsic_error_m=0.01, trim_percentile=1.0, min_points=200, min_depth_m=0.1, max_depth_m=3.0, max_half_extent_m=0.20, max_volume_m3=0.03) -> TargetRegionFit (L799) — Erode → backproject_masked_depth → base frame → percentile-trimmed, gravity-aligned (yaw-only, 2-D PCA footprint) box; lower face fixed at support_z + resolution (never below — HZ-0115-6) — with the support unseen (support_z=None, or a measured layer more than a voxel above the target's own lowest kept point: a neighbour's top, a bin rim) at the target's own lowest kept point instead, never lower, and no NOT_ON_SUPPORT check; sides and top padded by √3·resolution/2 + extrinsic_error_m; refuses on the caps, and NOT_ON_SUPPORT when the trimmed cloud's lowest point sits more than two voxels above support_z (a target on a same-footprint box or a hidden riser clusters with it in the voxel seed, but the mask names the target alone — and a view of its top face only is refused too).
  • target_region_from_masks(masks, depth_m, intrinsics, t_base_from_cam, *, resolution, nested_fraction=0.9, **fit_kwargs) -> TargetRegionFit (L962) — The segmenter's candidates (subpart/part/whole) through target_region_from_mask: the first that fits in the segmenter's order, except one holding ≥ nested_fraction of a smaller candidate refused NOT_ON_SUPPORT whose cloud spans ≥ 2 voxels (the body it stands on would be exempted) is refused STACKED; a top face alone (< 2 voxels, a can's lid) vetoes nothing. With no candidate fitting, the first such body holding no other one is re-fitted with the support unseen: its region stops at its own lowest point, so what it stands on (a bin floor, a riser) stays outside. A set refused whole reports its most severe refusal (_REFUSAL_SEVERITY), not the last tried. Ceiling: a tall subpart vetoes its whole object (less exemption). Empty → TOO_FEW_POINTS.
  • mask_without_removed_points(mask, depth_m, intrinsics, t_base_from_cam, kept_points_base, *, cell_m=0.005) -> NDArray[np.bool_] (L740) — mask without the pixels whose depth point the robot self-filter removed from the same capture (kept_points_base: robot_self_filter's output in the base frame): a pixel survives only with a kept point in its own or a neighbouring cell_m cell. Reuses the self-filter's own verdict (collision model at the measured joint state) instead of re-modelling the robot; only ever shrinks the fit. A pixel's verdict does not depend on the mask, so the leg filters the union of the segmenter's candidates once per capture and intersects each candidate with it.
  • WORKSPACE_MIN_COVER = 0.10 (L113) — The fraction of a declared workspace_box's footprint occupied cells centred in it must cover to confirm it (region_covers_occupied); shared by the HAL grasp-target producer and the #418 tracker (TrackerSession.workspace_region). Calibration point.
  • WORKSPACE_MIN_COVER = 0.10 (L113) — The fraction of a declared workspace_box's footprint occupied cells centred in it must cover to confirm it (region_covers_occupied); shared by the HAL grasp-target producer and the #418 tracker (TrackerSession.workspace_region). Calibration point.
  • region_covers_occupied(grid, region, *, min_fraction=0.5) -> tuple[int, bool] (L1061) — Occupied cells with centres in the region vs. min_fraction of the region's footprint cell count; a region the map does not see is refused.
  • track_region(previous, current, *, max_centroid_shift_m, extents_tol_m) -> bool (L1108) — The 2-5 Hz re-prompt gate: same frame, centroid shift and (sorted-horizontal) half-extent change within tolerance.
  • cell_closed_region(region, grid, *, max_half_extent_m) -> tuple[PlaceRegion, bool] (L1189) — (closed, clamped): a yaw-only fit grown so every lattice cell it intersects has its centre inside (the kernel's cell-centre exemption test): r/2·Σ|(Rᵀ_box R_grid)_ij| per local axis — r/2·(|cos θ|+|sin θ|) ≤ r/√2 horizontally against a z-up lattice — and r/2 up only, the bottom kept (the support layer stays non-exempt). Clamped per half-extent at max_half_extent_m. Applied only to the region the grasp-target leg publishes; ROSConfigError on another frame or a tilted region.
  • lowered_to_support(region, support_z) -> PlaceRegion (L1253) — region with its lower face moved down onto support_z, the rest unchanged (region itself when the face is not above it). The vision-attached region payload is lowered from one voxel above the measured support onto its top, so the target's own bottom layer is payload, not an obstacle under it once lifted (Isaac i56/i57); the support's cells stay outside.
  • margin_grown_region(region, margin_m, *, down) -> PlaceRegion (L1299) — The grasp-target bloat (HZ-0115-32): region grown by margin_m along its own axes on the four sides and the top, and the bottom too when down (the kernel's pre-handover region; down=False is the attached payload, never into the support). margin_m = 0 returns region itself; ROSConfigError on a negative or non-finite margin.
  • region_within(inner, outer, *, tol_m) -> bool (L1152) — Every corner of inner inside outer grown by tol_m (false across frames): tells a re-fit shrunk by the approaching hand's occlusion from one that reaches outside the held region.
  • occupied_touching_outside(grid, region, *, support_z) -> NDArray (L1353) — Occupied cell centres more than one voxel above support_z, outside region and 26-adjacent to an occupied cell inside it. Empty iff the region holds the whole 26-connected map component of the cells it contains (any path out crosses that ring), so it looks one cell around the region and needs no bound on the component. The grasp-target leg runs it on the kernel's (cell-closed) region before accepting a fit; a non-empty result sends the fit to map_completed_region (partial_fit when that refuses).
  • map_completed_region(grid, fit, column, *, support_z, max_half_extent_m, max_volume_m3) -> tuple[PlaceRegion | None, int, str] (L1421) — (completed, added, reason): the camera's fit grown to the target's whole map component (Isaac i45: the hovering hand hides the far side; the map remembers it from earlier views). The component: occupied cells more than one voxel above support_z, 26-connected, seeded from those in cell_closed_region(fit), flooded inside column (the leg's search column). The result is the smallest box in the fit's yaw holding the fit and every component cell's centre, its bottom the fit's own (never down); its cell closure (what the kernel gets) then holds every component cell whole. None with the reason when a component cell's 26-neighbour lies outside column (touches the search edge), the box exceeds the caps, or its closure holds an occupied above-support cell not of the component (another body in its corners — checked over the closure's own extent, so a box in a yaw other than the column's has its corners tested too). added = component cells beyond the fit's closure. A body within one voxel of the target merges into it (HZ-0115-30). ROSConfigError on a frame mismatch or a tilted fit.
  • backproject_masked_depth(mask, depth_m, intrinsics, *, min_depth_m, max_depth_m) -> tuple[NDArray, float] — Back-projects a mask's pixels through a metric depth frame into the camera optical frame (REP-103), returning (N, 3) points and the fraction of masked pixels with usable depth. An empty mask returns ((0, 3), 0.0) — not an error. Raises ROSConfigError on shape disagreement or mismatched-resolution intrinsics. (L612) Moved from openral_hal._vision_attachment_evidence, which imports it from here.
  • lattice_from_msg(msg) -> VoxelLattice (L241) — openral_msgs/OccupancyVoxels → VoxelLattice, duck-typed on the message fields (no ROS import). Moved from openral_hal._grasp_target_leg, which still re-exports it.

python/core/src/openral_core/object_primitives.py

Object instances before contact (docs/reference/object-primitives-design.md, issue #349): camera-originated, map-confirmed, tracked. The grasp-target leg (premeasure=True) prompts SegmentInView where instance_prompt says, fits each mask with the camera path's own fit, and keeps the box only when map_confirms it; PrimitiveTracker holds identities, nearest_primitive picks the instance a hand approaches. The map never originates a box. Pure numpy, no ROS, no clock; reuses perception_geometry's lattice, components, cover and tracking gates. Moved down from openral_hal._object_primitives (issue #418), whose shim is deleted.

  • class PrimitiveFit(region, cell_count, support_z) (L62) — One camera instance fit, map-confirmed: the box (target_region_from_masks), the occupied map cells inside it, the support top it was fitted on.
  • class ObjectPrimitive(primitive_id, region, cell_count, support_z, first_seen_ns, last_seen_ns) (L79) — A tracked instance; last_seen_ns is its newest camera fit's stamp (its confirmation), what staleness counts from.
  • map_confirms(grid, region, *, support_z, min_cover, pad_m=0.0, own=(), static=(), min_split_cells=1) -> tuple[str, str] (L100) — ("", "") when the map confirms a camera box, else (kind, why): map_disagrees (region_covers_occupied below min_cover: the object gone, or never in the map) or map_split (the occupied above-support cells in the box's cell closure are more than one 26-connected body). A touching neighbour is one body with it, so a packed pair passes, each instance with its neighbour's sliver, never the merged blob. ROSConfigError on a frame mismatch. A second body confined to the band pad_m inside the box's sides and top (the fit's padding, fit_pad_m) is a neighbour's sliver, not a split; one wholly inside the own boxes (the robot's hands) is the robot's own, not a split. min_split_cells: the fewest cells a second body needs to split (1 fail-closed default; the object tracker passes MIN_SPLIT_CELLS).
  • instance_prompt(grid, column, covered, *, near_xy, skip=()) -> tuple[point, cell] | None (L208) — Where to prompt the segmenter next (SegmentInView has no prompt-free mode): the raised top-surface cell (no occupied cell above it, two or more cells above the column's lowest top surface: a support the octree marks in two layers is not raised) nearest near_xy, in no covered box and not in skip, preferring interior cells (all four side neighbours raised tops) so a packed pair's shared top is prompted one cell inside one body, not on the seam. Returns the cell's top-face centre and the cell (the skip key).
  • point_box_gap_m(point, region) -> float (L286) — Distance from a point to an oriented box (0 inside).
  • nearest_primitive(regions, hand_points, *, ambiguity_m) -> tuple[int | None, str] (L305) — The instance with the smallest gap to any hand point; ambiguous when the runner-up is within ambiguity_m (one voxel) of it (HZ-0115-2), or when a named search box (no hand points) holds more than one. (index, "") or (None, reason).
  • class PrimitiveTracker(*, max_misses=3, max_tracks=16) (L359) — Identities across fits, label-free: a fit within track_region's one-voxel tolerance refreshes its instance; one whose centre lies in an instance's box (or holds its centre) is the same object nudged (identity kept, box replaced); anything else is new. Past max_tracks the instance seen longest ago is dropped. Single-threaded by contract (the leg, under the bridge lock).
  • update(fits, *, stamp_ns, tol_m, scanned) -> list[ObjectPrimitive] (L440) — Fold fits in; an instance whose centre lies in scanned that nothing matched accrues a miss and is dropped after max_misses; one outside is kept. Returns the fits' instances, largest first.
  • prune(keep) -> list[ObjectPrimitive] (L482) — Drop every instance keep refuses (the leg's staleness and map-contradiction rules); returns the dropped.
  • (property) primitives -> list[ObjectPrimitive] (L421) — every tracked instance.

python/core/src/openral_core/detection_tracker.py

Camera-space 2D detection tracker — pure, ROS-free, stateful; the 2D analog of ObjectMemory.

  • def aabb_iou_2d(a: tuple[int, int, int, int], b: tuple[int, int, int, int]) -> float — 2D axis-aligned bbox IoU in [0, 1]; 0.0 for disjoint/degenerate boxes. (L21)
  • class DetectionTracker2D(*, iou_threshold=0.3, max_misses=3) — Stateful per-camera 2D-IoU tracker assigning a stable det_id to each detection, so an object can be de-duplicated without a 3D lift. (L60)
  • assign(self, detections: list[ObjectDetection2D]) -> list[ObjectDetection2D] — Stamps each detection with a stable det_id via greedy same-label IoU association; retires tracks unseen for max_misses frames. (L90)

python/core/src/openral_core/time_base.py

The deploy-sim time base — one env.step / send_action is one control period (issues #355, #358). Every sim backend derives its physics steps per tick here and every sim HAL holds the backend to the robot's rate here.

  • TIME_BASE_TOL: float — 0.01: tolerance on sim_dt_per_tick_s * control_freq_hz == 1. (L19)
  • physics_steps_per_tick(control_freq_hz, physics_dt_s) -> tuple[int, float] — (steps, dt_s) with steps * dt_s == 1 / control_freq_hz exactly; (L22) keeps the engine dt when it already divides the period, otherwise shrinks it (never grows) to the largest value at or below physics_dt_s that does (MuJoCo's 0.002 s at 30 Hz: 16.67 steps → 17 at 1/510 s). ROSConfigError on a non-finite / non-positive rate or dt. Used by MujocoTwinRollout._resolve_time_base (the MujocoArmHAL twins) and openral_sim.rollout.pin_robosuite_time_base.
  • check_time_base(sim_dt_per_tick_s, control_freq_hz, *, backend, robot) -> None — Refuses (ROSConfigError) a tick that is not one control period within TIME_BASE_TOL (NaN refused too), or a manifest with no rate (control_freq_hz=None). (L60) The one guard behind SimAttachedHAL._check_time_base and the twin.
  • scene_control_rate_hz(backend_options, robot_hz) -> float | None (L100) — The rate a sim scene steps: a finite positive backend_options.control_freq_hz (a bool, string, NaN, inf or non-positive value is a ROSConfigError), else robot_hz. Shared by openral_sim.cli._scene_control_rate_hz (video / dataset fps) and sim_scene_description (deploy sim).

python/core/src/openral_core/exceptions.py

openral exception hierarchy — use these, do not invent new base classes.

  • class ROSError(Exception) — Base class for all OpenRAL errors. (L41)
  • class ROSConfigError(ROSError) — Bad manifest, missing weights, invalid YAML/URDF. (L48)
  • class ROSCapabilityMismatch(ROSError) — Skill requires a capability the robot lacks. (L52)
  • class ROSRuntimeError(ROSError) — General runtime failure. (L59)
  • class ROSQuantizationError(ROSRuntimeError) — Quantization failed. (L63)
  • class ROSGPUMemoryError(ROSRuntimeError) — Out of GPU memory. (L67)
  • class ROSSafetyViolation(ROSError) — Safety constraint violated; never silently caught. (L74)
  • class ROSWorkspaceViolation(ROSSafetyViolation) — Action outside allowed workspace. (L82)
  • class ROSForceLimitExceeded(ROSSafetyViolation) — Contact force exceeds limit. Not raised in Python: the force/current collision tier (#373) lives in the C++ kernel, which latches an E-stop with FailureTrigger.KIND_FORCE + ForceEvidence(unit="Nm") — the same semantics at the supervisor boundary. Nothing compares a force against SafetyEnvelope.max_force_n. (L86)
  • class ROSCollisionImminent(ROSSafetyViolation) — Proposed motion would self-collide or strike a world obstacle. (L95)
  • class ROSEStopRequested(ROSSafetyViolation) — Emergency stop requested. (L104)
  • class ROSPerceptionStale(ROSError) — Sensor reading exceeds staleness deadline. (L111)
  • class ROSObjectNotInMemory(ROSPerceptionStale) — A scene-graph query matched no node or only stale nodes; caller degrades to "unknown", never fabricates a pose. candidates (keyword, default ()): the node ids an ambiguous reference matched — a question, not an absence. (L115)
  • class ROSPlanningError(ROSError) — Reasoner failed to produce valid plan. (L140)
  • class ROSReasonerInvalidPlan(ROSPlanningError) — LLM returned invalid plan. (L144)
  • class ROSFleetError(ROSError) — Fleet-level / dispatch error. (L151)
  • class ROSDispatchUnavailable(ROSFleetError) — No dispatcher available. (L155)
  • class ROSRskillGoalSatisfied(ROSError) — Typed control-flow completion signal raised once a wrapped-ROS rSkill finishes; caught only at the runner's execute-callback boundary, which closes the goal with success=True. Not an error despite the base class. (L166)
  • class ROSDeadlineMissed(ROSFleetError) — Cloud RTT exceeded skill deadline. (L159)

python/core/src/openral_core/success.py

  • class SuccessJudge(condition) (L34) — Issue #635: the verdict of one SuccessCondition over a stream of TrackedObjectSets; the one place the predicate and its settle clock live (the rSkill runner and the sim tests run it). succeeded: min_count tracks of the label seen (CONFIRMED / OCCLUDED) with their box centre in the region (a track whose centre lies in another counted track's box is the same object, counted once) on every set over settle_s of the sets' own stamp_ns. failed: too few rest there even counting tracks that may still settle (RELEASED, frozen at the let-go pose, TENTATIVE, SPLIT), and one is seen held (BOUND) or elsewhere. unknown: anything else.
  • observe(self, tracked: TrackedObjectSet | None) -> None (L69) — Take the newest set (None: none, or stale); a set no newer than the last (same revision and stamp) is ignored, the tracker's heartbeat (same revision, later stamp) counts; a missing set, a stamp that went backwards or a gap past max_evidence_gap_s restarts the settle.
  • outcome(self) -> TaskOutcome (L89) — The verdict on the evidence observed so far.