autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
1.01k stars 650 forks source link

refactor(lane_change): refactor getLaneChangePaths function #8909

Closed mkquda closed 1 month ago

mkquda commented 2 months ago

Description

The function getLaneChangePaths in LC module is the main part of LC code and is responsible for sampling different candidate paths and verifying the validity and safety of the candidate path. However the function is very big and complex, which makes it difficult to understand and modify.

This PR aims to refactor the getLaneChangePaths function to improve code readability and granularity and reduce its complexity.

Changes

Flowchart of getLaneChangePaths function after refactoring Untitled Diagram

Related links

None.

How was this PR tested?

  1. Build complete
  2. PSIM
  3. Internal TIER IV evaluator

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

github-actions[bot] commented 2 months ago

Thank you for contributing to the Autoware project!

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

Please ensure:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0.48309% with 206 lines in your changes missing coverage. Please review.

Project coverage is 28.45%. Comparing base (d25e9a1) to head (e89ef23). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...are_behavior_path_lane_change_module/src/scene.cpp 0.00% 116 Missing :warning:
..._path_lane_change_module/src/utils/calculation.cpp 0.00% 55 Missing :warning:
...ior_path_lane_change_module/utils/data_structs.hpp 5.55% 17 Missing :warning:
...nning/autoware_route_handler/src/route_handler.cpp 0.00% 11 Missing :warning:
...havior_path_lane_change_module/src/utils/utils.cpp 0.00% 7 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8909 +/- ## ========================================== - Coverage 28.47% 28.45% -0.02% ========================================== Files 1314 1318 +4 Lines 98279 98318 +39 Branches 39961 39969 +8 ========================================== - Hits 27985 27980 -5 - Misses 70166 70209 +43 - Partials 128 129 +1 ``` | [Flag](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8909/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [differential](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8909/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `28.04% <0.48%> (?)` | | | | [total](https://app.codecov.io/gh/autowarefoundation/autoware.universe/pull/8909/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | `28.52% <ø> (+0.05%)` | :arrow_up: | Carriedforward from [fa5a5fe](https://app.codecov.io/gh/autowarefoundation/autoware.universe/commit/fa5a5fef90a399fdfc648c074b463d67941cd655?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=autowarefoundation) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 1 month ago

Documentation URL: https://autowarefoundation.github.io/autoware.universe/pr-8909/ Modified URLs: