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


openslam_gmapping
Author(s): Cyrill Stachniss, Udo Frese, Giorgio Grisetti, Wolfram Burgard
autogenerated on Mon Feb 28 2022 22:59:20