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

caching the offset related to a vertex More...

#include <parameter_se2_offset.h>

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

Public Member Functions

 CacheSE2Offset ()
 
virtual void updateImpl ()
 redefine this to do the update
 
const ParameterSE2OffsetoffsetParam () const
 
void setOffsetParam (ParameterSE2Offset *offsetParam)
 
const SE2w2n () const
 
const SE2n2w () const
 
const Isometry2w2nMatrix () const
 
const Isometry2n2wMatrix () const
 
const Isometry2w2lMatrix () const
 
const Matrix2 RpInverseRInverseMatrix () const
 
const Matrix2 RpInverseRInversePrimeMatrix () 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 bool resolveDependencies ()
 
- Protected Member Functions inherited from g2o::Cache
CacheinstallDependency (const std::string &type_, const std::vector< int > &parameterIndices)
 

Protected Attributes

ParameterSE2Offset_offsetParam
 the parameter connected to the cache
 
SE2 _se2_w2n
 
SE2 _se2_n2w
 
Isometry2 _w2n
 world to sensor transform
 
Isometry2 _w2l
 world to local
 
Isometry2 _n2w
 sensor to world
 
Matrix2 _RpInverse_RInverse
 
Matrix2 _RpInverse_RInversePrime
 
- Protected Attributes inherited from g2o::Cache
bool _updateNeeded
 
ParameterVector _parameters
 
std::vector< Cache * > _parentCaches
 
CacheContainer_container
 

Detailed Description

caching the offset related to a vertex

Definition at line 72 of file parameter_se2_offset.h.

Constructor & Destructor Documentation

◆ CacheSE2Offset()

g2o::CacheSE2Offset::CacheSE2Offset ( )

Definition at line 58 of file parameter_se2_offset.cpp.

58: Cache(), _offsetParam(0) {}
ParameterSE2Offset * _offsetParam
the parameter connected to the cache
Cache(CacheContainer *container_=0, const ParameterVector &parameters_=ParameterVector())
Definition cache.cpp:44

Member Function Documentation

◆ n2w()

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

◆ n2wMatrix()

const Isometry2 & g2o::CacheSE2Offset::n2wMatrix ( ) const
inline

Definition at line 85 of file parameter_se2_offset.h.

85{ return _n2w; }
Isometry2 _n2w
sensor to world

◆ offsetParam()

const ParameterSE2Offset * g2o::CacheSE2Offset::offsetParam ( ) const
inline

Definition at line 78 of file parameter_se2_offset.h.

78{ return _offsetParam; }

Referenced by g2o::EdgeSE2Offset::initialEstimate(), and setOffsetParam().

◆ resolveDependencies()

bool g2o::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.

◆ RpInverseRInverseMatrix()

const Matrix2 g2o::CacheSE2Offset::RpInverseRInverseMatrix ( ) const
inline

◆ RpInverseRInversePrimeMatrix()

const Matrix2 g2o::CacheSE2Offset::RpInverseRInversePrimeMatrix ( ) const
inline

Definition at line 89 of file parameter_se2_offset.h.

89 {
91 }

Referenced by g2o::EdgeSE2PointXYOffset::linearizeOplus().

◆ setOffsetParam()

void g2o::CacheSE2Offset::setOffsetParam ( ParameterSE2Offset offsetParam)

Definition at line 90 of file parameter_se2_offset.cpp.

90 {
92}
const ParameterSE2Offset * offsetParam() const

References _offsetParam, and offsetParam().

◆ updateImpl()

void g2o::CacheSE2Offset::updateImpl ( )
virtual

redefine this to do the update

Implements g2o::Cache.

Definition at line 65 of file parameter_se2_offset.cpp.

65 {
66 const VertexSE2* v = static_cast<const VertexSE2*>(vertex());
67 _se2_n2w = v->estimate() * _offsetParam->offset();
68
69 _n2w = _se2_n2w.rotation().toRotationMatrix();
70 _n2w.translation() = _se2_n2w.translation();
71
73 _w2n = _se2_w2n.rotation().toRotationMatrix();
74 _w2n.translation() = _se2_w2n.translation();
75
76 SE2 w2l = v->estimate().inverse();
77 _w2l = w2l.rotation().toRotationMatrix();
78 _w2l.translation() = w2l.translation();
79
80 double alpha = v->estimate().rotation().angle();
81 double c = std::cos(alpha), s = std::sin(alpha);
82 Matrix2 RInversePrime;
83 RInversePrime << -s, c, -c, -s;
85 _offsetParam->offset().rotation().toRotationMatrix().transpose() *
86 RInversePrime;
87 _RpInverse_RInverse = w2l.rotation();
88}
Isometry2 _w2n
world to sensor transform
Isometry2 _w2l
world to local
OptimizableGraph::Vertex * vertex()
Definition cache.cpp:57
const Vector2 & translation() const
translational component
Definition se2.h:57
SE2 inverse() const
invert :-)
Definition se2.h:83
const Rotation2D & rotation() const
rotational component
Definition se2.h:61
MatrixN< 2 > Matrix2
Definition eigen_types.h:71

References _n2w, _offsetParam, _RpInverse_RInverse, _RpInverse_RInversePrime, _se2_n2w, _se2_w2n, _w2l, _w2n, g2o::BaseVertex< D, T >::estimate(), g2o::SE2::inverse(), g2o::ParameterSE2Offset::offset(), g2o::SE2::rotation(), g2o::SE2::translation(), and g2o::Cache::vertex().

◆ w2lMatrix()

const Isometry2 & g2o::CacheSE2Offset::w2lMatrix ( ) const
inline

◆ w2n()

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

◆ w2nMatrix()

const Isometry2 & g2o::CacheSE2Offset::w2nMatrix ( ) const
inline

Definition at line 84 of file parameter_se2_offset.h.

84{ return _w2n; }

Member Data Documentation

◆ _n2w

Isometry2 g2o::CacheSE2Offset::_n2w
protected

sensor to world

Definition at line 100 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ _offsetParam

ParameterSE2Offset* g2o::CacheSE2Offset::_offsetParam
protected

the parameter connected to the cache

Definition at line 94 of file parameter_se2_offset.h.

Referenced by resolveDependencies(), setOffsetParam(), and updateImpl().

◆ _RpInverse_RInverse

Matrix2 g2o::CacheSE2Offset::_RpInverse_RInverse
protected

Definition at line 101 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ _RpInverse_RInversePrime

Matrix2 g2o::CacheSE2Offset::_RpInverse_RInversePrime
protected

Definition at line 102 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ _se2_n2w

SE2 g2o::CacheSE2Offset::_se2_n2w
protected

Definition at line 96 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ _se2_w2n

SE2 g2o::CacheSE2Offset::_se2_w2n
protected

Definition at line 95 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ _w2l

Isometry2 g2o::CacheSE2Offset::_w2l
protected

world to local

Definition at line 99 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ _w2n

Isometry2 g2o::CacheSE2Offset::_w2n
protected

world to sensor transform

Definition at line 98 of file parameter_se2_offset.h.

Referenced by updateImpl().

◆ EIGEN_MAKE_ALIGNED_OPERATOR_NEW

g2o::CacheSE2Offset::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Definition at line 74 of file parameter_se2_offset.h.


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