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): cherry-pick lane change commits to beta/v0.29.0 #1441

Merged
merged 22 commits into from
Aug 16, 2024

Conversation

zulfaqar-azmi-t4
Copy link

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 commented Aug 1, 2024

Description

Cherry-pick lane change module.

Several part of lane change module needs to be refactored to improve the processing time.

processing time improvement

refactor(lane_change): update lanes and its polygons only when it's updated
refactor(lane_change): check start point directly after getting start point #8357
fix(lane_change): skip path computation if len exceed dist to terminal start #8359
fix(lane_change): skip generating path if lane changing path is too long #8362
fix(lane_change): skip generating path if longitudinal distance difference is less than threshold #8363
refactor(lane_change): separate leading and trailing objects #8214

improving lane change behavior

fix(lane_change): delay lane change cancel #8048
fix(lane_change): filtering object ahead of terminal #8093
fix(lane_change): relax finish judge #8133
feat(lane_change): use different rss param to deal with parked vehicle #8316
fix(lane_change): do not cancel when approaching terminal start #8381
fix(lane_change): moving object is filtered in the extended target lanes #8218

Bug fix

fix(lane_change): fix invalid doesn't have stop point #8470

Related links

tier4/autoware_launch#537
Parent Issue:

  • Link

How was this PR tested?

Notes for reviewers

None.

Interface changes

None.

ROS Parameter Changes

Additions and removals

Change type Parameter Name Type Default Value Description
Added finish_judge_lateral_angle_deviation double 1.0 lateral angle threshold to determine lane change completion
Added parked.expected_front_deceleration double -1.0 The front object's maximum deceleration when the front vehicle perform sudden braking
Added parked.expected_rear_deceleration double -2.0 The rear object's maximum deceleration when the rear vehicle perform sudden braking.
Added parked.rear_vehicle_reaction_time double 1.0 The reaction time of the rear vehicle driver which starts from the driver noticing the sudden braking of the front vehicle until the driver step on the brake.
Added parked.rear_vehicle_safety_time_margin double 0.8 The time buffer for the rear vehicle to come into complete stop when its driver perform sudden braking.
Added parked.lateral_distance_max_threshold double 1.0 The lateral distance threshold that is used to determine whether lateral distance between two object is enough and whether lane change is safe.
Added parked.longitudinal_distance_min_threshold double 3.0 The longitudinal distance threshold that is used to determine whether longitudinal distance between two object is enough and whether lane change is safe.
Added parked.longitudinal_velocity_delta_time double 0.0 The time multiplier that is used to compute the actual gap between vehicle at each predicted points (not RSS distance)
Added skip_process.longitudinal_distance_diff_threshold.prepare double 1.0 prepare longitudinal distance threshold to skip path planning
Added skip_process.longitudinal_distance_diff_threshold.lane_changing double 1.0 lane changing longitudinal distance threshold to skip path planning

Modifications

Version Parameter Name Type Default Value Description
Old finish_judge_lateral_threshold double 0.2 lateral threshold to determine lane change completion
New finish_judge_lateral_threshold double 0.1 lateral threshold to determine lane change completion

Effects on system behavior

None.

zulfaqar-azmi-t4 and others added 7 commits August 13, 2024 10:30
…efoundation#7508)

* refactor(lane_change): use lane change namespace for structs

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Move lane change namespace to bottom level

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
…utowarefoundation#7504)

* RT1-6230 feat(route_handler): add unit test for lane change related functions

Signed-off-by: Zulfaqar Azmi <[email protected]>

* fix spell check

Signed-off-by: Zulfaqar Azmi <[email protected]>

* fix spellcheck

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
…foundation#7841)

* move struct to lane change namespace

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Revert "move struct to lane change namespace"

This reverts commit 306984a.

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
…utowarefoundation#7964)

fix:shadowVariable

Signed-off-by: kobayu858 <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
…pdated (autowarefoundation#7989)

* refactor(lane_change): compute lanes and polygon only when updated

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Revert accidental changesd

This reverts commit cbfd9ae.

Signed-off-by: Zulfaqar Azmi <[email protected]>

* fix spell check

Signed-off-by: Zulfaqar Azmi <[email protected]>

* Make a common getter for current lanes

Signed-off-by: Zulfaqar Azmi <[email protected]>

* add target lanes getter

Signed-off-by: Zulfaqar Azmi <[email protected]>

* some minor function refactoring

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
RT1-6955: delay lane change cancel

Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
…ion#8093)

* employ lanelet based filtering before distance based filtering

Signed-off-by: Zulfaqar Azmi <[email protected]>

* use distance based to terminal check instead

Signed-off-by: Zulfaqar Azmi <[email protected]>

* remove RCLCPP INFO

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* update flow chart

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
kobayu858 and others added 7 commits August 13, 2024 10:47
* fix(lane_change): relax finish judge

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* documentation update

Signed-off-by: Zulfaqar Azmi <[email protected]>

* update readme explanations

Signed-off-by: Zulfaqar Azmi <[email protected]>

* update config

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
autowarefoundation#8316)

* different rss value for parked vehicle

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Documentation and config file update

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
… point (autowarefoundation#8357)

* check start point directly after getting start point

Signed-off-by: Zulfaqar Azmi <[email protected]>

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

Co-authored-by: Maxime CLEMENT <[email protected]>

---------

Signed-off-by: Zulfaqar Azmi <[email protected]>
Co-authored-by: Maxime CLEMENT <[email protected]>
…l start (autowarefoundation#8359)

Skip computation if prepare length exceed distance to terminal start

Signed-off-by: Zulfaqar Azmi <[email protected]>
…ong (autowarefoundation#8362)

rework. skip lane changing for insufficeient distance in target lane

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
…rence is less than threshold (autowarefoundation#8363)

* fix when prepare length is insufficient

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* add reason for comparing prev_prep_diff with eps for lc_length_diff

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
@zulfaqar-azmi-t4 zulfaqar-azmi-t4 changed the title feat(lane_change): cherry-pick lane change commits for beta/v0.46.0 feat(lane_change): cherry-pick lane change commits to beta/v0.29.0 Aug 13, 2024
…efoundation#8214)

* refactor(lane_change): separate leading and trailing objects

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Refactor to use common function

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
@Naophis
Copy link

Naophis commented Aug 13, 2024

@zulfaqar-azmi-t4
Could you please explain the purpose of this PR?
I've looked through the commit list, and it seems to be mainly refactoring for lane change function. Is that correct?

Copy link
Collaborator

@shmpwk shmpwk left a comment

Choose a reason for hiding this comment

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

@zulfaqar-azmi-t4 cc. @Naophis
Thank you so much! I'd like to merge this after v0.46.0 release this week. Until that let me change this PR to draft 🙏

@shmpwk shmpwk marked this pull request as draft August 13, 2024 03:24
@zulfaqar-azmi-t4
Copy link
Author

zulfaqar-azmi-t4 commented Aug 13, 2024

@Naophis

Could you please explain the purpose of this PR?
I've looked through the commit list, and it seems to be mainly refactoring for lane change function. Is that correct?

I have updated the explanation in the PR description. To summarize, the most biggest and important change is the processing time improvement when generating lane change path. The change is made possible by the refactoring of lane change task.

@saka1-s
Copy link

saka1-s commented Aug 15, 2024

@shmpwk @Naophis
A bug(slack) has been found in the LC module.
Azu-san has prepared the fix PR, and this PR is assumed to be merged before. 
If there doesn't seem to be any issues with this PR, would it be possible to include it in v0.29.0?

@saka1-s
Copy link

saka1-s commented Aug 15, 2024

I will check evaluator result.

@shmpwk shmpwk requested a review from shtokuda August 15, 2024 01:45
…tion#8470)

fix invalid doesn't have stop point

Signed-off-by: Zulfaqar Azmi <[email protected]>
@zulfaqar-azmi-t4
Copy link
Author

zulfaqar-azmi-t4 commented Aug 15, 2024

@shmpwk @Naophis
I have two additional PR that will be helpful which I already tested in an experiment a week ago.

Since it is already reviewed and approved, i think i need to ask both of your agreement before I add another commit.
So, it is okay for me to add them in this cherry-pick?
autowarefoundation#8381
autowarefoundation#8218

@shmpwk
Copy link
Collaborator

shmpwk commented Aug 15, 2024

@zulfaqar-azmi-t4 @Naophis @saka1-s

xx1 v0.46.0(universe v0.29.1) has been released today.

So we xx1 is ready to merge this great cherry pick.
Also, the following PRs look nice for me and I eager to cherry pick them.
autowarefoundation#8381
autowarefoundation#8218

…warefoundation#8381)

* do not cancel if ego vehicle approaching terminal start

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* Insert stop point if object is coming from rear

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* minor edit to fix conflict

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

* rename function

Signed-off-by: Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
Signed-off-by: Zulfaqar Azmi <[email protected]>
…nes (autowarefoundation#8218)

* object 3rd

Signed-off-by: Zulfaqar Azmi <[email protected]>

* named param

Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>

---------

Signed-off-by: Zulfaqar Azmi <[email protected]>
Signed-off-by: Muhammad Zulfaqar Azmi <[email protected]>
@zulfaqar-azmi-t4
Copy link
Author

zulfaqar-azmi-t4 commented Aug 15, 2024

@shmpwk
That is great! Thank you so much. I have cherry-picked them.

@Naophis
Copy link

Naophis commented Aug 15, 2024

@zulfaqar-azmi-t4 cc: @saka1-s
thanks for informed me.
I wanna use cherry pick them in X2 v3.1.0 , and please change Draft to PR.

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 marked this pull request as ready for review August 15, 2024 14:38
@Naophis Naophis enabled auto-merge August 16, 2024 01:34
@Naophis Naophis merged commit 87cdb1e into beta/v0.29.0 Aug 16, 2024
20 of 21 checks passed
@Naophis Naophis deleted the cp-lane-change branch August 16, 2024 01:35
Copy link

sonarcloud bot commented Aug 16, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants