跳转至

actions

类:

名称 描述
FlightControlActionManager

Base class for Genesis flight action managers.

FlightControlActionManager

FlightControlActionManager(env: GenesisEnv, delay_step: int = 0, params: VehicleParams = VehicleParams(), gains: dict | None = None, limits: dict | None = None, mapping: FlightMappingConfig = FlightMappingConfig(), entity_attr: str = 'robot', rotor_link_names: tuple[str, ...] = ('rotor0', 'rotor1', 'rotor2', 'rotor3'), control_mode: str = 'cmd_motor_speeds', controller: str = 'FlightController', randomize_gains: bool | dict = False)

Bases: BaseActionManager

Base class for Genesis flight action managers.

Initialize the Genesis flight action manager.

参数:

名称 类型 描述 默认

env

GenesisEnv

The environment that owns the controlled robot entity.

必需

delay_step

int

Number of control steps to delay incoming actions.

0

params

VehicleParams

Vehicle physical parameters.

VehicleParams()

gains

dict | None

Optional flight-controller gain overrides.

None

limits

dict | None

Optional flight-controller command-limit overrides.

None

mapping

FlightMappingConfig

Action-mapping overrides resolved against params.

FlightMappingConfig()

entity_attr

str

Environment attribute name for the robot entity.

'robot'
tuple[str, ...]

Ordered rotor link names matching controller/mixer order.

('rotor0', 'rotor1', 'rotor2', 'rotor3')

control_mode

str

Flight control mode for interpreting the incoming action.

'cmd_motor_speeds'

controller

str

Controller class name. Options: 'FlightController' (PID), 'GeoControl'.

'FlightController'

randomize_gains

bool | dict

If True, gains are randomized on reset() via gains_to_randomization_ranges(). Pass a dict of min/max ranges to use custom bounds instead.

False

方法:

名称 描述
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 flight controller, mixer, rotor dynamics and body-force application all run in :meth:send_actions_to_simulation (the apply phase). Keeping the controller in the apply phase lets it read fresh robot state on each apply tick, mirroring Isaac Lab's process_actions/apply_actions split.

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 reads fresh robot state, runs the flight controller/mixer to obtain the rotor RPM command, 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.