A publisher in ROS 2 is able to broadcast messages to the subscribers.

This source file in Python publish messages

import sys
import rclpy
from rclpy.qos import qos_profile_default

def main(args=None):
    if args is None:
        args = sys.argv


    from std_msgs.msg import Float32
    # create a node called talker_float_py
    node = rclpy.create_node('talker_float_py')
    # create a publisher with the QoS default profile
    chatter_pub = node.create_publisher(Float32, 'chatter', qos_profile_default)
    # set to the msg variable the data type
    msg = Float32()
    # set the message
    i = 1 = float(i)
    # print the published message
    print('Publishing: "{0}"'.format(
    # publish the message

if __name__ == '__main__':

Do you need more computing capacity? Stay tuned