Skip to content
Snippets Groups Projects
Commit 778fccf5 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Implemented storeCapture() & storeKeyFrame() in core processors

parent a2ab02a3
No related branches found
No related tags found
1 merge request!329WIP: New processor workflow
Pipeline #3990 passed
...@@ -190,6 +190,14 @@ Eigen::Vector2s ProcessorRangeBearing::rect(Scalar range, Scalar bearing) const ...@@ -190,6 +190,14 @@ Eigen::Vector2s ProcessorRangeBearing::rect(Scalar range, Scalar bearing) const
return range * (Vector2s() << cos(bearing), sin(bearing)).finished(); 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 */ } /* namespace wolf */
// Register in the SensorFactory // Register in the SensorFactory
......
...@@ -65,6 +65,18 @@ class ProcessorRangeBearing : public ProcessorBase ...@@ -65,6 +65,18 @@ class ProcessorRangeBearing : public ProcessorBase
virtual bool triggerInKeyFrame (FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) override {return false;} virtual bool triggerInKeyFrame (FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) override {return false;}
virtual bool voteForKeyFrame () 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: private:
// control variables // control variables
Trf H_r_s; // transformation matrix, robot to sensor Trf H_r_s; // transformation matrix, robot to sensor
......
...@@ -63,6 +63,18 @@ class ProcessorCaptureHolder : public ProcessorBase ...@@ -63,6 +63,18 @@ class ProcessorCaptureHolder : public ProcessorBase
*/ */
virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) override { return true; } 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 /** \brief Vote for KeyFrame generation
* *
* If a KeyFrame criterion is validated, this function returns true, * If a KeyFrame criterion is validated, this function returns true,
......
...@@ -247,6 +247,18 @@ class ProcessorMotion : public ProcessorBase ...@@ -247,6 +247,18 @@ class ProcessorMotion : public ProcessorBase
*/ */
virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other) override {return false;} 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; virtual bool voteForKeyFrame() override;
Scalar updateDt(); Scalar updateDt();
......
...@@ -75,6 +75,16 @@ ProcessorBasePtr ProcessorCaptureHolder::create(const std::string& _unique_name, ...@@ -75,6 +75,16 @@ ProcessorBasePtr ProcessorCaptureHolder::create(const std::string& _unique_name,
return prc_ptr; return prc_ptr;
} }
bool ProcessorCaptureHolder::storeKeyFrame(FrameBasePtr _frame_ptr)
{
return false;
}
bool ProcessorCaptureHolder::storeCapture(CaptureBasePtr _cap_ptr)
{
return true;
}
} // namespace wolf } // namespace wolf
// Register in the ProcessorFactory // Register in the ProcessorFactory
......
...@@ -668,4 +668,13 @@ void ProcessorMotion::setProblem(ProblemPtr _problem) ...@@ -668,4 +668,13 @@ void ProcessorMotion::setProblem(ProblemPtr _problem)
this->getProblem()->setProcessorMotion(std::static_pointer_cast<ProcessorMotion>(shared_from_this())); 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;
}
} }
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