talker_qos
This file is ai generated. Do not edit this file directly. Instead, edit the node source code and run the generate-node-docs command to update this file.
Description
A ROS2 node that publishes string messages with configurable QoS (Quality of Service) settings. It demonstrates the difference between reliable and best-effort communication patterns for publishers.
Publishers
Topic:
/chatterType:
example_interfaces/msg/StringQoS: Configurable (reliable or best-effort sensor data profile)
Description: Publishes “Hello World” messages using specified QoS profile
Parameters
--reliable: Set QoS profile to reliable (default: False, uses best-effort sensor data profile)-n, --number_of_cycles: Number of sending attempts (default: 20)
Example Usage
# Run with default best-effort QoS
ros2 run demo_nodes_py talker_qos
# Run with reliable QoS
ros2 run demo_nodes_py talker_qos --reliable
# Run with reliable QoS and 50 cycles
ros2 run demo_nodes_py talker_qos --reliable -n 50
When using reliable QoS, the node will print:
[INFO] [talker_qos]: Reliable talker
[INFO] [talker_qos]: Publishing: "Hello World: 0"
...
When using best-effort QoS, the node will print:
[INFO] [talker_qos]: Best effort talker
[INFO] [talker_qos]: Publishing: "Hello World: 0"
...
To test QoS compatibility:
# Terminal 1: Run best-effort talker
ros2 run demo_nodes_py talker_qos
# Terminal 2: Run best-effort listener
ros2 run demo_nodes_py listener_qos