Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(autoware_multi_object_tracker): reduce trigger latency #8657

Conversation

technolojin
Copy link
Contributor

@technolojin technolojin commented Aug 28, 2024

Description

Reduce latency of the multi object tracker caused by periodic trigger of the process.

First implementation
#6710

Revert of the first implementation
#8277
#8484

Issue: Latency due to the timer trigger cycle (and its phase)

image
The multi-object-tracker adds 50ms of latency. The latency was increased from 2-5ms to 15-60ms.

image (1)
The latency is changing on each test.

The reason of additional latency is due to the phase difference between the detected object (after detection and merge) and the multi object tracker timer. The phase delay is determined at the launch time and it is random.

Solution

Bringing back high frequency checker of publish timing.

  1. The previous implementation checked the latest publish timing when the main input channel arrival and timer.
  2. The interval was set to keep in the range of 70% to 111% of the main frequency (which is 10 Hz in general).

The new implementation has been changed for stability.

  1. The publish timing checking is triggered by the timer only.
  2. The interval range is set to 85% to 105%.

Related links

TIER IV INTERNAL discussion
Reported increased latency after #8277

How was this PR tested?

TIER IV Cloud

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added component:perception Advanced sensor data processing and environment understanding. (auto-assigned) tag:require-cuda-build-and-test labels Aug 28, 2024
Copy link

github-actions bot commented Aug 28, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@technolojin technolojin self-assigned this Aug 28, 2024
@technolojin technolojin force-pushed the feat/mot-reduce-trigger-latency branch from 45fb89a to f371a6a Compare August 29, 2024 05:17
@technolojin technolojin added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 29, 2024
@technolojin technolojin marked this pull request as ready for review August 29, 2024 05:49
Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 24.17%. Comparing base (e709b10) to head (8ab4fbf).
Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
...i_object_tracker/src/multi_object_tracker_node.cpp 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8657      +/-   ##
==========================================
- Coverage   24.17%   24.17%   -0.01%     
==========================================
  Files        1399     1399              
  Lines      102126   102142      +16     
  Branches    38770    38774       +4     
==========================================
  Hits        24688    24688              
- Misses      74940    74956      +16     
  Partials     2498     2498              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 24.17% <ø> (+<0.01%) ⬆️ Carriedforward from f371a6a

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@YoshiRi YoshiRi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but would you mind check my comment?

@technolojin technolojin enabled auto-merge (squash) September 2, 2024 00:11
Signed-off-by: Taekjin LEE <[email protected]>
@technolojin technolojin merged commit 544b06e into autowarefoundation:main Sep 2, 2024
31 checks passed
@technolojin technolojin deleted the feat/mot-reduce-trigger-latency branch September 2, 2024 01:39
ktro2828 pushed a commit to ktro2828/autoware.universe that referenced this pull request Sep 18, 2024
…foundation#8657)

* feat: timer-based trigger with phase compensation

Signed-off-by: Taekjin LEE <[email protected]>

* chore: update comments, name of variable

Signed-off-by: Taekjin LEE <[email protected]>

* chore: declare min and max publish interval ratios

Signed-off-by: Taekjin LEE <[email protected]>

* style(pre-commit): autofix

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
technolojin added a commit to technolojin/autoware.universe that referenced this pull request Dec 18, 2024
technolojin added a commit to tier4/autoware.universe that referenced this pull request Dec 18, 2024
fix: implementing trigger timing fix

implementing autowarefoundation#8657

Signed-off-by: Taekjin LEE <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:perception Advanced sensor data processing and environment understanding. (auto-assigned) tag:require-cuda-build-and-test tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants