g2o
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
g2o::OptimizableGraph::Edge Class Referenceabstract

#include <optimizable_graph.h>

Inheritance diagram for g2o::OptimizableGraph::Edge:
Inheritance graph
[legend]
Collaboration diagram for g2o::OptimizableGraph::Edge:
Collaboration graph
[legend]

Public Member Functions

 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 const double * errorData () const =0
 returns the error vector cached after calling the computeError;
 
virtual double * errorData ()=0
 
virtual const double * informationData () const =0
 
virtual double * informationData ()=0
 
virtual double chi2 () const =0
 
virtual void constructQuadraticForm ()=0
 
virtual void mapHessianMemory (double *d, int i, int j, bool rowMajor)=0
 
virtual void linearizeOplus (JacobianWorkspace &jacobianWorkspace)=0
 
virtual void initialEstimate (const OptimizableGraph::VertexSet &from, OptimizableGraph::Vertex *to)=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)
 

Protected Member Functions

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

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
 

Friends

struct OptimizableGraph
 

Detailed Description

Definition at line 416 of file optimizable_graph.h.

Constructor & Destructor Documentation

◆ Edge()

g2o::OptimizableGraph::Edge::Edge ( )

Definition at line 105 of file optimizable_graph.cpp.

◆ ~Edge()

g2o::OptimizableGraph::Edge::~Edge ( )
virtual

Reimplemented from g2o::HyperGraph::Edge.

Definition at line 108 of file optimizable_graph.cpp.

void release(T *obj)
Definition ownership.h:8

References g2o::release().

Member Function Documentation

◆ allVerticesFixed()

virtual bool g2o::OptimizableGraph::Edge::allVerticesFixed ( ) const
pure virtual

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

Referenced by g2o::SparseOptimizer::initializeOptimization(), and g2o::SparseOptimizer::updateInitialization().

◆ chi2()

virtual double g2o::OptimizableGraph::Edge::chi2 ( ) const
pure virtual

◆ computeError()

virtual void g2o::OptimizableGraph::Edge::computeError ( )
pure virtual

Implemented in g2o::EdgeSE2PureCalib, EdgeCalib, PolynomialSingleValueEdge, MultipleValueEdge, GPSObservationPosition3DEdge, TargetOdometry3DEdge, GPSObservationEdgePositionVelocity3D, g2o::tutorial::EdgeSE2, g2o::tutorial::EdgeSE2PointXY, g2o::Edge_V_V_GICP, g2o::Edge_XYZ_VSC, g2o::EdgeProjectP2MC, g2o::EdgeProjectP2SC, g2o::EdgeProjectPSI2UV, g2o::EdgeStereoSE3ProjectXYZ, g2o::EdgeStereoSE3ProjectXYZOnlyPose, g2o::EdgeSE3ProjectXYZ, g2o::EdgeProjectXYZ2UV, g2o::EdgeProjectXYZ2UVU, g2o::EdgeSE3ProjectXYZOnlyPose, g2o::EdgeSBACam, g2o::EdgeSBAScale, g2o::EdgeSE3Expmap, g2o::EdgeSE2OdomDifferentialCalib, g2o::EdgeSE2SensorCalib, g2o::EdgeSim3, g2o::EdgeSim3ProjectXYZ, g2o::EdgeInverseSim3ProjectXYZ, g2o::EdgePointXY, g2o::EdgeSE2, g2o::EdgeSE2LotsOfXY, g2o::EdgeSE2Offset, g2o::EdgeSE2PointXY, g2o::EdgeSE2PointXYBearing, g2o::EdgeSE2PointXYCalib, g2o::EdgeSE2PointXYOffset, g2o::EdgeSE2Prior, g2o::EdgeSE2TwoPointsXY, g2o::EdgeSE2XYPrior, g2o::EdgeXYPrior, g2o::EdgeLine2D, g2o::EdgeLine2DPointXY, g2o::EdgeSE2Line2D, g2o::EdgeSE2Segment2D, g2o::EdgeSE2Segment2DLine, g2o::EdgeSE2Segment2DPointLine, g2o::EdgePointXYZ, g2o::EdgeSE3, g2o::EdgeSE3LotsOfXYZ, g2o::EdgeSE3Offset, g2o::EdgeSE3PointXYZ, g2o::EdgeSE3PointXYZDepth, g2o::EdgeSE3PointXYZDisparity, g2o::EdgeSE3Prior, g2o::EdgeSE3XYZPrior, g2o::EdgeXYZPrior, g2o::EdgePlane, g2o::EdgeSE3Calib, g2o::EdgeSE3Line3D, and g2o::EdgeSE3PlaneSensorCalib.

