Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
laser_scan_utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
algorithms
laser_scan_utils
Commits
e1c5b86d
Commit
e1c5b86d
authored
4 years ago
by
Sergi Pujol
Browse files
Options
Downloads
Patches
Plain Diff
added template to cornerScene
parent
a3c7a7a3
No related branches found
No related tags found
1 merge request
!4
Resolve "Implementation of Falko lib"
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/corner_scene.h
+19
-3
19 additions, 3 deletions
src/corner_scene.h
src/loop_closure_base_2d.h
+3
-2
3 additions, 2 deletions
src/loop_closure_base_2d.h
src/loop_closure_falko.cpp
+11
-8
11 additions, 8 deletions
src/loop_closure_falko.cpp
src/loop_closure_falko.h
+6
-3
6 additions, 3 deletions
src/loop_closure_falko.h
with
39 additions
and
16 deletions
src/corner_scene.h
+
19
−
3
View file @
e1c5b86d
...
@@ -11,13 +11,29 @@
...
@@ -11,13 +11,29 @@
#include
<iostream>
#include
<iostream>
#include
<fstream>
#include
<fstream>
/**************************
* 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
namespace
laserscanutils
{
{
template
<
typename
D
>
struct
cornerScene
{
struct
cornerScene
{
std
::
vector
<
double
>
keypointsList
;
std
::
vector
<
falkolib
::
FALKO
>
keypointsList
;
std
::
vector
<
double
>
descriptorsList
;
std
::
vector
<
D
>
descriptorsList
;
};
};
}
/* namespace laserscanutils */
}
/* namespace laserscanutils */
#endif
/* CORNER_SCENE_H_ */
#endif
/* CORNER_SCENE_H_ */
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/loop_closure_base_2d.h
+
3
−
2
View file @
e1c5b86d
...
@@ -51,11 +51,12 @@ public:
...
@@ -51,11 +51,12 @@ public:
/** \brief compare new scans against the trained set in order to find loop closures
/** \brief compare new scans against the trained set in order to find loop closures
**/
**/
virtual
void
findLoopClosure
(
std
::
list
<
cornerScene
>&
scenes
,
const
cornerScene
newScene
){}
//virtual void findLoopClosure(std::list<cornerScene>& scenes, const cornerScene newScene){}
virtual
void
findLoopClosure
(){}
/** \brief update the scene struct with keypoints and descriptors
/** \brief update the scene struct with keypoints and descriptors
**/
**/
virtual
std
::
shared_ptr
<
cornerScene
>
extractScene
(
LaserScan
&
scan
,
LaserScanParams
&
scanParams
){}
virtual
void
extractScene
(
LaserScan
&
scan
,
LaserScanParams
&
scanParams
){}
/** \brief Convert scans from laserscanutils::LaserScan to falkolib::LaserScan object
/** \brief Convert scans from laserscanutils::LaserScan to falkolib::LaserScan object
**/
**/
...
...
This diff is collapsed.
Click to expand it.
src/loop_closure_falko.cpp
+
11
−
8
View file @
e1c5b86d
...
@@ -10,8 +10,8 @@
...
@@ -10,8 +10,8 @@
namespace
laserscanutils
{
namespace
laserscanutils
{
//CONSTRUCTOR
//CONSTRUCTOR
template
<
typename
E
,
typename
M
>
template
<
typename
D
,
typename
E
,
typename
M
>
loopClosureFalko
<
E
,
M
>::
loopClosureFalko
(){
loopClosureFalko
<
D
,
E
,
M
>::
loopClosureFalko
(){
// FALKO Extractor Parameters
// FALKO Extractor Parameters
setMinExtractionRange
(
0.1
);
setMinExtractionRange
(
0.1
);
setMaxExtractionRange
(
25
);
setMaxExtractionRange
(
25
);
...
@@ -23,18 +23,21 @@ namespace laserscanutils{
...
@@ -23,18 +23,21 @@ namespace laserscanutils{
// Matcher Extractor Parameters
// Matcher Extractor Parameters
matcher
.
setDistanceThreshold
(
0.1
);
matcher
.
setDistanceThreshold
(
0.1
);
}
}
// DESTRUCTOR
// DESTRUCTOR
template
<
typename
E
,
typename
M
>
template
<
typename
D
,
typename
E
,
typename
M
>
loopClosureFalko
<
E
,
M
>::~
loopClosureFalko
(){}
loopClosureFalko
<
D
,
E
,
M
>::~
loopClosureFalko
(){}
template
<
typename
D
,
typename
E
,
typename
M
>
std
::
shared_ptr
<
cornerScene
<
D
>>
loopClosureFalko
<
D
,
E
,
M
>::
extractScene
(
LaserScan
&
scan
,
LaserScanParams
&
scanParams
){
auto
scanFALKO
=
loopClosureFalko
<
D
,
E
,
M
>::
convert2LaserScanFALKO
(
scan
,
scanParams
);
template
<
typename
E
,
typename
M
>
std
::
shared_ptr
<
cornerScene
>
loopClosureFalko
<
E
,
M
>::
extractScene
(
LaserScan
&
scan
,
LaserScanParams
&
scanParams
){
auto
scanFALKO
=
loopClosureFalko
<
E
,
M
>::
convert2LaserScanFALKO
(
scan
,
scanParams
);
auto
NewScene
=
std
::
make_shared
<
cornerScene
<
D
>>
(
);
auto
NewScene
=
std
::
make_shared
<
cornerScene
>
();
return
NewScene
;
return
NewScene
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/loop_closure_falko.h
+
6
−
3
View file @
e1c5b86d
...
@@ -34,12 +34,15 @@
...
@@ -34,12 +34,15 @@
namespace
laserscanutils
namespace
laserscanutils
{
{
typedef
falkolib
::
BSC
bsc
;
typedef
falkolib
::
BSCExtractor
<
falkolib
::
FALKO
>
bscExtractor
;
typedef
falkolib
::
BSCExtractor
<
falkolib
::
FALKO
>
bscExtractor
;
typedef
falkolib
::
NNMatcher
<
falkolib
::
FALKO
>
NNMatcher
;
typedef
falkolib
::
NNMatcher
<
falkolib
::
FALKO
>
NNMatcher
;
/** \brief A base class for loop closure using falko library
/** \brief A base class for loop closure using falko library
**/
**/
template
<
typename
E
,
typename
M
>
template
<
typename
D
,
typename
E
,
typename
M
>
class
loopClosureFalko
:
public
falkolib
::
FALKOExtractor
{
class
loopClosureFalko
:
public
falkolib
::
FALKOExtractor
{
private:
private:
...
@@ -54,11 +57,11 @@ public:
...
@@ -54,11 +57,11 @@ public:
/** \brief compare new scans against the trained set in order to find loop closures
/** \brief compare new scans against the trained set in order to find loop closures
**/
**/
void
findLoopClosure
(
std
::
list
<
cornerScene
>&
scenes
,
const
cornerScene
newScene
){}
//
void findLoopClosure(std::list<cornerScene>& scenes, const cornerScene newScene){}
/** \brief update the scene struct with keypoints and descriptors
/** \brief update the scene struct with keypoints and descriptors
**/
**/
std
::
shared_ptr
<
cornerScene
>
extractScene
(
LaserScan
&
scan
,
LaserScanParams
&
scanParams
);
std
::
shared_ptr
<
cornerScene
<
D
>
>
extractScene
(
LaserScan
&
scan
,
LaserScanParams
&
scanParams
);
E
extractor
;
E
extractor
;
M
matcher
;
M
matcher
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment