Skip to main content

Module pose_graph

Module pose_graph 

Source
Expand description

The solve pass’s pose graph as a state object: keyframe nodes, odometry and loop edges, the loop-closure error spread along a chain, the resumable relaxation, and the render pass’s per-frame correction.

The graph lives in memory, as it did in the TypeScript PoseGraph it replaces: every node and its adjacency. It does no I/O. A host that keeps the graph in storage feeds the stored rows back with PoseGraph::hydrate_node and PoseGraph::hydrate_edge (all node/ rows, then all edge/ rows, in key order), and stores every Write a call returns, in order: one put or one putMany each, exactly the calls the page made before. Persisted node rows carry no adjacency; edges are rows of their own (edge/<a>/<b>/<kind>), one per direction.

Node order is insertion order (hydration first, then PoseGraph::add); a node added again under an id it already has keeps its place. Relaxation visits nodes in that order, so it is part of the result.

PoseGraph::begin_optimize returns an Optimizer that runs a few Gauss-Seidel sweeps per Optimizer::step and does not touch the graph until PoseGraph::finish_optimize writes the relaxed positions back. A host that stops between steps drops the optimizer: nothing changes and nothing is written.

Structs§

OptimizeOutcome
What a finished relaxation reports (graph-summary stores it next to the loop count).
Optimizer
A relaxation in progress, over a copy of the graph taken by PoseGraph::begin_optimize.
PoseEdge
One direction of an edge, as stored under edge/<a>/<other>/<kind>: the measured offset from a to other.
PoseGraph
PoseNode
One keyframe’s pose, as stored under node/<id> (whose value also carries an always-empty edges list). original_* is the odometry pose it was added at, x/y its current corrected pose, and next the node added after it on the same odometry chain.

Enums§

EdgeKind
PoseGraphError
PoseRow
A row to store.
Write
One storage call: a single put, or one putMany of a batch.

Constants§

CONVERGED_CHANGE
Relaxation has converged once no node moves farther than this in one sweep.
FLUSH_CHUNK
Nodes per putMany when a loop closure or a relaxation moves many nodes at once.
MAX_SWEEPS
Relaxation stops after this many sweeps even when nodes still move.