Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
objectslam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
plugins
objectslam
Commits
295f6657
Commit
295f6657
authored
4 years ago
by
Mederic Fourmy
Browse files
Options
Downloads
Patches
Plain Diff
Fix too many keyframe creation
parent
fab5d18a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
demos/processor_tracker_landmark_object.yaml
+2
-2
2 additions, 2 deletions
demos/processor_tracker_landmark_object.yaml
src/processor/processor_tracker_landmark_object.cpp
+11
-4
11 additions, 4 deletions
src/processor/processor_tracker_landmark_object.cpp
with
13 additions
and
6 deletions
demos/processor_tracker_landmark_object.yaml
+
2
−
2
View file @
295f6657
...
@@ -5,11 +5,11 @@ time_tolerance: 0.1222
...
@@ -5,11 +5,11 @@ time_tolerance: 0.1222
vote
:
vote
:
voting_active
:
true
voting_active
:
true
min_time_vote
:
0
# s
min_time_vote
:
0
# s
max_time_vote
:
0.9999
# s
max_time_vote
:
1.001
# s
min_features_for_keyframe
:
1
min_features_for_keyframe
:
1
nb_vote_for_every_first
:
0
nb_vote_for_every_first
:
0
reestimate_last_frame
:
tru
e
# for a better prior on the new keyframe: use only if no motion processor
reestimate_last_frame
:
fals
e
# for a better prior on the new keyframe: use only if no motion processor
add_3d_cstr
:
false
# add 3D constraints between the KF so that they do not jump when using apriltag only
add_3d_cstr
:
false
# add 3D constraints between the KF so that they do not jump when using apriltag only
max_new_features
:
-1
max_new_features
:
-1
apply_loss_function
:
true
apply_loss_function
:
true
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/processor/processor_tracker_landmark_object.cpp
+
11
−
4
View file @
295f6657
...
@@ -102,8 +102,8 @@ LandmarkBasePtr ProcessorTrackerLandmarkObject::emplaceLandmark(FeatureBasePtr _
...
@@ -102,8 +102,8 @@ LandmarkBasePtr ProcessorTrackerLandmarkObject::emplaceLandmark(FeatureBasePtr _
}
}
unsigned
int
ProcessorTrackerLandmarkObject
::
detectNewFeatures
(
const
int
&
_max_new_features
,
unsigned
int
ProcessorTrackerLandmarkObject
::
detectNewFeatures
(
const
int
&
_max_new_features
,
const
CaptureBasePtr
&
_capture
,
const
CaptureBasePtr
&
_capture
,
FeatureBasePtrList
&
_features_out
)
FeatureBasePtrList
&
_features_out
)
{
{
// list of landmarks in the map
// list of landmarks in the map
auto
lmk_lst
=
getProblem
()
->
getMap
()
->
getLandmarkList
();
auto
lmk_lst
=
getProblem
()
->
getMap
()
->
getLandmarkList
();
...
@@ -148,15 +148,22 @@ bool ProcessorTrackerLandmarkObject::voteForKeyFrame() const
...
@@ -148,15 +148,22 @@ bool ProcessorTrackerLandmarkObject::voteForKeyFrame() const
if
(
detections_last_
.
empty
())
if
(
detections_last_
.
empty
())
return
false
;
return
false
;
auto
origin
=
getOrigin
();
auto
incoming
=
getIncoming
();
std
::
cout
<<
"voteForKeyFrame"
<<
std
::
endl
;
std
::
cout
<<
origin
->
id
()
<<
" "
<<
getOrigin
()
->
getTimeStamp
().
get
()
<<
std
::
endl
;
std
::
cout
<<
incoming
->
id
()
<<
" "
<<
getIncoming
()
->
getTimeStamp
().
get
()
<<
std
::
endl
;
double
dt_incoming_origin
=
getIncoming
()
->
getTimeStamp
().
get
()
-
getOrigin
()
->
getTimeStamp
().
get
();
double
dt_incoming_origin
=
getIncoming
()
->
getTimeStamp
().
get
()
-
getOrigin
()
->
getTimeStamp
().
get
();
bool
more_than_min
_time_vote
=
dt_incoming_origin
>
min_time_vote_
;
bool
enough
_time_vote
=
dt_incoming_origin
>
min_time_vote_
;
bool
too_long_since_last_KF
=
dt_incoming_origin
>
max_time_vote_
;
bool
too_long_since_last_KF
=
dt_incoming_origin
>
max_time_vote_
;
// the elapsed time since last KF is too long
// the elapsed time since last KF is too long
if
(
too_long_since_last_KF
){
if
(
too_long_since_last_KF
){
return
true
;
return
true
;
}
}
// no detection in incoming capture and a minimum time since last KF has past
// no detection in incoming capture and a minimum time since last KF has past
if
((
detections_incoming_
.
size
()
>
min_features_for_keyframe_
)
and
more_than_min
_time_vote
)
if
((
detections_incoming_
.
size
()
<
min_features_for_keyframe_
)
and
enough
_time_vote
)
return
true
;
return
true
;
// Vote for every image processed at the beginning if possible
// Vote for every image processed at the beginning if possible
...
...
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