Traffic Locator

The Traffic Locator defines the road graph on which entities can move, thanks to the Traffic and Traffic Goto behaviors. It is built upon Maya nurbs curves, and a specific locator to represent crossings. A road graph is basically defined by adding the curves (roads) to the traffic locator, and defining how much lanes each curve has.

For more information about Traffic, see Traffic tutorial


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

CREATION

A Traffic Locator is automatically created when a Traffic or Traffic Goto behavior is added to the simulation.

  • Golaem Shelf:  / right click / Traffic Locator
  • Golaem Menu: Environments / Traffic Locator
  • MEL command: glmTrafficLocatorCmd;
Note that several Traffic Locators can be used in a simulation and can be chosen in the Crowd Manager and in each Crowd Field. Thus, if two Crowd Fields are using two different Traffic Locators, their Entities will not be able to avoid each other.

Known Limitations

  • When two crossing vehicles both have curvy trajectories, the collision avoidance may not detect future collisions soon enough. In that case an immediate stop of the vehicle can occur when it detects the collision between both vehicles boxes, ignoring the maximum deceleration configured.
  • Lane changing is not taken into account, therefore some cars may queue up in one lane while the neighbor lane is empty. 
  • There is no specific process to make pedestrian entities interact with vehicles and traffic yet.

CONFIGURATION

Roads Attributes

In Maya Curves Each of these curves define a road segment, with specific lanes information
Driver Side Set the driving side here (left or right)

Lane Switch Attributes

Enable Lane Switch The car may switch of lane when driving on a lane, if an obstacle is on the way, and a neighbor lane is free
Lane Switch Duration If possible, the lane switch will take this amount of time in seconds to switch of lane : longer delay means smoother change, but less changes (as it requires more space)
Lane Switch Boldness A value between 0 (timid) and 1 (bold) to handle switchs. Bolder cars may make other cars or themselves brake harder when switching of lane.

Default Road Attributes

When curves are added to the Traffic Locator, some parameters are added to them to define their traffic properties. All these parameters can be tweaked per lane once the curves are added to the locator, in their Extra Attributes section.


Extra Attributes of a Maya Curve once mapped to a Traffic Locator

The default value of those properties is defined in the Default Road Attributes panel

Lane Width The width of a single lane (usually around 3 meters)
Inner Separation The separation between the right and left lanes which are the closest to the middle of the road
Forward Lane Count The lane count in the curve forward definition order
Backward Lane Count The lane count in the curve backward definition order
Sample Count The curve is sampled to build each lane. The sample count influence the smoothness of orientation and fidelity to the original curve.
Sample Limit Speed limit on this road.

Crossing Attributes

Once the roads are defined, the crossings can be auto detected : when hitting "Autocompute Crossings", each road end will have its crossing, which will be shared with curves ending on the same position. There is a height detection limit, so that crossings can be stacked in height for different roads.

 
Lane Detection height While autocomputing the crossings, the lanes will share a crossing only if the height distance between the crossing and the lane end is lower than this attribute.
Min Timing Scale The minimum default timings scale for created crossings (to offset traffic lights). A random value is picked between min and max at creation time, but can be tweaked after.
Max Timing Scale The maximum default timings scale for created crossings (to offset traffic lights). A random value is picked between min and max at creation time, but can be tweaked after.
In Crossing Locators List of the crossings locators handled by this traffic locator
Crossing Sample Count While driving on a crossing, each entity will precompute a path from crossing entrance to crossing exit, made of "sample count - 1" segments. This will have an impact on the car orientation smoothness on this crossings.
Crossing Speed Ratio When driving on a crossing, the cars will limit their speed to a ratio of the lowest road speed limit connected to this crossing. by default, it limits speed to 0.5 times the slowest road speed.

Display Attributes

For debugging or understanding purpose, you may want to see the lanes as computed by the simulation. They are only available if a simulation has already run.

 
Draw Traffic Displays the lanes triangles and center line, and the crossing radii
Line width The line width to display curves
Locator Height The display offset height: this value can be increased to avoid Z fight artefacts, it does not change simulation