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
GMapping::GFSReader::ScanMatchRecord::weights
vector< double > weights
Definition: gfsreader.h:70
point.h
GMapping::GFSReader::EntropyRecord::trajectoryEntropy
double trajectoryEntropy
Definition: gfsreader.h:52
GMapping::GFSReader::ResampleRecord
Definition: gfsreader.h:81
GMapping::GFSReader::LaserRecord::pose
OrientedPoint pose
Definition: gfsreader.h:77
GMapping::GFSReader::ResampleRecord::indexes
vector< unsigned int > indexes
Definition: gfsreader.h:83
GMapping::GFSReader::PoseRecord::truePos
bool truePos
Definition: gfsreader.h:38
is
ifstream is(argv[c])
GMapping::GFSReader::PoseRecord::pose
OrientedPoint pose
Definition: gfsreader.h:39
GMapping
Definition: configfile.cpp:34
read
rl read(is)
GMapping::GFSReader::EntropyRecord::poseEntropy
double poseEntropy
Definition: gfsreader.h:51
GMapping::GFSReader::CommentRecord
Definition: gfsreader.h:28
GMapping::GFSReader::OdometryRecord
Definition: gfsreader.h:57
GMapping::GFSReader::ScanMatchRecord::poses
vector< OrientedPoint > poses
Definition: gfsreader.h:69
GMapping::GFSReader::LaserRecord::readings
vector< double > readings
Definition: gfsreader.h:76
GMapping::GFSReader::Record::time
double time
Definition: gfsreader.h:22
GMapping::GFSReader::Record
Definition: gfsreader.h:20
GMapping::GFSReader::OdometryRecord::poses
vector< OrientedPoint > poses
Definition: gfsreader.h:59
GMapping::GFSReader::NeffRecord::neff
double neff
Definition: gfsreader.h:45
GMapping::GFSReader::LaserRecord::weight
double weight
Definition: gfsreader.h:78
GMapping::GFSReader::RecordList
Definition: gfsreader.h:86
GMapping::GFSReader::RecordList::sampleSize
int sampleSize
Definition: gfsreader.h:87
GMapping::GFSReader::EntropyRecord
Definition: gfsreader.h:48
GMapping::GFSReader::RawOdometryRecord
Definition: gfsreader.h:62
GMapping::GFSReader::CommentRecord::text
string text
Definition: gfsreader.h:29
GMapping::GFSReader::Record::dim
unsigned int dim
Definition: gfsreader.h:21
GMapping::GFSReader::ScanMatchRecord
Definition: gfsreader.h:67
GMapping::GFSReader::RawOdometryRecord::pose
OrientedPoint pose
Definition: gfsreader.h:64
err
bool err
Definition: gfs2stream.cpp:38
GMapping::GFSReader::LaserRecord
Definition: gfsreader.h:73
GMapping::orientedpoint< double, double >
GMapping::GFSReader::EntropyRecord::mapEntropy
double mapEntropy
Definition: gfsreader.h:53
GMapping::GFSReader::NeffRecord
Definition: gfsreader.h:42
GMapping::GFSReader::PoseRecord
Definition: gfsreader.h:34


openslam_gmapping
Author(s): Cyrill Stachniss, Udo Frese, Giorgio Grisetti, Wolfram Burgard
autogenerated on Thu Oct 19 2023 02:25:51