40 _dataBufferMaxSize(dataBufferMaxSize),
41 _resetOdometry(
false),
44 _imuEstimatedDelay(0.0)
78 if(event->
getClassName().compare(
"OdometryResetEvent") == 0)
120 UDEBUG(
"Processing data...");
135 if(dynamic_cast<OdometryMono*>(
_odometry) == 0)
139 ULOGGER_ERROR(
"Missing some information (images empty or missing calibration)!?");
148 ULOGGER_ERROR(
"Missing some information (image empty or missing calibration)!?");
162 UDEBUG(
"Data buffer is full, the oldest data is removed to add the new one.");
187 bool dataFilled =
false;
virtual void reset(const Transform &initialPose=Transform::getIdentity())
virtual void mainLoopBegin()
bool acquire(int n=1, int ms=0)
const LaserScan & laserScanRaw() const
const cv::Mat & imageRaw() const
void post(UEvent *event, bool async=true) const
Transform process(SensorData &data, OdometryInfo *info=0)
virtual void mainLoopKill()
#define UASSERT(condition)
bool isValidForProjection() const
double _imuEstimatedDelay
std::list< SensorData > _dataBuffer
virtual ~OdometryThread()
virtual std::string getClassName() const =0
void addData(const SensorData &data)
static void registerCurrentThread(const std::string &name)
const IMU & getData() const
const cv::Mat & depthOrRightRaw() const
unsigned int _dataBufferMaxSize
const std::vector< CameraModel > & cameraModels() const
const Transform & getPose() const
ULogger class and convenient macros.
const StereoCameraModel & stereoCameraModel() const
bool getData(SensorData &data)
const SensorData & data() const
void unregisterFromEventsManager()
void join(bool killFirst=false)
virtual bool handleEvent(UEvent *event)
#define ULOGGER_ERROR(...)
OdometryThread(Odometry *odometry, unsigned int dataBufferMaxSize=1)
std::list< SensorData > _imuBuffer