6.11 Traffic signals

Traffic signals introduce two main aspects into simulation:

  1. Position and rendering of traffic signals and their possible state in a simulation. Locations are defined in the road network file. Rendering is specific to the simulator.

  2. The dynamic behavior that describes how and when the traffic signals change their observable state during a simulation. This is defined in ASAM OpenSCENARIO with referencing the signals in the road network.

6.11.1 Traffic signal controllers

Traffic signal controllers apply a signal cycle to a signal or a signal group, meaning they provide identical sequential semantic phases for one or more dynamic traffic signals. Controllers serve as wrappers for the behavior of a group of signals. TrafficSignalController instances are used to control traffic light switching phases. ASAM OpenSCENARIO adds dynamic aspects — such as semantic phases and observable states — to the signal groups that are defined in the road network (for example, controller element in ASAM OpenDRIVE).

6.11.2 Traffic signal controller definition

Traffic signal controllers are defined in the RoadNetwork section of a scenario file. TrafficSignalController instances are wrapped around their semantic phases (for example, "go", "caution" and "stop") and their and observable signal states (for example, "on", "off" or "flashing"), thus forming a signal cycle. A TrafficSignalController references the identifier of a signal group in the road network (for example, an ASAM OpenDRIVE controller) with the name attribute. If the road network format does not define signal groups, then the name attribute of the TrafficSignalController is only its identifier for reference within the scenario.

<TrafficSignals>
    <TrafficSignalController name="RoadNetwork_ID1">
        ...
    </TrafficSignalController>
    <TrafficSignalController name="RoadNetwork_ID2">
        ...
    </TrafficSignalController>
    ...
</TrafficSignals>

6.11.3 Connecting traffic signal controllers

ASAM OpenSCENARIO provides an optional mechanism to connect the dynamic behavior of multiple TrafficSignalController instances: A TrafficSignalController can define a delay to a referenced TrafficSignalController. The referenced TrafficSignalController shall be defined in the same scenario with its dynamic behavior.

<RoadNetwork>
    <LogicFile>
        ...
    </LogicFile>
    <SceneGraphFile>
        ...
    </SceneGraphFile>
    <TrafficSignals>
        <TrafficSignalController name="TrafficLightGroup_1">
            ...
        </TrafficSignalController>
        <TrafficSignalController name="TrafficLightGroup_2"
                                delay="45"
                                reference="TrafficLightGroup_1">
            ...
        </TrafficSignalController>
        ...
    </TrafficSignals>
    ...
</RoadNetwork>

6.11.4 Phases

TrafficSignalController provides an ordered list of Phase instances, forming the signal cycle. A Phase represents a dynamic element of a TrafficSignalController and defines a signal state, a duration and a name, which represents the semantic information of a Phase (for example, "go", "caution", "stop"). The simulation sequentially runs through the Phase instances of the declared TrafficSignalController, while executing the scenario with respect to each duration. The list of Phase instances represents a cycle. That means, the first Phase repeats after the last Phase has ended. The duration of a signal cycle is the sum of the duration of the Phase instances. The first Phase starts with the execution of the storyboard.

Phase instances are connected to multiple instances of TrafficSignalState or one TrafficSignalGroupState. Because a TrafficSignalController can control multiple traffic signals, each traffic signal is represented by an observable state during a specific Phase.

In the current version, interpretation and notation of state are specific to the simulation engine used.

In the following example, the pedestrian traffic signals are encoded with binary values (on/off) and as a group, because all traffic signals share the same state for every Phase:

<TrafficSignalController name="45">
    <Phase name="stop" duration="35">
        <TrafficSignalGroupState state="on;off"/>
    </Phase>
    <Phase name="go" duration="20">
        <TrafficSignalGroupState state="off;on"/>
    </Phase>
    <Phase name="stop" duration="17">
        <TrafficSignalGroupState state="on;off"/>
    </Phase>
</TrafficSignalController>