Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
rtabmap::OdometryThread Class Reference

#include <OdometryThread.h>

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

List of all members.

Public Member Functions

 OdometryThread (Odometry *odometry, unsigned int dataBufferMaxSize=1)
virtual ~OdometryThread ()

Protected Member Functions

virtual bool handleEvent (UEvent *event)

Private Member Functions

void addData (const SensorData &data)
bool getData (SensorData &data)
virtual void mainLoop ()
virtual void mainLoopBegin ()
virtual void mainLoopKill ()

Private Attributes

USemaphore _dataAdded
std::list< SensorData_dataBuffer
unsigned int _dataBufferMaxSize
UMutex _dataMutex
std::list< SensorData_imuBuffer
double _imuEstimatedDelay
double _lastImuStamp
Odometry_odometry
bool _resetOdometry
Transform _resetPose

Detailed Description

Definition at line 41 of file OdometryThread.h.


Constructor & Destructor Documentation

rtabmap::OdometryThread::OdometryThread ( Odometry odometry,
unsigned int  dataBufferMaxSize = 1 
)

Definition at line 39 of file OdometryThread.cpp.

Definition at line 50 of file OdometryThread.cpp.


Member Function Documentation

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

Definition at line 128 of file OdometryThread.cpp.

bool rtabmap::OdometryThread::getData ( SensorData data) [private]

Definition at line 187 of file OdometryThread.cpp.

bool rtabmap::OdometryThread::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.

Returns:
"true" to notify UEventsManager that this handler took ownership of the event (meaning it must delete it). The event will not be dispatched to next handlers.
"false" to let event be dispatched to next handlers (default behavior). UEventsManager will take care of deleting the event.

Implements UEventsHandler.

Definition at line 58 of file OdometryThread.cpp.

void rtabmap::OdometryThread::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 105 of file OdometryThread.cpp.

void rtabmap::OdometryThread::mainLoopBegin ( ) [private, virtual]

Virtual method mainLoopBegin(). User can implement this function to add a behavior before the main loop is started. It is called once (before entering mainLoop()).

Reimplemented from UThread.

Definition at line 92 of file OdometryThread.cpp.

void rtabmap::OdometryThread::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 97 of file OdometryThread.cpp.


Member Data Documentation

Definition at line 62 of file OdometryThread.h.

Definition at line 64 of file OdometryThread.h.

Definition at line 67 of file OdometryThread.h.

Definition at line 63 of file OdometryThread.h.

Definition at line 65 of file OdometryThread.h.

Definition at line 71 of file OdometryThread.h.

Definition at line 70 of file OdometryThread.h.

Definition at line 66 of file OdometryThread.h.

Definition at line 68 of file OdometryThread.h.

Definition at line 69 of file OdometryThread.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jun 6 2019 21:59:41