rlmesh.adapters.Rotation

classfrom rlmesh.adapters import Rotation[source]

A literal rotation, authored as a model state part's post_rotate.

Rotation(*, encoding: RotationEncoding, value: tuple[float, ...])

R_out = R_in @ R(post_rotate): the rigid re-frame a checkpoint was trained against (a tool/grip offset), right-multiplied onto the env’s rotation after it is decoded and before it is re-encoded into the model’s encoding. Build one with from_matrix(); the value must already be a rotation (orthonormal, |det - 1| <= 1e-4) or the codec rejects it.

encoding

attribute[source]
encoding: RotationEncoding

Rotation encoding value is written in.

value

attribute[source]
value: tuple[float, ...]

The rotation’s components in that encoding.

from_matrix

function[source]
from_matrix(rows: Iterable[Iterable[float]])

Build a rot6d literal from a 3x3 matrix given as three rows.

rot6d is the matrix’s first two columns concatenated, so the round-trip is exact – no Euler recovery, no gimbal case.