-
Notifications
You must be signed in to change notification settings - Fork 673
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(start_planner): prevent hindering rear vehicles #6545
feat(start_planner): prevent hindering rear vehicles #6545
Conversation
c91137f
to
ff6f063
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
return -calc_right_lateral_offset(boundary_line, search_pose); | ||
}; | ||
|
||
// Get the ego's overhang point closest to the centerline path and the gap between said point an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Get the ego's overhang point closest to the centerline path and the gap between said point an | |
// Get the ego's overhang point closest to the centerline path and the gap between said point and |
...ath_start_planner_module/include/behavior_path_start_planner_module/start_planner_module.hpp
Outdated
Show resolved
Hide resolved
@danielsanchezaran |
@danielsanchezaran |
Can not request a change...
to
|
The current calculates both distances to the left AND right edges of the road and uses the largest one, so, in the case you describe, the gap would be the distance between the left bound of the lane and the ego's overhang point. So it does not matter from which side the merging is happening. |
planning/behavior_path_start_planner_module/src/start_planner_module.cpp
Outdated
Show resolved
Hide resolved
78f329c
to
ea4915f
Compare
The code has been updated so the closest ego overhang point to the lane border is used to calculate the gap. The border to calculate the distance is chosen depending on which side the ego is merging the lane from. @kyoichi-sugahara |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much for your quick response!
LGTM!
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
Signed-off-by: Daniel Sanchez <[email protected]>
1e01b65
to
ec5179b
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6545 +/- ##
==========================================
- Coverage 14.80% 14.79% -0.01%
==========================================
Files 1917 1917
Lines 132086 132146 +60
Branches 39262 39262
==========================================
Hits 19553 19553
- Misses 90715 90775 +60
Partials 21818 21818
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
07a84d4
into
autowarefoundation:main
* wip add function to check if other vehicles can pass Signed-off-by: Daniel Sanchez <[email protected]> * further refactoring Signed-off-by: Daniel Sanchez <[email protected]> * change breaks for return Signed-off-by: Daniel Sanchez <[email protected]> * added way to check closest overhang point to target centerline Signed-off-by: Daniel Sanchez <[email protected]> * wip get distance to left and right bounds Signed-off-by: Daniel Sanchez <[email protected]> * add check for param dereferencing Signed-off-by: Daniel Sanchez <[email protected]> * check gap and rear vehicle width Signed-off-by: Daniel Sanchez <[email protected]> * bugfix boolean condition was inverted Signed-off-by: Daniel Sanchez <[email protected]> * refactor Signed-off-by: Daniel Sanchez <[email protected]> * rename param Signed-off-by: Daniel Sanchez <[email protected]> * remove prints Signed-off-by: Daniel Sanchez <[email protected]> * use a better function to get the previous lanelets Signed-off-by: Daniel Sanchez <[email protected]> * update docs Signed-off-by: Daniel Sanchez <[email protected]> * update description Signed-off-by: Daniel Sanchez <[email protected]> * typo Signed-off-by: Daniel Sanchez <[email protected]> * update readme Signed-off-by: Daniel Sanchez <[email protected]> * Use the merging side to choose what lane bound to use Signed-off-by: Daniel Sanchez <[email protected]> * delete unused function Signed-off-by: Daniel Sanchez <[email protected]> * add debug message Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]> Signed-off-by: Kotaro Yoshimoto <[email protected]>
…ion#6545) * wip add function to check if other vehicles can pass Signed-off-by: Daniel Sanchez <[email protected]> * further refactoring Signed-off-by: Daniel Sanchez <[email protected]> * change breaks for return Signed-off-by: Daniel Sanchez <[email protected]> * added way to check closest overhang point to target centerline Signed-off-by: Daniel Sanchez <[email protected]> * wip get distance to left and right bounds Signed-off-by: Daniel Sanchez <[email protected]> * add check for param dereferencing Signed-off-by: Daniel Sanchez <[email protected]> * check gap and rear vehicle width Signed-off-by: Daniel Sanchez <[email protected]> * bugfix boolean condition was inverted Signed-off-by: Daniel Sanchez <[email protected]> * refactor Signed-off-by: Daniel Sanchez <[email protected]> * rename param Signed-off-by: Daniel Sanchez <[email protected]> * remove prints Signed-off-by: Daniel Sanchez <[email protected]> * use a better function to get the previous lanelets Signed-off-by: Daniel Sanchez <[email protected]> * update docs Signed-off-by: Daniel Sanchez <[email protected]> * update description Signed-off-by: Daniel Sanchez <[email protected]> * typo Signed-off-by: Daniel Sanchez <[email protected]> * update readme Signed-off-by: Daniel Sanchez <[email protected]> * Use the merging side to choose what lane bound to use Signed-off-by: Daniel Sanchez <[email protected]> * delete unused function Signed-off-by: Daniel Sanchez <[email protected]> * add debug message Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]> Signed-off-by: kaigohirao <[email protected]>
…ion#6545) * wip add function to check if other vehicles can pass Signed-off-by: Daniel Sanchez <[email protected]> * further refactoring Signed-off-by: Daniel Sanchez <[email protected]> * change breaks for return Signed-off-by: Daniel Sanchez <[email protected]> * added way to check closest overhang point to target centerline Signed-off-by: Daniel Sanchez <[email protected]> * wip get distance to left and right bounds Signed-off-by: Daniel Sanchez <[email protected]> * add check for param dereferencing Signed-off-by: Daniel Sanchez <[email protected]> * check gap and rear vehicle width Signed-off-by: Daniel Sanchez <[email protected]> * bugfix boolean condition was inverted Signed-off-by: Daniel Sanchez <[email protected]> * refactor Signed-off-by: Daniel Sanchez <[email protected]> * rename param Signed-off-by: Daniel Sanchez <[email protected]> * remove prints Signed-off-by: Daniel Sanchez <[email protected]> * use a better function to get the previous lanelets Signed-off-by: Daniel Sanchez <[email protected]> * update docs Signed-off-by: Daniel Sanchez <[email protected]> * update description Signed-off-by: Daniel Sanchez <[email protected]> * typo Signed-off-by: Daniel Sanchez <[email protected]> * update readme Signed-off-by: Daniel Sanchez <[email protected]> * Use the merging side to choose what lane bound to use Signed-off-by: Daniel Sanchez <[email protected]> * delete unused function Signed-off-by: Daniel Sanchez <[email protected]> * add debug message Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]>
…ion#6545) * wip add function to check if other vehicles can pass Signed-off-by: Daniel Sanchez <[email protected]> * further refactoring Signed-off-by: Daniel Sanchez <[email protected]> * change breaks for return Signed-off-by: Daniel Sanchez <[email protected]> * added way to check closest overhang point to target centerline Signed-off-by: Daniel Sanchez <[email protected]> * wip get distance to left and right bounds Signed-off-by: Daniel Sanchez <[email protected]> * add check for param dereferencing Signed-off-by: Daniel Sanchez <[email protected]> * check gap and rear vehicle width Signed-off-by: Daniel Sanchez <[email protected]> * bugfix boolean condition was inverted Signed-off-by: Daniel Sanchez <[email protected]> * refactor Signed-off-by: Daniel Sanchez <[email protected]> * rename param Signed-off-by: Daniel Sanchez <[email protected]> * remove prints Signed-off-by: Daniel Sanchez <[email protected]> * use a better function to get the previous lanelets Signed-off-by: Daniel Sanchez <[email protected]> * update docs Signed-off-by: Daniel Sanchez <[email protected]> * update description Signed-off-by: Daniel Sanchez <[email protected]> * typo Signed-off-by: Daniel Sanchez <[email protected]> * update readme Signed-off-by: Daniel Sanchez <[email protected]> * Use the merging side to choose what lane bound to use Signed-off-by: Daniel Sanchez <[email protected]> * delete unused function Signed-off-by: Daniel Sanchez <[email protected]> * add debug message Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]>
Description
Current Autoware:
Currently, obstacle collision check with vehicles coming from the rear is performed when the ego vehicle is trying to merge to a lane from the shoulder lane. As follows:
The collision check is done until the ego vehicle eventually overlaps with the centerline. However, it is possible that the check is performed when the ego vehicle already impedes the pass of vehicles as shown on the next image:
In the case above, the ego vehicle has not quite overlapped the centerline yet (closest point in purple) but the gap between the ego and the lane boundary, W2, is smaller than the width W1 of the NPC vehicle (black). In this cases, with collision check active, the ego vehicle might stop moving, even though the rear vehicle cannot really pass. The final outcome is that the ego vehicle ends up impeding the previous vehicle from passing and also remains stopped.
This PR:
With this PR, the ego will not check overlaps with the center line; instead, it will check whether the remaining gap between the ego and the lane is big enough for the rear obstacle to pass. If it is big enough, the ego stops/yields to the coming vehicle, but, if it is smaller, it means the rear vehicle cannot stop and the ego should proceed. There is also an added parameter "extra_width_margin_for_rear_obstacle" which can be used to artificially enlarge or reduce the rear vehicle's perceived width.
Example:
Related links
Related ticket: TIER IV INTERNAL LINK
Tests performed
PSIM
Degradation tests -> NO degradation TIER IV INTERNAL LINK
Notes for reviewers
A function to get the backward lanes was moved from lane change module to common so it can be used by the start planner too.
Interface changes
Effects on system behavior
The ego will not impede upcoming traffic by not committing to a lane entrance it should do.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.