Skip to content
Snippets Groups Projects

Resolve "advanceDerived() badly placed"

Merged Joan Solà Ortega requested to merge 252-advancederived-badly-placed into devel
1 file
+ 10
4
Compare changes
  • Side-by-side
  • Inline
@@ -159,6 +159,8 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
@@ -159,6 +159,8 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
}
}
case RUNNING_WITHOUT_PACK :
case RUNNING_WITHOUT_PACK :
{
{
 
WOLF_DEBUG( "PT ", getName(), " RUNNING_WITHOUT_PACK");
 
processKnown();
processKnown();
if (voteForKeyFrame() && permittedKeyFrame())
if (voteForKeyFrame() && permittedKeyFrame())
@@ -210,12 +212,14 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
@@ -210,12 +212,14 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
getProblem()->auxFrameCallback(last_ptr_->getFrame(), std::static_pointer_cast<ProcessorBase>(shared_from_this()), params_tracker_->time_tolerance);
getProblem()->auxFrameCallback(last_ptr_->getFrame(), std::static_pointer_cast<ProcessorBase>(shared_from_this()), params_tracker_->time_tolerance);
// Advance this
// Advance this
 
advanceDerived();
 
 
// Replace last frame for a new one in incoming
last_ptr_->getFrame()->addCapture(incoming_ptr_); // Add incoming Capture to the tracker's last Frame
last_ptr_->getFrame()->addCapture(incoming_ptr_); // Add incoming Capture to the tracker's last Frame
// do not remove! last_ptr_->remove();
// do not remove! last_ptr_->remove();
incoming_ptr_->getFrame()->setTimeStamp(incoming_ptr_->getTimeStamp());
incoming_ptr_->getFrame()->setTimeStamp(incoming_ptr_->getTimeStamp());
// Update pointers
// Update pointers
advanceDerived();
last_ptr_ = incoming_ptr_;
last_ptr_ = incoming_ptr_;
incoming_ptr_ = nullptr;
incoming_ptr_ = nullptr;
}*/
}*/
@@ -224,14 +228,16 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
@@ -224,14 +228,16 @@ void ProcessorTracker::processCapture(CaptureBasePtr _incoming_ptr)
// We do not create a KF
// We do not create a KF
// Advance this
// Advance this
 
advanceDerived();
 
 
// Replace last frame for a new one in incoming
FrameBasePtr frm = getProblem()->emplaceFrame(NON_ESTIMATED, last_ptr_->getFrame()->getState(), incoming_ptr_->getTimeStamp());
FrameBasePtr frm = getProblem()->emplaceFrame(NON_ESTIMATED, last_ptr_->getFrame()->getState(), incoming_ptr_->getTimeStamp());
incoming_ptr_->link(frm);
incoming_ptr_->link(frm);
last_ptr_->getFrame()->remove(); // implicitly calling last_ptr_->remove();
last_ptr_->getFrame()->remove(); // implicitly calling last_ptr_->remove();
// Update pointers
// Update pointers
advanceDerived();
last_ptr_ = incoming_ptr_;
last_ptr_ = incoming_ptr_;
incoming_ptr_ = nullptr;
incoming_ptr_ = nullptr;
}
}
break;
break;
}
}
Loading