Main Page
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
i
m
o
p
s
t
Functions
a
c
e
i
m
o
p
s
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
Related Functions
Files
File List
File Members
All
b
c
d
e
f
g
h
i
l
m
n
p
r
s
t
u
Functions
c
e
g
h
i
m
n
p
r
t
Variables
Typedefs
Macros
c
d
f
g
l
m
n
p
s
t
gridfastslam
gfs2stream.cpp
Go to the documentation of this file.
1
#include <iostream>
2
#include <fstream>
3
#include <sstream>
4
#include <vector>
5
#include <list>
6
#include <
gmapping/utils/point.h
>
7
#include <
gmapping/utils/commandline.h
>
8
#include "
gmapping/gridfastslam/gfsreader.h
"
9
#define MAX_LINE_LENGHT (1000000)
10
11
using namespace
std;
12
using namespace
GMapping
;
13
using namespace
GMapping::GFSReader
;
14
15
computeBoundingBox
()
16
17
18
int
main
(
unsigned
int
argc, const
char
* const * argv)
19
double
delta
= 0.1;
20
double
skip
= 2;
21
double
rotate
= 0;
22
double
maxrange
= 0;
23
24
if
(argc<3){
25
cout <<
"usage gfs2stream [-step Number] <outfilename>"
<< endl;
26
return
-1;
27
}
28
29
30
CMD_PARSE_BEGIN
(1,argc-2);
31
32
CMD_PARSE_END
;
33
34
if
(argc<3){
35
cout <<
"usage gfs2stream [-step Number] <outfilename>"
<< endl;
36
return
-1;
37
}
38
bool
err
=0;
39
bool
neff
=0;
40
bool
part
=0;
41
unsigned
int
c
=1;
42
if
(!strcmp(argv[
c
],
"-err"
)){
43
err
=
true
;
44
c
++;
45
}
46
if
(!strcmp(argv[
c
],
"-neff"
)){
47
neff
=
true
;
48
c
++;
49
}
50
if
(!strcmp(argv[
c
],
"-part"
)){
51
part
=
true
;
52
c
++;
53
}
54
ifstream
is
(argv[
c
]);
55
if
(!
is
){
56
cout <<
"could read file "
<< endl;
57
return
-1;
58
}
59
c
++;
60
RecordList
rl
;
61
rl
.
read
(
is
);
62
unsigned
int
bestidx
=
rl
.
getBestIdx
();
63
cout << endl <<
"best index = "
<<
bestidx
<< endl;
64
ofstream os(argv[
c
]);
65
if
(! os){
66
cout <<
"could write file "
<< endl;
67
return
-1;
68
}
69
rl
.
printPath
(os,
bestidx
,
err
);
70
if
(
part
)
71
rl
.
printLastParticles
(os);
72
os.close();
73
return
0;
74
}
GMapping::GFSReader::RecordList::printPath
void printPath(ostream &os, unsigned int i, bool err=false, bool rawodom=false) const
Definition:
gfsreader.cpp:356
c
unsigned int c
Definition:
gfs2stream.cpp:41
point.h
is
ifstream is(argv[c])
GMapping
Definition:
configfile.cpp:34
rl
RecordList rl
Definition:
gfs2stream.cpp:60
GMapping::GFSReader::RecordList::printLastParticles
void printLastParticles(ostream &os) const
Definition:
gfsreader.cpp:306
delta
const char *const *argv double delta
Definition:
gfs2stream.cpp:19
commandline.h
GMapping::GFSReader::RecordList::getBestIdx
unsigned int getBestIdx() const
Definition:
gfsreader.cpp:283
skip
double skip
Definition:
gfs2stream.cpp:20
CMD_PARSE_BEGIN
CMD_PARSE_BEGIN(1, argc-2)
GMapping::GFSReader
Definition:
gfsreader.cpp:8
GMapping::GFSReader::RecordList
Definition:
gfsreader.h:86
gfsreader.h
computeBoundingBox
computeBoundingBox() int main(unsigned int argc
neff
bool neff
Definition:
gfs2stream.cpp:39
CMD_PARSE_END
CMD_PARSE_END
Definition:
gfs2stream.cpp:32
rotate
double rotate
Definition:
gfs2stream.cpp:21
err
bool err
Definition:
gfs2stream.cpp:38
main
int main(int argc, char **argv)
Definition:
configfile_test.cpp:30
maxrange
double maxrange
Definition:
gfs2stream.cpp:22
GMapping::GFSReader::RecordList::read
istream & read(istream &is)
Definition:
gfsreader.cpp:198
bestidx
unsigned int bestidx
Definition:
gfs2stream.cpp:62
part
bool part
Definition:
gfs2stream.cpp:40
if
if(argc< 3)
Definition:
gfs2stream.cpp:24
openslam_gmapping
Author(s): Cyrill Stachniss, Udo Frese, Giorgio Grisetti, Wolfram Burgard
autogenerated on Thu Oct 19 2023 02:25:51