Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 4

How to create subscriber in a publisher

$
0
0
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?

Viewing all articles
Browse latest Browse all 4

Trending Articles





<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>