Skip to content
Snippets Groups Projects
Commit 1c27aec2 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Merge branch '252-advancederived-badly-placed' into 'devel'

Resolve "advanceDerived() badly placed"

Closes #252

See merge request !314
parents f710808b d8e67b7e
No related branches found
No related tags found
1 merge request!314Resolve "advanceDerived() badly placed"
Pipeline #4206 passed
...@@ -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;
} }
......
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