unilab.envs.mdp.actions.actions.BaseAction

class unilab.envs.mdp.actions.actions.BaseAction[source]

Bases: ActionTerm

Apply a cold-path-resolved affine transform to raw policy actions.

Parameters:

Methods

__init__(cfg, env)

apply_actions()

process_actions(actions)

publish_validation_verdict()

Fail closed on the latest action-slice finite verdict.

reset([env_ids])

Zero the raw actions of the selected envs.

validate_actions()

Publish the manager-owned raw-action finite verdict.

Attributes

action_dim

name

num_envs

offset

processed_action

raw_action

requires_substep_state_feedback

Whether apply_actions needs state produced by the previous physics substep.

scale

target_ids

target_names

uses_tensor_state_packet

Whether apply_actions consumes the current packed tensor state packet.

cfg

cfg: BaseActionCfg
__init__(cfg, env)[source]
Parameters:
property scale: float | Tensor
property offset: float | Tensor
property raw_action: Tensor
property processed_action: Tensor
property action_dim: int
property target_ids: tuple[int, ...]
property target_names: list[str]
process_actions(actions)[source]
Parameters:

actions (Tensor)

Return type:

None

validate_actions()[source]

Publish the manager-owned raw-action finite verdict.

Return type:

None

reset(env_ids=None)[source]

Zero the raw actions of the selected envs.

Parameters:

env_ids (Tensor | None)

Return type:

None

__call__(*args, **kwargs)

Returns the value of the term required by the manager.

Return type:

Any

abstract apply_actions()
Return type:

None

property name: str
property num_envs: int
publish_validation_verdict()

Fail closed on the latest action-slice finite verdict.

Return type:

None

requires_substep_state_feedback: ClassVar[bool] = False

Whether apply_actions needs state produced by the previous physics substep.

False declares that the generated control is invariant across all physics substeps in one control step, so the env may apply it once before a batched backend step. State-feedback terms must override this declaration with True.

uses_tensor_state_packet: ClassVar[bool] = False

Whether apply_actions consumes the current packed tensor state packet.