Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
rtabmap::RtabmapThread Class Reference

#include <RtabmapThread.h>

Inheritance diagram for rtabmap::RtabmapThread:
Inheritance graph
[legend]

List of all members.

Public Types

enum  State {
  kStateInit, kStateDetecting, kStateReseting, kStateClose,
  kStateChangingParameters, kStateDumpingMemory, kStateDumpingPrediction, kStateGeneratingDOTGraph,
  kStateGeneratingDOTLocalGraph, kStateGeneratingTOROGraphLocal, kStateGeneratingTOROGraphGlobal, kStateCleanDataBuffer,
  kStatePublishingMapLocal, kStatePublishingMapGlobal, kStatePublishingTOROGraphLocal, kStatePublishingTOROGraphGlobal,
  kStateTriggeringMap, kStateAddingUserData, kStateSettingGoal
}

Public Member Functions

void clearBufferedData ()
 RtabmapThread (Rtabmap *rtabmap)
void setBufferSize (int bufferSize)
void setDetectorRate (float rate)
virtual ~RtabmapThread ()

Protected Member Functions

virtual void handleEvent (UEvent *anEvent)

Private Member Functions

void addData (const SensorData &data)
void getData (SensorData &data)
virtual void mainLoop ()
virtual void mainLoopKill ()
void process ()
void publishMap (bool optimized, bool full) const
void publishTOROGraph (bool optimized, bool full) const
void pushNewState (State newState, const ParametersMap &parameters=ParametersMap())
void setDataBufferSize (int size)

Private Attributes

USemaphore _dataAdded
std::list< SensorData_dataBuffer
int _dataBufferMaxSize
UMutex _dataMutex
UTimer_frameRateTimer
bool _paused
float _rate
float _rotVariance
Rtabmap_rtabmap
std::stack< State_state
UMutex _stateMutex
std::stack< ParametersMap_stateParam
float _transVariance
std::vector< unsigned char > _userData
UMutex _userDataMutex
Transform lastPose_

Detailed Description

Definition at line 50 of file RtabmapThread.h.


Member Enumeration Documentation

Enumerator:
kStateInit 
kStateDetecting 
kStateReseting 
kStateClose 
kStateChangingParameters 
kStateDumpingMemory 
kStateDumpingPrediction 
kStateGeneratingDOTGraph 
kStateGeneratingDOTLocalGraph 
kStateGeneratingTOROGraphLocal 
kStateGeneratingTOROGraphGlobal 
kStateCleanDataBuffer 
kStatePublishingMapLocal 
kStatePublishingMapGlobal 
kStatePublishingTOROGraphLocal 
kStatePublishingTOROGraphGlobal 
kStateTriggeringMap 
kStateAddingUserData 
kStateSettingGoal 

Reimplemented from UThread.

Definition at line 55 of file RtabmapThread.h.


Constructor & Destructor Documentation

Definition at line 46 of file RtabmapThread.cpp.

Definition at line 60 of file RtabmapThread.cpp.


Member Function Documentation

void rtabmap::RtabmapThread::addData ( const SensorData data) [private]

Definition at line 511 of file RtabmapThread.cpp.

Definition at line 85 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::getData ( SensorData data) [private]

Definition at line 579 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::handleEvent ( UEvent event) [protected, virtual]

Method called by the UEventsManager to handle an event. Important : this method must do a minimum of work because the faster the dispatching loop is done; the faster the events are received. If a handling function takes too much time, the events list can grow faster than it is emptied. The event can be modified but must not be deleted.

Implements UEventsHandler.

Definition at line 296 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::mainLoop ( ) [private, virtual]

Pure virtual method mainLoop(). The inner loop of the thread. This method is called repetitively until the thread is killed. Note that if kill() is called in mainLoopBegin(), mainLoop() is not called, terminating immediately the thread.

See also:
mainLoop()
kill()

Implements UThread.

Definition at line 181 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::mainLoopKill ( ) [private, virtual]

Virtual method mainLoopKill(). User can implement this function to add a behavior before the thread is killed. When this function is called, the state of the thread is set to kSKilled. It is useful to wake up a sleeping thread to finish his loop and to avoid a deadlock.

Reimplemented from UThread.

Definition at line 173 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::process ( ) [private]

Definition at line 488 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::publishMap ( bool  optimized,
bool  full 
) const [private]

Definition at line 115 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::publishTOROGraph ( bool  optimized,
bool  full 
) const [private]

Definition at line 144 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::pushNewState ( State  newState,
const ParametersMap parameters = ParametersMap() 
) [private]

Definition at line 71 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::setBufferSize ( int  bufferSize)

Definition at line 109 of file RtabmapThread.cpp.

void rtabmap::RtabmapThread::setDataBufferSize ( int  size) [private]

Definition at line 598 of file RtabmapThread.cpp.

Definition at line 103 of file RtabmapThread.cpp.


Member Data Documentation

Definition at line 107 of file RtabmapThread.h.

Definition at line 105 of file RtabmapThread.h.

Definition at line 108 of file RtabmapThread.h.

Definition at line 106 of file RtabmapThread.h.

Definition at line 110 of file RtabmapThread.h.

Definition at line 113 of file RtabmapThread.h.

Definition at line 109 of file RtabmapThread.h.

Definition at line 115 of file RtabmapThread.h.

Definition at line 112 of file RtabmapThread.h.

std::stack<State> rtabmap::RtabmapThread::_state [private]

Definition at line 102 of file RtabmapThread.h.

Definition at line 101 of file RtabmapThread.h.

Definition at line 103 of file RtabmapThread.h.

Definition at line 116 of file RtabmapThread.h.

std::vector<unsigned char> rtabmap::RtabmapThread::_userData [private]

Definition at line 118 of file RtabmapThread.h.

Definition at line 119 of file RtabmapThread.h.

Definition at line 114 of file RtabmapThread.h.


The documentation for this class was generated from the following files:


rtabmap
Author(s): Mathieu Labbe
autogenerated on Fri Aug 28 2015 12:51:44