pub struct PoseGraph { /* private fields */ }Expand description
Pose graph with absolute node estimates and relative constraints.
Implementations§
Source§impl PoseGraph
impl PoseGraph
Sourcepub fn upsert_node(&mut self, id: impl Into<PoseNodeId>, pose: StampedPose)
pub fn upsert_node(&mut self, id: impl Into<PoseNodeId>, pose: StampedPose)
Inserts or replaces a node estimate.
Sourcepub fn add_edge(&mut self, edge: PoseGraphEdge) -> MappingResult<()>
pub fn add_edge(&mut self, edge: PoseGraphEdge) -> MappingResult<()>
Adds a relative constraint.
Sourcepub fn nodes(&self) -> &HashMap<String, StampedPose>
pub fn nodes(&self) -> &HashMap<String, StampedPose>
Returns node estimates.
Sourcepub fn edges(&self) -> &[PoseGraphEdge]
pub fn edges(&self) -> &[PoseGraphEdge]
Returns relative edges.
Sourcepub fn localize_from_root(&mut self, root: &PoseNodeId) -> MappingResult<()>
pub fn localize_from_root(&mut self, root: &PoseNodeId) -> MappingResult<()>
Propagates complete poses through the directed non-loop tree rooted at root.
Stored isometries use node_T_anchor, with
to_T_anchor = to_T_from * from_T_anchor. The original root and all stamps
remain fixed; disconnected components and loop-closure edges are untouched.
Callers needing anchor_T_node explicitly invert the resulting isometry.
The reachable non-loop component must be a tree: cycles, duplicate edges
and multiple incoming paths return MappingError::Graph. Non-finite
reachable transforms or composed results also fail. Every failure leaves
the graph unchanged. Work and temporary storage are O(nodes + edges).
Sourcepub fn loop_closure_candidates(
&self,
max_distance: f32,
) -> Vec<(PoseNodeId, PoseNodeId)>
pub fn loop_closure_candidates( &self, max_distance: f32, ) -> Vec<(PoseNodeId, PoseNodeId)>
Suggests loop closures for nodes within max_distance translation of each other.
Trait Implementations§
impl StructuralPartialEq for PoseGraph
Auto Trait Implementations§
impl Freeze for PoseGraph
impl RefUnwindSafe for PoseGraph
impl Send for PoseGraph
impl Sync for PoseGraph
impl Unpin for PoseGraph
impl UnsafeUnpin for PoseGraph
impl UnwindSafe for PoseGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more