How to create subscriber in a publisher
I want to create a node that will publish a topic but before that subscribes to listen to another topic. I want to rostopic pub /my_topic_cg std_gs/String "GO" ,and when the listener gets the "GO" published another topic which would print "The race has started" for example. How can i manage this? ive looked into it in the tutorial but could not get a answer. Also can i publish a number instead of a string, how can I do it in cpp?