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(lane_change): only compute interpolate ego once #2839

Conversation

zulfaqar-azmi-t4
Copy link
Contributor

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 commented Feb 8, 2023

Description

Related to increasing performance of lane change module.

At the moment, ego pose and polyon is interpolated against its predicted path during safety check, together with target object. but this is unnecessary, as ego path can be interpolated only once.

To solve this, I have extracted ego pose and polygon computation so that it only computed once.

Related links

#2825

Tests performed

Notes for reviewers

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.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Feb 8, 2023
@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 11.53% // Head: 11.64% // Increases project coverage by +0.11% 🎉

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2839      +/-   ##
==========================================
+ Coverage   11.53%   11.64%   +0.11%     
==========================================
  Files        1314     1314              
  Lines       92792    92802      +10     
  Branches    24996    25001       +5     
==========================================
+ Hits        10699    10805     +106     
+ Misses      70851    70661     -190     
- Partials    11242    11336      +94     
Flag Coverage Δ *Carryforward flag
differential 5.82% <0.00%> (?)
total 11.64% <ø> (+0.11%) ⬆️ Carriedforward from 2f4192b

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

Impacted Files Coverage Δ
...analysis/src/control_performance_analysis_node.cpp 0.00% <ø> (ø)
...n_checker_node/obstacle_collision_checker_node.cpp 0.73% <ø> (+0.03%) ⬆️
control/shift_decider/src/shift_decider.cpp 0.00% <ø> (ø)
...lanner/include/behavior_path_planner/utilities.hpp 23.80% <ø> (ø)
...ehavior_path_planner/src/util/lane_change/util.cpp 0.00% <0.00%> (ø)
planning/behavior_path_planner/src/utilities.cpp 8.26% <0.00%> (-0.11%) ⬇️
...clude/obstacle_avoidance_planner/mpt_optimizer.hpp 80.00% <0.00%> (ø)
...vehicle_model/sim_model_ideal_steer_acc_geared.cpp 85.71% <0.00%> (ø)
... and 6 more

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.

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the perf-only-compute-interpolate-ego-once branch 2 times, most recently from 2c5d521 to b9bb569 Compare February 17, 2023 10:16
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the perf-only-compute-interpolate-ego-once branch from b9bb569 to 24dc70c Compare February 21, 2023 12:11
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the perf-only-compute-interpolate-ego-once branch from 24dc70c to ffbefb9 Compare February 27, 2023 01:36
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as ready for review February 27, 2023 01:37
@taikitanaka3 taikitanaka3 changed the title Perf only compute interpolate ego once perf(lane_change): only compute interpolate ego once Feb 28, 2023
@taikitanaka3 taikitanaka3 merged commit 7d15fdf into autowarefoundation:main Feb 28, 2023
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 deleted the perf-only-compute-interpolate-ego-once branch February 28, 2023 04:20
tkimura4 pushed a commit to tier4/autoware.universe that referenced this pull request Feb 28, 2023
…ion#2839)

* fix(lane_change): improvement on isLaneChangePathSafe computation

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* re-add logic to ignore parked vehicle

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix the duration issues and some code editing

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
tkimura4 added a commit to tier4/autoware.universe that referenced this pull request Feb 28, 2023
* fix(lane_change): extend target lane range in safety check (autowarefoundation#2776)

* fix(lane_change): extend target lane range in safety check

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix both safety check in lane change module

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Refactoring

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* also made for external request

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* get all lanes within 100 meters

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Change logging level

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Fix target lane empty

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* check current pose

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fixed the wrong lane parameter

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix spell check

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* make code similar between lane change and external request

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix collision not working

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Rename parameters

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix remove some argument from function parameter

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* refactor(lane_change): compute obj indices return if safe path found (autowarefoundation#2825)

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* perf(lane_change): only compute interpolate ego once (autowarefoundation#2839)

* fix(lane_change): improvement on isLaneChangePathSafe computation

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* re-add logic to ignore parked vehicle

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix the duration issues and some code editing

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
Co-authored-by: Zulfaqar Azmi <93502286+zulfaqar-azmi-t4@users.noreply.github.com>
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
…ion#2839)

* fix(lane_change): improvement on isLaneChangePathSafe computation

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* re-add logic to ignore parked vehicle

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix the duration issues and some code editing

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
1222-takeshi pushed a commit to 1222-takeshi/autoware.universe that referenced this pull request Mar 6, 2023
…ion#2839)

* fix(lane_change): improvement on isLaneChangePathSafe computation

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* re-add logic to ignore parked vehicle

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix the duration issues and some code editing

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
taikitanaka3 pushed a commit to tier4/autoware.universe that referenced this pull request Mar 6, 2023
* fix(lane_change): extend target lane range in safety check (autowarefoundation#2776)

* fix(lane_change): extend target lane range in safety check

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix both safety check in lane change module

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Refactoring

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* also made for external request

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* get all lanes within 100 meters

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Change logging level

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Fix target lane empty

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* check current pose

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fixed the wrong lane parameter

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix spell check

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* make code similar between lane change and external request

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix collision not working

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* Rename parameters

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix remove some argument from function parameter

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* style(pre-commit): autofix

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* refactor(lane_change): compute obj indices return if safe path found (autowarefoundation#2825)

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* perf(lane_change): only compute interpolate ego once (autowarefoundation#2839)

* fix(lane_change): improvement on isLaneChangePathSafe computation

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* re-add logic to ignore parked vehicle

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

* fix the duration issues and some code editing

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
Co-authored-by: Zulfaqar Azmi <93502286+zulfaqar-azmi-t4@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants