27 #ifndef G2O_EDGE_SE2_SEGMENT2D_POINTLINE_H 28 #define G2O_EDGE_SE2_SEGMENT2D_POINTLINE_H 30 #include "g2o/config.h" 41 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
44 double theta()
const {
return _measurement[2];}
45 Vector2D point()
const {Eigen::Map<const Vector2D> p(&_measurement[0]);
return p;}
61 Vector2D normal(dP.y(), -dP.x()); normal.normalize();
63 prediction [2] = atan2(normal.y(), normal.x());
64 Eigen::Map<Vector2D> pt(&prediction[0]);
65 pt = (_pointNum==0) ? predP1 : predP2;
66 _error=prediction-_measurement;
71 Eigen::Map<const Vector3D> data(d);
77 Eigen::Map<Vector3D> data(d);
91 Vector2D normal(dP.y(), -dP.x()); normal.normalize();
93 prediction [2] = atan2(normal.y(), normal.x());
94 Eigen::Map<Vector2D> pt(&prediction[0]);
95 pt = (_pointNum==0)?predP1:predP2;
96 setMeasurement(prediction);
100 virtual bool read(std::istream& is);
101 virtual bool write(std::ostream& os)
const;
Eigen::Matrix< double, 2, 1, Eigen::ColMajor > Vector2D
virtual int measurementDimension() const
Eigen::Matrix< double, 3, 1, Eigen::ColMajor > Vector3D
2D pose Vertex, (x,y,theta)
virtual bool setMeasurementFromState()
virtual bool getMeasurementData(double *d) const
double normalize_theta(double theta)
#define G2O_TYPES_SLAM2D_ADDONS_API
Vector2D estimateP1() const
const EstimateType & estimate() const
return the current estimate of the vertex
Vector2D estimateP2() const
SE2 inverse() const
invert :-)
void setPoint(const Vector2D &p_)
virtual bool setMeasurementData(const double *d)