#include <RtabmapThread.h>
|
enum | State {
kStateInit,
kStateDetecting,
kStateReseting,
kStateClose,
kStateChangingParameters,
kStateDumpingMemory,
kStateDumpingPrediction,
kStateExportingDOTGraph,
kStateExportingPoses,
kStateCleanDataBuffer,
kStatePublishingMap,
kStateTriggeringMap,
kStateSettingGoal,
kStateCancellingGoal,
kStateLabelling
} |
|
enum | Priority {
kPLow,
kPBelowNormal,
kPNormal,
kPAboveNormal,
kPRealTime
} |
|
typedef THREAD_HANDLE | Handle |
|
typedef THREAD_HANDLE | Handle |
|
typedef void(* | Handler) () |
|
typedef void(* | Handler) () |
|
|
void | clearBufferedData () |
|
void | close (bool databaseSaved, const std::string &databasePath="") |
|
void | createIntermediateNodes (bool enabled) |
|
bool | getCreateIntermediateNodes () const |
|
unsigned int | getDataBufferSize () const |
|
float | getDetectorRate () const |
|
| RtabmapThread (Rtabmap *rtabmap) |
|
void | setDataBufferSize (unsigned int bufferSize) |
|
void | setDetectorRate (float rate) |
|
virtual | ~RtabmapThread () |
|
Handle | getThreadHandle () const |
|
unsigned long | getThreadId () const |
|
bool | isCreating () const |
|
bool | isIdle () const |
|
bool | isKilled () const |
|
bool | isRunning () const |
|
void | join (bool killFirst=false) |
|
void | kill () |
|
void | setAffinity (int cpu=0) |
|
void | setPriority (Priority priority) |
|
void | start () |
|
| UThread (Priority priority=kPNormal) |
|
virtual | ~UThread () |
|
int | Create (Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const |
|
int | Create (Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const |
|
int | Create (unsigned long &ThreadId, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const |
|
int | Create (unsigned long &ThreadId, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) const |
|
virtual | ~UThreadC () |
|
virtual | ~UThreadC () |
|
Public Member Functions inherited from UEventsHandler |
void | registerToEventsManager () |
|
void | unregisterFromEventsManager () |
|
| UEventsSender () |
|
virtual | ~UEventsSender () |
|
|
static unsigned long | currentThreadId () |
|
static int | Create (const Handler &Function, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) |
|
static int | Create (const Handler &Function, Handle *const &H=0, const bool &CreateDetached=false, const unsigned int &StackSize=0, const bool &CancelEnable=false, const bool &CancelAsync=false) |
|
static int | Detach (Handle H) |
|
static int | Detach (const Handle &H) |
|
static int | Join (const Handle &H) |
|
static int | Join (Handle H) |
|
static int | Kill (Handle H) |
|
static int | Kill (const Handle &H) |
|
static void | Exit () |
|
static void | Exit () |
|
static Handle | Self () |
|
static int | Self () |
|
static void | TestCancel () |
|
static void | TestCancel () |
|
Definition at line 51 of file RtabmapThread.h.
Enumerator |
---|
kStateInit |
|
kStateDetecting |
|
kStateReseting |
|
kStateClose |
|
kStateChangingParameters |
|
kStateDumpingMemory |
|
kStateDumpingPrediction |
|
kStateExportingDOTGraph |
|
kStateExportingPoses |
|
kStateCleanDataBuffer |
|
kStatePublishingMap |
|
kStateTriggeringMap |
|
kStateSettingGoal |
|
kStateCancellingGoal |
|
kStateLabelling |
|
Definition at line 56 of file RtabmapThread.h.
rtabmap::RtabmapThread::RtabmapThread |
( |
Rtabmap * |
rtabmap | ) |
|
rtabmap::RtabmapThread::~RtabmapThread |
( |
| ) |
|
|
virtual |
void rtabmap::RtabmapThread::addData |
( |
const OdometryEvent & |
odomEvent | ) |
|
|
private |
void rtabmap::RtabmapThread::clearBufferedData |
( |
| ) |
|
void rtabmap::RtabmapThread::close |
( |
bool |
databaseSaved, |
|
|
const std::string & |
databasePath = "" |
|
) |
| |
Close rtabmap. This will delete rtabmap object if set.
- Parameters
-
databaseSaved | true=database saved, false=database discarded. |
databasePath | output database file name, ignored if Db/Sqlite3InMemory=false (opened database is then overwritten). |
Definition at line 118 of file RtabmapThread.cpp.
void rtabmap::RtabmapThread::createIntermediateNodes |
( |
bool |
enabled | ) |
|
bool rtabmap::RtabmapThread::getCreateIntermediateNodes |
( |
| ) |
const |
|
inline |
unsigned int rtabmap::RtabmapThread::getDataBufferSize |
( |
| ) |
const |
|
inline |
float rtabmap::RtabmapThread::getDetectorRate |
( |
| ) |
const |
|
inline |
bool rtabmap::RtabmapThread::handleEvent |
( |
UEvent * |
event | ) |
|
|
protectedvirtual |
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 316 of file RtabmapThread.cpp.
void rtabmap::RtabmapThread::mainLoop |
( |
| ) |
|
|
privatevirtual |
void rtabmap::RtabmapThread::mainLoopBegin |
( |
| ) |
|
|
privatevirtual |
void rtabmap::RtabmapThread::mainLoopKill |
( |
| ) |
|
|
privatevirtual |
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 180 of file RtabmapThread.cpp.
void rtabmap::RtabmapThread::process |
( |
| ) |
|
|
private |
void rtabmap::RtabmapThread::publishMap |
( |
bool |
optimized, |
|
|
bool |
full, |
|
|
bool |
graphOnly |
|
) |
| const |
|
private |
void rtabmap::RtabmapThread::setDataBufferSize |
( |
unsigned int |
bufferSize | ) |
|
void rtabmap::RtabmapThread::setDetectorRate |
( |
float |
rate | ) |
|
bool rtabmap::RtabmapThread::_createIntermediateNodes |
|
private |
unsigned int rtabmap::RtabmapThread::_dataBufferMaxSize |
|
private |
UMutex rtabmap::RtabmapThread::_dataMutex |
|
private |
UTimer* rtabmap::RtabmapThread::_frameRateTimer |
|
private |
std::list<double> rtabmap::RtabmapThread::_newMapEvents |
|
private |
bool rtabmap::RtabmapThread::_paused |
|
private |
double rtabmap::RtabmapThread::_previousStamp |
|
private |
float rtabmap::RtabmapThread::_rate |
|
private |
Rtabmap* rtabmap::RtabmapThread::_rtabmap |
|
private |
std::queue<State> rtabmap::RtabmapThread::_state |
|
private |
UMutex rtabmap::RtabmapThread::_stateMutex |
|
private |
cv::Mat rtabmap::RtabmapThread::_userData |
|
private |
UMutex rtabmap::RtabmapThread::_userDataMutex |
|
private |
cv::Mat rtabmap::RtabmapThread::covariance_ |
|
private |
The documentation for this class was generated from the following files: