-
Notifications
You must be signed in to change notification settings - Fork 678
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(behavior_path_planner): add a new document for the drivable area…
… generation (#2532) * feat(behavior_path_planner): add drivable area document Signed-off-by: yutaka <[email protected]> * update Signed-off-by: yutaka <[email protected]> * update Signed-off-by: yutaka <[email protected]> * add expanded lanes explanation Signed-off-by: yutaka <[email protected]> * fix format Signed-off-by: yutaka <[email protected]> * update Signed-off-by: yutaka <[email protected]> * Update planning/behavior_path_planner/behavior_path_planner_drivable_area.md Co-authored-by: Fumiya Watanabe <[email protected]> * Update planning/behavior_path_planner/behavior_path_planner_avoidance-design.md Co-authored-by: Fumiya Watanabe <[email protected]> * Update planning/behavior_path_planner/behavior_path_planner_drivable_area.md Co-authored-by: Fumiya Watanabe <[email protected]> * Update planning/behavior_path_planner/behavior_path_planner_drivable_area.md Co-authored-by: Fumiya Watanabe <[email protected]> Signed-off-by: yutaka <[email protected]> Co-authored-by: Fumiya Watanabe <[email protected]>
- Loading branch information
1 parent
f67d733
commit b970720
Showing
6 changed files
with
844 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
planning/behavior_path_planner/behavior_path_planner_drivable_area.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Drivable Area | ||
|
||
Drivable Area represents the area where ego vehicle can pass. | ||
|
||
## Purpose / Role | ||
|
||
In order to defined the area that ego vehicle can travel safely, we generate drivable area in behavior path planner module. Our drivable area is represented by two line strings, which are `left_bound` line and `right_bound` line respectively. Both `left_bound` and `right_bound` are created from left and right boundaries of lanelets. Note that `left_bound` and `right bound` are generated by `generateDrivableArea` function. | ||
|
||
## Assumption | ||
|
||
Our drivable area has several assumptions. | ||
|
||
- Drivable Area should have all of the necessary area but should not represent unnecessary area for current behaviors. For example, when ego vehicle is in `follow lane` mode, drivable area should not contain adjacent lanes. | ||
|
||
- When generating a drivable area, lanes need to be arranged in the order in which cars pass by (More details can be found in following sections). | ||
|
||
- Both left and right bounds should cover the front of the path and the end of the path. | ||
|
||
## Limitations | ||
|
||
Currently, when clipping left bound or right bound, it can clip the bound more than necessary and the generated path might be conservative. | ||
|
||
## Parameters for drivable area generation | ||
|
||
| Name | Unit | Type | Description | Default value | | ||
| :------------------------------- | :--- | :----- | :------------------------------------------ | :------------ | | ||
| drivable_area_right_bound_offset | [m] | double | right offset length to expand drivable area | 5.0 | | ||
| drivable_area_left_bound_offset | [m] | double | left offset length to expand drivable area | 5.0 | | ||
|
||
Note that default values can be varied by the module. Please refer to the `config/drivable_area_expansion.yaml` file. | ||
|
||
## Inner-workings / Algorithms | ||
|
||
This section gives details of the generation of the drivable area (`left_bound` and `right_bound`). | ||
|
||
### Drivable Lanes Generation | ||
|
||
Before generating drivable areas, drivable lanes need to be sorted. Drivable Lanes are selected in each module (`Lane Follow`, `Avoidance`, `Lane Change`, `Pull Over`, `Pull Out` and etc.), so more details about selection of drivable lanes can be found in each module's document. We use the following structure to define the drivable lanes. | ||
|
||
```plantuml | ||
struct DrivalbleLanes | ||
{ | ||
lanelet::ConstLanelet right_lanelet; // right most lane | ||
lanelet::ConstLanelet left_lanelet; // left most lane | ||
lanelet::ConstLanelets middle_lanelets; // middle lanes | ||
}; | ||
``` | ||
|
||
The image of the sorted drivable lanes is depicted in the following picture. | ||
|
||
![sorted_lanes](./image/drivable_area/sorted_lanes.drawio.svg) | ||
|
||
Note that, the order of drivable lanes become | ||
|
||
```plantuml | ||
drivable_lanes = {DrivableLane1, DrivableLanes2, DrivableLanes3, DrivableLanes4, DrivableLanes5} | ||
``` | ||
|
||
### Drivable Area Expansion | ||
|
||
Each module can expand the drivable area based on parameters. It expands right bound and left bound of target lanes. This enables large vehicles to pass narrow curve. The image of this process can be described as | ||
|
||
![expanded_lanes](./image/drivable_area/expanded_lanes.drawio.svg) | ||
|
||
Note that we only expand right bound of the rightmost lane and left bound of the leftmost lane. | ||
|
||
### Drivable Area Generation | ||
|
||
In this section, a drivable area is created using drivable lanes arranged in the order in which vehicles pass by. We created `left_bound` from left boundary of the leftmost lanelet and `right_bound` from right boundary of the rightmost lanelet. The image of the created drivable area will be the following blue lines. Note that the drivable area is defined in the `Path` and `PathWithLaneId` messages as | ||
|
||
```plantuml | ||
std::vector<geometry_msgs::msg::Point> left_bound; | ||
std::vector<geometry_msgs::msg::Point> right_bound; | ||
``` | ||
|
||
and each point of right bound and left bound has a position in the absolute coordinate system. | ||
|
||
![drivable_lines](./image/drivable_area/drivable_lines.drawio.svg) |
Oops, something went wrong.