Traffic light phase definitions require separation of name and semantics
Currently, the "name" attribute of a traffic light "Phase" suggests to be used for semantic information about the phase (e.g. "go" or "attention"). Some simulators may even rely on this as semantical information to feed into their traffic behavior. However, the attribute is a string its content is not standardized. Furthermore, it may well be required to have more than one phase with the same semantics (e.g. "stop" and beginning and end of cycle definition or "attention" for Austrian green-blinking and yellow light). This, however, would clash with the possibility to reference a phase by its name in the TrafficSignalControllerAction and the TrafficSignalControllerCondition.
A possible backwards-compatible solution would be to:
- introduce a new attribute, e.g. "semantic_state" with an enum (which shall be aligned with OpenSCENARIO DSL)
- make this attribute of cardinality 0..1 to avoid breaking backward compatibility
- leave the name attribute as a string and use it for referencing in the aforementioned Action/Condition, but adapt the documentation to make clear that this can be used freely and that the name must be unique among its siblings (i.e. name must be unique within one phase)
This issue has been revealed when discussing adding a traffic light example to the OpenSCENARIO XML delivery. Also: the included snippets in the OpenSCENARIO XML documentation already contain duplicated names "stop" within one phase, making it impossible to refer to these within the aforementioned Action/Condition.