Traffic Crossing Locator

The Traffic Crossing Locator defines the specific properties of a crossing, used by a Traffic Locator. With the current implementation, the crossing acts as a booking central : an incoming car requests the right to traverse the crossing. If another car already registered in the crossing have a colliding trajectory, the car request is rejected, else the access is granted and this car trajectory is registered in the crossing.

For more information about Traffic, see Traffic tutorial

A Traffic Locator display, with lanes on curves, and crossings


Traffic Crossing Locators are automatically computed from the Traffic Locator. They may also be added manually in some very specific cases.

  • Golaem Menu: Environments / Traffic Crossing Locator 
  • MEL command: glmTrafficCrossingLocatorCmd;


Crossing Attributes

Crossing Radius This is the radius inside which a car will start behaving as a crossing. The traffic lights will be positioned on each plugged curve at this radius length.
Is A Junction If the crossing is a junction, the lights will all stay green, which is useful to make split, or merge, "crossings". Note that "junctions" circle will be displayed as green (non blocking), while usual traffic light will be displayed as a red circle (blocking).
U Turn forbidden In some specific cases, U turns must be avoided (foreground, etc), this attribute insures that there won't be any U turn on this crossing.

Traffic Lights Timing

Each Road as its specific control for lights. A light status of 0 or less means that the light is red. 1 or more means the light is green, everything between 0 and 1 is orange (acts as red in simulation). The user can decide to take control over it (keyframes, etc), or to let automatic timings to the job.

Automatic lights Let the lights control to automatic timings (true) or user custom management (false)

Automatic Lights Timing

When using automatic mode, the lights will iterate over connected roads. The roads are paired (the best aligned roads are put together, then the two next best aligned roads, etc, until there is only one or two roads remaining). Then the crossing iterate from one pair to the next with the following sequence :
Timing Scale Add a scale ratio to timings, to offset lights and avoid too much synchronization
Green Light Time Lights for a pair stays green for the given amount of seconds
Orange Light Time Lights for a pair stays orange for the given amount of seconds
Red Light Time All roads stay red for this time before another pair goes green.

Manual Lights Timing

connectedRoad[x] gives the name of a connected road and its matching light status parameter

Advanced Attributes

Keep Straight Ratio When a car drives on a crossing and have to cross the opposite lanes, it will advance from a configurable distance. At 0 ratio, the crossing bezier curve of the car starts directly from the "stop line" of the traffic lights. When the ratio is 1, it will keep straight until reaching the middle of the crossing, before starting its bezier trajectory to its exit lane. 
Invert Priority In some seldom cases, one may want to invert priorities, for example to simulate a round about with several children crossings. This has only a very minor impact for now, and is reserved for future use.