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
Merge requests
!448
Draft: Resolve "Implementation of new nodes creation"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Draft: Resolve "Implementation of new nodes creation"
454-implementation-of-new-nodes-creation
into
devel
Overview
2
Commits
457
Pipelines
462
Changes
3
Open
Joan Vallvé Navarro
requested to merge
454-implementation-of-new-nodes-creation
into
devel
3 years ago
Overview
2
Commits
457
Pipelines
462
Changes
3
Expand
Closes
#454
,
#318
,
#364
,
#449
,
#381
,
#376
,
#208
,
#485
Edited
11 months ago
by
Joan Vallvé Navarro
0
0
Merge request reports
Viewing commit
8c5c945e
Prev
Next
Show latest version
3 files
+
28
−
18
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
Search (e.g. *.vue) (Ctrl+P)
8c5c945e
fixing TimeStamp issues in ProcessorMotion
· 8c5c945e
Joan Vallvé Navarro
authored
1 month ago
src/capture/capture_motion.cpp
+
9
−
8
Options
@@ -64,15 +64,16 @@ CaptureMotion::~CaptureMotion()
bool
CaptureMotion
::
containsTimeStamp
(
const
TimeStamp
&
_ts
,
double
_time_tolerance
)
const
{
assert
(
_ts
.
ok
()
and
this
->
time_stamp_
.
ok
());
assert
(
this
->
time_stamp_
==
this
->
getBuffer
().
back
().
ts_
and
"CaptureMotion::containsTimeStamp: The time stamp of the capture is not equal to the last motion in the "
"buffer"
);
// the same capture is within tolerance
if
(
this
->
time_stamp_
-
_time_tolerance
<=
_ts
&&
_ts
<=
this
->
time_stamp_
+
_time_tolerance
)
return
true
;
// buffer is empty (and the capture is not within tolerance)
if
(
this
->
getBuffer
().
empty
())
return
false
;
// if buffer is empty, check if the capture is within tolerance
if
(
this
->
getBuffer
().
empty
())
{
if
(
this
->
time_stamp_
-
_time_tolerance
<=
_ts
and
_ts
<=
this
->
time_stamp_
+
_time_tolerance
)
return
true
;
else
// buffer is empty (and the capture is not within tolerance)
return
false
;
}
// buffer encloses timestamp, if ts is:
// from : buffer.first.ts - tt
Loading