autowarefoundation / autoware.universe

https://autowarefoundation.github.io/autoware.universe/
Apache License 2.0
922 stars 604 forks source link

Error in obstacle avoidance direction when using extended lane to avoid obstacles #1076

Closed shulanbushangshu closed 2 years ago

shulanbushangshu commented 2 years ago

Checklist

Description

The default .yaml configuration for the extended lane in the obstacle avoidance module is shown below: 2022-06-10 17-50-24屏幕截图 Wrong direction for obstacle avoidance when placing an obstacle in the left lane.As shown below: 2022-06-10 17-19-17屏幕截图

When I change the default configuration:detection_area_left_expand_dist:1-->0,The above phenomena will not occur.

I think there is a problem with the code when using the extended lane for obstacle avoidance.

This phenomenon also occurs when we use relatively wide lanes (non-standard lanes) in reality

Expected behavior

Whether extended lanes or wide lanes are used for obstacle avoidance, the direction of obstacle avoidance shall not be different.

Actual behavior

Wrong direction for obstacle avoidance when placing an obstacle in the left lane by using default .yaml configuration for the extended lane in the obstacle avoidance module 2022-06-10 17-19-17屏幕截图

Steps to reproduce

1.Start autoware planning simulator using default;

  1. Set initial position and gobal position; 3.Place an obstacle vehicle in the left lane

Versions

1.OS: Ubuntun 20.04 2.ROS2: Galactic 3.Autoware: Autoware.universe:main

Possible causes

First, confirm whether the code supports wide lane obstacle avoidance and extended Lane obstacle avoidance. If it is not supported for design purposes, you need to change the default configuration file:detection_area_left_expand_dist:1-->0(Or delete relevant codes).

If the design needs support, I think there is a problem in the calculation of the obstacle avoidance module.

Additional context

No response

zulfaqar-azmi-t4 commented 2 years ago

@shulanbushangshu Thank you very much for your help I investigated them and tried to reproduce your result, and yes, this indeed seems looks weird. I'll take a look at the code and will let you know about the result.

Screenshot from 2022-06-13 15-31-56 .

shulanbushangshu commented 2 years ago

As show below: 2022-06-16 15-22-27屏幕截图 The current obstacle avoidance strategy only considers whether the obstacle intersects with the lane boundary line; Instead of considering whether the boundary lines of obstacles and path intersect. In my opinion, if the extended lane or wide lane is to be considered, whether the current strategy needs to be changed.

In order to adapt to the extended lane, the calculation method of obstacle avoidance offset distance may need to be changed too. The current offset distance method is as follows: 2022-06-16 15-44-46屏幕截图

@zulfaqar-azmi-t4 @taikitanaka3 have any ideas?

zulfaqar-azmi-t4 commented 2 years ago

As the mitigation, I was thinking of querying the whether the object overlaps with the object and if it not overlapping, the the object was ignore. Another solution is to compare the between the shift distance and the minimum shift distance that is required for the shift to happen.

Currently the collision check might be a bit off. So I am investigating the proper solution to it.

zulfaqar-azmi-t4 commented 2 years ago

@shulanbushangshu Hi, currently I'm using the following logic as the mitigation, but I am interested in knowing in case you have any concerns. Basically if the shift is shorter that the distance to the object, then we can safely ignore them.

ignoring_shift_point drawio