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(autoware_map_based_prediction): improve orientation calculation and resample converted path #8427

Conversation

technolojin
Copy link
Contributor

Description

improve orientation calculation and resample converted path with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

Related links

How was this PR tested?

Tested under TIER IV Cloud

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@technolojin technolojin marked this pull request as ready for review August 9, 2024 06:52
@github-actions github-actions bot added the component:perception Advanced sensor data processing and environment understanding. (auto-assigned) label Aug 9, 2024
Copy link

github-actions bot commented Aug 9, 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 9, 2024
@technolojin technolojin added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 9, 2024
@technolojin technolojin enabled auto-merge (squash) August 9, 2024 07:09
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

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

Project coverage is 23.88%. Comparing base (2c4e953) to head (f6630ce).
Report is 2 commits behind head on main.

Files Patch % Lines
...based_prediction/src/map_based_prediction_node.cpp 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8427      +/-   ##
==========================================
- Coverage   23.88%   23.88%   -0.01%     
==========================================
  Files        1379     1381       +2     
  Lines      101582   101612      +30     
  Branches    38636    38629       -7     
==========================================
- Hits        24266    24265       -1     
- Misses      74856    74888      +32     
+ Partials     2460     2459       -1     
Flag Coverage Δ *Carryforward flag
differential 2.04% <0.00%> (?)
total 23.89% <ø> (+<0.01%) ⬆️ Carriedforward from 2c4e953

*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.

@github-actions github-actions bot added component:planning Route planning, decision-making, and navigation. (auto-assigned) component:control Vehicle control algorithms and mechanisms. (auto-assigned) component:system System design and integration. (auto-assigned) type:ci Continuous Integration (CI) processes and testing. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) labels Aug 13, 2024
technolojin and others added 3 commits August 13, 2024 10:49
… with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

Signed-off-by: Taekjin LEE <[email protected]>
…ion_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

Signed-off-by: Shumpei Wakabayashi <[email protected]>
…ion_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

Signed-off-by: Shumpei Wakabayashi <[email protected]>
@technolojin technolojin force-pushed the perf/perception/map-based-pred-linear-interpolation branch from 17347bb to f6630ce Compare August 13, 2024 01:50
@github-actions github-actions bot removed type:documentation Creating or refining documentation. (auto-assigned) component:sensing Data acquisition from sensors, drivers, preprocessing. (auto-assigned) component:localization Vehicle's position determination in its environment. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) component:control Vehicle control algorithms and mechanisms. (auto-assigned) component:system System design and integration. (auto-assigned) type:ci Continuous Integration (CI) processes and testing. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) component:common Common packages from the autoware-common repository. (auto-assigned) labels Aug 13, 2024
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

