diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c0814b5054cabfd7565dc02ccfc9d9ccde7f0b4..fee4770bdba203fb9a05226d54c9de23e30e96ce 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 1109b2dbc7656cc02f36c3a5279f7c4fb0d54933..fe790cf932eec88c95fefa27186833096b3703aa 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 6d8b76367bc1336c10c6c0645518cee7fe31e21a..75a194b74c6d6d861a6f4bbe5dfdf3c9405e1330 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 b6880edee4a44a28cd528c89fca7b3114dac2f19..47bfa2295a32d8f058141e90de237c6fa44521b5 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_ */