跳转至

actions

类:

名称 描述
FlightControlActionManager

Base class for action managers that control actuators.

FlightControlActionManager

FlightControlActionManager(env: GenesisEnv, delay_step: int = 0, params: VehicleParams = VehicleParams(), entity_attr: str = 'robot', rotor_link_names: tuple[str, ...] = ('rotor0', 'rotor1', 'rotor2', 'rotor3'))

Bases: BaseActionManager

Base class for action managers that control actuators.

参数:

名称 类型 描述 默认

env

GenesisEnv

The environment to manage the DOF actuators for.

必需

delay_step

int

The number of steps to delay the actions for. This is an easy way to emulate the latency in the system.

0

params

VehicleParams

Vehicle physical parameters.

VehicleParams()

entity_attr

str

Attribute name on the environment for the robot entity.

'robot'

方法:

名称 描述
step

Process the incoming actions (analogous to Isaac Lab process_actions).

send_actions_to_simulation

Apply the processed actions to the simulation (Isaac Lab apply_actions).

reset

Reset environments.

get_actions

Get the current actions for the environments.

属性:

名称 类型 描述
num_actions int

The total number of actions.

action_space tuple[float, float]

If using the default action handler, the action space is [-1, 1].

actions Tensor

The actions for for the current step.

raw_actions Tensor

The actions received from the policy, before being converted.

num_actions property

num_actions: int

The total number of actions.

action_space property

action_space: tuple[float, float]

If using the default action handler, the action space is [-1, 1].

actions property

actions: Tensor

The actions for for the current step.

raw_actions property

raw_actions: Tensor

The actions received from the policy, before being converted.

step

step(actions: Tensor) -> torch.Tensor

Process the incoming actions (analogous to Isaac Lab process_actions).

Only the raw and clamped policy actions are stored here; the mixer, rotor dynamics and body-force application run in :meth:send_actions_to_simulation (the apply phase).

send_actions_to_simulation

send_actions_to_simulation(processed_actions: Tensor) -> torch.Tensor

Apply the processed actions to the simulation (Isaac Lab apply_actions).

genesis_forge>=0.5 splits action handling into step (process) and send_actions_to_simulation (apply), which runs at a different cadence than processing. This maps the processed actions to a rotor RPM command via the mixer, steps the rotor dynamics, and writes the resulting body forces/torques to the solver.

reset

reset(envs_idx: list[int] | None)

Reset environments.

get_actions

get_actions() -> torch.Tensor

Get the current actions for the environments.