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): unintentional path cut #5887

Merged

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Dec 15, 2023

Description

🤖[deprecated] Generated by Copilot at 7df9214

Fix path shortening bug in behavior_path_avoidance_module by creating a temporary copy of the path before cutting overlapping lanes. This prevents modifying the original path from the previous module output.


Previously, avoidance module changed input path unintentionally even when the module was NOT running.

 const auto shorten_lanes =
    utils::cutOverlappedLanes(*getPreviousModuleOutput().path, data.drivable_lanes);

In this PR, I use copied variable.

  auto tmp_path = *getPreviousModuleOutput().path;
  const auto shorten_lanes = utils::cutOverlappedLanes(tmp_path, data.drivable_lanes);

Additionally, I use PathWithLaneId instead of PathWithLaneId::SharedPtr in BehaviorModuleOutput struct in order to prevent this kind of bugs.

simplescreenrecorder-2023-12-15_18.33.18.mp4

Tests performed

webauto ci scenario run --project-id prd_jt --scenario-id 380415ee-f507-4676-8a15-e1eff8f7d4c7 --scenario-version-id 1
simplescreenrecorder-2023-12-15_18.42.12.mp4

Effects on system behavior

Bug fix.

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 Dec 15, 2023
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 15, 2023
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

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

Comparison is base (2175b57) 15.29% compared to head (67dac3f) 15.29%.
Report is 1 commits behind head on main.

Files Patch % Lines
...th_goal_planner_module/src/goal_planner_module.cpp 0.00% 16 Missing ⚠️
...ule/dynamic_avoidance/dynamic_avoidance_module.cpp 6.25% 13 Missing and 2 partials ⚠️
...ing/behavior_path_lane_change_module/src/scene.cpp 0.00% 12 Missing ⚠️
...nning/behavior_path_avoidance_module/src/scene.cpp 28.57% 6 Missing and 4 partials ⚠️
...behavior_path_lane_change_module/src/interface.cpp 0.00% 7 Missing ⚠️
...ning/behavior_path_side_shift_module/src/scene.cpp 12.50% 4 Missing and 3 partials ⚠️
..._start_planner_module/src/start_planner_module.cpp 0.00% 7 Missing ⚠️
...ning/behavior_path_planner/src/planner_manager.cpp 50.00% 2 Missing and 2 partials ⚠️
...avior_path_planner_common/src/utils/path_utils.cpp 0.00% 0 Missing and 4 partials ⚠️
..._planner_module/src/default_fixed_goal_planner.cpp 0.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5887   +/-   ##
=======================================
  Coverage   15.29%   15.29%           
=======================================
  Files        1747     1747           
  Lines      120123   120133   +10     
  Branches    36574    36577    +3     
=======================================
+ Hits        18377    18380    +3     
- Misses      81129    81135    +6     
- Partials    20617    20618    +1     
Flag Coverage Δ *Carryforward flag
differential 11.71% <13.00%> (?)
total 15.30% <ø> (+<0.01%) ⬆️ Carriedforward from 2175b57

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

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@satoshi-ota satoshi-ota force-pushed the fix/unintentional-path-cut branch from d805f93 to 67dac3f Compare December 18, 2023 03:37
Copy link
Contributor

@rej55 rej55 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 37573e5 into autowarefoundation:main Dec 18, 2023
27 of 29 checks passed
@satoshi-ota satoshi-ota deleted the fix/unintentional-path-cut branch December 18, 2023 05:57
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Dec 19, 2023
* fix(avoidance): unintentional path cut

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_common): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_side_shift): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_avoidance): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_lane_change): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_goal_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_start_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(avoidance): unintentional path cut

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_common): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_side_shift): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_avoidance): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_lane_change): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_goal_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_start_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(avoidance): unintentional path cut

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_common): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_side_shift): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_avoidance): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_lane_change): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_goal_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_start_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(avoidance): unintentional path cut

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_common): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_side_shift): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_avoidance): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_lane_change): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_goal_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_start_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(avoidance): unintentional path cut

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_common): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_side_shift): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_avoidance): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_lane_change): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_goal_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_start_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Jun 6, 2024
* fix(avoidance): unintentional path cut

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_common): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_side_shift): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_avoidance): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_lane_change): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_goal_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(bpp_start_planner): nouse pointer

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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.

4 participants