udaan.flatness.base module¶
Base class for per-system differential-flatness state recovery.
A subclass declares three dataclass types as class attributes Flats,
RefState, Inputs and implements recover. Physical parameters
(mass, inertia, cable length, …) live on the instance; the
flat-to-state map itself is stateless in time.
- class udaan.flatness.base.Flat2State[source]¶
Bases:
objectDifferential-flatness map for a specific robotic system.
- Subclass contract:
- Declare three dataclasses as class attributes:
Flatsflat-output derivative bundle at a single timeRefStaterecovered kinematic reference stateInputsrecovered feedforward inputs
Implement
recover(self, flats) -> (RefState, Inputs).
Optional: provide a
from_model(cls, model)classmethod that reads physical parameters off the corresponding simulation model.Intermediate abstract classes (ones that only partially specify the triple and are subclassed again before instantiation) can opt out of the declaration check with
_abstract = True.