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
5b13ac10
There was a problem fetching the pipeline metadata.
Commit
5b13ac10
authored
7 years ago
by
Jeremie Deray
Browse files
Options
Downloads
Patches
Plain Diff
pre-process incoming CaptureBase to CaptureMotion
parent
7cd8439c
No related branches found
No related tags found
1 merge request
!204
pre-process incoming CaptureBase to CaptureMotion
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/processor_motion.cpp
+8
-1
8 additions, 1 deletion
src/processor_motion.cpp
src/processor_motion.h
+14
-0
14 additions, 0 deletions
src/processor_motion.h
with
22 additions
and
1 deletion
src/processor_motion.cpp
+
8
−
1
View file @
5b13ac10
...
...
@@ -46,7 +46,14 @@ void ProcessorMotion::process(CaptureBasePtr _incoming_ptr)
return
;
}
incoming_ptr_
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
_incoming_ptr
);
incoming_ptr_
=
processIncomingCapture
(
_incoming_ptr
);
/// @todo Anything else to do ?
if
(
incoming_ptr_
==
nullptr
)
{
WOLF_WARN
(
"Processor motion received a nullptr incoming_ptr_."
)
return
;
}
preProcess
();
// Derived class operations
...
...
This diff is collapsed.
Click to expand it.
src/processor_motion.h
+
14
−
0
View file @
5b13ac10
...
...
@@ -198,6 +198,15 @@ class ProcessorMotion : public ProcessorBase
void
splitBuffer
(
const
TimeStamp
&
_t_split
,
MotionBuffer
&
_oldest_part
);
void
reintegrateBuffer
(
CaptureMotionPtr
_capture_ptr
);
/**
* @brief @brief Process the incoming CaptureBase an return a CaptureMotion.
* If not overloaded, the default impl simply calls
* static_pointer_cast<CaptureMotion>(incoming).
* @param _incoming_ptr, the incoming Capture to be processed.
* @return A CaptureMotionPtr.
*/
CaptureMotionPtr
processIncomingCapture
(
CaptureBasePtr
_incoming_ptr
);
/** Pre-process incoming Capture
*
* This is called by process() just after assigning incoming_ptr_ to a valid Capture.
...
...
@@ -508,6 +517,11 @@ inline Scalar ProcessorMotion::updateDt()
return
dt_
=
incoming_ptr_
->
getTimeStamp
()
-
getBuffer
().
get
().
back
().
ts_
;
}
inline
CaptureMotionPtr
ProcessorMotion
::
processIncomingCapture
(
CaptureBasePtr
_incoming_ptr
)
{
return
std
::
static_pointer_cast
<
CaptureMotion
>
(
_incoming_ptr
);
}
inline
const
MotionBuffer
&
ProcessorMotion
::
getBuffer
()
const
{
return
last_ptr_
->
getBuffer
();
...
...
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