g2o
Loading...
Searching...
No Matches
g2o::EdgeLabeler Struct Reference

#include <edge_labeler.h>

Collaboration diagram for g2o::EdgeLabeler:

Public Member Functions

 EdgeLabeler (SparseOptimizer *optimizer)
int labelEdges (std::set< OptimizableGraph::Edge * > &edges)

Protected Member Functions

void augmentSparsePattern (std::set< std::pair< int, int > > &pattern, OptimizableGraph::Edge *e)
bool computePartialInverse (SparseBlockMatrix< Eigen::MatrixXd > &spinv, const std::set< std::pair< int, int > > &pattern)
bool labelEdge (const SparseBlockMatrix< Eigen::MatrixXd > &spinv, OptimizableGraph::Edge *e)

Protected Attributes

SparseOptimizer * _optimizer

Detailed Description

This class implements the functions to label an edge (measurement) based on the actual configuration of the nodes. It does so by

  • computing the expected mean of the measurement (_measurement) based on the state variables
  • computing the joint covariance matrix of all sstate variables on which the measurement depends.
  • extracting the sigma points from this covariance matrix (which is in the space if the increments used by \oplus
  • projecting the sigma points in the error space, and thus computing the information matrix of the labeled edge

Definition at line 46 of file edge_labeler.h.

Constructor & Destructor Documentation

◆ EdgeLabeler()

g2o::EdgeLabeler::EdgeLabeler ( SparseOptimizer * optimizer)

constructs an edge labeler that operates on the optimizer passed as argument

Parameters
optimizerthe optimizer

Definition at line 41 of file edge_labeler.cpp.

References _optimizer.

Member Function Documentation

◆ augmentSparsePattern()

void g2o::EdgeLabeler::augmentSparsePattern ( std::set< std::pair< int, int > > & pattern,
OptimizableGraph::Edge * e )
protected

helper function that augments the sparse pattern of the inverse based on an edge

Parameters
patternthe blocks of the inverse covered by the edge
ethe edge

Definition at line 69 of file edge_labeler.cpp.

References g2o::OptimizableGraph::Vertex::hessianIndex(), and g2o::HyperGraph::Edge::vertices().

Referenced by labelEdges().

◆ computePartialInverse()

bool g2o::EdgeLabeler::computePartialInverse ( SparseBlockMatrix< Eigen::MatrixXd > & spinv,
const std::set< std::pair< int, int > > & pattern )
protected

helper function that computes the inverse based on the sparse pattenrn

Parameters
spinvthe output block inverse
patternthe blocks of the inverse covered by the edge
Returns
true on successm, false on failure, .

Definition at line 87 of file edge_labeler.cpp.

References _optimizer.

Referenced by labelEdges().

◆ labelEdge()

◆ labelEdges()

int g2o::EdgeLabeler::labelEdges ( std::set< OptimizableGraph::Edge * > & edges)

Labels the set of edges passed as argument. It computes the cholesky information matrix. This method only woorks aftec having called an optimize(...) in the connected optimizer. The labeling is performed based on the actual configuration of the nodes in the optimized subgraph.

Parameters
edgesthe edges to label
Returns
-1 if the inverse cholesky cannot be computed, otherwise the number of edges where the labeling was successful

Definition at line 43 of file edge_labeler.cpp.

References augmentSparsePattern(), computePartialInverse(), and labelEdge().

Referenced by g2o::Star::labelStarEdges().

Member Data Documentation

◆ _optimizer

SparseOptimizer* g2o::EdgeLabeler::_optimizer
protected

Definition at line 81 of file edge_labeler.h.

Referenced by computePartialInverse(), and EdgeLabeler().


The documentation for this struct was generated from the following files: