Assembly - Traffic Light DT18-TL#

What you will need

What you will get

  • Traffic light in configuration DT18-TL.

Traffic lights can be used to coordinate traffic at three or four way intersections in Duckietown. Hardware wise, traffic lights are essentially “Duckiebots without wheels”, and a beautiful different chassis.

Attention

For traffic lights to be recognized by Duckiebots, appropriate signage must be placed at intersections (traffic light traffic sign instead of stop sign).

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

Overview#

Traffic lights are crucial parts in modern cities. We rely on them to have well-organized traffic. In Duckietown, traffic lights serve the same purpose.

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.

Traffic lights can double-up as watchtowers when upgrading a Duckietown to Duckietown Autolab.

Assembly of the traffic light parts#

This section shows how to assemble the components from the laser cut traffic light parts.

Warning

The small parts with the hole in the middle, i.e., the ones in the left of Fig. 57, are not all equal. Some have a round hole, others a polygonal hole. Double check you are using the right ones in the process (compare with the pics).

All parts should be glued together as showed in the pictures for enhanced structural stability.

Tube holder with big ground plate#

../../_images/G-1.jpg

Fig. 57 Traffic light parts#

../../_images/G-2.jpg
../../_images/G-3.jpg
../../_images/G-4.jpg
../../_images/G-5.jpg
../../_images/G-6.jpg
../../_images/G-7.jpg
../../_images/G-8.jpg

Fig. 58 :width: 80% :name: fig:G-8#

Tube holder with small ground plate#

../../_images/G2-1.jpg
../../_images/G2-2.jpg
../../_images/G2-3.jpg
../../_images/G2-4.jpg
../../_images/G2-5.jpg
../../_images/G2-6.jpg
../../_images/G2-7.jpg

Traffic light LED housing#

../../_images/L-1.jpg
../../_images/L-2.jpg
../../_images/L-3.jpg
../../_images/L-4.jpg
../../_images/L-5.jpg
../../_images/L-6.jpg

Ground module cover#

../../_images/C-01.jpg
../../_images/C-02.jpg

Joint module#

../../_images/J-1.jpg
../../_images/J-2.jpg
../../_images/J-3.jpg
../../_images/J-4.jpg
../../_images/J-5.jpg
../../_images/J-6.jpg
../../_images/J-7.jpg
../../_images/J-8.jpg

Components of the traffic light#

Now that you have assembled the traffic light chassis, you are ready to add the electronics.

../../_images/TL-01.jpg

Fig. 59 Parts of a traffic light needed to complete these instructions.#

These components are needed for one traffic light:

  • Tube holder with big ground plate

  • Tube holder with small ground plate (Duckietown)

  • Cable with soldered LED strip

  • Joint module (2x)

  • Traffic light LED housing

  • Raspberry Pi base plate

  • Ground module cover (Duckietown)

  • Camera mount

  • Camera mount cover

  • Short tube

  • Medium tube (2x)

  • Long tube with hole at the side

  • Raspberry Pi

  • Raspberry Pi shield

  • M2.5x10 MF Nylon spacers (8x)

  • M2.5x8 Nylon screws (4x)

  • SD card with Duckietown software

  • USB cable

  • Ethernet cable

Additionally, the traffic light structure can host:

  • Traffic sign stands (4x)

  • Traffic sign stand supports (4x).

Assembling the Traffic Light#

Put the LEDs into the housing#

Bend the LED strip at an angle to reduce the chance that the exposed soldered wires short. The exposed part of the wires should not be in contact, especially when turning on the power.

Warning

The actual traffic light in your hands might vary slightly from the pictures above. In particular, the electrical cables could have different colors or be soldered in different positions. Take note of what each color cable is soldered to, as same will go go with same on the other end.

../../_images/L-0.png

Fig. 60 Bent LED strip cable#

../../_images/TL-02.jpg

Fig. 61 Cable with soldered LED strip LED housing#

../../_images/TL-03.jpg

Carefully push the LEDs into the designated holes.

../../_images/TL-05.jpg
../../_images/TL-04.jpg

Fix the LEDs with some tape, don’t use glue.

../../_images/TL-06.jpg

Connect the tubes#

../../_images/TL-07.jpg

Fig. 62 Medium tubes and LED housing.#

Stick the tubes into the sides of the LED housing and pull the cable through one side.

../../_images/TL-08.jpg

Add the joint modules on the side of the tube without the cable.

../../_images/TL-09.jpg
../../_images/TL-10.jpg

Mount the other joint module on the long tube, such that it aligns with the hole.

You can add additional tape under the joint modules to prevent them to slip down.

../../_images/H-1.png

Fig. 63 Fully assembled traffic light.#

../../_images/TL-11.jpg
../../_images/TL-12.jpg
../../_images/TL-13.jpg

Pull the cable through longer tube and stick the tube into the joint module.

../../_images/TL-14.jpg
../../_images/TL-15.jpg

Put the tubes into the tube holders.

../../_images/TL-16.jpg
../../_images/TL-17.jpg

Connect the Raspberry Pi#

Use the spacers and the screws to mount the Raspberry Pi on the Raspberry Pi ground plate as shown in Fig. 64.

../../_images/TL-18.jpg

Fig. 64 Raspberry Pi mounted on ground plate#

Plug the shield on top of the Raspberry Pi.
Insert the SD card.
Connect the LED cable to the shield.

../../_images/STEP_18_cropped.png

Connect the Ethernet cable.
Connect the USB cable.

If done correctly the LEDs should be on.

../../_images/TL-20.jpg

Close the ground module with the case.

../../_images/TL-21.jpg
../../_images/TL-22.jpg

Add traffic sign stands#

../../_images/TL-23.jpg
../../_images/TL-24.jpg

Fully assembled traffic light#

../../_images/TL-25.jpg

Fig. 65 Fully assembled traffic light.#

Place the traffic light at an intersection such that the LEDs are exactly in the middle and are facing each incoming lane perpendicularly.

You can verify the position is correct by verifying that Duckiebots at the red stop lines can see only one light blinking, and no reflections of LEDs facing other directions.

You can finally use the provided double-sided tape pads to fix the traffic light to the tiles.

SD-card image Preparation#

At hardware and software level, traffic lights are Duckiebots without wheels. In initializing the SD-card of your traffic light, follow the instructions here, with the extra step of using the option --type traffic_light. Also, WiFi configuration for traffic lights by default is not set. You can add it using the --wifi option as specified int 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 TL19 --wifi duckietown:quackquack
  • For Autolab users: since traffic lights are coupled to watchtowers, please use the watchtower setup:

    • hostname : watchtowerXX

  • However, if you just want to use it as a traffic light, use the trafficlight setup:

    • hostname : trafficlightXX

  • The default username and password are all the same:

    • Username: duckie

    • Password: quackquack

Warning

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