ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ROSTopics: Only advertiser can publish? [closed]

asked 2013-05-26 06:15:27 -0600

Median gravatar image

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

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

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Philip
close date 2013-05-26 08:43:26

1 Answer

Sort by ยป oldest newest most voted

answered 2013-05-26 06:26:48 -0600

Philip gravatar image

updated 2013-05-26 07:58:10 -0600

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.

edit flag offensive delete link more


What that means is that multiple nodes may advertise the same ROS topic, is that right?

Median gravatar image Median  ( 2013-05-26 07:04:35 -0600 )edit

Correct! Updated my answer to explicitly state that.

Philip gravatar image Philip  ( 2013-05-26 07:58:34 -0600 )edit

Question Tools


Asked: 2013-05-26 06:15:27 -0600

Seen: 348 times

Last updated: May 26 '13