ROSTOPIC publish every 1 second a new data
Hey all,
I would like to publish a rostopic that countains a certain data every 1 second, and i would like that the data change in every publish. Maybe read from a text file and publish line by line every 1 second or publish the output from a math function ... How can i do that ? I'm only using a cmd like this (rostopic pub my_topic std_msgs/String "hello there") and i can't figure it out, i've being looking for a solution online but couldn't find it. Please help me.
Thank you.