How to exchange data between nodes?
I want to send data from one node to another. For example: One node is publishing data to the topic /mobile_base/commands/velocity
and other one is subscribed to /mobile_base/events/bumper
. Both the subscriber & publisher are working fine.
What I want to do is to make the robot move backward once the bumpers are pressed. I do not know how to send the event of bumper pressed to the other node.
The solution I thought was of using pipes or sockets or shared memory to exchange data between two nodes.
Is this the right approach? Or does ROS has a builtin method for that?
Thanks in Advance.