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

Clarify code in ProcBase::makeFrame()

parent df8893c0
No related branches found
No related tags found
No related merge requests found
......@@ -31,21 +31,19 @@ FrameBasePtr ProcessorBase::makeFrame(CaptureBasePtr _capture_ptr, FrameType _ty
{
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
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);
return new_frame_ptr;
}
FrameBasePtr ProcessorBase::makeFrame(CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state, FrameType _type)
{
// 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());
new_frame_ptr->addCapture(_capture_ptr);
new_frame_ptr->addCapture(_capture_ptr); // Add incoming Capture to the new Frame
return new_frame_ptr;
}
......
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