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): fix lateral distance calculation #4820

Merged

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Aug 30, 2023

Description

🤖 Generated by Copilot at 4cc379f

The pull request improves the object avoidance logic in the behavior path planner by using the reference path instead of the ego pose to calculate the overhang and road shoulder distances of objects. It modifies the function calcEnvelopeOverhangDistance and updates its calls in avoidance_module.cpp and avoidance_by_lane_change.cpp.

image


Before this PR

Since there is a bug in shiftable length caluclation logic, sometimes it outputs unfeasible (outside drivable area) avoidance path.

image

Psim

image

After this PR

In this PR, module calculates precise distance between object polygon and road shoulder so that it can judge if the ego is able to avoid and path is feasible.

const auto d = boost::geometry::distance(o.envelope_poly, to2D(line.basicLineString()));

image

Tests performed

Effects on system behavior

Fix invalid behavior

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 Aug 30, 2023
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/road-shoulder-check branch from 4cc379f to cbf96c6 Compare August 31, 2023 02:40
@satoshi-ota satoshi-ota marked this pull request as ready for review August 31, 2023 05:44
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Aug 31, 2023
@codecov
Copy link

codecov bot commented Aug 31, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.06% ⚠️

Comparison is base (124dc1d) 15.11% compared to head (cbf96c6) 15.06%.
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4820      +/-   ##
==========================================
- Coverage   15.11%   15.06%   -0.06%     
==========================================
  Files        1573     1573              
  Lines      108324   108727     +403     
  Branches    33256    33533     +277     
==========================================
+ Hits        16369    16375       +6     
- Misses      74121    74495     +374     
- Partials    17834    17857      +23     
Flag Coverage Δ *Carryforward flag
differential 13.01% <0.00%> (?)
total 15.11% <ø> (+<0.01%) ⬆️ Carriedforward from 124dc1d

*This pull request uses carry forward flags. Click here to find out more.

Files Changed Coverage Δ
...er/src/scene_module/avoidance/avoidance_module.cpp 11.41% <0.00%> (-0.02%) ⬇️
...ne_module/lane_change/avoidance_by_lane_change.cpp 0.00% <0.00%> (ø)
...ehavior_path_planner/src/utils/avoidance/utils.cpp 9.65% <0.00%> (-0.02%) ⬇️

... and 2 files with indirect coverage changes

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

Copy link
Contributor

@tkimura4 tkimura4 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 757d986 into autowarefoundation:main Sep 4, 2023
@satoshi-ota satoshi-ota deleted the fix/road-shoulder-check branch September 4, 2023 01:08
0x126 pushed a commit to tier4/autoware.universe that referenced this pull request Sep 7, 2023
…4820)

* fix(avoidance): fix calculation logic for road shoulder distance

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

* fix(avoidance): fix overhang distance calculation

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

* fix(avoidance): don't set avoidable for invalid shift

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.

2 participants