|
Python YASMIN (Yet Another State MachINe)
|


Public Member Functions | |
| None | __init__ (self, Type msg_type, str topic_name, Callable create_message_handler, Union[QoSProfile, int] qos=10, CallbackGroup callback_group=None, Node node=None) |
| str | execute (self, Blackboard blackboard) |
Protected Attributes | |
| Callable[[Blackboard], Any] | _create_message_handler = create_message_handler |
| Callback handler to create messages. | |
| Node | _node = node |
| Shared pointer to the ROS 2 node. | |
| str | _topic_name = topic_name |
| Name of the topic to publish to. | |
| Publisher | _pub |
| Publisher to the ROS 2 topic. | |
Template class to publish ROS 2 messages.
This class provides functionality to publish to a ROS 2 topic
and create custom messages.
Attributes:
_node (Node): Shared pointer to the ROS 2 node.
_pub (Publisher): Publisher to the ROS 2 topic.
_topic_name (str): Name of the topic to publish to.
_create_message_handler (Callable[[Blackboard], Any]): Callback handler to create messages.
| None yasmin_ros.publisher_state.PublisherState.__init__ | ( | self, | |
| Type | msg_type, | ||
| str | topic_name, | ||
| Callable | create_message_handler, | ||
| Union[QoSProfile, int] | qos = 10, | ||
| CallbackGroup | callback_group = None, | ||
| Node | node = None ) |
Construct a new PublisherState with ROS 2 node and specific QoS.
Args:
msg_type (Type): The type of message to be published.
topic_name (str): The name of the topic to publish to.
create_message_handler (Callable[[Blackboard], Any]): A callback handler to create messages.
qos (Union[QoSProfile, int], optional): Quality of Service settings for the topic.
callback_group (CallbackGroup, optional): The callback group for the publisher.
node (Node, optional): The ROS 2 node to use. If None, a default node is created.
| str yasmin_ros.publisher_state.PublisherState.execute | ( | self, | |
| Blackboard | blackboard ) |
Execute the publishing operation.
Args:
blackboard (Blackboard): A shared pointer to the blackboard for data storage.
Returns:
str: A string outcome indicating the result of the publishing operation.
|
protected |
Callback handler to create messages.
|
protected |
Shared pointer to the ROS 2 node.
|
protected |
Publisher to the ROS 2 topic.
|
protected |
Name of the topic to publish to.