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): implement terminal lane change feature #9592

Conversation

mkquda
Copy link
Contributor

@mkquda mkquda commented Dec 9, 2024

Description

Currently when LC module fails to find a safe lane change path, ego will continue up to the end of current lanes (terminal point) and stop in the middle of the lane. And lane change cannot be performed except by manual override.

To increase the rate of successful LC maneuvers, even in difficult situations, and reduce the need of manual override, it is better to always have a fallback terminal lane change path connecting the end of current lanes to target lanes, in case no valid & safe candidate path is found, the fallback terminal path can be force approved to complete the LC maneuver.

Changes

  • Implement function compute_terminal_lane_change_path
  • Terminal lane change path is computed only once, and is updated and reused.
  • At every cycle, if no valid candidate path is found, terminal path will pushed to candidate path list
  • Refactored functions insert_stop_point_on_current_lanes & calc_dist_to_last_fit_width
  • When status is "waiting for approval" and terminal lane change path is available, stop point will be inserted along the path at the point where is path footprint exits current lane.
  • Added parameter enable_terminal_path to enable/disable the feature

The videos below demonstrate the difference in the behavior:

no_terminal_lc_path.mp4
terminal_lc_path.mp4

Related links

  • None.

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 terminal_path.enable bool true flag to enable/disable terminal lane change path feature
Added terminal_path.disable_near_terminal bool true flag to disable terminal lane change path feature near goal
Added terminal_path.stop_at_boundary bool true flag to configure stop point placement, if true ego will stop at current lane boundary

Effects on system behavior

In case of failure to find a valid candidate path until terminal point, if terminal path is computed, it can be force approved to complete LC maneuver successfully.

If using terminal path feature and terminal path is computed, instead of placing stop point in the middle of current lane, stop point will be inserted at the last point along the path where Ego foot print is within current lane boundary. This would result in Ego stopping to the side of the lane, which can help incite other vehicles to give way for Ego.

mkquda and others added 19 commits November 12, 2024 08:04
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 Dec 9, 2024
Copy link

github-actions bot commented Dec 9, 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 December 9, 2024 01:36
@mkquda mkquda added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 9, 2024
Signed-off-by: mohammad alqudah <[email protected]>
@github-actions github-actions bot added the type:documentation Creating or refining documentation. (auto-assigned) label Dec 9, 2024
@mkquda mkquda added the run:deploy-docs Mark for deploy-docs action generation. (used-by-ci) label Dec 22, 2024
Signed-off-by: mohammad alqudah <[email protected]>
mkquda and others added 2 commits December 25, 2024 14:29
…nge_module/src/scene.cpp

Co-authored-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: mohammad alqudah <[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

Signed-off-by: mohammad alqudah <[email protected]>
@mkquda mkquda merged commit 75fde99 into autowarefoundation:main Dec 27, 2024
34 of 36 checks passed
@mkquda mkquda deleted the RT1-8205-implement-terminal-lane-change-feature branch December 27, 2024 08:27
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Jan 6, 2025
…undation#9592)

* implement function to compute terminal lane change path

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

* push terminal path to candidate paths if no other valid candidate path is found

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

* use terminal path in LC interface planWaitingApproval function

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

* set lane changing longitudinal accel to zero for terminal lc path

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

* rename function

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

* chore: rename codeowners file

Signed-off-by: tomoya.kimura <[email protected]>

* remove unused member variable prev_approved_path_

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

* refactor stop point insertion for terminal lc path

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

* add flag to enable/disable terminal path feature

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

* update README

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

* add parameter to configure stop point placement

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

* compute terminal path only when near terminal start

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

* add option to disable feature near goal

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

* set default flag value to false

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

* add documentation for terminal lane change path

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

* ensure actual prepare duration is always above minimum prepare duration threshold

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

* explicitly return std::nullopt

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

* Update planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

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

* fix assignment

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

* fix spelling

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

* fix merge errors

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

---------

Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: tomoya.kimura <[email protected]>
Co-authored-by: tomoya.kimura <[email protected]>
Co-authored-by: Zulfaqar Azmi <[email protected]>
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Jan 6, 2025
…undation#9592)

* implement function to compute terminal lane change path

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

* push terminal path to candidate paths if no other valid candidate path is found

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

* use terminal path in LC interface planWaitingApproval function

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

* set lane changing longitudinal accel to zero for terminal lc path

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

* rename function

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

* chore: rename codeowners file

Signed-off-by: tomoya.kimura <[email protected]>

* remove unused member variable prev_approved_path_

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

* refactor stop point insertion for terminal lc path

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

* add flag to enable/disable terminal path feature

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

* update README

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

* add parameter to configure stop point placement

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

* compute terminal path only when near terminal start

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

* add option to disable feature near goal

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

* set default flag value to false

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

* add documentation for terminal lane change path

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

* ensure actual prepare duration is always above minimum prepare duration threshold

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

* explicitly return std::nullopt

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

* Update planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/scene.cpp

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

* fix assignment

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

* fix spelling

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

* fix merge errors

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

---------

Signed-off-by: mohammad alqudah <[email protected]>
Signed-off-by: tomoya.kimura <[email protected]>
Co-authored-by: tomoya.kimura <[email protected]>
Co-authored-by: Zulfaqar Azmi <[email protected]>
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) run:deploy-docs Mark for deploy-docs action generation. (used-by-ci) type:documentation Creating or refining documentation. (auto-assigned)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants