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
adcf4120
Commit
adcf4120
authored
6 years ago
by
PierreGtch
Browse files
Options
Downloads
Patches
Plain Diff
Split decisions of searching for LC and creating features
parent
fa19e351
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!290
Resolve "ProcessorLoopClosureBase class"
Pipeline
#3661
passed
6 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/processor/processor_loopclosure_base2.h
+6
-11
6 additions, 11 deletions
include/core/processor/processor_loopclosure_base2.h
src/processor/processor_loopclosure_base2.cpp
+14
-18
14 additions, 18 deletions
src/processor/processor_loopclosure_base2.cpp
with
20 additions
and
29 deletions
include/core/processor/processor_loopclosure_base2.h
+
6
−
11
View file @
adcf4120
...
...
@@ -21,6 +21,7 @@ struct ProcessorParamsLoopClosure2 : public ProcessorParamsBase
*
* This is an abstract class.
* + You must define the following classes :
* - voteComputeFeatures()
* - voteSearchLoopClosure()
* - computeFeatures()
* - findLoopCandidate()
...
...
@@ -63,21 +64,15 @@ public:
protected
:
/** \brief Called by process(). Tells if
processLoopClosure
will be called
/** \brief Called by process(). Tells if
computeFeatures()
will be called
*/
virtual
bool
vote
SearchLoopClos
ure
(
CaptureBasePtr
_incoming_ptr
)
=
0
;
virtual
bool
vote
ComputeFeat
ure
s
(
CaptureBasePtr
_incoming_ptr
)
=
0
;
/** \brief
Tries to close a loop
/** \brief
Called by process(). Tells if findLoopCandidate() and createFactors() will be called
*
* this method is called in process() if voteSearchLoopClosure retruns true
* this method uses :
* - selectPairKC()
* - computeFeatures()
* - findLoopCandidate()
* - validateLoop()
* - createFactors()
* WARNING : A LC can be searched only when voteComputeFeatures() return true
*/
v
oid
processLoopClosure
(
void
)
;
v
irtual
bool
voteSearchLoopClosure
(
CaptureBasePtr
_incoming_ptr
)
=
0
;
/** \brief returns a KeyFrame-Capture pair compatible together (selected from the buffers)
*
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_loopclosure_base2.cpp
+
14
−
18
View file @
adcf4120
...
...
@@ -24,30 +24,26 @@ void ProcessorLoopClosureBase2::process(CaptureBasePtr _incoming_ptr)
// the pre-process, if necessary, is implemented in the derived classes
preProcess
();
if
(
vote
SearchLoopClos
ure
(
_incoming_ptr
))
if
(
vote
ComputeFeat
ure
s
(
_incoming_ptr
))
{
//CREAT_THREAD(function=processLoopClosure);
processLoopClosure
();
std
::
pair
<
FrameBasePtr
,
CaptureBasePtr
>
pairKC
=
selectPairKC
();
if
(
pairKC
.
first
==
nullptr
||
pairKC
.
second
==
nullptr
)
return
;
computeFeatures
(
pairKC
);
if
(
voteSearchLoopClosure
(
_incoming_ptr
))
{
FrameBasePtr
key_frame_1
=
pairKC
.
first
;
FrameBasePtr
key_frame_2
=
findLoopCandidate
(
key_frame_1
);
if
(
key_frame_2
==
nullptr
)
return
;
if
(
validateLoop
(
key_frame_1
,
key_frame_2
)
==
false
)
return
;
createFactors
(
key_frame_1
,
key_frame_2
);
};
};
// the post-process, if necessary, is implemented in the derived classes
postProcess
();
}
void
ProcessorLoopClosureBase2
::
processLoopClosure
()
{
std
::
pair
<
FrameBasePtr
,
CaptureBasePtr
>
pairKC
=
selectPairKC
();
if
(
pairKC
.
first
==
nullptr
||
pairKC
.
second
==
nullptr
)
return
;
computeFeatures
(
pairKC
);
FrameBasePtr
key_frame_1
=
pairKC
.
first
;
FrameBasePtr
key_frame_2
=
findLoopCandidate
(
key_frame_1
);
if
(
key_frame_2
==
nullptr
)
return
;
if
(
validateLoop
(
key_frame_1
,
key_frame_2
)
==
false
)
return
;
createFactors
(
key_frame_1
,
key_frame_2
);
}
/**
* In the default implementation, we select the KF with the most recent TimeStamp
* and that is compatible with at least a Capture
...
...
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