pub struct Sim3PoseGraph {
pub poses: BTreeMap<u64, Sim3>,
pub edges: Vec<Sim3Edge>,
pub anchor: Option<u64>,
}Expand description
Sparse Sim(3) pose graph keyed by keyframe id.
Fields§
§poses: BTreeMap<u64, Sim3>Keyframe id → Sim(3) node estimate. BTreeMap keeps the variable
layout deterministic.
edges: Vec<Sim3Edge>§anchor: Option<u64>Anchor keyframe id; its node is held fixed (fixes the gauge freedom).
Implementations§
Source§impl Sim3PoseGraph
impl Sim3PoseGraph
pub fn new() -> Sim3PoseGraph
Sourcepub fn add_pose(&mut self, keyframe_id: u64, pose: Sim3)
pub fn add_pose(&mut self, keyframe_id: u64, pose: Sim3)
Insert or replace the Sim(3) estimate for keyframe_id.
Sourcepub fn add_edge(&mut self, from: u64, to: u64, measurement: Sim3, weight: f64)
pub fn add_edge(&mut self, from: u64, to: u64, measurement: Sim3, weight: f64)
Add an isotropic edge with the given scalar weight.
Sourcepub fn add_edge_with_information(
&mut self,
from: u64,
to: u64,
measurement: Sim3,
information: Matrix<f64, Const<7>, Const<7>, ArrayStorage<f64, 7, 7>>,
)
pub fn add_edge_with_information( &mut self, from: u64, to: u64, measurement: Sim3, information: Matrix<f64, Const<7>, Const<7>, ArrayStorage<f64, 7, 7>>, )
Add an edge carrying a full 7×7 information matrix Ω.
Sourcepub fn optimize(
&mut self,
config: &Sim3PoseGraphConfig,
) -> Result<Sim3PoseGraphResult, PoseGraphError>
pub fn optimize( &mut self, config: &Sim3PoseGraphConfig, ) -> Result<Sim3PoseGraphResult, PoseGraphError>
Optimize all non-anchor nodes with Levenberg-Marquardt, correcting the
accumulated scale (and pose) drift so the graph’s loop closures are
satisfied in the Sim(3) sense.
Trait Implementations§
Source§impl Clone for Sim3PoseGraph
impl Clone for Sim3PoseGraph
Source§fn clone(&self) -> Sim3PoseGraph
fn clone(&self) -> Sim3PoseGraph
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Sim3PoseGraph
impl Debug for Sim3PoseGraph
Source§impl Default for Sim3PoseGraph
impl Default for Sim3PoseGraph
Source§fn default() -> Sim3PoseGraph
fn default() -> Sim3PoseGraph
Returns the “default value” for a type. Read more
Source§impl PartialEq for Sim3PoseGraph
impl PartialEq for Sim3PoseGraph
impl StructuralPartialEq for Sim3PoseGraph
Auto Trait Implementations§
impl Forget for Sim3PoseGraph
impl Freeze for Sim3PoseGraph
impl Move for Sim3PoseGraph
impl RefUnwindSafe for Sim3PoseGraph
impl Send for Sim3PoseGraph
impl Sync for Sim3PoseGraph
impl Unpin for Sim3PoseGraph
impl UnsafeUnpin for Sim3PoseGraph
impl UnwindSafe for Sim3PoseGraph
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
Mutably borrows from an owned value. Read more
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.