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
1c95d9b5
Commit
1c95d9b5
authored
6 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Added storeKeyFrame() storeCapture()
parent
9c2872db
No related branches found
No related tags found
1 merge request
!329
WIP: New processor workflow
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/core/processor/processor_base.h
+12
-0
12 additions, 0 deletions
include/core/processor/processor_base.h
src/processor/processor_base.cpp
+6
-3
6 additions, 3 deletions
src/processor/processor_base.cpp
with
18 additions
and
3 deletions
include/core/processor/processor_base.h
+
12
−
0
View file @
1c95d9b5
...
@@ -249,6 +249,18 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
...
@@ -249,6 +249,18 @@ class ProcessorBase : public NodeBase, public std::enable_shared_from_this<Proce
*/
*/
virtual
bool
triggerInKeyFrame
(
FrameBasePtr
_keyframe_ptr
,
const
Scalar
&
_time_tolerance
)
=
0
;
virtual
bool
triggerInKeyFrame
(
FrameBasePtr
_keyframe_ptr
,
const
Scalar
&
_time_tolerance
)
=
0
;
/** \brief store key frame
*
* Returns true if the key frame should be stored
*/
virtual
bool
storeKeyFrame
(
FrameBasePtr
)
=
0
;
/** \brief store capture
*
* Returns true if the capture should be stored
*/
virtual
bool
storeCapture
(
CaptureBasePtr
)
=
0
;
/** \brief Vote for KeyFrame generation
/** \brief Vote for KeyFrame generation
*
*
* If a KeyFrame criterion is validated, this function returns true,
* If a KeyFrame criterion is validated, this function returns true,
...
...
This diff is collapsed.
Click to expand it.
src/processor/processor_base.cpp
+
6
−
3
View file @
1c95d9b5
...
@@ -36,8 +36,10 @@ void ProcessorBase::keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _
...
@@ -36,8 +36,10 @@ void ProcessorBase::keyFrameCallback(FrameBasePtr _keyframe_ptr, const Scalar& _
WOLF_DEBUG
(
"P"
,
isMotion
()
?
"M "
:
"T "
,
getName
(),
": KF"
,
_keyframe_ptr
->
id
(),
" callback received with ts = "
,
_keyframe_ptr
->
getTimeStamp
());
WOLF_DEBUG
(
"P"
,
isMotion
()
?
"M "
:
"T "
,
getName
(),
": KF"
,
_keyframe_ptr
->
id
(),
" callback received with ts = "
,
_keyframe_ptr
->
getTimeStamp
());
assert
(
_keyframe_ptr
!=
nullptr
&&
"keyFrameCallback with a nullptr frame"
);
assert
(
_keyframe_ptr
!=
nullptr
&&
"keyFrameCallback with a nullptr frame"
);
// buffering anyway
buffer_pack_kf_
.
add
(
_keyframe_ptr
,
_time_tol_other
);
// asking if key frame should be stored
if
(
storeKeyFrame
(
_keyframe_ptr
))
buffer_pack_kf_
.
add
(
_keyframe_ptr
,
_time_tol_other
);
// if trigger true -> processKeyFrame
// if trigger true -> processKeyFrame
if
(
triggerInKeyFrame
(
_keyframe_ptr
,
_time_tol_other
))
if
(
triggerInKeyFrame
(
_keyframe_ptr
,
_time_tol_other
))
...
@@ -53,7 +55,8 @@ void ProcessorBase::captureCallback(CaptureBasePtr _capture_ptr)
...
@@ -53,7 +55,8 @@ void ProcessorBase::captureCallback(CaptureBasePtr _capture_ptr)
// if trigger, process directly without buffering
// if trigger, process directly without buffering
if
(
triggerInCapture
(
_capture_ptr
))
if
(
triggerInCapture
(
_capture_ptr
))
processCapture
(
_capture_ptr
);
processCapture
(
_capture_ptr
);
else
// asking if capture should be stored
if
(
storeCapture
(
_capture_ptr
))
buffer_capture_
.
add
(
_capture_ptr
->
getTimeStamp
(),
_capture_ptr
);
buffer_capture_
.
add
(
_capture_ptr
->
getTimeStamp
(),
_capture_ptr
);
}
}
...
...
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