Skip to content
Snippets Groups Projects
Commit 6f97b6dd authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

Merge branch '5-new-processors-workflow' into 'devel'

Resolve "New processors workflow"

Closes #5

See merge request !5
parents a7a62a0d e99a33c7
No related branches found
No related tags found
1 merge request!5Resolve "New processors workflow"
...@@ -44,7 +44,33 @@ class ProcessorGnssFix : public ProcessorBase ...@@ -44,7 +44,33 @@ class ProcessorGnssFix : public ProcessorBase
ProcessorGnssFix(ProcessorParamsGnssFixPtr _params, SensorGnssPtr _sensor_gnss_ptr); ProcessorGnssFix(ProcessorParamsGnssFixPtr _params, SensorGnssPtr _sensor_gnss_ptr);
virtual ~ProcessorGnssFix(); virtual ~ProcessorGnssFix();
virtual void configure(SensorBasePtr _sensor); virtual void configure(SensorBasePtr _sensor);
virtual void process(CaptureBasePtr _capture_ptr);
protected:
/** \brief process an incoming capture
*
* Each derived processor should implement this function. It will be called if:
* - A new capture arrived and triggerInCapture() returned true.
*/
virtual void processCapture(CaptureBasePtr) override;
/** \brief process an incoming key-frame
*
* The ProcessorTracker only processes incoming captures (it is not called).
*/
virtual void processKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tolerance) override {};
/** \brief trigger in capture
*
* Returns true if processCapture() should be called after the provided capture arrived.
*/
virtual bool triggerInCapture(CaptureBasePtr) override;
/** \brief trigger in key-frame
*
* The ProcessorTracker only processes incoming captures, then it returns false.
*/
virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tolerance) override {return false;}
virtual bool voteForKeyFrame(); virtual bool voteForKeyFrame();
private: private:
...@@ -56,6 +82,11 @@ class ProcessorGnssFix : public ProcessorBase ...@@ -56,6 +82,11 @@ class ProcessorGnssFix : public ProcessorBase
}; };
inline bool ProcessorGnssFix::triggerInCapture(CaptureBasePtr)
{
return true;
}
} // namespace wolf } // namespace wolf
#endif //WOLF_PROCESSOR_GNSS_FIX_H #endif //WOLF_PROCESSOR_GNSS_FIX_H
...@@ -25,9 +25,36 @@ class ProcessorGnssSingleDiff : public ProcessorBase ...@@ -25,9 +25,36 @@ class ProcessorGnssSingleDiff : public ProcessorBase
ProcessorGnssSingleDiff(ProcessorParamsBasePtr _params, SensorGnssPtr _sensor_gnss_ptr); ProcessorGnssSingleDiff(ProcessorParamsBasePtr _params, SensorGnssPtr _sensor_gnss_ptr);
virtual ~ProcessorGnssSingleDiff(); virtual ~ProcessorGnssSingleDiff();
virtual void configure(SensorBasePtr _sensor); virtual void configure(SensorBasePtr _sensor);
virtual void process(CaptureBasePtr _capture_ptr);
protected:
/** \brief process an incoming capture
*
* Each derived processor should implement this function. It will be called if:
* - A new capture arrived and triggerInCapture() returned true.
*/
virtual void processCapture(CaptureBasePtr) override;
/** \brief process an incoming key-frame
*
* The ProcessorTracker only processes incoming captures (it is not called).
*/
virtual void processKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tolerance) override {};
/** \brief trigger in capture
*
* Returns true if processCapture() should be called after the provided capture arrived.
*/
virtual bool triggerInCapture(CaptureBasePtr) override;
/** \brief trigger in key-frame
*
* The ProcessorTracker only processes incoming captures, then it returns false.
*/
virtual bool triggerInKeyFrame(FrameBasePtr _keyframe_ptr, const Scalar& _time_tolerance) override {return false;}
virtual bool voteForKeyFrame(); virtual bool voteForKeyFrame();
private: private:
FactorBasePtr emplaceFactor(FeatureBasePtr& ftr_ptr); FactorBasePtr emplaceFactor(FeatureBasePtr& ftr_ptr);
...@@ -36,6 +63,11 @@ class ProcessorGnssSingleDiff : public ProcessorBase ...@@ -36,6 +63,11 @@ class ProcessorGnssSingleDiff : public ProcessorBase
}; };
inline bool ProcessorGnssSingleDiff::triggerInCapture(CaptureBasePtr)
{
return true;
}
} // namespace wolf } // namespace wolf
#endif //WOLF_PROCESSOR_GNSS_SINGLE_DIFF_H #endif //WOLF_PROCESSOR_GNSS_SINGLE_DIFF_H
...@@ -21,7 +21,7 @@ ProcessorGnssFix::~ProcessorGnssFix() ...@@ -21,7 +21,7 @@ ProcessorGnssFix::~ProcessorGnssFix()
// //
} }
void ProcessorGnssFix::process(CaptureBasePtr _capture_ptr) void ProcessorGnssFix::processCapture(CaptureBasePtr _capture_ptr)
{ {
// TODO: keep captures in a buffer and deal with KFpacks // TODO: keep captures in a buffer and deal with KFpacks
......
...@@ -19,7 +19,7 @@ ProcessorGnssSingleDiff::~ProcessorGnssSingleDiff() ...@@ -19,7 +19,7 @@ ProcessorGnssSingleDiff::~ProcessorGnssSingleDiff()
// //
} }
void ProcessorGnssSingleDiff::process(CaptureBasePtr _capture_ptr) void ProcessorGnssSingleDiff::processCapture(CaptureBasePtr _capture_ptr)
{ {
// TODO: keep captures in a buffer and deal with KFpacks // TODO: keep captures in a buffer and deal with KFpacks
......
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