Go to the documentation of this file.
16 #define DEBUG cout << __func__
17 #define MAX_STRING_LENGTH 1024
19 int main(
int argc,
const char *
const * argv){
27 double patchDelta=0.1;
30 double maxUrange=81.9;
38 bool computeCovariance=
false;
39 bool readFromStdin=
false;
41 double laserx=.0,lasery=.0,lasertheta=.0;
46 cout <<
"usage main {arglist}" << endl;
47 cout <<
"where the arguments are: " << endl;
48 cout <<
"\t -xmin <value>" << endl;
49 cout <<
"\t -xmax <value>" << endl;
50 cout <<
"\t -ymin <value>" << endl;
51 cout <<
"\t -ymax <value>" << endl;
52 cout <<
"\t -maxrange <value> : maxmimum preception range" << endl;
53 cout <<
"\t -delta <value> : patch size" << endl;
54 cout <<
"\t -patchDelta <value> : patch cell size" << endl;
55 cout <<
"\t -lstep <value> : linear serach step" << endl;
56 cout <<
"\t -astep <value> : ìangular search step" << endl;
57 cout <<
"\t -regscore <value> : registration scan score" << endl;
58 cout <<
"\t -filename <value> : log filename in carmen format" << endl;
59 cout <<
"\t -sigma <value> : convolution kernel size" << endl;
60 cout <<
"Look the code for discovering another thousand of unuseful parameters" << endl;
83 parseFlag(
"-computeCovariance",computeCovariance);
91 if (!filename.size()){
92 cout <<
"no filename specified" << endl;
97 is.open(filename.c_str());
99 cout <<
"no file found" << endl;
104 DEBUG <<
"scanmatcher processor construction" << endl;
111 scanmatcher.
useICP=useICP;
123 ifstream plainStream;
124 if (! readFromStdin){
125 plainStream.open(filename.c_str());
127 cout <<
"Plain Stream opened="<< (bool) plainStream << endl;
130 cout <<
"Plain Stream opened on stdin" << endl;
142 if (! readFromStdin){
143 if (! outfilename.size()){
144 outfilename=string(
"scanmatched")+filename;
146 poseStream.open(outfilename.c_str());
152 ofstream odopathStream(
"odopath.dat");
163 if (! readFromStdin){
164 cout <<
"." << flush;
167 assert (rs && rs->
beams().size()==rr->size());
172 *output <<
"FLASER "<< rr->size() <<
" ";
174 *output <<
"RLASER "<< rr->size() <<
" ";
175 for (RangeReading::const_iterator b=rr->begin(); b!=rr->end(); b++){
176 *output << *b <<
" ";
178 *output << p.
x <<
" " << p.
y <<
" " << p.
theta <<
" ";
181 *output << p.
x <<
" " << p.
y <<
" " << p.
theta <<
" ";
182 *output << t <<
" nohost " << t << endl;
185 if (! readFromStdin){
std::map< std::string, Sensor * > SensorMap
void setSensorMap(const SensorMap &smap, std::string sensorName="FLASER")
#define parseString(name, value)
OrientedPoint getPose() const
int main(int argc, const char *const *argv)
#define parseInt(name, value)
virtual void processScan(const RangeReading &reading)
virtual SensorMap computeSensorMap() const
const std::vector< Beam > & beams() const
#define parseDouble(name, value)
const char *const *argv double delta
orientedpoint< double, double > OrientedPoint
void setMatchingParameters(double urange, double range, double sigma, int kernsize, double lopt, double aopt, int iterations, bool computeCovariance=false)
CMD_PARSE_BEGIN(1, argc-2)
void setmaxMove(double mmove)
#define parseFlag(name, value)
const Sensor * getSensor() const
const OrientedPoint & getPose() const
void setRegistrationParameters(double regScore, double critScore)
OrientedPoint getPose() const
virtual std::istream & load(std::istream &is)
openslam_gmapping
Author(s): Cyrill Stachniss, Udo Frese, Giorgio Grisetti, Wolfram Burgard
autogenerated on Thu Oct 19 2023 02:25:51