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
a38b35d9
Commit
a38b35d9
authored
7 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix buf of dangling features out of Problem
parent
61ad4c55
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!157
Kfpackmanager
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor_tracker_feature.cpp
+32
-6
32 additions, 6 deletions
src/processor_tracker_feature.cpp
with
32 additions
and
6 deletions
src/processor_tracker_feature.cpp
+
32
−
6
View file @
a38b35d9
...
...
@@ -53,8 +53,13 @@ unsigned int ProcessorTrackerFeature::processKnown()
known_incoming_feature_it
++
;
}
}
// Append not destructed incoming features -> this empties known_features_incoming_
std
::
cout
<<
"known features incoming: "
;
for
(
auto
ftr
:
known_features_incoming_
)
std
::
cout
<<
ftr
->
id
()
<<
", "
;
std
::
cout
<<
std
::
endl
;
// Append remaining incoming features -> this empties known_features_incoming_
incoming_ptr_
->
addFeatureList
(
known_features_incoming_
);
known_features_incoming_
.
clear
();
std
::
cout
<<
"Added to incoming features: "
<<
incoming_ptr_
->
getFeatureList
().
size
()
<<
std
::
endl
;
return
matches_last_from_incoming_
.
size
();
...
...
@@ -70,18 +75,39 @@ void ProcessorTrackerFeature::advance()
matches_origin_from_last_
[
matches_last_from_incoming_
[
match
.
first
]
->
feature_ptr_
];
}
matches_origin_from_last_
=
std
::
move
(
matches_last_from_incoming_
);
// std::cout << "advanced correspondences: " << std::endl;
// std::cout << "\tincoming 2 last: " << matches_last_from_incoming_.size() << std::endl;
// std::cout << "\tlast 2 origin: " << std::endl;
// for (auto match : matches_origin_from_last_)
// std::cout << "\t\t" << match.first->getMeasurement() << " to " << match.second.feature_ptr_->getMeasurement() << std::endl;
// std::cout << "advanced correspondences: " << std::endl;
// std::cout << "\tincoming 2 last: " << matches_last_from_incoming_.size() << std::endl;
// for (auto match : matches_last_from_incoming_)
// std::cout << "inc -> last: \t\t" << match.second->feature_ptr_->id() << " <- " << match.first->id() << std::endl;
// std::cout << "\tlast 2 origin: " << std::endl;
// for (auto match : matches_origin_from_last_)
// std::cout << "ori <- last: \t\t" << match.second->feature_ptr_->id() << match.first->id() << std::endl;
// We set problem here because we could not determine Problem from incoming capture at the time of adding the features to incoming's feature list.
for
(
auto
ftr
:
incoming_ptr_
->
getFeatureList
())
ftr
->
setProblem
(
getProblem
());
}
void
ProcessorTrackerFeature
::
reset
()
{
// std::cout << "ProcessorTrackerFeature::reset()" << std::endl;
// We also reset here the list of correspondences, which passes from last--incoming to origin--last.
std
::
cout
<<
"
\t
incoming 2 last: "
<<
matches_last_from_incoming_
.
size
()
<<
std
::
endl
;
for
(
auto
match
:
matches_last_from_incoming_
)
std
::
cout
<<
"inc -> last:
\t\t
"
<<
match
.
second
->
feature_ptr_
->
id
()
<<
" <- "
<<
match
.
first
->
id
()
<<
std
::
endl
;
std
::
cout
<<
"
\t
last 2 origin: "
<<
std
::
endl
;
for
(
auto
match
:
matches_origin_from_last_
)
std
::
cout
<<
"ori <- last:
\t\t
"
<<
match
.
second
->
feature_ptr_
->
id
()
<<
match
.
first
->
id
()
<<
std
::
endl
;
matches_origin_from_last_
=
std
::
move
(
matches_last_from_incoming_
);
// Update features according to the move above.
for
(
auto
match
:
matches_origin_from_last_
)
match
.
first
->
setProblem
(
getProblem
());
// Since these features were in incoming_, they had no Problem assigned.
}
unsigned
int
ProcessorTrackerFeature
::
processNew
(
const
unsigned
int
&
_max_new_features
)
...
...
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