28#ifndef RTABMAPTHREAD_H_
29#define RTABMAPTHREAD_H_
31#include "rtabmap/core/rtabmap_core_export.h"
34#include <rtabmap/utilite/UEventsHandler.h>
35#include <rtabmap/utilite/USemaphore.h>
36#include <rtabmap/utilite/UMutex.h>
38#include "rtabmap/core/RtabmapEvent.h"
39#include "rtabmap/core/SensorData.h"
40#include "rtabmap/core/Parameters.h"
41#include "rtabmap/core/OdometryEvent.h"
171 void close(
bool databaseSaved,
const std::string & databasePath =
"");
186 virtual void mainLoopBegin();
187 virtual void mainLoop();
188 virtual void mainLoopKill();
193 void publishMap(
bool optimized,
bool full,
bool graphOnly)
const;
197 std::queue<State> _state;
198 std::queue<RtabmapEventCmd> _stateParam;
200 std::list<OdometryEvent> _dataBuffer;
201 std::list<double> _newMapEvents;
204 unsigned int _dataBufferMaxSize;
206 bool _createIntermediateNodes;
207 double _previousStamp;
Backward-compatible alias header for UThread.
One processed frame with the pose the odometry integrated for it.
Command sent to RtabmapThread, with its parameters.
Runs a Rtabmap instance in its own thread, driven by events.
State
What the main loop does on its next wake-up.
bool getCreateIntermediateNodes() const
RtabmapThread(Rtabmap *rtabmap)
Constructor.
void createIntermediateNodes(bool enabled)
Keeps the frames skipped by setDetectorRate() as intermediate nodes.
void setDetectorRate(float rate)
Sets the maximum rate at which frames are processed (Hz, 0 = unlimited).
unsigned int getDataBufferSize() const
void close(bool databaseSaved, const std::string &databasePath="")
Joins the thread and closes rtabmap. This will delete rtabmap object if set.
virtual bool handleEvent(UEvent *anEvent)
Receives the events listed in the class description.
void setDataBufferSize(unsigned int bufferSize)
Sets how many frames may wait in the buffer (0 = unlimited).
float getDetectorRate() const
void clearBufferedData()
Drops the buffered frames, the pending user data and the odometry state.
Top-level RTAB-Map SLAM pipeline (mapping, localization and loop closure).