0
$\begingroup$

Rosanswers logo

This is a simple question about the ROS communication between nodes.

Only the node that advertises a topic can publish to it?


Originally posted by Median on ROS Answers with karma: 23 on 2013-05-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Yes and no :-)

A node needs to create a publisher, which advertises a topic, in order to send anything. So "yes": a node can't send anything on a topic if it doesn't advertise it.

However, multiple nodes can advertise the same topic and publish on it (as well as multiple subscribers can listen). So "no": not only the first node that advertises a topic is allowed to publish on a given topic name.


Originally posted by Philip with karma: 990 on 2013-05-26

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Median on 2013-05-26:
What that means is that multiple nodes may advertise the same ROS topic, is that right?

Comment by Philip on 2013-05-26:
Correct! Updated my answer to explicitly state that.

$\endgroup$

Your Answer

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