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

code guide lines

parent bdd5ae6e
No related branches found
No related tags found
1 merge request!4Resolve "Implementation of Falko lib"
......@@ -24,16 +24,16 @@ namespace laserscanutils {
/** \brief A 2base class for loop closure using falko library
*/
class loopClosureBase2d {
class LoopClosureBase2d {
private:
public:
/** \brief Constructor
**/
loopClosureBase2d(){};
LoopClosureBase2d(){};
/** \brief Destructor
**/
~loopClosureBase2d(){};
~LoopClosureBase2d(){};
/** \brief update the scene struct with keypoints and descriptors
......
......@@ -46,7 +46,7 @@ typedef falkolib::CGH cgh;
typedef falkolib::CGHExtractor<falkolib::FALKO> cghExtractor;
typedef falkolib::AHTMatcher<falkolib::FALKO> AHTatcher;
struct parameterLoopClosureFalko {
struct ParameterLoopClosureFalko {
// Keypoints extractor Default
double min_extraction_range_=0.1;
double max_extraction_range_=25;
......@@ -69,7 +69,7 @@ struct parameterLoopClosureFalko {
**/
template <typename D, typename Extr, typename M>
class loopClosureFalko : public loopClosureBase2d,
class LoopClosureFalko : public LoopClosureBase2d,
public falkolib::FALKOExtractor {
private:
public:
......@@ -81,8 +81,8 @@ public:
/** \brief Constructor
**/
loopClosureFalko(parameterLoopClosureFalko _param)
: loopClosureBase2d(), falkolib::FALKOExtractor(),
LoopClosureFalko(ParameterLoopClosureFalko _param)
: LoopClosureBase2d(), falkolib::FALKOExtractor(),
extractor_(_param.circularSectorNumber_, _param.radialRingNumber_), matcher_() {
// FALKO Extractor Parameters
setMinExtractionRange(_param.min_extraction_range_);
......@@ -100,7 +100,7 @@ public:
/** \brief Destructor
**/
~loopClosureFalko() {}
~LoopClosureFalko() {}
/** \brief Create and update the scene struct with keypoints and descriptors
**/
......@@ -139,7 +139,7 @@ public:
int matching_number =
matcher_.match(scene_1_falko->keypoints_list_,
scene_2_falko->keypoints_list_, asso_nn);
auto new_match = std::make_shared<matchLoopClosure>();
auto new_match = std::make_shared<MatchLoopClosure>();
new_match->keypoints_number_match = matching_number;
if (matching_number > keypoints_number_th_) {
new_match->match = true;
......
......@@ -20,7 +20,7 @@
namespace laserscanutils {
struct matchLoopClosure {
struct MatchLoopClosure {
sceneBasePtr scene_1;
sceneBasePtr scene_2;
......@@ -29,7 +29,7 @@ struct matchLoopClosure {
double score;
};
typedef std::shared_ptr<matchLoopClosure> matchLoopClosurePtr;
typedef std::shared_ptr<MatchLoopClosure> matchLoopClosurePtr;
} /* namespace laserscanutils */
......
......@@ -17,8 +17,8 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) {
scan2.ranges_raw_.push_back(testRanges2[i]);
}
parameterLoopClosureFalko param;
loopClosureFalko<bsc, bscExtractor, NNMatcher> loop_cl_falko(param);
ParameterLoopClosureFalko param;
LoopClosureFalko<bsc, bscExtractor, NNMatcher> loop_cl_falko(param);
// Test convert2LaserScanFALKO
std::shared_ptr<falkolib::LaserScan> scan_falko =
......@@ -49,9 +49,7 @@ TEST(loop_closure_falko, TestLoopClosureFalkoAllFunctions) {
ASSERT_EQ(matchings.size(), 2);
auto best_match = matchings.rbegin()->second;
ASSERT_EQ(best_match->match, true);
ASSERT_EQ(best_match->scene_1, new_scene);
ASSERT_EQ(best_match->scene_2, new_scene);
ASSERT_EQ(best_match->score, 1);
......
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