g2o
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 More...
 
const ParameterSE2OffsetoffsetParam () const
 
void setOffsetParam (ParameterSE2Offset *offsetParam)
 
const SE2w2n () const
 
const SE2n2w () const
 
const Isometry2Dw2nMatrix () const
 
const Isometry2Dn2wMatrix () const
 
const Isometry2Dw2lMatrix () const
 
const Matrix2D RpInverseRInverseMatrix () const
 
const Matrix2D 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 ()
 
HyperGraphElementclone () const
 

Public Attributes

 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
 

Protected Member Functions

virtual bool resolveDependancies ()
 
- 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 More...
 
SE2 _se2_w2n
 
SE2 _se2_n2w
 
Isometry2D _w2n
 world to sensor transform More...
 
Isometry2D _w2l
 world to local More...
 
Isometry2D _n2w
 sensor to world More...
 
Matrix2D _RpInverse_RInverse
 
Matrix2D _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 78 of file parameter_se2_offset.h.

Constructor & Destructor Documentation

g2o::CacheSE2Offset::CacheSE2Offset ( )

Definition at line 65 of file parameter_se2_offset.cpp.

65  :
66  Cache(),
67  _offsetParam(0)
68  {
69  }
Cache(CacheContainer *container_=0, const ParameterVector &parameters_=ParameterVector())
Definition: cache.cpp:46
ParameterSE2Offset * _offsetParam
the parameter connected to the cache

Member Function Documentation

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

Definition at line 91 of file parameter_se2_offset.h.

91 { return _n2w;}
Isometry2D _n2w
sensor to world
const ParameterSE2Offset* g2o::CacheSE2Offset::offsetParam ( ) const
inline

Definition at line 84 of file parameter_se2_offset.h.

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

84 { return _offsetParam;}
ParameterSE2Offset * _offsetParam
the parameter connected to the cache
bool g2o::CacheSE2Offset::resolveDependancies ( )
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 71 of file parameter_se2_offset.cpp.

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

71  {
72  _offsetParam = dynamic_cast <ParameterSE2Offset*> (_parameters[0]);
73  return _offsetParam != 0;
74  }
ParameterVector _parameters
Definition: cache.h:99
ParameterSE2Offset * _offsetParam
the parameter connected to the cache
const Matrix2D g2o::CacheSE2Offset::RpInverseRInverseMatrix ( ) const
inline

Definition at line 94 of file parameter_se2_offset.h.

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

94 { return _RpInverse_RInverse; }
const Matrix2D g2o::CacheSE2Offset::RpInverseRInversePrimeMatrix ( ) const
inline

Definition at line 95 of file parameter_se2_offset.h.

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

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

Definition at line 99 of file parameter_se2_offset.cpp.

References _offsetParam, and offsetParam().

100  {
102  }
const ParameterSE2Offset * offsetParam() const
ParameterSE2Offset * _offsetParam
the parameter connected to the cache
void g2o::CacheSE2Offset::updateImpl ( )
virtual

redefine this to do the update

Implements g2o::Cache.

Definition at line 76 of file parameter_se2_offset.cpp.

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().

76  {
77  const VertexSE2* v = static_cast<const VertexSE2*>(vertex());
78  _se2_n2w = v->estimate() * _offsetParam->offset();
79 
80  _n2w = _se2_n2w.rotation().toRotationMatrix();
81  _n2w.translation() = _se2_n2w.translation();
82 
84  _w2n = _se2_w2n.rotation().toRotationMatrix();
85  _w2n.translation() = _se2_w2n.translation();
86 
87  SE2 w2l = v->estimate().inverse();
88  _w2l = w2l.rotation().toRotationMatrix();
89  _w2l.translation() = w2l.translation();
90 
91  double alpha=v->estimate().rotation().angle();
92  double c=cos(alpha), s=sin(alpha);
93  Matrix2D RInversePrime;
94  RInversePrime << -s, c, -c, -s;
95  _RpInverse_RInversePrime = _offsetParam->offset().rotation().toRotationMatrix().transpose()*RInversePrime;
96  _RpInverse_RInverse=w2l.rotation();
97  }
OptimizableGraph::Vertex * vertex()
Definition: cache.cpp:61
Eigen::Matrix< double, 2, 2, Eigen::ColMajor > Matrix2D
Definition: eigen_types.h:60
ParameterSE2Offset * _offsetParam
the parameter connected to the cache
Isometry2D _w2n
world to sensor transform
const Eigen::Rotation2Dd & rotation() const
rotational component
Definition: se2.h:58
Isometry2D _n2w
sensor to world
const SE2 & offset() const
Isometry2D _w2l
world to local
SE2 inverse() const
invert :-)
Definition: se2.h:82
const Vector2D & translation() const
translational component
Definition: se2.h:54
const Isometry2D& g2o::CacheSE2Offset::w2lMatrix ( ) const
inline
const SE2& g2o::CacheSE2Offset::w2n ( ) const
inline
const Isometry2D& g2o::CacheSE2Offset::w2nMatrix ( ) const
inline

Definition at line 90 of file parameter_se2_offset.h.

90 { return _w2n;}
Isometry2D _w2n
world to sensor transform

Member Data Documentation

Isometry2D g2o::CacheSE2Offset::_n2w
protected

sensor to world

Definition at line 104 of file parameter_se2_offset.h.

Referenced by updateImpl().

ParameterSE2Offset* g2o::CacheSE2Offset::_offsetParam
protected

the parameter connected to the cache

Definition at line 98 of file parameter_se2_offset.h.

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

Matrix2D g2o::CacheSE2Offset::_RpInverse_RInverse
protected

Definition at line 105 of file parameter_se2_offset.h.

Referenced by updateImpl().

Matrix2D g2o::CacheSE2Offset::_RpInverse_RInversePrime
protected

Definition at line 106 of file parameter_se2_offset.h.

Referenced by updateImpl().

SE2 g2o::CacheSE2Offset::_se2_n2w
protected

Definition at line 100 of file parameter_se2_offset.h.

Referenced by updateImpl().

SE2 g2o::CacheSE2Offset::_se2_w2n
protected

Definition at line 99 of file parameter_se2_offset.h.

Referenced by updateImpl().

Isometry2D g2o::CacheSE2Offset::_w2l
protected

world to local

Definition at line 103 of file parameter_se2_offset.h.

Referenced by updateImpl().

Isometry2D g2o::CacheSE2Offset::_w2n
protected

world to sensor transform

Definition at line 102 of file parameter_se2_offset.h.

Referenced by updateImpl().

g2o::CacheSE2Offset::EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Definition at line 80 of file parameter_se2_offset.h.


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