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
b4c766bf
Commit
b4c766bf
authored
6 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
added processor voting/permit auxiliary frames machinery
parent
d4a0dc61
No related branches found
No related tags found
1 merge request
!266
Estimated frames
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/base/processor/processor_base.h
+32
-4
32 additions, 4 deletions
include/base/processor/processor_base.h
src/processor/processor_IMU.cpp
+0
-2
0 additions, 2 deletions
src/processor/processor_IMU.cpp
src/processor/processor_base.cpp
+5
-0
5 additions, 0 deletions
src/processor/processor_base.cpp
with
37 additions
and
6 deletions
include/base/processor/processor_base.h
+
32
−
4
View file @
b4c766bf
...
@@ -110,16 +110,19 @@ struct ProcessorParamsBase
...
@@ -110,16 +110,19 @@ struct ProcessorParamsBase
ProcessorParamsBase
()
=
default
;
ProcessorParamsBase
()
=
default
;
ProcessorParamsBase
(
bool
_voting_active
,
ProcessorParamsBase
(
bool
_voting_active
,
Scalar
_time_tolerance
)
Scalar
_time_tolerance
,
:
voting_active
(
_voting_active
)
bool
_voting_aux_active
=
false
)
:
,
time_tolerance
(
_time_tolerance
)
voting_active
(
_voting_active
),
voting_aux_active
(
_voting_aux_active
),
time_tolerance
(
_time_tolerance
)
{
{
//
//
}
}
virtual
~
ProcessorParamsBase
()
=
default
;
virtual
~
ProcessorParamsBase
()
=
default
;
bool
voting_active
=
false
;
bool
voting_active
=
false
;
///< Whether this processor is allowed to vote for a Key Frame or not
bool
voting_aux_active
=
false
;
///< Whether this processor is allowed to vote for an Auxiliary Frame or not
///< maximum time difference between a Keyframe time stamp and
///< maximum time difference between a Keyframe time stamp and
/// a particular Capture of this processor to allow assigning
/// a particular Capture of this processor to allow assigning
...
@@ -159,8 +162,19 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
...
@@ -159,8 +162,19 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
*/
*/
virtual
bool
voteForKeyFrame
()
=
0
;
virtual
bool
voteForKeyFrame
()
=
0
;
/** \brief Vote for Auxiliary Frame generation
*
* If a Auxiliary Frame criterion is validated, this function returns true,
* meaning that it wants to create a Auxiliary Frame at the \b last Capture.
*
* WARNING! This function only votes! It does not create Auxiliary Frames!
*/
virtual
bool
voteForAuxFrame
(){
return
false
;};
virtual
bool
permittedKeyFrame
()
final
;
virtual
bool
permittedKeyFrame
()
final
;
virtual
bool
permittedAuxFrame
()
final
;
/**\brief make a Frame with the provided Capture
/**\brief make a Frame with the provided Capture
*
*
* Provide the following functionality:
* Provide the following functionality:
...
@@ -192,7 +206,11 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
...
@@ -192,7 +206,11 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
bool
isVotingActive
()
const
;
bool
isVotingActive
()
const
;
bool
isVotingAuxActive
()
const
;
void
setVotingActive
(
bool
_voting_active
=
true
);
void
setVotingActive
(
bool
_voting_active
=
true
);
void
setVotingAuxActive
(
bool
_voting_active
=
true
);
};
};
inline
bool
ProcessorBase
::
isVotingActive
()
const
inline
bool
ProcessorBase
::
isVotingActive
()
const
...
@@ -200,11 +218,21 @@ inline bool ProcessorBase::isVotingActive() const
...
@@ -200,11 +218,21 @@ inline bool ProcessorBase::isVotingActive() const
return
params_
->
voting_active
;
return
params_
->
voting_active
;
}
}
inline
bool
ProcessorBase
::
isVotingAuxActive
()
const
{
return
params_
->
voting_aux_active
;
}
inline
void
ProcessorBase
::
setVotingActive
(
bool
_voting_active
)
inline
void
ProcessorBase
::
setVotingActive
(
bool
_voting_active
)
{
{
params_
->
voting_active
=
_voting_active
;
params_
->
voting_active
=
_voting_active
;
}
}
inline
void
ProcessorBase
::
setVotingAuxActive
(
bool
_voting_active
)
{
params_
->
voting_aux_active
=
_voting_active
;
}
}
}
#include
"base/sensor/sensor_base.h"
#include
"base/sensor/sensor_base.h"
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_IMU.cpp
+
0
−
2
View file @
b4c766bf
...
@@ -35,8 +35,6 @@ ProcessorBasePtr ProcessorIMU::create(const std::string& _unique_name, const Pro
...
@@ -35,8 +35,6 @@ ProcessorBasePtr ProcessorIMU::create(const std::string& _unique_name, const Pro
bool
ProcessorIMU
::
voteForKeyFrame
()
bool
ProcessorIMU
::
voteForKeyFrame
()
{
{
if
(
!
isVotingActive
())
return
false
;
// time span
// time span
if
(
getBuffer
().
get
().
back
().
ts_
-
getBuffer
().
get
().
front
().
ts_
>
params_motion_IMU_
->
max_time_span
)
if
(
getBuffer
().
get
().
back
().
ts_
-
getBuffer
().
get
().
front
().
ts_
>
params_motion_IMU_
->
max_time_span
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_base.cpp
+
5
−
0
View file @
b4c766bf
...
@@ -26,6 +26,11 @@ bool ProcessorBase::permittedKeyFrame()
...
@@ -26,6 +26,11 @@ bool ProcessorBase::permittedKeyFrame()
return
isVotingActive
()
&&
getProblem
()
->
permitKeyFrame
(
shared_from_this
());
return
isVotingActive
()
&&
getProblem
()
->
permitKeyFrame
(
shared_from_this
());
}
}
bool
ProcessorBase
::
permittedAuxFrame
()
{
return
isVotingAuxActive
()
&&
getProblem
()
->
permitAuxFrame
(
shared_from_this
());
}
FrameBasePtr
ProcessorBase
::
emplaceFrame
(
FrameType
_type
,
CaptureBasePtr
_capture_ptr
)
FrameBasePtr
ProcessorBase
::
emplaceFrame
(
FrameType
_type
,
CaptureBasePtr
_capture_ptr
)
{
{
std
::
cout
<<
"Making "
<<
(
_type
==
KEY
?
"key-"
:
(
_type
==
AUXILIARY
?
"aux-"
:
""
))
<<
"frame"
<<
std
::
endl
;
std
::
cout
<<
"Making "
<<
(
_type
==
KEY
?
"key-"
:
(
_type
==
AUXILIARY
?
"aux-"
:
""
))
<<
"frame"
<<
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