diff --git a/hello_wolf/processor_range_bearing.cpp b/hello_wolf/processor_range_bearing.cpp index 3dda45a3e26b72fb5a75766a824cf740af460a0c..9e72c57b7caf1c4d0a3201caaf4efe3d8db68884 100644 --- a/hello_wolf/processor_range_bearing.cpp +++ b/hello_wolf/processor_range_bearing.cpp @@ -149,6 +149,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 4df0ebf96b97a28d4feb0f387cbe08de4814e2cb..b3282aba8a6119b6797f2f00b476e100d486a441 100644 --- a/hello_wolf/processor_range_bearing.h +++ b/hello_wolf/processor_range_bearing.h @@ -60,6 +60,18 @@ class ProcessorRangeBearing : public ProcessorBase virtual bool triggerInKeyFrame (FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) const override {return false;} virtual bool voteForKeyFrame () const 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_motion.h b/include/core/processor/processor_motion.h index eee6c0e1c41289c54d7a3b81b08fdfb07de7bad4..467f0c6a7970823699c907fb64afc80f654366a7 100644 --- a/include/core/processor/processor_motion.h +++ b/include/core/processor/processor_motion.h @@ -249,6 +249,18 @@ class ProcessorMotion : public ProcessorBase */ virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) const 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() const override; Scalar updateDt(); diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp index 862929e78620bcae03b3deed36a64c9909dbf080..65c1bb6b683f11893cf4f1f05473f9aeba640a3c 100644 --- a/src/processor/processor_motion.cpp +++ b/src/processor/processor_motion.cpp @@ -617,4 +617,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; +} + }