rlmesh.adapters.Previous

functionfrom rlmesh.adapters import Previous[source]

The model's own previous action as a state part.

Previous(role: str, *, part: str | None = None, fill: float = 0.0)

Sugar for State(role, part=part, fill=fill, source="action"): the part binds the spec’s own output Actuator with the same role and part (no actuator emits it is a resolve error) and reads back the raw action executed at the previous step, in model order, before the actuator’s scale/offset; fill is what it reads before the episode’s first action. It is not an env role: an env observation tagged under action/ is refused at tag. A model with one holds per-episode history the way a stacked image does, so every executed action, including a replayed chunk frame, is recorded under its step and a missed step fails the next observation loudly.

Parameters

NameTypeDescription
rolestrThe action role to read back (ACTION_JOINT_POS).
partstr | NoneThe body part, when the actuator names one.
fillfloatThe value every element carries before the first action.