rlmesh.adapters.StateTag

classfrom rlmesh.adapters import StateTag[source]

A numeric proprioception entry in an environment observation.

StateTag(
    role: str,
    encoding: RotationEncoding | Sequence[RotationEncoding] | None = None,
    range: tuple[float, float] | None = None,
    *,
    frame: Frame | None = None,
    provenance: Provenance | None = None,
    part: str | None = None,
    labels: Sequence[str] | None = None,
)

role

attribute[source]
role: str

Semantic role used for matching, e.g. proprio/eef_pos.

encoding

attribute[source]
encoding: RotationEncoding | Sequence[RotationEncoding] | None

Rotation encoding when the role is a rotation. A single encoding, or a sequence of them (the env’s native first, then alternatives it can emit) for cross-version negotiation.

range

attribute[source]
range: tuple[float, float] | None

Optional (low, high) value range, supplying the bounds where the space leaves this leaf unbounded. If the space declares finite bounds that disagree with it, resolution errors rather than silently overriding them.

frame

attribute[source]
frame: Frame | None

Coordinate frame this entry’s values are expressed in, when the role is an absolute pose (proprio/eef_*). Keyword-only and omitted from the wire when unset. A model that declares a different one fails resolution; a model that declares one the env does not draws a caution.

provenance

attribute[source]
provenance: Provenance | None

Where this entry’s numbers come from: "sensed" (a physical sensor or its simulated equivalent), "estimated" (a state estimator) or "privileged" (simulator truth with no hardware counterpart). Part of the leaf’s identity, so an env may publish one role twice under two provenances; a model that declares one the env contradicts fails resolution. Keyword-only and omitted from the wire when unset.

part

attribute[source]
part: str | None

The body part this entry belongs to, when the role repeats across a body (LEFT_ARM, RIGHT_ARM, or any identifier both sides agree on). An identity key the resolver matches on; see ImageTag. Keyword-only and omitted from the wire when unset.

labels

attribute[source]
labels: Sequence[str] | None

The axis names of this entry in the order the env emits them, one per element of the space leaf (checked at join). A model that names labels must name this same set; another order is gathered by name. Keyword-only and omitted from the wire when unset.