Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
imu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
imu
Commits
c991d42d
Commit
c991d42d
authored
3 years ago
by
Joan Solà Ortega
Browse files
Options
Downloads
Patches
Plain Diff
Fix 420
parent
f33a5796
No related branches found
No related tags found
3 merge requests
!39
release after RAL
,
!38
After 2nd RAL submission
,
!37
Resolve "Follow core 420"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/processor/processor_compass.cpp
+7
-5
7 additions, 5 deletions
src/processor/processor_compass.cpp
with
7 additions
and
5 deletions
src/processor/processor_compass.cpp
+
7
−
5
View file @
c991d42d
...
...
@@ -39,13 +39,13 @@ ProcessorCompass::~ProcessorCompass()
void
ProcessorCompass
::
processCapture
(
CaptureBasePtr
_capture
)
{
// Search for any stored frame within time tolerance of capture
auto
frame
_pack
=
buffer_
pack_kf
_
.
select
(
_capture
->
getTimeStamp
(),
params_
->
time_tolerance
);
if
(
frame
_pack
)
auto
key
frame
=
buffer_
frame
_
.
select
(
_capture
->
getTimeStamp
(),
params_
->
time_tolerance
);
if
(
key
frame
)
{
processMatch
(
frame_pack
->
key
_
frame
,
_capture
);
processMatch
(
keyframe
,
_capture
);
// remove the frame and older frames
buffer_
pack_kf
_
.
removeUpTo
(
frame_pack
->
key
_
frame
->
getTimeStamp
());
buffer_
frame
_
.
removeUpTo
(
keyframe
->
getTimeStamp
());
}
// Otherwise: store capture
// Note that more than one processor can be emplacing frames, so an older frame can arrive later than this one.
...
...
@@ -55,6 +55,8 @@ void ProcessorCompass::processCapture(CaptureBasePtr _capture)
void
ProcessorCompass
::
processKeyFrame
(
FrameBasePtr
_frame
,
const
double
&
_time_tolerance
)
{
_frame
->
setTimeTolerance
(
_time_tolerance
);
// Search for any stored capture within time tolerance of frame
auto
capture
=
buffer_capture_
.
select
(
_frame
->
getTimeStamp
(),
_time_tolerance
);
if
(
capture
)
...
...
@@ -68,7 +70,7 @@ void ProcessorCompass::processKeyFrame(FrameBasePtr _frame, const double& _time_
else
if
(
buffer_capture_
.
selectLastAfter
(
_frame
->
getTimeStamp
(),
_time_tolerance
)
==
nullptr
)
{
// store frame
buffer_
pack_kf
_
.
add
(
_frame
,
_time_toleranc
e
);
buffer_
frame
_
.
add
(
_frame
->
getTimeStamp
(),
_fram
e
);
}
// Otherwise: There are captures more recent than the frame but none that match with it -> discard frame
}
...
...
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