Referenced by g2o::StructureOnlySolver< PointDoF >::calc(), g2o::SparseOptimizer::computeActiveErrors(), gnudump_edges(), gnudump_features(), g2o::EdgeLabeler::labelEdge(), main(), InvChi2CostFunction::operator()(), g2o::SparseOptimizerOnline::optimize(), and g2o::SparseOptimizerIncremental::updateInitialization().

◆ constructQuadraticForm()

virtual void g2o::OptimizableGraph::Edge::constructQuadraticForm ( )
pure virtual

Linearizes the constraint in the edge. Makes side effect on the vertices of the graph by changing the parameter vector b and the hessian blocks ii and jj. The off diagoinal block is accessed via _hessian.

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

Referenced by g2o::BlockSolver< Traits >::buildSystem(), g2o::StructureOnlySolver< PointDoF >::calc(), g2o::SparseOptimizerOnline::optimize(), and g2o::SparseOptimizerIncremental::updateInitialization().

◆ createVertex()

virtual Vertex * g2o::OptimizableGraph::Edge::createVertex ( int  )
inlinevirtual

Definition at line 522 of file optimizable_graph.h.

522{ return nullptr; }

◆ dimension()

int g2o::OptimizableGraph::Edge::dimension ( ) const
inline

◆ errorData() [1/2]

virtual const double * g2o::OptimizableGraph::Edge::errorData ( ) const
pure virtual

◆ errorData() [2/2]

virtual double * g2o::OptimizableGraph::Edge::errorData ( )
pure virtual

◆ G2O_ATTRIBUTE_DEPRECATED() [1/2]

g2o::OptimizableGraph::Edge::G2O_ATTRIBUTE_DEPRECATED ( virtual Vertex createFrom())
inline

Definition at line 520 of file optimizable_graph.h.

520{ return nullptr; }

◆ G2O_ATTRIBUTE_DEPRECATED() [2/2]

g2o::OptimizableGraph::Edge::G2O_ATTRIBUTE_DEPRECATED ( virtual Vertex createTo())
inline

Definition at line 521 of file optimizable_graph.h.

521{ return nullptr; }

◆ getMeasurementData()

bool g2o::OptimizableGraph::Edge::getMeasurementData ( double *  m) const
virtual

◆ graph() [1/2]

OptimizableGraph * g2o::OptimizableGraph::Edge::graph ( )

Definition at line 110 of file optimizable_graph.cpp.

110 {
111 if (!_vertices.size()) return nullptr;
112 OptimizableGraph::Vertex* v = (OptimizableGraph::Vertex*)_vertices[0];
113 if (!v) return nullptr;
114 return v->graph();
115}
VertexContainer _vertices

References g2o::HyperGraph::_vertices, and g2o::OptimizableGraph::Vertex::graph().

Referenced by g2o::OptimizableGraph::addEdge().

◆ graph() [2/2]

const OptimizableGraph * g2o::OptimizableGraph::Edge::graph ( ) const

Definition at line 117 of file optimizable_graph.cpp.

117 {
118 if (!_vertices.size()) return nullptr;
119 const OptimizableGraph::Vertex* v =
120 (const OptimizableGraph::Vertex*)_vertices[0];
121 if (!v) return nullptr;
122 return v->graph();
123}

