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
d754a078
Commit
d754a078
authored
4 years ago
by
Sergi Pujol
Browse files
Options
Downloads
Patches
Plain Diff
doxygen comments added
parent
24049139
No related branches found
No related tags found
1 merge request
!4
Resolve "Implementation of Falko lib"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/loop_closure_base.h
+30
-30
30 additions, 30 deletions
src/loop_closure_base.h
src/loop_closure_falko.h
+10
-2
10 additions, 2 deletions
src/loop_closure_falko.h
with
40 additions
and
32 deletions
src/loop_closure_base.h
+
30
−
30
View file @
d754a078
...
...
@@ -23,41 +23,41 @@ namespace laserscanutils {
/** \brief A 2base class for loop closure using falko library
*/
class
LoopClosureBase2d
{
private:
public:
/** \brief Constructor
**/
LoopClosureBase2d
(){};
class
LoopClosureBase2d
{
private:
public:
/** \brief Constructor
**/
LoopClosureBase2d
(){};
/** \brief Destructor
**/
~
LoopClosureBase2d
(){};
/** \brief Destructor
**/
~
LoopClosureBase2d
(){};
/** \brief update the scene struct with keypoints and descriptors
**/
virtual
sceneBasePtr
extractScene
(
const
LaserScan
&
scan
,
const
LaserScanParams
&
scanParams
)
=
0
;
/** \brief update the scene struct with keypoints and descriptors
**/
virtual
sceneBasePtr
extractScene
(
const
LaserScan
&
scan
,
const
LaserScanParams
&
scanParams
)
=
0
;
/** \brief Create and update a matchLoopClosure struct with the info that is
*produced when matching two given scenes
**/
virtual
MatchLoopClosureScenePtr
matchScene
(
sceneBasePtr
_scene1
,
sceneBasePtr
_scene2
)
=
0
;
/** \brief Create and update a matchLoopClosure struct with the info that is
*produced when matching two given scenes
**/
virtual
MatchLoopClosureScenePtr
matchScene
(
sceneBasePtr
_scene1
,
sceneBasePtr
_scene2
)
=
0
;
/** \brief compare new scans against the trained set in order to find loop
*closures
**/
virtual
std
::
map
<
double
,
MatchLoopClosureScenePtr
>
findLoopClosure
(
std
::
list
<
std
::
shared_ptr
<
SceneBase
>>
_l_scenes
,
const
sceneBasePtr
_new_scene
)
{
std
::
map
<
double
,
MatchLoopClosureScenePtr
>
matchings
;
for
(
auto
ref_scene
:
_l_scenes
)
{
auto
match
=
matchScene
(
ref_scene
,
_new_scene
);
matchings
.
emplace
(
match
->
score
,
match
);
/** \brief It matches a target scene against a list of references scenes in order to find loop
* closures
**/
virtual
std
::
map
<
double
,
MatchLoopClosureScenePtr
>
findLoopClosure
(
std
::
list
<
std
::
shared_ptr
<
SceneBase
>>
_l_scenes
,
const
sceneBasePtr
_new_scene
)
{
std
::
map
<
double
,
MatchLoopClosureScenePtr
>
matchings
;
for
(
auto
ref_scene
:
_l_scenes
)
{
auto
match
=
matchScene
(
ref_scene
,
_new_scene
);
matchings
.
emplace
(
match
->
score
,
match
);
}
return
matchings
;
}
return
matchings
;
}
};
}
/* namespace laserscanutils */
...
...
This diff is collapsed.
Click to expand it.
src/loop_closure_falko.h
+
10
−
2
View file @
d754a078
...
...
@@ -80,9 +80,18 @@ struct ParameterLoopClosureFalko
double
thetaAbsMax_
=
1.57
;
};
/** \brief A base class for loop closure using falko library
/** \brief A class for loop closure using falko library
*
* The class is a wrapper of the falkolib that is designed to be used for loop closures in the wolf problem
*
* It extracts scenes from a laserscanutils::LaserScan. The scenes contain keypoints and descriptors
*
* It matches a target scene against a list of reference scenes.
*
* The reference scenes are found from a search of the previous captures
*
* Diferent types of descriptors can be used, and are specified as template parameters.
*
* \tparam D Descriptor type. <bsc> or <cgh>
* \tparam Extr descriptor extractor type <bscExtractor> or <cghExtractor>
* \tparam M Matcher type <nn_matcher> or <aht_matcher>
...
...
@@ -198,7 +207,6 @@ class LoopClosureFalko : public LoopClosureBase2d, public falkolib::FALKOExtract
new_match
->
transform_vector
.
head
(
2
)
=
new_match
->
transform
.
translation
();
new_match
->
transform_vector
(
2
)
=
Eigen
::
Rotation2Dd
(
new_match
->
transform
.
rotation
()).
angle
();
//}
return
new_match
;
}
...
...
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