Operations - LED control (Make it Shine)#

What you will need

What you will get

  • Seeing images as the Duckiebot sees them

  • Knowledge on the Duckietown image viewer

Duckiebots have four LEDs, positioned similarly to the head and tail lights on a car. This section describes how control the LEDs on your Duckiebot through the LED Controller.

../../_images/leds_layout.png

Fig. 29 A Duckiebot with the LEDs shining white (left) and a diagram with arrows indicating the front and back LEDs (right).#

Introduction to the use of LEDs on Duckiebots#

LEDs are more than just lights. As proper actuators on a Duckiebot, they can be used for many purposes, including but not limited to:

  • Indicating what mode or mission the Duckiebot is running.

  • Communicating state changes in the controller.

  • Signaling upcoming turns or other navigational plans.

  • Expressing character and personality.

  • Lighting the driving environment.

An easy way to control your Duckiebot’s LEDs is by using the LED Controller.

The Duckietown GUI for LED control

Fig. 30 The LED Controller interface is a simple way for controlling color and intensity of the Duckiebot’s LEDs.#

To open the LED Controller, run:

dts duckiebot led_control DUCKIEBOT_NAME

To control your Duckiebot’s LEDs, use the buttons and sliders to change their colors and intensities, respectively.

Note the keys in the table below.

Key

Function

R

Refresh the window

T

Open the Debug Console

Note

The color dropper tool is not operational yet.

Troubleshooting#

Troubleshooting

SYMPTOM

I can see messages being sent to my Duckiebot when looking at the DUCKIEBOT_NAME/actuator/lights/base/pattern DTPS topic, after following Duckietown Postal Service (DTPS), but the LEDs do not update and the Components page of the Dashboard (opened by running dts duckiebot dashboard DUCKIEBOT_NAME --page robot/components) shows a red alert for the HUT.

RESOLUTION

If you have a HUT v3.1, follow Debug - Re-flash HUT.

Troubleshooting

SYMPTOM

My Duckiebot’s LEDs do not update and I cannot see messages being sent to my Duckiebot when looking at the DUCKIEBOT_NAME/actuator/lights/base/pattern DTPS topic, after following Duckietown Postal Service (DTPS).

RESOLUTION

Reach out for help: How to get help in Duckietown

Troubleshooting

SYMPTOM

I have re-flashed the HUT but the LEDs still do not update. Additionally, the ToF sensor and front bumper are not detected on the Components page of the Dashboard (opened by running dts duckiebot dashboard DUCKIEBOT_NAME --page robot/components). I may also be having issues with the screen.

RESOLUTION

Disconnect the ToF sensor from the front bumper and use the long I2C cable, that originally connected the front bumper to the HUT, to connect the ToF sensor directly to that same HUT port. Finally, reboot your Duckiebot. This procedure bypasses a known multiplexer issue on some front bumpers that can cause other issues with the HUT.

Troubleshooting

SYMPTOM

I have connected the ToF sensor directly to the same HUT port that the front bumper was originally connected to and rebooted my Duckiebot but the LEDs still do not update.

RESOLUTION

Make sure that the duckiebot-interface container is running by checking the Portainer page of the Dashboard (opened by running dts duckiebot dashboard DUCKIEBOT_NAME --page portainer) or by running:

docker -H DUCKIEBOT_NAME.local ps

The exact name of the container will depend on your Duckiebot’s version. If you do not see the duckiebot-interface container, update your Duckiebot by running:

dts duckiebot update DUCKIEBOT_NAME