diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3860988eaeeebb60a99e5a75b61e50639dd746c4..ea6322714195e8fad38ecae701bd1a8a6d4789a5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,6 +57,7 @@ SET(HDRS polyline.h scan_segment.h loop_closure_base_2d.h + scene_base.h ) IF(csm_FOUND) SET(HDRS ${HDRS} @@ -97,8 +98,7 @@ SET(SRCS IF(falkolib_FOUND) SET(SRCS ${SRCS} corner_falko_2d.cpp - loop_closure_falko.cpp - corner_scene.cpp) + loop_closure_falko.cpp) ENDIF(falkolib_FOUND) diff --git a/src/corner_scene.cpp b/src/corner_scene.cpp deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/loop_closure_falko.cpp b/src/loop_closure_falko.cpp index caf5518f9bedd8756efd103469b37be6bd581c3a..5e363269a11928e5727f0adc630defbd01ab227a 100644 --- a/src/loop_closure_falko.cpp +++ b/src/loop_closure_falko.cpp @@ -27,7 +27,7 @@ namespace laserscanutils{ setGridSectors(16); // Matcher Extractor Parameters - //matcher.setDistanceThreshold(0.1); + matcher_.setDistanceThreshold(0.1); } @@ -44,10 +44,7 @@ namespace laserscanutils{ extract((*scanFALKO), (newScene->keypointsList)); // Compute descriptors - //loopClosureFalko<D,Extr,M>::extractor: extractor_.compute(*scanFALKO,newScene->keypointsList, newScene->descriptorsList); - //extractor.compute((*scanFALKO),((*newScene).keypointsList), ((*newScene).descriptorsList)); - //loopClosureFalko<D,Extr,M>::extractor::compute((*scanFALKO),((*newScene).keypointsList), ((*newScene).descriptorsList)); return newScene; } diff --git a/src/scene_base.h b/src/scene_base.h new file mode 100644 index 0000000000000000000000000000000000000000..4be0f75726c3881c66e0c69958bf944b7a7a877d --- /dev/null +++ b/src/scene_base.h @@ -0,0 +1,26 @@ +/** + * \file scene_base.h + * + * Created on: Feb 9, 2021 + * \author: spujol + */ + +#ifndef SCENE_BASE_H_ +#define SCENE_BASE_H_ + +#include <iostream> +#include <fstream> + + +namespace laserscanutils +{ + +struct sceneBase{ + //std::vector<falkolib::FALKO> keypointsList; + //std::vector<D> descriptorsList; +}; + + +} /* namespace laserscanutils */ + +#endif /* SCENE_BASE_H_ */ diff --git a/src/scene_falko.h b/src/scene_falko.h new file mode 100644 index 0000000000000000000000000000000000000000..a7da9e1a875ed9a07bf4cd888c05d003d1fb3cbf --- /dev/null +++ b/src/scene_falko.h @@ -0,0 +1,48 @@ +/** + * \file scene_falko.h + * + * Created on: Feb 9, 2021 + * \author: spujol + */ + +#ifndef SCENE_FALKO_H_ +#define SCENE_FALKO_H_ + +#include <iostream> +#include <fstream> + +/************************** + * LaserScanUtils includes * + **************************/ +#inlcude "sceneBase.h" + + +/************************** + * Falko includes * + **************************/ +#include <falkolib/Feature/FALKO.h> +#include <falkolib/Feature/CGH.h> +#include <falkolib/Feature/BSC.h> +#include <falkolib/Feature/FALKOExtractor.h> + +#include <falkolib/Feature/BSCExtractor.h> +#include <falkolib/Feature/CGHExtractor.h> + +#include <falkolib/Matching/NNMatcher.h> +#include <falkolib/Matching/AHTMatcher.h> + +namespace laserscanutils +{ + +template <typename D> +struct sceneFalko : sceneBase{ + std::vector<falkolib::FALKO> keypointsList; + std::vector<D> descriptorsList; +}; + +typedef std::shared_ptr<cornerScene<falkolib::BSC>> sceneFalkoBSCPtr; + + +} /* namespace laserscanutils */ + +#endif /* SCENE_FALKO_H_ */ diff --git a/test/gtest_loop_closure_base_2d.cpp b/test/gtest_loop_closure_base_2d.cpp index 66aca01933e50762cfa086fbfd827eef4470edca..b3439228d46b2fd879af19c3ca3bccedbef355c2 100644 --- a/test/gtest_loop_closure_base_2d.cpp +++ b/test/gtest_loop_closure_base_2d.cpp @@ -56,10 +56,6 @@ TEST(loop_closure_base_2d, convert2laserScanFalko) int firstPoint = ((*scanFALKO).ranges)[0]; - EXPECT_FALSE(false); - - ASSERT_TRUE(true); - ASSERT_EQ(firstPoint, 250); // PRINTF("All good at TestTest::DummyTestExample !\n");