Go to the documentation of this file.
29 #define DEBUG cout << __func__
50 int main(
int argc,
const char *
const * argv){
52 std::string outfilename=
"";
75 double srr=0.01, srt=0.01, str=0.01, stt=0.01;
81 double angularUpdate=0.5;
82 double linearUpdate=1;
83 double resampleThreshold=0.5;
84 bool generateMap=
true;
86 std::string configfilename =
"";
92 if (configfilename.length()>0){
94 outfilename = (std::string) cfg.
value(
"gfs",
"outfilename",outfilename);
95 xmin = cfg.
value(
"gfs",
"xmin", xmin);
96 xmax = cfg.
value(
"gfs",
"xmax",xmax);
97 ymin = cfg.
value(
"gfs",
"ymin",ymin);
98 ymax = cfg.
value(
"gfs",
"ymax",ymax);
101 maxUrange = cfg.
value(
"gfs",
"maxUrange",maxUrange);
102 regscore = cfg.
value(
"gfs",
"regscore",regscore);
103 critscore = cfg.
value(
"gfs",
"critscore",critscore);
104 kernelSize = cfg.
value(
"gfs",
"kernelSize",kernelSize);
105 sigma = cfg.
value(
"gfs",
"sigma",sigma);
106 iterations = cfg.
value(
"gfs",
"iterations",iterations);
107 lstep = cfg.
value(
"gfs",
"lstep",lstep);
108 astep = cfg.
value(
"gfs",
"astep",astep);
109 maxMove = cfg.
value(
"gfs",
"maxMove",maxMove);
110 srr = cfg.
value(
"gfs",
"srr", srr);
111 srt = cfg.
value(
"gfs",
"srt", srt);
112 str = cfg.
value(
"gfs",
"str", str);
113 stt = cfg.
value(
"gfs",
"stt", stt);
114 particles = cfg.
value(
"gfs",
"particles",particles);
115 angularUpdate = cfg.
value(
"gfs",
"angularUpdate", angularUpdate);
116 linearUpdate = cfg.
value(
"gfs",
"linearUpdate", linearUpdate);
117 lsigma = cfg.
value(
"gfs",
"lsigma", lsigma);
118 ogain = cfg.
value(
"gfs",
"lobsGain", ogain);
119 lskip = (int)cfg.
value(
"gfs",
"lskip", lskip);
121 resampleThreshold = cfg.
value(
"gfs",
"resampleThreshold", resampleThreshold);
122 generateMap = cfg.
value(
"gfs",
"generateMap", generateMap);
154 parseDouble(
"-resampleThreshold", resampleThreshold);
158 cerr <<
"Parameter parsed, connecting to Carmen!";
165 cerr <<
"." << flush;
175 cerr <<
"Connected " << endl;
182 processor->setgenerateMap(generateMap);
187 processor->
init(particles, xmin, ymin, xmax, ymax,
delta, initialPose);
188 if (outfilename.length()>0)
194 ap=processor; processor=copy; copy=ap;
206 cerr <<
"PROCESSED" << endl;
215 cerr <<
"Particle reproduction story begin" << endl;
216 for (
unsigned int i=0; i<particles.size(); i++){
217 cerr << particles[i].previousIndex <<
"->" << i <<
" ";
219 cerr <<
"Particle reproduction story end" << endl;
230 cerr << __func__ <<
"CLONING... " << endl;
232 cerr <<
"DONE" << endl;
233 cerr << __func__ <<
"DELETING... " << endl;
235 cerr <<
"DONE" << endl;
236 processor=newProcessor;
std::map< std::string, Sensor * > SensorMap
static bool sensorMapComputed()
#define CMD_PARSE_BEGIN_SILENT(i, count)
#define parseString(name, value)
static void initializeIPC(const char *name)
void setMatchingParameters(double urange, double range, double sigma, int kernsize, double lopt, double aopt, int iterations, double likelihoodSigma=1, double likelihoodGain=1, unsigned int likelihoodSkip=0)
std::vector< Particle > ParticleVector
int main(int argc, conat char **argv)
#define parseInt(name, value)
std::ofstream & outputStream()
bool processScan(const RangeReading &reading, int adaptParticles=0)
#define parseDouble(name, value)
static const SensorMap & sensorMap()
const char *const *argv double delta
#define CMD_PARSE_END_SILENT
CMD_PARSE_BEGIN(1, argc-2)
GridSlamProcessor * clone() const
void setUpdateDistances(double linear, double angular, double resampleThreshold)
#define parseFlag(name, value)
const ParticleVector & getParticles() const
const AutoVal & value(const std::string §ion, const std::string &entry) const
void setSensorMap(const SensorMap &smap)
void init(unsigned int size, double xmin, double ymin, double xmax, double ymax, double delta, OrientedPoint initialPose=OrientedPoint(0, 0, 0))
static bool start(const char *name)
static bool getReading(RangeReading &reading)
void setMotionModelParameters(double srr, double srt, double str, double stt)
#define parseStringSilent(name, value)
openslam_gmapping
Author(s): Cyrill Stachniss, Udo Frese, Giorgio Grisetti, Wolfram Burgard
autogenerated on Thu Oct 19 2023 02:25:51