1 #ifndef G2O_TARGET_TYPES_6D_HPP_ 2 #define G2O_TARGET_TYPES_6D_HPP_ 20 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
31 _estimate[0] += update[0];
32 _estimate[1] += update[1];
33 _estimate[2] += update[2];
36 virtual bool read(std::istream& )
41 virtual bool write(std::ostream& )
const 55 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
66 for (
int k = 0; k < 6; k++)
67 _estimate[k] += update[k];
71 virtual bool read(std::istream& )
76 virtual bool write(std::ostream& )
const 91 double q = noiseSigma * noiseSigma;
97 Q(0, 0) = Q(1,1) = Q(2,2) = dt2*dt2*q/4 + 1e-4;
98 Q(0, 3) = Q(1, 4) = Q(2, 5) = dt*dt2*q/2;
99 Q(3, 3) = Q(4,4) = Q(5,5) = dt2 * q + 1e-4;
100 Q(3, 0) = Q(4, 1) = Q(5, 2) = dt*dt2*q/2;
102 setInformation(Q.inverse());
107 assert(from.size() == 1);
113 for (
int m = 0; m < 3; m++)
115 vjEst[m] += _dt * (vjEst[m+3] + 0.5 * _dt * _measurement[m]);
118 for (
int m = 0; m < 3; m++)
120 vjEst[m+3] += _dt * _measurement[m];
129 return (to->
id() - vi->
id() == 1) ? 1.0 : -1.0;
138 for (
int k = 0; k < 3; k++)
142 for (
int k = 3; k < 6; k++)
148 virtual bool read(std::istream& )
153 virtual bool write(std::ostream& )
const 168 setMeasurement(measurement);
169 setInformation(Eigen::Matrix3d::Identity() / (noiseSigma*noiseSigma));
175 for (
int k = 0; k < 3; k++)
177 _error[k] = v->
estimate()[k] - _measurement[k];
181 virtual bool read(std::istream& )
186 virtual bool write(std::ostream& )
const 193 #endif // __TARGET_TYPES_6D_HPP__ int id() const
returns the id
virtual void oplusImpl(const double *update)
virtual void setToOriginImpl()
sets the node to the origin (used in the multilevel stuff)
Eigen::Matrix< double, 6, 6, Eigen::ColMajor > Matrix6d
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VertexPosition3D()
std::set< Vertex * > VertexSet
virtual void oplusImpl(const double *update)
virtual bool write(std::ostream &) const
write the vertex to a stream
TargetOdometry3DEdge(double dt, double noiseSigma)
virtual bool read(std::istream &)
read the vertex from a stream, i.e., the internal state of the vertex
virtual void setToOriginImpl()
sets the node to the origin (used in the multilevel stuff)
Eigen::Matrix< double, 6, 6 > Matrix6d
virtual bool write(std::ostream &) const
write the vertex to a stream
virtual bool read(std::istream &)
read the vertex from a stream, i.e., the internal state of the vertex
virtual bool write(std::ostream &) const
write the vertex to a stream
virtual double initialEstimatePossible(const g2o::OptimizableGraph::VertexSet &from, g2o::OptimizableGraph::Vertex *to)
void setEstimate(const EstimateType &et)
set the estimate for the vertex also calls updateCache()
virtual void initialEstimate(const g2o::OptimizableGraph::VertexSet &from, g2o::OptimizableGraph::Vertex *to)
A general case Vertex for optimization.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VertexPositionVelocity3D()
GPSObservationEdgePositionVelocity3D(const Eigen::Vector3d &measurement, double noiseSigma)
const EstimateType & estimate() const
return the current estimate of the vertex
Eigen::Matrix< double, 6, 1 > Vector6d
virtual bool read(std::istream &)
read the vertex from a stream, i.e., the internal state of the vertex
virtual bool write(std::ostream &) const
write the vertex to a stream
virtual bool read(std::istream &)
read the vertex from a stream, i.e., the internal state of the vertex
Matrix< double, 6, 1, Eigen::ColMajor > Vector6d