Better assert when we receive out-of-order image frames
This commit is contained in:
parent
d2db20106d
commit
debea94103
|
@ -230,10 +230,14 @@ void SqrtKeypointVioEstimator<Scalar_>::initialize(const Eigen::Vector3d& bg_,
|
||||||
prev_frame->t_ns, last_state.getState().bias_gyro,
|
prev_frame->t_ns, last_state.getState().bias_gyro,
|
||||||
last_state.getState().bias_accel));
|
last_state.getState().bias_accel));
|
||||||
|
|
||||||
BASALT_ASSERT_MSG(prev_frame->t_ns < curr_frame->t_ns,
|
BASALT_ASSERT_MSG(prev_frame->t_ns != curr_frame->t_ns,
|
||||||
"duplicate frame timestamps?! zero time delta leads "
|
"duplicate frame timestamps?! zero time delta leads "
|
||||||
"to invalid IMU integration.");
|
"to invalid IMU integration.");
|
||||||
|
|
||||||
|
BASALT_ASSERT_MSG(prev_frame->t_ns < curr_frame->t_ns,
|
||||||
|
"frame timestamps not monotonically increasing?! "
|
||||||
|
"are we going 88mph and inside a delorean?");
|
||||||
|
|
||||||
while (data->t_ns <= prev_frame->t_ns) {
|
while (data->t_ns <= prev_frame->t_ns) {
|
||||||
data = popFromImuDataQueue();
|
data = popFromImuDataQueue();
|
||||||
if (!data) break;
|
if (!data) break;
|
||||||
|
|
Loading…
Reference in New Issue