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): improve avoidance target filter #2329

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Nov 19, 2022

Description

add new filtering process in fillAvoindanceTargetObjects()

Judge whether the object is parking vehicle on road shoulder

In the original implementation, if the length between the object's center and the center line of Ego's lane is less than threshold_distance_object_is_on_center, avoidance module determined that the vehicle was not a roadside parked vehicle and don't excute avoidance.

In this PR, not only the length from the centerline, but also the length from the road shoulder is calculated and used in the filtering process. It calculates the ratio of the actual length between the the object's center and the center line shift_length and the maximum length the object can shift shiftable_length.

$$ l_D = l_a - \frac{width}{2} $$

$$ ratio = {l_d \over l_D}$$

$l_d$ : actual shift length
$l_D$ : shiftable length
$l_a$ : distance between centerline and most left boundary.
$width$ : object width

image

# default
object_check_shiftable_ratio: 0.6 # [-]

The closer the object is to the shoulder, the larger the value of $ratio$ (theoretical max value is 1.0), and it compares the value and object_check_shiftable_ratio to determine whether the object is a road-parked vehicle.

image

If there is no road_shoulder lanelet in the map, sum object_check_min_road_shoulder_width to $l_a$, assuming that the shoulder exists.

object_check_min_road_shoulder_width: 0.5 # [m]

In addition, it is assumed in the filtering process that there are no parked vehicles within the intersection. Therefor, the filtering flow is as shown in the following figure.

image

Related links

Tests performed

green cube: NOT AVOIDANCE TARGET
red cube: AVOIDANCE TARGET

# default
object_check_shiftable_ratio: 0.6 # [-]

Since the object's shiftable ratio is 0.49 (< 0.6), it is determined that the object is not a parking vehicle.

Screenshot from 2022-11-18 16-24-46

# default
object_check_shiftable_ratio: 0.0 # [-]

If the value of object_check_shiftable_ratio is set to 0.0, all vehicles are judged as road-parked vehicles.

Screenshot from 2022-11-19 13-41-41

The module determines that any vehicle in the intersection is not a parked vehicle, regardless of the value of shift_length and shiftable_ratio.

Screenshot from 2022-11-20 12-43-39

Notes for reviewers

have to checkout tier4_autoware_msgs to this branch. (tier4/tier4_autoware_msgs#64)

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

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.
  • The PR is ready for merge.

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

@github-actions github-actions bot added component:launch Launch files, scripts and initialization tools. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) labels Nov 19, 2022
@satoshi-ota satoshi-ota force-pushed the feat/improve-avoidance-target-filter branch from 30a6493 to 551cb36 Compare November 19, 2022 05:13
@satoshi-ota satoshi-ota marked this pull request as ready for review November 19, 2022 07:21
@satoshi-ota
Copy link
Contributor Author

working on documentation update in #2331

@satoshi-ota
Copy link
Contributor Author

satoshi-ota commented Nov 22, 2022

@@ -15,6 +15,8 @@
threshold_time_object_is_moving: 1.0 # [s]
object_check_forward_distance: 150.0 # [m]
object_check_backward_distance: 2.0 # [m]
object_check_shiftable_ratio: 0.6 # [-]
object_check_min_road_shoulder_width: 0.5 # [m]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think these three related parameters should be rearranged, add white space on top and bottom so that it is simpler to be found

  1. threshold_distance_object_is_on_center
  2. shiftable ration
  3. min road shoulder width

Currently threshold_distance_object_is_on_center is on top of the list.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for your advise 😄 I'll fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I fixed in a94873d

@TakaHoribe
Copy link
Contributor

TakaHoribe commented Nov 29, 2022

assuming that the shoulder exists.

@satoshi-ota Would you explain the background/advantage of this assumption? Is this min_road_shoulder_length applied even if there is a sidewalk right next to the driving lane?

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

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 feat/improve-avoidance-target-filter branch from a94873d to ccfa88a Compare November 29, 2022 08:36
@codecov
Copy link

codecov bot commented Nov 29, 2022

Codecov Report

Base: 10.47% // Head: 10.47% // No change to project coverage 👍

Coverage data is based on head (cd01c88) compared to base (cd01c88).
Patch has no changes to coverable lines.

❗ Current head cd01c88 differs from pull request most recent head ccfa88a. Consider uploading reports for the commit ccfa88a to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2329   +/-   ##
=======================================
  Coverage   10.47%   10.47%           
=======================================
  Files        1248     1248           
  Lines       91307    91307           
  Branches    21035    21035           
=======================================
  Hits         9566     9566           
  Misses      71555    71555           
  Partials    10186    10186           
Flag Coverage Δ
total 10.45% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@satoshi-ota
Copy link
Contributor Author

satoshi-ota commented Nov 29, 2022

@TakaHoribe I think the left boundary of the road lanelet is not on acutual road bound (B) but on road outside line (A).

[Now, I am checking to make sure that is correct... ]

[TIER IV INTERNAL LINK]

P.S. Left bound of road lanelet is on road outside line (A) at least of odaiba map.


(Assuming I am correct) In many cases, vehicles can straddle the left boundary of lanelet and park on the left side of the road even if there is no explicit road shoulder lanelet. Therefore, shiftable ratio was calculated assuming that there is narrow (min_road_shoulder_length meter in width) road shoulder.

image

@satoshi-ota
Copy link
Contributor Author

@TakaHoribe @zulfaqar-azmi-t4 @mkuri Do you have any other concern or unclear point or advice?

Copy link
Contributor

@TakaHoribe TakaHoribe 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 enabled auto-merge (squash) December 2, 2022 00:31
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 cd729c5 into autowarefoundation:main Dec 2, 2022
HansRobo pushed a commit to HansRobo/autoware.universe that referenced this pull request Dec 16, 2022
…2329)

* feat(route_handler): add getMostLeftLanelet()

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

* feat(avoidance): calc shiftable ratio in avoidance target filtering process

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

* feat(avoidance): output object's debug info for rviz

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

* fix(avoidance): use avoidance debug factor

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

* feat(tier4_planning_launch): add new params for avoidance

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

* fix(avoidance): reorder params for readability

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

* fix(tier4_planning_launch): reorder params for readability

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>
kminoda pushed a commit to kminoda/autoware.universe that referenced this pull request Jan 6, 2023
…2329)

* feat(route_handler): add getMostLeftLanelet()

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

* feat(avoidance): calc shiftable ratio in avoidance target filtering process

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

* feat(avoidance): output object's debug info for rviz

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

* fix(avoidance): use avoidance debug factor

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

* feat(tier4_planning_launch): add new params for avoidance

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

* fix(avoidance): reorder params for readability

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

* fix(tier4_planning_launch): reorder params for readability

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

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: kminoda <koji.minoda@tier4.jp>
@satoshi-ota satoshi-ota deleted the feat/improve-avoidance-target-filter branch April 8, 2023 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:launch Launch files, scripts and initialization tools. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants