29 #ifdef G2O_HAVE_OPENGL 44 is >> p[0] >> p[1] >> p[2];
47 for (
int i = 0; i < 3; ++i)
48 for (
int j = i; j < 3; ++j) {
59 os << p.x() <<
" " << p.y() <<
" " << p.z();
60 for (
int i = 0; i < 3; ++i)
61 for (
int j = i; j < 3; ++j)
70 if (from.count(fromEdge) > 0)
76 #ifndef NUMERIC_JACOBIAN_TWO_D_TYPES 84 double si=sin(thetai), ci=cos(thetai);
96 z.block<2, 2>(0, 0) = rmean.
rotation().toRotationMatrix();
121 *(params->
os) << std::endl;
125 #ifdef G2O_HAVE_OPENGL 131 if (_previousParams){
133 _triangleY = _previousParams->makeProperty<
FloatProperty>(_typeName +
"::GHOST_TRIANGLE_Y", .05f);
146 refreshPropertyPtrs(params_);
147 if (! _previousParams)
150 if (_show && !_show->value())
160 glPushAttrib(GL_ENABLE_BIT | GL_LIGHTING | GL_COLOR);
161 glDisable(GL_LIGHTING);
169 glRotatef((
float)
RAD2DEG(fromTransform.
rotation().angle()),0.f,0.f,1.f);
170 opengl::drawArrow2D((
float)_triangleX->value(), (float)_triangleY->value(), (float)_triangleX->value()*.3f);
180 opengl::drawArrow2D((
float)_triangleX->value(), (float)_triangleY->value(), (float)_triangleX->value()*.3f);
Eigen::Matrix< double, 2, 1, Eigen::ColMajor > Vector2D
const Vertex * vertex(size_t i) const
#define __PRETTY_FUNCTION__
virtual void setMeasurement(const SE2 &m)
Vector3D toVector() const
convert to a 3D vector (x, y, theta)
Eigen::Matrix< double, 3, 1, Eigen::ColMajor > Vector3D
2D edge between two Vertex2
Abstract action that operates on a graph entity.
std::set< Vertex * > VertexSet
2D pose Vertex, (x,y,theta)
const std::string & name() const
returns the name of an action, e.g "draw"
JacobianXiOplusType _jacobianOplusXi
void drawArrow2D(float len, float head_width, float head_len)
virtual void initialEstimate(const OptimizableGraph::VertexSet &from, OptimizableGraph::Vertex *to)
const Eigen::Rotation2Dd & rotation() const
rotational component
virtual HyperGraphElementAction * operator()(HyperGraph::HyperGraphElement *element, HyperGraphElementAction::Parameters *params_)
redefine this to do the action stuff. If successful, the action returns a pointer to itself ...
EIGEN_MAKE_ALIGNED_OPERATOR_NEW EdgeSE2()
Eigen::Matrix< double, 3, 3, Eigen::ColMajor > Matrix3D
#define POSE_EDGE_GHOST_COLOR
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
void setEstimate(const EstimateType &et)
set the estimate for the vertex also calls updateCache()
A general case Vertex for optimization.
EIGEN_STRONG_INLINE const InformationType & information() const
information matrix of the constraint
virtual bool write(std::ostream &os) const
write the vertex to a stream
const EstimateType & estimate() const
return the current estimate of the vertex
virtual bool refreshPropertyPtrs(HyperGraphElementAction::Parameters *params_)
SE2 inverse() const
invert :-)
JacobianXjOplusType _jacobianOplusXj
const Vector2D & translation() const
translational component
EdgeSE2WriteGnuplotAction()
EIGEN_STRONG_INLINE const Measurement & measurement() const
accessor functions for the measurement represented by the edge
virtual void linearizeOplus()
VertexContainer _vertices