@technolojin technolojin merged commit 7382d66 into autowarefoundation:main Aug 13, 2024
29 of 30 checks passed
@technolojin technolojin deleted the perf/perception/map-based-pred-linear-interpolation branch August 13, 2024 02:37
esteve pushed a commit to esteve/autoware.universe that referenced this pull request Aug 13, 2024
…and resample converted path (autowarefoundation#8427)

* refactor: improve orientation calculation and resample converted path with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

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

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Kotaro Uetake <[email protected]>
technolojin added a commit to technolojin/autoware.universe that referenced this pull request Aug 15, 2024
…and resample converted path (autowarefoundation#8427)

* refactor: improve orientation calculation and resample converted path with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

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

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Kotaro Uetake <[email protected]>
technolojin added a commit to technolojin/autoware.universe that referenced this pull request Aug 15, 2024
…and resample converted path (autowarefoundation#8427)

* refactor: improve orientation calculation and resample converted path with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

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

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Kotaro Uetake <[email protected]>
technolojin added a commit to tier4/autoware.universe that referenced this pull request Aug 15, 2024
…performance of map_based_prediction (#1464)

* fix(autoware_map_based_prediction): fix argument order (autowarefoundation#8031)

fix(autoware_map_based_prediction): fix argument order in call `getFrenetPoint()`

Signed-off-by: yucedagonurcan <[email protected]>

Co-authored-by: Shintaro Tomie <[email protected]>
Co-authored-by: Kotaro Uetake <[email protected]>

* perf(map_based_prediction): remove unncessary withinRoadLanelet() (autowarefoundation#8403)

Signed-off-by: Mamoru Sobue <[email protected]>

* perf(map_based_prediction): create a fence LineString layer and use rtree query (autowarefoundation#8406)

use fence layer

Signed-off-by: Mamoru Sobue <[email protected]>

* perf(map_based_prediction): apply lerp instead of spline (autowarefoundation#8416)

perf: apply lerp interpolation instead of spline

Signed-off-by: Kotaro Uetake <[email protected]>

* perf(autoware_map_based_prediction): improve orientation calculation and resample converted path (autowarefoundation#8427)

* refactor: improve orientation calculation and resample converted path with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

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

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Kotaro Uetake <[email protected]>

* perf(map_based_prediction): improve world to map transform calculation (autowarefoundation#8413)

* perf(map_based_prediction): improve world to map transform calculation

1. remove unused transforms
2. make transform loading late as possible

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

* perf(map_based_prediction): get transform only when it is necessary

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

---------

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

* feat(autoware_universe_utils): add LRU Cache (autowarefoundation#8456)

Signed-off-by: Yukinari Hisaki <[email protected]>

* perf(autoware_map_based_prediction): speed up map based prediction by using lru cache in convertPathType (autowarefoundation#8461)

feat(autoware_map_based_prediction): speed up map based prediction by using lru cache in convertPathType

Signed-off-by: Yukinari Hisaki <[email protected]>

* fix(autoware_map_based_prediction): use surrounding_crosswalks instead of external_surrounding_crosswalks (autowarefoundation#8467)

Signed-off-by: Yukinari Hisaki <[email protected]>

---------

Signed-off-by: Mamoru Sobue <[email protected]>
Signed-off-by: Kotaro Uetake <[email protected]>
Signed-off-by: Taekjin LEE <[email protected]>
Signed-off-by: Yukinari Hisaki <[email protected]>
Co-authored-by: Onur Can Yücedağ <[email protected]>
Co-authored-by: Shintaro Tomie <[email protected]>
Co-authored-by: Kotaro Uetake <[email protected]>
Co-authored-by: Mamoru Sobue <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Yukinari Hisaki <[email protected]>
xtk8532704 pushed a commit to tier4/autoware.universe that referenced this pull request Aug 15, 2024
…and resample converted path (autowarefoundation#8427)

* refactor: improve orientation calculation and resample converted path with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

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

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Kotaro Uetake <[email protected]>
Signed-off-by: xtk8532704 <[email protected]>
mbharatheesha pushed a commit to nobleo/autoware.universe that referenced this pull request Aug 16, 2024
…and resample converted path (autowarefoundation#8427)

* refactor: improve orientation calculation and resample converted path with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

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

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Kotaro Uetake <[email protected]>
Signed-off-by: Mukunda Bharatheesha <[email protected]>
mbharatheesha pushed a commit to nobleo/autoware.universe that referenced this pull request Aug 16, 2024
…and resample converted path (autowarefoundation#8427)

* refactor: improve orientation calculation and resample converted path with linear interpolation

Simplify the calculation of the orientation for each pose in the convertPathType function by directly calculating the sine and cosine of half the yaw angle. This improves efficiency and readability. Also, improve the resampling of the converted path by using linear interpolation for better performance.

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

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

* Update perception/autoware_map_based_prediction/src/map_based_prediction_node.cpp

Co-authored-by: Kotaro Uetake <[email protected]>

---------

Signed-off-by: Taekjin LEE <[email protected]>
Co-authored-by: Shumpei Wakabayashi <[email protected]>
Co-authored-by: Kotaro Uetake <[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:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants