/skill/do_led_effect

Caution

This documentation page has been auto-generated.

It may be missing some details.

/skill/do_led_effect Quick Facts

Category

😄 Interaction

Message type

interaction_skills/action/DoLedEffect

Control the robot’s LED and perform LED effects. See do_led_effect for details.

Quick snippets

Send a goal from the command-line
$ ros2 action send_goal /skill/do_led_effect interaction_skills/action/DoLedEffect # press Tab to complete the message prototype

How to use in your code

Call the action from a Python script
#!/usr/bin/env python

import rclpy
from rclpy.action import ActionClient
from rclpy.node import Node

from interaction_skills.action import DoLedEffect

class DoLedEffectActionClient(Node):

    def __init__(self):
        super().__init__('skill_do_led_effect_client')
        self._action_client = ActionClient(self, DoLedEffect, '/skill/do_led_effect')

    def send_goal(self, a, b):
        goal_msg = DoLedEffect.Goal()

        # TODO: adapt to the action's parameters
        # check https://github.com/pal-robotics/interaction_skills/tree/main/action/DoLedEffect.action
        # for the possible goal parameters
        # goal_msg.a = a
        # goal_msg.b = b

        self._action_client.wait_for_server()

        return self._action_client.send_goal_async(goal_msg)

if __name__ == '__main__':
    rclpy.init(args=args)

    action_client = DoLedEffectActionClient()

    # TODO: adapt to your action's parameters
    future = action_client.send_goal(a, b)

    rclpy.spin_until_future_complete(action_client, future)

    rclpy.shutdown()