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 code using transient data #8997

Conversation

mkquda
Copy link
Contributor

@mkquda mkquda commented Oct 1, 2024

Description

Recently, and new data struct TransientData was added to standardize commonly used values in the lane change module.

This PR refactors lane change code using TransientData to improve code quality and readability, and reduce complexity.

Changes

  • Add new member target_lane_length to TransientData struct
  • Add new member target_lanes_ego_arc to TransientData struct
  • Add new member current_lanes_ego_arc to TransientData struct
  • Add new function get_prepare_metrics() to reduce size of get_lane_change_paths() function and improve granularity
  • Add new function get_lane_changing_metrics() to reduce size of get_lane_change_paths() function and improve granularity
  • Add new function is_valid_prepare_segment() to reduce size of get_lane_change_paths() function and improve granularity

Related links

None.

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

…nes to transient data

Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: mohammad alqudah <[email protected]>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Oct 1, 2024
Copy link

github-actions bot commented Oct 1, 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 1, 2024 23:19
@mkquda mkquda added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Oct 1, 2024
Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 1.09890% with 90 lines in your changes missing coverage. Please review.

Project coverage is 26.22%. Comparing base (5b8219e) to head (d0d5184).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
...are_behavior_path_lane_change_module/src/scene.cpp 1.26% 78 Missing ⚠️
...havior_path_lane_change_module/src/utils/utils.cpp 0.00% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8997      +/-   ##
==========================================
+ Coverage   26.18%   26.22%   +0.03%     
==========================================
  Files        1298     1296       -2     
  Lines       96982    96793     -189     
  Branches    39196    39041     -155     
==========================================
- Hits        25391    25380      -11     
+ Misses      69020    68819     -201     
- Partials     2571     2594      +23     
Flag Coverage Δ *Carryforward flag
differential 15.54% <1.09%> (?)
total 26.24% <0.00%> (+0.06%) ⬆️ Carriedforward from 7fea665

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

mkquda added 3 commits October 3, 2024 10:40
Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: mohammad alqudah <[email protected]>
@mkquda mkquda merged commit 6a379e9 into autowarefoundation:main Oct 3, 2024
33 of 34 checks passed
@mkquda mkquda deleted the RT1-7999-refactor-code-using-transient-data branch October 3, 2024 23:46
prakash-kannaiah pushed a commit to prakash-kannaiah/autoware.universe that referenced this pull request Oct 9, 2024
…undation#8997)

* add target lane length and ego arc length along current and target lanes to transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor code using transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor get_lane_change_paths function

Signed-off-by: mohammad alqudah <[email protected]>

* minor refactoring

Signed-off-by: mohammad alqudah <[email protected]>

* refactor util functions

Signed-off-by: mohammad alqudah <[email protected]>

* refactor getPrepareSegment function

Signed-off-by: mohammad alqudah <[email protected]>

---------

Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: prakash-kannaiah <[email protected]>
zulfaqar-azmi-t4 pushed a commit to tier4/autoware.universe that referenced this pull request Dec 20, 2024
…undation#8997)

* add target lane length and ego arc length along current and target lanes to transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor code using transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor get_lane_change_paths function

Signed-off-by: mohammad alqudah <[email protected]>

* minor refactoring

Signed-off-by: mohammad alqudah <[email protected]>

* refactor util functions

Signed-off-by: mohammad alqudah <[email protected]>

* refactor getPrepareSegment function

Signed-off-by: mohammad alqudah <[email protected]>

---------

Signed-off-by: mohammad alqudah <[email protected]>
kyoichi-sugahara pushed a commit to tier4/autoware.universe that referenced this pull request Dec 20, 2024
…undation#8997)

* add target lane length and ego arc length along current and target lanes to transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor code using transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor get_lane_change_paths function

Signed-off-by: mohammad alqudah <[email protected]>

* minor refactoring

Signed-off-by: mohammad alqudah <[email protected]>

* refactor util functions

Signed-off-by: mohammad alqudah <[email protected]>

* refactor getPrepareSegment function

Signed-off-by: mohammad alqudah <[email protected]>

---------

Signed-off-by: mohammad alqudah <[email protected]>
kyoichi-sugahara pushed a commit to tier4/autoware.universe that referenced this pull request Dec 21, 2024
…undation#8997)

* add target lane length and ego arc length along current and target lanes to transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor code using transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor get_lane_change_paths function

Signed-off-by: mohammad alqudah <[email protected]>

* minor refactoring

Signed-off-by: mohammad alqudah <[email protected]>

* refactor util functions

Signed-off-by: mohammad alqudah <[email protected]>

* refactor getPrepareSegment function

Signed-off-by: mohammad alqudah <[email protected]>

---------

Signed-off-by: mohammad alqudah <[email protected]>
shmpwk pushed a commit to tier4/autoware.universe that referenced this pull request Dec 25, 2024
…undation#8997)

* add target lane length and ego arc length along current and target lanes to transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor code using transient data

Signed-off-by: mohammad alqudah <[email protected]>

* refactor get_lane_change_paths function

Signed-off-by: mohammad alqudah <[email protected]>

* minor refactoring

Signed-off-by: mohammad alqudah <[email protected]>

* refactor util functions

Signed-off-by: mohammad alqudah <[email protected]>

* refactor getPrepareSegment function

Signed-off-by: mohammad alqudah <[email protected]>

---------

Signed-off-by: mohammad alqudah <[email protected]>
shmpwk added a commit to tier4/autoware.universe that referenced this pull request Dec 25, 2024
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.

None yet

3 participants