From c5e90bda982e42121f39ef07141a339cf8418c12 Mon Sep 17 00:00:00 2001
From: Sergi Pujol <spujol@iri.upc.edu>
Date: Tue, 27 Apr 2021 09:41:00 +0200
Subject: [PATCH] use_descriptors if rectified

---
 src/loop_closure_falko.h | 15 ++++-----------
 src/scene_falko.h        | 16 +++++-----------
 2 files changed, 9 insertions(+), 22 deletions(-)

diff --git a/src/loop_closure_falko.h b/src/loop_closure_falko.h
index 5b177d4..1e862fd 100644
--- a/src/loop_closure_falko.h
+++ b/src/loop_closure_falko.h
@@ -26,13 +26,6 @@
 /**************************
  *      Falko includes      *
  **************************/
-#include <falkolib/Feature/BSC.h>
-#include <falkolib/Feature/CGH.h>
-#include <falkolib/Feature/FALKO.h>
-#include <falkolib/Feature/FALKOExtractor.h>
-
-#include <falkolib/Feature/BSCExtractor.h>
-#include <falkolib/Feature/CGHExtractor.h>
 
 #include <falkolib/Matching/AHTMatcher.h>
 #include <falkolib/Matching/NNMatcher.h>
@@ -50,8 +43,8 @@ template <typename T, typename D> using aht_matcher = falkolib::AHTMatcher<T, D>
 struct ParameterLoopClosureFalko
 {
     // Keypoints extractor Default
-    double min_extraction_range_ = 0.1;
-    double max_extraction_range_ = 25;
+    double min_extraction_range_ = 0;
+    double max_extraction_range_ = 30;
     bool   enable_subbeam_       = true;
     double nms_radius_           = 0.1;
     double neigh_b_              = 0.01;
@@ -176,12 +169,12 @@ class LoopClosureFalko : public LoopClosureBase2d, public falkolib::FALKOExtract
 
         int matching_number = 0;
 
-        if (use_descriptors_ == 1)
+        if (use_descriptors_ == 0)
             {
                 matching_number =
                     matcher_.match(scene_1_falko->keypoints_list_, scene_2_falko->keypoints_list_, asso_nn);
             }
-        else if (use_descriptors_ == 0)
+        else if (use_descriptors_ == 1)
             {
                 matching_number =
                     matcher_.match(scene_1_falko->keypoints_list_, scene_1_falko->descriptors_list_,
diff --git a/src/scene_falko.h b/src/scene_falko.h
index cb14ddf..18529b1 100644
--- a/src/scene_falko.h
+++ b/src/scene_falko.h
@@ -22,28 +22,22 @@
 /**************************
  *      Falko includes      *
  **************************/
-#include <falkolib/Feature/BSC.h>
-#include <falkolib/Feature/CGH.h>
-#include <falkolib/Feature/FALKO.h>
-#include <falkolib/Feature/FALKOExtractor.h>
 
+#include <falkolib/Feature/FALKOExtractor.h>
 #include <falkolib/Feature/BSCExtractor.h>
 #include <falkolib/Feature/CGHExtractor.h>
 
-#include <falkolib/Matching/AHTMatcher.h>
-#include <falkolib/Matching/NNMatcher.h>
-
 namespace laserscanutils {
 
 typedef falkolib::BSC bsc;
 typedef falkolib::CGH cgh;
 
-template <typename D> struct SceneFalko : public SceneBase {
-  std::vector<falkolib::FALKO> keypoints_list_;
-  std::vector<D> descriptors_list_; 
+template <typename D> struct SceneFalko : public SceneBase
+{
+    std::vector<falkolib::FALKO> keypoints_list_;
+    std::vector<D>               descriptors_list_;
 };
 
-
 } /* namespace laserscanutils */
 
 #endif /* SCENE_FALKO_H_ */
-- 
GitLab