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)

reset([env_ids])

Resets the manager term.

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

cfg

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

actions (ndarray)

Return type:

None

reset(env_ids=None)[source]

Resets the manager term.

Parameters:

env_ids (ndarray | slice | 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
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.