udaan.control.quadrotor package

Submodules

Module contents

Quadrotor controllers.

class udaan.control.quadrotor.DirectPropellerForceController[source]

Bases: Controller

__init__(**kwargs)[source]
compute(*args)[source]

Compute propeller forces given current state.

Returns:

four propeller forces in N

Return type:

ndarray

compute_alloc_matrix()[source]

Compute propeller force allocation matrix.

Propeller layout:

 (1)CW    CCW(0) [-1]      y^
      \_^_/                 |
       |_|                  |
      /   \                 |
(2)CCW     CW(3)           z.------> x
class udaan.control.quadrotor.GeometricAttitudeController[source]

Bases: Controller

Geometric tracking control of a quadrotor UAV on SE(3).

Control law (Lee, Leok, McClamroch 2010, Eq. 18-19):
M = -kR·eR - kΩ·eΩ + Ω × J·Ω
  • J·(hat(Ω)·Rᵀ·Rd·Ωd - Rᵀ·Rd·dΩd)

where:

eR = 0.5·vee(Rdᵀ·R - Rᵀ·Rd) (attitude error on so(3)) eΩ = Ω - Rᵀ·Rd·Ωd (angular velocity error) f = F · R·e3 (scalar thrust)

__init__(**kwargs)[source]
compute(t, state, thrust_force, desired_att=None)[source]

Compute scalar thrust and torque vector.

Parameters:
Return type:

tuple[float, ndarray[tuple[Any, ...], dtype[floating]]]

Returns:

(f, M) — scalar thrust and 3D torque vector.

property inertia
class udaan.control.quadrotor.GeometricL1AttitudeController[source]

Bases: GeometricAttitudeController

Geometric L1 adaptive attitude control on SO(3).

Extends GeometricAttitudeController with L1 adaptive disturbance rejection for unmodeled torque disturbances.

From: Kotaru, Edmonson, Sreenath (2020) https://doi.org/10.1115/1.4045558

__init__(**kwargs)[source]
compute(t, state, thrust_force, desired_att=None)[source]

Compute thrust and torque with L1 adaptive disturbance rejection.

Parameters:
Return type:

tuple[float, ndarray[tuple[Any, ...], dtype[floating]]]

Returns:

(f, M) — scalar thrust and 3D torque vector.

reset()[source]

Reset adaptation state for a new simulation.

Return type:

None

class udaan.control.quadrotor.PositionL1Controller[source]

Bases: PositionPDController

Quadrotor position controller using L1 adaption.

__init__(**kwargs)[source]
compute(*args)[source]
class udaan.control.quadrotor.PositionPDController[source]

Bases: PDController

Implements a PD controller for position control of a quadrotor.

__init__(**kwargs)[source]
compute(*args)[source]