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(intersection): reduce bg::within call #2190

Merged

Conversation

soblin
Copy link
Contributor

@soblin soblin commented Nov 1, 2022

Signed-off-by: Mamoru Sobue mamoru.sobue@tier4.jp

Description

cc: @veqcc

In getFirstPointInsidePolygons function, I added lane_id argument in order to call boost::within only to those points which are inside the lane of interest.

Related links

#2097

Tests performed

Tested in kashiwanoha map used in tutorial. The number of calls to boost::within reduced from 7103 to 1273.
Screenshot from 2022-11-01 18-13-00

The time for getStopLineFromMap reduce from ~9ms to ~1ms.

Pre-review checklist for the PR author

The PR author must check the checkboxes below when creating the PR.

In-review checklist for the PR reviewers

The PR reviewers must check the checkboxes below before approval.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

Post-review checklist for the PR author

The PR author must check the checkboxes below before merging.

  • There are no open discussions or they are tracked via tickets.
  • The PR is ready for merge.

After all checkboxes are checked, anyone who has write access can merge the PR.

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
@soblin soblin force-pushed the perf/intersection-crop-path branch from b38a403 to e68bcc6 Compare November 1, 2022 09:48
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

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

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2190      +/-   ##
==========================================
- Coverage   10.84%   10.82%   -0.02%     
==========================================
  Files        1178     1178              
  Lines       84833    84988     +155     
  Branches    19987    20135     +148     
==========================================
  Hits         9204     9204              
- Misses      65894    66035     +141     
- Partials     9735     9749      +14     
Flag Coverage Δ *Carryforward flag
differential 4.26% <0.00%> (?)
total 10.82% <0.00%> (ø) Carriedforward from feb9f32

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

Impacted Files Coverage Δ
...ity_planner/src/scene_module/intersection/util.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.

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
@soblin
Copy link
Contributor Author

soblin commented Nov 4, 2022

@kyoichi-sugahara @taikitanaka3 @veqcc @shmpwk Can you review and approve this change ?

@soblin
Copy link
Contributor Author

soblin commented Nov 5, 2022

@tkimura4 @kosuke55 Can you briefly take a look at this and approve this ? (There's no feature change !)

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
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

@tkimura4 tkimura4 merged commit 0369970 into autowarefoundation:main Nov 5, 2022
@soblin soblin deleted the perf/intersection-crop-path branch November 6, 2022 22:42
soblin added a commit to tier4/autoware.universe that referenced this pull request Nov 22, 2022
* perf(intersection): reduce bg::within call

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* use lane interval for getStopLineFromMap too

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* changed index type to size_t

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* replace unsigned to size_t

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
HansRobo pushed a commit to HansRobo/autoware.universe that referenced this pull request Dec 16, 2022
* perf(intersection): reduce bg::within call

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* use lane interval for getStopLineFromMap too

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* changed index type to size_t

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* replace unsigned to size_t

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
soblin added a commit to soblin/autoware.universe that referenced this pull request Dec 22, 2022
* perf(intersection): reduce bg::within call

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* use lane interval for getStopLineFromMap too

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* changed index type to size_t

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* replace unsigned to size_t

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
YoshiRi pushed a commit to YoshiRi/autoware.universe that referenced this pull request Jan 11, 2023
* perf(intersection): reduce bg::within call

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* use lane interval for getStopLineFromMap too

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* changed index type to size_t

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* replace unsigned to size_t

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
Signed-off-by: yoshiri <yoshiyoshidetteiu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants