main.cpp
Go to the documentation of this file.
00001 #include "mapmerger.h"
00002 
00003 #include <stdio.h>
00004 #include <execinfo.h>
00005 #include <signal.h>
00006 #include <stdlib.h>
00007 #include <unistd.h>
00008 //#define PROFILE
00009 
00010 #ifdef PROFILE
00011     #include "google/profiler.h"
00012     #include "google/heap-profiler.h"
00013 #endif
00014 
00015 using namespace std;
00016 
00017 void handler(int sig) {
00018   void *array[10];
00019   size_t size;
00020 
00021   // get void*'s for all entries on the stack
00022   size = backtrace(array, 10);
00023 
00024   // print out all the frames to stderr
00025   fprintf(stderr, "Error: signal %d:\n", sig);
00026   backtrace_symbols_fd(array, size, STDERR_FILENO);
00027   exit(1);
00028 }
00029 
00030 
00031 int main(int argc, char **argv)
00032 {
00033     signal(SIGSEGV, handler);
00034 #ifdef PROFILE
00035     const char  fname[3] = "TS";
00036     ProfilerStart(fname);
00037     HeapProfilerStart(fname);
00038 #endif
00039     ros::init(argc,argv,"map_merger");
00040     MapMerger *merger = new MapMerger();
00041     if(merger->getHasLocalMap())
00042         merger->waitForLocalMetaData();
00043     else
00044         merger->waitForRobotInformation();
00045     merger->start();
00046 #ifdef PROFILE
00047     HeapProfilerStop();
00048     ProfilerStop();
00049 #endif
00050     return 0;
00051 }


map_merger
Author(s): Peter Kohout , Torsten Andre
autogenerated on Thu Aug 27 2015 11:56:48