Skip to content

Commit f6d2c59

Browse files
authored
docs(bpp_static_obstacle_avoidance): add documentation (#7554)
* fix: package path Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * docs: add explanation of lateral margin Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * fix: typo Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> * fix: wrong description Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com> --------- Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
1 parent 7508103 commit f6d2c59

20 files changed

+99
-1170
lines changed

planning/.pages

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
nav:
22
- 'Introduction': planning
33
- 'Behavior Path Planner':
4-
- 'About Behavior Path': planning/autoware_behavior_path_planner
4+
- 'About Behavior Path': planning/behavior_path_planner/autoware_behavior_path_planner
55
- 'Concept':
6-
- 'Planner Manager': planning/autoware_behavior_path_planner/docs/behavior_path_planner_manager_design
7-
- 'Scene Module Interface': planning/autoware_behavior_path_planner/docs/behavior_path_planner_interface_design
8-
- 'Path Generation': planning/autoware_behavior_path_planner_common/docs/behavior_path_planner_path_generation_design
9-
- 'Collision Assessment/Safety Check': planning/autoware_behavior_path_planner_common/docs/behavior_path_planner_safety_check
10-
- 'Dynamic Drivable Area': planning/autoware_behavior_path_planner_common/docs/behavior_path_planner_drivable_area_design
11-
- 'Turn Signal': planning/autoware_behavior_path_planner_common/docs/behavior_path_planner_turn_signal_design
6+
- 'Planner Manager': planning/behavior_path_planner/autoware_behavior_path_planner/docs/behavior_path_planner_manager_design
7+
- 'Scene Module Interface': planning/behavior_path_planner/autoware_behavior_path_planner/docs/behavior_path_planner_interface_design
8+
- 'Path Generation': planning/behavior_path_planner/autoware_behavior_path_planner_common/docs/behavior_path_planner_path_generation_design
9+
- 'Collision Assessment/Safety Check': planning/behavior_path_planner/autoware_behavior_path_planner_common/docs/behavior_path_planner_safety_check
10+
- 'Dynamic Drivable Area': planning/behavior_path_planner/autoware_behavior_path_planner_common/docs/behavior_path_planner_drivable_area_design
11+
- 'Turn Signal': planning/behavior_path_planner/autoware_behavior_path_planner_common/docs/behavior_path_planner_turn_signal_design
1212
- 'Scene Module':
13-
- 'Avoidance by Lane Change': planning/autoware_behavior_path_avoidance_by_lane_change_module
14-
- 'Dynamic Obstacle Avoidance': planning/autoware_behavior_path_dynamic_obstacle_avoidance_module
15-
- 'Goal Planner': planning/autoware_behavior_path_goal_planner_module
16-
- 'Lane Change': planning/autoware_behavior_path_lane_change_module
17-
- 'Side Shift': planning/autoware_behavior_path_side_shift_module
18-
- 'Start Planner': planning/autoware_behavior_path_start_planner_module
19-
- 'Static Obstacle Avoidance': planning/autoware_behavior_path_static_obstacle_avoidance_module
13+
- 'Avoidance by Lane Change': planning/behavior_path_planner/autoware_behavior_path_avoidance_by_lane_change_module
14+
- 'Dynamic Obstacle Avoidance': planning/behavior_path_planner/autoware_behavior_path_dynamic_obstacle_avoidance_module
15+
- 'Goal Planner': planning/behavior_path_planner/autoware_behavior_path_goal_planner_module
16+
- 'Lane Change': planning/behavior_path_planner/autoware_behavior_path_lane_change_module
17+
- 'Side Shift': planning/behavior_path_planner/autoware_behavior_path_side_shift_module
18+
- 'Start Planner': planning/behavior_path_planner/autoware_behavior_path_start_planner_module
19+
- 'Static Obstacle Avoidance': planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module
2020
- 'Behavior Velocity Planner':
2121
- 'About Behavior Velocity': planning/behavior_velocity_planner/autoware_behavior_velocity_planner
2222
- 'Template for Custom Module': planning/behavior_velocity_planner/autoware_behavior_velocity_template_module

planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/README.md

+85-13
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This is a rule-based avoidance module, which is running based on perception outp
88

99
![fig](./images/purpose/avoidance.png)
1010

11-
This module has [RTC interface](../autoware_rtc_interface/README.md), and user can select operation mode from MANUAL/AUTO depending on the vehicle sensor performance. If user selects MANUAL mode, this module outputs avoidance path as candidate and waits operator approval. In the case where the sensor/perception performance is not enough and false positive maybe occurs, we recommend to use this module with MANUAL mode in order to prevent unnecessary avoidance maneuver.
11+
This module has [RTC interface](../../autoware_rtc_interface/README.md), and user can select operation mode from MANUAL/AUTO depending on the vehicle sensor performance. If user selects MANUAL mode, this module outputs avoidance path as candidate and waits operator approval. In the case where the sensor/perception performance is not enough and false positive maybe occurs, we recommend to use this module with MANUAL mode in order to prevent unnecessary avoidance maneuver.
1212

1313
On the other hand, if user selects AUTO mode, this module modifies current following path without operator approval. If the sensor/perception performance is good enough, user can use this module with AUTO mode.
1414

@@ -83,7 +83,7 @@ partition fillEgoStatus() {
8383
note right
8484
This module has following status:
8585
- RUNNING: target object is still remaining. Or, the ego hasn't returned original lane.
86-
- CANCEL: taget obejct has gone. And, the ego hasn't initiated avoidance maneuver.
86+
- CANCEL: target object has gone. And, the ego hasn't initiated avoidance maneuver.
8787
- SUCCEEDED: the ego finishes avoiding all objects and returns original lane.
8888
end note
8989
@@ -122,7 +122,7 @@ if (Is there object that is potentially avoidable?) then (yes)
122122
:return true;
123123
note right
124124
Sometimes, we meet the situation where there is enough space to avoid
125-
but ego speed is to high to avoid target obejct under lateral jerk constraints.
125+
but ego speed is to high to avoid target object under lateral jerk constraints.
126126
This module keeps running in this case in order to decelerate ego speed.
127127
end note
128128
stop
@@ -747,6 +747,59 @@ The longitudinal positions depends on envelope polygon, ego vehicle specificatio
747747

748748
![fig](./images/path_generation/margin.png)
749749

750+
### Lateral margin
751+
752+
As mentioned above, user can adjust lateral margin by changing following two types parameter. The `soft_margin` is a soft constraint parameter for lateral margin. The `hard_margin` and `hard_margin_for_parked_vehicle` are hard constraint parameter.
753+
754+
```yaml
755+
car:
756+
...
757+
lateral_margin:
758+
soft_margin: 0.3 # [m]
759+
hard_margin: 0.2 # [m]
760+
hard_margin_for_parked_vehicle: 0.7 # [m]
761+
```
762+
763+
Basically, this module tries to generate avoidance path in order to keep lateral distance, which is sum of `soft_margin` and `hard_margin`/`hard_margin_for_parked_vehicle`, from avoidance target object.
764+
765+
![fig](./images/path_generation/soft_hard.png)
766+
767+
But if there isn't enough space to keep `soft_margin` distance, this module shortens soft constraint lateral margin. The parameter `soft_margin` is a maximum value of soft constraint, and actual soft margin can be a value between 0.0 and `soft_margin`. On the other hand, this module definitely keeps `hard_margin` or `hard_margin_for_parked_vehicle` depending on the situation. Thus, the minimum value of total lateral margin is `hard_margin`/`hard_margin_for_parked_vehicle`, and the maximum value is the sum of `hard_margin`/`hard_margin_for_parked_vehicle` and `soft_margin`.
768+
769+
Following figure shows the situation where this module shortens lateral soft constraint in order not to drive opposite direction lane when user set a parameter `use_opposite_lane` to `false`.
770+
771+
![fig](./images/path_generation/adjust_margin.png)
772+
773+
This module avoids not only parked vehicle but also non-parked vehicle which stops temporarily for some reason (e.g. waiting for traffic light to change red to green.). Additionally, this module has two types hard margin parameters, `hard_margin` and `hard_margin_for_parked_vehicle` and judges if it's a parked vehicle or not for each vehicles because it takes the risk of vehicle doors opening suddenly and people getting out from parked vehicle into consideration.
774+
775+
Basically, user had better make `hard_margin_for_parked_vehicle` larger than `hard_margin` to prevent collision with doors or people who suddenly get out from vehicle.
776+
777+
On the other hand, this module has only one parameter `soft_margin` for soft lateral margin constraint.
778+
779+
![fig](./images/path_generation/hard_margin.png)
780+
781+
As the hard margin parameters the distance which the user definitely want to keep, they are used in the logic to check whether the ego can pass side of the target object without avoidance maneuver as well.
782+
783+
If the lateral distance is less than `hard_margin`/`hard_margin_for_parked_vehicle` when assuming that the ego follows current lane without avoidance maneuver, this module thinks the ego can not pass the side of the object safely and the ego must avoid it. In this case, this module inserts stop point until the avoidance maneuver is allowed to execute so that the ego can avoid the object after approval. (e.g. The ego keeps stopping in front of such a object until operator approves avoidance maneuver if user uses this module in MANUAL mode.)
784+
785+
![fig](./images/path_generation/must_avoid.png)
786+
787+
On the other hand, if the lateral distance is larger than `hard_margin`/`hard_margin_for_parked_vehicle`, this module doesn't insert stop point even when it's waiting approval because it thinks it's possible to pass the side of the object safely.
788+
789+
![fig](./images/path_generation/pass_through.png)
790+
791+
### When there is not enough space
792+
793+
This module inserts stop point only when the ego can potentially avoid the object. So, if it is not able to keep distance more than `hard_margin`/`hard_margin_for_parked_vehicle`, this module does nothing. Following figure shows the situation where this module is not able to keep enough lateral distance when user set a parameter `use_opposite_lane` to `false`.
794+
795+
![fig](./images/path_generation/do_nothing.png)
796+
797+
!!! info
798+
799+
In this situation, obstacle stop feature in [obstacle_cruise_planner](../../autoware_obstacle_cruise_planner/README.md) is responsible for ego vehicle safety.
800+
801+
![fig](./images/path_generation/insufficient_drivable_space.png)
802+
750803
### Shift length calculation
751804

752805
The lateral shift length is sum of `overhang_distance`, lateral margin, whose value is set in config file, and the half of ego vehicle width defined in `vehicle_info.param.yaml`. On the other hand, the module limits the shift length depending on the space which the module can use for avoidance maneuver and the parameters `soft_drivable_bound_margin` `hard_drivable_bound_margin`. Basically, the shift length is limited so that the ego doesn't get closer than `soft_drivable_bound_margin` to drivable boundary. But it allows to relax the threshold `soft_drivable_bound_margin` to `hard_drivable_bound_margin` when the road is narrow.
@@ -804,6 +857,34 @@ The `prepare_length` is calculated as the product of ego speed and `max_prepare_
804857

805858
![fig](./images/path_generation/shift_line.png)
806859

860+
## Planning at RED traffic light
861+
862+
This module takes traffic light information into account so that the ego can behave properly. Sometimes, the ego straddles lane boundary but we want to prevent the ego from stopping in front of red traffic signal in such a situation. This is because the ego will block adjacent lane and it's inconvenient for other vehicles.
863+
864+
![fig](./images/traffic_light/traffic_light.png)
865+
866+
So, this module controls shift length and shift start/end point in order to prevent above situation.
867+
868+
### Control shift length
869+
870+
At first, if the ego hasn't initiated avoidance maneuver yet, this module limits maximum shift length and uses **ONLY** current lane during red traffic signal. This prevents the ego from blocking other vehicles even if this module executes avoidance maneuver and the ego is caught by red traffic signal.
871+
872+
![fig](./images/traffic_light/limit_shift_length.png)
873+
874+
### Control avoidance shift start point
875+
876+
Additionally, if the target object is farther than stop line for traffic light, this module set avoidance shift start point on the stop line in order to prevent the ego from stopping by red traffic signal in middle of avoidance maneuver.
877+
878+
![fig](./images/traffic_light/shift_from_current_pos.png)
879+
![fig](./images/traffic_light/shift_from_stop_line.png)
880+
881+
### Control return shift end point
882+
883+
If the ego has already initiated avoidance maneuver, this module tries to set return shift end point on the stop line.
884+
885+
![fig](./images/traffic_light/return_after_stop_line.png)
886+
![fig](./images/traffic_light/return_before_stop_line.png)
887+
807888
## Safety check
808889

809890
This feature can be enable by setting following parameter to `true`.
@@ -915,15 +996,6 @@ use_freespace_areas: true
915996

916997
## Future extensions / Unimplemented parts
917998

918-
- **Planning on the intersection**
919-
- 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.
920-
921-
![fig](./images/intersection_problem.drawio.svg)
922-
923-
- **Safety Check**
924-
925-
- In the current implementation, it is only the jerk limit that permits the avoidance execution. It is needed to consider the collision with other vehicles when change the path shape.
926-
927999
- **Consideration of the speed of the avoidance target**
9281000

9291001
- In the current implementation, only stopped vehicle is targeted as an avoidance target. It is needed to support the overtaking function for low-speed vehicles, such as a bicycle. (It is actually possible to overtake the low-speed objects by changing the parameter, but the logic is not supported and thus the safety cannot be guaranteed.)
@@ -1146,4 +1218,4 @@ The shift points are modified by a filtering process in order to get the expecte
11461218

11471219
The avoidance specific parameter configuration file can be located at `src/autoware/launcher/planning_launch/config/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/static_obstacle_avoidance.param.yaml`.
11481220

1149-
{{ json_to_markdown("planning/autoware_behavior_path_static_obstacle_avoidance_module/schema/static_obstacle_avoidance.schema.json") }}
1221+
{{ json_to_markdown("planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/schema/static_obstacle_avoidance.schema.json") }}

planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/images/avoidance_design.fig.drawio.svg

-668
This file was deleted.

planning/behavior_path_planner/autoware_behavior_path_static_obstacle_avoidance_module/images/intersection_problem.drawio.svg

-179
This file was deleted.

0 commit comments

Comments
 (0)