This class is to safely notify different threads whether IMU measurements up to a timestamp (e.g. the one of a camera frame) have already been registered.
More...
#include <ImuFrameSynchronizer.hpp>
This class is to safely notify different threads whether IMU measurements up to a timestamp (e.g. the one of a camera frame) have already been registered.
okvis::ImuFrameSynchronizer::ImuFrameSynchronizer |
( |
| ) |
|
okvis::ImuFrameSynchronizer::~ImuFrameSynchronizer |
( |
| ) |
|
void okvis::ImuFrameSynchronizer::gotImuData |
( |
const okvis::Time & |
stamp | ) |
|
Tell the synchronizer that a new IMU measurement has been registered.
- Parameters
-
stamp | Timestamp of the new IMU mewasurement. |
void okvis::ImuFrameSynchronizer::shutdown |
( |
| ) |
|
Tell the synchronizer to shutdown. This will notify all waiting threads to wake up.
bool okvis::ImuFrameSynchronizer::waitForUpToDateImuData |
( |
const okvis::Time & |
frame_stamp | ) |
|
Wait until a IMU measurement with a timestamp equal or newer to the supplied one is registered.
- Parameters
-
frame_stamp | Timestamp until you want to have IMU measurements for. |
- Returns
- False if a shutdown signal has been received. Otherwise true.
std::condition_variable okvis::ImuFrameSynchronizer::gotNeededImuData_ |
|
private |
Condition variable for waiting and notyfing.
okvis::Time okvis::ImuFrameSynchronizer::imuDataNeededUntil_ |
|
private |
A thread is waiting for IMU data newer or equal to this timestamp.
std::mutex okvis::ImuFrameSynchronizer::mutex_ |
|
private |
okvis::Time okvis::ImuFrameSynchronizer::newestImuDataStamp_ |
|
private |
Newest IMU data timestamp.
std::atomic_bool okvis::ImuFrameSynchronizer::shutdown_ |
|
private |
The documentation for this class was generated from the following files: