From 20a993d6cb4186ef43b147870f812be1a3868362 Mon Sep 17 00:00:00 2001 From: Sergi Pujol <spujol@iri.upc.edu> Date: Tue, 6 Apr 2021 17:19:09 +0200 Subject: [PATCH] renaming to MatchLoopClosureScene --- src/CMakeLists.txt | 2 +- src/loop_closure_base.h | 8 ++++---- src/loop_closure_falko.h | 6 +++--- ...match_loop_closure.h => match_loop_closure_scene.h} | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) rename src/{match_loop_closure.h => match_loop_closure_scene.h} (66%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c0814b..fee4770 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -70,7 +70,7 @@ SET(HDRS corner_falko_2d.h loop_closure_falko.h scene_falko.h - match_loop_closure.h) + match_loop_closure_scene.h) ENDIF(falkolib_FOUND) #sources diff --git a/src/loop_closure_base.h b/src/loop_closure_base.h index 1109b2d..fe790cf 100644 --- a/src/loop_closure_base.h +++ b/src/loop_closure_base.h @@ -16,7 +16,7 @@ * laser_scan_utils includes * **************************/ #include "laser_scan.h" -#include "match_loop_closure.h" +#include "match_loop_closure_scene.h" #include "scene_base.h" namespace laserscanutils { @@ -42,16 +42,16 @@ public: /** \brief Create and update a matchLoopClosure struct with the info that is *produced when matching two given scenes **/ - virtual matchLoopClosurePtr matchScene(sceneBasePtr _scene1, + virtual MatchLoopClosureScenePtr matchScene(sceneBasePtr _scene1, sceneBasePtr _scene2) = 0; /** \brief compare new scans against the trained set in order to find loop *closures **/ - virtual std::map<double, matchLoopClosurePtr> + virtual std::map<double, MatchLoopClosureScenePtr> findLoopClosure(std::list<std::shared_ptr<SceneBase>> _l_scenes, const sceneBasePtr _new_scene) { - std::map<double, matchLoopClosurePtr> matchings; + std::map<double, MatchLoopClosureScenePtr> matchings; for (auto ref_scene : _l_scenes) { auto match = matchScene(ref_scene, _new_scene); matchings.emplace(match->score, match); diff --git a/src/loop_closure_falko.h b/src/loop_closure_falko.h index 6d8b763..75a194b 100644 --- a/src/loop_closure_falko.h +++ b/src/loop_closure_falko.h @@ -20,7 +20,7 @@ **************************/ #include "laser_scan.h" #include "loop_closure_base.h" -#include "match_loop_closure.h" +#include "match_loop_closure_scene.h" #include "scene_falko.h" /************************** @@ -149,7 +149,7 @@ public: /** \brief Create and update a matchLoopClosure struct with the info that is *produced when matching two given scenes **/ - matchLoopClosurePtr matchScene(sceneBasePtr _scene_1, + MatchLoopClosureScenePtr matchScene(sceneBasePtr _scene_1, sceneBasePtr _scene_2) override { std::vector<std::pair<int, int>> asso_nn; @@ -167,7 +167,7 @@ public: scene_2_falko->keypoints_list_, scene_2_falko->descriptors_list_, asso_nn); } - auto new_match = std::make_shared<MatchLoopClosure>(); + auto new_match = std::make_shared<MatchLoopClosureScene>(); new_match->keypoints_number_match = matching_number; if (matching_number > keypoints_number_th_) { new_match->match = computeTransform(scene_1_falko->keypoints_list_, diff --git a/src/match_loop_closure.h b/src/match_loop_closure_scene.h similarity index 66% rename from src/match_loop_closure.h rename to src/match_loop_closure_scene.h index b6880ed..47bfa22 100644 --- a/src/match_loop_closure.h +++ b/src/match_loop_closure_scene.h @@ -5,8 +5,8 @@ * \author: spujol */ -#ifndef MATCH_LOOP_CLOSURE_H_ -#define MATCH_LOOP_CLOSURE_H_ +#ifndef MATCH_LOOP_CLOSURE_SCENE_H_ +#define MATCH_LOOP_CLOSURE_SCENE_H_ #include <fstream> #include <iostream> @@ -17,7 +17,7 @@ namespace laserscanutils { -struct MatchLoopClosure { +struct MatchLoopClosureScene { sceneBasePtr scene_1; //ref_scene sceneBasePtr scene_2; //new_scene @@ -27,8 +27,8 @@ struct MatchLoopClosure { Eigen::Affine2d transform; }; -typedef std::shared_ptr<MatchLoopClosure> matchLoopClosurePtr; +typedef std::shared_ptr<MatchLoopClosureScene> MatchLoopClosureScenePtr; } /* namespace laserscanutils */ -#endif /* MATCH_LOOP_CLOSURE_H_ */ +#endif /* MATCH_LOOP_CLOSURE_SCENE_H_ */ -- GitLab