0
$\begingroup$

Rosanswers logo

I refer to this ROS Concepts page

Under "topics", It says that

In general, publishers and subscribers are not aware of each others' existence. The idea is to decouple the production of information from its consumption.

BUT it also says that

Nodes connect to other nodes directly; the Master only provides lookup information, much like a DNS server. Nodes that subscribe to a topic will request connections from nodes that publish that topic, and will establish that connection over an agreed upon connection protocol.

I don't understand. If publisher -subscribers not aware of each other existence, how come they connect to each other directly. So confused.

Doesn't it say that the idea is to decouple the production of info and its consumption? Connecting node to node directly doesn't sound like decoupling though.

Please explain, and elaborate.Thanks


Originally posted by alienmon on ROS Answers with karma: 582 on 2016-08-07

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Basically,

The publishers will publish their messages in the topics (a Topic can be seen as a Facebook Page)

The subscribers (Facebook Page Followers) can read the status of the publishers by reading information directly from the topics (so they connect to Facebook Pages of the publisher directly and read the status)

If the topic is shutdown, the subscribers can't read the messages (in other words if the publisher desactivate his Facebook Page, you will not be able read the messages, even if the Facebook Server which is the ROS Master is still running).

But, when you connect to the Facebook Page of the publisher, he don't know that you're reading his status. And we assume that you can not write a comment. So, There's not direct communication between you (the subscriber) and the publisher, because the communication in one-way only.

In other words, the publisher writes messages in the topic, the subscriber reads the messages from the topic. And no one cares about the location of the other or his address.

But all of this is just an abstraction: in the low level communication of the machine, the nodes need to know all the network information the nodes to communicate between them. But, the subscribers don't want to bother themselves with the IP adresses and ports, and that's why, they contact the ROS Master which will redirect the messages to the correct node.


Originally posted by Horse-man with karma: 229 on 2016-08-07

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$
0
$\begingroup$

Rosanswers logo

I think this is a duplicate of ROS Nodes and topics - are nodes really decoupled?


Originally posted by gvdhoorn with karma: 86574 on 2016-08-08

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

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