import time

import roslibpy

client = roslibpy.Ros(host="0.0.0.0", port=6969)
client.run()

talker = roslibpy.Topic(client, "/chatter", "std_msgs/String")

while client.is_connected:
    talker.publish(roslibpy.Message({"data": "Hello World!"}))
    print("Sending message...")
    time.sleep(1)

talker.unadvertise()

client.terminate()
