Parts and the declaration model¶
Draft
This page is scaffolded. The outline below marks what it should cover; the Parts reference already renders every stock part from its docstring.
A Part is an atomic unit of behavior on a craft, and
a craft is a tree of them. Parts declare their interface at class
scope using five sentinels, and the framework walks those declarations
at compile time to build the symbolic graph.
To cover¶
- The five declaration sentinels — what each is and when to reach for
it:
Parameter(default, manifold=…)— frozen at construction; baked into the graph (promotable for Fit).State(init, manifold="R1"|"R3"|SO3Manifold(...))— mutable per-tick state with manifold-correct boxplus.Input(default)— per-tick user value.Output(shape)— per-tick observable (a sensor reading).Noise(shape, kind="white"|"rw", sigma)— white noise or an RW-bias state that synthesizes its own slot + driver.
- The craft tree — composite parts, mounting transforms, frames
(
PartFrame,ParentFrame,CraftFrame). update()andPartUpdate— how a part contributes aWrenchand/or state derivatives each tick.- How declarations feed the transforms — a
Noisechannel becomes a Q/R contribution in the EKF; anOutputbecomes a measurement; a manifoldParameterbecomes a fit variable.
Source material¶
- Reference: Parts
- Code:
manta/parts/base.py,manta/parts/_declarations.py