41 _dataBufferMaxSize(dataBufferMaxSize),
42 _resetOdometry(
false),
45 _imuEstimatedDelay(0.0)
79 if(event->
getClassName().compare(
"OdometryResetEvent") == 0)
117 UDEBUG(
"Processing data...");
132 if(dynamic_cast<OdometryMono*>(
_odometry) == 0)
136 ULOGGER_ERROR(
"Missing some information (images empty or missing calibration)!?");
145 ULOGGER_ERROR(
"Missing some information (image empty or missing calibration)!?");
159 UDEBUG(
"Data buffer is full, the oldest data is removed to add the new one.");
189 bool dataFilled =
false;
virtual void reset(const Transform &initialPose=Transform::getIdentity())
virtual void mainLoopBegin()
bool acquire(int n=1, int ms=0)
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