Skip to content

Traffic light

The drawings on this page use left-hand traffic, as in Japan: vehicles drive on the left side of the road, and a right turn crosses the opposing lane. For right-hand traffic, swap left and right. In the map drawings, a colored area is a Lanelet, and a line with dots is a Linestring and its points.


Requirements#

vm-04-01 Traffic light basics#

Detail of requirements #

When you create traffic lights in a vector map, meet the following requirements:

  • Road Lanelet (subtype:road). Quantity: one.
  • Traffic Light. Multiple instances possible.
    • Traffic light Linestring (type:traffic_light).
    • Traffic light bulbs Linestring (type:light_bulbs).
    • Stop line Linestring (type:stop_line).
  • Regulatory element for traffic lights (subtype:traffic_light). The road Lanelet refers to it. It refers to the traffic light (traffic_light with the role refers, light_bulbs with the role light_bulbs) and to the stop line (stop_line with the role ref_line). Quantity: one.

Refer to Web.Auto Documentation - Creation of a traffic light and a stop line for the method of creation in Vector Map Builder.

Refer to vm-04-02 and vm-04-03 for the specifications of traffic light and traffic light bulb objects.

Preferred vector map #

A road lanelet turns right at a T-junction. It refers to a traffic_light regulatory element. The regulatory element refers to the stop_line linestring as ref_line, to the traffic_light linestring as refers, and to the light_bulbs linestring as light_bulbs.Linestringtype: stop_lineLinestring (ID 11)type: light_bulbstraffic_light_id: 10Linestring (ID 10)type: traffic_lightLaneletsubtype: roadRegulatory elementsubtype: traffic_lightregulatory_elementref_linelight_bulbsrefers
The traffic_light Regulatory Element refers to the stop line, the traffic light, and its light bulbs.

If there is a crosswalk at the intersection, make the road Lanelet and the crosswalk Lanelet intersect and overlap.

A road lanelet turns right at a T-junction and overlaps a crosswalk lanelet. It refers to a traffic_light regulatory element. The regulatory element refers to the stop_line linestring as ref_line, to the traffic_light linestring as refers, and to the light_bulbs linestring as light_bulbs.Laneletsubtype: crosswalkLinestringtype: stop_lineLinestring (ID 11)type: light_bulbstraffic_light_id: 10Linestring (ID 10)type: traffic_lightLaneletsubtype: roadRegulatory elementsubtype: traffic_lightregulatory_elementref_linelight_bulbsrefers
The road Lanelet and the crosswalk Lanelet overlap.

vm-04-02 Traffic light position and size#

Detail of requirements #

Create traffic lights with Linestring.

  • type:traffic_light
  • subtype:red_yellow_green

Make the Linestring (from the start point to the end point) match the bottom edge of the traffic light. The start point is the left end, and the end point is the right end. Make sure that the 3D coordinates of the Linestring give the correct height of the traffic light above the ground.

Use tag:height for the size of the traffic light. For example, for 50 cm, write tag:height=0.5. This height is the size of the traffic light, not its position.

Supplemental information #

The map-based detector of the traffic light recognition skips traffic light Linestrings that have no subtype or that have subtype:solid. The camera then does not detect these lights. Autoware does not read other subtype values, such as red_yellow_green.

Preferred vector map #

Front view of a horizontal and a vertical traffic light. The traffic_light linestring runs along the bottom edge from the left end (point 1) to the right end (point 2). The subtype is red_yellow_green. The height tag gives the size of the light. The points have the real 3D position of the light.12heightgroundGive the pointstheir real 3D positionStart point: left endEnd point: right endLinestringpoints: 1-2type: traffic_lightsubtype: red_yellow_greenheight: 0.512heightLinestringpoints: 1-2type: traffic_lightsubtype: red_yellow_greenheight: 1.2
The traffic_light Linestring runs along the bottom edge of the light, and the height tag gives its size.

Incorrect vector map #

None in particular.


vm-04-03 Traffic light lamps#

Detail of requirements #

To let the system detect the color of traffic lights, create the color scheme and the arrangement of the lamps accurately as objects. Show the position of each lamp with a Point. For colored lamps, use the color tag for the color. For arrow lamps, use the arrow tag for the direction.

  • tag: color = red, yellow, green
  • tag: arrow = up, right, left, up_right, up_left

Create a Linestring from the Points of the lamps.

  • type: light_bulbs
  • tag: traffic_light_id = the ID of the traffic light Linestring (type:traffic_light)

Preferred vector map #

Two traffic lights with a red, a yellow, and a green lamp and a green right arrow lamp. A light_bulbs linestring connects points 1 to 4 at the centers of the lamps. Point 4 has the tags color green and arrow right.1234Linestringpoints: 1-4type: light_bulbsPoint 4color: greenarrow: right1234
The light_bulbs Linestring connects the centers of the lamps. Each Point has a color tag, and the arrow lamp also has an arrow tag.

The order of the Points of the lamps can be 1→2→3→4 or 4→3→2→1. Both are acceptable.

Supplemental information #

The map-based signal filter of autoware_traffic_light_multi_camera_fusion reads these tags. It also accepts the color white and the arrows down, down_left, down_right, and cross. It ignores a Point without a color tag.

Incorrect vector map #

None in particular.