Layer 0 — Core Schemas & Exceptions
Part of the OpenRAL public-symbol inventory. Hand-curated;
(LNN)markers are refreshed bytools/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, DRONEclass JointType(str, Enum)— URDF joint type. (L97)REVOLUTE, PRISMATIC, CONTINUOUS, FIXED, FLOATING, PLANARclass ClockOrigin(str, Enum)— Authoritative source forstamp_nsvalues;/clockis a projection, not an origin. (L108)HOST_WALL, SIMULATION, HARDWARE_SYNCEDclass ClockEpoch(str, Enum)— Epoch astamp_nsvalue is measured from. (L120)UNIX, SIMULATION_ELAPSED, HARDWAREJointRole: TypeAlias = Literal[…]— Structural role of aJointSpec(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_MODECONTROL_MODE_TO_UINT8: dict[ControlMode, int]— Wire encoding forActionChunk.control_mode; mirrors the C++ kernel'svalidator.hpp::ControlModeenum. (L262)UINT8_TO_CONTROL_MODE: dict[int, ControlMode]— Inverse ofCONTROL_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, BATTERYclass Hand(str, Enum)— End-effector laterality. (L319)LEFT, RIGHT, NAclass StateRepresentation(str, Enum)— State vector format. (L2258)JOINT_POSITIONS, EEF_POS_AXISANGLE, EEF_POS_EULER, EEF_POS_QUAT, EEF_POS_AXISANGLE_GRIPPERclass 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 raisesROSConfigErrorrather than guessing. (L2283)JOINT_POSITIONS, JOINT_VELOCITIES, DELTA_EE_6D_PLUS_GRIPPER, DELTA_EE_6D, CARTESIAN_POSEclass RSkillAction(str, Enum)— Closed vocabulary of action verbs an rSkill can perform; declared onRSkillManifest.actionsand 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(forkind: "detector"rSkills); scene VLM:QUERY(forkind: "vlm"rSkills); reward monitor:MONITOR(forkind: "reward"rSkills); playbook decision procedure:PLAN(forkind: "playbook"rSkills). New entries are additive.class QuantizationDtype(str, Enum)— Weight numeric format. (L7536)FP32, FP16, BF16, INT8, INT4, FP4_NVFP4class QuantizationBackend(str, Enum)— Inference backend. (L7570)PYTORCH, ONNX, TENSORRT, GGUF, MLXclass RSkillState(str, Enum)— Skill lifecycle. (L7672)UNCONFIGURED, INACTIVE, ACTIVE, FINALIZED, ERRORclass 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, JAXclass 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_coeffsscale_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 viahost_wall(),simulation(), orhardware_synced(). A validator rejects impossible origin/epoch pairs and competing hardware/clockpublishers. (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 fordeploy sim. Replaces per-robotscene_defaults.compositionfor camera-only deploy twins. (L418)class SensorSpec(BaseModel)— Generalizable sensor descriptor covering all modalities;sim_camera_namenames the MJCF camera when it differs from the sensorname,sim_placementcarries the camera's sim pose,shares_mount_withnames the sensor of the same physical device whose (per-unit calibrated) mount this one rides (validated byRobotDescription: one level, onto a sensor withparent_frame+static_transform_xyz_rpy), anddeploy_bindingis the real-hardware counterpart (host-specific; a robot camera's lives in its host'sRobotUnitoverlay or robot.yaml, a workcell camera's on its ownDeployScene.sensorsentry).ros2_topicnames only an external driver's image topic (ADR-0108);None(every in-tree manifest) means OpenRAL publishes the sensor undercamera_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_sensordelegates 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) — Anydepthorpoint_cloudsensor (a 3D lidar needs no intrinsics): a real driver can feed octomap its cloud, so ondeploy runit 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, metadataCAMERA_TOPIC_PREFIX: Final[str]—"/openral/cameras", the root of the canonical camera topic layout (ADR-0108). Consumers that need a pattern usere.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.pyrejects a hand-built string. RaisesROSConfigErroron 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_keysuffix, else the name). The one camera namespace shared byopenral sim run,deploy simanddeploy run; used byrskill_runner_node,DatasetRecorderBridge,SimSensorBridgeandSimRunner. (L683)check_scene_sensor_overrides(manifest_sensors, scene_sensors) -> None(L728) — RaisesROSConfigErrorwhen aDeployScene.sensorsentry reuses the name of a sensor the robot manifest defines. A deploy scene never redefines a robot camera: its name, modality and frames live inrobots/<robot_id>/robot.yaml, its per-host binding / per-unit calibration in aRobotUnitoverlay; the scene only adds workcell cameras under new names. Called bymerge_deploy_sensors,resolve_launch_invocation(sodeploy sim/run/validate) andopenral 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_overridesrefuses a name clash). Shared by the CLI, the launch andcompose_runtime.sim_scene_description(description, backend_options) -> RobotDescription(L787) — The robot as a sim scene runs it:backend_options.control_freq_hzreplacesaction_spec.control_freq_hz(scene_control_rate_hz), andbackend_options.sim_sensors(depth cameras with intrinsics, nodeploy_binding, names the manifest and the other entries do not use;ROSConfigErrorotherwise) are appended to its sensors, andbackend_options.gripper_joint_curve({gripper joint: [(value, urdf value), …]}, any point order) replaces each named joint'sJointSpec.urdf_curvefor that twin (#533;ROSConfigErroron a non-gripper name or a curvecheck_urdf_curverefuses). The merged robot is re-validated as aRobotDescription(model_copyskips its validators), so e.g. a danglingshares_mount_withraisesROSConfigError.backend_options.link_attachmentsentries withcollision(#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. Returnsdescriptionitself when no key is set. Pure (core has no logging dependency). The one placedeploy simre-times / re-equips a robot: called byresolve_launch_invocation(sim only; refused on a bare twin),deploy_e2e.launch.py(kernel rates, the runner'srate_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 linkssim_scene_descriptionadds for this robot's collision-bearinglink_attachments(#773);deploy_e2e.launch.pyhands them to the kernel ascollision_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_filterparams (carrier_contents_links,carrier_contents_boxes) for the contents of this robot's carriers: each carrier's box bounds raised bycontents_above_m, dropped from the cloud while the base drives (#773).{}with none;ROSConfigErroron acontents_above_mthat is not a finite number >= 0, or on non-box collision.check_urdf_curve(points, what) -> None(L1722) — Refuses a calibration curveJointSpec.urdf_curvecannot hold (ValueError): fewer than two points, a non-finite or non-pair point, values not strictly increasing, URDF values not strictly monotonic. Shared byJointSpec,IsaacSimOptions.gripper_joint_curveand the HAL'surdf_joint_curves.curve_value(points, x) -> float(L1749) — Piecewise-linearpoints(sorted by strictly increasing x) atx, clamped to the end points likenumpy.interp; its slope there (the segment ending at a breakpoint;0outside the end points). The Python half of the kernel'slink_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),0outside the end points; the HAL's curved-joint rate.ROBOT_UNIT_ENV: str—"OPENRAL_ROBOT_UNIT", names the host'srobots/<id>/units/<unit>.yaml; wins overDeployScene.robot_unit. (L1131)UNIT_SERIAL_ENV: str—"OPENRAL_UNIT_SERIAL", this unit's serial; wins overRobotUnit.serial. (L1136)ORG_ID_ENV: str—"OPENRAL_ORG_ID", the operating organisation; wins overRobotUnit.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 asopenral.unit.serial/openral.org.id/openral.site.id(issue #467). (L1147)resolve_unit_identity(robot_yaml, scene_unit, *, required) -> UnitIdentity— Env var, else the selectedRobotUnit's field; each value must be a plain token (it rides inOTEL_RESOURCE_ATTRIBUTES);required(real deploy) without a serial →ROSConfigError. Called bydeploy_sim.resolve_launch_invocationanddeploy_e2e.launch.py. (L1159)apply_sensor_overlays(sensors, overlays) -> list[SensorSpec]— Lays eachSensorOverlay's set fields (binding, driver topic, mount pose, intrinsics) over the named manifest sensor and re-validates;ROSConfigErroron an unknown or repeated name. Applied byresolve_launch_invocation,deploy_e2e.launch.py,compose_runtime(sensor_overlays=),deploy validateandopenral check. (L1215)load_robot_unit(robot_yaml, unit) -> RobotUnit— Loads<robot_yaml dir>/units/<unit>.yaml;ROSConfigErrorwhen missing (lists the available units) or when itsrobot_id/unitdisagree with the directory / request. (L1256)gripper_hands(description) -> tuple[tuple[str, ...], ...]— The robot's hands: itsrole: gripperjoints'child_links grouped per hand (joints sharing aparent_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 asopenral_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 onerole: gripperjoint whosechild_linkthe links name, elseNone(a hand of several finger joints, or links of no gripper joint): theObjectQuery.handhint (issue #418). Used by the reasoner node and the rSkill runner (re-exported asopenral_reasoner.hand_joint). (L1307)resolve_sensor_overlays(robot_yaml, scene_unit, *, required) -> list[SensorOverlay]— The host's overlays: unit =$OPENRAL_ROBOT_UNITor the scene'srobot_unit; none →[], exceptrequired(real deploy) on a robot that shipsunits/→ROSConfigError. (L1333)unit_gripper_curves(description, robot_yaml, scene_unit) -> RobotDescription— The real-deploy counterpart ofsim_scene_description'sgripper_joint_curve: the selected unit's ($OPENRAL_ROBOT_UNITorscene_unit)RobotUnit.gripper_joint_curvereplaces each named gripper'sJointSpec.urdf_curveandRobotUnit.joint_curveany named joint's, so the kernel, the self-filter and/tfpose the link by that unit's servo calibration (the SO-101 bench jaw, and its wrist roll a quarter turn off).descriptionitself with no unit or no curves;ROSConfigErroron an unknown name (a non-gripper ingripper_joint_curve), a joint in both maps, or a bad curve. Called bydeploy_e2e.launch.pyonhal_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_sensorsfiltered to sensors with adeploy_binding. The one ruleopenral deploy(detector auto-downgrade) anddeploy_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) — ThePointCloud2topic octomap'scloud_inand the world-state object-lift fallback read: a pinnedruntime.octomap_cloud_topicwins; thenestimated_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). RaisesROSConfigErrorin sim for several depth cameras and no pin (declared choice, not first-wins). Shared byopenral deploy's pre-launch refusal anddeploy_e2e.launch.py.required_vla_camera_slots(manifest, description) -> tuple[str, ...]— The robot's RGB slots trimmed to those the rSkill'ssensors_required[].vla_feature_keynames (all slots when it names none); the policy camera keys on deploy and on an empty-scene.camerassim run. (L707) fields:bundle_name, sensors, sync, sync_tolerance_msfields:dim, representation, slots, cartesian_delta_scale, joint_names, gripper_scale, joint_units—joint_names(policy joint order in robot joint names; forbidden withslots, must matchdim, unique) andgripper_scale(policy gripper units per HAL[0, 1]unit,> 0) are consumed byopenral_rskill._policy_io.PolicyIOCodecon 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 ofposition_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 whenclose_bandis 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), propertycommand_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, elsestall_gap. class JointSpec(BaseModel)— URDF-derived joint spec;origin_xyz/origin_rpy/axis_xyzlet the kernel compute FK for self-collision,roleidentifies gripper/base/arm DoFs structurally instead of by name-substring, andsim_joint_namenames the MJCF joint when it differs from the logicalname(needed only when a sim adapter looks the joint up by name and the loaded MJCF renames it);closure_calibration(arole: gripperjoint'sGripperClosureCalibration,None= uncalibrated, the vision attachment leg refuses it);fixed_jaw_link(arole: gripperjoint only: the body link carrying a fixed jaw, the SO-101'sgripper; 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'spi/4 (1 - f), the Metal's finger stroke; every consumer that poses the link applies it: the kernel and the self-filter viacollision_curve_*,/tfviaurdf_joint_map, the Isaac sidecar,openral_core.kinematics; #533) withurdf_value(value)/urdf_slope(value). (L1557)urdf_value(value) -> float(L1692) — The URDF value its link is posed at:curve_value(urdf_curve, value), orvaluewithout a curve.urdf_slope(value) -> float(L1711) —d urdf_value / d value(curve_slope;1without 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_calibrationclass EndEffectorSpec(BaseModel)— End-effector spec;actuated=Falsemarks a passive tool (inert flange, kinematic-only mount) so the safety kernel rejects chunks addressed at it.command_convention/command_rangedeclare theGRIPPER_*value this end effector's HAL consumes (range defaults from a normalized convention, required for a physical one). Optionalparent_linknames the link it hangs from (the MuJoCo twin routes a loneGRIPPER_POSITIONby 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, orNonewhen undeclared. (L1923)GRIPPER_CONVENTION_RANGES: dict[str, tuple[float, float]]— The value range of each normalizedGripperConvention; physical conventions have none. (L1822) fields:name, kind, hand, n_dof, max_grip_force_n, max_payload_kg, workspace_radius_m, tactile_sensors, actuatedclass ComputeSpec(BaseModel)— Compute profile for one deployment tier (edge/local/cloud), populated byopenral_detect._enrich_computefrom GPU probe results and attached toRobotDescription.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_mssupports_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 floorsupports_cumotion()checks against. (L1941–1943)ReasonerDialect = Literal["anthropic", "openai"]— Wire dialect aReasonerModel/ named endpoint speaks; only needed onOPENRAL_REASONER_DIALECTfor a bare, unclassified URL. (L16403)ReasonerHosting = Literal["cloud", "managed_local", "byo_local"]— Where aReasonerModelruns; drivesReasonerModel.is_local. (L16406)class ReasonerModel(BaseModel)— Frozen curated S2 model registry entry.REASONER_MODELSis the curated map; membership withmeasured=Truemeans the model passed the robotics tool-calling contract.measured=Falsemarks the*-openrouter/*-cloudentries offered on declared tools + vision (the client logsreasoner.model.unmeasured, doctor warns);timeout_sis a slow model's own per-call timeout (OPENRAL_REASONER_TIMEOUT_Sstill wins). (L16416)is_local(self) -> bool[@property] — True formanaged_local/byo_localhosting (needs local compute); False forcloud. (L16513)REASONER_MANAGED_ENDPOINT: str = "managed"— Sentinel forReasonerModel.default_endpointmeaning 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 theopenrouterpreset, and the endpoint that makes a curated model run onOPENROUTER_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 againstmax_tokens. (L16536)reasoner_model_options() -> list[ReasonerModelOption](L16890) — The curated models a settings form offers, in registry order:keyslists every key setting that serves a model, any one enough, in preference order —[ANTHROPIC_API_KEY](Anthropic dialect),[OPENAI_API_KEY, OPENROUTER_API_KEY](anopenai/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*-cloudmodel) or[](no auth, runs on the robot);needsiskeys[0](orNone) for consumers that predatekeys; 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 withmodel_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*-cloudregistry entries (_OLLAMA_CLOUD_MODELS, offered on declared tools + vision capability, not yet measured) and theollama_cloudpreset.REASONER_MODELS: dict[str, ReasonerModel]— The curated model registry keyed byid(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 namedOPENRAL_REASONER_ENDPOINTimplies beyond its URL (dialect, auth, cold-start timeout, tool_choice, plusvendorandwire_api— theopenaipreset takes bare model ids and speaks the Responses API). (L16953)served_model_id(self, model_id) -> str—model_idas 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 acceptedOPENRAL_REASONER_ENDPOINTnames. (L17010)REASONER_TOOL_CHOICES: tuple[str, ...]—("auto", "required"), the valuesOPENRAL_REASONER_TOOL_CHOICEaccepts. (L17041)parse_reasoner_tool_choice(raw) -> str | None— Validate (case-insensitively) anOPENRAL_REASONER_TOOL_CHOICEvalue,Nonewhen unset;ROSConfigErrorotherwise. Shared by the reasoner client factory andopenral 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 namedOPENRAL_REASONER_ENDPOINTpresets. (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 namedOPENRAL_REASONER_ENDPOINTpresets. (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 namedOPENRAL_REASONER_ENDPOINTpresets. (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 namedOPENRAL_REASONER_ENDPOINTpresets. (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 namedOPENRAL_REASONER_ENDPOINTpresets. (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 namedOPENRAL_REASONER_ENDPOINTpresets. (L16520–16950)class RobotCapabilities(BaseModel)— Physical capability flags for skill compatibility;has_vision_slamgates the camera-based SLAM backend for lidar-less robots, independent ofhas_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_tagsclass SafetyEnvelope(BaseModel)— Constraints handed to the C++ safety kernel (not every field is enforced yet — see the enforcement note below);self_collision_margin_mcan 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_radfor non-prismatic joints,starting_pose_max_joint_speed_m_s/starting_pose_tolerance_mfor prismatic ones) andjoint_state_staleness_limit_s, the one place a rig declares its joint-state freshness window (read bybuild_halanddeploy_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 latchesKIND_FORCE; a deploy scene / rSkill may add or lower a joint, never raise or drop one; needsRobotDescription.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 andself_collision_margin_m.contact_force_threshold_ncaps 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_requiredclass ObservationSpec(BaseModel)— VLA observation config. (L2359) fields:state_key, state_shape, state_representation, image_flip_180(image_flip_180deprecated, no effect on image processing — setting it emits aFutureWarning; useRSkillManifest.image_preprocessing.flip_180)class ActionSpec(BaseModel)— VLA action config. (L2401)dimis optional (issue #303): a robot with no committed policy action contract declares onlycontrol_freq_hz, and the dataset recorder takes the width from the action itself. fields:dim, representation, control_freq_hz, chunk_sizeclass ActionSlot(BaseModel)— One contiguous slice of an rSkill's action vector, with per-mode field requirements enforced by a validator;discard=Truedrops a slice silently. (L8169) fields:range, control_mode, discard, ee, frame, joint_names, input_boundsclass ActionContract(BaseModel)— Per-rSkill action-vector contract; whenslotsis set, every index is covered by exactly oneActionSlot, else the legacy single-Action JOINT_POSITION path applies. Optionalcontrol_freq_hzis 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 withslots, must matchdim, unique),gripper_scale(policy gripper units per HAL[0, 1]unit,> 0) andjoint_calibration(robot joint name →JointCalibration,policy = scale * robot + offset, overridingjoint_units/gripper_scalefor the joints it names; non-empty, forbidden withslotsand withgripper_scale != 1.0) are consumed byopenral_rskill._policy_io.PolicyIOCodecon 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-zeroscale; finiteoffset, default 0). A property of the training data (LeIsaac's SO-101 motor map), declared onActionContract.joint_calibration. (L8315) fields:scale, offsetprop _JOINT_MODES, _CARTESIAN_MODES, _GRIPPER_MODES— TheControlModepartitions used byActionSlot's andControlModeSemantics's per-mode validators. (L8304–8310)prop _EE_6D_WIDTH, _EE_3D_WIDTH— Cartesian slice widthscanonical_slots_for_representationuses to size a representation-onlyActionContract's slots. (L8542–8543)class TaskSpaceFamily(str, Enum)— Coarse classification of aControlModefor task-space views (DRAFT). (L8741)_FAMILY_FOR_MODE: dict[ControlMode, TaskSpaceFamily]— Exhaustive mapping from everyControlModeto itsTaskSpaceFamily, 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), targetclass TaskSpaceMatch(BaseModel)— Result oftask_space_compatible. (L8820) fields:ok, reasonsclass TaskSpace(BaseModel)— Layer-neutral view of an action interface as orderedTaskSpaceSegments (DRAFT); derived viafrom_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 distinctControlModes this space drives. (L8891)from_action_contract(cls, action: ActionContract, robot: RobotDescription) -> TaskSpace[@classmethod] — Builds the task space an rSkill emits, expandingslots/representation. (L8896)class SceneTaskSpace(BaseModel)— The control interface a scene-adapter family executes, declared once per family inSCENE_FAMILY_TASK_SPACE;runs_via_default_packers=Falsemarks dedicated-controller adapters. (L9112)prop _JOINT_MODES, _CARTESIAN_MODES, _GRIPPER_MODES— TheControlModepartitions used byActionSlot's andControlModeSemantics's per-mode validators. (L8304–8310)prop _EE_6D_WIDTH, _EE_3D_WIDTH— Cartesian slice widthscanonical_slots_for_representationuses to size a representation-onlyActionContract's slots. (L8542–8543) fields:modes (frozenset[ControlMode]), action_dim (int|None), runs_via_default_packers (bool)class SphereShape(BaseModel)— Sphere collision primitive; discriminatorshape="sphere", fieldradius_m (>0). (L2807)class CapsuleShape(BaseModel)— Capsule collision primitive (segment along local +Z swept by a radius); discriminatorshape="capsule", fieldsradius_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. Theshapediscriminator is enforced, not just documented, so a bad tag fails clearly rather than silently resolving to the wrong member. Never dump withexclude_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; mirrorskDopAxisin 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, mirroringkMaxTightHullVertices— 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-9m of floating-point slack when checking a hull vertex against its own DOP slab; mirrorskTightContainmentEpsilonM. The box-containment check onLinkCollisionGeometrytakes no slack at all. (L2946)class TightCollisionGeometry(BaseModel)— Tight convex geometry refining one link'sBoxShape, 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 bytools/generate_tight_geometry.py, not hand-authored. (L2956)check_tight_geometry_fits_box(shape, tight, owner) -> None— Raises unlesstightrefines aBoxShapeand stays inside itshalf_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 byLinkCollisionGeometryandAttachedCollisionPrimitiveso 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")] — Rejectstight_geometryon any non-BoxShape, or a DOP whose slabs reach outsidehalf_extents_m; no slack is allowed here. (L3162)class CollisionGeometryImport(BaseModel)—{robot, link_map}: collision volumes reused fromrobots/<robot>/robot.yaml, every entry of alink_mapkey renamed to its value.RobotDescription.collision_geometry_importslists them;RobotDescription.from_yamlresolves them intocollision_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 connectivityjointsalone 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. Optionalsweep_xyzdeclares an unreported straight travel of the child in its own frame (the Galaxea A1's fingers): the kernel poses the link atorigin, 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_rpyclass MimicJoint(BaseModel)— A link posed by another joint's value,q = multiplier * u[mimics] + offset,uthe leader's URDF value (JointSpec.urdf_value: through itsurdf_curve, if any) (the URDF<mimic>/ MuJoCo joint equality): the OpenArm's follower finger, the third edge kind of the collision tree besidejointsandfixed_attachments— moving, but no command channel, invisible to everyjointsconsumer. The kernel poseschild_linkrigidly 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) andjoint_type: fixed. (L3376)value_at(leader_value) -> float— This joint's value at the mimicked joint'sleader_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 byopenral_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,armatureadded to M's diagonal. (L3451) fields:joint, armature_kgm2, viscous_nm_s_per_rad, coulomb_nm, offset_nmclass ForceObserverSpec(BaseModel)— The kernel observer's dynamics model (RobotDescription.force_observer): enforces nothing alone;SafetyEnvelope.max_external_joint_torque_nmsets 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;assetsis the single URDF/MJCF/SRDF reference block,compute_edge/local/cloudhold per-tier compute profiles,collision_geometry/allowed_collision_pairscarry the safety-kernel-facing self-collision data, andfixed_attachmentscompletes the kinematic tree with rigid zero-DoF mounts thatjointsalone 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 onstart_from_home;_validate_home_poserefuses 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_versionscene_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 hasposition_limits/velocity_limit/effort_limitset, so a misshapen manifest fails at launch-parse time rather than mid-actuation. (L4426)lidar_sensor(self) -> SensorSpec | None[@property] — First declaredlidar_2dsensor, or None; single source of truth for the synthetic/scanenvelope. (L4289)nav2_footprint_param(self) -> str— This base's Nav2footprintparameter string fromfootprint_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 fromfootprint_radius,footprint_polygon(its circumscribed radius setsinflation_radius) andbase_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_hzwhen positive, elseNone. 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] — theSafetyEnvelopefields 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 ofREAL_HARDWARE_SAFETY_FIELDSthe kernel loads but no check consults yet (max_ee_accel_m_s2,max_force_n(#373 enforces per-jointmax_external_joint_torque_nminstead),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 withhal.realset must declarecontrol_rate_hz, everyREAL_HARDWARE_SAFETY_FIELDSentry explicitly insafety(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_radwith a non-prismatic joint,..._m_s/..._mwith a prismatic one (the runner's approach has no default speed; deriving one from ratedvelocity_limitput the OpenArm at 2 rad/s, and a rad tolerance on a 0.041 m gripper always "arrived"). On any manifest, declaring bothsafety.joint_state_staleness_limit_sandhal.parameters.defaults.staleness_limit_sis refused. Every gap is reported in one error, at load time — beforedeploy validate,build_halor any node. Sim-only manifests keep the schema defaults._validate_force_observer(self) -> RobotDescription[model_validator] (L4198) — everysafety.max_external_joint_torque_nmkey is a joint and has aforce_observerto enforce it;force_observerneedscollision_geometryand names only tree links / joints (#373)._validate_fixed_attachments(self) -> RobotDescription[model_validator] (L3977) — each link is defined by exactly one edge (a joint, afixed_attachmentsrow or amimic_jointsrow), no edge attaches a link to itself, and everymimic_joints.mimicsnames ajointsentry.grasp_contact_links(self) -> tuple[str, ...](L4009) — the links a grasp may touch: everyrole: gripperjoint'schild_link, then thechild_linkof everymimic_jointsrow following one of those joints (the other jaw of the same gripper), then everyfixed_attachmentschild rigid on one of those mimic fingers, transitively (the Robotiq's*_barouter fingers; user-approved 2026-10-16, Safety-WG review + hazard-log row owed); the launch passes it as the kernel'sgrasp_contact_linksallowlist (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, asgripper_hands), then the wrist that link hangs off (never a root link; a carrier welded on throughfixed_attachmentshangs off the first actuated link of that rigid chain — DROID / franka_panda:panda_link7); OpenArm: both finger pairs, both followers, bothlink7, bothlink6(#349 r23: a hand at a tote rim brings the wrist within one 15 mm voxel of it). Each carrier's wrist comes fromwrist_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'sHandModelhand).wrist_links=2climbs one more actuated link (DROID:panda_link6; OpenArm: bothlink5), anything outside 1–2 raisesValueError. The launch passes it as the kernel'sworkspace_contact_links(issue #349), withDeployRuntime.workspace_contact_wrist_links.wrist_links_of(self, carrier, wrist_links=1) -> tuple[str, ...](L4130) — Thewrist_links(1–2) actuated links a gripper carrier hangs off, nearest first: its joint parent, or for a carrier welded on throughfixed_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;ValueErroroutside 1–2.hand_linksand the tracker'sHandModelhand both read it, so the kernel and the tracker share one wrist (Isaac R87).from_yaml(cls, path: str) -> RobotDescription[@classmethod] — Load and validate aRobotDescriptionYAML manifest from disk. (L4405)grasp_contact_links(self, gripper_joints=None) -> tuple[str, ...](L4009) — the links a grasp may touch: everyrole: gripperjoint'schild_link, then thechild_linkof everymimic_jointsrow following one of those joints (the other jaw of the same gripper), then everyfixed_attachmentschild rigid on one of those mimic fingers, transitively (the Robotiq's*_barouter fingers; user-approved 2026-10-16, Safety-WG review + hazard-log row owed); the launch passes it as the kernel'sgrasp_contact_linksallowlist (ADR-0115).gripper_jointsrestricts 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) — therole: gripperjoints'fixed_jaw_links not already ingrasp_contact_links; the launch passes them as the kernel'stracked_grasp_extra_contact_linkswhen 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 whoseschema_versionis not"0.2"with aROSConfigErrorthat 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 bothbase_jointsandsim_joint_name. (L4471)const NAV2_INFLATION_CLEARANCE_M: float = 0.05— Costmap inflation clearance added to the circumscribed footprint radius fornav2_param_overrides. (L297)class GripperReadMode(str, Enum)— HowMujocoArmHALreports 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)— HowMujocoArmHALmaps an Action's gripper value toctrl. Values:NORMALISED([0,1]→ctrl_range),PASSTHROUGH(raw →ctrl; MuJoCo clips). (L2447)class SimGripperDescription(BaseModel)— Gripper wiring inside a MuJoCo MJCF. Exactly one ofjoint(a manifest joint, commanded inJOINT_POSITIONrows) andend_effector(an end effector with no manifest joint, commanded byGRIPPER_POSITIONand reported inhealth; needsactuator_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_indexclass UrdfAsset(BaseModel)— A URDF asset reference plus itsrobot_state_publisherwiring. (L2565) fields:ref: str(validated against theresolve_assetscheme grammar),root_frame: str | None(URDF root link when it differs frombase_frame),base_to_root_xyz_rpy: tuple[float×6] | None(staticbase_frame→root_frametransform [x,y,z,roll,pitch,yaw], metres+radians)class AssetRefs(BaseModel)— UnifiedRobotDescription.assetsblock: one URDF/MJCF/SRDF reference set replacing the former scattered asset fields. (L2602)prop _ASSET_SCHEMES, _ROS2_DYNAMIC— Manifest-side mirror ofopenral_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 defaultNone)class SimDescription(BaseModel)— OptionalRobotDescription.simblock holding MuJoCo joint↔qpos/qvel/actuator wiring forMujocoArmHAL.from_description. (L2633) fields:floating_base, joint_qpos_addr, joint_qvel_addr, actuator_index, grippers, settle_steps_default, keyframe_index, seed_ctrl_from_qposclass HalEntrypoints(BaseModel)—RobotDescription.halblock: the robot's sim + real-hardware HAL import strings, resolved byopenral_hal.build_hal, plus optionalreal_bringup: str | None("<ros_pkg>:<file>.launch.py") — the vendor ros2_control bringupdeploy runincludes;Nonefalls back to the HAL package'slaunch/real_bringup.launch.pyconvention.sim/realare validated bycheck_code_ref(openral_*modules only). (L3582) fields:sim: str | None(null → deriveMujocoArmHAL.from_descriptionwhen asim:block exists),real: str | None(null → simulation-only robot),parameters: HalParameters(per-robot HAL construction defaults)class HalParameters(BaseModel)—RobotDescription.hal.parametersblock: per-robot HAL construction defaults merged into the constructor byopenral_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 | Noneclass SceneComposition(BaseModel)— Declarative MJCF scene composition;composer: "module:fn"returns(xml, meshdir).composeris validated bycheck_code_ref(openral_*modules only). (L2725) fields:composer: str,params: dict[str, object]- First consumer is the
openarm_tabletop_pnpMJCF 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_nsclass Pose6D(BaseModel)— 6D pose (position + xyzw quaternion). (L4584) fields:xyz, quat_xyzw, frame_idclass DetectedObject(BaseModel)— Object detection.existenceis the object memory's belief (probability) that it is still there;Nonewhen no belief is kept. (L4598) fields:label, confidence, pose, bbox_3d, track_idclass 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, sosim_geom_distance(a distance probe) can see contact the contact list hides.map_support_proximityis proximity to a support plane the producer measured in the voxel map under the carried payload — never sensed contact, never a proven support.gripper_closureis a position-only gripper that stalled short of its close command with vision unable to confirm the shape (the conservative jaw box);grasp_target_regionis the grasp-target leg's pre-grasp measured region reused as the payload at ATTACH. Issue #418:tracked_object(the tracker bound aTrackedObjectmeeting the pinch volume; kernel retires(object_id, epoch)) andpinch_fallback(untracked grasp: the pinch-volume box, never toward the palm, no identity clearing).gripper_forcestays for force-sensing grippers and old records; no in-tree producer stamps it. (L4620)class AttachedCollisionPrimitive(BaseModel)— One sphere/capsule/OBB pluspose_in_object, with an optionaltight_geometryrefining it for the kernel's payload-vs-world-voxel check;Noneis not a defect — sphere/box/capsule sim geoms lower exactly, only mesh geoms leave a gap. Produced byopenral_hal._sim_attachment_evidence._tight_geometry_from_points. (L6017)geometry_source(fallbackdefault /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 onlymeasuredandgrown, and an unknown wire code isfallback._tight_geometry_fits_inside_the_box(self) -> Self[@model_validator(mode="after")] — Delegates tocheck_tight_geometry_fits_boxat 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; raisesValueErroron an unknownshape_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; raisesROSConfigErrorfor 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 aGraspDeclaration's measured region, under that declaration's tighter caps and withgeometryempty. (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 standingObjectQueryin the tracker, separate fromTrackStatus: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"(onestill tracks every match),role,hand(gripper joint hint),seed: PlaceRegion | None(search hint,geometryempty),min_instances(≥ 1; exactly 1 forone). A standing query in the Layer-2 tracker for its goal's lifetime.synonyms: tuple[str, ...] = ()(additive): other names for the class, sent withlabelto an open-vocabulary locator as one comma-separated class list (the tracker'sTrackerRequest.prompt); IDLstring[] synonyms. (L4908)from_idl(cls, msg) -> Self[@classmethod] — Decode the duck-typedopenral_msgs/ObjectQuery;seedonly whenseed_valid. (L4964)fill_idl(self, msg) -> None— Populate a duck-typedopenral_msgs/ObjectQuery. (L4976)class StaticBox(BaseModel)(L13306) — One declared static fixture as an oriented box in the robot'sbase_frame:kind="box",source,xyz,quat_xyzw(unit withinUNIT_QUAT_TOL= 0.1),half_extents(≥ 0); all finite. (#349)class StaticMesh(BaseModel)(L13340) — One declared static fixture as a triangle mesh inbase_frame:kind="mesh",source,file(an.npzofvertices(N,3) m andtriangles(M,3), relative to the listing YAML), optionaltrianglescount. (#349)class StaticGeometry(BaseModel)(L13359) — A cell's declared static geometry,static_geometry: list[StaticBox | StaticMesh](discriminated bykind); the fileDeployRuntime.static_geometry_filenames. 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 requireddimension_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 layercustomLayerData), requiredexpected_revision, and optional absolutereader_pythonexecutable 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)— OptionalDeployRuntime.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; optionalsearch_boxis 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'splace_approach_enabled); it never declares on its own.is_livefails toward dead (retracted, pasttimeout_s, or future-stamped), and itsnow_nsmust read the same clock domain that producedstamp_ns— never wall-clock time. Issue #418:destination_query: ObjectQuery | None(roleDESTINATION) names the destination class the tracker grounds; arms nothing.invocation_idis 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 asPlaceDeclaration.is_live; retracted, expired and future-stamped are dead. (L5123)is_live(self, *, now_ns) -> bool— Whether this declaration is still in force atnow_ns; fails toward dead. See the class docstring for the clock-domain contract onnow_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(geometryempty) in the robot base frame or, "station mode", in itsmap_frame; name and aliases distinct within a zone;target_id→zone:<name>(TARGET_PREFIX). Declared inDeployScene.place_zones(resolve_launch_invocation→_check_place_zone_framesrefuses a base-frame zone unlessembodiment_kindismanipulator/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), anodom_framezone (odometry drifts), and any other frame;region.posemust be inregion.frame_id); the object tracker re-expresses a fixed-frame zone in the grid frame through tf2 at the grid'ssource_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>, thePlaceDeclaration.target_idnaming 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), optionaldescriptionfor the reasoner;node_idisnav_goal:<name>. Declared task knowledge that grants nothing. Listed inDeployScene.nav_goals(names/aliases unique,repeated_nav_goal_names);deploy sim/runforward them asnav_goals_json, refused without a mobile base, without a navigation stack, or outside the map frame; the reasoner seeds them as declared spatial-memoryPLACEnodes.- (property)
node_id -> str(L5394) —nav_goal:<name>, the spatial-memoryPLACEnode it is seeded as. repeated_nav_goal_names(goals) -> list[str](L5399) — Names or aliases used more than once across goals, sorted (DeploySceneand 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 ofPlaceDeclaration(real pick-and-place design §2.1): dispatch namestarget_id+ grippercontact_links(non-empty while active), the producer measuresregion(aPlaceRegion,geometryempty in v1) from the optionalsearch_box(aPlaceRegionthat only seeds perception — on the generic path the reasoner grounds it from a namedGraspTargetRef; a direct-dispatch scene may also supply it; the runner passes it through;geometrymust be empty), the kernel bounds it (consumer lands separately, default off). CapsMAX_TIMEOUT_S120 s /MAX_HALF_EXTENT_M0.20 m /MAX_VOLUME_M30.03 m³ are Safety-WG placeholders. Since #349:workspace_box(a scene-declarable manipulation workspace, likesearch_box, arms nothing) andworkspace_region(the producer-confirmed workspace — the same box re-stamped with the confirming grid'ssource_stamp; producer-only, rejected from scenes and stripped by the runner), both capped byMAX_WORKSPACE_HALF_EXTENT_M0.50 m /MAX_WORKSPACE_VOLUME_M30.25 m³ (Safety-WG placeholders) withgeometryempty.is_livehas the same clock-domain contract as the place one;from_idl/fill_idlmirror it. Issue #418:target_queries: tuple[ObjectQuery, ...](≤MAX_TARGET_QUERIES8, roleTARGET/CONTEXTonly) names the classes the Layer-2 tracker grounds; they arm nothing.invocation_idcarries the 32-hex ExecuteRskill action goal UUID across runner restamping.search_boxis pending deprecation (a set box emitsPendingDeprecationWarning; still the HAL grasp-target leg's input whileobject_trackingis off; removal owed after #418 phase 5 with aschema_versionbump + migrator). (L5443)TIMEOUT_MARGIN_S = 10.0(ClassVar): seconds a goal-built declaration outlives its goal's budget (the reasoner'sDECLARATION_TIMEOUT_MARGIN_S, the runner'smerge_grasp_declarationsfloor).is_live(self, *, now_ns) -> bool— Same rule and clock-domain contract asPlaceDeclaration.is_live; retracted, expired and future-stamped are dead. (L5639)from_idl(cls, msg) -> Self[@classmethod] — Decode the duck-typedopenral_msgs/GraspDeclarationwithout importing ROS;regiononly whenregion_valid,search_boxonly whensearch_box_valid,workspace_box/workspace_regiononly when their*_validflag is set. (L5662)fill_idl(self, msg, *, query_factory=None) -> None— Populate a duck-typedopenral_msgs/GraspDeclaration; no primitive factory, a grasp region carries no geometry.query_factorybuilds oneopenral_msgs/ObjectQueryand is required (elseROSConfigError) whentarget_queriesis 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_nis newtons only whenmagnitude_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, andmax_penetration_mis 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 withobject_id) andgeometry_revision(bound-geometry revision; the kernel unions revisions), both default 0.released_by_link(defaultNone= held): set, the payload was let go by that link and is re-attached to a link FK never moves (refused when it equalsattach_link); the kernel freezes it, never world-checks it, and exempts that link andtouch_linksonly 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 oneTrackedObject: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; IDLbool provisional):object_id(trk:<n>),epoch,label,role,declaration_key,status,box(gravity-aligned containingPlaceRegionin the grid frame, under the grasp-region caps 0.20 m / 0.03 m³,geometryempty),tight(≤MAX_TIGHT_HULLS4AttachedCollisionPrimitivehulls posed inbox.frame_id, each ≤MAX_HULL_VERTICES64 vertices),fit_kind,support_z/support_ref/floor_z(≥support_z; the clearing floor),visible_cells/occupied_cells, source-clocklast_fit_stamp_ns/last_confirmed_stamp_ns, and whileBOUNDthe requiredbound_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-typedopenral_msgs/TrackedObject; empty strings decode toNone,pose_in_linkonly whenpose_in_link_valid. (L6540)fill_idl(self, msg, *, primitive_factory) -> None— Populate a duck-typedopenral_msgs/TrackedObject. (L6575)class TrackedObjectSet(BaseModel)— Issue #418: the tracker's whole set, one revision, on/openral/tracked_objectsandWorldStateStamped.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_OBJECTS32, uniqueobject_id). (L6613)from_idl(cls, msg) -> Self[@classmethod] — Decode the duck-typedopenral_msgs/TrackedObjectSet. (L6657)fill_idl(self, msg, *, object_factory, primitive_factory) -> None— Populate a duck-typedopenral_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 oneExecuteRskillrun (ExecuteRskill.Result.task_outcome_json, therskill.executespan, the reasoner's## EXECUTIONline):verdict,source(success_condition|scene|skill|checker|none;scene= deploy sim's own grade of the prompt, which wins over the tracker's), a boundedreason(MAX_REASON_CHARS = 240), and what it was read from (object_ids,restingofrequired,held_sof tracker evidence). It is the task's verdict;Result.successstays the execution's. (L6698)class SuccessCondition(BaseModel)— Issue #635: what success means for a policy run, as a predicate over world state: at leastmin_count(default 1) objects labelledobject_labelrest, released, with their box centres insideregion(the tracker's grid frame;geometryempty, a finite centre, a real rotation) forsettle_sof tracker evidence (default 1 s, > 0), with no gap between two published sets longer thanmax_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 byopenral_core.success.SuccessJudge. Advisory, never a kernel input. (L6740)from_idl(cls, msg) -> Self[@classmethod] — Decode the duck-typedopenral_msgs/SuccessCondition; a zeromin_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-typedopenral_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), orNone: 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, mirroringnav_msgs/OccupancyGridmetadata. (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_statecarries a checkpoint-specific proprio vector when joint state alone can't represent it, andplace_declarationrelays the resolved place phase (region included) to the safety kernel —Nonemeans no place phase, no witness, no allowance;grasp_declarationrelays 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
WorldStatedoes not refresh stale attachment evidence. - image_frames — Optional in-process frame carrier for no-ROS deployments;
Nonekeeps the existingimagestopic-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 ofDetectedObjectforkind=OBJECT. (L7147)aliases/description/declaredmark a declared station (DeployScene.nav_goals):resolve_placematches 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_countclass SpatialEdge(BaseModel)— Directed relation between two nodes. (L7231) fields:src, dst, kind: SpatialRelationKindclass SceneGraph(BaseModel)— Persistent scene-graph memory; validates unique node ids and that every edge references an existing node.schema_version"0.2"(added theSpatialNodestation 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, limitclass ApproachViewpoint(BaseModel)— Camera-facing standoff goal. (L7331) fields:pose: Pose6D, standoff_m (>0), camera_frame_idclass RecallObjectMatch(BaseModel)— One ranked recall result. (L7348) fields:node_id, label, pose: Pose6D, score, last_seen_ns, approach: ApproachViewpoint | None, inside_container_id: str | Noneclass RecallObjectResult(BaseModel)—matcheslist; empty means unknown, so the caller raisesROSObjectNotInMemory. (L7376)class ResolvePlaceQuery(BaseModel)— Resolve a place/room/agent reference. (L7391) fields:reference, kind: SpatialNodeKind | Noneclass ResolvePlaceResult(BaseModel)— Resolved node plus atraversable_topath. (L7406) fields:node_id, goal: Pose6D, path_node_ids: list[str]class Action(BaseModel)— Action step or chunk produced by a Skill;tick_indexpreserves 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 optionaljoint_namesnames which joints a sub-slot targets (needed since a zero-padded slot would otherwise read0.0as 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_overridesclass QuantizationConfig(BaseModel)— Quantization recipe;extra["pro_dtype"](validated as aQuantizationDtype) 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, elsedtype. (L7632) fields:dtype, backend, per_channel, calibration_dataset, extraclass DeviceInfo(BaseModel)— Host compute snapshot. (L7646) fields:device_str, gpu_memory_bytes, cuda_compute_capability, cpu_count, archclass 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 bySpatialNode.stateandRecallObjectMatch.state. (L7116)belief_state(existence: float | None) -> ObjectBeliefState— The state aDetectedObject.existencereads as:PRESENTabove 0.5 (and forNone, a producer that keeps no belief), elseUNCERTAIN; neverABSENT(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: ObjectBeliefStateclass 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 theSpatialNodestation fields,"0.3"its beliefstate); 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_sis the total execution budget for oneexecute_rskillgoal in seconds on the clock the robot moves on (graph clock underuse_sim_time, else wall), bounding a VLA that never self-terminates. (L7809) fields:per_chunk_ms, warmup_ms, load_ms, max_execution_sclass SensorRequirement(BaseModel)— One sensor an rSkill needs the robot to provide. (L7836) fields:modality, vla_feature_key, min_width, min_height, countclass 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.aliaseskeys are VLA slots (camera1), never sensor/scene camera names. (L7893)unknown_alias_slots(sensors_required) -> list[str]— Alias keys nosensors_required[].vla_feature_keydeclares as a slot;resolve_image_preprocessingraises on any. (L7970)class ControlModeSemantics(BaseModel)— Action-space semantics on eachActuatorRequirement. (L9309) fields:mode: Literal["absolute","delta"], gripper_convention, joint_order, reference_frame- Cross-validator on
ActuatorRequirement: gripper kinds requiregripper_convention; cartesian kinds requirereference_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_keyauto-fill from the robot YAML for canonical embodiments, required for the"custom"hatch. (L9358) fields:kind, n_dof, vla_action_key, control_mode_semanticskindreusesControlMode;n_dof/vla_action_keyauto-fill from the robot YAML for canonical embodiments, required on the manifest for the"custom"hatch.control_mode_semanticsis 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 lerobotPolicyProcessorPipelineartefact 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— ValidatesRSkillProcessors.preprocessor_uri/postprocessor_urirequires a file tail. (L9679)class RosIntegration(BaseModel)— Wiring for a wrapped ROS 2 action/service; required whenRSkillManifest.kindisros_action/ros_service, forbidden otherwise.packagemust 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_buildercompletes_task_on_success(defaultFalse) — opt-in: the wrapped action's own success completes the reasoner's active mission task (Nav2NavigateToPose: 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 perstep()).default_goal_jsonvalidator round-trips the literal throughjson.loadsand 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).RSkillManifestfills an omittedrolefrom it (_default_role_from_kind) and refuses a declared one that differs (_check_role_matches_kind). No kind maps tos0: 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) andManifestSkillResolver.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 whileros_integration.interface_nameis 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 forkind: "segmenter"rSkills; required onSegmenterContract.engine(no legacy fallback, unlikeDetectorEngine). (L10226)class SegmenterContract(BaseModel)— Manifest contract forkind: "segmenter"rSkills, the sibling ofDetectorContractfor models answering a geometric prompt rather than a semantic one. Deliberately carries nolabels/score_threshold— a segmenter never classifies and its consumer never gates on model confidence. (L10254)class DepthEstimatorFamily(str, Enum)— Network akind: "depth_estimator"rSkill runs:da3(Depth Anything 3) ordepth_pro2(Apple Depth Pro 2); withruntime: pytorchit picks the in-tree sidecar. (L10309)class DepthOutput(str, Enum)— What a depth estimator's raw output means:metric(metres, givenf_px),canonical_focal(metres = mean focal × raw /canonical_focal_px),relative(never converted to metres). (L10328)class DepthEstimatorContract(BaseModel)— Manifest contract forkind: "depth_estimator"rSkills:family,output,canonical_focal_px(exactly whencanonical_focal),process_res,predicts_intrinsics(required by the SLAM path). Consumed bydepth_provider_nodeandtools/depth_estimator_sidecar.py. (L10353)class DetectorEngine(str, Enum)— Backend selector forkind: "detector"rSkills, disambiguating backends that otherwise share aruntime;Nonekeeps the legacyruntime-keyed dispatch. (L10015)class DetectorMode(str, Enum)— Invocation mode of a detector, orthogonal toDetectorEngine:CONTINUOUS(always-on, feedsWorldState.detected_objects, not dispatchable) vsON_DEMAND(prompted via thelocate_in_viewtool). (L10064)class OvbDetectorConfig(BaseModel)— Diffusion settings for anengine: ovb_sidecardetector: the pinned base FLUX.2 [klein] pipeline (base_pipeline_uri,hf://repo@<40-hex sha>), the OVBtransformer_subfolderinsideweights_uri, andnum_inference_steps(28) /guidance_scale(3.5) /seed(0). (L10100)class DetectorContract(BaseModel)— Manifest contract forkind: "detector"rSkills;max_sidecaps 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(defaultcontinuous),max_side: int | None,ovb: OvbDetectorConfig | None(required iffengineisovb_sidecar, forbidden otherwise)class RewardContract(BaseModel)— Manifest contract forkind: "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 forkind: "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.yamlmanifest; a pre-publish surface extended in place several times atschema_version: "0.1";"0.2"(current default) maderolederived fromkind, and0.1files 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.kindgates which other fields are required or forbidden (see_check_kind_consistencybelow).evaluated_tasksgates a scene's task against what the checkpoint was trained on, raisingROSCapabilityMismatchwhen it doesn't cover the scene.reward_rskill_namenames the reward monitor a VLA pairs with, since a VLA emits no success signal of its own;Nonedefers to the deployment default reward model rather than meaning "run without reward".default_promptis the literal conditioning string a single-task checkpoint was trained on — distinct fromdescription, which is prose for the LLM to pick the skill by.from_yaml(cls, path: str) -> RSkillManifest[@classmethod] — Load and validate anrskill.yaml. (L11584)reads_world_state_policy_state[@property] -> bool — Truthiness ofpolicy_extras.use_world_state_policy_state: the runner feeds this policyWorldState.policy_state, not the joint vector. The one reader of the key (runnerobs["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, orNonewhen undeclared; consumed byassert_vla_reward_fits. (L10763)active_min_vram_gb(self, *, pro_installed: bool = False, dtype: QuantizationDtype | None = None) -> float | None(L10763) — Declared VRAM atdtypewhen the caller passes the dtype the load resolved to (openral_sim._quantization.resolved_runtime_dtype:$OPENRAL_QUANTIZATION_DTYPE/VLASpecoverrides beat the manifest; core cannot read them), else atquantization.runtime_dtype(pro_installed=...)(callers passpro_quantization_installed(); core cannot detect Pro);Nonewhen undeclared for that dtype; consumed byassert_vla_reward_fits.is_commercial_use_allowed: bool[@property] — Derived fromlicense: True for apache-2.0/mit/bsd, False otherwise. (L10917)is_scaffold_placeholder: bool[@property] — True whenname/weights_uri/base_weights_uri/source_repostill carry an unresolved template sentinel, i.e. this is therskills/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] — Fromactuators_required:Truewhen any actuator is outside the base family (arm / gripper / hand / Cartesian),Falsewhen every one isbody_twist/foot_placement(Nav2, a VLN policy),Nonewhen it actuates nothing. The one predicate behind the runner's station mode and per-goal object grounding (station_perception_wanted) and the reasoner palette'sRSkillToolEntry.object_target. (L10946)- Cross-validators:
"custom" ∈ embodiment_tags ↔ embodiment_extra is not None; a"custom"entry requiresn_dofandvla_action_keyon every actuator. - rSkill self-containment audit cross-validator:
processorsrequired for the families in_MODERN_PROCESSOR_FAMILIES(smolvla, pi05, xvla); others may omit it. - Cross-validator (
_check_kind_consistency): eachkindrequires and forbids a specific field set (e.g.vlaneedsmodel_family+weights_uri,detectorneedsdetector+weights_uriand no actuators);wamvalidates schema-side but the loader rejects it at resolve time. - Role validator
_derive_role(before): setsroletoRSKILL_ROLE_BY_KIND[kind]; refusesrole: s0in every version; refuses a declared mismatch under schema0.2, while a0.1file's declareds1/s2mismatch is migrated with aUserWarning(a playbook not declarings2, or an unknown value, stays refused as in 0.1). A non-stringkind(YAML list / map) is left for field validation, never a rawTypeError. The published JSON Schema states noroledefault (_drop_json_schema_default). - Cross-validator (
_check_n_action_steps_within_chunk):n_action_steps <= chunk_size(None= the adapter's default, resolved byopenral_rskill._vla_core.resolve_n_action_steps). - The historical
policy_idfield was removed in favour of dispatching onmodel_familydirectly. prop _HF_HUB_ID_PATTERN, _SEMVER_PATTERN, _WEIGHTS_URI_PATTERN, _HF_DATASET_URI_PATTERN, _HTTPS_URL_PATTERN— Regexes validatingRSkillManifest's URI/version/URL fields, pinned at module scope so the patterns stay greppable. (L9637–9646)_LICENSES_ALLOWING_COMMERCIAL: frozenset[RSkillLicensePosture]— LicensesRSkillManifest.is_commercial_use_allowedtreats as commercial-OK:apache_2_0/mit/bsd, plusnvidia_open_model(GR00T N1.7+) andopenmdw-1.1(NVIDIA Cosmos 3). (L9684)_MODERN_PROCESSOR_FAMILIES: frozenset[str]— Model families requiringRSkillManifest.processors;actmay omit it via the legacy norm-stats-in-safetensors path. (L9706)RSKILL_TEMPLATE_SENTINELS: tuple[str, ...] = ("TEMPLATE_ORG", "TEMPLATE_ID")— Canonical unresolved-scaffold sentinels theopenral rskill newscaffolder 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 whentextcarries anRSKILL_TEMPLATE_SENTINELSsubstring; the text-level primitive behindis_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; raisesROSConfigErrorif either size is undeclared,ROSGPUMemoryErrorif 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_installedselectsquantization.extra.pro_dtype;vla_dtypeis the VLA's resolved load dtype fromresolved_runtime_dtype, so an env/spec override is budgeted — the reward model loads at its manifest dtype); raisesROSConfigErrorif either size is undeclared for its dtype,ROSGPUMemoryErrorif 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 bysplit("-")into one of three shapes —rskill-<model>-<robot>-<task>-<quant>(weight-bearing kinds),rskill-<model>-<robot>-<task>(ros_action/ros_service, no weights), orrskill-playbook-<name>. _DEFAULT_RSKILL_OWNER: str = "OpenRAL"— Owner used when a manifestnamecarries 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 fromModelFamilysince 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_canonicalchecks them by shape, and CI (tests/unit/test_manifest_registry_ids.py) checks in-tree names againstrobots/*/robot.yamltags. (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]— Mapsquantization.dtypeto 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_TOKENSlookup 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 whenmodel_familyis 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 satisfiesrepo_name_is_canonicalfor 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 tagsrobots/*/robot.yamldeclare, 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 onStateContractBindings. Membership:openral_state_adapter.registered_layouts()(palette drop /assemble_staterefusal) + CI. (L7998)WRAPPED_TASK_SPACE_LAYOUTS: frozenset[StateLayout]— Subset ofStateLayoutcovering Cartesian/FK-derived composites, which requireStateContract.bindings; joint-space layouts are excluded and served verbatim from rawJointState.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; requiresbindingswhenlayoutis inWRAPPED_TASK_SPACE_LAYOUTS, forbids it otherwise. (L8095) fields:layout: StateLayout | None, dim: int | None, bindings: StateContractBindings | NoneStateContractBindings(Pydantic model) — Per-robot source bindings for an rSkill'sstate_contract.layout; the state-side symmetric counterpart ofControlModeSemantics. (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.benchmarkskeys). Membership:openral_rskill.loader.known_benchmark_ids(benchmarks/*.yaml∪scenes/benchmark/*.yamlstems) at writeback / CI;from_pretrainedonly 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 whenRSkillManifest.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;wamruns thevlapolicy path (POLICY_KINDS), adapters from theopenral.policiesentry-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, statusclass RSkillEvalBenchmark(BaseModel)— Suite identity for a benchmark block. (L12152) fields:name, dataset, protocol, robot, simulatorclass RSkillEvalResult(BaseModel)— On-disk shape ofrskills/<id>/eval/*.json; optionaltrace_idcross-references the OTel trace tree when the run had an OTLP endpoint to export to; optionalgrade_counts(episodes per final placement grade on a graded scene). (L12174) fields:schema_version, source, benchmark, eval_config, results, baselinesfrom_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 validatingRSkillManifest'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-contactrequires a solid-geom pair at or below 0 m, an unfiltered snapshot reads asunadjudicated.class ValidationStopEvidence(BaseModel)— The kernel'ssafety.collisionline, 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_boundexemption_active[@property] — Whether a support witness exempted a deeper cell at the trip. (L12375)involves_payload[@property] — Either party isattached:<object_id>. (L12382)class ValidationGroundTruthAdjudication(BaseModel)— Adjudication of a stop againstsim.estop_ground_truth_snapshot; withdraws tounadjudicatedwhen 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_contactsclass 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_linesclass ValidationSceneVerdict(BaseModel)— One scene of one round, queryable;config_sha256pins 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_reasonclass 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_pinsclass ValidationRoundVerdicts(BaseModel)— On-diskverdicts.json. (L12666) fields:schema_version, metadata, scenesfrom_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_fieldsclass ValidationRoundDiff(BaseModel)— Round-over-round comparison. (L12763) fields:schema_version, round_id, baseline_round_id, executed_sha, baseline_executed_sha, seed, baseline_seed, scenessame_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_optionsclass TaskSpec(BaseModel)— What the robot must achieve. (L12922) fields:id, scene_id, instruction, max_steps: int | None, success_key: str | None, metadataclass VLASpec(BaseModel)— Policy / brain declaration. (L12976) fields:id, weights_uri, device, runtime, quantization, deterministic, extraclass SimEnvironment(BaseModel)— Runtime (robot × scene × task × VLA) tuple, composed at the CLI from aSimScene/BenchmarkSceneYAML plus anRSkillManifest; never loaded from YAML directly. (L13017) fields:robot_id, scene, task, vla, base_pose, seed, n_episodes, record_video, save_dir, metadatabase_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_episodesandmin_reps <= n_episodes. (L13080)model_post_init(_context: object) -> None— Cross-field validationtask.scene_id == scene.id. (L13080)class BenchmarkMetadata(BaseModel)— Provenance block required on everyBenchmarkScene; 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 aSensorDeployBindingnames a topic to subscribe to but not who publishes it. Carried byDeployScene.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 paramsvision_attachment_grasp_target_enabled/_place_target_enabled; throughdeploy_e2ethe place one also turns on the runner'splace_approach_enabledgoal-scope place declaration; both legs are off intracking/on, wheredeploy_e2earms 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], needsgrasp_target_enabled; the approach-armed grasp target with no named target, HAL paramvision_attachment_grasp_target_approach_m, and throughdeploy_e2ethe runner'sgrasp_approach_enabledwhengrasp_allowance_enabledis on),grasp_target_premeasure: bool = False(needsgrasp_target_enabled; HAL paramvision_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, ClassVarsMAX_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 paramvision_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 paramvision_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'sJointSpec.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 > sceneruntime:> 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 firstexecute_rskillgoal 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 aspreload_rskill_id:=/preload_rskill_revision:=/preload_prompt:=only when set. (L13658)joint_states_topic: str | None(scene-only): explicit override for theJointStatetopic the deploy runtime's Python nodes ingest;None= derived byopenral_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;Noneon a twin whoseoctomap_cloud_topiclies outside/openral/cameras/already selectshost_wall(simulationwith 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 Schemamaximum, and enforced again by the nodes themselves (kernel configure, self-filter, voxel bridge; a deliberate mirror pinned bytests/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'ssource_stamp; the kernel'sworld_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 byrobot_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_e2epassesgrasp_contact_links= therole: gripperjoints'child_links); ondeploy run(real HAL) it is refused unlessvision_attachment.enabledandvision_attachment.grasp_target_enabledare on with no--haloverride 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_statesvelocity; 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 withobject_tracking: on, an exemption-provider rule since ADR-0121 step 3: workspace contact only on explained cells;falsekeeps 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 argworkspace_explained_cells);workspace_contact_wrist_links: int = 1(1–2;2adds the next actuated link up the chain as a wrist link for the contact rule only — DROID'spanda_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 confirmedworkspace_regionwhile the hand is slow and its lead small; requiresgrasp_allowance_enabledand both bounds (_check_workspace_contact); sim-only until Safety-WG review (deploy runand a non-simdeploy_e2erefuse it).vision_attachment: VisionAttachmentRuntime | None = None: the real-hardware vision attachment leg (seeVisionAttachmentRuntime).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 runand the launch on a non-sim HAL refuse it).exemption_provider: str = "": the safety kernel's ADR-0121 exemption provider (a pluginlib class derivingopenral_safety_kernel::ExemptionProvider), forwarded as the launch argexemption_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; whatopenral deployforwards to the launch.- object_tracking / grounding_wait_s / grounding_required — Issue #418: tracker posture
off(default) |tracking|on(shadow/bindmap totrackingwith aFutureWarning,_map_deprecated_tracking_modes); any mode butoffrequires an explicitgrounding_wait_s(source time; calibration point,_check_object_tracking), andonrequiresexemption_provider(ADR-0121 step 3: its tracked-object rules are the provider's;_check_object_tracking);grounding_requiredrefuses 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 whileobject_trackingis 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 foropenral 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 assuccess_conditions_jsonfor goals that carry none;place_declarationis the committed place-phase declaration for a direct dispatch (Nonemeans no place witness can arm), and a scene may not supply its ownplace_declaration.regionsince that must be producer-measured;grasp_declarationis the grasp-phase sibling under the same no-region rule (_reject_scene_supplied_place_regionrefuses both). Notasksfield — deploy goals come from the operator via--initial-task//openral/prompt.robot_unitnames the cell'sRobotUnitoverlay ($OPENRAL_ROBOT_UNIToverrides).object_catalog: USDObjectCatalogRef | Noneoptionally 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_yamlwarns (FutureWarning, naming the file) when the scene'sgrasp_declarationsets the pending-deprecationsearch_box(issue #418);GraspDeclarationitself never warns.place_zones: list[PlaceZone]— the station's declared place zones (names/aliases unique across zones), forwarded asplace_zones_jsonto the runner and the object tracker. A scene with arobotskey is refused beforeextra="forbid", namingopenral deploy fleet(OpenRAL Pro);SimScene/BenchmarkSceneinherit the refusal. (L14239)from_yaml(cls, path: str) -> Self[@classmethod] — Load and validate a scene YAML from disk; inherited bySimScene/BenchmarkScene, which validate against their own stricter schemas. (L14514)class SimScene(DeployScene)— ExtendsDeployScenewithtask,seed,n_episodes,record_video,save_dir,metadata; cross-validatestask.scene_id == scene.id; accepted byopenral sim run. (L14549)class BenchmarkScene(SimScene)— ExtendsSimScenewith required eval fields (n_episodes,seed,metadata,task.success_key,task.max_steps); consumed byopenral 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_repsmodel_post_init(_context: object) -> None— Cross-field validation:len(seeds) >= n_episodesandmin_reps <= n_episodes. (L14664)class DeployScene(BaseModel)— Unified deploy/workcell scene foropenral deploy sim/run;nav_goals: list[NavGoal]names the cell's navigation stations (ADR-0133);place_declarationis the committed place-phase declaration for a direct dispatch (Nonemeans no place witness can arm), and a scene may not supply its ownplace_declaration.regionsince that must be producer-measured;grasp_declarationis the grasp-phase sibling under the same no-region rule (_reject_scene_supplied_place_regionrefuses both). Notasksfield — deploy goals come from the operator via--initial-task//openral/prompt.robot_unitnames the cell'sRobotUnitoverlay ($OPENRAL_ROBOT_UNIToverrides).object_catalog: USDObjectCatalogRef | Noneoptionally 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_yamlwarns (FutureWarning, naming the file) when the scene'sgrasp_declarationsets the pending-deprecationsearch_box(issue #418);GraspDeclarationitself never warns.place_zones: list[PlaceZone]— the station's declared place zones (names/aliases unique across zones), forwarded asplace_zones_jsonto the runner and the object tracker. A scene with arobotskey is refused beforeextra="forbid", namingopenral deploy fleet(OpenRAL Pro);SimScene/BenchmarkSceneinherit 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)— HowSensorFramebytes are interpreted. (L6890)BGR8, RGB8, MONO8, DEPTH16, JPEG, PNG, CUDA_NV12, CUDA_RGBA, RAW—CUDA_NV12is the Tegra NVMM handle layout,CUDA_RGBAthe x86 DeepStream oneclass 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 rawbytesor a base64-encodedstron 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)— WhichSensorReaderimplementation a sensor uses. (L14694)OPENCV_THREAD, ROS2_IMAGE, GSTREAMERclass DeadlineOverrunPolicy(str, Enum)— Behaviour when a tick exceeds1 / rate_hz. (L14722)WARN, DROP, RAISEclass 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_idstamps the tee'sImage/CameraInfoheaders (defaultsensor_id);publish_camera_info: IntrinsicsPinhole | Nonemakes the tee also publishCameraInfoon 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_inforequirepublish_to_ros. (L14798)class SensorDeployBinding(BaseModel)— OptionalSensorSpec.deploy_bindingpayload lettingopenral deploy runopen the physical camera; the runtime counterpart ofsim_placement. Robot cameras carry it in their host's unit overlay (orrobot.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, intrinsicsclass RobotUnit(BaseModel)— One physical unit / host of a robot type,robots/<robot_id>/units/<unit>.yaml; selected by$OPENRAL_ROBOT_UNITorDeployScene.robot_unit.gripper_joint_curve({gripper joint: [(value, urdf value), …]}) is the unit's jaw calibration andjoint_curvethe same for any joint (an offset is a two-point slope-1 curve), applied on a real deploy byunit_gripper_curves. (L14900) fields:schema_version, robot_id, unit, sensors, serial, org_id(serial/org_idoptional plain tokens, issue #467; env wins, seeresolve_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, paramsclass TickResult(BaseModel)— One tick's record returned byInferenceRunner.tick; optional sim-only fields and trace context default toNoneso 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, truncatedclass RunResult(BaseModel)— Aggregated summary returned byInferenceRunner.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"; fieldsoperation, deadline_s, elapsed_s.class ForceEvidence(L15150) —kind="force"; fieldsjoint_or_ee, measured_n, limit_n, unit("N"default,"Nm"for the kernel observer's per-joint trip, #373).class WorkspaceEvidence(L15169) —kind="workspace"; fieldsee_name, measured_xyz, box_min, box_max.class PerceptionStaleEvidence(L15187) —kind="perception"; fieldssensor_id, staleness_ms, threshold_ms. The safety kernel emits it for its stale-input drops withsensor_id= the input's topic.class CriticEvidence(L15206) —kind="critic"; fieldscritic_id, score, threshold.class ControllerEvidence(L15222) —kind="controller"; fieldscontroller_name, state, detail.class SelfVerifyEvidence(L15238) —kind="selfverify"; fieldscheck, expected, observed.class HumanEvidence(L15254) —kind="human"; fieldsactor, reason.class WamEvidence(L15268) —kind="wam"; fieldshorizon, discrepancy, wam_id.class ReasonerTimeoutEvidence(L15284) —kind="reasoner_timeout"; fieldsmodel, 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_radis the FK'd configuration for that step, making a predicted stop adjudicatable.grasp_exemption_source(region/tracked/provider/none) andgrasp_exemption_providername the grasp exemption the check ran under (ADR-0121; backward-compatible additions).workspace_declaration_livesays whether the grasp declaration's workspace was live at the stop, whoever applies it (workspace_contact_activeis only the in-tree #349 rule, off under a provider). On a world-voxel stop,world_cell_center_mis thatvoxel_<n>cell's base-frame centre (both optional; older producers omit them).place_allowance_activeandplace_targetdisclose the ADR-0097 place-approach allowance at the stop (optional, backward-compatible;place_targetonly whileplace_allowance_activeis true). Maps toFailureTrigger.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-1sentinel; use it instead of a literal.is_reactive(property) —Truewhenhorizon_step == REACTIVE_HORIZON_STEP. (L15466)class ObjectQueryObservation— One refused camera observation: boundedcamera, sourcestamp_ns, and refusalreason. 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, detectorattempts, last refusalreason, exact 32-hex actioninvocation_id, optional declaredworkspace, up to eight typedobservations, andlast_seen(search prior only).to_exception() -> ROSObjectNotInMemoryis 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 toFailureTrigger.KIND_OBJECT_QUERYon/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(theGraspTargetRef.contact_linksname 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 lastshort_of_command/settle_spread(finite orNone). Task evidence, never a kernel drop cause. Maps toFailureTrigger.KIND_GRASP_OUTCOMEon/openral/failure/hal, published byVisionAttachmentBridge._report_outcome; consumed byContextRenderer.append_failure.class SuppressedSummaryEvidence(L15612) —kind="suppressed_summary"; fieldswindow_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);ValueErrorotherwise. The envelope's before-validator andComplianceEmitterboth 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: theActor.actor_idvalue (issue #468);ValueErroron an empty identity or key.class Actor(L15778) —channel_label,actor_id(64-hex HMAC-SHA256 pseudonym under a deployer-held org key, orNone). 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 wiretrace_idforms (W3C traceparent → id + span,""→None, ISSUE-109);retention_classproperty from the class-level_retention.class FailureRecord(L15878) —kind="failure";source, failure_kind (KIND_*), severity (SEVERITY_*), evidence: FailureEvidence | None, rskill_id. Classai_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. Classmr_safety_decision_1y.class SafetyDecisionRecord(L15954) —kind="safety_decision";decision (pass/scale/drop), check_name, rskill_id, chunk_index, inputs_digest. Classmr_safety_decision_1y.class PlanDecisionRecord(L15989) —kind="plan_decision";model, tool, rskill_id, ladder_rung, prompt_digest, mission_task_id. Classmr_safety_decision_1y.class InterventionRecord(L16027) —kind="intervention";intervention_kind, actor: Actor, channel, legitimate (None = unknown), before_digest, after_digest, diff_ref. Classmr_trace_5y.class SoftwareInventoryRecord(L16078) —kind="software_inventory";components: list[SoftwareComponent](≥1). Classmr_trace_5y.class SessionRecord(L16106) —kind="session";start_ts_ns, end_ts_ns, run_mode, site_id, shift. Classai_log_6m.class SecurityIncidentRecord(L16139) —kind="security_incident";actively_exploited, malicious_suspected, summary(CRA Art. 14). Classincident_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; carriessensor_id. (L16202)class ObjectDetection2D(BaseModel)(L16221) — Single 2D detection insideObjectsMetadata;det_idis a stable per-detector/per-camera identity assigned at detection time, letting an object be de-duplicated without the 3D lift, then propagated intoDetectedObject.track_id. fields:label, confidence, bbox_xyxy, det_id: int = -1class MotionMetadata(L16256) —kind="motion"; fieldsmagnitude, threshold, region_bbox.class ObjectsMetadata(L16279) —kind="objects";frame_width/frame_heightmake the pixel space ofbbox_xyxyexplicit so the voxel lifter can scale it to the camera's intrinsics resolution. Optionalcamera_frame_id+camera_intrinsics(set together or not at all, validator-enforced) carry the driverCameraInfo's optical frame and K, which the world-state lift projects through instead of theSensorSpecnamed bysensor_id. fields:detections: list[ObjectDetection2D], model_id, frame_width: int (>0), frame_height: int (>0)class OcrMetadata(L16335) —kind="ocr"; fieldstext, confidence, region_bbox.class SceneChangeMetadata(L16353) —kind="scene_change"; fieldsdistance, 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 optionalrationale. (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(arecall_objectnode_id; required when several objects share the label),contact_links: list[str](ALLrole: gripperchild_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 ofobject_id/place_node_id(spatial-memory node ids); grounded at dispatch toPlaceDeclaration.search_box.class ReloadGstPipelineTool(L17371) —tool="reload_gst_pipeline"; fieldssensor_id, pipeline_yaml.class LifecycleTransitionTool(L17397) —tool="lifecycle_transition";shutdownis 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-chosenEmitPromptToolmay publish on: the self-cascade and the prompt router's machine-priorityautoinput; 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 ontarget_topicitself via a per-topic publisher cache. fields:target_topic: Literal["/openral/prompt", "/openral/prompt_in/auto"](EMIT_PROMPT_TOPICS),text,metadata_jsonclass 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";ReasonerCoreholds the timer beat untiluntilortimeout_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),limitclass 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 (vsrecall_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 fromlocate_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 fromquery_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-maintainedMEMORY.mdcore:home_map,preferences,lessons,object_locations,open_tasks.class MemoryWriteTool— write; the reasoner's first write-capable variant;tool="memory_write"; edits the advisoryMEMORY.mdvia 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 unlessdelete),importance(0–1, default 0.5),target(required forupdate/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 whentexttargets a set rather than one specific object (a quantifier or bare generic plural); shared byGroundedSubtask's validator and the reasoner node's runtime execute gate. (L17741)_COLLECTIVE_TARGET_RE: re.Pattern[str]— Backing regex foris_collective_target. (L17735)class GroundedSubtask— One subtask bound to exactly one specific object; a validator forbids a collectiveobject_ref/textand requirestextto nameobject_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 toMissionState/ the skill. (L17824)class DecomposeMissionTool— task-ledger write;tool="decompose_mission"; the typed path for a playbook to write the deterministicMissionState— emptytarget_task_idreplaces 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 forMissionState. (L17871)class ExecuteRskillTool(L17229) —tool="execute_rskill"; fieldsrskill_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'sdefault_patience_s),progress_tolerance: float | None(default None; ge=0.0; overrides the reward model'splateau_tolerancefor a noisy critic — None uses the model default),grasp_target: GraspTargetRef | Noneandplace_target: PlaceTargetRef | None(default None; the targets the LLM names, grounded by the reasoner at dispatch into the goal'sGraspDeclaration/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 acompletes_task_on_successskill's success completes only that step, not the task — #562),start_from_home: bool(default False; the arms go to the robot'shome_posebefore 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 declaredActionRepresentationto theControlModes 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 ofControlModes 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 canonicalActionSlotlayout the skill_runner dispatches a representation-onlyActionContractthrough. Joint representations returnNone(legacy whole-vector path). RaisesROSConfigErrorwhen the representation needs an EE the robot lacks, ordimis 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, returningok+ a reason per incompatibility. Wired warn-only so far.def scene_family(task_id: str) -> str— Reduces anevaluated_tasksentry 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 byscene_family(evaluated_task). (L9170)def scene_task_space_compatible(family: str, skill_space: TaskSpace) -> TaskSpaceMatch— Third leg of the cross-layer gate: everyControlModethe rSkill emits must be in the scene family's executed set. Pairs withtask_space_compatibleto 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"—=1admits a module outsideopenral_*, with acode_ref.external_plugin_allowedwarning on every use. (L32) def check_code_ref(ref: str, *, setting: str) -> str— Refuses (ROSConfigErrornamingsetting) a malformed reference or one whose top-level module is notopenral_*(open packages and OpenRAL Pro'sopenral_pro_*). Called by theHalEntrypoints/SceneCompositionvalidators at schema load, which re-raise it asValueError(so a load fails with a pydanticValidationError). (L58)def check_ros_interface_package(package: str, *, setting: str) -> str— Refuses (ROSConfigError) aRosIntegration.packagethat is not a single rosidl IDL package name (*_msgs/*_srvs/*_interfaces):ROSActionRskillimports<package>.action, which runs its__init__.OPENRAL_ALLOW_EXTERNAL_PLUGINS=1admits any name with a warning. Called by theRosIntegrationvalidator (asValueError) and again in_import_action_or_service. (L96)def check_ros_interface_package(package: str, *, setting: str) -> str— Refuses (ROSConfigError) aRosIntegration.packagethat is not one lowercase identifier ending_msgs/_srvs/_interfaces, sinceROSActionRskillimports<package>.action(running its__init__). SameOPENRAL_ALLOW_EXTERNAL_PLUGINS=1opt-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 anopenral_*module (its__module__), so a re-exported foreign callable is refused;ROSConfigErrorwhen unimportable or missing. The import seam foropenral_hal.resolver._import_objectandManifestHALLifecycleNode._compose_scene_mjcf— do not hand-rollimportlibon 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 asyaml.safe_load. Used byloaders.py,_load_yaml_model(every schemafrom_yaml) andDeployScene.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) — Loadspathas exactlyexpected, 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 barelist[BenchmarkScene]frombenchmarks/<id>.yaml, each entry's relative paths anchored beside the file; per-scene validation runs here, suite-level invariants do not — callraise_on_invalid_suiteseparately. RaisesFileNotFoundError/ROSConfigError, never a bareValidationError.def load_suite_task(path: str, task_id: str | None) -> SimScene(L226) — One entry of a suite YAML as aSimScene, foropenral sim run --config <suite> --task <id>: picked bytask.id(optional for a one-task suite), relative paths anchored beside the suite file,metadatadropped. An unknown or missingtask_idraisesROSConfigErrorlisting the suite's task ids.def raise_on_invalid_suite(scenes: list[BenchmarkScene], *, suite_id: str) -> None(L277) — Enforces the suite invariants: non-empty, everytask.idunique, androbot_id/n_episodes/seed/metadataidentical across scenes (per-scenesuccess_key/max_stepsmay differ). First violation wins; raisesROSConfigError.
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, asSCENE_PEERS_ENVnames it:name(^[a-z][a-z0-9]{0,23}$),robot_idanddomain(0-232); frozen, extra forbidden. The manifest is looked up fromrobot_idwhere the graph runs.format_scene_peers(peers: list[ScenePeer]) -> str(L64) — The peers asSCENE_PEERS_ENVcarries them (a JSON list of objects).parse_scene_peers(value: str | None) -> list[ScenePeer](L74) — The inverse offormat_scene_peers; empty forNoneor""; aValueErrornamingOPENRAL_SCENE_PEERSon a bad value.require_peer_domains(peers: list[ScenePeer], own_domain: str | None) -> None(L97) — With peers listed,ROSConfigErrorunlessown_domain(the exportedROS_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 byopenral 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) withscene.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_manifestandruntime.vision_attachment.segmenter_manifestmade absolute when the file exists beside the scene,hal.defaults.calibration_dirwhen that directory does, and everydrivers[].args*_pathwhen 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 byload_scene_strict,load_benchmark_suite,load_suite_task,DeployScene.from_yamlandtools/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 ofchronyc -c tracking;Nonewhen chronyc is missing, hangs, fails or prints something unparsable. (L44)require_synced_clock(tracking, limit_s=CLOCK_LIMIT_S) -> None—ROSConfigErrorunless chrony answered, the leap status isNormalandworst_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 keyopenral:object_catalog_json; on a prim, USD stores it as a nestedopenraldictionary, whileprim_path: "/"reads the equivalent namespaced entry from root-layercustomLayerData. (L19)def load_usd_object_catalog(scene: DeployScene, *, scene_path: str | Path) -> USDObjectCatalog | None— Resolves a scene-relative local USD path, lazily importspxr.Usdby default or invokes the configuredreader_pythonworker, 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. Requiresjust sync --group scene-usdonly 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 aschema_versionand sectionsfit,tracker,cover,binding,late_bind,release,stall,caps(the kernel's C++ constexpr caps and the schemaMAX_*bounds, pinned equal by tests; the schema constants stay literals),hal(vision-leg defaults and gates),deploy(sim/realDeployModeThresholdsplus shared launch values, read bydeploy_e2e.launch.py), each a frozen range-validated section model. The tracker'sTrackerParams/FitParamsdefaults and every module constant ofobject_tracker/read it; the C++ defaultstracked_release_clear_m/tracked_release_timeout_s(kernel) andkReleasedClearTimeoutS(voxel bridge) mirrorrelease.*and are pinned equal bytests/unit/test_tracking_thresholds.py. (L309)DEFAULT_PATH: Path— the packagedopenral_core/data/tracking_thresholds.yaml(resolved withimportlib.resources). (L25)class DeployModeThresholds(BaseModel)— Thedeploy.sim/deploy.reallaunch values: octomap resolution, occupancy / clamping thresholds, world-voxel margin, self-filter trailing sweep, attached-collision and safe-action deadlines.deploy.sim/deploy.realvalidate through private subclasses whose bounds sit at the reviewed (formerly hard-coded) values, one-directional so the file can only tighten them; thecapssection, the sharedcollision_state_deadline_ms/sensor_model_miss/coverage_margin_mand thehalsection'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 (orpath); cached per path. A missing file, bad YAML, or a missing, unknown or out-of-range key raisesROSConfigError(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 byresolve_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 assetrefto 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 viaopenral_hal._unitree_h2_assets,AssetFetchErrorwhen offline;makermods:<metal|metal_station>(URDF / MJCF only) derives fromopenral_hal._makermods_metal_assets, its failed clone anAssetFetchErrorand a derive failure (including anOSErrorwriting into the cache) anAssetRefError;galaxea:a1(URDF, or the MJCF twin derived from it) is Galaxea's A1 fromopenral_hal._galaxea_a1_assets, a failed download anAssetFetchErrorand a digest mismatch anAssetRefError;robotwin:aloha_agilex(URDF / MJCF) is RoboTwin 2.0's URDF, or the MuJoCo twin derived from it, fromopenral_hal._robotwin_aloha_agilex_assets, a failed read anAssetFetchErrorand a digest mismatch or failed derive anAssetRefError;robosuite:<robot>(MJCF only) is that robosuite >= 1.5 robot with its default base and grippers composed byopenral_hal._robosuite_assets(panda_mobile:PandaOmron), every failure anAssetRefError;behavior:r1prois the BEHAVIOR-1K R1 Pro fromopenral_hal._behavior_r1pro_assets— its URDF, or as an MJCF the deploy-sim twin built from it — a failed download anAssetFetchErrorand a failed MJCF build anAssetRefError;simpler:<file>(URDF only) is a SimplerEnv robot description from the Apache-2.0simpler-env/ManiSkill2_real2simviaopenral_hal._simpler_assets(google_robot), a failed download anAssetFetchError).openarm:<variant>is MJCF-only:bimanual,anvil_v2_bimanual, oropenamrobot_v2(built from the vendored URDF byopenral_hal._openamrobot_v2_assets). RaisesAssetRefErrorfor an unresolvable or malformed ref.def resolve_package_uri(uri: str) -> Path(L134) — Resolves one ROSpackage://<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_openarmdoes); a sourced ROS workspace is not consulted. RaisesAssetFetchErrorwhen the clone cannot be fetched (cause: the fetcher'sROSConfigError),AssetRefErrorfor 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_xmlwith everyfilename="rd:<module>:<relpath>"made the absolute<REPOSITORY_PATH>/<relpath>(the pinnedrobot_descriptionsclone, 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) andfoxglove_bridge(deploy_e2e._portable_robot_description, whose absolute paths_robot_mesh_packagethen serves aspackage://— the bridge'sASSET_URI_ALLOWLISTrefusesfile://).cached_onlynever clones or fetches (GIT_ALLOW_PROTOCOL=filewhile importing the module): an uncached clone raisesAssetFetchErrorat once — the deploy launch's mode. RaisesAssetFetchErroron a failed clone,AssetRefErrorwithoutrobot_descriptionsor 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 basefile:<relpath>refs resolve against after the manifest dir. (L77)_ROS2_DYNAMIC: str = "ros2://robot_description"— The dynamic-detection marker scheme;resolve_assetreturnsNonefor it so the caller subscribes at runtime instead. (L78)_RD_ATTR: dict[AssetKind, str]— Mapskindto therobot_descriptionsmodule attribute it reads for therd:<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 (NonereadsTEGRA_RELEASE_PATHat call time, so tests point that constant at a captured fixture), shared byopenral_sim._sidecar_common.default_expandable_segments(allocator default),openral_runner…gstreamer.pipeline.detect_platformandopenral_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) — Onenvidia-smi --query-gpu=<field>value for GPU 0 in GB;0.0on 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'sSIM_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—TruewhenROS_AUTOMATIC_DISCOVERY_RANGEis unset/empty, orSUBNETwithoutenv[ALLOW_NETWORK_ROS_ENV] == "1":source /opt/ros/jazzy/setup.bashexportsSUBNETwhenever it is unset (set-if-unsetinros_environment's1.ros_discovery.dsv), so the variable alone cannot mark a choice. Used byconfine_sim_scope/confine_real_scopeto decide when to defaultLOCALHOST. (L101)networked_ros_scope(env: Mapping[str, str]) -> str | None— The scope description whenenvreaches other hosts (ROS_STATIC_PEERSset, orROS_AUTOMATIC_DISCOVERY_RANGEunset/empty — SUBNET to ROS — or anything butLOCALHOST/OFF; and always a Fast DDSROS_DISCOVERY_SERVER,RMW_IMPLEMENTATION=rmw_zenoh_cpp, or a vendor XML config that lists peers or cannot be read —CYCLONEDDS_URI<Peers>, aFASTRTPS_/FASTDDS_DEFAULT_PROFILES_FILEinitialPeersList/discoveryServersList), elseNone;ROS_LOCALHOST_ONLY=1overrides the range and peers, as in rcl. (L127)require_host_confined_ros_scope(env: Mapping[str, str]) -> str | None— RaisesROSConfigErroronROS_AUTOMATIC_DISCOVERY_RANGE=OFF(it hides the robot's own nodes from each other), on a networked scope unlessenv[ALLOW_NETWORK_ROS_ENV] == "1", and on an opted-in networked scope without SROS2 or onrmw_zenoh_cpp(ADR-0130). WheneverROS_SECURITY_ENABLE=true, whatever the scope, it also appliesopenral_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_scopedeliberately does not, #558);Nonewhen confined. (L166)require_host_confined_real_bringup(launch: str, env: Mapping[str, str], *, included_by_deploy: bool) -> None— The gate every in-tree vendorreal_bringuplaunch (openral_hal_openarm,openral_hal_unitree) runs on its ownos.environbefore composing any node (issue #556):require_host_confined_ros_scope, plus a structlogros_graph_scope.real_bringup_networkedwarning for an opted-in scope on a hand run only (underdeploy_e2e, whosehal_modethe launch sees, the deploy gate is the one emitter, #558). Pinned per launch bytests/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 vendorros2_controlbringup and scene drivers. (L50) - const
LAUNCH_ENCLAVE: Final[str]—"/openral/launch":ros2 launchandtools/lifecycle_autostart.py, the only enclaves besides the kernel's allowedchange_stateon 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_ENABLEis exactly"true", as rcl reads it. (L75)require_secure_ros_graph(env: Mapping[str, str]) -> Path— RaisesROSConfigErrorunlessROS_SECURITY_ENABLE=true,ROS_SECURITY_STRATEGY=Enforce,ROS_SECURITY_KEYSTOREholds every enclave inOPENRAL_ENCLAVESwith its keys and signed files, the signed governance (governance.p7s, what DDS loads) admitsROS_DOMAIN_ID(unset = 0, non-numeric refused), and every enclave but the kernel's has signed permissions denying/openral/safe_actionpublication (the default enclave alsoestop_resetand the kernel'schange_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, defaultsROS_SECURITY_ENCLAVE_OVERRIDEtoOPERATOR_ENCLAVEin place (an exported one wins); called byopenral estop reset,openral promptandopenral 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'scommand_topic/gripper_command_topic, state topics incl.joint_state_topic,/openral/estop_reset,/controller_manager/*, the trajectory action, andchange_state/set_parameters*on the kernel, HAL, E-stop producers, compliance recorder andsafety_controller), then allow/*. The operator keeps/safety_controllerparameters (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>/typevalue 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 withoutip. (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;stateis 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 viaip -details -json link showwhen 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 raisesROSConfigErrorotherwise. (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-deployworld_voxel_margin_m(deploy_e2e.launch.py::_world_voxel_margin_mreturns 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 whenDeployRuntime.estimated_depth_rskillnames none (the launch's_ESTIMATED_DEPTH_RSKILLandopenral 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 itshares_mount_with— counts as one): a robot-mounted one (SensorSpec.is_cloud_source) must get itsstatic_transform_xyz_rpyfrom one of the unit'sSensorOverlays, never the manifest's nominal value; a scene-mounted one must declareparent_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, orNone),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 declaredparent_frame+static_transform_xyz_rpyon it or on itsshares_mount_withsensor (sim and real; body mounts get a<frame>_optical_framechild), or in sim an*_optical_framethe bridge places from the MJCF. Refusesworld, bare robot links, depth sensors, missing intrinsics, on a real deploy a camera with nodeploy_bindingor with only the manifest's nominal intrinsics (DA3's metres scale with the focal: it needs its driver's CameraInfo — aros2_imagebinding with atopic— or this unit's calibrated intrinsics,calibrated_intrinsics= the overlays that set them) or a non-boolbackend_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 byopenral deployanddeploy_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 pinnedoctomap_cloud_topic, no measured sensor's cloud:deploy_cloud_topicempty) and noestimated_depth_camera: the one RGB cameraresolve_estimated_depth_cameraaccepts (same args).ROSConfigErrorwhen none qualifies (every RGB camera's problems listed, so a measured sensor's HZ-0382-6 refusal shows) or several do (named; setruntime.estimated_depth_camera) — never first-wins. Never reached withenable_octomapunset (an estimate never auto-enables octomap). Shared byopenral deploy(resolve_launch_invocation, which forwards the pick asestimated_depth_camera:=) anddeploy_e2e.launch.py(a directros2 launch).optical_frame_id(frame_id) -> str(L382) — The REP-103 optical frame of a camera mount frame: an*_optical_frameas 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(theSensorSpecwhose mount places the camera: itself, or the one itshares_mount_with),frame(that mount'sframe_id),optical(itsoptical_frame_id; where it differs fromframe, a child a publisher must hang underframe).policy_depth_source(sensors, camera, *, estimated_depth_camera=None) -> str(L486) — The camera whoseDEPTH_IMAGEstream carries depth for a policy's RGBcamera: itself when it isestimated_depth_camera(the depth provider runs adepth_estimatorrSkill on it) or adepthsensor, else thedepthsensor sharing its mount (shares_mount_with, either direction). A depth sensor elsewhere does not count.ROSConfigErrornaming both fixes (setruntime.estimated_depth_camera, or declare an RGB-D partner) when none. Called by theinternvla_n1adapter for adepth_input: metriccheckpoint.optical_mount(spec, sensors) -> OpticalMount | None(L446) — Issue #641: the one rule for the mount a camera's pixels are placed through. A camera thatshares_mount_withanother sensor ofsensors→ that sensor's mount (no pose needed on the camera); one with its ownparent_frame+static_transform_xyz_rpy→ its ownframe_id; any other →None(it keeps itsframe_id). Read byimage_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) andopenral_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 thatshares_mount_withanother sensor ofsensorsis in that mount'soptical_frame_id(OpenAMRobot / OpenArmtoponhead_zed→zed_camera_link_optical_frame), one with its own mount (parent_frame+static_transform_xyz_rpy) in itsoptical_frame_id(MakerModstop_camera→top_camera_optical_frame, latched by the sim bridge), any other its ownframe_id—optical_mount(...).optical, elsespec.frame_id. Used by the sim bridge's RGBImageheader andCameraInfoand 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'sskill:*actions admit only these. Unset or empty: every installed rSkill.allowed_rskills_from_env(environ=None) -> frozenset[str] | None(L294) — The ids inOPENRAL_RSKILLS(os.environwhenenvironisNone), trimmed and casefolded (Hugging Face repo ids are case-insensitive), so compare withrskill_listed, neverin;Nonewhen it lists none (no restriction).rskill_listed(rskill_id, allowed) -> bool(L321) — Whether the robot's rSkill list (allowed_rskills_from_env) admitsrskill_id:TruewhenallowedisNone, else a casefolded membership test.casefold_rskills(ids) -> frozenset[str] | None(L333) — A caller's rSkill list casefolded, asrskill_listedcompares it;Nonekept.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 withre.fullmatch(underre.searcha$lets a trailing newline through); thepromptaction'sargs_schemaanchors it with(?![\s\S]).WRITE_CONTROLS_ENV = "OPENRAL_DASHBOARD_WRITE_CONTROLS"(L82) —1(only) putsskill:*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'sissmay name.TRUSTED_ISSUERS_ENV = "OPENRAL_TRUSTED_ISSUERS"(L95) — Comma-separated origins that replaceTRUSTED_ISSUERS(self-hosted issuer, tests); a listed origin may also serve another issuer'sjwks.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'sname,frame_idandparent_frame:left/rightwhen one names a side;leftwhen one says wrist, hand, gripper or eef;centerotherwise (overhead, head, torso, base, world). Used bybuild_robot_manifestfor 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(CameraPositionfor camera panels, elseNone). 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 orNone).class RobotManifest(BaseModel)(L229) —schema_version(wire aliasschema,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,kindinEXECUTE_RSKILL_KINDS, anembodiment_tagsoverlap, everycapabilities_requiredkey aTrueflag, and a commercial-use licence on a commercial deployment. Shared bybuild_tool_paletteandbuild_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 itscamera_position), joints, the resolvedDeployRuntimetoggles (Nonereads as off) and the bridge; actionsestop(viewer, always remote),estop_reset(operator, confirm),prompt(operator, when the reasoner runs) and, with write controls, oneskill:<name>per installed rSkillrskill_matches_robotadmits and, when given,allowed_rskill_idslists (args_schema=goal_params_schemaor an empty object schema);remoteon all butestop=remote_control.robot_instance_id() -> str(python/core/src/openral_core/robot_ui.pyL558) — Which robot this is, forRobotManifest.instance_id: its openral.com robot id when linked (the enrolment'srobot), elselocal:<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 pinsiss's origin toTRUSTED_ISSUERS(or$OPENRAL_TRUSTED_ISSUERS) andjwkstoiss's origin unless the override lists thejwksorigin, so bothparse_robot_link_codeand 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.secretbesideenrolment_path(): the robot's openral.com credentialopenral robot linkwrites; read byopenral_cli.robot.apply_account_settingsand the dashboard's/api/robot-settingsrelay.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);ROSConfigErroron 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_wxyztreats the gaze direction as degenerate. (L62)_PARALLEL: float = 0.999— Above this|cos|between gaze andup,look_at_quat_wxyzswaps 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 ateyesoview_axispoints attarget; 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 hitstarget_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; raisesROSConfigErroron 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, stampedstamp_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_contactdropped (the held payload's own is the grasp-timemap_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_refsuffixed|frozen_release;released_by_link= the held attach link, which makes the kernel treat it as a frozen payload (never world-checked; Sparkv_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 atlink_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 fromopenral_hal.vision_attachment_bridge, 2026-11-02).yaw_to_quat_xyzw(yaw: float) -> tuple[x, y, z, w]— Unit quaternion (ROS order) forRz(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 predicaterebase_boxand the deploy's_check_place_zone_framesshare.rebase_box(box, t_frame_from_box, frame) -> PlaceRegion(L391) — A gravity-aligned declared box re-expressed inframethrough tf2frame <- box, still yaw-only (the transform's tilt, at most 0.5°, dropped; more, or a tilted box, is aROSConfigError). Shared by the HAL grasp-target leg (search_box/workspace_boxinodom/map) and the object tracker (TrackerSession._zone_region, aPlaceZoneinmap/odom); moved down fromopenral_hal._grasp_target_legso Layer 2 need not import Layer 0.rebase_pose(pose, t_frame_from_pose, frame) -> Pose6D(L441) —posere-expressed inframethrought_frame_from_pose(tf2frame <- pose), the full rigid motion, tilt included (rebase_boxkeeps 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'sbase_jointspositions leftreference: the prismatic dofs' planar distance pastplanar_m, or a revolute dof's wrapped angle pastturn_rad;Noneor 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, atBASE_STILL_*) and the Layer-2 object tracker's base-move carry (TrackerSession.on_joint_state, atSTATION_*).base_prismatic(description) -> tuple[bool, ...](L519) — Perbase_jointsentry, 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 isROSConfigError.edge_chain(description, root, link) -> tuple[tuple[edge, origin], ...] | None(L128) — The(edge, origin)chain fromrootdown tolinkthroughjoints,mimic_jointsandfixed_attachments;Noneoffroot's subtree.link_transform(description, root, link, positions) -> NDArray(L160) —T_root<-linkat joint positions by name, mimic- andurdf_curve-aware (never tf's jaw-fraction-as-radians);ROSConfigErroroff 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,<= 0exactly on overlap. Not a kernel mirror (see14-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 jointshome_posenames, grippers excluded, in manifest order.moveit_joint_limits(desc) -> dict[str, dict[str, float | bool]](L97) —robot_description_planning.joint_limitsfor the home group:velocity_limit, and that overACCEL_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_fractionfor every group.moveit_source_urdf(desc, manifest_dir=None) -> str(L257) — The URDF text the model is built from:assets.urdf, elseassets.mjcfconverted bymjcf_to_urdf;ROSConfigErrorwith neither (pusht_2d) or a runtime-only URDF,AssetRefErrorwhen 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),±infbounds dropped (urdfdom cannot parse them), collisions replaced by the kernel primitives (capsule = cylinder + 2 spheres; a tight-hull box = its hull mesh inmesh_dir), visuals and transmission / ros2_control / Gazebo blocks dropped.moveit_srdf(desc, urdf_text) -> str(L875) — Theopenral_homegroup anddisable_collisions=allowed_collision_pairs; no virtual joint (the URDF root is the model frame).ROSConfigErrorwithout 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 rootworld), hinge / slide → revolute (continuousunlimited) / 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 (qpos0folded into the origin); a linear joint<equality>→<mimic>. No inertia, visuals or collisions.ROSConfigErrorwithoutmujoco, 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 belowroot.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;ROSConfigErrorotherwise.
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;ROSConfigErrorwhen 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 thanpadding_mfrom 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;ROSConfigErrorfor 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_ratioof 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 refusedNOT_ON_SUPPORTwith ≥ 2 voxels of height — HZ-0115-6)._REFUSAL_SEVERITYorders them most severe first.class VoxelLattice(frame_id, origin, orientation_xyzw, resolution, size, occupancy)(L174) — TheOccupancyVoxelsfields, same convention asbucket2_markers.occupied_voxel_centers(re-derived, cross-checked intests/unit/test_grasp_target.py). RaisesROSConfigErroron 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 inframe_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 aNOT_ON_SUPPORTrefusal — 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_masksvetoes 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 alwayssupport_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 withROSConfigError.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_cellstop-surface cells (nothing occupied directly above) in the ring between one cell andprobe_margin_maround the footprint of the component above it holding the anchor (the highest cell of the occupied column nearestnear_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 onsurface_centers(defaultcenters) — it lies outside the target's footprint, so mostly outside a tightly padded search column; the leg passes the column grown byprobe_margin_m+ one cell.Nonewhen 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.ROSConfigErroron a tilted (non-z-up) lattice or aprobe_margin_munder two cells (an empty ring; never silently widened — the leg checks first and reports aprobe_margin_under_two_cellslost 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 nearestnear_xy— never merely the largest); refuses too few cells or any other cluster ≥ambiguity_ratioof 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 ofbackproject_masked_depth);Nonebehind 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 atsupport_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 noNOT_ON_SUPPORTcheck; sides and top padded by√3·resolution/2 + extrinsic_error_m; refuses on the caps, andNOT_ON_SUPPORTwhen the trimmed cloud's lowest point sits more than two voxels abovesupport_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) throughtarget_region_from_mask: the first that fits in the segmenter's order, except one holding ≥nested_fractionof a smaller candidate refusedNOT_ON_SUPPORTwhose cloud spans ≥ 2 voxels (the body it stands on would be exempted) is refusedSTACKED; 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) —maskwithout 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 neighbouringcell_mcell. 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 declaredworkspace_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 declaredworkspace_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_fractionof 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/√2horizontally against a z-up lattice — andr/2up only, the bottom kept (the support layer stays non-exempt). Clamped per half-extent atmax_half_extent_m. Applied only to the region the grasp-target leg publishes;ROSConfigErroron another frame or a tilted region.lowered_to_support(region, support_z) -> PlaceRegion(L1253) —regionwith its lower face moved down ontosupport_z, the rest unchanged (regionitself 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):regiongrown bymargin_malong its own axes on the four sides and the top, and the bottom too whendown(the kernel's pre-handover region;down=Falseis the attached payload, never into the support).margin_m = 0returnsregionitself;ROSConfigErroron a negative or non-finite margin.region_within(inner, outer, *, tol_m) -> bool(L1152) — Every corner ofinnerinsideoutergrown bytol_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 abovesupport_z, outsideregionand 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 tomap_completed_region(partial_fitwhen 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 abovesupport_z, 26-connected, seeded from those incell_closed_region(fit), flooded insidecolumn(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.Nonewith the reason when a component cell's 26-neighbour lies outsidecolumn(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).ROSConfigErroron 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. RaisesROSConfigErroron shape disagreement or mismatched-resolution intrinsics. (L612) Moved fromopenral_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 fromopenral_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_nsis 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_occupiedbelowmin_cover: the object gone, or never in the map) ormap_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.ROSConfigErroron a frame mismatch. A second body confined to the bandpad_minside the box's sides and top (the fit's padding,fit_pad_m) is a neighbour's sliver, not a split; one wholly inside theownboxes (the robot's hands) is the robot's own, not a split.min_split_cells: the fewest cells a second body needs to split (1fail-closed default; the object tracker passesMIN_SPLIT_CELLS).instance_prompt(grid, column, covered, *, near_xy, skip=()) -> tuple[point, cell] | None(L208) — Where to prompt the segmenter next (SegmentInViewhas 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) nearestnear_xy, in nocoveredbox and not inskip, 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 (theskipkey).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;ambiguouswhen the runner-up is withinambiguity_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 withintrack_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. Pastmax_tracksthe 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 inscannedthat nothing matched accrues a miss and is dropped aftermax_misses; one outside is kept. Returns the fits' instances, largest first.prune(keep) -> list[ObjectPrimitive](L482) — Drop every instancekeeprefuses (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.0for disjoint/degenerate boxes. (L21)class DetectionTracker2D(*, iou_threshold=0.3, max_misses=3)— Stateful per-camera 2D-IoU tracker assigning a stabledet_idto 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 stabledet_idvia greedy same-label IoU association; retires tracks unseen formax_missesframes. (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 onsim_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)withsteps * dt_s == 1 / control_freq_hzexactly; (L22) keeps the engine dt when it already divides the period, otherwise shrinks it (never grows) to the largest value at or belowphysics_dt_sthat does (MuJoCo's 0.002 s at 30 Hz: 16.67 steps → 17 at 1/510 s).ROSConfigErroron a non-finite / non-positive rate or dt. Used byMujocoTwinRollout._resolve_time_base(theMujocoArmHALtwins) andopenral_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 withinTIME_BASE_TOL(NaN refused too), or a manifest with no rate (control_freq_hz=None). (L60) The one guard behindSimAttachedHAL._check_time_baseand the twin.scene_control_rate_hz(backend_options, robot_hz) -> float | None(L100) — The rate a sim scene steps: a finite positivebackend_options.control_freq_hz(a bool, string, NaN, inf or non-positive value is aROSConfigError), elserobot_hz. Shared byopenral_sim.cli._scene_control_rate_hz(video / dataset fps) andsim_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 withFailureTrigger.KIND_FORCE+ForceEvidence(unit="Nm")— the same semantics at the supervisor boundary. Nothing compares a force againstSafetyEnvelope.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 withsuccess=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 oneSuccessConditionover a stream ofTrackedObjectSets; the one place the predicate and its settle clock live (the rSkill runner and the sim tests run it).succeeded:min_counttracks 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 oversettle_sof the sets' ownstamp_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 pastmax_evidence_gap_srestarts the settle.outcome(self) -> TaskOutcome(L89) — The verdict on the evidence observed so far.