autowarefoundation / autoware.universe

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

Development plan: dynamic obstacle avoidance #3389

Open takayuki5168 opened 1 year ago

takayuki5168 commented 1 year ago

Checklist

Description

Currently, we have an avoidance module in behavior_path_planner only for static obstacles. To drive safer without less risk of collision, avoidance of dynamic obstacles is required.

Purpose

Avoid dynamic obstacles which are close to the ego or ego's trajectory to reduce the risk of collision. image image

Possible approaches

The current algorithm for static obstacle avoidance will not work for dynamic obstacle avoidance.

The algorithm of path planning for static obstacle avoidance is as follows.

Connecting points smoothly does not work well in a complicated scene since it is a rule-based algorithm.

Dynamic obstacle avoidance requires a dynamic change of the waypoints. This is the reason the current algorithm cannot be applied to dynamic obstacle avoidance.


1. Approach based on the sideshift module

Based on a quick discussion at TIER IV, by using the algorithm of the sideshift module in behavior_path_planner, we can realize dynamic obstacle avoidance.

The sideshift module plans a path by shifting a lateral distance, realizing lateral jerk/acceleration limitation.

2. Approach with the optimization-based path planner (obstacle_avoidance_planner)

Dynamic obstacle avoidance can be realized by obstacle_avoidance_planner. The following figure is static obstacle avoidance by obstacle_avoidance_planner. https://github.com/autowarefoundation/autoware.universe/pull/2880

By removing dynamic obstacles to avoid and their predicted paths from the drivable area, the avoidance will work. How stable it will be is not guaranteed though.

Definition of done

Resolve remaining issues.

takayuki5168 commented 1 year ago

Current progress. The parameters are tuned for the video to show the performance easily to see. https://user-images.githubusercontent.com/20228327/235217296-52ce9757-9e98-4c4a-a190-73ed8a619d9b.mp4

yukkysaito commented 1 year ago

This is a very nice feature! :+1:

stale[bot] commented 1 year ago

This pull request has been automatically marked as stale because it has not had recent activity.

takayuki5168 commented 5 months ago

The current status on 2024/01/18

Implementation

The second approach was implemented and merged to the autoware.universe. https://github.com/autowarefoundation/autoware.universe/tree/main/planning/behavior_path_dynamic_avoidance_module

  1. Approach with the optimization-based path planner (obstacle_avoidance_planner)

Documentation

Not completed yet https://autowarefoundation.github.io/autoware.universe/main/planning/behavior_path_dynamic_avoidance_module/

How to enable the future

  1. Enable the following option https://github.com/autowarefoundation/autoware_launch/blob/d3811ef583fa07155c4c5565c3ec95ef816e75eb/autoware_launch/config/planning/preset/default_preset.yaml#L11
  2. Set the following parameter to false https://github.com/autowarefoundation/autoware_launch/blob/d3811ef583fa07155c4c5565c3ec95ef816e75eb/autoware_launch/config/planning/scenario_planning/lane_driving/motion_planning/obstacle_avoidance_planner/obstacle_avoidance_planner.param.yaml#L6

Proposal: Regarding the upper 2nd parameter, how about setting it to false by default. When this parameter is set to true, when the trajectory is outside the drivable area, the stop point is inserted before the drivable area. When set to false, just a green virtual wall is shown and no stop point is inserted.

Validation

We tested the feature on the Japan Taxi vehicle in Tokyo. Mostly, the feature is working well.

The videos of the examples in the real world are shown here.

Open The object behind got close to the ego. https://github.com/autowarefoundation/autoware.universe/assets/20228327/403ce379-0178-49d0-a5fe-8c7787665022 The ego got close to the front object in the branch road. https://github.com/autowarefoundation/autoware.universe/assets/20228327/f6995443-8f45-4678-9816-243f2a9d3e48 The oncoming object is close to the ego. https://github.com/autowarefoundation/autoware.universe/assets/20228327/dd9b2021-e7cb-42bc-9ec8-b59b8eb66de9 The front object pulled over. https://github.com/autowarefoundation/autoware.universe/assets/20228327/1b49e8f5-eb63-4130-9035-1da9cda67d78 The front object pulled out. https://github.com/autowarefoundation/autoware.universe/assets/20228327/3e1c9785-123d-4c9c-b496-256b6e235db1

Limitation

These are the major remained tasks.

stale[bot] commented 3 months ago

This pull request has been automatically marked as stale because it has not had recent activity.