|
g2o
|
#include <g2o_slam_interface.h>


Public Types | |
| enum | SolveResult { SOLVED , SOLVED_BATCH , NOOP , ERROR } |
Public Member Functions | |
| G2oSlamInterface (SparseOptimizerOnline *optimizer) | |
| bool | addNode (const std::string &tag, int id, int dimension, const std::vector< double > &values) |
| bool | addEdge (const std::string &tag, int id, int dimension, int v1, int v2, const std::vector< double > &measurement, const std::vector< double > &information) |
| bool | fixNode (const std::vector< int > &nodes) |
| bool | queryState (const std::vector< int > &nodes) |
| bool | solveState () |
| SolveResult | solve () |
| int | updatedGraphEachN () const |
| void | setUpdateGraphEachN (int n) |
| int | batchSolveEachN () const |
| void | setBatchSolveEachN (int n) |
| SparseOptimizerOnline * | optimizer () |
Protected Member Functions | |
| OptimizableGraph::Vertex * | addVertex (int dimension, int id) |
| bool | printVertex (OptimizableGraph::Vertex *v) |
Protected Attributes | |
| SparseOptimizerOnline * | _optimizer |
| bool | _firstOptimization |
| int | _nodesAdded |
| int | _incIterations |
| int | _updateGraphEachN |
| int | _batchEveryN |
| int | _lastBatchStep |
| bool | _initSolverDone |
| HyperGraph::VertexSet | _verticesAdded |
| HyperGraph::EdgeSet | _edgesAdded |
Definition at line 41 of file g2o_slam_interface.h.
| g2o::G2oSlamInterface::G2oSlamInterface | ( | SparseOptimizerOnline * | optimizer | ) |
Definition at line 107 of file g2o_slam_interface.cpp.
|
virtual |
adding an edge to the SLAM engine.
| tag | the tag specifying the type of the vertex |
| id | the unique id of the edge. |
| dimension | the dimension of the edge. |
| v1 | the unique id of the edge of the first vertex |
| v2 | the unique id of the edge of the second vertex |
| measurement | the measurement of the constraint |
| information | the information matrix (inverse of the covariance) representing the uncertainty of the measurement (row-major upper triangular and diagonal) |
Implements SlamParser::AbstractSlamInterface.
Definition at line 133 of file g2o_slam_interface.cpp.
References __PRETTY_FUNCTION__, _edgesAdded, _nodesAdded, _optimizer, _verticesAdded, g2o::OptimizableGraph::addEdge(), addVertex(), g2o::JacobianWorkspace::allocate(), g2o::HyperGraph::edges(), g2o::internal::fromVectorET(), g2o::internal::fromVectorQT(), g2o::HyperGraph::Vertex::id(), g2o::OnlineEdgeSE2::initialEstimate(), g2o::OnlineEdgeSE3::initialEstimate(), g2o::EdgeSE2::initialEstimatePossible(), g2o::EdgeSE3::initialEstimatePossible(), g2o::jac_quat3_euler3(), g2o::OptimizableGraph::jacobianWorkspace(), g2o::BaseEdge< D, E >::setInformation(), g2o::EdgeSE3::setMeasurement(), g2o::EdgeSE2::setMeasurement(), g2o::OptimizableGraph::vertex(), and g2o::HyperGraph::Edge::vertices().
Referenced by main().
|
virtual |
adding a node to the SLAM engine.
| tag | the tag specifying the type of the vertex |
| id | the unique id of the node. |
| dimension | the dimension of the node. |
| values | the pose of the node, may be empty (i.e., the engine should initialize the node itself) |
Implements SlamParser::AbstractSlamInterface.
Definition at line 117 of file g2o_slam_interface.cpp.
References _batchEveryN, _initSolverDone, _optimizer, and g2o::SparseOptimizerOnline::initSolver().
Referenced by main().
|
protected |
Definition at line 369 of file g2o_slam_interface.cpp.
References _optimizer, g2o::OptimizableGraph::addVertex(), and g2o::OptimizableGraph::Vertex::setId().
Referenced by addEdge().
|
inline |
Definition at line 67 of file g2o_slam_interface.h.
|
virtual |
set some nodes to a fixed position
| nodes | the list of vertex IDs to fix |
Implements SlamParser::AbstractSlamInterface.
Definition at line 332 of file g2o_slam_interface.cpp.
References _optimizer, g2o::OptimizableGraph::Vertex::setFixed(), and g2o::OptimizableGraph::vertex().
|
inline |
|
protected |
Definition at line 385 of file g2o_slam_interface.cpp.
References g2o::OptimizableGraph::Vertex::dimension(), g2o::HyperGraph::Vertex::id(), modp_dtoa(), modp_itoa10(), g2o::SE2::rotation(), g2o::internal::toEuler(), g2o::SE2::translation(), g2o::OnlineVertexSE2::updatedEstimate, and g2o::OnlineVertexSE3::updatedEstimate.
Referenced by queryState().
|
virtual |
Ask the SLAM engine to print the current estimate of the variables
| nodes | the list of vertex IDs to print, if empty print all variables |
Implements SlamParser::AbstractSlamInterface.
Definition at line 340 of file g2o_slam_interface.cpp.
References _optimizer, printVertex(), g2o::OptimizableGraph::vertex(), and g2o::HyperGraph::vertices().
| void g2o::G2oSlamInterface::setBatchSolveEachN | ( | int | n | ) |
Definition at line 469 of file g2o_slam_interface.cpp.
References _batchEveryN.
Referenced by main().
| void g2o::G2oSlamInterface::setUpdateGraphEachN | ( | int | n | ) |
Definition at line 433 of file g2o_slam_interface.cpp.
References _updateGraphEachN.
Referenced by main().
| G2oSlamInterface::SolveResult g2o::G2oSlamInterface::solve | ( | ) |
Definition at line 435 of file g2o_slam_interface.cpp.
References _batchEveryN, _edgesAdded, _firstOptimization, _incIterations, _lastBatchStep, _nodesAdded, _optimizer, _updateGraphEachN, _verticesAdded, g2o::SparseOptimizerOnline::batchStep, ERROR, g2o::SparseOptimizer::initializeOptimization(), NOOP, g2o::SparseOptimizerOnline::optimize(), SOLVED, SOLVED_BATCH, g2o::SparseOptimizerOnline::updateInitialization(), and g2o::HyperGraph::vertices().
Referenced by solveAndPrint(), and solveState().
|
virtual |
ask the engine to solve
Implements SlamParser::AbstractSlamInterface.
Definition at line 364 of file g2o_slam_interface.cpp.
|
inline |
Definition at line 64 of file g2o_slam_interface.h.
|
protected |
Definition at line 78 of file g2o_slam_interface.h.
Referenced by addNode(), setBatchSolveEachN(), and solve().
|
protected |
Definition at line 83 of file g2o_slam_interface.h.
|
protected |
Definition at line 74 of file g2o_slam_interface.h.
Referenced by solve().
|
protected |
Definition at line 76 of file g2o_slam_interface.h.
Referenced by solve().
|
protected |
Definition at line 80 of file g2o_slam_interface.h.
Referenced by addNode().
|
protected |
Definition at line 79 of file g2o_slam_interface.h.
Referenced by solve().
|
protected |
Definition at line 75 of file g2o_slam_interface.h.
|
protected |
Definition at line 73 of file g2o_slam_interface.h.
Referenced by addEdge(), addNode(), addVertex(), fixNode(), queryState(), and solve().
|
protected |
Definition at line 77 of file g2o_slam_interface.h.
Referenced by setUpdateGraphEachN(), and solve().
|
protected |
Definition at line 82 of file g2o_slam_interface.h.