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
753c1b7c
Commit
753c1b7c
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Remove setKeyFrame() and explode the only call there: clean redundant code.
parent
6e57b23b
No related branches found
No related tags found
1 merge request
!157
Kfpackmanager
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/processor_tracker.cpp
+8
-15
8 additions, 15 deletions
src/processor_tracker.cpp
src/processor_tracker.h
+0
-4
0 additions, 4 deletions
src/processor_tracker.h
with
8 additions
and
19 deletions
src/processor_tracker.cpp
+
8
−
15
View file @
753c1b7c
...
...
@@ -155,11 +155,18 @@ void ProcessorTracker::process(CaptureBasePtr const _incoming_ptr)
// process
processNew
(
max_new_features_
);
setKeyFrame
(
last_ptr_
);
// Set key
last_ptr_
->
getFramePtr
()
->
setKey
();
// Set state to the keyframe
last_ptr_
->
getFramePtr
()
->
setState
(
getProblem
()
->
getState
(
last_ptr_
->
getTimeStamp
()));
// Establish constraints
establishConstraints
();
// Call the new keyframe callback in order to let the other processors to establish their constraints
getProblem
()
->
keyFrameCallback
(
last_ptr_
->
getFramePtr
(),
std
::
static_pointer_cast
<
ProcessorBase
>
(
shared_from_this
()),
time_tolerance_
);
// Update pointers
resetDerived
();
origin_ptr_
=
last_ptr_
;
...
...
@@ -189,20 +196,6 @@ void ProcessorTracker::process(CaptureBasePtr const _incoming_ptr)
postProcess
();
}
void
ProcessorTracker
::
setKeyFrame
(
CaptureBasePtr
_capture_ptr
)
{
assert
(
_capture_ptr
!=
nullptr
&&
_capture_ptr
->
getFramePtr
()
!=
nullptr
&&
"ProcessorTracker::setKeyFrame: null capture or capture without frame"
);
if
(
!
_capture_ptr
->
getFramePtr
()
->
isKey
())
{
// Set key
_capture_ptr
->
getFramePtr
()
->
setKey
();
// Set state to the keyframe
_capture_ptr
->
getFramePtr
()
->
setState
(
getProblem
()
->
getState
(
_capture_ptr
->
getTimeStamp
()));
// Call the new keyframe callback in order to let the other processors to establish their constraints
getProblem
()
->
keyFrameCallback
(
_capture_ptr
->
getFramePtr
(),
std
::
static_pointer_cast
<
ProcessorBase
>
(
shared_from_this
()),
time_tolerance_
);
}
}
void
ProcessorTracker
::
computeProcessingStep
()
{
// First determine the processing phase by checking the status of the tracker pointers
...
...
This diff is collapsed.
Click to expand it.
src/processor_tracker.h
+
0
−
4
View file @
753c1b7c
...
...
@@ -187,10 +187,6 @@ class ProcessorTracker : public ProcessorBase
*/
virtual
void
establishConstraints
()
=
0
;
/**\brief set key Frame to the provided Capture's frame
*/
virtual
void
setKeyFrame
(
CaptureBasePtr
_capture_ptr
);
/** \brief Reset the tracker using the \b last Capture as the new \b origin.
*/
virtual
void
resetDerived
()
=
0
;
...
...
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