[πŸ€” ROS2?] /pal_play_presentation#

Caution

This documentation page has been auto-generated.

It may be missing some details.

/pal_play_presentation Quick Facts

Category

πŸ–₯️ Touchscreen

Message type

pal_presentation_msgs/action/PlayPresentation

Quick snippets#

Send a goal from the command-line#
$ ros2 action send_goal /pal_play_presentation pal_presentation_msgs/action/PlayPresentation # 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 pal_presentation_msgs.action import PlayPresentation

class PalPlayPresentationActionClient(Node):

    def __init__(self):
        super().__init__('pal_play_presentation_client')
        self._action_client = ActionClient(self, PlayPresentation, '/pal_play_presentation')

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

        # TODO: adapt to the action's parameters
        # check the pal_presentation_msgs/action/PlayPresentationGoal message
        # definition 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 = PalPlayPresentationActionClient()

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

    rclpy.spin_until_future_complete(action_client, future)

    rclpy.shutdown()