How to make a python listener&talker on the same node?
Hi, I would like to make a listener/talker in python. I already looked at the tutorials. However, these examples implement two separated codes, a listener and a talker, and I would like to implement them on the same node:
- Some external node (TalkerA) shouts some mesagges through a topic TopicA (NO PROBLEM, it's a simple talker).
- A second node (ListenerTalker) subscribes to TopicA and shouts something in TopicB.
For example, TalkerA shouts "Hello", and ListenerTalker listens TopicA and shouts "HelloWorld"...
How can I do this? It's a simple question, but it's not clear for me. Cheers!
Do you want to do something else with your TopicA? Or is this data useful for another node? I'm asking because this looks a little bit like a bad design.