Go to the documentation of this file.
40 _dataBufferMaxSize(dataBufferMaxSize),
41 _resetOdometry(
false),
44 _imuEstimatedDelay(0.0)
78 if(event->
getClassName().compare(
"OdometryResetEvent") == 0)
120 UDEBUG(
"Processing data...");
122 if(!
data.imageRaw().empty() || !
data.laserScanRaw().empty() || (pose.
isNull() &&
data.imu().empty()))
133 if(
data.imu().empty())
137 if((
data.imageRaw().empty() ||
data.depthOrRightRaw().empty() || (
data.cameraModels().empty() &&
data.stereoCameraModels().empty())) &&
138 data.laserScanRaw().empty())
140 ULOGGER_ERROR(
"Missing some information (images/scans empty or missing calibration)!?");
147 if(
data.imageRaw().empty() || (
data.cameraModels().empty() &&
data.stereoCameraModels().empty()))
149 ULOGGER_ERROR(
"Missing some information (image empty or missing calibration)!?");
158 if(!
data.imageRaw().empty() || !
data.laserScanRaw().isEmpty() ||
data.imu().empty())
163 UDEBUG(
"Data buffer is full, the oldest data is removed to add the new one.");
188 bool dataFilled =
false;
const Transform & getPose() const
bool acquire(int n=1, int ms=0)
bool getData(SensorData &data)
double _imuEstimatedDelay
void join(bool killFirst=false)
void addData(const SensorData &data)
unsigned int _dataBufferMaxSize
Pose2 odometry(2.0, 0.0, 0.0)
OdometryThread(Odometry *odometry, unsigned int dataBufferMaxSize=1)
virtual std::string getClassName() const =0
virtual void mainLoopKill()
Transform process(SensorData &data, OdometryInfo *info=0)
virtual void reset(const Transform &initialPose=Transform::getIdentity())
void unregisterFromEventsManager()
#define UASSERT(condition)
virtual void mainLoopBegin()
virtual ~OdometryThread()
static void registerCurrentThread(const std::string &name)
ULogger class and convenient macros.
const SensorData & data() const
#define ULOGGER_ERROR(...)
std::list< SensorData > _dataBuffer
std::list< SensorData > _imuBuffer
const IMU & getData() const
virtual bool handleEvent(UEvent *event)
void post(UEvent *event, bool async=true) const
rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:13