Assembly - Traffic Light
Assembly - Traffic Light#
This section describes the physical assembly and installation of traffic lights.
Traffic lights are crucial elements of modern cities as city dwellers rely on them to have well-organized traffic. In Duckietown, traffic lights serve the same purpose.
Traffic lights can be used as centralized coordinators of traffic at three or four way intersections in Duckietown, or as elements of a Duckietown Autolab watchtower network.
For Duckiebots to know traffic lights are governing a certain intersection, appropriate signage must be placed at the intersection (traffic light traffic sign instead of stop sign).
Hardware wise, traffic lights are essentially “Duckiebots without wheels”, and a beautiful, different chassis.
They are composed of two supports connected by an overhanging tube.
They are intended to be placed on the diagonal direction of an intersection.
One of the supports is equipped with the computational stack and an overseeing camera.
For traffic lights of the latest configuration, please refer to this for the assembly instructions.
For legacy build, the assembly instructions for configurations prior to
TL21can be found in
SD-card Image Preparation#
Even at software level, traffic lights are essentially Duckiebots without wheels. In initializing the SD-card of your traffic light, follow the instructions here, with the extra step of using the option
Also, Wi-Fi configuration for traffic lights by default is not set. You can add it using the
--wifi option as specified in the instructions.
An example flashing command for a Wi-Fi connected traffic light can be:
dts init_sd_card --hostname watchtower![XX] --country ![COUNTRY] --type traffic_light --configuration TL21
For Autolab users: since traffic lights will work as watchtowers adopt the convention:
hostname : `watchtowerXX`
XX are, e.g., increasing numbers.
However, if you just want to use it as a traffic light, use the traffic light setup:
The default username and password are all the same:
For Autolab users, do not change the username and password.
Launch Traffic Lights#
By choosing the
robot_type to be
traffic_light, the blinking behaviour should happen as soon as you boot your device.
If you need to manually restart the behaviour inside the
duckiebot-interface container, you can restart the traffic light behaviour by running, inside the container:
roslaunch duckiebot_interface all_drivers.launch veh:=![NAME] robot_type:=traffic_light