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(avoidance): change lateral margin based on if it's parked vehicle #6520

Merged
merged 2 commits into from
Mar 7, 2024

Conversation

satoshi-ota
Copy link
Contributor

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

Description

The module creates avoidance path not only for PARKED vehilce but also NON-PARKED vehicle. And, it used common lateral margin for both type of vehicle. But I think the module should be able to use different lateral margin for each types based on the assumption that the door might open and the driver might get out the car if it's a PARKED vehilce. In that case, we should set larger lateral margin for PARKED vehicle than the param for NON-PARKED vehicle.

In this PR, I rebuild lateral params and make it possible to set lateral params dependently.

For example, it's able to tune as follow. In this setting, avoidance module keeps 1.5m (0.3 + 0.5 + 0.7) for PARKED vehicle.

        bus:
...
          lateral_margin:
            soft_margin: 0.5                           # [m]
            hard_margin: 0.2                           # [m]
            hard_margin_for_parked_vehicle: 0.7        # [m]
...
          envelope_buffer_margin: 0.3
...

For PARKED vehilce. (Grid: 0.5 x 0.5m)

Screenshot from 2024-03-05 09-38-49

On the other hand, it keeps 1.0m (0.3 + 0.5 + 0.2) for NON-PARKED vehicle.

Screenshot from 2024-03-05 09-37-11

Tests performed

Effects on system behavior

Improve avoidance behaivor.

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 Mar 1, 2024
@satoshi-ota satoshi-ota marked this pull request as ready for review March 5, 2024 00:51
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Mar 6, 2024
@TomohitoAndo
Copy link
Contributor

@satoshi-ota
Do you have plans to update the documentation?
It appears there have been significant changes to the parameters.
Additionally, it would be beneficial to include a detailed explanation of how the module decides whether other vehicles are PARKED or NON-PARKED.

@satoshi-ota
Copy link
Contributor Author

@satoshi-ota Do you have plans to update the documentation? It appears there have been significant changes to the parameters. Additionally, it would be beneficial to include a detailed explanation of how the module decides whether other vehicles are PARKED or NON-PARKED.

@TomohitoAndo Thanks for your question. Yes, of course. However, most of avoidance logics is NOT fixed and there is a possibility to change in near future. So, I'll update opened avoidance module docs in June.

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 5.00000% with 57 lines in your changes are missing coverage. Please review.

Project coverage is 14.78%. Comparing base (1b45a7e) to head (ba7b435).
Report is 12 commits behind head on main.

Files Patch % Lines
...nning/behavior_path_avoidance_module/src/utils.cpp 6.89% 27 Missing ⚠️
...th_avoidance_by_lane_change_module/src/manager.cpp 0.00% 0 Missing and 6 partials ⚠️
...ehavior_path_avoidance_module/parameter_helper.hpp 0.00% 0 Missing and 6 partials ⚠️
...nning/behavior_path_avoidance_module/src/scene.cpp 0.00% 6 Missing ⚠️
...path_avoidance_by_lane_change_module/src/scene.cpp 0.00% 5 Missing ⚠️
...ing/behavior_path_avoidance_module/src/manager.cpp 25.00% 0 Missing and 3 partials ⚠️
...path_avoidance_module/src/shift_line_generator.cpp 0.00% 3 Missing ⚠️
...nning/behavior_path_avoidance_module/src/debug.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6520      +/-   ##
==========================================
- Coverage   14.78%   14.78%   -0.01%     
==========================================
  Files        1917     1917              
  Lines      132038   132059      +21     
  Branches    39228    39242      +14     
==========================================
+ Hits        19524    19526       +2     
- Misses      90726    90738      +12     
- Partials    21788    21795       +7     
Flag Coverage Δ *Carryforward flag
differential 12.93% <5.00%> (?)
total 14.79% <ø> (+<0.01%) ⬆️ Carriedforward from 1b45a7e

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

@TomohitoAndo
Copy link
Contributor

I confirmed this works on PSim. Great!

I set the parameter like following to see the change.

        car:
          execute_num: 1                               # [-]
          moving_speed_threshold: 1.0                  # [m/s]
          moving_time_threshold: 2.0                   # [s]
          lateral_margin:
            soft_margin: 0.1                           # [m]
            hard_margin: 0.1                           # [m]
            hard_margin_for_parked_vehicle: 0.5        # [m]
          max_expand_ratio: 0.0                        # [-]
          envelope_buffer_margin: 0.1                  # [m]
          safety_buffer_longitudinal: 0.0              # [m]
          use_conservative_buffer_longitudinal: true   # [-] When set to true, the base_link2front is added to the longitudinal buffer before avoidance.

PARKED vehicle
image

NON-PARKED vehicle
image
image

Copy link
Contributor

@TomohitoAndo TomohitoAndo left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@shmpwk shmpwk 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 e1a3139 into autowarefoundation:main Mar 7, 2024
29 of 32 checks passed
@satoshi-ota satoshi-ota deleted the fix/lateral-margin branch March 7, 2024 01:19
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Mar 7, 2024
autowarefoundation#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Mar 8, 2024
autowarefoundation#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
Signed-off-by: Kotaro Yoshimoto <[email protected]>
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Mar 19, 2024
autowarefoundation#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
kaigohirao pushed a commit to kaigohirao/autoware.universe that referenced this pull request Mar 22, 2024
autowarefoundation#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
Signed-off-by: kaigohirao <[email protected]>
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Mar 28, 2024
autowarefoundation#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
TomohitoAndo pushed a commit to tier4/autoware.universe that referenced this pull request Apr 1, 2024
autowarefoundation#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
satoshi-ota added a commit to tier4/autoware.universe that referenced this pull request Apr 8, 2024
autowarefoundation#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
autowarefoundation#6520)

* feat(avoidance): check if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

* feat(avoidance): change lateral margin based on if it's parked vehicle

Signed-off-by: satoshi-ota <[email protected]>

---------

Signed-off-by: satoshi-ota <[email protected]>
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