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 3-Clause BSD License
9  * and is copyrighted by Giorgio Grisetti, Cyrill Stachniss,
10  * and Wolfram Burgard.
11  *
12  * Further information on this license can be found at:
13  * https://opensource.org/licenses/BSD-3-Clause
14  *
15  * GMAPPING is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied
17  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
18  * PURPOSE.
19  *
20  *****************************************************************/
21 
22 
23 #ifndef _WIN32
24  #include <unistd.h>
25 #endif
27 
28 using namespace GMapping;
29 
30 int main (int argc, char ** argv){
31  cerr << "GMAPPING copyright 2004 by Giorgio Grisetti, Cyrill Stachniss," << endl ;
32  cerr << "and Wolfram Burgard. Published under the 3-Clause BSD License," << endl ;
33  cerr << "see: https://opensource.org/licenses/BSD-3-Clause" << endl << endl;
34 
35 
37  if (gsp->init(argc, argv)){
38  cout << "GSP INIT ERROR" << endl;
39  return -1;
40  }
41  cout <<"GSP INITIALIZED"<< endl;
42  if (gsp->loadFiles()){
43  cout <<"GSP READFILE ERROR"<< endl;
44  return -2;
45  }
46  cout <<"FILES LOADED"<< endl;
47  gsp->setMapUpdateTime(1000000);
48  gsp->start();
49  cout <<"THREAD STARTED"<< endl;
50  bool done=false;
51  while (!done){
53  for (GridSlamProcessorThread::EventDeque::iterator it=events.begin(); it!=events.end(); it++){
54  cout << flush;
56  if (doneEvent){
57  done=true;
58  cout <<"DONE!"<< endl;
59  gsp->stop();
60  }
61  if (*it)
62  delete(*it);
63  }
64  }
65 }
int init(int argc, const char *const *argv)
Definition: gsp_thread.cpp:36
void setMapUpdateTime(unsigned int ut)
Definition: gsp_thread.h:98
int loadFiles(const char *fn=0)
Definition: gsp_thread.cpp:153
deque< Event * > EventDeque
Definition: gsp_thread.h:74
int main(int argc, conat char **argv)
Definition: lumiles.h:45


openslam_gmapping
Author(s): Cyrill Stachniss, Udo Frese, Giorgio Grisetti, Wolfram Burgard
autogenerated on Mon Feb 28 2022 22:59:20