rlmesh.adapters
Generalized env-to-model adapters.
import rlmesh.adaptersClasses
- ActionOrdered action actuators plus optional clipping bounds.
- ActuatorOne contiguous slice of an action vector.
- AdapterA resolved env-to-model adapter; build instances with
resolve(). - AdapterBaseBase class for env-to-model adapters.
- AdvisoryOne non-fatal adapter advisory: a message plus a severity tier.
- ConcatA multi-part numeric state input: several roles packed into one tensor.
- ConstantA constant part of a
Concat:dimcopies offill. - CustomA custom input computed by host-language code.
- CustomEncodingA rotation packing layered on a known native
baseencoding. - EnvTagsDeclarative tags of an environment's observation and action.
- FieldOne contiguous field of a flat numeric observation leaf.
- ImageAn image input expected by a model.
- ImageTagA camera image entry in an environment observation.
- ModelSpecDeclarative description of a model's input payload tree and action output.
- ObservationRolesThe observation roles an environment declares, grouped by kind.
- RotationA literal rotation, authored as a model state part's
post_rotate. - SplitAn ordered split of one flat numeric observation leaf into role fields.
- StateA single-part numeric state input expected by a model.
- StateTagA numeric proprioception entry in an environment observation.
- TextA text input expected by a model.
- TextTagA text entry (typically the task instruction) in an observation.
Functions
- Previous()The model's own previous action as a state part.
- resolve()Derive an
Adapterfor an env/model pair. - resolve_from_contract()Derive an
Adapterfrom an env contract and a model spec. - tag()Merge env tags into
env.metadata(underENV_METADATA_KEY) and return it.
Exceptions
Constants
Show all 32Hide
- ACTION_DELTA_POSAction role for an end-effector Cartesian position delta (action/delta_eef_pos).
- ACTION_DELTA_ROTAction role for an end-effector rotation delta (action/delta_eef_rot).
- ACTION_EEF_POSAction role for an absolute end-effector position target (action/eef_pos).
- ACTION_EEF_ROTAction role for an absolute end-effector rotation target (action/eef_rot).
- ACTION_GRIPPERAction role for a gripper command (action/gripper).
- ACTION_JOINT_POSAction role for joint position targets (action/joint_pos).
- ACTION_JOINT_VELAction role for joint velocity targets (action/joint_vel).
- BASEBody part for the mobile base (base).
- BASE_ANG_VELObservation role for the base angular velocity, the IMU gyro (proprio/base_ang_vel).
- BASE_ROTObservation role for the base orientation (proprio/base_rot); read it with encoding="gravity_xyz" for projected gravity.
- COMMAND_BASE_VELCommand role for the base velocity setpoint [vx, vy, wz] the runner hands the policy (command/base_vel).
- EEF_POSObservation role for the end-effector Cartesian position (proprio/eef_pos).
- EEF_ROTObservation role for the end-effector rotation (proprio/eef_rot).
- EEF_WRENCHObservation role for the end-effector wrench [fx, fy, fz, tx, ty, tz] a wrist force/torque sensor reads (proprio/eef_wrench), framed.
- ENV_BRANCH_METADATA_KEYContract metadata key under which a branched environment publishes the discriminant binding its make() selected (rlmesh.adapters.v1.env_branch).
- ENV_METADATA_KEYContract metadata key under which an environment publishes its EnvTags (rlmesh.adapters.v1.env_tags).
- GRIPPER_POSObservation role for the gripper opening state (proprio/gripper).
- HEADBody part for the head (head), e.g. a head-mounted camera.
- IMAGE_PRIMARYObservation role for the primary scene camera (image/primary).
- IMAGE_SECONDARYObservation role for a secondary scene camera (image/secondary).
- IMAGE_WRISTObservation role for a wrist-mounted camera (image/wrist).
- INSTRUCTIONObservation role for the task instruction text (text/instruction).
- JOINT_POSObservation role for joint positions (proprio/joint_pos).
- JOINT_VELObservation role for joint velocities (proprio/joint_vel).
- LEFT_ARMBody part for the left arm (left_arm), where a role repeats across a bimanual body.
- LEFT_LEGBody part for the left leg (left_leg).
- MODEL_METADATA_KEYContract metadata key under which a model publishes its ModelSpec (rlmesh.adapters.v1.model_spec).
- PARTSThe registered body parts, in registry order.
- RIGHT_ARMBody part for the right arm (right_arm).
- RIGHT_LEGBody part for the right leg (right_leg).
- ROTATION_DIMSMapping from each rotation encoding to its dimension count.
- TORSOBody part for the torso (torso).
Type aliases
Show all 16Hide
- ConcatPartOne part of a Concat state input: a State leaf, a Constant block, or a bare role string.
- FitModeHow an image is fit to a declared size: 'stretch', 'letterbox', or 'crop'.
- FrameCoordinate frame an absolute pose is expressed in: 'world' or 'robot_base'.
- ImageLayoutImage axis-layout vocabulary: 'hwc' or 'chw'.
- InputNodeA node of the ModelSpec input tree: a leaf, a mapping, or a tuple of nodes.
- ModelLeafA model-input leaf: Image, State, Concat, Text, or Custom.
- ObsLeafAn observation tag leaf: ImageTag, StateTag, TextTag, or Split.
- ObsNodeA node of the observation tag tree: a leaf, a mapping, or a tuple of nodes.
- ObsTransformAn in-process callable mapping a raw observation to one payload slot (Custom transform).
- ProvenanceLiteral of where a state leaf's numbers come from: sensed, estimated, or privileged.
- ReferencePose a delta command is integrated against: 'current' (measured) or 'target' (last commanded).
- ResampleImage resampling filter vocabulary for declared resizes.
- RotationEncodingRotation encoding vocabulary (quat_xyzw, quat_wxyz, axis_angle, rot6d, rot6d_rowmajor, euler_xyz).
- RotationTransformAn in-process callable repacking a rotation block for a CustomEncoding.
- StackPadFrame-window padding vocabulary: replicate the first frame, or pad black.
- StackSpecA declared frame window: non-positive frame offsets from the current step.