From 49ced181a0d39af914b9cff178febfed52bc625a Mon Sep 17 00:00:00 2001 From: Sergi Pujol <sergi.pujol.badell@estudiantat.upc.edu> Date: Mon, 22 Feb 2021 10:56:36 +0100 Subject: [PATCH] code guidelines --- src/loop_closure_falko.h | 58 ++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/loop_closure_falko.h b/src/loop_closure_falko.h index 6089b8a..7102075 100644 --- a/src/loop_closure_falko.h +++ b/src/loop_closure_falko.h @@ -47,22 +47,22 @@ typedef falkolib::CGHExtractor<falkolib::FALKO> cghExtractor; typedef falkolib::AHTMatcher<falkolib::FALKO> AHTatcher; struct parameterLoopClosureFalko { - // Keypoints extractor - double _min_extraction_range=0.1; - double _max_extraction_range=25; - bool _enable_subbeam=true; - double _nms_radius=0.1; - double _neigh_b=0.01; - double _b_ratio=4; - int _grid_sectors=16; - - //Descriptors parameters - int _circularSectorNumber = 16; - int _radialRingNumber = 8; - - //matcher threshold - double matcher_distance_th=0.1; - int keypoints_number_th = 5; + // Keypoints extractor Default + double min_extraction_range_=0.1; + double max_extraction_range_=25; + bool enable_subbeam_=true; + double nms_radius_=0.1; + double neigh_b_=0.01; + double b_ratio_=4; + int grid_sectors_=16; + + //Descriptors parameters Default + int circularSectorNumber_ = 16; + int radialRingNumber_ = 8; + + //matcher threshold Default + double matcher_distance_th_=0.1; + int keypoints_number_th_ = 5; }; /** \brief A base class for loop closure using falko library @@ -82,21 +82,21 @@ public: /** \brief Constructor **/ - loopClosureFalko(parameterLoopClosureFalko param) + loopClosureFalko(parameterLoopClosureFalko _param) : loopClosureBase2d(), falkolib::FALKOExtractor(), - extractor_(param._circularSectorNumber, param._radialRingNumber), matcher_() { + extractor_(_param.circularSectorNumber_, _param.radialRingNumber_), matcher_() { // FALKO Extractor Parameters - setMinExtractionRange(param._min_extraction_range); - setMaxExtractionRange(param._max_extraction_range); - enableSubbeam(param._enable_subbeam); - setNMSRadius(param._nms_radius); - setNeighB(param._neigh_b); - setBRatio(param._b_ratio); - setGridSectors(param._grid_sectors); + setMinExtractionRange(_param.min_extraction_range_); + setMaxExtractionRange(_param.max_extraction_range_); + enableSubbeam(_param.enable_subbeam_); + setNMSRadius(_param.nms_radius_); + setNeighB(_param.neigh_b_); + setBRatio(_param.b_ratio_); + setGridSectors(_param.grid_sectors_); // Matcher Extractor Parameters - matcher_.setDistanceThreshold(param.matcher_distance_th); - keypoints_number_th = param.keypoints_number_th; + matcher_.setDistanceThreshold(_param.matcher_distance_th_); + keypoints_number_th_ = _param.keypoints_number_th_; }; /** \brief Destructor @@ -139,7 +139,7 @@ public: matcher_.match(_scene1->keypointsList, _scene2->keypointsList, asso_nn); auto new_match = std::make_shared<matchLoopClosure<D>>(); new_match->keypointsNumberMatch = matching_number; - if (matching_number > keypoints_number_th) { + if (matching_number > keypoints_number_th_) { new_match->match = true; } else { new_match->match = false; @@ -165,7 +165,7 @@ public: return matchings; } - int keypoints_number_th; + int keypoints_number_th_; }; } /* namespace laserscanutils */ -- GitLab