Implements a thread updating an obvious::TsdGrid. More...
#include <ThreadMapping.h>
Public Member Functions | |
bool | initialized (void) |
void | initPush (obvious::SensorPolar2D *sensor) |
void | queuePush (obvious::SensorPolar2D *sensor) |
ThreadMapping (obvious::TsdGrid *grid) | |
virtual | ~ThreadMapping () |
Protected Member Functions | |
virtual void | eventLoop (void) |
Private Attributes | |
bool | _initialized |
boost::mutex | _pushMutex |
std::queue < obvious::SensorPolar2D * > | _sensors |
Implements a thread updating an obvious::TsdGrid.
Definition at line 24 of file ThreadMapping.h.
ohm_tsd_slam::ThreadMapping::ThreadMapping | ( | obvious::TsdGrid * | grid | ) |
ohm_tsd_slam::ThreadMapping::~ThreadMapping | ( | ) | [virtual] |
Destructor
Definition at line 18 of file ThreadMapping.cpp.
void ohm_tsd_slam::ThreadMapping::eventLoop | ( | void | ) | [protected, virtual] |
eventLoop Thread event loop
Implements ohm_tsd_slam::ThreadSLAM.
Definition at line 43 of file ThreadMapping.cpp.
bool ohm_tsd_slam::ThreadMapping::initialized | ( | void | ) |
initialized Method determining whether the tsd grid contains any data yet
Definition at line 23 of file ThreadMapping.cpp.
void ohm_tsd_slam::ThreadMapping::initPush | ( | obvious::SensorPolar2D * | sensor | ) |
initPush method to init the grid from a certain pose. Is done by the CALLING thread
sensor | initial data |
Definition at line 32 of file ThreadMapping.cpp.
void ohm_tsd_slam::ThreadMapping::queuePush | ( | obvious::SensorPolar2D * | sensor | ) |
queuePush Method to add a top be pushed sensor to the queue (synchronized)
sensor | New data |
Definition at line 61 of file ThreadMapping.cpp.
bool ohm_tsd_slam::ThreadMapping::_initialized [private] |
Initialized flag
Definition at line 83 of file ThreadMapping.h.
boost::mutex ohm_tsd_slam::ThreadMapping::_pushMutex [private] |
Push mutex for queue
Definition at line 78 of file ThreadMapping.h.
std::queue<obvious::SensorPolar2D*> ohm_tsd_slam::ThreadMapping::_sensors [private] |
Sensor queue
Definition at line 73 of file ThreadMapping.h.