Skip to content
Snippets Groups Projects
Commit 10640b9e authored by PierreGtch's avatar PierreGtch
Browse files

Add captureCallback and a BufferCapture to ProcessorBase

parent 9df657fc
No related branches found
No related tags found
1 merge request!290Resolve "ProcessorLoopClosureBase class"
Pipeline #3573 passed
...@@ -191,6 +191,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce ...@@ -191,6 +191,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
unsigned int processor_id_; unsigned int processor_id_;
ProcessorParamsBasePtr params_; ProcessorParamsBasePtr params_;
PackKeyFrameBuffer kf_pack_buffer_; PackKeyFrameBuffer kf_pack_buffer_;
BufferCapture buffer_capture_;
private: private:
SensorBaseWPtr sensor_ptr_; SensorBaseWPtr sensor_ptr_;
...@@ -249,6 +250,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce ...@@ -249,6 +250,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
FrameBasePtr emplaceFrame(FrameType _type, CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state); FrameBasePtr emplaceFrame(FrameType _type, CaptureBasePtr _capture_ptr, const Eigen::VectorXs& _state);
virtual void keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other); virtual void keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other);
virtual void captureCallback(CaptureBasePtr _capture_ptr);
SensorBasePtr getSensor(); SensorBasePtr getSensor();
const SensorBasePtr getSensor() const; const SensorBasePtr getSensor() const;
......
...@@ -57,6 +57,13 @@ void ProcessorBase::keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _ ...@@ -57,6 +57,13 @@ void ProcessorBase::keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _
kf_pack_buffer_.add(_keyframe_ptr,_time_tol_other); kf_pack_buffer_.add(_keyframe_ptr,_time_tol_other);
} }
void ProcessorBase::captureCallback(CaptureBasePtr _capture_ptr)
{
WOLF_DEBUG("P", isMotion() ? "M " : "T ", getName(), ": Capture", _capture_ptr->id(), " callback received with ts = ", _capture_ptr->getTimeStamp());
if (_capture_ptr != nullptr)
buffer_capture_.add(_capture_ptr, _capture_ptr->getTimeStamp());
}
void ProcessorBase::remove() void ProcessorBase::remove()
{ {
if (!is_removing_) if (!is_removing_)
......
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