Small bug while calling removeUpTo in process()
The current implementation does:
PackKeyFramePtr pack = kf_pack_buffer_.selectPack( last_ptr_ , params_tracker_->time_tolerance);
kf_pack_buffer_.removeUpTo( last_ptr_->getTimeStamp() );
Consider a pack
newer than last_ptr_
within the params_tracker_->time_tolerance_
, in this case the removeUpTo
won't remove the selected pack. Then, in a future process()
, will treat the same pack
as a new KF.
If the time_tolerance
is properly defined (equal or lower than the time between captures), it shouldn't be a problem since this pack
won't be selected ẁhile processing the next capture within the time tolerance. However, I think it is safer to ensure that we remove all the packs up to the selected one (included) since this KF has already been handled.