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

fix(lane_change): skip path computation if len exceed dist to terminal start #8359

Conversation

zulfaqar-azmi-t4
Copy link
Contributor

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 commented Aug 5, 2024

Description

Lane change module evaluates the distance from preparation start to lane changing end at later phase.
Hence, if prepare path's lengths exceed distance to lane change terminal start, there will be unnecessary checks and computation before the evaluation.

This PR aims to fix this by skipping path computation if the prepare segment length exceed ego current distance to terminal start.

diagram_for_PR (4)

This PR also add computation.hpp/cpp to avoid utils.hpp/cpp file from having too many number of lines

After PR

[DEBUG 1722854092.480406897] [lane_change.NORMAL]: Reject: Prepare length exceed distance to terminal start. prep_len: 8.00000,  ego dist to terminal start: 7.83372 (getLaneChangePaths() at /home/zulfaqar/autoware/pilot-auto/src/autoware/universe/planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp:1411)
[DEBUG 1722854092.480501893] [lane_change.NORMAL]: Prepare path satisfy constraints | prep_time: 4.00000 | lon_acc sampled: 0.80000, actual: 0.80000 | prep_len: 6.40000 (operator()() at /home/zulfaqar/autoware/pilot-auto/src/autoware/universe/planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp:1422)

Path exceed ego dist to terminal start is being rejected.

Related links

Depends on #8358

Parent Issue:

  • Link

How was this PR tested?

PSIM

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Aug 5, 2024
Copy link

github-actions bot commented Aug 5, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 changed the title Skip path computation if len exceed dist to terminal start fix(lane_change): skip path computation if len exceed dist to terminal start Aug 5, 2024
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the skip-path-computation-if-len-exceed-dist-to-terminal-start branch from e82dcc9 to 29f8a24 Compare August 7, 2024 04:29
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the skip-path-computation-if-len-exceed-dist-to-terminal-start branch from 29f8a24 to e1fb69c Compare August 7, 2024 07:34
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 7, 2024
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 enabled auto-merge (squash) August 7, 2024 07:34
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

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

Project coverage is 23.77%. Comparing base (389683f) to head (e1fb69c).
Report is 9 commits behind head on main.

Files Patch % Lines
..._path_lane_change_module/src/utils/calculation.cpp 0.00% 9 Missing ⚠️
...are_behavior_path_lane_change_module/src/scene.cpp 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8359      +/-   ##
==========================================
- Coverage   23.77%   23.77%   -0.01%     
==========================================
  Files        1379     1381       +2     
  Lines      101359   101392      +33     
  Branches    38527    38529       +2     
==========================================
+ Hits        24100    24101       +1     
- Misses      74780    74811      +31     
- Partials     2479     2480       +1     
Flag Coverage Δ *Carryforward flag
differential 15.67% <0.00%> (?)
total 23.78% <ø> (+<0.01%) ⬆️ Carriedforward from 389683f

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

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 merged commit 9f7a103 into autowarefoundation:main Aug 7, 2024
37 of 39 checks passed
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 deleted the skip-path-computation-if-len-exceed-dist-to-terminal-start branch August 7, 2024 08:14
zulfaqar-azmi-t4 added a commit to tier4/autoware.universe that referenced this pull request Aug 13, 2024
…l start (autowarefoundation#8359)

Skip computation if prepare length exceed distance to terminal start

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
esteve pushed a commit to esteve/autoware.universe that referenced this pull request Aug 13, 2024
…l start (autowarefoundation#8359)

Skip computation if prepare length exceed distance to terminal start

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
saka1-s pushed a commit to saka1-s/autoware.universe that referenced this pull request Aug 15, 2024
…l start (autowarefoundation#8359)

Skip computation if prepare length exceed distance to terminal start

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
xtk8532704 pushed a commit to tier4/autoware.universe that referenced this pull request Aug 15, 2024
…l start (autowarefoundation#8359)

Skip computation if prepare length exceed distance to terminal start

Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: xtk8532704 <1041084556@qq.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) 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.

2 participants