actions
类:
| 名称 | 描述 |
|---|---|
ControlActionManager |
Base class for action managers that control actuators. |
ControlActionManager
ControlActionManager(env: GenesisEnv, delay_step: int = 0, params: VehicleParams = VehicleParams(), gains: dict | None = None, limits: dict | None = None, entity_attr: str = 'robot', control_mode: str = 'cmd_motor_speeds')
Bases: BaseActionManager
Base class for action managers that control actuators.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
GenesisEnv
|
The environment to manage the DOF actuators for. |
必需 |
|
int
|
The number of steps to delay the actions for. This is an easy way to emulate the latency in the system. |
0
|
|
VehicleParams
|
Vehicle physical parameters. |
VehicleParams()
|
|
str
|
Attribute name on the environment for the robot entity. |
'robot'
|
|
str
|
Control mode string (e.g. 'cmd_motor_speeds'). |
'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.