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

findLoopClosure function finished

parent c19c19a9
No related branches found
No related tags found
1 merge request!4Resolve "Implementation of Falko lib"
......@@ -104,22 +104,14 @@ public:
**/
std::list<matchLoopClosurePtr> findLoopClosure(std::list<sceneFalkoBSCPtr> &l_scenes, const sceneFalkoBSCPtr &new_scene){
int number_ref_sc = l_scenes.size();
std::list<matchLoopClosurePtr> matchings;
for (int i=0; i<number_ref_sc; i++ ){
auto l_front = l_scenes.begin();
std::advance(l_front, i);
//std::cout << "list_scenes[i]" << *l_front << std::endl;
//matchScene()
auto new_match = matchScene(*l_front,new_scene);
matchings.push_back(new_match);
}
return matchings;
}
};
} /* namespace laserscanutils */
......
......@@ -51,6 +51,16 @@ TEST(loop_closure_falko, TestExtractSceneAndMatcher)
auto matchings = LCFalko.findLoopClosure(ref_scenes,new_scene);
int matchings_number =matchings.size();
ASSERT_EQ(matchings_number, 2);
auto l_front = matchings.begin();
auto there_is_match = l_front->get()->match;
ASSERT_EQ(there_is_match, true);
// PRINTF("All good at TestTest::DummyTestExample !\n");
}
......
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