ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Some googled answer looks like may solve your problem
https://answers.ros.org/question/229894/publisher-and-subscriber-using-same-node/
https://answers.ros.org/question/10797/subscribe-and-publish-in-the-same-class/