Skip to content

Commit 52efb84

Browse files
docs(dynamic_avoidance): update doc (#6648)
* update doc Signed-off-by: Yuki Takagi <yuki.takagi@tier4.jp>
1 parent 6c75c7b commit 52efb84

File tree

5 files changed

+75
-22
lines changed

5 files changed

+75
-22
lines changed

planning/behavior_path_dynamic_avoidance_module/README.md

+75-22
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,103 @@
11
# Dynamic avoidance design
22

3+
This module is under development.
4+
35
## Purpose / Role
46

5-
This is a module designed for avoiding obstacles which are running.
6-
Static obstacles such as parked vehicles are dealt with by the avoidance module.
7+
This module provides avoidance functions for vehicles, pedestrians, and obstacles in the vicinity of the ego's path in combination with the obstacle_avoidance module.
8+
Each module performs the following roles.
9+
Dynamic Avoidance module: This module cuts off the drivable area according to the position and velocity of the target to be avoided.
10+
Obstacle Avoidance module: This module modifies the path to be followed so that it fits within the drivable area received.
711

8-
This module is under development.
9-
In the current implementation, the dynamic obstacles to avoid is extracted from the drivable area.
10-
Then the motion planner, in detail obstacle_avoidance_planner, will generate an avoiding trajectory.
12+
Avoidance functions are also provided by the Avoidance module, which allows avoidance through the outside of own lanes but not against moving objects.
13+
On the other hand, this module can avoid moving objects.
14+
For this reason, the word "dynamic" is used in its name.
15+
The table below lists the avoidance modules that can be used for each situation.
16+
17+
| | avoid within the own lane | avoid through the outside of own lanes |
18+
| :----------------------- | :------------------------------------------------------------------------: | :------------------------------------: |
19+
| avoid not-moving objects | Avoidance Module <br> Dynamic Avoidance Module + Obstacle Avoidance Module | Avoidance Module |
20+
| avoid moving objects | Dynamic Avoidance Module + Obstacle Avoidance Module | No Module (Under Development) |
1121

12-
## Overview of drivable area modification
22+
## Policy of algorithms
1323

14-
### Filtering obstacles to avoid
24+
Here, we describe the policy of inner algorithms.
25+
The inner algorithms can be separated into two parts: The first decide whether to avoid the obstacles and the second cuts off the drivable area against the corresponding obstacle.
26+
If you are interested in more details, please see the code itself.
1527

16-
The dynamics obstacles meeting the following condition will be avoided.
28+
### Select obstacles to avoid
1729

18-
- The type is designated as `target_object.*`.
19-
- The norm of the obstacle's velocity projected to the ego's path is smaller than `target_object.min_obstacle_vel`.
20-
- The obstacle is in the next lane to the ego's lane, which will not cut-into the ego's lane according to the highest-prioritized predicted path.
30+
To decide whether to avoid an object, both the predicted path and the state (pose and twist) of each object are used.
31+
The type of objects the user wants this module to avoid is also required.
32+
Using this information, the module decides to _avoid_ objects that _obstruct the ego's passage_ and _can be avoided_.
2133

22-
### Drivable area modification
34+
The definition of _obstruct own passage_ is implemented as the object that collides within seconds.
35+
This process wastes computational cost by doing it for all objects; thus, filtering by the relative position and speed of the object with respect to the ego's path is also done as an auxiliary process.
36+
The other, _can be avoided_ denotes whether it can be avoided without risk to passengers or other vehicles.
37+
For this purpose, it is judged whether the obstacle can be avoided by satisfying the constraints of lateral acceleration and lateral jerk.
38+
For example, the module decides not to avoid an object that is too close or fast in the lateral direction because it cannot be avoided.
2339

24-
To realize dynamic obstacles for avoidance, the time dimension should be take into an account considering the dynamics.
25-
However, it will make the planning problem much harder to solve.
26-
Therefore, we project the time dimension to the 2D pose dimension.
40+
### Cuts off the drivable area against the selected obstacles
2741

28-
Currently, the predicted paths of predicted objects are not so stable.
29-
Therefore, instead of using the predicted paths, we assume that the obstacle will run parallel to the ego's path.
42+
For the selected obstacles to be avoided, the module cuts off the drivable area.
43+
As inputs to decide the shapes of cut-off polygons, poses of the obstacles are mainly used, assuming they move in parallel to the ego's path, instead of its predicted path.
44+
This design arises from that the predicted path of objects is not accurate enough to use the path modifications (at least currently).
45+
Furthermore, the output drivable area shape is designed as a rectangular cutout along the ego's path to make the computation scalar rather than planar.
3046

31-
First, a maximum lateral offset to avoid is calculated as follows.
32-
The polygon's width to extract from the drivable area is the obstacle width and double `drivable_area_generation.lat_offset_from_obstacle`.
33-
We can limit the lateral shift offset by `drivable_area_generation.max_lat_offset_to_avoid`.
47+
#### Determination of lateral dimension
48+
49+
Lateral dimensions of the polygon is calculated as follows.
50+
The polygon's width to extract from the drivable area is the obstacle width and `drivable_area_generation.lat_offset_from_obstacle`.
51+
We can limit the lateral shift length by `drivable_area_generation.max_lat_offset_to_avoid`.
3452

3553
![drivable_area_extraction_width](./image/drivable_area_extraction_width.drawio.svg)
3654

55+
#### Determination of longitudinal dimension
56+
3757
Then, extracting the same directional and opposite directional obstacles from the drivable area will work as follows considering TTC (time to collision).
58+
3859
Regarding the same directional obstacles, obstacles whose TTC is negative will be ignored (e.g. The obstacle is in front of the ego, and the obstacle's velocity is larger than the ego's velocity.).
3960

40-
Same directional obstacles
61+
Same directional obstacles (Parameter names may differ from implementation)
4162
![same_directional_object](./image/same_directional_object.svg)
4263

43-
Opposite directional obstacles
64+
Opposite directional obstacles (Parameter names may differ from implementation)
4465
![opposite_directional_object](./image/opposite_directional_object.svg)
4566

67+
## Example
68+
69+
<figure>
70+
<img src="./image/image-20230807-151945.png" width="800">
71+
<figcaption>Avoidance for the bus departure</figcaption>
72+
</figure>
73+
74+
<figure>
75+
<img src="./image/image-20230807-152835.png" width="800">
76+
<figcaption>Avoidance on curve </figcaption>
77+
</figure>
78+
79+
<figure>
80+
<img src="./image/image-20230808-095936.png" width="800">
81+
<figcaption>Avoidance against the opposite direction vehicle</figcaption>
82+
</figure>
83+
84+
<figure>
85+
<img src="./image/image-20230808-152853.png" width="800">
86+
<figcaption>Avoidance for multiple vehicle</figcaption>
87+
</figure>
88+
89+
## Future works
90+
91+
Currently, the path shifting length is limited to 0.5 meters or less by `drivable_area_generation.max_lat_offset_to_avoid`.
92+
This is caused by the lack of functionality to work with other modules and the structure of the planning component.
93+
Due to this issue, this module can only handle situations where a small avoidance width is sufficient.
94+
This issue is the most significant for this module.
95+
In addition, the ability of this module to extend the drivable area as needed is also required.
96+
4697
## Parameters
4798

99+
Under development
100+
48101
| Name | Unit | Type | Description | Default value |
49102
| :-------------------------------------------------------------------- | :---- | :----- | :--------------------------------------------------------- | :------------ |
50103
| target_object.car | [-] | bool | The flag whether to avoid cars or not | true |
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)