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"
......@@ -16,7 +16,7 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) {
scan.ranges_raw_.push_back(testRanges1[i]);
scan2.ranges_raw_.push_back(testRanges2[i]);
}
ParameterLoopClosureFalko param;
LoopClosureFalko<bsc, bscExtractor, NNMatcher> loop_cl_falko(param);
......@@ -26,10 +26,12 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) {
int firstPoint = scan_falko->ranges[0];
ASSERT_EQ(firstPoint, 250);
// Test extractScene
auto new_scene = std::static_pointer_cast<SceneFalko<bsc>>(loop_cl_falko.extractScene(scan, laser_params));
auto new_scene2 = std::static_pointer_cast<SceneFalko<bsc>>(loop_cl_falko.extractScene(scan2, laser_params));
auto new_scene = std::static_pointer_cast<SceneFalko<bsc>>(
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 detectedDescriptors = new_scene->descriptors_list_.size();
ASSERT_EQ(detectedKeypoints, 18);
......@@ -39,8 +41,8 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) {
auto new_match = loop_cl_falko.matchScene(new_scene, new_scene);
ASSERT_EQ(new_match->keypoints_number_match, 18);
// TEST findLoopClosure
auto ref_scenes= std::make_shared<SceneFalkoList<bsc>>();
// TesT findLoopClosure
auto ref_scenes = std::make_shared<SceneFalkoList<bsc>>();
ref_scenes->scenes_.emplace_back(new_scene);
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