Skip to content
Snippets Groups Projects
Commit 89a5da69 authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Make keyFrameCallback return void

parent 980eff9e
No related branches found
No related tags found
1 merge request!168Make keyFrameCallback return void
Pipeline #
This commit is part of merge request !168. Comments created here will be created in the context of that merge request.
...@@ -149,9 +149,9 @@ Eigen::Vector2s ProcessorRangeBearing::polar(const Eigen::Vector2s& rect) const ...@@ -149,9 +149,9 @@ Eigen::Vector2s ProcessorRangeBearing::polar(const Eigen::Vector2s& rect) const
return polar; return polar;
} }
bool ProcessorRangeBearing::keyFrameCallback(FrameBasePtr _key_frame, const Scalar& _time_tolerance) void ProcessorRangeBearing::keyFrameCallback(FrameBasePtr _key_frame, const Scalar& _time_tolerance)
{ {
return true; //
} }
Eigen::Vector2s ProcessorRangeBearing::rect(Scalar range, Scalar bearing) const Eigen::Vector2s ProcessorRangeBearing::rect(Scalar range, Scalar bearing) const
......
...@@ -45,7 +45,7 @@ class ProcessorRangeBearing : public ProcessorBase ...@@ -45,7 +45,7 @@ class ProcessorRangeBearing : public ProcessorBase
// Implementation of pure virtuals from ProcessorBase // Implementation of pure virtuals from ProcessorBase
virtual void process (CaptureBasePtr _capture) override; virtual void process (CaptureBasePtr _capture) override;
virtual bool voteForKeyFrame () override {return false;} virtual bool voteForKeyFrame () override {return false;}
virtual bool keyFrameCallback (FrameBasePtr _key_frame, const Scalar& _time_tolerance) ; virtual void keyFrameCallback (FrameBasePtr _key_frame, const Scalar& _time_tolerance) override;
// landmark observation models -- they would be better off in a separate library e.g. range_bearing_tools.h // landmark observation models -- they would be better off in a separate library e.g. range_bearing_tools.h
Eigen::Vector2s observe (const Eigen::Vector2s& lmk_w) const; Eigen::Vector2s observe (const Eigen::Vector2s& lmk_w) const;
......
...@@ -164,7 +164,7 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce ...@@ -164,7 +164,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);
void keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other); virtual void keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other);
SensorBasePtr getSensorPtr(); SensorBasePtr getSensorPtr();
const SensorBasePtr getSensorPtr() const; const SensorBasePtr getSensorPtr() const;
......
...@@ -22,7 +22,7 @@ void ProcessorCaptureHolder::process(CaptureBasePtr _capture_ptr) ...@@ -22,7 +22,7 @@ void ProcessorCaptureHolder::process(CaptureBasePtr _capture_ptr)
buffer_.push_back(_capture_ptr); buffer_.push_back(_capture_ptr);
} }
bool ProcessorCaptureHolder::keyFrameCallback(FrameBasePtr _keyframe_ptr, void ProcessorCaptureHolder::keyFrameCallback(FrameBasePtr _keyframe_ptr,
const Scalar& _time_tolerance) const Scalar& _time_tolerance)
{ {
assert(_keyframe_ptr->getTrajectoryPtr() != nullptr assert(_keyframe_ptr->getTrajectoryPtr() != nullptr
...@@ -37,7 +37,7 @@ bool ProcessorCaptureHolder::keyFrameCallback(FrameBasePtr _keyframe_ptr, ...@@ -37,7 +37,7 @@ bool ProcessorCaptureHolder::keyFrameCallback(FrameBasePtr _keyframe_ptr,
if (existing_capture == nullptr) if (existing_capture == nullptr)
{ {
WOLF_WARN("Could not find a capture at ts : ", new_ts.get()); WOLF_WARN("Could not find a capture at ts : ", new_ts.get());
return false; return;
} }
WOLF_DEBUG("ProcessorCaptureHolder::keyFrameCallback", _time_tolerance); WOLF_DEBUG("ProcessorCaptureHolder::keyFrameCallback", _time_tolerance);
...@@ -63,7 +63,7 @@ bool ProcessorCaptureHolder::keyFrameCallback(FrameBasePtr _keyframe_ptr, ...@@ -63,7 +63,7 @@ bool ProcessorCaptureHolder::keyFrameCallback(FrameBasePtr _keyframe_ptr,
// Remove as we don't want duplicates // Remove as we don't want duplicates
buffer_.remove(existing_capture); buffer_.remove(existing_capture);
return true; return;
} }
else else
{ {
...@@ -71,7 +71,7 @@ bool ProcessorCaptureHolder::keyFrameCallback(FrameBasePtr _keyframe_ptr, ...@@ -71,7 +71,7 @@ bool ProcessorCaptureHolder::keyFrameCallback(FrameBasePtr _keyframe_ptr,
std::abs(new_ts - existing_capture->getTimeStamp()), std::abs(new_ts - existing_capture->getTimeStamp()),
" vs ", _time_tolerance); " vs ", _time_tolerance);
return false; return;
} }
} }
......
...@@ -47,8 +47,8 @@ public: ...@@ -47,8 +47,8 @@ public:
*/ */
virtual bool voteForKeyFrame() override { return false; } virtual bool voteForKeyFrame() override { return false; }
virtual bool keyFrameCallback(FrameBasePtr _keyframe_ptr, virtual void keyFrameCallback(FrameBasePtr _keyframe_ptr,
const Scalar& _time_tolerance) ; const Scalar& _time_tolerance) override;
/** /**
* \brief Finds the capture that contains the closest previous motion of _ts * \brief Finds the capture that contains the closest previous motion of _ts
......
...@@ -38,10 +38,10 @@ void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr) ...@@ -38,10 +38,10 @@ void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr)
} }
//############################################################################## //##############################################################################
bool ProcessorLoopClosureBase::keyFrameCallback(FrameBasePtr /*_keyframe_ptr*/, void ProcessorLoopClosureBase::keyFrameCallback(FrameBasePtr /*_keyframe_ptr*/,
const Scalar& /*_time_tol_other*/) const Scalar& /*_time_tol_other*/)
{ {
return false; //
} }
}// namespace wolf }// namespace wolf
......
...@@ -56,8 +56,8 @@ public: ...@@ -56,8 +56,8 @@ public:
*/ */
virtual void process(CaptureBasePtr _incoming_ptr) override; virtual void process(CaptureBasePtr _incoming_ptr) override;
virtual bool keyFrameCallback(FrameBasePtr _keyframe_ptr, virtual void keyFrameCallback(FrameBasePtr _keyframe_ptr,
const Scalar& _time_tol_other) ; const Scalar& _time_tol_other) override ;
const std::vector<FrameBasePtr>& getCandidates() const noexcept; const std::vector<FrameBasePtr>& getCandidates() const noexcept;
......
...@@ -100,8 +100,6 @@ class ProcessorTracker : public ProcessorBase ...@@ -100,8 +100,6 @@ class ProcessorTracker : public ProcessorBase
void setMaxNewFeatures(const unsigned int& _max_new_features); void setMaxNewFeatures(const unsigned int& _max_new_features);
unsigned int getMaxNewFeatures(); unsigned int getMaxNewFeatures();
// virtual bool keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _time_tol_other);
bool checkTimeTolerance(const TimeStamp& _ts1, const TimeStamp& _ts2); bool checkTimeTolerance(const TimeStamp& _ts1, const TimeStamp& _ts2);
bool checkTimeTolerance(const CaptureBasePtr _cap, const TimeStamp& _ts); bool checkTimeTolerance(const CaptureBasePtr _cap, const TimeStamp& _ts);
bool checkTimeTolerance(const FrameBasePtr _frm, const TimeStamp& _ts); bool checkTimeTolerance(const FrameBasePtr _frm, const TimeStamp& _ts);
......
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