References g2o::HyperGraph::_vertices, and g2o::OptimizableGraph::Vertex::graph().

◆ informationData() [1/2]

virtual const double * g2o::OptimizableGraph::Edge::informationData ( ) const
pure virtual

◆ informationData() [2/2]

virtual double * g2o::OptimizableGraph::Edge::informationData ( )
pure virtual

◆ initialEstimate()

virtual void g2o::OptimizableGraph::Edge::initialEstimate ( const OptimizableGraph::VertexSet from,
OptimizableGraph::Vertex to 
)
pure virtual

◆ initialEstimatePossible()

virtual double g2o::OptimizableGraph::Edge::initialEstimatePossible ( const OptimizableGraph::VertexSet from,
OptimizableGraph::Vertex to 
)
inlinevirtual

◆ installParameter()

template<typename ParameterType >
bool g2o::OptimizableGraph::Edge::installParameter ( ParameterType *&  p,
size_t  argNo,
int  paramId = -1 
)
inlineprotected

◆ internalId()

long long g2o::OptimizableGraph::Edge::internalId ( ) const
inline

the internal ID of the edge

Definition at line 530 of file optimizable_graph.h.

530{ return _internalId; }

Referenced by g2o::OptimizableGraph::EdgeIDCompare::operator()().

◆ level()

int g2o::OptimizableGraph::Edge::level ( ) const
inline

returns the level of the edge

Definition at line 513 of file optimizable_graph.h.

513{ return _level; }

Referenced by g2o::BackBoneTreeAction::init(), main(), and g2o::EdgeTypesCostFunction::operator()().

◆ linearizeOplus()

virtual void g2o::OptimizableGraph::Edge::linearizeOplus ( JacobianWorkspace jacobianWorkspace)
pure virtual

Linearizes the constraint in the edge in the manifold space, and store the result in the given workspace

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

Referenced by g2o::BlockSolver< Traits >::buildSystem(), g2o::StructureOnlySolver< PointDoF >::calc(), g2o::SparseOptimizerOnline::optimize(), and g2o::SparseOptimizerIncremental::updateInitialization().

◆ mapHessianMemory()

virtual void g2o::OptimizableGraph::Edge::mapHessianMemory ( double *  d,
int  i,
int  j,
bool  rowMajor 
)
pure virtual

maps the internal matrix to some external memory location, you need to provide the memory before calling constructQuadraticForm

Parameters
dthe memory location to which we map
iindex of the vertex i
jindex of the vertex j (j > i, upper triangular fashion)
rowMajorif true, will write in rowMajor order to the block. Since EIGEN is columnMajor by default, this results in writing the transposed

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

Referenced by g2o::BlockSolver< Traits >::buildStructure(), g2o::SparseOptimizerIncremental::updateInitialization(), and g2o::BlockSolver< Traits >::updateStructure().

◆ measurementDimension()

int g2o::OptimizableGraph::Edge::measurementDimension ( ) const
virtual

◆ numParameters()

size_t g2o::OptimizableGraph::Edge::numParameters ( ) const
inline

Definition at line 539 of file optimizable_graph.h.

539{ return _parameters.size(); }

Referenced by g2o::EdgeCreator::createEdge(), and g2o::BaseEdge< D, E >::readParamIds().

◆ parameter()

const Parameter * g2o::OptimizableGraph::Edge::parameter ( int  argNo) const
inline

◆ read()

virtual bool g2o::OptimizableGraph::Edge::read ( std::istream &  is)
pure virtual

read the vertex from a stream, i.e., the internal state of the vertex

Implemented in EdgeCalib, GPSObservationPosition3DEdge, TargetOdometry3DEdge, GPSObservationEdgePositionVelocity3D, EdgeObservationBAL, EdgePointOnCircle, EdgePointOnCurve, g2o::EdgeSE2PureCalib, PolynomialSingleValueEdge, MultipleValueEdge, g2o::tutorial::EdgeSE2, g2o::tutorial::EdgeSE2PointXY, g2o::Edge_V_V_GICP, g2o::Edge_XYZ_VSC, g2o::EdgeProjectP2MC, g2o::EdgeProjectP2SC, g2o::EdgeProjectPSI2UV, g2o::EdgeStereoSE3ProjectXYZ, g2o::EdgeStereoSE3ProjectXYZOnlyPose, g2o::EdgeSE3ProjectXYZ, g2o::EdgeProjectXYZ2UV, g2o::EdgeProjectXYZ2UVU, g2o::EdgeSE3ProjectXYZOnlyPose, g2o::EdgeSBACam, g2o::EdgeSBAScale, g2o::EdgeSE3Expmap, g2o::EdgeSE2OdomDifferentialCalib, g2o::EdgeSE2SensorCalib, g2o::EdgeSim3, g2o::EdgeSim3ProjectXYZ, g2o::EdgeInverseSim3ProjectXYZ, g2o::EdgePointXY, g2o::EdgeSE2, g2o::EdgeSE2LotsOfXY, g2o::EdgeSE2Offset, g2o::EdgeSE2PointXY, g2o::EdgeSE2PointXYBearing, g2o::EdgeSE2PointXYCalib, g2o::EdgeSE2PointXYOffset, g2o::EdgeSE2Prior, g2o::EdgeSE2TwoPointsXY, g2o::EdgeSE2XYPrior, g2o::EdgeXYPrior, g2o::EdgeLine2D, g2o::EdgeLine2DPointXY, g2o::EdgeSE2Line2D, g2o::EdgeSE2Segment2D, g2o::EdgeSE2Segment2DLine, g2o::EdgeSE2Segment2DPointLine, g2o::EdgePointXYZ, g2o::EdgeSE3, g2o::EdgeSE3LotsOfXYZ, g2o::EdgeSE3Offset, g2o::EdgeSE3PointXYZ, g2o::EdgeSE3PointXYZDepth, g2o::EdgeSE3PointXYZDisparity, g2o::EdgeSE3Prior, g2o::EdgeSE3XYZPrior, g2o::EdgeXYZPrior, g2o::EdgePlane, g2o::EdgeSE3Calib, g2o::EdgeSE3Euler, g2o::EdgeSE3Line3D, and g2o::EdgeSE3PlaneSensorCalib.

◆ resizeParameters()

void g2o::OptimizableGraph::Edge::resizeParameters ( size_t  newSize)
inline

◆ resolveCache()

template<typename CacheType >
void g2o::OptimizableGraph::Edge::resolveCache ( CacheType *&  cache,
OptimizableGraph::Vertex v,
const std::string &  _type,
const ParameterVector parameters 
)
protected

Definition at line 125 of file cache.h.

128 {
129 cache = 0;
130 CacheContainer* container = v->cacheContainer();
131 Cache::CacheKey key(type_, parameters_);
132 Cache* c = container->findCache(key);
133 if (!c) {
134 c = container->createCache(key);
135 }
136 if (c) {
137 cache = dynamic_cast<CacheType*>(c);
138 }
139}

References g2o::OptimizableGraph::Vertex::cacheContainer(), g2o::CacheContainer::createCache(), and g2o::CacheContainer::findCache().

Referenced by g2o::tutorial::EdgeSE2PointXY::resolveCaches(), g2o::EdgeSE2Offset::resolveCaches(), g2o::EdgeSE2PointXYOffset::resolveCaches(), g2o::EdgeSE3Offset::resolveCaches(), g2o::EdgeSE3PointXYZ::resolveCaches(), g2o::EdgeSE3PointXYZDepth::resolveCaches(), g2o::EdgeSE3PointXYZDisparity::resolveCaches(), g2o::EdgeSE3Prior::resolveCaches(), g2o::EdgeSE3XYZPrior::resolveCaches(), and g2o::EdgeSE3Line3D::resolveCaches().

