Skip to content

Make it Shine

Objective

Create your own implementation that makes all LEDs on the Foxy robot blink.

Task

Program the robot to:

  • Control all five LEDs:

    • Front left
    • Front right
    • Rear left
    • Rear right
    • Top
  • Make all LEDs switch on and off repeatedly.

  • Make the blinking clearly visible and consistent.

  • Keep all LEDs synchronized.

  • Stop the sequence automatically with all LEDs switched off.

You are responsible for designing, implementing, and testing your own solution. Choose the LED color and blinking pattern yourself, observe the result, and refine your implementation until it meets the requirements.

Start the simulatiom:

source ~/foxy_ws/install/setup.bash
ros2 launch foxy_bringup start.launch.py

Useful Hint

Inspect the System Overview, especially the LEDs section. The topics listed there may help you control and observe each LED.

Use the following topics to control the LEDs:

text
/[namespace]/led/front_left/set
/[namespace]/led/front_right/set
/[namespace]/led/rear_left/set

/[namespace]/led/rear_right/set
/[namespace]/led/top/set

These topics use the std_msgs/msg/ColorRGBA message type. Replace [namespace] with the namespace assigned to your robot, for example:

text
/foxy/led/front_left/set

The r, g, b, and a fields accept values from 0 to 100.

Decide for yourself how to coordinate the topics and create a reliable blinking sequence.

To test the publication use:

ros2 run rqt_publisher rqt_publisher

Blinking Requirement

The completed sequence must:

  • Blink all five LEDs together.
  • Complete at least five full on-and-off cycles.
  • Keep each LED visibly on and visibly off during every cycle.
  • Use a consistent blinking rhythm.
  • Finish with every LED switched off.

No LED may remain continuously on, remain continuously off, or blink out of synchronization with the others.

Success Criteria

The task is complete when:

  • All five LEDs participate in the sequence.
  • All LEDs display the selected color while switched on.
  • All LEDs switch fully off between flashes.
  • The LEDs blink together for at least five complete cycles.
  • The blinking pattern runs without manual correction.
  • The sequence stops automatically.
  • Every LED is switched off at the end.

Challenge

Develop the solution independently. Experiment with colors and timing, evaluate the result, and improve your implementation until all LEDs blink together reliably.