g2o
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
g2o::tutorial::CacheSE2Offset Class Reference

#include <parameter_se2_offset.h>

Inheritance diagram for g2o::tutorial::CacheSE2Offset:
Inheritance graph
[legend]
Collaboration diagram for g2o::tutorial::CacheSE2Offset:
Collaboration graph
[legend]

Public Member Functions

const SE2w2n () const
 
const SE2n2w () const
 
- Public Member Functions inherited from g2o::Cache
 Cache (CacheContainer *container_=0, const ParameterVector &parameters_=ParameterVector())
 
CacheKey key () const
 
OptimizableGraph::Vertexvertex ()
 
OptimizableGraphgraph ()
 
CacheContainercontainer ()
 
ParameterVectorparameters ()
 
void update ()
 
virtual HyperGraph::HyperGraphElementType elementType () const
 
- Public Member Functions inherited from g2o::HyperGraph::HyperGraphElement
virtual ~HyperGraphElement ()
 

Public Attributes

 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
 

Protected Member Functions

virtual void updateImpl ()
 redefine this to do the update
 
virtual bool resolveDependencies ()
 
- Protected Member Functions inherited from g2o::Cache
CacheinstallDependency (const std::string &type_, const std::vector< int > &parameterIndices)
 

Protected Attributes

ParameterSE2Offset_offsetParam
 
SE2 _w2n
 
SE2 _n2w
 
- Protected Attributes inherited from g2o::Cache
bool _updateNeeded
 
ParameterVector _parameters
 
std::vector< Cache * > _parentCaches
 
CacheContainer_container
 

Detailed Description

Definition at line 55 of file parameter_se2_offset.h.

Member Function Documentation

◆ n2w()

const SE2 & g2o::tutorial::CacheSE2Offset::n2w ( ) const
inline

Definition at line 60 of file parameter_se2_offset.h.

◆ resolveDependencies()

bool g2o::tutorial::CacheSE2Offset::resolveDependencies ( )
protectedvirtual

Function to be called from a cache that has dependencies. It just invokes a sequence of installDependency(). Although the caches returned are stored in the _parentCache vector, it is better that you redefine your own cache member variables, for better readability

Reimplemented from g2o::Cache.

Definition at line 60 of file parameter_se2_offset.cpp.

60 {
61 _offsetParam = dynamic_cast<ParameterSE2Offset*>(_parameters[0]);
62 return _offsetParam != 0;
63}
ParameterVector _parameters
Definition cache.h:103

References _offsetParam, and g2o::Cache::_parameters.

◆ updateImpl()

void g2o::tutorial::CacheSE2Offset::updateImpl ( )
protectedvirtual

redefine this to do the update

Implements g2o::Cache.

Definition at line 54 of file parameter_se2_offset.cpp.

54 {
55 const VertexSE2* v = static_cast<const VertexSE2*>(vertex());
56 _n2w = v->estimate() * _offsetParam->offset();
57 _w2n = _n2w.inverse();
58}
OptimizableGraph::Vertex * vertex()
Definition cache.cpp:57
SE2 inverse() const
Definition se2.h:76

References _n2w, _offsetParam, _w2n, g2o::BaseVertex< D, T >::estimate(), g2o::tutorial::SE2::inverse(), g2o::tutorial::ParameterSE2Offset::offset(), and g2o::Cache::vertex().

◆ w2n()

const SE2 & g2o::tutorial::CacheSE2Offset::w2n ( ) const
inline

Definition at line 59 of file parameter_se2_offset.h.

59{ return _w2n; }

Referenced by g2o::tutorial::EdgeSE2PointXY::computeError().

Member Data Documentation

◆ _n2w

SE2 g2o::tutorial::CacheSE2Offset::_n2w
protected

Definition at line 67 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ _offsetParam

ParameterSE2Offset* g2o::tutorial::CacheSE2Offset::_offsetParam
protected

Definition at line 66 of file parameter_se2_offset.h.

Referenced by resolveDependencies(), and updateImpl().

◆ _w2n

SE2 g2o::tutorial::CacheSE2Offset::_w2n
protected

Definition at line 67 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ EIGEN_MAKE_ALIGNED_OPERATOR_NEW

g2o::tutorial::CacheSE2Offset::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Definition at line 57 of file parameter_se2_offset.h.


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