Assembly - Traffic Light#

What you will need

What you will get

  • An assembled traffic light in configuration DT21-TL (latest) or previous legacy versions.

This section describes the physical assembly and installation of traffic lights.

Overview#

Traffic lights are crucial elements of modern cities, and in Duckietown, they play a similar role by ensuring well-organized traffic.

They can serve as:

  1. Centralized coordinators of traffic at 3- or 4-way intersections in Duckietown.

  2. Components of a Duckietown Autolab watchtower network.

Attention

For Duckiebots to recognize traffic lights governing a specific intersection, appropriate signage must be placed (traffic light traffic sign instead of a stop sign).

  • Hardware Design: Traffic lights are “Duckiebots without wheels,” housed in a distinct chassis.

  • Structure: They consist of two supports connected by an overhanging tube, with one support containing the computational stack and an overseeing camera.

  • Placement: Traffic lights are positioned diagonally at intersections.

Hardware Assembly#

SD-card Image Preparation#

At the software level, traffic lights function similarly to Duckiebots. When initializing the SD-card, follow the instructions here, ensuring you use the --type traffic_light option.

Wi-Fi configuration for traffic lights is not set by default. To enable it, use the --wifi option as described in the instructions.

Example command for a Wi-Fi connected traffic light:

dts init_sd_card --hostname watchtowerXX --country COUNTRY --type traffic_light --configuration TL21

Note

For Autolab users: Use the convention hostname: watchtowerXX, where XX are incremental numbers.

  • For standard traffic light setup, use:

    • hostname: trafficlightXX

  • Default login credentials:

    • Username: duckie

    • Password: quackquack

Warning

For Autolab users, do not change the username and password.

Launch Traffic Lights#

By setting the robot_type to traffic_light, blinking behavior will start automatically on boot.

To restart the traffic light behavior manually, run the following inside the duckiebot-interface container:

roslaunch duckiebot_interface all_drivers.launch veh:=NAME robot_type:=traffic_light