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
d12251cb
Commit
d12251cb
authored
8 years ago
by
Jeremie Deray
Browse files
Options
Downloads
Patches
Plain Diff
add ProcessorMotion processIncomingCapture
Conflicts: src/processor_motion.cpp
parent
d4522d49
No related branches found
No related tags found
1 merge request
!127
Add ProcessorMotion::processIncomingCapture & Miscellaneous
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/processor_motion.cpp
+9
-2
9 additions, 2 deletions
src/processor_motion.cpp
src/processor_motion.h
+7
-0
7 additions, 0 deletions
src/processor_motion.h
with
16 additions
and
2 deletions
src/processor_motion.cpp
+
9
−
2
View file @
d12251cb
...
...
@@ -67,8 +67,10 @@ void ProcessorMotion::process(CaptureBasePtr _incoming_ptr)
// std::cout << "PM: RUNNING" << std::endl;
}
incoming_ptr_
=
processIncomingCapture
(
_incoming_ptr
);
incoming_ptr_
=
std
::
static_pointer_cast
<
CaptureMotion
>
(
_incoming_ptr
);
/// @todo Anything else to do ?
if
(
incoming_ptr_
==
nullptr
)
return
;
preProcess
();
...
...
@@ -92,7 +94,7 @@ void ProcessorMotion::process(CaptureBasePtr _incoming_ptr)
FeatureBasePtr
key_feature_ptr
=
emplaceFeature
(
last_ptr_
,
key_frame_ptr
);
// create motion constraint and link it to parent feature and other frame (which is origin's frame)
auto
ctr_ptr
=
emplaceConstraint
(
key_feature_ptr
,
origin_ptr_
->
getFramePtr
());
/*
auto ctr_ptr =
*/
emplaceConstraint
(
key_feature_ptr
,
origin_ptr_
->
getFramePtr
());
// new capture
CaptureMotionPtr
new_capture_ptr
=
std
::
make_shared
<
CaptureMotion
>
(
key_frame_ptr
->
getTimeStamp
(),
...
...
@@ -372,6 +374,11 @@ void ProcessorMotion::reintegrateBuffer(CaptureMotionPtr _capture_ptr)
}
}
CaptureMotionPtr
ProcessorMotion
::
processIncomingCapture
(
CaptureBasePtr
&
_incoming_ptr
)
{
return
std
::
static_pointer_cast
<
CaptureMotion
>
(
_incoming_ptr
);
}
CaptureMotionPtr
ProcessorMotion
::
getCaptureMotionContainingTimeStamp
(
const
TimeStamp
&
_ts
)
{
// We need to search in previous keyframes for the capture containing a motion buffer with the queried time stamp
...
...
This diff is collapsed.
Click to expand it.
src/processor_motion.h
+
7
−
0
View file @
d12251cb
...
...
@@ -269,6 +269,13 @@ class ProcessorMotion : public ProcessorBase
*/
virtual
void
postProcess
()
{
};
/**
* @brief Process the incoming CaptureBase an return a CaptureMotion.
* If not overloaded, the base class calls static_pointer_cast<CaptureMotion>(incoming)
* @return CaptureMotion.
*/
virtual
CaptureMotionPtr
processIncomingCapture
(
CaptureBasePtr
&
_incoming_ptr
);
// These are the pure virtual functions doing the mathematics
protected
:
...
...
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