31 #ifdef G2O_HAVE_OPENGL 34 #include "EXTERNAL/freeglut/freeglut_minimal.h" 39 #include <Eigen/Eigenvalues> 57 Eigen::SelfAdjointEigenSolver<Matrix2F> eigenSolver(
_covariance.block<2,2>(0,0));
58 _UMatrix = eigenSolver.eigenvectors();
65 float cxx, cxy, cxt, cyy, cyt, ctt;
66 is >> cxx >> cxy >> cxt >> cyy >> cyt >> ctt;
81 for (
int i =0; i<size; i++){
105 #ifdef G2O_HAVE_OPENGL 113 if (_previousParams){
114 _scaleFactor = _previousParams->makeProperty<
DoubleProperty>(_typeName +
"::", 1);
123 if (
typeid(*element).name()!=_typeName)
126 refreshPropertyPtrs(params_);
127 if (! _previousParams){
130 if (_show && !_show->value())
137 float sigmaTheta = sqrt(that->
covariance()(2,2));
138 float x = 0.1f*cosf(sigmaTheta);
139 float y = 0.1f*sinf(sigmaTheta);
141 glColor3f(1.f,0.7f,1.f);
142 glBegin(GL_LINE_STRIP);
148 glColor3f(0.f,1.f,0.f);
157 float angle = atan2(rot(1,0), rot(0,0));
158 glRotatef(angle*180.0/
M_PI, 0., 0., 1.);
160 glScalef(sqrt(sv(0)), sqrt(sv(1)), 1);
162 glColor3f(1.f,0.7f,1.f);
163 glBegin(GL_LINE_LOOP);
164 for(
int i=0; i<36; i++){
165 float rad = i*
M_PI/18.0;
Abstract action that operates on a graph entity.
const Vector2F & singularValues()
myVector2fVector _matchingVertices
const myVector2fVector & matchingVertices()
const Matrix3F & covariance()
Eigen::Matrix< float, 2, 2, Eigen::ColMajor > Matrix2F
virtual bool read(std::istream &is)
read the data from a stream
virtual bool refreshPropertyPtrs(HyperGraphElementAction::Parameters *params_)
string ellipse to be attached to a vertex
void addMatchingVertex(float x, float y)
Eigen::Matrix< float, 2, 1, Eigen::ColMajor > Vector2F
virtual bool write(std::ostream &os) const
write the data to a stream
data recorded by the robot