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
89fa4afb
Commit
89fa4afb
authored
6 years ago
by
Joan Vallvé Navarro
Browse files
Options
Downloads
Patches
Plain Diff
reset and advance clear list of new features and landmarks
parent
fa34b15a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!274
Resolve "Emplace API inconsistent with ProcessorTrackerFeature/Landmark functions"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_tracker_landmark.cpp
+17
-22
17 additions, 22 deletions
src/processor/processor_tracker_landmark.cpp
with
17 additions
and
22 deletions
src/processor/processor_tracker_landmark.cpp
+
17
−
22
View file @
89fa4afb
...
...
@@ -28,28 +28,27 @@ ProcessorTrackerLandmark::~ProcessorTrackerLandmark()
void
ProcessorTrackerLandmark
::
advanceDerived
()
{
for
(
auto
match
:
matches_landmark_from_last_
)
{
match
.
second
.
reset
();
// TODO: Should we just remove the entries? What about match.first?
}
matches_landmark_from_last_
=
std
::
move
(
matches_landmark_from_incoming_
);
new_features_last_
=
std
::
move
(
new_features_incoming_
);
matches_landmark_from_incoming_
.
clear
();
new_features_incoming_
.
clear
();
new_landmarks_
.
clear
();
}
void
ProcessorTrackerLandmark
::
resetDerived
()
{
for
(
auto
match
:
matches_landmark_from_last_
)
{
match
.
second
.
reset
();
// TODO: Should we just remove the entries? What about match.first?
}
matches_landmark_from_last_
=
std
::
move
(
matches_landmark_from_incoming_
);
new_features_last_
=
std
::
move
(
new_features_incoming_
);
matches_landmark_from_incoming_
.
clear
();
new_features_incoming_
.
clear
();
new_landmarks_
.
clear
();
}
unsigned
int
ProcessorTrackerLandmark
::
processKnown
()
{
// clear matches list
matches_landmark_from_incoming_
.
clear
();
assert
(
matches_landmark_from_incoming_
.
empty
());
// Find landmarks in incoming_ptr_
FeatureBasePtrList
known_features_list_incoming
;
...
...
@@ -66,18 +65,14 @@ unsigned int ProcessorTrackerLandmark::processNew(const int& _max_features)
/* Rationale: A keyFrame will be created using the last Capture.
*
* First, we work on this Capture to detect new Features,
* eventually create Landmarks with them,
* and in such case create the new Factors feature-landmark.
* When done, we need to track these new Features to the incoming Capture.
*
* At the end, all new Features are appended to the lists of known Features in
* the last and incoming Captures.
* eventually create Landmarks with them.
* When done, we need to find these new Landmarks in the incoming Capture.
*/
// clear new lists
new_features_last_
.
clear
(
);
new_features_incoming_
.
clear
(
);
new_landmarks_
.
clear
(
);
//
assuming
clear
ed
new lists
assert
(
new_features_last_
.
empty
()
);
assert
(
new_features_incoming_
.
empty
()
);
assert
(
new_landmarks_
.
empty
()
);
// We first need to populate the \b last Capture with new Features
unsigned
int
n
=
detectNewFeatures
(
_max_features
,
...
...
@@ -102,8 +97,8 @@ unsigned int ProcessorTrackerLandmark::processNew(const int& _max_features)
void
ProcessorTrackerLandmark
::
emplaceNewLandmarks
()
{
//
First, make sure the list is empty and will only contain new lmks
new_landmarks_
.
clear
(
);
//
assuming empty list
assert
(
new_landmarks_
.
empty
()
);
// Create a landmark for each new feature in last Capture:
for
(
auto
new_feature_ptr
:
new_features_last_
)
...
...
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