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

Development plan: dynamic obstacle avoidance #3389

Open
3 tasks done
takayuki5168 opened this issue Apr 13, 2023 · 5 comments
Open
3 tasks done

Development plan: dynamic obstacle avoidance #3389

takayuki5168 opened this issue Apr 13, 2023 · 5 comments
Assignees
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) status:stale Inactive or outdated issues. (auto-assigned) type:new-feature New functionalities or additions, feature requests.

Comments

@takayuki5168
Copy link
Contributor

takayuki5168 commented Apr 13, 2023

Checklist

  • I've read the contribution guidelines.
  • I've searched other issues and no duplicate issues were found.
  • I've agreed with the maintainers that I can plan this task.

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.

  • calculate waypoints a certain lateral distance far from the obstacle
  • connect waypoints and the current ego's lane's centerline smoothly

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

  • avoid obstacles on the right and left side by driving like S-shape.
  • avoid an obstacle during a lane change.

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.

  • determine dynamic obstacles to avoid
    • The position is close to the ego or ego's trajectory
    • TTC(time to collision) is low.
    • It will not go into the ego's lane by lane change.
    • Speed is high enough.
    • etc.
  • calculate a lateral distance to shift to keep a space both from the dynamic obstacle and road boundary
  • plan a path based on the sideshift module

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.
#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 takayuki5168 self-assigned this Apr 13, 2023
@BonoloAWF BonoloAWF added the type:new-feature New functionalities or additions, feature requests. label Apr 13, 2023
@takayuki5168
Copy link
Contributor Author

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
Copy link
Contributor

This is a very nice feature! 👍

@yukkysaito yukkysaito added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Apr 30, 2023
@stale
Copy link

stale bot commented Jun 29, 2023

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

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Jun 29, 2023
@takayuki5168
Copy link
Contributor Author

takayuki5168 commented Jan 18, 2024

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.

Screencast.2023-12-25.23_39_56.1.mp4

The ego got close to the front object in the branch road.

Screencast.2023-12-25.23_25_02.2.mp4

The oncoming object is close to the ego.

Screencast.2023-12-25.23_12_33.1.mp4

The front object pulled over.

Screencast.from.2024.01.16.20.16.28.webm

The front object pulled out.

Screencast.2023-12-25.23_31_06.mp4

Limitation

  • The maximum deviation of the trajectory from the reference path is limited to 0.5m by default as a prototype implementation.
    • To make this value bigger, the following feature is required.
      • turn on the blinker when the ego will go into the next lane.
      • check the safety behind when the ego will go into the next lane.
      • expand the drivable area to the next lane.
  • Avoidance against dynamic pedestrians and bicycles is not supported.
  • Better architecture to send the obstacles to avoid to the motion planning
    • Currently, they are applied to the drivable area. With this architecture, the motion planning does not know where is the road and the obstacles from the drivable area.

These are the major remained tasks.

@stale stale bot removed the status:stale Inactive or outdated issues. (auto-assigned) label Jan 18, 2024
Copy link

stale bot commented Mar 22, 2024

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

@stale stale bot added the status:stale Inactive or outdated issues. (auto-assigned) label Mar 22, 2024
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) status:stale Inactive or outdated issues. (auto-assigned) type:new-feature New functionalities or additions, feature requests.
Projects
None yet
Development

No branches or pull requests

3 participants