Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

ROS (1): [..] We have a distributed discovery mechanism [..]

not really. This is already one of the big differences between ROS 1 and 2: ROS 1 has a master, which is central by nature. It's also debatable whether querying the master is really 'discovery', as it functions like a DNS server ..

ROS (1): [..] We have a distributed discovery mechanism [..]

not really. This is already one of the big differences between ROS 1 and 2: ROS 1 has a master, which is central by nature. It's also debatable whether querying the master is really 'discovery', as it functions it's somewhat like a DNS server server ..

ROS (1): [..] We have a distributed discovery mechanism [..]

not really. This is already one of the big differences between ROS 1 and 2: ROS 1 has a master, which is central by nature. It's also debatable whether querying the master is really 'discovery', as it's somewhat like a DNS server ..

that returns information in answer to queries submitted to it by clients (it's XML-RPC after all).

ROS 2 does not have this, at all. All nodes are essentially peer-to-peer (barring any partitions and other such 'tricks'). That is a fundamental difference between the two.


Edit:

1 . according to most of the internet sources ROS is as well peer to peer.

You have to realise that p2p data exchange != p2p discovery. The former is possible without the latter. In ROS 1, nodes will ask the master where to find another node that publishes to a particular topic, then use that information to setup a direct connection to that node. The master is then not involved in the data exchange any more. See wiki/Master for more info about this.

But the master is always needed to figure out where other nodes are in ROS 1.

2 . what is the difference bw Distributed Discovery vs Centralised Discovery ?

Briefly: all peers discover each other VS central server keeps list of on-line nodes.

In the former case, every node has the inherent ability to find other nodes, without the help of a central authority. In the latter case, nodes must contact a central authority (ie: the master) to ask it for a list of nodes it knows about.

ROS 1 has a master, ROS 2 does not.

3 . Is ROS a middleware ?

A part of ROS 1 is certainly the middleware, but most people consider ROS to be much more. As described on ros.org/about-ros:

ROS is a flexible framework for writing robot software. It is a collection of tools, libraries, and conventions that aim to simplify the task of creating complex and robust robot behavior across a wide variety of robotic platforms.

The middleware is what makes it possible for those tools and packages to communicate easily. But ROS is definitely more than just the communication infrastructure.

if yes, what is the need to have DDS in ROS2 ?

Similar to ROS 1, part of ROS 2 needs a way for 'the rest' to be able to communicate efficiently. DDS fulfils that role in ROS 2 (ROS 1 uses a custom infrastructure, of which TCPROS is a part). I believe the ROS on DDS provides some insight into why DDS was considered and why it was eventually chosen.

ROS2 : ROS2 is built up on ROS but uses DDS as a middleware (that means a middleware(ROS) using another middleware (DDS)) for centralized discovery.

ROS 2 is not "built up on ROS (1)". Many of the things we now call "ROS 2" were designed and implemented (almost) from scratch.

uses DDS as a middleware [..] for centralized discovery

DDS participants by default will use a decentralised approach for discovering peers, and ROS 2 nodes are no exception, so this is a strange thing to state (if not incorrect).

My question is what is exactly the difference at this point i.e. distributed vs centralised

I don't think this question makes much sense at this point: there is nothing centralised about ROS 2 afaik. Or at least not in the parts that you're asking about. Centralised vs decentralised is also not one of the central themes in either ROS 1 or ROS 2.

what does it mean and the use of middleware (why do we need DDS as a middleware (not the advantages of DDS))

The article I linked to earlier might already answer this, so I won't go into this now. However I do believe part of the explanation of "why DDS" will always be based on the relative merits of DDS compared to the custom middleware in ROS 1.


Finally: the ROS 2 Design website was specifically created to answer the sort of questions that you've posted here. That doesn't mean that you can't post here on ROS Answers, but it might be worthwhile to spend some time reading the articles on that site.

ROS (1): [..] We have a distributed discovery mechanism [..]

not really. This is already one of the big differences between ROS 1 and 2: ROS 1 has a master, which is central by nature. It's also debatable whether querying the master is really 'discovery', as it's somewhat like a DNS server that returns information in answer to queries submitted to it by clients (it's XML-RPC after all).

ROS 2 does not have this, at all. All nodes are essentially peer-to-peer (barring any partitions and other such 'tricks'). That is a fundamental difference between the two.


Edit:

1 . according to most of the internet sources ROS is as well peer to peer.

You have to realise that p2p data exchange != p2p discovery. The former is possible without the latter. In ROS 1, nodes will ask the master where to find another node that publishes to a particular topic, then use that information to setup a direct connection to that node. The master is then not involved in the data exchange any more. See wiki/Master for more info about this.

But the master is always needed to figure out where other nodes are in ROS 1.

2 . what is the difference bw Distributed Discovery vs Centralised Discovery ?

Briefly: all peers discover each other VS central server keeps list of on-line nodes.

In the former case, every node has the inherent ability to find other nodes, without the help of a central authority. In the latter case, nodes must contact a central authority (ie: the master) to ask it for a list of nodes it knows about.

ROS 1 has a master, ROS 2 does not.

3 . Is ROS a middleware ?

A part of ROS 1 is certainly the middleware, but most people consider ROS to be much more. As described on ros.org/about-ros:

ROS is a flexible framework for writing robot software. It is a collection of tools, libraries, and conventions that aim to simplify the task of creating complex and robust robot behavior across a wide variety of robotic platforms.

The middleware is what makes it possible for those tools and packages to communicate easily. But ROS is definitely more than just the communication infrastructure.

if yes, what is the need to have DDS in ROS2 ?

Similar to ROS 1, part of ROS 2 needs a way for 'the rest' to be able to communicate efficiently. DDS fulfils that role in ROS 2 (ROS 1 uses a custom infrastructure, of which TCPROS is a part). I believe the ROS on DDS article provides some insight into why DDS was considered and why it was eventually chosen.

ROS2 : ROS2 is built up on ROS but uses DDS as a middleware (that means a middleware(ROS) using another middleware (DDS)) for centralized discovery.

ROS 2 is not "built up on ROS (1)". Many of the things we now call "ROS 2" were designed and implemented (almost) from scratch.

uses DDS as a middleware [..] for centralized discovery

DDS participants by default will use a decentralised approach for discovering peers, and ROS 2 nodes are no exception, so this is a strange thing to state (if not incorrect).

My question is what is exactly the difference at this point i.e. distributed vs centralised

I don't think this question makes much sense at this point: there is nothing centralised about ROS 2 afaik. Or at least not in the parts that you're asking about. Centralised vs decentralised is also not one of the central themes in either ROS 1 or ROS 2.

what does it mean and the use of middleware (why do we need DDS as a middleware (not the advantages of DDS))

The article I linked to earlier might already answer this, so I won't go into this now. However I do believe part of the explanation of "why DDS" will always be based on the relative merits of DDS compared to the custom middleware in ROS 1.


Finally: the ROS 2 Design website was specifically created to answer the sort of questions that you've posted here. That doesn't mean that you can't post here on ROS Answers, but it might be worthwhile to spend some time reading the articles on that site.

ROS (1): [..] We have a distributed discovery mechanism [..]

not really. This is already one of the big differences between ROS 1 and 2: ROS 1 has a master, which is central by nature. It's also debatable whether querying the master is really 'discovery', as it's somewhat like a DNS server that returns information in answer to queries submitted to it by clients (it's XML-RPC after all).

ROS 2 does not have this, at all. All nodes are essentially peer-to-peer (barring any partitions and other such 'tricks'). That is a fundamental difference between the two.


Edit:

1 . according to most of the internet sources ROS is as well peer to peer.

You have to realise that p2p data exchange != p2p discovery. The former is possible without the latter. In ROS 1, nodes will ask the master where to find another node that publishes to a particular topic, then use that information to setup a direct connection to that node. The master is then not involved in the data exchange any more. See wiki/Master for more info about this.

But the master is always needed to figure out where other nodes are in ROS 1.

2 . what is the difference bw Distributed Discovery vs Centralised Discovery ?

Briefly: all peers discover each other VS central server keeps list of on-line nodes.

In the former case, every node has the inherent ability to find other nodes, without the help of a central authority. In the latter case, nodes must contact a central authority (ie: the master) to ask it for a list of nodes it knows about.

ROS 1 has a master, ROS 2 does not.

3 . Is ROS a middleware ?

A part of ROS 1 is certainly the middleware, but most people consider ROS to be much more. As described on ros.org/about-ros:

ROS is a flexible framework for writing robot software. It is a collection of tools, libraries, and conventions that aim to simplify the task of creating complex and robust robot behavior across a wide variety of robotic platforms.

The middleware is what makes it possible for those tools and packages to communicate easily. But ROS is definitely more than just the communication infrastructure.

if yes, what is the need to have DDS in ROS2 ?

Similar to ROS 1, part of ROS 2 needs a way for 'the rest' to be able to communicate efficiently. DDS fulfils that role in ROS 2 (ROS 1 uses a custom infrastructure, of which TCPROS is a part). I believe the ROS on DDS article provides some insight into why DDS was considered and why it was eventually chosen.

ROS2 : ROS2 is built up on ROS but uses DDS as a middleware (that means a middleware(ROS) using another middleware (DDS)) for centralized discovery.

ROS 2 is not "built up on ROS (1)". Many of the things we now call "ROS 2" were designed and implemented (almost) from scratch.scratch. Some parts were ported (ie: ROS 1 infrastructure removed, ROS 2 equivalents introduced). But overal only a small part of ROS 2 can be said to have any relation to ROS 1.

uses DDS as a middleware [..] for centralized discovery

DDS participants by default will use a decentralised approach for discovering peers, and ROS 2 nodes are no exception, so this is a strange thing to state (if not incorrect).

My question is what is exactly the difference at this point i.e. distributed vs centralised

I don't think this question makes much sense at this point: there is nothing centralised about ROS 2 afaik. Or at least not in the parts that you're asking about. Centralised vs decentralised is also not one of the central themes in either ROS 1 or ROS 2.

what does it mean and the use of middleware (why do we need DDS as a middleware (not the advantages of DDS))

The article I linked to earlier might already answer this, so I won't go into this now. However I do believe part of the explanation of "why DDS" will always be based on the relative merits of DDS compared to the custom middleware in ROS 1.


Finally: the ROS 2 Design website was specifically created to answer the sort of questions that you've posted here. That doesn't mean that you can't post here on ROS Answers, but it might be worthwhile to spend some time reading the articles on that site.