Skill do_led_effect

Perform light effects using the robot’s LEDs.

Input parameters

  • groups string array, default: []

    The LED groups to use for the effect (eg ear_leds, back_leds). An empty list means the effect is applied to all LED groups.

  • effect string, default: solid_color

    The selected LED effect, one of:

    • solid_color: Applies up to two solid colors side-by-side to the specified LED groups, with the primary color applied to the first partition of the LED group, and the secondary color applied to the second partition.

    • rainbow: Lights the LED groups in a rainbow effect, which moves through the LED group cyclically.

    • fade: Fades between two colors cyclically. It starts with the primary color, fades to the secondary color over the first partition, then fades back to the primary color over the second partition.

    • blink: Blinks the LED groups between two colors. It applies a solid primary color in the first partition of a cycle, then applies a solid secondary color in the second partition.

    • flow: Displays a loading-like effect, with the partition ratio of LEDs colored with the primary color moving through the LED group, at a constant speed such to traverse the entire LED group in one cycle, and the secondary color filling the rest of the LED group.

  • duration float, default: 0.0

    Total duration of the effect before the action is completed. A null or negative number will mean the action continues indefinitely until canceled.

  • color interaction_skills/msg/LedColor

    The primary color for the effect. Ignored for the rainbow effect.

  • secondary_color interaction_skills/msg/LedColor

    The secondary color for the effect. Ignored for the rainbow effect.

  • cycle float, default: 1.0

    Duration in seconds of a single cycle of the effect. Ignored for the solid_color effect.

  • partition float, default: 1.0

    For effects with two phases in a cycle (or two spatially separated partitions as in solid_color), the proportion of the first one ([0., 1.]) Ignored for the rainbow effect.

Quick snippets

Call the skill from the command-line

$ ros2 action send_goal /skill/do_led_effect interaction_skills/action/DoLedEffect # then press Tab to complete the message prototype

See also