ROS2 is a distributed architecture using publisher/subscriber messaging between nodes.
ROS2 has taken a different approach in its messaging layer and now employs the industry standard called Data Distributed Services (DDS).
But, DDS is a middleware for communication, also support publisher/subscriber.
So, we can use DDS directly, why use ROS2?
DDS is a communication standard proposed by OMG. It's targeted market is more general, like military, air-traffic control, autonomous vehicles, medical devices .. There are few vendors providing enterprise and open source version as well but only few people or the market can decide their future works or design.
Anyone who want to adopt DDS to their product needs to begin from scratch.
ROS2 is more like an ecosystem. The leader of ROS2 - OSRF provide an ecosystem, documents and friendly framework for those who want to create their robotic application.
Anyone can submit their thoughts to the core design or provide their own contribution to the community.
Participant, topic, publisher, subscriber, datareader and datawriter
yes, DDS has publisher and subscriber. Moreover, it has participant, topic, publisher, subscriber, datawriter and datareader, they are called an entity in the DDS's data shared space.
Each entity owns different QoS attributes and affect how entity manage the data delivery or data lifecycle.
Participant controls the whole entities's creation, deletion, grouping. It has ability to know new entity join or leave.
Different participant is identified by the domain ID (integer).
Topic is like a target owning the QoS information, that datawriter and datareader can link to each other.
Publisher and subscriber control the data delivery and data availability to it's owned datareader and datawriter.
Publisher only can have multiple datawriter, and Subscriber only can have multiple datareader.
DataWriter is the data provider and DataReader is the data consumer. They need to have the same QoS to their target topic.
DDS Topic naming:
Unlink other pub/sub model, they don't heavily use slash /
, instead, they are object oriented.
naming space and nodes.
It's like the topic, but has the naming space.
ROS2 highly use naming space and slash /
. It has naming space start with /
. For example, /turtle/cmd_vel
, turtle is the naming space and cmd_vel is it's base name.
Simply the basic element which provide or consume data.
You can check the ros2 topic and service names for the ROS2 pub/sub naming design.
ROS2 is more focusing on the robotic application design, that eliminate the difficulty for composing the DDS complex pub/sub application.
To add a bit on what Stoogy already wrote:
ROS is much more than just the communication layer. It provides, for example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With