43 #ifndef INCLUDE_OKVIS_IMUFRAMESYNCHRONIZER_H_
44 #define INCLUDE_OKVIS_IMUFRAMESYNCHRONIZER_H_
48 #include <condition_variable>
This class is to safely notify different threads whether IMU measurements up to a timestamp (e...
Definition: ImuFrameSynchronizer.hpp:59
std::condition_variable gotNeededImuData_
Condition variable for waiting and notyfing.
Definition: ImuFrameSynchronizer.hpp:85
Header file for the TimeBase, Time and WallTime class.
bool waitForUpToDateImuData(const okvis::Time &frame_stamp)
Wait until a IMU measurement with a timestamp equal or newer to the supplied one is registered...
Definition: ImuFrameSynchronizer.cpp:64
std::atomic_bool shutdown_
True if shutdown() was called.
Definition: ImuFrameSynchronizer.hpp:87
~ImuFrameSynchronizer()
Destructor.
Definition: ImuFrameSynchronizer.cpp:51
void gotImuData(const okvis::Time &stamp)
Tell the synchronizer that a new IMU measurement has been registered.
Definition: ImuFrameSynchronizer.cpp:57
std::mutex mutex_
Mutex.
Definition: ImuFrameSynchronizer.hpp:86
void shutdown()
Tell the synchronizer to shutdown. This will notify all waiting threads to wake up.
Definition: ImuFrameSynchronizer.cpp:78
ImuFrameSynchronizer()
Constructor.
Definition: ImuFrameSynchronizer.cpp:48
Time representation. May either represent wall clock time or ROS clock time.
Definition: Time.hpp:187
okvis::Time newestImuDataStamp_
Newest IMU data timestamp.
Definition: ImuFrameSynchronizer.hpp:83
okvis::Time imuDataNeededUntil_
A thread is waiting for IMU data newer or equal to this timestamp.
Definition: ImuFrameSynchronizer.hpp:84