Go to the documentation of this file.00001 #ifndef THREADSLAM_H_
00002 #define THREADSLAM_H_
00003
00004 #include <boost/thread.hpp>
00005
00006 #include "obvision/reconstruct/grid/TsdGrid.h"
00007
00008 #include <ros/ros.h>
00009
00010
00011 namespace ohm_tsd_slam
00012 {
00013
00019 class ThreadSLAM
00020 {
00021 public:
00022
00026 ThreadSLAM(obvious::TsdGrid& grid);
00027
00031 virtual ~ThreadSLAM();
00032
00037 void unblock(void);
00038
00045 bool alive(unsigned int ms);
00046
00051 void terminateThread(void);
00052 protected:
00053
00058 virtual void eventLoop(void) = 0;
00059
00063 boost::thread* _thread;
00064
00068 boost::mutex _sleepMutex;
00069
00073 boost::condition_variable_any _sleepCond;
00074
00078 bool _stayActive;
00079
00083 obvious::TsdGrid& _grid;
00084 };
00085
00086 }
00087
00088 #endif