Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
b9b18869
Commit
b9b18869
authored
6 years ago
by
PierreGtch
Browse files
Options
Downloads
Patches
Plain Diff
ProcessorLoopClosureBase : manipulate captures instead of frames
parent
957f3427
No related branches found
No related tags found
1 merge request
!290
Resolve "ProcessorLoopClosureBase class"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/processor/processor_loopclosure_base.h
+3
-3
3 additions, 3 deletions
include/core/processor/processor_loopclosure_base.h
src/processor/processor_loopclosure_base.cpp
+5
-5
5 additions, 5 deletions
src/processor/processor_loopclosure_base.cpp
with
8 additions
and
8 deletions
include/core/processor/processor_loopclosure_base.h
+
3
−
3
View file @
b9b18869
...
@@ -96,19 +96,19 @@ protected:
...
@@ -96,19 +96,19 @@ protected:
* if validateLoop is not overwritten, a loop will be closed with the returned candidate
* if validateLoop is not overwritten, a loop will be closed with the returned candidate
* if no good candidate is found, return nullptr
* if no good candidate is found, return nullptr
*/
*/
virtual
Fram
eBasePtr
findLoopCandidate
(
Fram
eBasePtr
_
key_fram
e
)
=
0
;
virtual
Captur
eBasePtr
findLoopCandidate
(
Captur
eBasePtr
_
captur
e
)
=
0
;
/** \brief validate/discard a loop closure
/** \brief validate/discard a loop closure
*
*
* overwrite it if you want an additional test after findLoopCandidate()
* overwrite it if you want an additional test after findLoopCandidate()
*/
*/
bool
validateLoop
(
Fram
eBasePtr
_
key_frame_1
,
Fram
eBasePtr
_
key_fram
e_2
)
{
return
true
;};
bool
validateLoop
(
Captur
eBasePtr
_
capture_1
,
Captur
eBasePtr
_
captur
e_2
)
{
return
true
;};
/** \brief create the factor(s)
/** \brief create the factor(s)
*
*
* overwrite it if needed
* overwrite it if needed
*/
*/
virtual
void
createFactors
(
Fram
eBasePtr
_
key_frame_1
,
Fram
eBasePtr
_
key_fram
e_2
)
=
0
;
virtual
void
createFactors
(
Captur
eBasePtr
_
capture_1
,
Captur
eBasePtr
_
captur
e_2
)
=
0
;
/** Pre-process incoming Capture
/** Pre-process incoming Capture
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_loopclosure_base.cpp
+
5
−
5
View file @
b9b18869
...
@@ -32,11 +32,11 @@ void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr)
...
@@ -32,11 +32,11 @@ void ProcessorLoopClosureBase::process(CaptureBasePtr _incoming_ptr)
if
(
voteSearchLoopClosure
(
_incoming_ptr
))
if
(
voteSearchLoopClosure
(
_incoming_ptr
))
{
{
Fram
eBasePtr
key_fram
e_1
=
pairKC
.
first
;
Captur
eBasePtr
captur
e_1
=
pairKC
.
second
;
Fram
eBasePtr
key_fram
e_2
=
findLoopCandidate
(
key_fram
e_1
);
Captur
eBasePtr
captur
e_2
=
findLoopCandidate
(
captur
e_1
);
if
(
key_fram
e_2
==
nullptr
)
return
;
if
(
captur
e_2
==
nullptr
)
return
;
if
(
validateLoop
(
key_frame_1
,
key_fram
e_2
)
==
false
)
return
;
if
(
validateLoop
(
capture_1
,
captur
e_2
)
==
false
)
return
;
createFactors
(
key_frame_1
,
key_fram
e_2
);
createFactors
(
capture_1
,
captur
e_2
);
};
};
};
};
...
...
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