g2o
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
g2o::BaseEdge< D, E > Class Template Reference

#include <base_edge.h>

Inherits g2o::OptimizableGraph::Edge.

Inherited by g2o::BaseFixedSizedEdge< D, OdomAndLaserMotion, VertexSE2, VertexBaseline >, g2o::BaseFixedSizedEdge< D, g2o::Vector2, VertexCameraBAL, VertexPointBAL >, g2o::BaseFixedSizedEdge< D, Eigen::Vector2d, VertexCircle >, g2o::BaseFixedSizedEdge< D, Eigen::Vector2d, VertexParams >, g2o::BaseFixedSizedEdge< D, Eigen::Vector3d, VertexPositionVelocity3D >, g2o::BaseFixedSizedEdge< D, Eigen::Vector3d, VertexPosition3D >, g2o::BaseFixedSizedEdge< D, Eigen::VectorXd, FPolynomialCoefficientVertex, PPolynomialCoefficientVertex >, g2o::BaseFixedSizedEdge< D, double, PolynomialCoefficientVertex >, g2o::BaseFixedSizedEdge< D, Eigen::Vector3d, VertexPositionVelocity3D, VertexPositionVelocity3D >, g2o::BaseFixedSizedEdge< D, E, VertexXi, VertexXj >, g2o::BaseFixedSizedEdge< D, E, VertexXi >, g2o::BaseFixedSizedEdge< D, Vector2, VertexPointXYZ, VertexSim3Expmap >, g2o::BaseFixedSizedEdge< D, Line2D, VertexLine2D, VertexLine2D >, g2o::BaseFixedSizedEdge< D, double, VertexLine2D, VertexPointXY >, g2o::BaseFixedSizedEdge< D, Vector4, VertexPlane, VertexPlane >, g2o::BaseFixedSizedEdge< D, Vector2, VertexPointXY, VertexPointXY >, g2o::BaseFixedSizedEdge< D, Vector3, VertexPointXYZ, VertexPointXYZ >, g2o::BaseFixedSizedEdge< D, Vector2, VertexPointXYZ, VertexCam >, g2o::BaseFixedSizedEdge< D, Vector3, VertexPointXYZ, VertexCam >, g2o::BaseFixedSizedEdge< 2, Vector2, VertexPointXYZ, VertexSE3Expmap, VertexSE3Expmap >, g2o::BaseFixedSizedEdge< D, Vector2, VertexPointXYZ, VertexSE3Expmap >, g2o::BaseFixedSizedEdge< D, Vector3, VertexPointXYZ, VertexSE3Expmap >, g2o::BaseFixedSizedEdge< D, SE3Quat, VertexCam, VertexCam >, g2o::BaseFixedSizedEdge< D, double, VertexCam, VertexCam >, g2o::BaseFixedSizedEdge< D, SE2, VertexSE2, VertexSE2 >, g2o::BaseFixedSizedEdge< D, Line2D, VertexSE2, VertexLine2D >, g2o::BaseFixedSizedEdge< 3, VelocityMeasurement, VertexSE2, VertexSE2, VertexOdomDifferentialParams >, g2o::BaseFixedSizedEdge< D, Vector2, VertexSE2, VertexPointXY >, g2o::BaseFixedSizedEdge< D, double, VertexSE2, VertexPointXY >, g2o::BaseFixedSizedEdge< D, SE2, VertexSE2 >, g2o::BaseFixedSizedEdge< D, OdomAndLaserMotion, VertexSE2, VertexOdomDifferentialParams >, g2o::BaseFixedSizedEdge< D, Vector4, VertexSE2, VertexSegment2D >, g2o::BaseFixedSizedEdge< D, Vector2, VertexSE2, VertexSegment2D >, g2o::BaseFixedSizedEdge< D, Vector3, VertexSE2, VertexSegment2D >, g2o::BaseFixedSizedEdge< 3, SE2, VertexSE2, VertexSE2, VertexSE2 >, g2o::BaseFixedSizedEdge< D, Vector2, VertexSE2 >, g2o::BaseFixedSizedEdge< D, Isometry3, VertexSE3, VertexSE3 >, g2o::BaseFixedSizedEdge< D, SE3Quat, VertexSE3Expmap, VertexSE3Expmap >, g2o::BaseFixedSizedEdge< D, Line3D, VertexSE3, VertexLine3D >, g2o::BaseFixedSizedEdge< D, Vector3, VertexSE3, VertexPointXYZ >, g2o::BaseFixedSizedEdge< D, Isometry3, VertexSE3 >, g2o::BaseFixedSizedEdge< D, Vector2, VertexSE3Expmap >, g2o::BaseFixedSizedEdge< D, Vector3, VertexSE3 >, g2o::BaseFixedSizedEdge< D, Sim3, VertexSim3Expmap, VertexSim3Expmap >, g2o::BaseFixedSizedEdge< D, Vector3, VertexSE3Expmap >, g2o::BaseFixedSizedEdge< D, Vector2, VertexPointXY >, g2o::BaseFixedSizedEdge< D, Vector3, VertexPointXYZ >, g2o::BaseFixedSizedEdge< D, EdgeGICP, VertexSE3, VertexSE3 >, g2o::BaseFixedSizedEdge< D, Vector3, VertexPointXYZ, VertexSCam >, g2o::BaseFixedSizedEdge< D, Eigen::Vector2d, VertexSE2, VertexPointXY >, g2o::BaseVariableSizedEdge<-1, VectorX >, g2o::BaseVariableSizedEdge< 2, Vector2 >, g2o::BaseVariableSizedEdge< 4, Vector4 >, g2o::BaseVariableSizedEdge< 6, Isometry3 >, g2o::BaseVariableSizedEdge< 3, Plane3D >, g2o::BaseFixedSizedEdge< D, E, VertexTypes >, and g2o::BaseVariableSizedEdge< D, E >.

Collaboration diagram for g2o::BaseEdge< D, E >:
Collaboration graph
[legend]

Public Types

typedef E Measurement
 
typedef internal::BaseEdgeTraits< D >::ErrorVector ErrorVector
 
typedef internal::BaseEdgeTraits< D >::InformationType InformationType
 

Public Member Functions

 BaseEdge ()
 
BaseEdgeoperator= (const BaseEdge &)=delete
 
 BaseEdge (const BaseEdge &)=delete
 
virtual ~BaseEdge ()
 
virtual double chi2 () const
 
virtual const double * errorData () const
 returns the error vector cached after calling the computeError;
 
virtual double * errorData ()
 
const ErrorVectorerror () const
 
ErrorVectorerror ()
 
EIGEN_STRONG_INLINE const InformationTypeinformation () const
 information matrix of the constraint
 
EIGEN_STRONG_INLINE InformationTypeinformation ()
 
void setInformation (const InformationType &information)
 
virtual const double * informationData () const
 
virtual double * informationData ()
 
EIGEN_STRONG_INLINE const Measurementmeasurement () const
 accessor functions for the measurement represented by the edge
 
virtual void setMeasurement (const Measurement &m)
 
virtual int rank () const
 
virtual void initialEstimate (const OptimizableGraph::VertexSet &, OptimizableGraph::Vertex *)
 
template<int Dim = D>
std::enable_if< Dim==-1, void >::type setDimension (int dim)
 
- Public Member Functions inherited from g2o::OptimizableGraph::Edge
 Edge ()
 
virtual ~Edge ()
 
virtual bool allVerticesFixed () const =0
 
virtual void computeError ()=0
 
virtual bool setMeasurementData (const double *m)
 
virtual bool getMeasurementData (double *m) const
 
virtual int measurementDimension () const
 
virtual bool setMeasurementFromState ()
 
RobustKernelrobustKernel () const
 if NOT NULL, error of this edge will be robustifed with the kernel
 
void setRobustKernel (RobustKernel *ptr)
 
virtual void constructQuadraticForm ()=0
 
virtual void mapHessianMemory (double *d, int i, int j, bool rowMajor)=0
 
virtual void linearizeOplus (JacobianWorkspace &jacobianWorkspace)=0
 
virtual double initialEstimatePossible (const OptimizableGraph::VertexSet &from, OptimizableGraph::Vertex *to)
 
int level () const
 returns the level of the edge
 
void setLevel (int l)
 sets the level of the edge
 
int dimension () const
 returns the dimensions of the error function
 
 G2O_ATTRIBUTE_DEPRECATED (virtual Vertex *createFrom())
 
 G2O_ATTRIBUTE_DEPRECATED (virtual Vertex *createTo())
 
virtual VertexcreateVertex (int)
 
virtual bool read (std::istream &is)=0
 read the vertex from a stream, i.e., the internal state of the vertex
 
virtual bool write (std::ostream &os) const =0
 write the vertex to a stream
 
long long internalId () const
 the internal ID of the edge
 
OptimizableGraphgraph ()
 
const OptimizableGraphgraph () const
 
bool setParameterId (int argNum, int paramId)
 
const Parameterparameter (int argNo) const
 
size_t numParameters () const
 
void resizeParameters (size_t newSize)
 
- Public Member Functions inherited from g2o::HyperGraph::Edge
 Edge (int id=InvalidId)
 creates and empty edge with no vertices
 
virtual void resize (size_t size)
 
const VertexContainervertices () const
 
VertexContainervertices ()
 
const Vertexvertex (size_t i) const
 
Vertexvertex (size_t i)
 
void setVertex (size_t i, Vertex *v)
 
int id () const
 
void setId (int id)
 
virtual HyperGraphElementType elementType () const
 
int numUndefinedVertices () const
 
- Public Member Functions inherited from g2o::HyperGraph::HyperGraphElement
virtual ~HyperGraphElement ()
 
- Public Member Functions inherited from g2o::HyperGraph::DataContainer
 DataContainer ()
 
virtual ~DataContainer ()
 
const DatauserData () const
 the user data associated with this vertex
 
DatauserData ()
 
void setUserData (Data *obs)
 
void addUserData (Data *obs)
 

Static Public Attributes

static constexpr int Dimension = internal::BaseEdgeTraits<D>::Dimension
 

Protected Member Functions

InformationType robustInformation (const Vector3 &rho) const
 
bool writeInformationMatrix (std::ostream &os) const
 write the upper trinagular part of the information matrix into the stream
 
bool readInformationMatrix (std::istream &is)
 
bool writeParamIds (std::ostream &os) const
 write the param IDs that are potentially used by the edge
 
bool readParamIds (std::istream &is)
 reads the param IDs from the stream
 
- Protected Member Functions inherited from g2o::OptimizableGraph::Edge
template<typename ParameterType >
bool installParameter (ParameterType *&p, size_t argNo, int paramId=-1)
 
template<typename CacheType >
void resolveCache (CacheType *&cache, OptimizableGraph::Vertex *, const std::string &_type, const ParameterVector &parameters)
 
bool resolveParameters ()
 
virtual bool resolveCaches ()
 

Protected Attributes

Measurement _measurement
 the measurement of the edge
 
InformationType _information
 
ErrorVector _error
 
- Protected Attributes inherited from g2o::OptimizableGraph::Edge
int _dimension
 
int _level
 
RobustKernel_robustKernel
 
long long _internalId
 
std::vector< int > _cacheIds
 
std::vector< std::string > _parameterTypes
 
std::vector< Parameter ** > _parameters
 
std::vector< int > _parameterIds
 
- Protected Attributes inherited from g2o::HyperGraph::Edge
VertexContainer _vertices
 
int _id
 unique id
 
- Protected Attributes inherited from g2o::HyperGraph::DataContainer
Data_userData
 

Detailed Description

template<int D, typename E>
class g2o::BaseEdge< D, E >

Definition at line 86 of file base_edge.h.

Member Typedef Documentation

◆ ErrorVector

template<int D, typename E >
typedef internal::BaseEdgeTraits<D>::ErrorVector g2o::BaseEdge< D, E >::ErrorVector

Definition at line 90 of file base_edge.h.

◆ InformationType

template<int D, typename E >
typedef internal::BaseEdgeTraits<D>::InformationType g2o::BaseEdge< D, E >::InformationType

Definition at line 91 of file base_edge.h.

◆ Measurement

template<int D, typename E >
typedef E g2o::BaseEdge< D, E >::Measurement

Definition at line 89 of file base_edge.h.

Constructor & Destructor Documentation

◆ BaseEdge() [1/2]

template<int D, typename E >
g2o::BaseEdge< D, E >::BaseEdge ( )
inline

Definition at line 93 of file base_edge.h.

93: OptimizableGraph::Edge() { _dimension = D; }

References g2o::OptimizableGraph::Edge::_dimension.

◆ BaseEdge() [2/2]

template<int D, typename E >
g2o::BaseEdge< D, E >::BaseEdge ( const BaseEdge< D, E > &  )
delete

◆ ~BaseEdge()

template<int D, typename E >
virtual g2o::BaseEdge< D, E >::~BaseEdge ( )
inlinevirtual

Definition at line 97 of file base_edge.h.

97{}

Member Function Documentation

◆ chi2()

template<int D, typename E >
virtual double g2o::BaseEdge< D, E >::chi2 ( ) const
inlinevirtual

computes the chi2 based on the cached error value, only valid after computeError has been called.

Implements g2o::OptimizableGraph::Edge.

Reimplemented in g2o::OnlineEdgeSE2, and g2o::OnlineEdgeSE3.

Definition at line 99 of file base_edge.h.

99{ return _error.dot(information() * _error); }
EIGEN_STRONG_INLINE const InformationType & information() const
information matrix of the constraint
Definition base_edge.h:107
ErrorVector _error
Definition base_edge.h:149

References g2o::BaseEdge< D, E >::_error, and g2o::BaseEdge< D, E >::information().

◆ error() [1/2]

template<int D, typename E >
ErrorVector & g2o::BaseEdge< D, E >::error ( )
inline

Definition at line 104 of file base_edge.h.

104{ return _error; }

References g2o::BaseEdge< D, E >::_error.

◆ error() [2/2]

template<int D, typename E >
const ErrorVector & g2o::BaseEdge< D, E >::error ( ) const
inline

◆ errorData() [1/2]

template<int D, typename E >
virtual double * g2o::BaseEdge< D, E >::errorData ( )
inlinevirtual

Implements g2o::OptimizableGraph::Edge.

Definition at line 102 of file base_edge.h.

102{ return _error.data(); }

References g2o::BaseEdge< D, E >::_error.

◆ errorData() [2/2]

template<int D, typename E >
virtual const double * g2o::BaseEdge< D, E >::errorData ( ) const
inlinevirtual

returns the error vector cached after calling the computeError;

Implements g2o::OptimizableGraph::Edge.

Definition at line 101 of file base_edge.h.

101{ return _error.data(); }

References g2o::BaseEdge< D, E >::_error.

◆ information() [1/2]

template<int D, typename E >
EIGEN_STRONG_INLINE InformationType & g2o::BaseEdge< D, E >::information ( )
inline

Definition at line 110 of file base_edge.h.

110{ return _information; }
InformationType _information
Definition base_edge.h:147

References g2o::BaseEdge< D, E >::_information.

◆ information() [2/2]

template<int D, typename E >
EIGEN_STRONG_INLINE const InformationType & g2o::BaseEdge< D, E >::information ( ) const
inline

information matrix of the constraint

Definition at line 107 of file base_edge.h.

107 {
108 return _information;
109 }

References g2o::BaseEdge< D, E >::_information.

Referenced by g2o::addOdometryCalibLinksDifferential(), g2o::BaseEdge< D, E >::chi2(), g2o::EdgeProjectP2MC::EdgeProjectP2MC(), g2o::EdgeSE2Offset::EdgeSE2Offset(), g2o::EdgeSE2PointXYOffset::EdgeSE2PointXYOffset(), g2o::EdgeSE3::EdgeSE3(), g2o::EdgeSE3Line3D::EdgeSE3Line3D(), g2o::EdgeSE3Offset::EdgeSE3Offset(), g2o::EdgeSE3PointXYZ::EdgeSE3PointXYZ(), g2o::EdgeSE3PointXYZDepth::EdgeSE3PointXYZDepth(), g2o::EdgeSE3PointXYZDisparity::EdgeSE3PointXYZDisparity(), g2o::EdgeSE3Prior::EdgeSE3Prior(), g2o::EdgeSE3XYZPrior::EdgeSE3XYZPrior(), g2o::EdgeXYZPrior::EdgeXYZPrior(), main(), main(), main(), g2o::tutorial::EdgeSE2::read(), g2o::tutorial::EdgeSE2PointXY::read(), g2o::Edge_V_V_GICP::read(), g2o::EdgeSBAScale::read(), g2o::EdgeSE2LotsOfXY::read(), g2o::EdgeSE2Offset::read(), g2o::EdgeSE2PointXYBearing::read(), g2o::EdgeSE2PointXYOffset::read(), g2o::EdgeSE2TwoPointsXY::read(), g2o::EdgeLine2DPointXY::read(), g2o::EdgePointXYZ::read(), g2o::EdgeSE3LotsOfXYZ::read(), g2o::Gm2dlIO::readGm2dl(), g2o::BaseEdge< D, E >::readInformationMatrix(), g2o::BaseEdge< D, E >::setInformation(), g2o::SolverSLAM2DLinear::solveOrientation(), g2o::tutorial::EdgeSE2::write(), g2o::tutorial::EdgeSE2PointXY::write(), g2o::EdgeSBAScale::write(), g2o::EdgeSE2LotsOfXY::write(), g2o::EdgeSE2PointXYBearing::write(), g2o::EdgeSE2TwoPointsXY::write(), g2o::EdgeLine2DPointXY::write(), g2o::EdgePointXYZ::write(), g2o::EdgeSE3LotsOfXYZ::write(), g2o::EdgeSE3Euler::write(), g2o::Gm2dlIO::writeGm2dl(), and g2o::BaseEdge< D, E >::writeInformationMatrix().

◆ informationData() [1/2]

template<int D, typename E >
virtual double * g2o::BaseEdge< D, E >::informationData ( )
inlinevirtual

Implements g2o::OptimizableGraph::Edge.

Definition at line 116 of file base_edge.h.

116{ return _information.data(); }

References g2o::BaseEdge< D, E >::_information.

◆ informationData() [2/2]

template<int D, typename E >
virtual const double * g2o::BaseEdge< D, E >::informationData ( ) const
inlinevirtual

returns the memory of the information matrix, usable for example with a Eigen::Map<MatrixX>

Implements g2o::OptimizableGraph::Edge.

Definition at line 115 of file base_edge.h.

115{ return _information.data(); }

References g2o::BaseEdge< D, E >::_information.

◆ initialEstimate()

template<int D, typename E >
virtual void g2o::BaseEdge< D, E >::initialEstimate ( const OptimizableGraph::VertexSet from,
OptimizableGraph::Vertex to 
)
inlinevirtual

◆ measurement()

template<int D, typename E >
EIGEN_STRONG_INLINE const Measurement & g2o::BaseEdge< D, E >::measurement ( ) const
inline

accessor functions for the measurement represented by the edge

Definition at line 119 of file base_edge.h.

119 {
120 return _measurement;
121 }
Measurement _measurement
the measurement of the edge
Definition base_edge.h:146

References g2o::BaseEdge< D, E >::_measurement.

Referenced by g2o::EdgeSE2PureCalib::computeError(), EdgeCalib::computeError(), g2o::EdgeProjectXYZ2UV::computeError(), g2o::EdgeProjectXYZ2UVU::computeError(), g2o::Edge_V_V_GICP::Edge_V_V_GICP(), GPSObservationEdgePositionVelocity3D::GPSObservationEdgePositionVelocity3D(), g2o::EdgeSE3XYZPrior::initialEstimate(), g2o::EdgeSE2SensorCalib::initialEstimate(), g2o::EdgeSE2Offset::initialEstimate(), g2o::EdgeSE3Offset::initialEstimate(), g2o::EdgeSE3Prior::initialEstimate(), g2o::Edge_V_V_GICP::linearizeOplus(), main(), main(), Robot::move(), EdgePointOnCircle::operator()(), EdgeObservationBAL::operator()(), EdgePointOnCurve::operator()(), g2o::ThetaTreeAction::perform(), g2o::tutorial::EdgeSE2::read(), g2o::Edge_V_V_GICP::read(), g2o::EdgeSE2SensorCalib::read(), g2o::EdgeSE2::read(), g2o::SolverSLAM2DLinear::solveOrientation(), ToEdgeSim3(), g2o::tutorial::EdgeSE2::write(), g2o::tutorial::EdgeSE2PointXY::write(), g2o::Edge_V_V_GICP::write(), g2o::EdgeProjectP2MC::write(), g2o::EdgeProjectP2SC::write(), g2o::EdgeProjectPSI2UV::write(), g2o::EdgeStereoSE3ProjectXYZ::write(), g2o::EdgeStereoSE3ProjectXYZOnlyPose::write(), g2o::EdgeSE3ProjectXYZ::write(), g2o::EdgeProjectXYZ2UV::write(), g2o::EdgeProjectXYZ2UVU::write(), g2o::EdgeSE3ProjectXYZOnlyPose::write(), g2o::EdgeSBACam::write(), g2o::EdgeSBAScale::write(), g2o::EdgeSE3Expmap::write(), g2o::EdgeSE2OdomDifferentialCalib::write(), g2o::EdgeSE2SensorCalib::write(), g2o::EdgeSim3::write(), g2o::EdgePointXY::write(), g2o::EdgeSE2::write(), g2o::EdgeSE2Offset::write(), g2o::EdgeSE2PointXY::write(), g2o::EdgeSE2PointXYBearing::write(), g2o::EdgeSE2PointXYCalib::write(), g2o::EdgeSE2PointXYOffset::write(), g2o::EdgeSE2Prior::write(), g2o::EdgeSE2TwoPointsXY::write(), g2o::EdgeSE2XYPrior::write(), g2o::EdgeXYPrior::write(), g2o::EdgeLine2D::write(), g2o::EdgeLine2DPointXY::write(), g2o::EdgeSE2Line2D::write(), g2o::EdgeSE2Segment2D::write(), g2o::EdgeSE2Segment2DLine::write(), g2o::EdgeSE2Segment2DPointLine::write(), g2o::EdgePointXYZ::write(), g2o::EdgeSE3::write(), g2o::EdgeSE3PointXYZ::write(), g2o::EdgeSE3PointXYZDepth::write(), g2o::EdgeSE3PointXYZDisparity::write(), g2o::EdgeSE3Prior::write(), g2o::EdgeSE3XYZPrior::write(), g2o::EdgeXYZPrior::write(), g2o::EdgePlane::write(), g2o::EdgeSE3Euler::write(), g2o::EdgeSE3Line3D::write(), g2o::EdgeSE3PlaneSensorCalib::write(), and g2o::Gm2dlIO::writeGm2dl().

◆ operator=()

template<int D, typename E >
BaseEdge & g2o::BaseEdge< D, E >::operator= ( const BaseEdge< D, E > &  )
delete

◆ rank()

template<int D, typename E >
virtual int g2o::BaseEdge< D, E >::rank ( ) const
inlinevirtual

Definition at line 124 of file base_edge.h.

124{ return _dimension; }

References g2o::OptimizableGraph::Edge::_dimension.

◆ readInformationMatrix()

template<int D, typename E >
bool g2o::BaseEdge< D, E >::readInformationMatrix ( std::istream &  is)
inlineprotected

reads the upper triangular part of the matrix and recovers the missing symmetrical elements

Definition at line 173 of file base_edge.h.

173 {
174 for (int i = 0; i < information().rows() && is.good(); ++i)
175 for (int j = i; j < information().cols() && is.good(); ++j) {
176 is >> information()(i, j);
177 if (i != j) information()(j, i) = information()(i, j);
178 }
179 return is.good() || is.eof();
180 }

References g2o::BaseEdge< D, E >::information().

Referenced by PolynomialSingleValueEdge::read(), MultipleValueEdge::read(), g2o::EdgeProjectP2MC::read(), g2o::EdgeProjectP2SC::read(), g2o::EdgeProjectPSI2UV::read(), g2o::EdgeStereoSE3ProjectXYZ::read(), g2o::EdgeStereoSE3ProjectXYZOnlyPose::read(), g2o::EdgeSE3ProjectXYZ::read(), g2o::EdgeProjectXYZ2UV::read(), g2o::EdgeProjectXYZ2UVU::read(), g2o::EdgeSE3ProjectXYZOnlyPose::read(), g2o::EdgeSBACam::read(), g2o::EdgeSE3Expmap::read(), g2o::EdgeSE2OdomDifferentialCalib::read(), g2o::EdgeSE2SensorCalib::read(), g2o::EdgeSim3::read(), g2o::EdgeSim3ProjectXYZ::read(), g2o::EdgeInverseSim3ProjectXYZ::read(), g2o::EdgePointXY::read(), g2o::EdgeSE2::read(), g2o::EdgeSE2Offset::read(), g2o::EdgeSE2PointXY::read(), g2o::EdgeSE2PointXYCalib::read(), g2o::EdgeSE2PointXYOffset::read(), g2o::EdgeSE2Prior::read(), g2o::EdgeSE2XYPrior::read(), g2o::EdgeXYPrior::read(), g2o::EdgeLine2D::read(), g2o::EdgeSE2Line2D::read(), g2o::EdgeSE2Segment2D::read(), g2o::EdgeSE2Segment2DLine::read(), g2o::EdgeSE2Segment2DPointLine::read(), g2o::EdgeSE3::read(), g2o::EdgeSE3Offset::read(), g2o::EdgeSE3PointXYZ::read(), g2o::EdgeSE3PointXYZDepth::read(), g2o::EdgeSE3PointXYZDisparity::read(), g2o::EdgeSE3Prior::read(), g2o::EdgeSE3XYZPrior::read(), g2o::EdgeXYZPrior::read(), g2o::EdgePlane::read(), g2o::EdgeSE3Calib::read(), g2o::EdgeSE3Line3D::read(), and g2o::EdgeSE3PlaneSensorCalib::read().

◆ readParamIds()

template<int D, typename E >
bool g2o::BaseEdge< D, E >::readParamIds ( std::istream &  is)
inlineprotected

◆ robustInformation()

template<int D, typename E >
InformationType g2o::BaseEdge< D, E >::robustInformation ( const Vector3 rho) const
inlineprotected

calculate the robust information matrix by updating the information matrix of the error

Definition at line 156 of file base_edge.h.

156 {
157 InformationType result = rho[1] * _information;
158 // ErrorVector weightedError = _information * _error;
159 // result.noalias() += 2 * rho[2] * (weightedError *
160 // weightedError.transpose());
161 return result;
162 }
internal::BaseEdgeTraits< D >::InformationType InformationType
Definition base_edge.h:91

References g2o::BaseEdge< D, E >::_information.

◆ setDimension()

template<int D, typename E >
template<int Dim = D>
std::enable_if< Dim==-1, void >::type g2o::BaseEdge< D, E >::setDimension ( int  dim)
inline

set the dimension for a dynamically sizeable error function. The member will not be declared for edges having a fixed size at compile time.

Definition at line 139 of file base_edge.h.

139 {
140 _dimension = dim;
141 _information.resize(dim, dim);
142 _error.resize(dim, 1);
143 }

References g2o::OptimizableGraph::Edge::_dimension, g2o::BaseEdge< D, E >::_error, and g2o::BaseEdge< D, E >::_information.

Referenced by MultipleValueEdge::MultipleValueEdge().

◆ setInformation()

template<int D, typename E >
void g2o::BaseEdge< D, E >::setInformation ( const InformationType information)
inline

◆ setMeasurement()

template<int D, typename E >
virtual void g2o::BaseEdge< D, E >::setMeasurement ( const Measurement m)
inlinevirtual

◆ writeInformationMatrix()

template<int D, typename E >
bool g2o::BaseEdge< D, E >::writeInformationMatrix ( std::ostream &  os) const
inlineprotected

write the upper trinagular part of the information matrix into the stream

Definition at line 165 of file base_edge.h.

165 {
166 for (int i = 0; i < information().rows(); ++i)
167 for (int j = i; j < information().cols(); ++j)
168 os << information()(i, j) << " ";
169 return os.good();
170 }

References g2o::BaseEdge< D, E >::information().

Referenced by PolynomialSingleValueEdge::write(), MultipleValueEdge::write(), g2o::EdgeProjectP2MC::write(), g2o::EdgeProjectP2SC::write(), g2o::EdgeProjectPSI2UV::write(), g2o::EdgeStereoSE3ProjectXYZ::write(), g2o::EdgeStereoSE3ProjectXYZOnlyPose::write(), g2o::EdgeSE3ProjectXYZ::write(), g2o::EdgeProjectXYZ2UV::write(), g2o::EdgeProjectXYZ2UVU::write(), g2o::EdgeSE3ProjectXYZOnlyPose::write(), g2o::EdgeSBACam::write(), g2o::EdgeSE3Expmap::write(), g2o::EdgeSE2OdomDifferentialCalib::write(), g2o::EdgeSE2SensorCalib::write(), g2o::EdgeSim3::write(), g2o::EdgeSim3ProjectXYZ::write(), g2o::EdgeInverseSim3ProjectXYZ::write(), g2o::EdgePointXY::write(), g2o::EdgeSE2::write(), g2o::EdgeSE2Offset::write(), g2o::EdgeSE2PointXY::write(), g2o::EdgeSE2PointXYCalib::write(), g2o::EdgeSE2PointXYOffset::write(), g2o::EdgeSE2Prior::write(), g2o::EdgeSE2XYPrior::write(), g2o::EdgeXYPrior::write(), g2o::EdgeLine2D::write(), g2o::EdgeSE2Line2D::write(), g2o::EdgeSE2Segment2D::write(), g2o::EdgeSE2Segment2DLine::write(), g2o::EdgeSE2Segment2DPointLine::write(), g2o::EdgeSE3::write(), g2o::EdgeSE3Offset::write(), g2o::EdgeSE3PointXYZ::write(), g2o::EdgeSE3PointXYZDepth::write(), g2o::EdgeSE3PointXYZDisparity::write(), g2o::EdgeSE3Prior::write(), g2o::EdgeSE3XYZPrior::write(), g2o::EdgeXYZPrior::write(), g2o::EdgePlane::write(), g2o::EdgeSE3Calib::write(), g2o::EdgeSE3Line3D::write(), and g2o::EdgeSE3PlaneSensorCalib::write().

◆ writeParamIds()

template<int D, typename E >
bool g2o::BaseEdge< D, E >::writeParamIds ( std::ostream &  os) const
inlineprotected

Member Data Documentation

◆ _error

template<int D, typename E >
ErrorVector g2o::BaseEdge< D, E >::_error
protected

error vector, stores the result after computeError() is called

Definition at line 149 of file base_edge.h.

