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 generating path if longitudinal distance difference is less than threshold #8363

Conversation

zulfaqar-azmi-t4
Copy link
Contributor

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

Description

Current behavior:

The number of lane change samples increases as ego vehicle approaches terminal start, due to the greater number of longitudinal acceleration samples.

The increase in lane change samples also leads to higher computational costs, as each sample generates a candidate path and undergoes various validations.

Proposed behavior:

Each lane change sample is computed based on the corresponding longitudinal acceleration sample.

As the ego vehicle approaches the terminal start, the distance differences between each lane change sample become smaller.

In this case, if the distance difference is small and the previous path is unsafe, it's likely that the new path with a small distance difference will also be unsafe. Therefore, it is feasible to skip generating paths with small distance differences and focus on those with larger differences instead.

Following are the illustrations of the proposed behavior

prepare_diff_th

lc_diff_th

Before PR

Has more number of candidate path (5 samples) and processing time is between 7~10ms.

beforePR.mp4

After PR

Has less number of candidate path (3 sample) and processing time is between 5~8ms.

afterPR.mp4

Related links

Required #8362
Required launcher: autowarefoundation/autoware_launch#1108
Parent Issue:

  • Link

How was this PR tested?

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:

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 force-pushed the lc-skip-generating-path-if-unmet-condition branch from 5213b10 to 158b6d2 Compare August 9, 2024 08:57
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Copy link
Contributor

@maxime-clem maxime-clem left a comment

Choose a reason for hiding this comment

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

Code looks good and a quick test in Psim did not reveal any issue.

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 12 lines in your changes missing coverage. Please review.

Project coverage is 23.72%. Comparing base (e9dcf99) to head (a41fe97).
Report is 14 commits behind head on main.

Files Patch % Lines
...are_behavior_path_lane_change_module/src/scene.cpp 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8363      +/-   ##
==========================================
- Coverage   23.72%   23.72%   -0.01%     
==========================================
  Files        1379     1380       +1     
  Lines      101392   101409      +17     
  Branches    38522    38534      +12     
==========================================
+ Hits        24058    24061       +3     
- Misses      74913    74927      +14     
  Partials     2421     2421              
Flag Coverage Δ *Carryforward flag
differential 15.68% <25.00%> (?)
total 23.73% <ø> (+<0.01%) ⬆️ Carriedforward from 158b6d2

*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 9876c76 into autowarefoundation:main Aug 13, 2024
28 of 30 checks passed
zulfaqar-azmi-t4 added a commit to tier4/autoware.universe that referenced this pull request Aug 13, 2024
…rence is less than threshold (autowarefoundation#8363)

* fix when prepare length is insufficient

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

* add reason for comparing prev_prep_diff with eps for lc_length_diff

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

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
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
…rence is less than threshold (autowarefoundation#8363)

* fix when prepare length is insufficient

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

* add reason for comparing prev_prep_diff with eps for lc_length_diff

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

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
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
…rence is less than threshold (autowarefoundation#8363)

* fix when prepare length is insufficient

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

* add reason for comparing prev_prep_diff with eps for lc_length_diff

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

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
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
…rence is less than threshold (autowarefoundation#8363)

* fix when prepare length is insufficient

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

* add reason for comparing prev_prep_diff with eps for lc_length_diff

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

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: xtk8532704 <1041084556@qq.com>
mbharatheesha pushed a commit to nobleo/autoware.universe that referenced this pull request Aug 16, 2024
…rence is less than threshold (autowarefoundation#8363)

* fix when prepare length is insufficient

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

* add reason for comparing prev_prep_diff with eps for lc_length_diff

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

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Mukunda Bharatheesha <mukunda.bharatheesha@nobleo.nl>
mbharatheesha pushed a commit to nobleo/autoware.universe that referenced this pull request Aug 16, 2024
…rence is less than threshold (autowarefoundation#8363)

* fix when prepare length is insufficient

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

* add reason for comparing prev_prep_diff with eps for lc_length_diff

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

---------

Signed-off-by: Muhammad Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 deleted the lc-skip-generating-path-if-unmet-condition branch August 23, 2024 05:28
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) 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.

2 participants