Skip to content
Snippets Groups Projects
Commit a070560b authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

Merge branch '227-processormotion-kfcallback-with-recent-timestamp' into 'devel'

Resolve "ProcessorMotion KFcallback with recent TimeStamp"

Closes #227

See merge request !288
parents 5fa0b9fd 3992e4f7
No related branches found
No related tags found
1 merge request!288Resolve "ProcessorMotion KFcallback with recent TimeStamp"
Pipeline #3742 passed
......@@ -107,8 +107,8 @@ void MotionBuffer::getMotion(const TimeStamp& _ts, Motion& _motion) const
void MotionBuffer::split(const TimeStamp& _ts, MotionBuffer& _buffer_part_before_ts)
{
assert((container_.front().ts_ <= _ts) && "Error: Query time stamp is greater than the buffer's last tick");
assert((container_.back().ts_ >= _ts) && "Error: Query time stamp is smaller than the buffer's first tick");
assert((container_.front().ts_ <= _ts) && "Error: Query time stamp is smaller than the buffer's first tick");
assert((container_.back().ts_ >= _ts) && "Error: Query time stamp is greater than the buffer's last tick");
_buffer_part_before_ts.setCalibrationPreint(calib_preint_);
......
......@@ -96,7 +96,6 @@ void ProcessorMotion::process(CaptureBasePtr _incoming_ptr)
switch(processing_step_)
{
case RUNNING_WITHOUT_PACK :
case RUNNING_WITH_PACK_ON_ORIGIN :
break;
......@@ -658,6 +657,10 @@ PackKeyFramePtr ProcessorMotion::computeProcessingStep()
PackKeyFramePtr pack = buffer_pack_kf_.selectFirstPackBefore(last_ptr_, params_motion_->time_tolerance);
// ignore "future" KF to avoid MotionBuffer::split() error
if (pack && pack->key_frame->getTimeStamp() > last_ptr_->getBuffer().get().back().ts_)
pack = nullptr;
if (pack)
{
if (buffer_pack_kf_.checkTimeTolerance(pack->key_frame->getTimeStamp(), pack->time_tolerance, origin_ptr_->getTimeStamp(), params_motion_->time_tolerance))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment