gfsreader.h
Go to the documentation of this file.
1 #ifndef GFSREADER_H
2 #define GFSREADER_H
3 
4 #include <iostream>
5 #include <fstream>
6 #include <sstream>
7 #include <vector>
8 #include <list>
9 #include <gmapping/utils/point.h>
10 
11 #define MAX_LINE_LENGHT (1000000)
12 
13 namespace GMapping{
14 
15 namespace GFSReader{
16 
17 using namespace std;
18 
19 struct Record{
20  unsigned int dim;
21  double time;
22  virtual ~Record();
23  virtual void read(istream& is)=0;
24  virtual void write(ostream& os);
25 };
26 
27 struct CommentRecord: public Record{
28  string text;
29  virtual void read(istream& is);
30  virtual void write(ostream& os);
31 };
32 
33 struct PoseRecord: public Record{
34  PoseRecord(bool ideal=false);
35  void read(istream& is);
36  virtual void write(ostream& os);
37  bool truePos;
39 };
40 
41 struct NeffRecord: public Record{
42  void read(istream& is);
43  virtual void write(ostream& os);
44  double neff;
45 };
46 
47 struct EntropyRecord: public Record{
48  void read(istream& is);
49  virtual void write(ostream& os);
50  double poseEntropy;
52  double mapEntropy;
53 };
54 
55 
56 struct OdometryRecord: public Record{
57  virtual void read(istream& is);
58  vector<OrientedPoint> poses;
59 };
60 
61 struct RawOdometryRecord: public Record{
62  virtual void read(istream& is);
64 };
65 
66 struct ScanMatchRecord: public Record{
67  virtual void read(istream& is);
68  vector<OrientedPoint> poses;
69  vector<double> weights;
70 };
71 
72 struct LaserRecord: public Record{
73  virtual void read(istream& is);
74  virtual void write(ostream& os);
75  vector<double> readings;
77  double weight;
78 };
79 
80 struct ResampleRecord: public Record{
81  virtual void read(istream& is);
82  vector<unsigned int> indexes;
83 };
84 
85 struct RecordList: public list<Record*>{
86  mutable int sampleSize;
87  istream& read(istream& is);
88  double getLogWeight(unsigned int i) const;
89  double getLogWeight(unsigned int i, RecordList::const_iterator frame) const;
90  unsigned int getBestIdx() const ;
91  void printLastParticles(ostream& os) const ;
92  void printPath(ostream& os, unsigned int i, bool err=false, bool rawodom=false) const;
93  RecordList computePath(unsigned int i, RecordList::const_iterator frame) const;
94  void destroyReferences();
95 };
96 
97 }; //end namespace GFSReader
98 
99 }; //end namespace GMapping
100 
101 #endif
bool err
Definition: gfs2stream.cpp:38
vector< OrientedPoint > poses
Definition: gfsreader.h:58
vector< OrientedPoint > poses
Definition: gfsreader.h:68
rl read(is)
ifstream is(argv[c])
vector< unsigned int > indexes
Definition: gfsreader.h:82


openslam_gmapping
Author(s): Giorgio Grisetti, Cyrill Stachniss, Wolfram Burgard
autogenerated on Mon Jun 10 2019 14:04:22