Skip to content

Commit

Permalink
docs(behavior_velocity_planner, obstacle_stop_planner): add descripti…
Browse files Browse the repository at this point in the history
…on of redundant restart prevention (#1507)

* docs(behavior_velocity_planner): update README

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* docs(obstacle_stop_planner): update README

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota committed Aug 5, 2022
1 parent d845a78 commit 965c0be
Show file tree
Hide file tree
Showing 16 changed files with 153 additions and 29 deletions.
50 changes: 36 additions & 14 deletions planning/behavior_velocity_planner/detection-area-design.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
### Detection Area
## Detection Area

#### Role
### Role

If pointcloud is detected in a detection area defined on a map, the stop planning will be executed at the predetermined point.

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

#### Activation Timing
### Activation Timing

This module is activated when there is a detection area on the target lane.

### Algorithm
### Module Parameters

| Parameter | Type | Description |
| --------------------------- | ------ | -------------------------------------------------------------------------------------------------- |
| `use_dead_line` | bool | [-] weather to use dead line or not |
| `use_pass_judge_line` | bool | [-] weather to use pass judge line or not |
| `state_clear_time` | double | [s] when the vehicle is stopping for certain time without incoming obstacle, move to STOPPED state |
| `stop_margin` | double | [m] a margin that the vehicle tries to stop before stop_line |
| `dead_line_margin` | double | [m] ignore threshold that vehicle behind is collide with ego vehicle or not |
| `hold_stop_margin_distance` | double | [m] parameter for restart prevention (See Algorithm section) |

### Inner-workings / Algorithm

1. Gets a detection area and stop line from map information and confirms if there is pointcloud in the detection area
2. Inserts stop point l[m] in front of the stop line
3. Inserts a pass judge point to a point where the vehicle can stop with a max deceleration
4. Sets velocity as zero behind the stop line when the ego-vehicle is in front of the pass judge point
5. If the ego vehicle has passed the pass judge point already, it doesn’t stop and pass through.

#### Module Parameters

| Parameter | Type | Description |
| --------------------- | ------ | -------------------------------------------------------------------------------------------------- |
| `stop_margin` | double | [m] a margin that the vehicle tries to stop before stop_line |
| `use_dead_line` | bool | [-] weather to use dead line or not |
| `dead_line_margin` | double | [m] ignore threshold that vehicle behind is collide with ego vehicle or not |
| `use_pass_judge_line` | bool | [-] weather to use pass judge line or not |
| `state_clear_time` | double | [s] when the vehicle is stopping for certain time without incoming obstacle, move to STOPPED state |

#### Flowchart

```plantuml
Expand Down Expand Up @@ -87,3 +88,24 @@ endif
stop
@enduml
```

#### Restart prevention

If it needs X meters (e.g. 0.5 meters) to stop once the vehicle starts moving due to the poor vehicle control performance, the vehicle goes over the stopping position that should be strictly observed when the vehicle starts to moving in order to approach the near stop point (e.g. 0.3 meters away).

This module has parameter `hold_stop_margin_distance` in order to prevent from these redundant restart. If the vehicle is stopped within `hold_stop_margin_distance` meters from stop point of the module (\_front_to_stop_line < hold_stop_margin_distance), the module judges that the vehicle has already stopped for the module's stop point and plans to keep stopping current position even if the vehicle is stopped due to other factors.

<figure markdown>
![example](docs/detection_area/restart_prevention.svg){width=1000}
<figcaption>parameters</figcaption>
</figure>

<figure markdown>
![example](docs/detection_area/restart.svg){width=1000}
<figcaption>outside the hold_stop_margin_distance</figcaption>
</figure>

<figure markdown>
![example](docs/detection_area/keep_stopping.svg){width=1000}
<figcaption>inside the hold_stop_margin_distance</figcaption>
</figure>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 965c0be

Please sign in to comment.