Skip to content

Commit

Permalink
docs(intersection_module): fix intersection design images (tier4#1007)
Browse files Browse the repository at this point in the history
* docs(intersection_module): fix intersection design images

Signed-off-by: 1222-takeshi <m.takeshi1995@gmail.com>

* docs(intersection_module): fix intersection design title

Signed-off-by: 1222-takeshi <m.takeshi1995@gmail.com>

* docs(intersection_module): add "Note"

Signed-off-by: 1222-takeshi <m.takeshi1995@gmail.com>

* docs(intersection_module): adjusted the headings

Signed-off-by: 1222-takeshi <m.takeshi1995@gmail.com>
  • Loading branch information
1222-takeshi authored and boyali committed Sep 28, 2022
1 parent 63bb8d8 commit 71b348d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 21 deletions.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 23 additions & 21 deletions planning/behavior_velocity_planner/intersection-design.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Intersection
## Intersection

## Role
### Role

Judgement whether a vehicle can go into an intersection or not by a dynamic object information, and planning a velocity of the low-down/stop.
This module is designed for rule-based intersection velocity decision that is easy for developers to design its behavior. It generates proper velocity for intersection scene.
Expand All @@ -9,17 +9,17 @@ In addition, the external users / modules (e.g. remote operation) to can interve

![brief](./docs/intersection/intersection.svg)

## Activation Timing
### Activation Timing

This function is activated when the attention lane conflicts with the ego vehicle's lane.

## Limitations
### Limitations

This module allows developers to design vehicle velocity in intersection module using specific rules. This module is affected by object detection and prediction accuracy considering as stuck vehicle in this intersection module.

## Inner-workings / Algorithms
### Inner-workings / Algorithms

### How To Select Attention Target Objects
#### How To Select Attention Target Objects

Objects that satisfy all of the following conditions are considered as target objects (possible collision objects):

Expand All @@ -31,7 +31,7 @@ Objects that satisfy all of the following conditions are considered as target ob
- Not being **in the same lane as the ego vehicle**.
- To avoid judging the vehicle ahead as a collision target. This logic needs to be improved.

### How to Define Attention Lanes
#### How to Define Attention Lanes

Target objects are limited by lanelets to prevent unexpected behavior. A lane that satisfies the following conditions is defined as an "Attention Lane" and used to define the target object.

Expand All @@ -42,11 +42,13 @@ See the following figures to know how to create an attention area and its ration

![intersection_straight](docs/intersection/intersection_straight.png)

![intersection_right](docs/intersection/intersection_right.png)
![intersection_turn_right](docs/intersection/intersection_turn_right.png)

![intersection_left](docs/intersection/intersection_left.png)
![intersection_turn_left](docs/intersection/intersection_turn_left.png)

### Collision Check and Crossing Judgement
Note: the case `traffic light, turn right only` is not currently implemented.

#### Collision Check and Crossing Judgement

The following process is performed for the attention targets to determine whether the ego vehicle can cross the intersection safely. If it is judged that the ego vehicle cannot pass through the intersection with enough margin, it will insert the stopping speed on the stop line of the intersection.

Expand All @@ -65,21 +67,21 @@ The following process is performed for the attention targets to determine whethe

(\*2) If the collision is detected, the state transits to "stop" immediately. On the other hand, the collision judgment must be clear for a certain period (default : 2.0[s]) to transit from "stop" to "go" to prevent to prevent chattering of decisions.

### Stop Line Automatic Generation
#### Stop Line Automatic Generation

The driving lane is complemented at a certain intervals (default : 20 [cm]), and the line which is a margin distance (default : 100cm) in front of the attention lane is defined as a stop line. (Also the length of the vehicle is considered and the stop point is set at the base_link point in front of the stop lane.)

### Pass Judge Line
#### Pass Judge Line

To avoid a rapid braking, in case that a deceleration more than a threshold (default : 0.5[G]) is needed, the ego vehicle doesn’t stop. In order to judge this condition, pass judge line is set a certain distance (default : 0.5 \* v_current^2 / a_max) in front of the stop line.
To prevent a chattering, once the ego vehicle passes this line, “stop” decision in the intersection won’t be done any more.
To prevent going over the pass judge line before the traffic light stop line, the distance between stop line and pass judge line become 0m in case that there is a stop line between the ego vehicle and an intersection stop line.

### Stuck Vehicle Detection
#### Stuck Vehicle Detection

If there is any object in a certain distance (default : 5[m]) from the end point of the intersection lane on the driving lane and the object velocity is less than a threshold (default 3.0[km/h]), the object is regarded as a stuck vehicle. If the stuck vehicle exists, the ego vehicle cannot enter the intersection.

## Module Parameters
### Module Parameters

| Parameter | Type | Description |
| --------------------------------------------- | ------ | ----------------------------------------------------------------------------- |
Expand All @@ -98,7 +100,7 @@ If there is any object in a certain distance (default : 5[m]) from the end point
| `intersection/min_predicted_path_confidence` | double | [-] minimum confidence value of predicted path to use for collision detection |
| `merge_from_private_road/stop_duration_sec` | double | [s] duration to stop |

## How To Tune Parameters
### How To Tune Parameters

- The time to change state form `Stop` to `GO` is too long.
- Change `state_transit_margin_time` to lower value. Be careful if this margin is too small then vehicle is going to change state many times and cause chattering.
Expand All @@ -107,7 +109,7 @@ If there is any object in a certain distance (default : 5[m]) from the end point
- The speed in intersection is too slow
- Change `intersection_velocity` to higher value.

## Flowchart
### Flowchart

```plantuml
@startuml
Expand Down Expand Up @@ -192,17 +194,17 @@ stop

NOTE current state is treated as `STOP` if `is_entry_prohibited` = `true` else `GO`

## Known Limits
### Known Limits

- This module generate intersection stop line and ignoring lanelet automatically form lanelet map , however if you want to set intersection stop line and ignoring lanelet manually you need to tag `right_of_way` and `yield` to all conflicting lanes properly.

---

## How to Set Lanelet Map fot Intersection
### How to Set Lanelet Map fot Intersection

![intersection_fig](docs/intersection/intersection_fig.png)

### Set a turn_direction tag (Fig. 1)
#### Set a turn_direction tag (Fig. 1)

IntersectionModule will be activated by this tag. If this tag is not set, ego-vehicle don’t recognize the lane as an intersection. Even if it’s a straight lane, this tag is mandatory if it is located within intersection.

Expand All @@ -212,10 +214,10 @@ Values of `turn_direction` must be one of “straight”(no turn signal), “rig

Lanes within intersections must be defined as a single Lanelet. For example, blue lane in Fig.3 cannot be split into 2 Lanelets.

### Explicitly describe a stop position [RoadMarking] (Optional) (Fig. 2)
#### Explicitly describe a stop position [RoadMarking] (Optional) (Fig. 2)

As a default, IntersectionModule estimates a stop position by the crossing point of driving lane and attention lane. But there are some cases like Fig.2 in which we would like to set a stop position explicitly. When a `stop_line` is defined as a `RoadMarking` item in the intersection lane, it overwrites the stop position. (Not only creating `stop_line`, but also defining as a `RoadMaking` item are needed.)

## Exclusion setting of attention lanes [RightOfWay] (Fig.3)
### Exclusion setting of attention lanes [RightOfWay] (Fig.3)

By default, IntersectionModule treats all lanes crossing with the registered lane as attention targets (yellow and green lanelets). But in some cases (e.g. when driving lane is priority lane or traffic light is green for the driving lane), we want to ignore some of the yield lanes. By setting `RightOfWay` of the `RegulatoryElement` item, we can define lanes to be ignored. Register ignored lanes as “yield” and register the attention lanes and driving lane as “right_of_way” lanelets in `RightOfWay` RegulatoryElement (For an intersection with traffic lights, we need to create items for each lane in the intersection. Please note that it needs a lot of man-hours.)

0 comments on commit 71b348d

Please sign in to comment.