跳转至

rotor

Torch rotor dynamics for batched simulation.

类:

名称 描述
RotorDynamics

Batched rotor dynamics model.

RotorDynamics

RotorDynamics(params: VehicleParams = VehicleParams(), num_envs: int = 1, device: str | device = 'cpu')

Bases: DynamicsBase

Batched rotor dynamics model.

Initialize batched rotor dynamics on the specified device.

方法:

名称 描述
randomize

Randomize rotor runtime parameters from nominal values.

update

Calculate the output thrust and torque for each motor based on the motor commands.

reset

Resets the rotor model to initial conditions.

属性:

名称 类型 描述
params VehicleParams

Vehicle parameters for the dynamics model.

params instance-attribute

params: VehicleParams = params

Vehicle parameters for the dynamics model.

randomize

randomize(env_ids: slice | Sequence[int] | Tensor | None = None, randomization: dict[str, tuple[float, float]] | None = None) -> None

Randomize rotor runtime parameters from nominal values.

update

update(commands: Tensor) -> torch.Tensor

Calculate the output thrust and torque for each motor based on the motor commands.

参数:

名称 类型 描述 默认

commands

Tensor

Command tensor for each motor. Shape: (num_envs, 4)

必需

返回:

类型 描述
Tensor

torch.Tensor: Thrust and torque tensor for each motor. Shape: (num_envs, 8)

reset

reset(env_ids: slice | Sequence[int] | Tensor) -> None

Resets the rotor model to initial conditions.

参数:

名称 类型 描述 默认

env_ids

slice | Sequence[int] | Tensor

The environment ids to reset.

必需