From 963947f1fe7e59ff64e29c5d8b44db6138c836ce Mon Sep 17 00:00:00 2001 From: satoshi-ota Date: Fri, 1 Jul 2022 09:15:49 +0900 Subject: [PATCH] docs(traffic_light_estimator): add README Signed-off-by: satoshi-ota --- perception/traffic_light_estimator/README.md | 73 +++++++++++++++++++ .../images/intersection1.svg | 4 + .../images/intersection2.svg | 4 + .../images/straight.drawio.svg | 4 + 4 files changed, 85 insertions(+) create mode 100644 perception/traffic_light_estimator/README.md create mode 100644 perception/traffic_light_estimator/images/intersection1.svg create mode 100644 perception/traffic_light_estimator/images/intersection2.svg create mode 100644 perception/traffic_light_estimator/images/straight.drawio.svg diff --git a/perception/traffic_light_estimator/README.md b/perception/traffic_light_estimator/README.md new file mode 100644 index 0000000000000..0d5df5bdc62d9 --- /dev/null +++ b/perception/traffic_light_estimator/README.md @@ -0,0 +1,73 @@ +# traffic_light_estimator + +## Purpose + +`traffic_light_estimator` is a module that estimates pedestrian traffic signals from HDMap and detected vehicle traffic signals. + +## Inputs / Outputs + +### Input + +| Name | Type | Description | +| ------------------------------------ | -------------------------------------------------------- | ------------------ | +| `~/input/vector_map` | `autoware_auto_mapping_msgs::msg::HADMapBin` | vector map | +| `~/input/route` | `autoware_auto_planning_msgs::msg::HADMapRoute` | route | +| `~/input/classified/traffic_signals` | `autoware_auto_perception_msgs::msg::TrafficSignalArray` | classified signals | + +### Output + +| Name | Type | Description | +| -------------------------- | -------------------------------------------------------- | --------------------------------------------------------- | +| `~/output/traffic_signals` | `autoware_auto_perception_msgs::msg::TrafficSignalArray` | output that contains estimated pedestrian traffic signals | + +## Parameters + +| Name | Type | Description | Default value | +| :---------------------- | :----- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------ | +| `use_last_detect_color` | `bool` | If this parameter is `true`, this module estimates pedestrian's traffic signal as RED not only when vehicle's traffic signal is detected as GREEN but also when detection results change GREEN to UNKNOWN. (If detection results change RED or AMBER to UNKNOWN, this module estimates pedestrian's traffic signal as UNKNOWN.) If this parameter is `false`, this module use only latest detection results for estimation. (Only when the detection result is GREEN, this module estimates pedestrian's traffic signal as RED.) | `true` | + +## Inner-workings / Algorithms + +```plantuml + +start +:subscribe detected traffic signals; +:get crosswalk lanelets; +:extract road lanelets that conflicts crosswalk; +if (Is there **STRAIGHT-GREEN** road lanelet?) then (yes) + :estimate related pedestrian's traffic signal as **RED**; +else if (Is there both **LEFT-GREEN** and **RIGHT-GREEN** road lanelet?) then (yes) + :estimate related pedestrian's traffic signal as **RED**; +else + :estimate related pedestrian's traffic signal as **UNKNOWN**; +endif +end + +``` + +If traffic between pedestrians and vehicles is controlled by traffic signals, the crosswalk traffic signal maybe **RED** in order to prevent pedestrian from crossing when the following conditions are satisfied. + +### Situation1 + +- crosswalk conflicts **STRAIGHT** lanelet +- the lanelet refers **GREEN** traffic signal + +
+ +
+
+ +
+ +### Situation2 + +- crosswalk conflicts different turn direction lanelets (STRAIGHT and LEFT, LEFT and RIGHT, RIGHT and STRAIGHT) +- the lanelets refer **GREEN** traffic signal + +
+ +
+ +## Assumptions / Known limits + +## Future extensions / Unimplemented parts diff --git a/perception/traffic_light_estimator/images/intersection1.svg b/perception/traffic_light_estimator/images/intersection1.svg new file mode 100644 index 0000000000000..7138732472195 --- /dev/null +++ b/perception/traffic_light_estimator/images/intersection1.svg @@ -0,0 +1,4 @@ + + + +
crosswalk
crosswalk
crosswalk
crosswalk
crosswalk
crosswalk
EGO
EGO
RED
RED
RED
RED
UNKNOWN
UNKNOWN
GREEN
GREEN
crosswalk
crosswalk
UNKNOWN
UNKNOWN
GREEN
GREEN
GREEN
GREEN
Text is not SVG - cannot display
\ No newline at end of file diff --git a/perception/traffic_light_estimator/images/intersection2.svg b/perception/traffic_light_estimator/images/intersection2.svg new file mode 100644 index 0000000000000..be91014c95a1b --- /dev/null +++ b/perception/traffic_light_estimator/images/intersection2.svg @@ -0,0 +1,4 @@ + + + +
crosswalk
crosswalk
crosswalk
crosswalk
EGO
EGO
RED
RED
UNKNOWN
UNKNOWN
crosswalk
crosswalk
UNKNOWN
UNKNOWN
GREEN
GREEN
GREEN
GREEN
crosswalk
crosswalk
crosswalk
crosswalk
RED
RED
UNKNOWN
UNKNOWN
GREEN
GREEN
GREEN
GREEN
EGO
EGO
crosswalk
crosswalk
crosswalk
crosswalk
RED
RED
UNKNOWN
UNKNOWN
GREEN
GREEN
EGO
EGO
GREEN
GREEN
crosswalk
crosswalk
RED
RED
crosswalk
crosswalk
RED
RED
Text is not SVG - cannot display
\ No newline at end of file diff --git a/perception/traffic_light_estimator/images/straight.drawio.svg b/perception/traffic_light_estimator/images/straight.drawio.svg new file mode 100644 index 0000000000000..a459264ddefe6 --- /dev/null +++ b/perception/traffic_light_estimator/images/straight.drawio.svg @@ -0,0 +1,4 @@ + + + +
crosswalk
crosswalk
EGO
EGO
RED
RED
GREEN
GREEN
Text is not SVG - cannot display
\ No newline at end of file