g2o
edge_se3.h
Go to the documentation of this file.
1 #ifndef G2O_EDGE_SE3_H_
2 #define G2O_EDGE_SE3_H_
3 
5 
6 #include "g2o_types_slam3d_api.h"
7 #include "vertex_se3.h"
8 
9 namespace g2o {
10 
18  class G2O_TYPES_SLAM3D_API EdgeSE3 : public BaseBinaryEdge<6, Isometry3D, VertexSE3, VertexSE3> {
19  public:
21  EdgeSE3();
22  virtual bool read(std::istream& is);
23  virtual bool write(std::ostream& os) const;
24 
25  void computeError();
26 
27  virtual void setMeasurement(const Isometry3D& m){
28  _measurement = m;
29  _inverseMeasurement = m.inverse();
30  }
31 
32  virtual bool setMeasurementData(const double* d){
33  Eigen::Map<const Vector7d> v(d);
34  setMeasurement(internal::fromVectorQT(v));
35  return true;
36  }
37 
38  virtual bool getMeasurementData(double* d) const{
39  Eigen::Map<Vector7d> v(d);
40  v = internal::toVectorQT(_measurement);
41  return true;
42  }
43 
44  void linearizeOplus();
45 
46  virtual int measurementDimension() const {return 7;}
47 
48  virtual bool setMeasurementFromState() ;
49 
50  virtual double initialEstimatePossible(const OptimizableGraph::VertexSet& /*from*/,
51  OptimizableGraph::Vertex* /*to*/) {
52  return 1.;
53  }
54 
55  virtual void initialEstimate(const OptimizableGraph::VertexSet& from, OptimizableGraph::Vertex* to);
56 
57  protected:
59  };
60 
65  public:
67  virtual HyperGraphElementAction* operator()(HyperGraph::HyperGraphElement* element,
69  };
70 
71 #ifdef G2O_HAVE_OPENGL
72 
75  class G2O_TYPES_SLAM3D_API EdgeSE3DrawAction: public DrawAction{
76  public:
77  EdgeSE3DrawAction();
78  virtual HyperGraphElementAction* operator()(HyperGraph::HyperGraphElement* element,
80  };
81 #endif
82 
83 } // end namespace
84 #endif
Isometry3D fromVectorQT(const Vector7d &v)
virtual double initialEstimatePossible(const OptimizableGraph::VertexSet &, OptimizableGraph::Vertex *)
Definition: edge_se3.h:50
Abstract action that operates on a graph entity.
std::set< Vertex * > VertexSet
Definition: hyper_graph.h:136
virtual bool getMeasurementData(double *d) const
Definition: edge_se3.h:38
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Definition: edge_se3.h:20
Edge between two 3D pose vertices.
Definition: edge_se3.h:18
virtual void setMeasurement(const Isometry3D &m)
Definition: edge_se3.h:27
#define G2O_TYPES_SLAM3D_API
Eigen::Transform< double, 3, Eigen::Isometry, Eigen::ColMajor > Isometry3D
Definition: eigen_types.h:66
A general case Vertex for optimization.
Output the pose-pose constraint to Gnuplot data file.
Definition: edge_se3.h:64
Isometry3D _inverseMeasurement
Definition: edge_se3.h:58
virtual int measurementDimension() const
Definition: edge_se3.h:46
Vector7d toVectorQT(const Isometry3D &t)
virtual bool setMeasurementData(const double *d)
Definition: edge_se3.h:32