34 #include <Eigen/Geometry> 48 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
50 virtual bool read(std::istream& is);
51 virtual bool write(std::ostream& os)
const;
54 _estimate << 1., 1., 0.5, 0.5, 0.1;
59 _estimate.head<4>() +=
Vector4D(update);
77 virtual bool read(std::istream& is);
78 virtual bool write(std::ostream& os)
const;
86 _estimate.setTransform();
87 _estimate.setProjection();
93 Eigen::Map<const Vector6d> v(update);
95 _estimate.setTransform();
96 _estimate.setProjection();
102 Eigen::Map <const Vector7d> v(est);
103 _estimate.fromVector(v);
108 Eigen::Map <Vector7d> v(est);
109 v = estimate().toVector();
118 Eigen::Map<const Vector6d> v(est);
119 _estimate.fromMinimalVector(v);
124 Eigen::Map<Vector6d> v(est);
125 v = _estimate.toMinimalVector();
140 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
142 virtual bool read(std::istream& is);
143 virtual bool write(std::ostream& os)
const;
151 Eigen::Map<const Vector3D> v(update);
162 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
164 virtual bool read(std::istream& is);
165 virtual bool write(std::ostream& os)
const;
176 Vector4D ppt(pt(0),pt(1),pt(2),1.0);
179 perr = p.head<2>()/p(2);
188 _error = perr - _measurement;
193 virtual void linearizeOplus();
201 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
203 virtual bool read(std::istream& is);
204 virtual bool write(std::ostream& os)
const;
228 double invp1 = 1.0/p1(2);
229 kp.head<2>() = p1.head<2>()*invp1;
232 p2 = nd.
Kcam*(p2-pb);
244 _error = kp - _measurement;
248 virtual void linearizeOplus();
257 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
259 virtual bool read(std::istream& is);
260 virtual bool write(std::ostream& os)
const;
270 Vector4D ppt(pt(0),pt(1),pt(2),1.0);
273 _error = perr - _measurement;
277 virtual void linearizeOplus();
290 virtual bool read(std::istream& is);
291 virtual bool write(std::ostream& os)
const;
307 _inverseMeasurement=meas.
inverse();
314 Eigen::Map<const Vector7d> v(d);
315 _measurement.fromVector(v);
316 _inverseMeasurement = _measurement.inverse();
321 Eigen::Map<Vector7d> v(d);
322 v = _measurement.toVector();
328 virtual bool setMeasurementFromState();
341 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
343 virtual bool read(std::istream& is);
344 virtual bool write(std::ostream& os)
const;
350 _error[0] = _measurement - dt.norm();
virtual int minimalEstimateDimension() const
Eigen::Matrix< double, 2, 1, Eigen::ColMajor > Vector2D
#define G2O_TYPES_SBA_API
edge between two SBAcam that specifies the distance between them
virtual bool setMeasurementData(const double *d)
Eigen::Matrix< double, 3, 1, Eigen::ColMajor > Vector3D
virtual bool setMinimalEstimateDataImpl(const double *est)
Eigen::Matrix< double, 4, 1, Eigen::ColMajor > Vector4D
virtual bool getMeasurementData(double *d) const
std::set< Vertex * > VertexSet
virtual int measurementDimension() const
virtual void oplusImpl(const double *update)
virtual void setEstimate(const SBACam &cam)
virtual void setToOriginImpl()
sets the node to the origin (used in the multilevel stuff)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
SBACam Vertex, (x,y,z,qw,qx,qy,qz) the parameterization for the increments constructed is a 6d vector...
3D edge between two SBAcam
virtual bool getMinimalEstimateData(double *est) const
Eigen::Matrix< double, 3, 4 > w2i
SE3Quat _inverseMeasurement
base class to represent an edge connecting an arbitrary number of nodes
virtual double initialEstimatePossible(const OptimizableGraph::VertexSet &, OptimizableGraph::Vertex *)
const Eigen::Quaterniond & rotation() const
virtual bool setEstimateDataImpl(const double *est)
void setEstimate(const EstimateType &et)
set the estimate for the vertex also calls updateCache()
A general case Vertex for optimization.
virtual bool getEstimateData(double *est) const
virtual void setToOriginImpl()
sets the node to the origin (used in the multilevel stuff)
const EstimateType & estimate() const
return the current estimate of the vertex
virtual void setMeasurement(const double &m)
virtual void setToOriginImpl()
sets the node to the origin (used in the multilevel stuff)
virtual double initialEstimatePossible(const OptimizableGraph::VertexSet &, OptimizableGraph::Vertex *)
virtual void oplusImpl(const double *update)
Eigen::Matrix< double, 3, 4 > w2n
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
virtual int estimateDimension() const
virtual void oplusImpl(const double *update)
Vertex encoding the intrinsics of the camera fx, fy, cx, xy, baseline;.
virtual void setMeasurement(const SE3Quat &meas)
const Vector3D & translation() const