From 756eb9881832c43ca1cf4294a2785f184cc9a3a5 Mon Sep 17 00:00:00 2001 From: Sergi Pujol <sergi.pujol.badell@estudiantat.upc.edu> Date: Mon, 15 Feb 2021 13:57:54 +0100 Subject: [PATCH] implemented loopClosureFalko::extractScene with override --- src/loop_closure_base_2d.h | 5 +++-- src/loop_closure_falko.h | 3 +-- src/scene_base.h | 1 + src/scene_falko.h | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/loop_closure_base_2d.h b/src/loop_closure_base_2d.h index a634af4..97965a4 100644 --- a/src/loop_closure_base_2d.h +++ b/src/loop_closure_base_2d.h @@ -17,6 +17,7 @@ **************************/ #include "laser_scan.h" #include "scene_base.h" +#include "scene_falko.h" /************************** * Falko includes * @@ -52,11 +53,11 @@ public: /** \brief compare new scans against the trained set in order to find loop closures **/ //virtual void findLoopClosure(std::list<cornerScene>& scenes, const cornerScene newScene){} - virtual void findLoopClosure(){} + //virtual void findLoopClosure(){} /** \brief update the scene struct with keypoints and descriptors **/ - //virtual void extractScene(LaserScan &scan,LaserScanParams &scanParams){} + virtual std::shared_ptr<sceneFalko<falkolib::BSC>> extractScene(LaserScan &scan,LaserScanParams &scanParams){} /** \brief Convert scans from laserscanutils::LaserScan to falkolib::LaserScan object **/ diff --git a/src/loop_closure_falko.h b/src/loop_closure_falko.h index 35be401..e75c91d 100644 --- a/src/loop_closure_falko.h +++ b/src/loop_closure_falko.h @@ -51,7 +51,6 @@ private: public: Extr extractor_; M matcher_; - int test=1; /** \brief Constructor **/ @@ -67,7 +66,7 @@ public: /** \brief update the scene struct with keypoints and descriptors **/ - std::shared_ptr<sceneFalko<D>> extractScene(LaserScan &scan,LaserScanParams &scanParams); + std::shared_ptr<sceneFalko<D>> extractScene(LaserScan &scan,LaserScanParams &scanParams) override; }; diff --git a/src/scene_base.h b/src/scene_base.h index 4be0f75..7e7dd89 100644 --- a/src/scene_base.h +++ b/src/scene_base.h @@ -18,6 +18,7 @@ namespace laserscanutils struct sceneBase{ //std::vector<falkolib::FALKO> keypointsList; //std::vector<D> descriptorsList; + std::vector<double> test; }; diff --git a/src/scene_falko.h b/src/scene_falko.h index 73f857f..65b7253 100644 --- a/src/scene_falko.h +++ b/src/scene_falko.h @@ -35,7 +35,7 @@ namespace laserscanutils { template <typename D> -struct sceneFalko : sceneBase{ +struct sceneFalko : public sceneBase{ std::vector<falkolib::FALKO> keypointsList; std::vector<D> descriptorsList; }; -- GitLab