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
Merge requests
!413
Resolve "New ProcessorLoopClosure"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "New ProcessorLoopClosure"
398-new-processorloopclosure
into
devel
Overview
1
Commits
11
Pipelines
11
Changes
6
Merged
Joan Vallvé Navarro
requested to merge
398-new-processorloopclosure
into
devel
4 years ago
Overview
1
Commits
11
Pipelines
11
Changes
6
Expand
Closes
#398 (closed)
Edited
4 years ago
by
Joan Vallvé Navarro
0
0
Merge request reports
Viewing commit
b267af5d
Prev
Next
Show latest version
6 files
+
373
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
b267af5d
new processor_loop_closure working on gtest
· b267af5d
Joan Vallvé Navarro
authored
4 years ago
include/core/processor/processor_loop_closure.h
0 → 100644
+
88
−
0
Options
#ifndef _WOLF_PROCESSOR_LOOP_CLOSURE_BASE_H
#define _WOLF_PROCESSOR_LOOP_CLOSURE_BASE_H
// Wolf related headers
#include
"core/processor/processor_base.h"
namespace
wolf
{
WOLF_STRUCT_PTR_TYPEDEFS
(
ParamsProcessorLoopClosure
);
struct
ParamsProcessorLoopClosure
:
public
ParamsProcessorBase
{
using
ParamsProcessorBase
::
ParamsProcessorBase
;
// virtual ~ParamsProcessorLoopClosure() = default;
// add neccesery parameters for loop closure initialisation here and initialize
// them in constructor
};
/** \brief General loop closure processor
*
* This is an abstract class.
* + You must define the following classes :
* - voteFindLoopClosures(CaptureBasePtr)
* - emplaceFeatures(CaptureBasePtr)
* - findLoopClosures(CaptureBasePtr)
* - validateLoop(CaptureBasePtr, CaptureBasePtr)
* - emplaceFactors(CaptureBasePtr, CaptureBasePtr)
* + You can override the following classes :
* - process()
*/
class
ProcessorLoopClosure
:
public
ProcessorBase
{
protected:
ParamsProcessorLoopClosurePtr
params_loop_closure_
;
public:
ProcessorLoopClosure
(
const
std
::
string
&
_type
,
int
_dim
,
ParamsProcessorLoopClosurePtr
_params_loop_closure
);
~
ProcessorLoopClosure
()
override
=
default
;
void
configure
(
SensorBasePtr
_sensor
)
override
{
};
protected
:
/** \brief Process a frame containing a capture.
* If voteFindLoopClosures() returns true, findLoopClosures() is called.
* emplaceFactors() is called for pairs of current capture and each capture returned by findLoopClosures()
*/
virtual
void
process
(
FrameBasePtr
,
CaptureBasePtr
);
/** \brief Returns if findLoopClosures() has to be called for the given capture
*/
virtual
bool
voteFindLoopClosures
(
CaptureBasePtr
cap
)
=
0
;
/** \brief detects and emplaces all features of the given capture
*/
virtual
void
emplaceFeatures
(
CaptureBasePtr
cap
)
=
0
;
/** \brief Find captures that correspond to loop closures with the given capture
*/
virtual
CaptureBasePtrList
findLoopClosures
(
CaptureBasePtr
_capture
)
=
0
;
/** \brief validates a loop closure
*/
virtual
bool
validateLoopClosure
(
CaptureBasePtr
_capture_1
,
CaptureBasePtr
_capture_2
)
=
0
;
/** \brief emplaces the factor(s) corresponding to a Loop Closure between two captures
*/
virtual
void
emplaceFactors
(
CaptureBasePtr
_capture_1
,
CaptureBasePtr
_capture_2
)
=
0
;
void
processCapture
(
CaptureBasePtr
)
override
;
void
processKeyFrame
(
FrameBasePtr
,
const
double
&
)
override
;
bool
triggerInCapture
(
CaptureBasePtr
_cap
)
const
override
{
return
true
;};
bool
triggerInKeyFrame
(
FrameBasePtr
_frm
,
const
double
&
_time_tol
)
const
override
{
return
true
;};
bool
storeKeyFrame
(
FrameBasePtr
_frm
)
override
{
return
false
;};
bool
storeCapture
(
CaptureBasePtr
_cap
)
override
{
return
false
;};
bool
voteForKeyFrame
()
const
override
{
return
false
;};
};
}
// namespace wolf
#endif
/* _WOLF_PROCESSOR_LOOP_CLOSURE_BASE_H */
Loading