◆ resolveCaches()

bool g2o::OptimizableGraph::Edge::resolveCaches ( )
protectedvirtual

◆ resolveParameters()

bool g2o::OptimizableGraph::Edge::resolveParameters ( )
protected

Definition at line 133 of file optimizable_graph.cpp.

133 {
134 if (!graph()) {
135 G2O_ERROR("{}: edge not registered with a graph", __PRETTY_FUNCTION__);
136 return false;
137 }
138
139 assert(_parameters.size() == _parameterIds.size());
140 for (size_t i = 0; i < _parameters.size(); i++) {
141 int index = _parameterIds[i];
142 *_parameters[i] = graph()->parameter(index);
143 auto& aux = **_parameters[i];
144 if (typeid(aux).name() != _parameterTypes[i]) {
145 G2O_ERROR(
146 "{}: FATAL, parameter type mismatch - encountered {}; should be {}",
147 __PRETTY_FUNCTION__, typeid(aux).name(), _parameterTypes[i]);
148 }
149 if (!*_parameters[i]) {
150 G2O_ERROR("{}: FATAL, *_parameters[i] == 0", __PRETTY_FUNCTION__);
151 return false;
152 }
153 }
154 return true;
155}
#define G2O_ERROR(...)
Definition logger.h:89
#define __PRETTY_FUNCTION__
Definition macros.h:90
Parameter * parameter(int id)

References __PRETTY_FUNCTION__, g2o::OptimizableGraph::_parameters, and G2O_ERROR.

Referenced by g2o::OptimizableGraph::addEdge(), and g2o::OptimizableGraph::setEdgeVertex().

◆ robustKernel()

RobustKernel * g2o::OptimizableGraph::Edge::robustKernel ( ) const
inline

◆ setLevel()

void g2o::OptimizableGraph::Edge::setLevel ( int  l)
inline

sets the level of the edge

Definition at line 515 of file optimizable_graph.h.

515{ _level = l; }

Referenced by g2o::assignHierarchicalEdges(), and g2o::computeSimpleStars().

◆ setMeasurementData()

bool g2o::OptimizableGraph::Edge::setMeasurementData ( const double *  m)
virtual

◆ setMeasurementFromState()

bool g2o::OptimizableGraph::Edge::setMeasurementFromState ( )
virtual

◆ setParameterId()

bool g2o::OptimizableGraph::Edge::setParameterId ( int  argNum,
int  paramId 
)

Definition at line 125 of file optimizable_graph.cpp.

125 {
126 if ((int)_parameters.size() <= argNum) return false;
127 if (argNum < 0) return false;
128 *_parameters[argNum] = 0;
129 _parameterIds[argNum] = paramId;
130 return true;
131}

References g2o::OptimizableGraph::_parameters.

Referenced by g2o::EdgeCreator::createEdge(), main(), main(), main(), Robot::move(), g2o::tutorial::EdgeSE2PointXY::read(), g2o::EdgeSE2Offset::read(), g2o::EdgeSE2PointXYOffset::read(), g2o::BaseEdge< D, E >::readParamIds(), and LineSensor::sense().

◆ setRobustKernel()

void g2o::OptimizableGraph::Edge::setRobustKernel ( RobustKernel ptr)

specify the robust kernel to be used in this edge

Definition at line 157 of file optimizable_graph.cpp.

157 {
159
160 _robustKernel = ptr;
161}

References g2o::release().

Referenced by main(), and MainWindow::setRobustKernel().

◆ write()

virtual bool g2o::OptimizableGraph::Edge::write ( std::ostream &  os) const
pure virtual

write the vertex to a stream

