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

feat(lane_change): improve delay lane change logic #9480

Merged

Conversation

mkquda
Copy link
Contributor

@mkquda mkquda commented Nov 26, 2024

Description

Lane change module has a feature to allow delaying of LC when there is parked along the target lane ahead of ego, however the current implementation has some drawbacks.
In the current implementation, we only check the front most static object along the target lane and delay is applied only if:

  • The object if considered parked (stopped to the side of the lane)
  • Distance from object to terminal is sufficient to do LC

This approach limits the situations under which delay feature can be useful.

To help improve the robustness of delay feature and increase its usefulness, the following method is proposed.
For all static objects ahead of ego along the target lane, we check each object from closest to furthest, if any object passes the following checks, LC will be delay:

  • Distance from object to next static object is sufficient to do LC
  • Distance from object to terminal is sufficient to do LC
  • Object is parked (if parameter to only consider parked objects is enabled).

Changes

  • Implement new function is_delay_lane_change
  • Add new struct DelayParameters
  • Refactor LC parameters related to delay feature
  • Refactor function isParkedObject
  • Remove unused functions passed_parked_objects & getLeadingStaticObjectIdx

Related links

How was this PR tested?

Notes for reviewers

None.

Interface changes

ROS Parameter Changes

Additions and removals

Change type Parameter Name Type Default Value Description
Added delay_lane_change.enabled bool true Enable lane change delay feature
Added delay_lane_change.check_only_parked_vehicle bool false Only consider parked vehicles for delay lane change feature

Modifications

Version Parameter Name Type Default Value Description
Old object_check_min_road_shoulder_width double 0.5 Width considered as a road shoulder if the lane does not have a road shoulder
New delay_lane_change.min_road_shoulder_width double 0.5 Width considered as a road shoulder if the lane does not have a road shoulder
Old object_shiftable_ratio_threshold double 0.6 Vehicles around the center line within this distance ratio will be excluded from parking objects
New delay_lane_change.th_parked_vehicle_shift_ratio double 0.6 Vehicles around the center line within this distance ratio will be excluded from parking objects

Effects on system behavior

Delay lane change feature is more robust, and can be configured to apply for all static objects or only or parked objects.
Less chance of Ego doing lane change before stopped vehicle and getting stuck.

mkquda and others added 21 commits November 19, 2024 13:15
Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
…common/include/autoware/behavior_path_planner_common/utils/path_safety_checker/objects_filtering.hpp

Co-authored-by: mkquda <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
…common/include/autoware/behavior_path_planner_common/utils/path_safety_checker/objects_filtering.hpp

Co-authored-by: mkquda <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
…vior' into RT1-8508-improve-delay-lane-change-logic
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 Nov 26, 2024
Copy link

github-actions bot commented Nov 26, 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 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 26, 2024
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 24.32432% with 28 lines in your changes missing coverage. Please review.

Project coverage is 29.25%. Comparing base (5372403) to head (1f7f615).
Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
...havior_path_lane_change_module/src/utils/utils.cpp 3.70% 25 Missing and 1 partial ⚠️
...are_behavior_path_lane_change_module/src/scene.cpp 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9480   +/-   ##
=======================================
  Coverage   29.24%   29.25%           
=======================================
  Files        1442     1444    +2     
  Lines      108555   108540   -15     
  Branches    41528    41502   -26     
=======================================
+ Hits        31750    31752    +2     
+ Misses      73720    73703   -17     
  Partials     3085     3085           
Flag Coverage Δ *Carryforward flag
differential 19.93% <24.32%> (?)
total 29.26% <ø> (+0.01%) ⬆️ Carriedforward from 2e25b2c

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

Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: mohammad alqudah <[email protected]>
@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label Nov 27, 2024
@mkquda mkquda added the run:deploy-docs Mark for deploy-docs action generation. (used-by-ci) label Nov 27, 2024
mkquda and others added 2 commits November 27, 2024 15:06
…nge_module/src/utils/utils.cpp

Co-authored-by: Zulfaqar Azmi <[email protected]>
…nge_module/src/utils/utils.cpp

Co-authored-by: Zulfaqar Azmi <[email protected]>
Copy link
Contributor

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 left a comment

Choose a reason for hiding this comment

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

LGTM!

mkquda and others added 3 commits November 27, 2024 16:49
…nge_module/src/utils/utils.cpp

Co-authored-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: mohammad alqudah <[email protected]>
@mkquda mkquda merged commit c4608ad into autowarefoundation:main Nov 28, 2024
32 of 34 checks passed
@mkquda mkquda deleted the RT1-8508-improve-delay-lane-change-logic branch November 28, 2024 02:30
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:deploy-docs Mark for deploy-docs action generation. (used-by-ci) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants