Skip to main content

Module pose_graph

Module pose_graph 

Source
Expand description

Pose-graph relaxation (src/core/pose-graph.ts::PoseGraph.optimize/residual computation). A Gauss-Seidel-style relaxation over a graph handed in as plain arrays: node positions/pinned flags plus a CSR adjacency list the TS side builds from its Map iteration order — this module never sees string ids, only indices, so node identity/ordering questions stay where the KV layout lives (pose-graph.ts). Alternating forward/reverse node-visitation order matches optimize()’s odd/even iteration parity (iterations % 2 === 1).

Structs§

Edge
One directed edge node -> other, other already resolved to a node index by the caller. other < 0 is a defensive sentinel for “target node not found” (mirrors this.nodes.get(edge.other) returning undefined in pose-graph.ts’s optimize()/residual loops): the edge is skipped without stopping the edge loop, exactly as if (!other) continue; does there. In practice every edge’s other always resolves — nodes are never removed once hydrated — but the sentinel keeps the two sides’ control flow identical rather than assuming it.
Graph
Node