udaan.control.quadrotor package¶
Submodules¶
Module contents¶
Quadrotor controllers.
- class udaan.control.quadrotor.DirectPropellerForceController[source]¶
Bases:
Controller
- class udaan.control.quadrotor.GeometricAttitudeController[source]¶
Bases:
ControllerGeometric 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)
- compute(t, state, thrust_force, desired_att=None)[source]¶
Compute scalar thrust and torque vector.
- Parameters:
state (
tuple[SO3,TSO3]) – (R, Omega) — rotation matrix and body angular velocity.thrust_force (
ndarray[tuple[Any,...],dtype[floating]]) – desired thrust force vector in world frame.desired_att (
tuple[SO3,TSO3,ndarray[tuple[Any,...],dtype[floating]]] |None) – optional (Rd, Omegad, dOmegad) from differential flatness. When provided, overrides the attitude derived from thrust direction and adds feedforward terms.
- Return type:
- Returns:
(f, M) — scalar thrust and 3D torque vector.
- property inertia¶
- class udaan.control.quadrotor.GeometricL1AttitudeController[source]¶
Bases:
GeometricAttitudeControllerGeometric 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
- compute(t, state, thrust_force, desired_att=None)[source]¶
Compute thrust and torque with L1 adaptive disturbance rejection.
- Parameters:
t (
float) – current time.state (
tuple[SO3,TSO3]) – (R, Omega) — SO3 rotation and TSO3 angular velocity.thrust_force (
ndarray[tuple[Any,...],dtype[floating]]) – desired thrust force vector in world frame.desired_att (
tuple[SO3,TSO3,ndarray[tuple[Any,...],dtype[floating]]] |None) – optional (Rd, Omegad, dOmegad) feedforward.
- Return type:
- Returns:
(f, M) — scalar thrust and 3D torque vector.
- class udaan.control.quadrotor.PositionL1Controller[source]¶
Bases:
PositionPDControllerQuadrotor position controller using L1 adaption.