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

Fix API

parent 12e43c9e
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,7 @@ bool ProcessorBase::permittedKeyFrame() ...@@ -29,7 +29,7 @@ bool ProcessorBase::permittedKeyFrame()
return getProblem()->permitKeyFrame(shared_from_this()); return getProblem()->permitKeyFrame(shared_from_this());
} }
FrameBasePtr ProcessorBase::emplaceFrame(CaptureBasePtr _capture_ptr, FrameType _type) FrameBasePtr ProcessorBase::emplaceFrame(FrameType _type, CaptureBasePtr _capture_ptr)
{ {
std::cout << "Making " << (_type == KEY_FRAME? "key-" : "") << "frame" << std::endl; std::cout << "Making " << (_type == KEY_FRAME? "key-" : "") << "frame" << std::endl;
...@@ -39,12 +39,10 @@ FrameBasePtr ProcessorBase::emplaceFrame(CaptureBasePtr _capture_ptr, FrameType ...@@ -39,12 +39,10 @@ FrameBasePtr ProcessorBase::emplaceFrame(CaptureBasePtr _capture_ptr, FrameType
return new_frame_ptr; return new_frame_ptr;
} }
FrameBasePtr ProcessorBase::emplaceFrame(CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state, FrameType _type) FrameBasePtr ProcessorBase::emplaceFrame(FrameType _type, CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state)
{ {
std::cout << "Making " << (_type == KEY_FRAME? "key-" : "") << "frame" << std::endl; FrameBasePtr new_frame_ptr = emplaceFrame(_type, _capture_ptr);
new_frame_ptr->setState(_state);
FrameBasePtr new_frame_ptr = getProblem()->emplaceFrame(_type, _state, _capture_ptr->getTimeStamp());
new_frame_ptr->addCapture(_capture_ptr);
return new_frame_ptr; return new_frame_ptr;
} }
......
...@@ -63,7 +63,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce ...@@ -63,7 +63,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
* - Put it in the Trajectory, and * - Put it in the Trajectory, and
* - Add the provided capture on it. * - Add the provided capture on it.
*/ */
FrameBasePtr emplaceFrame(CaptureBasePtr _capture_ptr, FrameType _type = NON_KEY_FRAME); FrameBasePtr emplaceFrame(FrameType _type, CaptureBasePtr _capture_ptr);
/**\brief make a Frame with the provided Capture /**\brief make a Frame with the provided Capture
* *
* Provide the following functionality: * Provide the following functionality:
...@@ -72,7 +72,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce ...@@ -72,7 +72,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
* - Put it in the Trajectory, and * - Put it in the Trajectory, and
* - Add the provided capture on it. * - Add the provided capture on it.
*/ */
FrameBasePtr emplaceFrame(CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state, FrameType _type = NON_KEY_FRAME); FrameBasePtr emplaceFrame(FrameType _type, CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state);
virtual bool keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _time_tolerance) = 0; virtual bool keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _time_tolerance) = 0;
......
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