gfs_nogui.cpp
Go to the documentation of this file.
1 /*****************************************************************
2  *
3  * This file is part of the GMAPPING project
4  *
5  * GMAPPING Copyright (c) 2004 Giorgio Grisetti,
6  * Cyrill Stachniss, and Wolfram Burgard
7  *
8  * This software is licensed under the "Creative Commons
9  * License (Attribution-NonCommercial-ShareAlike 2.0)"
10  * and is copyrighted by Giorgio Grisetti, Cyrill Stachniss,
11  * and Wolfram Burgard.
12  *
13  * Further information on this license can be found at:
14  * http://creativecommons.org/licenses/by-nc-sa/2.0/
15  *
16  * GMAPPING is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied
18  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19  * PURPOSE.
20  *
21  *****************************************************************/
22 
23 
24 #include <unistd.h>
25 #include "gsp_thread.h"
26 
27 using namespace GMapping;
28 
29 int main (int argc, char ** argv){
30  cerr << "GMAPPING copyright 2004 by Giorgio Grisetti, Cyrill Stachniss," << endl ;
31  cerr << "and Wolfram Burgard. To be published under the CreativeCommons license," << endl ;
32  cerr << "see: http://creativecommons.org/licenses/by-nc-sa/2.0/" << endl << endl;
33 
34 
36  if (gsp->init(argc, argv)){
37  cout << "GSP INIT ERROR" << endl;
38  return -1;
39  }
40  cout <<"GSP INITIALIZED"<< endl;
41  if (gsp->loadFiles()){
42  cout <<"GSP READFILE ERROR"<< endl;
43  return -2;
44  }
45  cout <<"FILES LOADED"<< endl;
46  gsp->setMapUpdateTime(1000000);
47  gsp->start();
48  cout <<"THREAD STARTED"<< endl;
49  bool done=false;
50  while (!done){
52  for (GridSlamProcessorThread::EventDeque::iterator it=events.begin(); it!=events.end(); it++){
53  cout << flush;
55  if (doneEvent){
56  done=true;
57  cout <<"DONE!"<< endl;
58  gsp->stop();
59  }
60  if (*it)
61  delete(*it);
62  }
63  }
64 }
int init(int argc, const char *const *argv)
Definition: gsp_thread.cpp:37
void setMapUpdateTime(unsigned int ut)
Definition: gsp_thread.h:97
int loadFiles(const char *fn=0)
Definition: gsp_thread.cpp:154
deque< Event * > EventDeque
Definition: gsp_thread.h:73
int main(int argc, conat char **argv)
Definition: lumiles.h:45


openslam_gmapping
Author(s): Giorgio Grisetti, Cyrill Stachniss, Wolfram Burgard
autogenerated on Mon Jun 10 2019 14:04:22