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
ace29c24
Commit
ace29c24
authored
4 years ago
by
Sergi Pujol
Browse files
Options
Downloads
Patches
Plain Diff
added the prohibition of two matches for scan
parent
cc9c7061
No related branches found
No related tags found
1 merge request
!4
Resolve "Implementation of Falko lib"
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/corner_falko_2d.cpp
+12
-4
12 additions, 4 deletions
src/corner_falko_2d.cpp
src/corner_falko_2d.h
+4
-1
4 additions, 1 deletion
src/corner_falko_2d.h
src/examples/corner_falko_demo.cpp
+1
-1
1 addition, 1 deletion
src/examples/corner_falko_demo.cpp
with
17 additions
and
6 deletions
src/corner_falko_2d.cpp
+
12
−
4
View file @
ace29c24
...
...
@@ -61,18 +61,26 @@ void CornerFalko2d::findLoopClosure(LaserScan scan,LaserScanParams scanParams){
//Matching
int
rows
=
keypointSets
.
size
();
matchingNumber
=
0
;
numberKeypointsMatch
=
0
;
numberSceneMatch
=
0
;
matchingPosition
=-
1
;
for
(
int
i
=
0
;
i
<
rows
;
i
++
){
std
::
vector
<
std
::
pair
<
int
,
int
>
>
assoNN
;
int
NewMatchingNumber
=
match
(
keypointSets
[
i
],
keypointSet2
,
assoNN
);
if
(
NewMatchingNumber
>
matchingNumber
&&
NewMatchingNumber
>
keypointsNumberTh
)
{
matchingNumber
=
NewMatchingNumber
;
if
(
NewMatchingNumber
>
numberKeypointsMatch
&&
NewMatchingNumber
>
keypointsNumberTh
)
{
numberKeypointsMatch
=
NewMatchingNumber
;
matchingPosition
=
i
;
numberSceneMatch
=
numberSceneMatch
+
1
;
}
}
if
(
numberSceneMatch
>
1
){
numberKeypointsMatch
=
0
;
numberSceneMatch
=
0
;
matchingPosition
=-
1
;
}
}
...
...
@@ -95,7 +103,7 @@ int CornerFalko2d::evaluateNewReferenceScene(LaserScan scan,LaserScanParams scan
findLoopClosure
(
scan
,
scanParams
);
if
(
matchingNumber
<
refSceneAddingTh
)
{
if
(
numberKeypointsMatch
<
refSceneAddingTh
)
{
falkolib
::
LaserScan
scanFALKO
=
convert2LaserScanFALKO
(
scan
,
scanParams
);
...
...
This diff is collapsed.
Click to expand it.
src/corner_falko_2d.h
+
4
−
1
View file @
ace29c24
...
...
@@ -98,8 +98,11 @@ public:
std
::
vector
<
std
::
vector
<
falkolib
::
BSC
>>
descriptorSets
;
std
::
vector
<
falkolib
::
BSC
>
lastDescriptorSet
;
// Number of Scene matched when performing the loop closure
int
numberKeypointsMatch
=
0
;
int
matchingNumber
;
//Number of keypoints that are matched between 2 scenes when performing the loop closure
int
numberSceneMatch
=
0
;
int
scanNumber
=
0
;
...
...
This diff is collapsed.
Click to expand it.
src/examples/corner_falko_demo.cpp
+
1
−
1
View file @
ace29c24
...
...
@@ -45,5 +45,5 @@ int main(int argc, char** argv)
cornerMatching
.
findLoopClosure
(
scan
,
laserParams
);
std
::
cout
<<
"matching number : "
<<
cornerMatching
.
matchingNumber
<<
std
::
endl
;
std
::
cout
<<
"matching number : "
<<
cornerMatching
.
numberKeypointsMatch
<<
std
::
endl
;
}
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