Referenced by g2o::BaseEdge< D, E >::chi2(), g2o::EdgeSE2PureCalib::computeError(), EdgeCalib::computeError(), PolynomialSingleValueEdge::computeError(), MultipleValueEdge::computeError(), GPSObservationPosition3DEdge::computeError(), TargetOdometry3DEdge::computeError(), GPSObservationEdgePositionVelocity3D::computeError(), g2o::tutorial::EdgeSE2PointXY::computeError(), g2o::EdgeProjectP2MC::computeError(), g2o::EdgeProjectP2SC::computeError(), g2o::EdgeProjectPSI2UV::computeError(), g2o::EdgeStereoSE3ProjectXYZOnlyPose::computeError(), g2o::EdgeSE3ProjectXYZ::computeError(), g2o::EdgeProjectXYZ2UV::computeError(), g2o::EdgeProjectXYZ2UVU::computeError(), g2o::EdgeSE3ProjectXYZOnlyPose::computeError(), g2o::EdgeSBACam::computeError(), g2o::EdgeSBAScale::computeError(), g2o::EdgeSE3Expmap::computeError(), g2o::EdgeSE2LotsOfXY::computeError(), g2o::EdgeSE2Offset::computeError(), g2o::EdgeSE2PointXYOffset::computeError(), g2o::EdgeSE2TwoPointsXY::computeError(), g2o::EdgeLine2DPointXY::computeError(), g2o::EdgeSE2Segment2D::computeError(), g2o::EdgeSE2Segment2DLine::computeError(), g2o::EdgeSE3::computeError(), g2o::EdgeSE3LotsOfXYZ::computeError(), g2o::EdgeSE3Offset::computeError(), g2o::EdgeSE3PointXYZ::computeError(), g2o::EdgeSE3PointXYZDepth::computeError(), g2o::EdgeSE3PointXYZDisparity::computeError(), g2o::EdgeSE3Prior::computeError(), g2o::EdgeSE3XYZPrior::computeError(), g2o::EdgeXYZPrior::computeError(), g2o::EdgeSE3Calib::computeError(), g2o::EdgeSE3Line3D::computeError(), g2o::EdgeLine2D::EdgeLine2D(), g2o::EdgePlane::EdgePlane(), g2o::EdgePointXY::EdgePointXY(), g2o::EdgePointXYZ::EdgePointXYZ(), g2o::EdgeXYPrior::EdgeXYPrior(), g2o::BaseEdge< D, E >::error(), g2o::BaseEdge< D, E >::error(), g2o::BaseEdge< D, E >::errorData(), g2o::BaseEdge< D, E >::errorData(), and g2o::BaseEdge< D, E >::setDimension().

◆ _information

template<int D, typename E >
InformationType g2o::BaseEdge< D, E >::_information
protected

◆ _measurement

template<int D, typename E >
Measurement g2o::BaseEdge< D, E >::_measurement
protected

the measurement of the edge

Definition at line 146 of file base_edge.h.

