diff --git a/hello_wolf/processor_range_bearing.cpp b/hello_wolf/processor_range_bearing.cpp index 7cf2c04facbba1b1523d533a05f83ddba3e6a853..7ecc1ac435edb87cfe0d85180a09a9287c2ccc75 100644 --- a/hello_wolf/processor_range_bearing.cpp +++ b/hello_wolf/processor_range_bearing.cpp @@ -190,6 +190,14 @@ Eigen::Vector2s ProcessorRangeBearing::rect(Scalar range, Scalar bearing) const return range * (Vector2s() << cos(bearing), sin(bearing)).finished(); } +bool ProcessorRangeBearing::storeKeyFrame(FrameBasePtr _frame_ptr) +{ + return true; +} +bool ProcessorRangeBearing::storeCapture(CaptureBasePtr _cap_ptr) +{ + return false; +} } /* namespace wolf */ // Register in the SensorFactory diff --git a/hello_wolf/processor_range_bearing.h b/hello_wolf/processor_range_bearing.h index ff99fddfba05ce919949b115c74c6b73a429b633..3973a733900cb12fd123bca9dd4f339372129f67 100644 --- a/hello_wolf/processor_range_bearing.h +++ b/hello_wolf/processor_range_bearing.h @@ -65,6 +65,18 @@ class ProcessorRangeBearing : public ProcessorBase virtual bool triggerInKeyFrame (FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) override {return false;} virtual bool voteForKeyFrame () override {return false;} + /** \brief store key frame + * + * Returns true if the key frame should be stored + */ + virtual bool storeKeyFrame(FrameBasePtr) override; + + /** \brief store capture + * + * Returns true if the capture should be stored + */ + virtual bool storeCapture(CaptureBasePtr) override; + private: // control variables Trf H_r_s; // transformation matrix, robot to sensor diff --git a/include/core/processor/processor_capture_holder.h b/include/core/processor/processor_capture_holder.h index 19b33f8f2629cf4e6d1a61888732ce3d1d197568..1ddce179bf880963114b94cac987008b97de89ce 100644 --- a/include/core/processor/processor_capture_holder.h +++ b/include/core/processor/processor_capture_holder.h @@ -63,6 +63,18 @@ class ProcessorCaptureHolder : public ProcessorBase */ virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) override { return true; } + /** \brief store key frame + * + * Returns true if the key frame should be stored + */ + virtual bool storeKeyFrame(FrameBasePtr) override; + + /** \brief store capture + * + * Returns true if the capture should be stored + */ + virtual bool storeCapture(CaptureBasePtr) override; + /** \brief Vote for KeyFrame generation * * If a KeyFrame criterion is validated, this function returns true, diff --git a/include/core/processor/processor_motion.h b/include/core/processor/processor_motion.h index c7fc1771fa68882ac8f05d8d139dec0c3cbbfcef..564b714b030fc7eb42993fd22a8a4ac691350e43 100644 --- a/include/core/processor/processor_motion.h +++ b/include/core/processor/processor_motion.h @@ -247,6 +247,18 @@ class ProcessorMotion : public ProcessorBase */ virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) override {return false;} + /** \brief store key frame + * + * Returns true if the key frame should be stored + */ + virtual bool storeKeyFrame(FrameBasePtr) override; + + /** \brief store capture + * + * Returns true if the capture should be stored + */ + virtual bool storeCapture(CaptureBasePtr) override; + virtual bool voteForKeyFrame() override; Scalar updateDt(); diff --git a/src/processor/processor_capture_holder.cpp b/src/processor/processor_capture_holder.cpp index 5cad88a4e5c5eca8e94d6af99a67eb22ba9e3147..c3fd19abdb7a4d9a7b3fbb6c97a614df3108de2b 100644 --- a/src/processor/processor_capture_holder.cpp +++ b/src/processor/processor_capture_holder.cpp @@ -75,6 +75,16 @@ ProcessorBasePtr ProcessorCaptureHolder::create(const std::string& _unique_name, return prc_ptr; } +bool ProcessorCaptureHolder::storeKeyFrame(FrameBasePtr _frame_ptr) +{ + return false; +} +bool ProcessorCaptureHolder::storeCapture(CaptureBasePtr _cap_ptr) +{ + return true; +} + + } // namespace wolf // Register in the ProcessorFactory diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp index 27b56edaa822a7d9e0ceee7def1a64d0aa55dde3..b8076cb23219badaec8509f934810c28cdd37ce2 100644 --- a/src/processor/processor_motion.cpp +++ b/src/processor/processor_motion.cpp @@ -668,4 +668,13 @@ void ProcessorMotion::setProblem(ProblemPtr _problem) this->getProblem()->setProcessorMotion(std::static_pointer_cast<ProcessorMotion>(shared_from_this())); }; +bool ProcessorMotion::storeKeyFrame(FrameBasePtr _frame_ptr) +{ + return true; +} +bool ProcessorMotion::storeCapture(CaptureBasePtr _cap_ptr) +{ + return false; +} + }