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
ffa7ab6f
Commit
ffa7ab6f
authored
4 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
simplified a bit
parent
c753b9c4
No related branches found
No related tags found
1 merge request
!413
Resolve "New ProcessorLoopClosure"
Pipeline
#6422
passed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/processor/processor_loop_closure.h
+3
-3
3 additions, 3 deletions
include/core/processor/processor_loop_closure.h
src/processor/processor_loop_closure.cpp
+7
-7
7 additions, 7 deletions
src/processor/processor_loop_closure.cpp
with
10 additions
and
10 deletions
include/core/processor/processor_loop_closure.h
+
3
−
3
View file @
ffa7ab6f
...
@@ -27,7 +27,7 @@ struct ParamsProcessorLoopClosure : public ParamsProcessorBase
...
@@ -27,7 +27,7 @@ struct ParamsProcessorLoopClosure : public ParamsProcessorBase
* - validateLoop(CaptureBasePtr, CaptureBasePtr)
* - validateLoop(CaptureBasePtr, CaptureBasePtr)
* - emplaceFactors(CaptureBasePtr, CaptureBasePtr)
* - emplaceFactors(CaptureBasePtr, CaptureBasePtr)
* + You can override the following classes :
* + You can override the following classes :
* - process()
* - process(
CaptureBasePtr
)
*/
*/
class
ProcessorLoopClosure
:
public
ProcessorBase
class
ProcessorLoopClosure
:
public
ProcessorBase
...
@@ -45,11 +45,11 @@ public:
...
@@ -45,11 +45,11 @@ public:
protected
:
protected
:
/** \brief Process a
frame containing a capture
.
/** \brief Process a
capture (IMPORTANT: capture is linked to a frame)
.
* If voteFindLoopClosures() returns true, findLoopClosures() is called.
* If voteFindLoopClosures() returns true, findLoopClosures() is called.
* emplaceFactors() is called for pairs of current capture and each capture returned by findLoopClosures()
* emplaceFactors() is called for pairs of current capture and each capture returned by findLoopClosures()
*/
*/
virtual
void
process
(
FrameBasePtr
,
CaptureBasePtr
);
virtual
void
process
(
CaptureBasePtr
);
/** \brief Returns if findLoopClosures() has to be called for the given capture
/** \brief Returns if findLoopClosures() has to be called for the given capture
*/
*/
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_loop_closure.cpp
+
7
−
7
View file @
ffa7ab6f
...
@@ -27,7 +27,7 @@ void ProcessorLoopClosure::processCapture(CaptureBasePtr _capture)
...
@@ -27,7 +27,7 @@ void ProcessorLoopClosure::processCapture(CaptureBasePtr _capture)
{
{
WOLF_DEBUG
(
"CASE 1"
);
WOLF_DEBUG
(
"CASE 1"
);
process
(
_capture
->
getFrame
(),
_capture
);
process
(
_capture
);
// remove the frame and older frames
// remove the frame and older frames
buffer_pack_kf_
.
removeUpTo
(
_capture
->
getFrame
()
->
getTimeStamp
());
buffer_pack_kf_
.
removeUpTo
(
_capture
->
getFrame
()
->
getTimeStamp
());
...
@@ -45,7 +45,7 @@ void ProcessorLoopClosure::processCapture(CaptureBasePtr _capture)
...
@@ -45,7 +45,7 @@ void ProcessorLoopClosure::processCapture(CaptureBasePtr _capture)
_capture
->
link
(
frame_pack
->
key_frame
);
_capture
->
link
(
frame_pack
->
key_frame
);
process
(
frame_pack
->
key_frame
,
_capture
);
process
(
_capture
);
// remove the frame and older frames
// remove the frame and older frames
buffer_pack_kf_
.
removeUpTo
(
frame_pack
->
key_frame
->
getTimeStamp
());
buffer_pack_kf_
.
removeUpTo
(
frame_pack
->
key_frame
->
getTimeStamp
());
...
@@ -74,7 +74,7 @@ void ProcessorLoopClosure::processKeyFrame(FrameBasePtr _frame, const double& _t
...
@@ -74,7 +74,7 @@ void ProcessorLoopClosure::processKeyFrame(FrameBasePtr _frame, const double& _t
{
{
WOLF_DEBUG
(
"CASE 1"
);
WOLF_DEBUG
(
"CASE 1"
);
process
(
_frame
,
cap
);
process
(
cap
);
// remove the capture (if stored)
// remove the capture (if stored)
buffer_capture_
.
getContainer
().
erase
(
cap
->
getTimeStamp
());
buffer_capture_
.
getContainer
().
erase
(
cap
->
getTimeStamp
());
...
@@ -92,7 +92,7 @@ void ProcessorLoopClosure::processKeyFrame(FrameBasePtr _frame, const double& _t
...
@@ -92,7 +92,7 @@ void ProcessorLoopClosure::processKeyFrame(FrameBasePtr _frame, const double& _t
capture
->
link
(
_frame
);
capture
->
link
(
_frame
);
process
(
_frame
,
capture
);
process
(
capture
);
// remove the capture (if stored)
// remove the capture (if stored)
buffer_capture_
.
getContainer
().
erase
(
capture
->
getTimeStamp
());
buffer_capture_
.
getContainer
().
erase
(
capture
->
getTimeStamp
());
...
@@ -117,10 +117,10 @@ void ProcessorLoopClosure::processKeyFrame(FrameBasePtr _frame, const double& _t
...
@@ -117,10 +117,10 @@ void ProcessorLoopClosure::processKeyFrame(FrameBasePtr _frame, const double& _t
// nothing (discard frame)
// nothing (discard frame)
}
}
void
ProcessorLoopClosure
::
process
(
FrameBasePtr
_frame
,
CaptureBasePtr
_capture
)
void
ProcessorLoopClosure
::
process
(
CaptureBasePtr
_capture
)
{
{
WOLF_DEBUG
(
"ProcessorLoopClosure::process frame "
,
_frame
->
id
(),
" capture "
,
_capture
->
id
()
);
assert
(
_capture
->
getFrame
()
!=
nullptr
&&
"ProcessorLoopClosure::process _capture not linked to _frame"
);
assert
(
_capture
->
getFrame
()
==
_frame
&&
"ProcessorLoopClosure::process _capture not linked to _frame"
);
WOLF_DEBUG
(
"ProcessorLoopClosure::process frame "
,
_capture
->
getFrame
()
->
id
(),
" capture "
,
_capture
->
id
()
);
// Detect and emplace features
// Detect and emplace features
WOLF_DEBUG
(
"emplacing features..."
);
WOLF_DEBUG
(
"emplacing features..."
);
...
...
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