Referenced by PolynomialSingleValueEdge::computeError(), MultipleValueEdge::computeError(), GPSObservationPosition3DEdge::computeError(), TargetOdometry3DEdge::computeError(), GPSObservationEdgePositionVelocity3D::computeError(), g2o::tutorial::EdgeSE2PointXY::computeError(), g2o::EdgeProjectP2MC::computeError(), g2o::EdgeProjectP2SC::computeError(), g2o::EdgeProjectPSI2UV::computeError(), g2o::EdgeStereoSE3ProjectXYZOnlyPose::computeError(), g2o::EdgeSE3ProjectXYZ::computeError(), g2o::EdgeSE3ProjectXYZOnlyPose::computeError(), g2o::EdgeSBAScale::computeError(), g2o::EdgeSE3Expmap::computeError(), g2o::EdgeSE2LotsOfXY::computeError(), g2o::EdgeSE2PointXYOffset::computeError(), g2o::EdgeSE2TwoPointsXY::computeError(), g2o::EdgeLine2DPointXY::computeError(), g2o::EdgeSE2Segment2D::computeError(), g2o::EdgeSE2Segment2DLine::computeError(), g2o::EdgeSE3LotsOfXYZ::computeError(), g2o::EdgeSE3PointXYZ::computeError(), g2o::EdgeSE3PointXYZDepth::computeError(), g2o::EdgeSE3PointXYZDisparity::computeError(), g2o::EdgeSE3XYZPrior::computeError(), g2o::EdgeXYZPrior::computeError(), g2o::EdgeSE3Calib::computeError(), g2o::EdgeSE3Line3D::computeError(), g2o::Edge_V_V_GICP::Edge_V_V_GICP(), g2o::EdgeSBACam::getMeasurementData(), g2o::EdgeLine2DPointXY::getMeasurementData(), g2o::EdgeSE2Segment2D::getMeasurementData(), g2o::EdgeSE2Segment2DLine::getMeasurementData(), TargetOdometry3DEdge::initialEstimate(), g2o::EdgeSE2LotsOfXY::initialEstimate(), g2o::EdgeSE2TwoPointsXY::initialEstimate(), g2o::EdgeSE3LotsOfXYZ::initialEstimate(), g2o::EdgeSBACam::initialEstimate(), g2o::EdgeSE2::initialEstimate(), g2o::EdgeSE2PointXY::initialEstimate(), g2o::EdgeSE2PointXYBearing::initialEstimate(), g2o::EdgeSE2PointXYCalib::initialEstimate(), g2o::EdgeSE2PointXYOffset::initialEstimate(), g2o::EdgeSE2Prior::initialEstimate(), g2o::EdgeSE2Line2D::initialEstimate(), g2o::EdgeSE3::initialEstimate(), g2o::EdgeSE3PointXYZ::initialEstimate(), g2o::EdgeSE3PointXYZDepth::initialEstimate(), g2o::EdgeSE3PointXYZDisparity::initialEstimate(), g2o::EdgeSBAScale::initialEstimate(), g2o::EdgeSE3Expmap::linearizeOplus(), g2o::EdgeSE3::linearizeOplus(), g2o::EdgeSE3Offset::linearizeOplus(), g2o::EdgeSE3Prior::linearizeOplus(), g2o::BaseEdge< D, E >::measurement(), g2o::EdgeSE2Segment2D::measurementP1(), g2o::EdgeSE2Segment2D::measurementP2(), g2o::tutorial::EdgeSE2::read(), g2o::tutorial::EdgeSE2PointXY::read(), g2o::Edge_V_V_GICP::read(), g2o::EdgeProjectP2MC::read(), g2o::EdgeProjectP2SC::read(), g2o::EdgeProjectPSI2UV::read(), g2o::EdgeStereoSE3ProjectXYZ::read(), g2o::EdgeStereoSE3ProjectXYZOnlyPose::read(), g2o::EdgeSE3ProjectXYZ::read(), g2o::EdgeProjectXYZ2UV::read(), g2o::EdgeProjectXYZ2UVU::read(), g2o::EdgeSE3ProjectXYZOnlyPose::read(), g2o::EdgeSE2SensorCalib::read(), g2o::EdgeSim3ProjectXYZ::read(), g2o::EdgeInverseSim3ProjectXYZ::read(), g2o::EdgeSE2LotsOfXY::read(), g2o::EdgeSE2PointXY::read(), g2o::EdgeSE2PointXYBearing::read(), g2o::EdgeSE2PointXYCalib::read(), g2o::EdgeSE2PointXYOffset::read(), g2o::EdgeSE2Prior::read(), g2o::EdgeSE2TwoPointsXY::read(), g2o::EdgeSE2XYPrior::read(), g2o::EdgeXYPrior::read(), g2o::EdgeLine2D::read(), g2o::EdgeLine2DPointXY::read(), g2o::EdgeSE2Line2D::read(), g2o::EdgeSE2Segment2D::read(), g2o::EdgeSE2Segment2DLine::read(), g2o::EdgeSE2Segment2DPointLine::read(), g2o::EdgeSE3LotsOfXYZ::read(), g2o::EdgeSE3PointXYZDepth::read(), g2o::EdgeSE3PointXYZDisparity::read(), g2o::EdgeSE3XYZPrior::read(), g2o::EdgeXYZPrior::read(), g2o::EdgeSE3Line3D::read(), g2o::EdgeSE2Segment2DLine::rho(), g2o::BaseEdge< D, E >::setMeasurement(), g2o::EdgeSE2Prior::setMeasurement(), g2o::EdgeSBACam::setMeasurement(), g2o::EdgeSBACam::setMeasurementData(), g2o::EdgeSE2Prior::setMeasurementData(), g2o::EdgeLine2DPointXY::setMeasurementData(), g2o::EdgeSE2Segment2D::setMeasurementData(), g2o::EdgeSE2Segment2DLine::setMeasurementData(), g2o::EdgeSBACam::setMeasurementFromState(), g2o::EdgeSE2LotsOfXY::setMeasurementFromState(), g2o::EdgeSE2PointXYOffset::setMeasurementFromState(), g2o::EdgeSE2TwoPointsXY::setMeasurementFromState(), g2o::EdgeLine2DPointXY::setMeasurementFromState(), g2o::EdgeSE2Segment2DLine::setMeasurementFromState(), g2o::EdgeSE3LotsOfXYZ::setMeasurementFromState(), g2o::EdgeSE3PointXYZ::setMeasurementFromState(), g2o::EdgeSE3PointXYZDepth::setMeasurementFromState(), g2o::EdgeSE3PointXYZDisparity::setMeasurementFromState(), g2o::EdgeSE3XYZPrior::setMeasurementFromState(), g2o::EdgeXYZPrior::setMeasurementFromState(), g2o::EdgeSE2Segment2D::setMeasurementP1(), g2o::EdgeSE2Segment2D::setMeasurementP2(), g2o::EdgeSE2Segment2DLine::setRho(), g2o::EdgeSE2Segment2DLine::setTheta(), g2o::EdgeSE2Segment2DLine::theta(), PolynomialSingleValueEdge::write(), MultipleValueEdge::write(), g2o::EdgeSim3ProjectXYZ::write(), g2o::EdgeInverseSim3ProjectXYZ::write(), g2o::EdgeSE2LotsOfXY::write(), g2o::EdgeSE3LotsOfXYZ::write(), g2o::EdgeSE3Offset::write(), g2o::EdgeSE3Calib::write(), and g2o::EdgeSE3Euler::write().

◆ Dimension

template<int D, typename E >
constexpr int g2o::BaseEdge< D, E >::Dimension = internal::BaseEdgeTraits<D>::Dimension
staticconstexpr

Definition at line 88 of file base_edge.h.


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