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

fix(avoidance): output invalid avoidance path with unsafe state #5689

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Nov 27, 2023

Description

🤖[deprecated] Generated by Copilot at 92ce4cb

Improved the avoidance module in behavior_path_planner to handle invalid avoid data and simplify the code. Refactored the isExecutionReady, fillShiftLine, and fillEgoStatus functions in avoidance_module.cpp.


Previously, it couldn't approve the avoidance shift path correctly if return shift line was invaild. (invalid means out of lane.) This causes following wierd behavior.

simplescreenrecorder-2023-11-29_10.03.40.mp4

In above situation, the vehicle is probably stuck in front of the obstacle. But I think it is better to create avoidance path even if it can't find valid return path in avoidance module because there is a possibility that other modules (e.g. obstacle avoidance planner in motion layer) can generate feasible path which is in drivable area.

Tests performed

Invalid path (path points are closer to drivable bound than threshold) is outputted as unsafe state.

simplescreenrecorder-2023-11-29_09.59.07.mp4

Effects on system behavior

Nothing.

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.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Nov 27, 2023
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 27, 2023
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Attention: 1639 lines in your changes are missing coverage. Please review.

Comparison is base (765a596) 15.32% compared to head (c19b3dc) 12.75%.
Report is 181 commits behind head on main.

Files Patch % Lines
...nning/behavior_path_avoidance_module/src/scene.cpp 13.11% 559 Missing and 90 partials ⚠️
...path_avoidance_module/src/shift_line_generator.cpp 12.99% 443 Missing and 66 partials ⚠️
...nning/behavior_path_avoidance_module/src/utils.cpp 3.75% 195 Missing and 10 partials ⚠️
...th_avoidance_by_lane_change_module/src/manager.cpp 17.70% 0 Missing and 79 partials ⚠️
...nning/behavior_path_avoidance_module/src/debug.cpp 0.00% 61 Missing ⚠️
...ing/behavior_path_avoidance_module/src/manager.cpp 18.86% 0 Missing and 43 partials ⚠️
...test/test_behavior_path_planner_node_interface.cpp 25.53% 0 Missing and 35 partials ⚠️
...test/test_behavior_path_planner_node_interface.cpp 26.66% 0 Missing and 33 partials ⚠️
..._avoidance_by_lane_change_module/src/interface.cpp 28.57% 8 Missing and 2 partials ⚠️
.../include/behavior_path_avoidance_module/helper.hpp 22.22% 5 Missing and 2 partials ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5689       +/-   ##
===========================================
- Coverage   15.32%   12.75%    -2.57%     
===========================================
  Files        1721       18     -1703     
  Lines      118559     3332   -115227     
  Branches    37995     1881    -36114     
===========================================
- Hits        18169      425    -17744     
+ Misses      79657     2161    -77496     
+ Partials    20733      746    -19987     
Flag Coverage Δ
differential 12.75% <13.28%> (?)
total ?

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@satoshi-ota satoshi-ota force-pushed the fix/output-invalid-avoidance-path branch from 7e4a740 to c19b3dc Compare December 8, 2023 08:48
Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara left a comment

Choose a reason for hiding this comment

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

LGTM

@satoshi-ota satoshi-ota merged commit 851de09 into autowarefoundation:main Dec 10, 2023
20 of 23 checks passed
@satoshi-ota satoshi-ota deleted the fix/output-invalid-avoidance-path branch December 10, 2023 08:02
danielsanchezaran pushed a commit to tier4/autoware.universe that referenced this pull request Dec 15, 2023
…warefoundation#5689)

fix(avoidance): output invalid avoidance path

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Dec 19, 2023
…warefoundation#5689)

fix(avoidance): output invalid avoidance path

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: karishma <karishma@interpl.ai>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Dec 19, 2023
…warefoundation#5689)

fix(avoidance): output invalid avoidance path

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: karishma <karishma@interpl.ai>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 26, 2024
…warefoundation#5689)

fix(avoidance): output invalid avoidance path

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
…warefoundation#5689)

fix(avoidance): output invalid avoidance path

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
…warefoundation#5689)

fix(avoidance): output invalid avoidance path

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
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