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

ROS Concept

asked 2016-08-07 21:45:01 -0600

alienmon gravatar image

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-08-07 23:56:20 -0600

Horse-man gravatar image

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.

edit flag offensive delete link more
1

answered 2016-08-08 11:45:29 -0600

gvdhoorn gravatar image
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-08-07 21:45:01 -0600

Seen: 202 times

Last updated: Aug 08 '16