Skip to content

Commit db7b5dd

Browse files
authored
docs(behavior_path_planner): clean up duplicated description (#3441)
* docs(behavior_path_planner): move detail documents Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * docs(behavior_path_planner): clean up Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> --------- Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
1 parent 888ebaf commit db7b5dd

10 files changed

+188
-335
lines changed

planning/behavior_path_planner/README.md

+110-257
Large diffs are not rendered by default.

planning/behavior_path_planner/behavior_path_planner_avoidance_design.md planning/behavior_path_planner/docs/behavior_path_planner_avoidance_design.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This module executes avoidance over lanes, and the decision requires the lane st
2020

2121
The following figure shows a simple explanation of the logic for avoidance path generation. First, target objects are picked up, and shift requests are generated for each object. These shift requests are generated by taking into account the lateral jerk required for avoidance (red lines). Then these requests are merged and the shift points are created on the reference path (blue line). Filtering operations are performed on the shift points such as removing unnecessary shift points (yellow line), and finally a smooth avoidance path is generated by combining Clothoid-like curve primitives (green line).
2222

23-
![fig1](./image/avoidance/avoidance_design.fig1.drawio.svg)
23+
![fig1](../image/avoidance/avoidance_design.fig1.drawio.svg)
2424

2525
### Flowchart
2626

@@ -185,7 +185,7 @@ The avoidance target should be limited to stationary objects (you should not avo
185185
- This means that the vehicle is parked on the edge of the lane. This prevents the vehicle from avoiding a vehicle waiting at a traffic light in the middle of the lane. However, this is not an appropriate implementation for the purpose. Even if a vehicle is in the center of the lane, it should be avoided if it has its hazard lights on, and this is a point that should be improved in the future as the recognition performance improves.
186186
- Object is not behind ego(default: > -`2.0 m`) or too far(default: < `150.0 m`) and object is not behind the path goal.
187187

188-
![fig1](./image/avoidance/target_vehicle_selection.svg)
188+
![fig1](../image/avoidance/target_vehicle_selection.svg)
189189

190190
### Parked-car detection
191191

@@ -203,7 +203,7 @@ $$
203203

204204
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 parked-car.
205205

206-
![fig2](./image/avoidance/parked-car-detection.svg)
206+
![fig2](../image/avoidance/parked-car-detection.svg)
207207

208208
### Compensation for detection lost
209209

@@ -222,9 +222,9 @@ Therefore, in order to reduce the influence of the noise, avoidance module gener
222222
object_envelope_buffer: 0.3 # [m]
223223
```
224224
225-
![fig1](./image/avoidance/envelope_polygon.svg)
225+
![fig1](../image/avoidance/envelope_polygon.svg)
226226
227-
![fig1](./image/avoidance/shift_line_generation.svg)
227+
![fig1](../image/avoidance/shift_line_generation.svg)
228228
229229
### Computing Shift Length and Shift Points
230230
@@ -245,7 +245,7 @@ else
245245

246246
The following figure illustrates these variables(This figure just shows the max value of lateral shift length).
247247

248-
![shift_point_and_its_constraints](./image/avoidance/avoidance_module-shift_point_and_its_constraints.drawio.png)
248+
![shift_point_and_its_constraints](../image/avoidance/avoidance_module-shift_point_and_its_constraints.drawio.png)
249249

250250
### Rationale of having safety buffer and safety margin
251251

@@ -256,7 +256,7 @@ To compute the shift length, additional parameters that can be tune are `lateral
256256
- It is recommended to set the value to more than half of the ego vehicle's width.
257257
- The `road_shoulder_safety_margin` will prevent the module from generating a path that might cause the vehicle to go too near the road shoulder or adjacent lane dividing line.
258258

259-
![shift_length_parameters](./image/shift_length_parameters.drawio.svg)
259+
![shift_length_parameters](../image/shift_length_parameters.drawio.svg)
260260

261261
### Generating path only within lanelet boundaries
262262

@@ -267,7 +267,7 @@ The shift length is set as a constant value before the feature is implemented. S
267267

268268
These elements are used to compute the distance from the object to the road's shoulder (`to_road_shoulder_distance`). The parameters `enable_avoidance_over_same_direction` and `enable_avoidance_over_opposite_direction` allows further configuration of the to `to_road_shoulder_distance`. The following image illustrates the configuration.
269269

270-
![obstacle_to_road_shoulder_distance](./image/avoidance/obstacle_to_road_shoulder_distance.drawio.svg)
270+
![obstacle_to_road_shoulder_distance](../image/avoidance/obstacle_to_road_shoulder_distance.drawio.svg)
271271

272272
If one of the following conditions is `false`, then the shift point will not be generated.
273273

@@ -422,7 +422,7 @@ To solve that, this module provides a parameter for the minimum avoidance speed,
422422
- If the ego vehicle speed is lower than "nominal" minimum speed, use the minimum speed in the calculation of the jerk.
423423
- If the ego vehicle speed is lower than "sharp" minimum speed and a nominal lateral jerk is not enough for avoidance (the case where the ego vehicle is stopped close to the obstacle), use the "sharp" minimum speed in the calculation of the jerk (it should be lower than "nominal" speed).
424424

425-
![fig1](./image/avoidance/how_to_decide_path_shape_one_object.drawio.svg)
425+
![fig1](../image/avoidance/how_to_decide_path_shape_one_object.drawio.svg)
426426

427427
#### Multiple obstacle case (one direction)
428428

@@ -432,13 +432,13 @@ Generate shift points for multiple obstacles. All of them are merged to generate
432432

433433
For the details of the shift point filtering, see [filtering for shift points](#filtering-for-shift-points).
434434

435-
![fig1](./image/avoidance/how_to_decide_path_shape_multi_object_one_direction.drawio.svg)
435+
![fig1](../image/avoidance/how_to_decide_path_shape_multi_object_one_direction.drawio.svg)
436436

437437
#### Multiple obstacle case (both direction)
438438

439439
Generate shift points for multiple obstacles. All of them are merged to generate new shift points. If there are areas where the desired shifts conflict in different directions, the sum of the maximum shift amounts of these areas is used as the final shift amount. The rest of the process is the same as in the case of one direction.
440440

441-
![fig1](./image/avoidance/how_to_decide_path_shape_multi_object_both_direction.drawio.svg)
441+
![fig1](../image/avoidance/how_to_decide_path_shape_multi_object_both_direction.drawio.svg)
442442

443443
#### Filtering for shift points
444444

@@ -465,23 +465,23 @@ safety_check_idling_time: 1.5 # [s]
465465
safety_check_accel_for_rss: 2.5 # [m/ss]
466466
```
467467

468-
![fig1](./image/avoidance/safety_check_flowchart.svg)
468+
![fig1](../image/avoidance/safety_check_flowchart.svg)
469469

470470
`safety_check_backward_distance` is the parameter related to the safety check area. The module checks a collision risk for all vehicle that is within shift side lane and between object `object_check_forward_distance` ahead and `safety_check_backward_distance` behind.
471471

472-
![fig1](./image/avoidance/safety_check_step_1.svg)
472+
![fig1](../image/avoidance/safety_check_step_1.svg)
473473

474474
**NOTE**: Even if a part of an object polygon overlaps the detection area, if the center of gravity of the object does not exist on the lane, the vehicle is excluded from the safety check target.
475475

476476
---
477477

478478
Judge the risk of collision based on ego future position and object prediction path. The module calculates Ego's future position in the time horizon (`safety_check_time_horizon`), and use object's prediction path as object future position.
479479

480-
![fig1](./image/avoidance/safety_check_step_2.svg)
480+
![fig1](../image/avoidance/safety_check_step_2.svg)
481481

482482
After calculating the future position of Ego and object, the module calculates the lateral/longitudinal deviation of Ego and the object. The module also calculates the lateral/longitudinal margin necessary to determine that it is safe to execute avoidance maneuver, and if both the lateral and longitudinal distances are less than the margins, it determines that there is a risk of a collision at that time.
483483

484-
![fig1](./image/avoidance/safety_check_margin.svg)
484+
![fig1](../image/avoidance/safety_check_margin.svg)
485485

486486
The value of the longitudinal margin is calculated based on Responsibility-Sensitive Safety theory ([RSS](https://newsroom.intel.com/articles/rss-explained-five-rules-autonomous-vehicle-safety/#gs.ljzofv)). The `safety_check_idling_time` represents $T_{idle}$, and `safety_check_accel_for_rss` represents $a_{max}$.
487487

@@ -491,7 +491,7 @@ $$
491491

492492
The lateral margin is changeable based on ego longitudinal velocity. If the vehicle is driving at a high speed, the lateral margin should be larger, and if the vehicle is driving at a low speed, the value of the lateral margin should be set to a smaller value. Thus, the lateral margin for each vehicle speed is set as a parameter, and the module determines the lateral margin from the current vehicle speed as shown in the following figure.
493493

494-
![fig1](./image/avoidance/dynamic_lateral_margin.svg)
494+
![fig1](../image/avoidance/dynamic_lateral_margin.svg)
495495

496496
```yaml
497497
target_velocity_matrix:
@@ -513,7 +513,7 @@ If an avoidance path can be generated and it is determined that avoidance maneuv
513513
yield_velocity: 2.78 # [m/s]
514514
```
515515

516-
![fig1](./image/avoidance/yield_maneuver.svg)
516+
![fig1](../image/avoidance/yield_maneuver.svg)
517517

518518
**NOTE**: In yield maneuver, the vehicle decelerates target velocity under constraints.
519519

@@ -554,9 +554,9 @@ $$
554554
SHIFT_{current} > L_{threshold}
555555
$$
556556

557-
![fig1](./image/avoidance/yield_limitation.svg)
557+
![fig1](../image/avoidance/yield_limitation.svg)
558558

559-
![fig1](./image/avoidance/yield_maneuver_flowchart.svg)
559+
![fig1](../image/avoidance/yield_maneuver_flowchart.svg)
560560

561561
---
562562

@@ -718,7 +718,7 @@ namespace: `avoidance.constraints.longitudinal.`
718718
- **Planning on the intersection**
719719
- If it is known that the ego vehicle is going to stop in the middle of avoidance execution (for example, at a red traffic light), sometimes the avoidance should not be executed until the vehicle is ready to move. This is because it is impossible to predict how the environment will change during the stop.  This is especially important at intersections.
720720

721-
![fig1](./image/avoidance/intersection_problem.drawio.svg)
721+
![fig1](../image/avoidance/intersection_problem.drawio.svg)
722722

723723
- **Safety Check**
724724

@@ -746,15 +746,15 @@ namespace: `avoidance.constraints.longitudinal.`
746746

747747
Developers can see what is going on in each process by visualizing all the avoidance planning process outputs. The example includes target vehicles, shift points for each object, shift points after each filtering process, etc.
748748

749-
![fig1](./image/avoidance/avoidance-debug-marker.png)
749+
![fig1](../image/avoidance/avoidance-debug-marker.png)
750750

751751
To enable the debug marker, execute `ros2 param set /planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner avoidance.publish_debug_marker true` (no restart is needed) or simply set the `publish_debug_marker` to `true` in the `avoidance.param.yaml` for permanent effect (restart is needed). Then add the marker `/planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/debug/avoidance` in `rviz2`.
752752

753753
### Echoing debug message to find out why the objects were ignored
754754

755755
If for some reason, no shift point is generated for your object, you can check for the failure reason via `ros2 topic echo`.
756756

757-
![avoidance_debug_message_array](./image/avoidance/avoidance_debug_message_array.png)
757+
![avoidance_debug_message_array](../image/avoidance/avoidance_debug_message_array.png)
758758

759759
To print the debug message, just run the following
760760

planning/behavior_path_planner/behavior_path_planner_drivable_area_design.md planning/behavior_path_planner/docs/behavior_path_planner_drivable_area_design.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct DrivalbleLanes
7070

7171
The image of the sorted drivable lanes is depicted in the following picture.
7272

73-
![sorted_lanes](./image/drivable_area/sorted_lanes.drawio.svg)
73+
![sorted_lanes](../image/drivable_area/sorted_lanes.drawio.svg)
7474

7575
Note that, the order of drivable lanes become
7676

@@ -89,7 +89,7 @@ std::vector<geometry_msgs::msg::Point> right_bound;
8989

9090
and each point of right bound and left bound has a position in the absolute coordinate system.
9191

92-
![drivable_lines](./image/drivable_area/drivable_lines.drawio.svg)
92+
![drivable_lines](../image/drivable_area/drivable_lines.drawio.svg)
9393

9494
### Drivable Area Expansion
9595

@@ -98,7 +98,7 @@ and each point of right bound and left bound has a position in the absolute coor
9898
Each module can statically expand the left and right bounds of the target lanes by the parameter defined values.
9999
This enables large vehicles to pass narrow curve. The image of this process can be described as
100100

101-
![expanded_lanes](./image/drivable_area/expanded_lanes.drawio.svg)
101+
![expanded_lanes](../image/drivable_area/expanded_lanes.drawio.svg)
102102

103103
Note that we only expand right bound of the rightmost lane and left bound of the leftmost lane.
104104

@@ -113,11 +113,11 @@ This expansion can be summarized with the following steps:
113113
4. Remove the footprints from step 2 and the lines from step 3 from the ego path footprint from step 1.
114114
5. Expand the drivable area with the result of step 4.
115115

116-
| | |
117-
| :------------------------------- | :-------------------------------------------------------------------------------------------------- |
118-
| Inputs | ![drivable_area_expansion_inputs](./image/drivable_area/drivable_area_expansion_inputs.png) |
119-
| Footprints and uncrossable lines | ![drivable_area_expansion_footprints](./image/drivable_area/drivable_area_expansion_footprints.png) |
120-
| Expanded drivable area | ![drivable_area_expansion_result](./image/drivable_area/drivable_area_expansion_result.png) |
116+
| | |
117+
| :------------------------------- | :--------------------------------------------------------------------------------------------------- |
118+
| Inputs | ![drivable_area_expansion_inputs](../image/drivable_area/drivable_area_expansion_inputs.png) |
119+
| Footprints and uncrossable lines | ![drivable_area_expansion_footprints](../image/drivable_area/drivable_area_expansion_footprints.png) |
120+
| Expanded drivable area | ![drivable_area_expansion_result](../image/drivable_area/drivable_area_expansion_result.png) |
121121

122122
Please note that the dynamic expansion can only increase the size of the drivable area and cannot remove any part from the original drivable area.
123123

@@ -129,8 +129,8 @@ For example, in the same area, one can perform avoidance and another cannot. Thi
129129

130130
To debug the issue, the maximum drivable area boundary can be visualized.
131131

132-
![drivable_area_boundary_marker1](./image/drivable_area/drivable_area_boundary_marker_example1.png)
132+
![drivable_area_boundary_marker1](../image/drivable_area/drivable_area_boundary_marker_example1.png)
133133

134-
![drivable_area_boundary_marker2](./image/drivable_area/drivable_area_boundary_marker_example2.png)
134+
![drivable_area_boundary_marker2](../image/drivable_area/drivable_area_boundary_marker_example2.png)
135135

136136
The maximum drivable area can be visualize by adding the marker from `/planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/maximum_drivable_area`

0 commit comments

Comments
 (0)