g2o
|
This is a solver for "structure-only" optimization". More...
#include <structure_only_solver.h>
Public Member Functions | |
StructureOnlySolver () | |
virtual OptimizationAlgorithm::SolverResult | solve (int iteration, bool online=false) |
OptimizationAlgorithm::SolverResult | calc (OptimizableGraph::VertexContainer &vertices, int num_iters, int num_max_trials=10) |
virtual bool | init (bool) |
virtual bool | computeMarginals (SparseBlockMatrix< MatrixXD > &, const std::vector< std::pair< int, int > > &) |
virtual bool | updateStructure (const std::vector< HyperGraph::Vertex * > &, const HyperGraph::EdgeSet &) |
OptimizableGraph::VertexContainer & | points () |
return the points of the optimization problem More... | |
const OptimizableGraph::VertexContainer & | points () const |
Public Member Functions inherited from g2o::OptimizationAlgorithm | |
OptimizationAlgorithm () | |
virtual | ~OptimizationAlgorithm () |
virtual void | printVerbose (std::ostream &os) const |
const SparseOptimizer * | optimizer () const |
return the optimizer operating on More... | |
SparseOptimizer * | optimizer () |
void | setOptimizer (SparseOptimizer *optimizer) |
const PropertyMap & | properties () const |
return the properties of the solver More... | |
bool | updatePropertiesFromString (const std::string &propString) |
void | printProperties (std::ostream &os) const |
Protected Attributes | |
bool | _verbose |
OptimizableGraph::VertexContainer | _points |
Protected Attributes inherited from g2o::OptimizationAlgorithm | |
SparseOptimizer * | _optimizer |
the optimizer the solver is working on More... | |
PropertyMap | _properties |
the properties of your solver, use this to store the parameters of your solver More... | |
This is a solver for "structure-only" optimization".
Given the problem of landmark-based SLAM or bundle adjustment, this class performs optimization on the landmarks while the poses are kept fixed. This can be done very efficiently, since the position on the landmarks are indepdented given the poses are known.
This class slightly misuses the API of g2o. It is designed in a way, it can work on the very same graph which reflects the problem of landmark-based SLAM, bundle adjustment and which is meant to be solved using the Schur complement. Thus, it can be called just before or after joint-optimization without the need of additional setup. Call calc() with the point features you want to optimize.
This class is still considered as being experimentally!
Definition at line 57 of file structure_only_solver.h.
|
inline |
Definition at line 60 of file structure_only_solver.h.
References g2o::StructureOnlySolver< PointDoF >::_verbose.
|
inline |
Definition at line 72 of file structure_only_solver.h.
References g2o::JacobianWorkspace::allocate(), g2o::OptimizableGraph::Vertex::bData(), g2o::OptimizableGraph::Edge::chi2(), g2o::OptimizableGraph::Vertex::clearQuadraticForm(), g2o::OptimizableGraph::Edge::computeError(), g2o::OptimizableGraph::Edge::constructQuadraticForm(), g2o::OptimizableGraph::Vertex::dimension(), g2o::OptimizableGraph::Vertex::discardTop(), g2o::HyperGraph::Vertex::edges(), g2o::OptimizableGraph::Vertex::fixed(), g2o_isfinite, g2o_isnan, g2o::OptimizableGraph::Edge::linearizeOplus(), g2o::OptimizableGraph::Vertex::mapHessianMemory(), OK, g2o::OptimizableGraph::Vertex::oplus(), g2o::OptimizableGraph::Vertex::pop(), g2o::OptimizableGraph::Vertex::push(), g2o::OptimizableGraph::Vertex::setFixed(), g2o::JacobianWorkspace::updateSize(), g2o::HyperGraph::Edge::vertex(), and g2o::HyperGraph::Edge::vertices().
Referenced by main(), and g2o::StructureOnlySolver< PointDoF >::solve().
|
inlinevirtual |
computes the block diagonal elements of the pattern specified in the input and stores them in given SparseBlockMatrix. If your solver does not support computing the marginals, return false.
Implements g2o::OptimizationAlgorithm.
Definition at line 209 of file structure_only_solver.h.
|
inlinevirtual |
initialize the solver, called once before the first call to solve()
Implements g2o::OptimizationAlgorithm.
Definition at line 196 of file structure_only_solver.h.
References g2o::StructureOnlySolver< PointDoF >::_points, g2o::SparseOptimizer::activeVertices(), g2o::OptimizableGraph::Vertex::marginalized(), and g2o::OptimizationAlgorithm::optimizer().
|
inline |
return the points of the optimization problem
Definition at line 214 of file structure_only_solver.h.
References g2o::StructureOnlySolver< PointDoF >::_points.
|
inline |
Definition at line 215 of file structure_only_solver.h.
References g2o::StructureOnlySolver< PointDoF >::_points.
|
inlinevirtual |
Solve one iteration. The SparseOptimizer running on-top will call this for the given number of iterations.
iteration | indicates the current iteration |
Implements g2o::OptimizationAlgorithm.
Definition at line 65 of file structure_only_solver.h.
References g2o::StructureOnlySolver< PointDoF >::_points, and g2o::StructureOnlySolver< PointDoF >::calc().
|
inlinevirtual |
update the structures for online processing
Implements g2o::OptimizationAlgorithm.
Definition at line 211 of file structure_only_solver.h.
|
protected |
Definition at line 219 of file structure_only_solver.h.
Referenced by g2o::StructureOnlySolver< PointDoF >::init(), g2o::StructureOnlySolver< PointDoF >::points(), and g2o::StructureOnlySolver< PointDoF >::solve().
|
protected |
Definition at line 218 of file structure_only_solver.h.
Referenced by g2o::StructureOnlySolver< PointDoF >::StructureOnlySolver().