Skip to content
Snippets Groups Projects
Commit bf3c8291 authored by Sergi Pujol's avatar Sergi Pujol
Browse files

gtest modified

parent 2213dd70
No related branches found
No related tags found
1 merge request!4Resolve "Implementation of Falko lib"
This commit is part of merge request !4. Comments created here will be created in the context of that merge request.
...@@ -16,7 +16,7 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) { ...@@ -16,7 +16,7 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) {
scan.ranges_raw_.push_back(testRanges1[i]); scan.ranges_raw_.push_back(testRanges1[i]);
scan2.ranges_raw_.push_back(testRanges2[i]); scan2.ranges_raw_.push_back(testRanges2[i]);
} }
ParameterLoopClosureFalko param; ParameterLoopClosureFalko param;
LoopClosureFalko<bsc, bscExtractor, NNMatcher> loop_cl_falko(param); LoopClosureFalko<bsc, bscExtractor, NNMatcher> loop_cl_falko(param);
...@@ -26,10 +26,12 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) { ...@@ -26,10 +26,12 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) {
int firstPoint = scan_falko->ranges[0]; int firstPoint = scan_falko->ranges[0];
ASSERT_EQ(firstPoint, 250); ASSERT_EQ(firstPoint, 250);
// Test extractScene // Test extractScene
auto new_scene = std::static_pointer_cast<SceneFalko<bsc>>(loop_cl_falko.extractScene(scan, laser_params)); auto new_scene = std::static_pointer_cast<SceneFalko<bsc>>(
auto new_scene2 = std::static_pointer_cast<SceneFalko<bsc>>(loop_cl_falko.extractScene(scan2, laser_params)); loop_cl_falko.extractScene(scan, laser_params));
auto new_scene2 = std::static_pointer_cast<SceneFalko<bsc>>(
loop_cl_falko.extractScene(scan2, laser_params));
int detectedKeypoints = new_scene->keypoints_list_.size(); int detectedKeypoints = new_scene->keypoints_list_.size();
int detectedDescriptors = new_scene->descriptors_list_.size(); int detectedDescriptors = new_scene->descriptors_list_.size();
ASSERT_EQ(detectedKeypoints, 18); ASSERT_EQ(detectedKeypoints, 18);
...@@ -39,8 +41,8 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) { ...@@ -39,8 +41,8 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) {
auto new_match = loop_cl_falko.matchScene(new_scene, new_scene); auto new_match = loop_cl_falko.matchScene(new_scene, new_scene);
ASSERT_EQ(new_match->keypoints_number_match, 18); ASSERT_EQ(new_match->keypoints_number_match, 18);
// TEST findLoopClosure // TesT findLoopClosure
auto ref_scenes= std::make_shared<SceneFalkoList<bsc>>(); auto ref_scenes = std::make_shared<SceneFalkoList<bsc>>();
ref_scenes->scenes_.emplace_back(new_scene); ref_scenes->scenes_.emplace_back(new_scene);
ref_scenes->scenes_.emplace_back(new_scene2); ref_scenes->scenes_.emplace_back(new_scene2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment