Skip to content

Commit

Permalink
Fixed spelling mistakes
Browse files Browse the repository at this point in the history
Signed-off-by: TaikiYamada4 <[email protected]>
  • Loading branch information
TaikiYamada4 committed Nov 27, 2024
1 parent 32f5cf9 commit 603b744
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ mapping.traffic_light.correct_facing

## Feature

This validator checks whether each `traffic_light` linestring is drawn with the correct direction, becuase the linestring direction describes the facing of the traffic_light.
This validator checks whether each `traffic_light` linestring is drawn with the correct direction, because the linestring direction describes the facing of the traffic_light.
If the traffic light is facing to the viewer, the traffic light linestring must be drawn from the left point to the right point seen from the viewer.
Note that this validator only check traffic lights whose subtype are `red_yellow_green`.
This validator checks five types of issues.
Expand All @@ -20,15 +20,15 @@ The latter two issues mention to the traffic light facing.

All output issues specify the traffic_light "linestring" or the traffic_light "regulatory_element" as the **primitive**, and the primitive ID will be specified as the **ID**.

| Issue Code | Message | Severity | Primitive | Description | Approach |
| --------------------------------- | ----------------------------------------------------------------------------- | -------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TrafficLight.MissingReferrers-001 | "Lanelets referring this traffic_light have several divergent starting lines" | Info | Linestring | A `traffic_light` subtype regulatory element may be referred by multiple lanelets. This warning appears when the starting line of those lanelets (which tends to be the same or similar) diverge too much. | This hardly happens, but maybe the referring lanelet is completely wrong or the traffic light cannot be seen from the starting edge of the referring lanelet. |
| TrafficLight.MissingReferrers-002 | "The linestring direction seems to be wrong." | Error | Linestring | This `traffic_light` type linestring is drawn with the wrong direction. | Fix the traffic light linestring so that it is drawn from the left to the right seen from the stop line. |
| TrafficLight.MissingReferrers-003 | "The linestring direction has been judged as both correct and wrong." | Warning | Linestring | The validator cannot judge whether the direction of this `traffic_light` type linestring is correct. (Mostly they are correct.) This occurs from special regulatory element definitions and techinical issues written below. | This occurs in the [Difficult Case](#difficult-cases) written below. This validator currently cannot determine that the traffic light facing is correct in this case, so please recheck it by yourself and please ignore it if it is correct. |
| Issue Code | Message | Severity | Primitive | Description | Approach |
| --------------------------------- | ----------------------------------------------------------------------------- | -------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TrafficLight.MissingReferrers-001 | "Lanelets referring this traffic_light have several divergent starting lines" | Info | Linestring | A `traffic_light` subtype regulatory element may be referred by multiple lanelets. This warning appears when the starting line of those lanelets (which tends to be the same or similar) diverge too much. | This hardly happens, but maybe the referring lanelet is completely wrong or the traffic light cannot be seen from the starting edge of the referring lanelet. |
| TrafficLight.MissingReferrers-002 | "The linestring direction seems to be wrong." | Error | Linestring | This `traffic_light` type linestring is drawn with the wrong direction. | Fix the traffic light linestring so that it is drawn from the left to the right seen from the stop line. |
| TrafficLight.MissingReferrers-003 | "The linestring direction has been judged as both correct and wrong." | Warning | Linestring | The validator cannot judge whether the direction of this `traffic_light` type linestring is correct. (Mostly they are correct.) This occurs from special regulatory element definitions and technical issues written below. | This occurs in the [Difficult Case](#difficult-cases) written below. This validator currently cannot determine that the traffic light facing is correct in this case, so please recheck it by yourself and please ignore it if it is correct. |

### Procedure

This flow chart shows the simplized procedure how the validation is done.
This flow chart shows the simplified procedure how the validation is done.

![traffic_light_facing_procedure](../../media/traffic_light_facing_procedure.svg)

Expand All @@ -37,7 +37,7 @@ This flow chart shows the simplized procedure how the validation is done.
Currently, this validator assumes that all traffic lights in the same regulatory element has the same facing.
However, there might be cases that this assumption doesn't hold, and this is only when traffic lights on the other side of the road is in the same regulatory element.
It is hard to tell that this traffic light is for this road or the opposite road since the facing of the traffic light is unknown yet, so this validator keeps its ambiguity for now.
This kind of traffic light will be judged as correct from the this side but not from the other side, and it will be misjudjed oppositely if the traffic light linestring id drawn wrong.
This kind of traffic light will be judged as correct from the this side but not from the other side, and it will be misjudged oppositely if the traffic light linestring id drawn wrong.
This validator will throws a warning for this case and tells the user to check it by their own.

We assume that this kind of traffic light could be found only a few, but if you feel this concerning you can remove the traffic light on the other road from the regulatory element. This workaround affects nothing if your planning module doesn't utilize the information that the traffic light on the other road has the same timing of lighting.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ lanelet::validation::Issues TrafficLightFacingValidator::check_traffic_light_fac
continue;
}

// Estimate the psuedo stop line from the first lanelet and check whether it is similar to
// Estimate the pseudo stop line from the first lanelet and check whether it is similar to
// those of other lanelets
lanelet::ConstLineString3d temp_pseudo_stop_line =
get_starting_edge_from_lanelet(referring_lanelets[0], stop_line);
Expand All @@ -104,7 +104,7 @@ lanelet::validation::Issues TrafficLightFacingValidator::check_traffic_light_fac
}
}

// A traffic light is facing correct if the inner product is positve to the psuedo stop line
// A traffic light is facing correct if the inner product is positive to the pseudo stop line
Eigen::Vector3d traffic_light = linestring_to_vector3d(refers_linestring);
double cosine_pseudo_stop_line_and_traffic_light =
pseudo_stop_line.dot(traffic_light) / (pseudo_stop_line.norm() * traffic_light.norm());
Expand All @@ -116,7 +116,7 @@ lanelet::validation::Issues TrafficLightFacingValidator::check_traffic_light_fac
}
}

// Digest the stop line non-existance and the traffic light facing error to issues
// Digest the stop line non-existence and the traffic light facing error to issues
for (const auto & entry : tl_has_been_judged_as_correct) {
lanelet::Id id = entry.first;

Expand Down

0 comments on commit 603b744

Please sign in to comment.