rlmesh.adapters.Previous
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
| Name | Type | Description |
|---|---|---|
role | str | The action role to read back (ACTION_JOINT_POS). |
part | str | None | The body part, when the actuator names one. |
fill | float | The value every element carries before the first action. |