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

makeFrame is not calling KFcallback()

This was not intuitive by the function name
parent 33548e7e
No related branches found
No related tags found
No related merge requests found
...@@ -30,25 +30,20 @@ bool ProcessorBase::permittedKeyFrame() ...@@ -30,25 +30,20 @@ bool ProcessorBase::permittedKeyFrame()
FrameBasePtr ProcessorBase::makeFrame(CaptureBasePtr _capture_ptr, FrameKeyType _type) FrameBasePtr ProcessorBase::makeFrame(CaptureBasePtr _capture_ptr, FrameKeyType _type)
{ {
std::cout << __FILE__ << ":" << __FUNCTION__ << "():" << __LINE__ << std::endl; std::cout << "Making " << (_type == KEY_FRAME? "key-" : "") << "frame" << std::endl;
// We need to create the new free Frame to hold what will become the last Capture // We need to create the new free Frame to hold what will become the last Capture
FrameBasePtr new_frame_ptr = getProblem()->createFrame(_type, _capture_ptr->getTimeStamp()); FrameBasePtr new_frame_ptr = getProblem()->createFrame(_type, _capture_ptr->getTimeStamp());
new_frame_ptr->addCapture(_capture_ptr); // Add incoming Capture to the new Frame new_frame_ptr->addCapture(_capture_ptr); // Add incoming Capture to the new Frame
if (_type == KEY_FRAME)
{
std::cout << __FILE__ << ":" << __FUNCTION__ << "():" << __LINE__ << std::endl;
// Keyframe callback in order to let the other processors to establish their constraints
getProblem()->keyFrameCallback(_capture_ptr->getFramePtr(), shared_from_this(), time_tolerance_);
}
return new_frame_ptr; return new_frame_ptr;
} }
FrameBasePtr ProcessorBase::makeFrame(CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state, FrameKeyType _type) FrameBasePtr ProcessorBase::makeFrame(CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state, FrameKeyType _type)
{ {
// We need to create the new free Frame to hold what will become the last Capture // We need to create the new free Frame to hold what will become the last Capture
std::cout << "Making " << (_type == KEY_FRAME? "key-" : "") << "frame" << std::endl;
FrameBasePtr new_frame_ptr = getProblem()->createFrame(_type, _state, _capture_ptr->getTimeStamp()); FrameBasePtr new_frame_ptr = getProblem()->createFrame(_type, _state, _capture_ptr->getTimeStamp());
new_frame_ptr->addCapture(_capture_ptr); // Add incoming Capture to the new Frame new_frame_ptr->addCapture(_capture_ptr); // Add incoming Capture to the new Frame
......
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