Skip to content

i_pose_source.hpp

IPoseSource — the READ seam every pose consumer (motion, alignment, telemetry, skills) depends on.

This header declares 1 type (10 members).

Extracted from include/shulib/localization/i_pose_source.hpp — this page is that header's documentation, reformatted, so it cannot disagree with the code. Prose about how to think about the API lives in the user guide; worked recipes live in the cookbook; this page is the complete, mechanical list of what exists.

Contents

class IPoseSource

class IPoseSource

The READ seam every pose consumer (motion, alignment, telemetry, skills) depends on. Localizer implements it today; a future EKF-backed localizer, a log-replay source or a test fake implement the SAME four accessors, so swapping the fusion tier never touches a caller. All four are const noexcept BY CONTRACT, which makes them pure reads of a published snapshot: an implementation must have folded its sensors in its own update step, so calling these repeatedly within one tick costs nothing and cannot change the answer. Heading is IMU-owned; twist() is the matching field-frame derivative. PROS-free (L2).

class, declared at include/shulib/localization/i_pose_source.hpp:21.

IPoseSource::~IPoseSource

virtual ~IPoseSource() = default

Abstract base, held and destroyed through IPoseSource*; the implementation must outlive every consumer holding it. Copy/move are defaulted because the interface carries no state of its own, but copying THROUGH this base slices a concrete localizer — and its odometry, correctors and fused belief — away, so consumers take a reference.

function, declared at include/shulib/localization/i_pose_source.hpp:27.

IPoseSource::IPoseSource

IPoseSource() = default

Covered by the comment on ~IPoseSource — one comment documents this run of special members.

function, declared at include/shulib/localization/i_pose_source.hpp:28.

IPoseSource::IPoseSource (overload 2)

IPoseSource(const IPoseSource&) = default

Covered by the comment on ~IPoseSource — one comment documents this run of special members.

function, declared at include/shulib/localization/i_pose_source.hpp:29.

IPoseSource::IPoseSource (overload 3)

IPoseSource(IPoseSource&&) = default

Covered by the comment on ~IPoseSource — one comment documents this run of special members.

function, declared at include/shulib/localization/i_pose_source.hpp:30.

IPoseSource::operator=

IPoseSource& operator=(const IPoseSource&) = default

Covered by the comment on ~IPoseSource — one comment documents this run of special members.

function, declared at include/shulib/localization/i_pose_source.hpp:31.

IPoseSource::operator= (overload 2)

IPoseSource& operator=(IPoseSource&&) = default

Covered by the comment on ~IPoseSource — one comment documents this run of special members.

function, declared at include/shulib/localization/i_pose_source.hpp:32.

IPoseSource::pose

[[nodiscard]] virtual math::Pose2d pose() const noexcept = 0

Best current field-frame pose (heading == the IMU heading).

function, declared at include/shulib/localization/i_pose_source.hpp:35.

IPoseSource::twist

[[nodiscard]] virtual math::Twist2d twist() const noexcept = 0

Field-frame velocity estimate (the derivative of the published pose).

function, declared at include/shulib/localization/i_pose_source.hpp:38.

IPoseSource::quality

[[nodiscard]] virtual double quality() const noexcept = 0

Graded trust in the current estimate, in [0,1] — a measurable number, not a vibe.

function, declared at include/shulib/localization/i_pose_source.hpp:41.

IPoseSource::isDeadReckoning

[[nodiscard]] virtual bool isDeadReckoning() const noexcept = 0

True when no absolute corrector contributed this tick (running on odom + IMU alone).

function, declared at include/shulib/localization/i_pose_source.hpp:44.

Design commentary, from the header

The header opens with the reasoning behind these shapes. It is reproduced here in full because a reference that only lists signatures teaches nobody why.

The header’s own reasoning — 6 lines
 IPoseSource — the READ seam every pose consumer (motion, alignment, telemetry, skills) depends
 on (master plan §6: "IPoseSource"). The concrete `Localizer` implements it; a future EKF-backed
 localizer, a log-replay source, or a test fake implement the SAME interface, so swapping the
 fusion tier never touches a caller. PROS-free (L2). Heading is IMU-owned; twist() is the matching
 field-frame pose derivative.

Last updated 2026-08-15 — published from the main release branch, commit fa545ff. This site tracks releases, so between them it can lag the repository — that lag is deliberate, and it is what keeps the development log off the public site. For the current state of the code, see the repository.