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]; }
46 Eigen::Map<const Vector2> p(&_measurement[0]);
50 void setTheta(
double t) { _measurement[2] = t; }
52 Eigen::Map<Vector2> p(&_measurement[0]);
67 Vector2 normal(dP.y(), -dP.x());
70 prediction[2] = std::atan2(normal.y(), normal.x());
71 Eigen::Map<Vector2> pt(&prediction[0]);
72 pt = (_pointNum == 0) ? predP1 : predP2;
73 _error = prediction - _measurement;
78 Eigen::Map<const Vector3> data(d);
84 Eigen::Map<Vector3> data(d);
99 Vector2 normal(dP.y(), -dP.x());
102 prediction[2] = std::atan2(normal.y(), normal.x());
103 Eigen::Map<Vector2> pt(&prediction[0]);
104 pt = (_pointNum == 0) ? predP1 : predP2;
105 setMeasurement(prediction);
109 virtual bool read(std::istream& is);
110 virtual bool write(std::ostream& os)
const;
const EstimateType & estimate() const
return the current estimate of the vertex
virtual bool setMeasurementFromState()
virtual bool getMeasurementData(double *d) const
void setPoint(const Vector2 &p_)
virtual int measurementDimension() const
virtual bool setMeasurementData(const double *d)
SE2 inverse() const
invert :-)
2D pose Vertex, (x,y,theta)
Vector2 estimateP1() const
Vector2 estimateP2() const
#define G2O_TYPES_SLAM2D_ADDONS_API
double normalize_theta(double theta)