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

perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum #2883

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

veqcc
Copy link
Contributor

@veqcc veqcc commented Feb 14, 2023

Signed-off-by: veqcc ryuta.kambe@tier4.jp

Description

The node map_based_prediction is too slow to publish /perception/object_recognition/objects topic when there are a lot of vehicles around the ego. This is due to the inefficient implementation of interpolateReferencePath, especially the calculation of the length of paths with calcSignedArcLength. It calls the calcSignedArcLength function for EVERY index of the path. This can be optimized with the idea cumulative sum, in which the path length of 0 to i-th index can be easily calculated with the value of 0 to (i-1)th.
The following figure shows how latencies are optimized with the idea. The red graph is the original latency, and the blue graph is the latency of the proposed implementation.
image

…erencePath with cumulative sum

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
@veqcc veqcc requested review from miursh, tkimura4, purewater0901 and a team as code owners February 14, 2023 09:39
@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Feb 14, 2023
Copy link
Contributor

@tkimura4 tkimura4 left a comment

Choose a reason for hiding this comment

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

LGTM
It's a great job!

@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Base: 11.70% // Head: 11.70% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (097c071) compared to base (f63d7d4).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2883      +/-   ##
==========================================
- Coverage   11.70%   11.70%   -0.01%     
==========================================
  Files        1314     1314              
  Lines       91666    91671       +5     
  Branches    24506    24506              
==========================================
  Hits        10728    10728              
- Misses      69751    69756       +5     
  Partials    11187    11187              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 11.70% <ø> (+<0.01%) ⬆️ Carriedforward from f63d7d4

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

Impacted Files Coverage Δ
...eption/map_based_prediction/src/path_generator.cpp 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@tkimura4 tkimura4 merged commit 15ad0c2 into autowarefoundation:main Feb 14, 2023
TomohitoAndo pushed a commit to tier4/autoware.universe that referenced this pull request Feb 15, 2023
…erencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
TomohitoAndo added a commit to tier4/autoware.universe that referenced this pull request Feb 15, 2023
#280)

perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum



* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: Ryuta Kambe <veqcc.c@gmail.com>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
tkimura4 pushed a commit to tier4/autoware.universe that referenced this pull request Feb 27, 2023
…erencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
tkimura4 added a commit to tier4/autoware.universe that referenced this pull request Feb 27, 2023
…v0.7.0

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* perf(map_based_prediction): calculate yaw without calling getLaneletAngle (autowarefoundation#2895)

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: Ryuta Kambe <veqcc.c@gmail.com>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
nabetetsu pushed a commit to xygyo77/autoware.universe that referenced this pull request Mar 1, 2023
…erencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1222-takeshi pushed a commit to 1222-takeshi/autoware.universe that referenced this pull request Mar 6, 2023
…erencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
taikitanaka3 pushed a commit to tier4/autoware.universe that referenced this pull request Mar 6, 2023
…erencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
TomohitoAndo pushed a commit to tier4/autoware.universe that referenced this pull request Sep 8, 2023
…erencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
TomohitoAndo added a commit to tier4/autoware.universe that referenced this pull request Sep 13, 2023
…erencePath with cumulative sum (#810)

perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum (autowarefoundation#2883)

* perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum



* style(pre-commit): autofix

---------

Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: Ryuta Kambe <veqcc.c@gmail.com>
Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@veqcc veqcc deleted the perf_map_based_prediction branch November 28, 2024 15:03
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants