Skip to content
Snippets Groups Projects
Commit 957f3427 authored by PierreGtch's avatar PierreGtch
Browse files

Rename class ProcessorLoopClosureBase2 to ProcessorLoopClosureBase

parent 8f1d58cc
No related branches found
No related tags found
1 merge request!290Resolve "ProcessorLoopClosureBase class"
Pipeline #3740 passed
#ifndef _WOLF_PROCESSOR_LOOPCLOSURE_BASE2_H #ifndef _WOLF_PROCESSOR_LOOPCLOSURE_BASE_H
#define _WOLF_PROCESSOR_LOOPCLOSURE_BASE2_H #define _WOLF_PROCESSOR_LOOPCLOSURE_BASE_H
// Wolf related headers // Wolf related headers
#include "core/processor/processor_base.h" #include "core/processor/processor_base.h"
namespace wolf{ namespace wolf{
WOLF_STRUCT_PTR_TYPEDEFS(ProcessorParamsLoopClosure2); WOLF_STRUCT_PTR_TYPEDEFS(ProcessorParamsLoopClosure);
struct ProcessorParamsLoopClosure2 : public ProcessorParamsBase struct ProcessorParamsLoopClosure : public ProcessorParamsBase
{ {
using ProcessorParamsBase::ProcessorParamsBase; using ProcessorParamsBase::ProcessorParamsBase;
// virtual ~ProcessorParamsLoopClosure2() = default; // virtual ~ProcessorParamsLoopClosure() = default;
// add neccesery parameters for loop closure initialisation here and initialize // add neccesery parameters for loop closure initialisation here and initialize
// them in constructor // them in constructor
...@@ -42,17 +42,17 @@ struct ProcessorParamsLoopClosure2 : public ProcessorParamsBase ...@@ -42,17 +42,17 @@ struct ProcessorParamsLoopClosure2 : public ProcessorParamsBase
* which are called at the beginning and at the end of process() respectively. * which are called at the beginning and at the end of process() respectively.
*/ */
class ProcessorLoopClosureBase2 : public ProcessorBase class ProcessorLoopClosureBase : public ProcessorBase
{ {
protected: protected:
ProcessorParamsLoopClosure2Ptr params_loop_closure_; ProcessorParamsLoopClosurePtr params_loop_closure_;
public: public:
ProcessorLoopClosureBase2(const std::string& _type, ProcessorParamsLoopClosure2Ptr _params_loop_closure); ProcessorLoopClosureBase(const std::string& _type, ProcessorParamsLoopClosurePtr _params_loop_closure);
virtual ~ProcessorLoopClosureBase2() = default; virtual ~ProcessorLoopClosureBase() = default;
virtual void configure(SensorBasePtr _sensor) override { }; virtual void configure(SensorBasePtr _sensor) override { };
/** \brief Full processing of an incoming Capture. /** \brief Full processing of an incoming Capture.
...@@ -151,4 +151,4 @@ protected: ...@@ -151,4 +151,4 @@ protected:
} // namespace wolf } // namespace wolf
#endif /* _WOLF_PROCESSOR_LOOPCLOSURE_BASE2_H */ #endif /* _WOLF_PROCESSOR_LOOPCLOSURE_BASE_H */
/** /**
* \file processor_loop_closure2.h * \file processor_loop_closure.h
* *
* Created on: Mai 31, 2019 * Created on: Mai 31, 2019
* \author: Pierre Guetschel * \author: Pierre Guetschel
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
namespace wolf namespace wolf
{ {
ProcessorLoopClosureBase2::ProcessorLoopClosureBase2(const std::string& _type, ProcessorParamsLoopClosure2Ptr _params_loop_closure): ProcessorLoopClosureBase::ProcessorLoopClosureBase(const std::string& _type, ProcessorParamsLoopClosurePtr _params_loop_closure):
ProcessorBase(_type, _params_loop_closure), ProcessorBase(_type, _params_loop_closure),
params_loop_closure_(_params_loop_closure) params_loop_closure_(_params_loop_closure)
{ {
...@@ -19,7 +19,7 @@ ProcessorLoopClosureBase2::ProcessorLoopClosureBase2(const std::string& _type, P ...@@ -19,7 +19,7 @@ ProcessorLoopClosureBase2::ProcessorLoopClosureBase2(const std::string& _type, P
} }
//############################################################################## //##############################################################################
void ProcessorLoopClosureBase2::process(CaptureBasePtr _incoming_ptr) void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr)
{ {
// the pre-process, if necessary, is implemented in the derived classes // the pre-process, if necessary, is implemented in the derived classes
preProcess(); preProcess();
...@@ -48,7 +48,7 @@ void ProcessorLoopClosureBase2::process(CaptureBasePtr _incoming_ptr) ...@@ -48,7 +48,7 @@ void ProcessorLoopClosureBase2::process(CaptureBasePtr _incoming_ptr)
* In the default implementation, we select the KF with the most recent TimeStamp * In the default implementation, we select the KF with the most recent TimeStamp
* and that is compatible with at least a Capture * and that is compatible with at least a Capture
*/ */
std::pair<FrameBasePtr,CaptureBasePtr> ProcessorLoopClosureBase2::selectPairKC() std::pair<FrameBasePtr,CaptureBasePtr> ProcessorLoopClosureBase::selectPairKC()
{ {
std::map<TimeStamp,PackKeyFramePtr> kf_container = buffer_pack_kf_.getContainer(); std::map<TimeStamp,PackKeyFramePtr> kf_container = buffer_pack_kf_.getContainer();
if (kf_container.empty()){ if (kf_container.empty()){
......
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