1#ifndef G2O_TARGET_TYPES_6D_HPP_
2#define G2O_TARGET_TYPES_6D_HPP_
21 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
32 virtual bool read(std::istream& ) {
return false; }
34 virtual bool write(std::ostream& )
const {
return false; }
41 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
47 for (
int k = 0; k < 6; k++)
_estimate[k] += update[k];
50 virtual bool read(std::istream& ) {
return false; }
52 virtual bool write(std::ostream& )
const {
return false; }
58 VertexPositionVelocity3D> {
63 double q = noiseSigma * noiseSigma;
70 Q(0, 0) = Q(1, 1) = Q(2, 2) = dt2 * dt2 * q / 4 + 1e-4;
71 Q(0, 3) = Q(1, 4) = Q(2, 5) = dt * dt2 * q / 2;
72 Q(3, 3) = Q(4, 4) = Q(5, 5) = dt2 * q + 1e-4;
73 Q(3, 0) = Q(4, 1) = Q(5, 2) = dt * dt2 * q / 2;
82 assert(from.size() == 1);
89 for (
int m = 0; m < 3; m++) {
93 for (
int m = 0; m < 3; m++) {
107 return (to->
id() - vi->
id() == 1) ? 1.0 : -1.0;
116 for (
int k = 0; k < 3; k++) {
121 for (
int k = 3; k < 6; k++) {
127 virtual bool read(std::istream& ) {
return false; }
129 virtual bool write(std::ostream& )
const {
return false; }
142 setInformation(Eigen::Matrix3d::Identity() / (noiseSigma * noiseSigma));
148 for (
int k = 0; k < 3; k++) {
153 virtual bool read(std::istream& ) {
return false; }
155 virtual bool write(std::ostream& )
const {
return false; }
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
GPSObservationEdgePositionVelocity3D(const Eigen::Vector3d &measurement, double noiseSigma)
TargetOdometry3DEdge(double dt, double noiseSigma)
virtual double initialEstimatePossible(const g2o::OptimizableGraph::VertexSet &from, g2o::OptimizableGraph::Vertex *to)
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 void initialEstimate(const g2o::OptimizableGraph::VertexSet &from, g2o::OptimizableGraph::Vertex *to)
virtual void oplusImpl(const double *update)
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)
virtual bool write(std::ostream &) const
write the vertex to a stream
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VertexPosition3D()
virtual void setToOriginImpl()
sets the node to the origin (used in the multilevel stuff)
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
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VertexPositionVelocity3D()
virtual void oplusImpl(const double *update)
EIGEN_STRONG_INLINE const Measurement & measurement() const
accessor functions for the measurement represented by the edge
virtual void setMeasurement(const Measurement &m)
void setInformation(const InformationType &information)
Measurement _measurement
the measurement of the edge
const EstimateType & estimate() const
return the current estimate of the vertex
void setEstimate(const EstimateType &et)
set the estimate for the vertex also calls updateCache()
VertexContainer _vertices
int id() const
returns the id
std::set< Vertex * > VertexSet
A general case Vertex for optimization.
Eigen::Matrix< double, 6, 1 > Vector6d
Eigen::Matrix< double, 6, 6 > Matrix6d