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(goal_planner): check opposite lane for lane departure_check #9460

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

kosuke55
Copy link
Contributor

@kosuke55 kosuke55 commented Nov 25, 2024

Description

#9423 does not check the opposing lane. The avoidance module may cause the ego to enter the opposing lane, but at this time, the current lane departure check logic of goal planner judges candidate paths invalid.
In this PR, it checks the opposing lane too

before

image

after

image

UC-bag-F-03-00006-00001-2024-11-25_19.59.50.mp4

Related links

Parent Issue:

  • Link

How was this PR tested?

psim

2024/11/28 https://evaluation.tier4.jp/evaluation/reports/317acd96-acdc-5002-97d1-d1c5fa3067d8/?project_id=prd_jt

https://evaluation.tier4.jp/evaluation/reports/ee27e182-2a8b-5ae5-8159-854a2bad205a?project_id=prd_jt&state=failed

Notes for reviewers

None.

Interface changes

None.

Effects on system behavior

None.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Nov 25, 2024
Copy link

github-actions bot commented Nov 25, 2024

Thank you for contributing to the Autoware project!

🚧 If your pull request is in progress, switch it to draft mode.

Please ensure:

@kosuke55 kosuke55 marked this pull request as ready for review November 25, 2024 11:15
@kosuke55 kosuke55 added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 25, 2024
@kosuke55 kosuke55 force-pushed the feat/check_opposite branch from 4841b09 to 2cf90c0 Compare November 27, 2024 10:27
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 29.51%. Comparing base (cf0266e) to head (5748626).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...are_behavior_path_goal_planner_module/src/util.cpp 0.00% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9460   +/-   ##
=======================================
  Coverage   29.50%   29.51%           
=======================================
  Files        1445     1450    +5     
  Lines      108571   108621   +50     
  Branches    41425    41424    -1     
=======================================
+ Hits        32037    32057   +20     
- Misses      73412    73443   +31     
+ Partials     3122     3121    -1     
Flag Coverage Δ *Carryforward flag
differential 0.52% <0.00%> (?)
total 29.53% <ø> (+0.02%) ⬆️ Carriedforward from e75bbbc

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

@kosuke55 kosuke55 force-pushed the feat/check_opposite branch from 2cf90c0 to ce1420f Compare November 28, 2024 05:53
@github-actions github-actions bot added the type:ci Continuous Integration (CI) processes and testing. (auto-assigned) label Nov 28, 2024
@kosuke55 kosuke55 force-pushed the feat/check_opposite branch from ce1420f to b694ae7 Compare November 28, 2024 13:17
Comment on lines 722 to 732
if (left_side_parking) {
const auto most_right_lane = route_handler.getMostRightLanelet(lane, true, true);
const auto most_right_opposite_lanes =
route_handler.getRightOppositeLanelets(most_right_lane);
return most_right_opposite_lanes.empty() ? most_right_lane
: most_right_opposite_lanes.front();
} else {
const auto most_left_lane = route_handler.getMostLeftLanelet(lane, true, true);
const auto most_left_opposite_lanes = route_handler.getLeftOppositeLanelets(most_left_lane);
return most_left_opposite_lanes.empty() ? most_left_lane : most_left_opposite_lanes.front();
}
Copy link
Contributor

@danielsanchezaran danielsanchezaran Nov 29, 2024

Choose a reason for hiding this comment

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

Suggested change
if (left_side_parking) {
const auto most_right_lane = route_handler.getMostRightLanelet(lane, true, true);
const auto most_right_opposite_lanes =
route_handler.getRightOppositeLanelets(most_right_lane);
return most_right_opposite_lanes.empty() ? most_right_lane
: most_right_opposite_lanes.front();
} else {
const auto most_left_lane = route_handler.getMostLeftLanelet(lane, true, true);
const auto most_left_opposite_lanes = route_handler.getLeftOppositeLanelets(most_left_lane);
return most_left_opposite_lanes.empty() ? most_left_lane : most_left_opposite_lanes.front();
}
const auto outermost_lane = (left_side_parking) ? route_handler.getMostRightLanelet(lane, true, true) : route_handler.getMostLeftLanelet(lane, true, true);
const auto extended_outermost_lanes = (left_side_parking) ? route_handler.getRightOppositeLanelets(most_right_lane) : route_handler.getLeftOppositeLanelets(most_left_lane);
return (extended_outermost_lanes.empty()) ? outermost_lane : extended_outermost_lane.front();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that is better, thanks

made similar changes with a few modifications
5935139

return most_right_opposite_lanes.empty() ? most_right_lane
: most_right_opposite_lanes.front();
} else {
const auto most_left_lane = route_handler.getMostLeftLanelet(lane, true, true);
Copy link
Contributor

Choose a reason for hiding this comment

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

It used to be route_handler.getMostLeftLanelet(lane, false, true);, but now the booleans are true,true. Is there a reason?

Copy link
Contributor Author

@kosuke55 kosuke55 Dec 3, 2024

Choose a reason for hiding this comment

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

yes!
Since the avoidance module uses that lane, the goal planner must also check the same lane.

Copy link
Contributor

@danielsanchezaran danielsanchezaran left a comment

Choose a reason for hiding this comment

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

I think you need to remove the change to CODEOWNERS?

@kosuke55 kosuke55 force-pushed the feat/check_opposite branch from 956b7ec to 30ba1bd Compare December 3, 2024 11:55
@github-actions github-actions bot removed the type:ci Continuous Integration (CI) processes and testing. (auto-assigned) label Dec 3, 2024
@kosuke55 kosuke55 force-pushed the feat/check_opposite branch from 30ba1bd to 5935139 Compare December 3, 2024 11:56
@kosuke55
Copy link
Contributor Author

kosuke55 commented Dec 3, 2024

@danielsanchezaran

I think you need to remove the change to CODEOWNERS?

thanks! removed the commit

@kosuke55
Copy link
Contributor Author

kosuke55 commented Dec 4, 2024

@danielsanchezaran
please remove requested changes if there is no problem

Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
Signed-off-by: kosuke55 <kosuke.tnp@gmail.com>
@kosuke55 kosuke55 force-pushed the feat/check_opposite branch from 5935139 to 5748626 Compare December 5, 2024 07:10
@kosuke55 kosuke55 merged commit ede3f23 into autowarefoundation:main Dec 6, 2024
34 of 35 checks passed
@kosuke55 kosuke55 deleted the feat/check_opposite branch December 6, 2024 07:14
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.

3 participants