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(safety_check): add option to use polygon along path in safety check #6336

Merged

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Feb 6, 2024

Description

⚠️ Please approve following PR first.
autowarefoundation/autoware_launch#865

Current safety_checker assumes that steering angle is fixed during braking and creates rectangle polygon to check safety based on each predicted poses. However, basically it is able to change steering angle anytime. Additionally, previous logic sometimes caused false positive and modules judged unsafe excessively because the detection polygon covered not only adjacent lane but also the area where the ego wouldn't go through.

In this PR, I added option to switch steering policy during breaking from fixed or free.

steering policy: fixed

In this policy, the safety checker creates rectangle polygon based on each predicted poses. (original method)

image

steering policy: free

In this policy, the safety checker creates polygon along path. Polygon's longitudinal length is calculated by rss parameter.

image

Tests performed

Effects on system behavior

Improve avoidance 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.

@zulfaqar-azmi-t4
Copy link
Contributor

zulfaqar-azmi-t4 commented Feb 15, 2024

Thank you @satoshi-ota for the great PR!

Just checking
It seems that the behavior is a little of sometimes.
For example in the video at time after 5s (I also attach image of the polygon at the time), the polygon seems to be straight, then it follows back the curvature of the path.
Is behavior is expected?

cap-.2024-02-15-22-35-24.mp4

image

@zulfaqar-azmi-t4
Copy link
Contributor

steering as parameter name seems to be odd.
I would suggest either

  1. steering_policy, or
  2. extended_polygon_policy but the name might be too long.
    I would say steering feels odd because it technically not related to steering.

@satoshi-ota
Copy link
Contributor Author

Thank you @satoshi-ota for the great PR!

Just checking It seems that the behavior is a little of sometimes. For example in the video at time after 5s (I also attach image of the polygon at the time), the polygon seems to be straight, then it follows back the curvature of the path. Is behavior is expected?

cap-.2024-02-15-22-35-24.mp4
image

Hmm... No. Something wrong. I'll take a look. Thanks for your review! @zulfaqar-azmi-t4

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@satoshi-ota
Copy link
Contributor Author

steering as parameter name seems to be odd. I would suggest either

  1. steering_policy, or
  2. extended_polygon_policy but the name might be too long.
    I would say steering feels odd because it technically not related to steering.

extended_polygon_policy seems to be nice!

This is my image.

  • extended_polygon_policy
    • along_path
    • rectangle

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 feat/create-polygon-along-path branch from 2155c0f to d025269 Compare February 16, 2024 00:17
@satoshi-ota
Copy link
Contributor Author

satoshi-ota commented Feb 16, 2024

@zulfaqar-azmi-t4 I fixed wierd polygon shape in c42fa54.
And, update param name. Could you see again?

image
image

@satoshi-ota
Copy link
Contributor Author

NO REGRESSION.

Copy link
Contributor

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 left a comment

Choose a reason for hiding this comment

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

LGTM. The behavior looks good!

cap-.2024-02-16-16-42-18.mp4

@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Feb 16, 2024
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

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

Comparison is base (6b1a459) 14.99% compared to head (d025269) 14.99%.
Report is 7 commits behind head on main.

Files Patch % Lines
...mon/src/utils/path_safety_checker/safety_check.cpp 0.00% 43 Missing ⚠️
...ehavior_path_avoidance_module/parameter_helper.hpp 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6336      +/-   ##
==========================================
- Coverage   14.99%   14.99%   -0.01%     
==========================================
  Files        1839     1839              
  Lines      127158   127218      +60     
  Branches    38099    38140      +41     
==========================================
+ Hits        19070    19077       +7     
- Misses      86755    86802      +47     
- Partials    21333    21339       +6     
Flag Coverage Δ *Carryforward flag
differential 11.09% <0.00%> (?)
total 14.99% <ø> (+<0.01%) ⬆️ Carriedforward from 6b1a459

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

@satoshi-ota satoshi-ota enabled auto-merge (squash) February 16, 2024 08:56
@satoshi-ota satoshi-ota merged commit 7938920 into autowarefoundation:main Feb 16, 2024
28 of 33 checks passed
@satoshi-ota satoshi-ota deleted the feat/create-polygon-along-path branch February 16, 2024 09:02
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Feb 23, 2024
…eck (autowarefoundation#6336)

* feat(safety_check): add new function to create polygon along path

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

* feat(avoidance): use free steer policy for safety check

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

* fix(safety_check): fix polygon edge

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

* fix(safety_check): fix param name

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

---------

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
StepTurtle pushed a commit to StepTurtle/autoware.universe that referenced this pull request Feb 28, 2024
…eck (autowarefoundation#6336)

* feat(safety_check): add new function to create polygon along path

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

* feat(avoidance): use free steer policy for safety check

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

* fix(safety_check): fix polygon edge

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

* fix(safety_check): fix param name

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 Mar 8, 2024
…eck (autowarefoundation#6336)

* feat(safety_check): add new function to create polygon along path

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

* feat(avoidance): use free steer policy for safety check

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

* fix(safety_check): fix polygon edge

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

* fix(safety_check): fix param name

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

---------

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
…eck (#6336)

* feat(safety_check): add new function to create polygon along path

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

* feat(avoidance): use free steer policy for safety check

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

* fix(safety_check): fix polygon edge

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

* fix(safety_check): fix param name

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

---------

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: Kotaro Yoshimoto <pythagora.yoshimoto@gmail.com>
TomohitoAndo pushed a commit to tier4/autoware.universe that referenced this pull request Apr 1, 2024
…eck (autowarefoundation#6336)

* feat(safety_check): add new function to create polygon along path

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

* feat(avoidance): use free steer policy for safety check

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

* fix(safety_check): fix polygon edge

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

* fix(safety_check): fix param name

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 Apr 8, 2024
…eck (autowarefoundation#6336)

* feat(safety_check): add new function to create polygon along path

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

* feat(avoidance): use free steer policy for safety check

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

* fix(safety_check): fix polygon edge

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

* fix(safety_check): fix param name

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 Jun 3, 2024
…eck (autowarefoundation#6336)

* feat(safety_check): add new function to create polygon along path

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

* feat(avoidance): use free steer policy for safety check

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

* fix(safety_check): fix polygon edge

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

* fix(safety_check): fix param name

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
…eck (autowarefoundation#6336)

* feat(safety_check): add new function to create polygon along path

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

* feat(avoidance): use free steer policy for safety check

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

* fix(safety_check): fix polygon edge

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

* fix(safety_check): fix param name

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