Implemented in EdgeCalib, GPSObservationPosition3DEdge, TargetOdometry3DEdge, GPSObservationEdgePositionVelocity3D, EdgeObservationBAL, EdgePointOnCircle, EdgePointOnCurve, g2o::EdgeSE2PureCalib, PolynomialSingleValueEdge, MultipleValueEdge, g2o::tutorial::EdgeSE2, g2o::tutorial::EdgeSE2PointXY, g2o::Edge_V_V_GICP, g2o::Edge_XYZ_VSC, g2o::EdgeProjectP2MC, g2o::EdgeProjectP2SC, g2o::EdgeProjectPSI2UV, g2o::EdgeStereoSE3ProjectXYZ, g2o::EdgeStereoSE3ProjectXYZOnlyPose, g2o::EdgeSE3ProjectXYZ, g2o::EdgeProjectXYZ2UV, g2o::EdgeProjectXYZ2UVU, g2o::EdgeSE3ProjectXYZOnlyPose, g2o::EdgeSBACam, g2o::EdgeSBAScale, g2o::EdgeSE3Expmap, g2o::EdgeSE2OdomDifferentialCalib, g2o::EdgeSE2SensorCalib, g2o::EdgeSim3, g2o::EdgeSim3ProjectXYZ, g2o::EdgeInverseSim3ProjectXYZ, g2o::EdgePointXY, g2o::EdgeSE2, g2o::EdgeSE2LotsOfXY, g2o::EdgeSE2Offset, g2o::EdgeSE2PointXY, g2o::EdgeSE2PointXYBearing, g2o::EdgeSE2PointXYCalib, g2o::EdgeSE2PointXYOffset, g2o::EdgeSE2Prior, g2o::EdgeSE2TwoPointsXY, g2o::EdgeSE2XYPrior, g2o::EdgeXYPrior, g2o::EdgeLine2D, g2o::EdgeLine2DPointXY, g2o::EdgeSE2Line2D, g2o::EdgeSE2Segment2D, g2o::EdgeSE2Segment2DLine, g2o::EdgeSE2Segment2DPointLine, g2o::EdgePointXYZ, g2o::EdgeSE3, g2o::EdgeSE3LotsOfXYZ, g2o::EdgeSE3Offset, g2o::EdgeSE3PointXYZ, g2o::EdgeSE3PointXYZDepth, g2o::EdgeSE3PointXYZDisparity, g2o::EdgeSE3Prior, g2o::EdgeSE3XYZPrior, g2o::EdgeXYZPrior, g2o::EdgePlane, g2o::EdgeSE3Calib, g2o::EdgeSE3Euler, g2o::EdgeSE3Line3D, and g2o::EdgeSE3PlaneSensorCalib.

Referenced by g2o::OptimizableGraph::saveEdge().

Friends And Related Symbol Documentation

◆ OptimizableGraph

friend struct OptimizableGraph
friend

Definition at line 419 of file optimizable_graph.h.

Member Data Documentation

◆ _cacheIds

std::vector<int> g2o::OptimizableGraph::Edge::_cacheIds
protected

Definition at line 551 of file optimizable_graph.h.

◆ _dimension

int g2o::OptimizableGraph::Edge::_dimension
protected

◆ _internalId

long long g2o::OptimizableGraph::Edge::_internalId
protected

Definition at line 550 of file optimizable_graph.h.

Referenced by g2o::OptimizableGraph::addEdge().

◆ _level

int g2o::OptimizableGraph::Edge::_level
protected

Definition at line 548 of file optimizable_graph.h.

◆ _parameterIds

std::vector<int> g2o::OptimizableGraph::Edge::_parameterIds
protected

Definition at line 572 of file optimizable_graph.h.

Referenced by g2o::BaseEdge< D, E >::writeParamIds().

◆ _parameters

std::vector<Parameter**> g2o::OptimizableGraph::Edge::_parameters
protected

Definition at line 571 of file optimizable_graph.h.

◆ _parameterTypes

std::vector<std::string> g2o::OptimizableGraph::Edge::_parameterTypes
protected

Definition at line 570 of file optimizable_graph.h.

◆ _robustKernel

RobustKernel* g2o::OptimizableGraph::Edge::_robustKernel
protected

Definition at line 549 of file optimizable_graph.h.


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