udaan.utils.flat2state_utils module¶
Clean flat-output-to-state mapping for quadrotor differential flatness.
Given position derivatives up to snap (4th order), computes the desired attitude, angular velocity, and angular acceleration using the differential flatness property of the quadrotor (Mellinger & Kumar, ICRA 2011).
- udaan.utils.flat2state_utils.flat2state(acc, jerk, snap, mass, inertia)[source]¶
Compute desired attitude state from flat output derivatives.
- Parameters:
acc – desired acceleration (3-vector), 2nd derivative of position.
jerk – desired jerk (3-vector), 3rd derivative of position.
snap – desired snap (3-vector), 4th derivative of position.
mass – quadrotor mass (scalar).
inertia – inertia matrix (3x3).
- Returns:
Rd: desired rotation matrix (SO3) Omegad: desired angular velocity (TSO3) dOmegad: desired angular acceleration (3-vector) f: scalar thrust
- Return type:
(Rd, Omegad, dOmegad, f) where