actions
类:
| 名称 | 描述 |
|---|---|
ControlActionManager |
Base class for Genesis flight action managers. |
ControlActionManager
ControlActionManager(env: GenesisEnv, delay_step: int = 0, params: VehicleParams = VehicleParams(), gains: dict | None = None, limits: dict | None = None, mapping: FlightMappingConfig = FlightMappingConfig(), entity_attr: str = 'robot', control_mode: str = 'cmd_motor_speeds')
Bases: BaseActionManager
Base class for Genesis flight action managers.
Initialize the Genesis flight action manager.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
GenesisEnv
|
The environment that owns the controlled robot entity. |
必需 |
|
int
|
Number of control steps to delay incoming actions. |
0
|
|
VehicleParams
|
Vehicle physical parameters. |
VehicleParams()
|
|
dict | None
|
Optional flight-controller gain overrides. |
None
|
|
dict | None
|
Optional flight-controller command-limit overrides. |
None
|
|
FlightMappingConfig
|
Action-mapping overrides resolved against |
FlightMappingConfig()
|
|
str
|
Environment attribute name for the robot entity. |
'robot'
|
|
str
|
Flight control mode for interpreting the incoming action. |
'cmd_motor_speeds'
|
方法:
| 名称 | 描述 |
|---|---|
step |
Handle the received 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) -> None
Handle the received actions.
reset
reset(envs_idx: list[int] | None)
Reset environments.
get_actions
get_actions() -> torch.Tensor
Get the current actions for the environments.