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

refactor(lane_change): refactor longitudinal acceleration sampling #9091

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

mkquda
Copy link
Contributor

@mkquda mkquda commented Oct 16, 2024

Description

when sampling lane change paths, the min & max longitudinal accelerations are computed once using the maximum prepare duration setting. The longitudinal acceleration is then sampled between the computed min & max values, and used to generated prepare phase metrics.

However when ego is approaching terminal, the prepare duration will also be sampled between 0 and max prepare duration, in that case the min & max longitudinal acceleration values computed previously can be invalid for prepare duration lower than max prepare duration, and can result in failure to generate LC path.

Therefore, it is more logical to compute min & max longitudinal accelerations and sample it for each prepare duration separately.

Changes

  • Move longitudinal acceleration sampling code to calculation.cpp
  • Refactor calc_prepare_phase_metrics to sample lon acceleration for each prepare duration separately
  • Remove unused functions

Related links

None.

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 Oct 16, 2024
Copy link

github-actions bot commented Oct 16, 2024

Thank you for contributing to the Autoware project!

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

Please ensure:

@mkquda mkquda marked this pull request as ready for review October 17, 2024 01:06
@mkquda mkquda added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Oct 17, 2024
Copy link

codecov bot commented Oct 17, 2024

Codecov Report

Attention: Patch coverage is 69.13580% with 25 lines in your changes missing coverage. Please review.

Project coverage is 27.85%. Comparing base (06adbc4) to head (14da1cd).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
..._path_lane_change_module/src/utils/calculation.cpp 68.57% 14 Missing and 8 partials ⚠️
...are_behavior_path_lane_change_module/src/scene.cpp 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9091      +/-   ##
==========================================
- Coverage   28.26%   27.85%   -0.41%     
==========================================
  Files        1306     1303       -3     
  Lines      101091    95780    -5311     
  Branches    39243    39015     -228     
==========================================
- Hits        28573    26683    -1890     
+ Misses      69761    66340    -3421     
  Partials     2757     2757              
Flag Coverage Δ *Carryforward flag
differential 19.97% <69.13%> (?)
total 27.19% <ø> (-1.07%) ⬇️ Carriedforward from a282428

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

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.

3 participants