mapping
Control-mode mapping utilities for batched Torch controller pipelines.
类:
| 名称 | 描述 |
|---|---|
FlightActionMapper |
Map batched normalized actions into controller targets, wrench, or RPM. |
函数:
| 名称 | 描述 |
|---|---|
target_to_command |
Convert full 12D target batches into compact command vectors. |
FlightActionMapper
FlightActionMapper(control_mode: str, params: VehicleParams = VehicleParams(), limits: FlightMappingLimits = FlightMappingLimits(), *, num_envs: int = 1, device: str | device = 'cpu')
Map batched normalized actions into controller targets, wrench, or RPM.
Initialize a batched Torch flight action mapper for the selected mode.
方法:
| 名称 | 描述 |
|---|---|
map_action |
Map a normalized batched action into RPM commands and intermediates. |
属性:
| 名称 | 类型 | 描述 |
|---|---|---|
requires_controller |
bool
|
Whether this mode needs a controller target expansion step. |
requires_controller
property
requires_controller: bool
Whether this mode needs a controller target expansion step.
map_action
map_action(action: Tensor, mixer: Mixer, *, state: Tensor | None = None, flight_controller: ControllerBase | None = None) -> FlightMappingResult
Map a normalized batched action into RPM commands and intermediates.
target_to_command
target_to_command(target: Tensor, command_mode: str, state: Tensor | None = None) -> torch.Tensor
Convert full 12D target batches into compact command vectors.
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
|
Tensor
|
Batched target states with shape |
必需 |
|
str
|
Supported target command mode. Valid values are
|
必需 |
|
Tensor | None
|
Current batched 12D vehicle state with shape |
None
|
返回:
| 类型 | 描述 |
|---|---|
Tensor
|
torch.Tensor: A batched compact command tensor with shape |
Tensor
|
matching the requested mode:
- |
引发:
| 类型 | 描述 |
|---|---|
ValueError
|
If |