DroneEntity(无人机实体)#

class genesis.engine.entities.drone_entity.DroneEntity(scene: Scene, solver: RigidSolver, material: Material, morph: Morph, surface: Surface, idx: int, idx_in_solver, link_start: int = 0, joint_start: int = 0, q_start=0, dof_start=0, geom_start=0, cell_start=0, vert_start=0, free_verts_state_start=0, fixed_verts_state_start=0, face_start=0, edge_start=0, vgeom_start=0, vvert_start=0, vface_start=0, equality_start=0, visualize_contact: bool = False, morph_heterogeneous: list[genesis.options.morphs.Morph] | None = None, name: str | None = None)[source]#

Bases: RigidEntity

set_propellels_rpm(propellels_rpm)[source]#

Set the RPM (revolutions per minute) for each propeller in the drone.

Parameters:

propellels_rpm (array-like or torch.Tensor) – A tensor or array of shape (n_propellers,) or (n_envs, n_propellers) specifying the desired RPM values for each propeller. Must be non-negative.

Raises:

RuntimeError – If the method is called more than once per simulation step, or if the input shape does not match the number of propellers, or contains negative values.

update_propeller_vgeoms()[source]#

Update the visual geometry of the propellers for animation based on their current rotation.

This method is a no-op if animation is disabled due to missing visual geometry.

property model#

The model type of the drone.

property KF#

The drone’s thrust coefficient.

property KM#

The drone’s moment coefficient.

property n_propellers#

The number of propellers on the drone.

The index of the center-of-mass (COM) link of the drone.

property propellers_idx#

The indices of the drone’s propeller links.

property propellers_spin#

The spin direction for each propeller.