0
$\begingroup$

Rosanswers logo

hello, i am tying to create two nodes-two topics,in which 1.node1 is publishing in topic1 and node2 is subscribing to topic1. 2.node2 is publishing in topic2 and node1 is subscribing to topic2. can anybody give some clue/hints


Originally posted by muin028 on ROS Answers with karma: 13 on 2012-07-27

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

It looks the same as any simple pub/sub pair, only with both roles included in both nodes. They are basically the same, except for the topic names they subscribe. (With remapping, they could even be identical.)


Originally posted by joq with karma: 25443 on 2012-07-27

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

You'll need to be a little more specific... there are many tutorials for subscribers and publishers. You are asking for both together.

It is not good practice to publish and subscribe to the same topic inside a node... You have the data available, so just pass the data to whatever processing you would to with a subscriber; however, if you want the data to be read from another node to do processing, you will need to make a second executable. If you need specific instructions, please update your question to be more specific for the setup you desire.


Originally posted by allenh1 with karma: 3055 on 2012-07-27

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by joq on 2012-07-27:
The question is for two nodes that each publish on separate topics, while subscribing to the other's topic. That is useful and legitimate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.