posegraph3.hh
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * This source code is part of the Tree-based Network Optimizer (TORO)
4  *
5  * TORO Copyright (c) 2007 Giorgio Grisetti, Cyrill Stachniss,
6  * Slawomir Grzonka and Wolfram Burgard
7  *
8  * TORO is licences under the Common Creative License,
9  * Attribution-NonCommercial-ShareAlike 3.0
10  *
11  * You are free:
12  * - to Share - to copy, distribute and transmit the work
13  * - to Remix - to adapt the work
14  *
15  * Under the following conditions:
16  *
17  * - Attribution. You must attribute the work in the manner specified
18  * by the author or licensor (but not in any way that suggests that
19  * they endorse you or your use of the work).
20  *
21  * - Noncommercial. You may not use this work for commercial purposes.
22  *
23  * - Share Alike. If you alter, transform, or build upon this work,
24  * you may distribute the resulting work only under the same or
25  * similar license to this one.
26  *
27  * Any of the above conditions can be waived if you get permission
28  * from the copyright holder. Nothing in this license impairs or
29  * restricts the author's moral rights.
30  *
31  * TORO is distributed in the hope that it will be useful,
32  * but WITHOUT ANY WARRANTY; without even the implied
33  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
34  * PURPOSE.
35  **********************************************************************/
36 
43 #ifndef _POSEGRAPH3_HH_
44 #define _POSEGRAPH3_HH_
45 
46 #include "posegraph.hh"
47 #include "transformation3.hh"
48 #include <iostream>
49 #include <vector>
50 
51 typedef unsigned int uint;
52 #ifndef M_PI
53  #define M_PI 3.14159265359
54 #endif
55 
56 namespace AISNavigation {
57 
58 
61 struct TreePoseGraph3: public TreePoseGraph<Operations3D<double> >{
63 
70 
71 
76  bool load( const char* filename, bool overrideCovariances=false, bool twoDimensions=false);
77 
79  bool loadEquivalences( const char* filename);
80 
82  bool save( const char* filename);
83 
85  bool saveGnuplot( const char* filename);
86 
88  void printDepth( std::ostream& os );
89 
91  void printWidth( std::ostream& os );
92 
94  void printEdgesStat( std::ostream& os);
95 
97  void initializeOnTree();
98 
101 
102  virtual void initializeFromParentEdge(Vertex* v);
103 
105  virtual void revertEdgeInfo(Edge* e);
106 
110  virtual void collapseEdge(Edge* e);
111 
114 
115 protected:
116 
119  inline void perform(TreePoseGraph3::Vertex* v){
120  if (!v->parent){
121  v->parameters=TreePoseGraph3::Transformation(0.,0.,0.,0.,0.,0.);
122  return;
123  }
124  v->parameters=v->parent->transformation.inv()*v->transformation;
125  }
126  };
127 
130  inline void perform(TreePoseGraph3::Vertex* v){
131  if (!v->parent){
132  return;
133  }
134  v->transformation=v->parent->transformation*v->parameters;
135  }
136  };
137 
138 };
139 
140 
141 }; //namespace AISNavigation
142 #endif
143 
144 
145 
A class (struct) to compute the parameterization of the vertex v.
Definition: posegraph3.hh:129
Ops::InformationType InformationMatrix
Definition: posegraph3.hh:69
void printDepth(std::ostream &os)
Definition: posegraph3.cpp:248
void perform(TreePoseGraph3::Vertex *v)
Definition: posegraph3.hh:119
GLM_FUNC_DECL genType e()
Ops::TranslationType Translation
Definition: posegraph3.hh:66
The class (struct) that contains 2D graph related functions such as loading, saving, merging, etc.
Definition: posegraph3.hh:61
unsigned int uint
Definition: posegraph3.hh:51
Ops::RotationType Rotation
Definition: posegraph3.hh:65
bool save(const char *filename)
Definition: posegraph3.cpp:207
bool loadEquivalences(const char *filename)
Definition: posegraph3.cpp:151
virtual void initializeFromParentEdge(Vertex *v)
Definition: posegraph3.cpp:297
bool saveGnuplot(const char *filename)
Definition: posegraph3.cpp:184
Operations3D< double > Ops
Definition: posegraph3.hh:62
Ops::CovarianceType CovarianceMatrix
Definition: posegraph3.hh:68
virtual void revertEdgeInfo(Edge *e)
Definition: posegraph3.cpp:291
The template class for representing an abstract tree without specifing the dimensionality of the exac...
Definition: posegraph.hh:91
virtual void collapseEdge(Edge *e)
Definition: posegraph3.cpp:305
A class (struct) to compute the parameterization of the vertex v.
Definition: posegraph3.hh:118
void printWidth(std::ostream &os)
Definition: posegraph3.cpp:253
The template class for the node parameters. The graph of poses with support to tree construction func...
Ops::TransformationType Transformation
Definition: posegraph3.hh:67
void printEdgesStat(std::ostream &os)
Definition: posegraph3.cpp:281
bool load(const char *filename, bool overrideCovariances=false, bool twoDimensions=false)
Definition: posegraph3.cpp:57


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:41:32