当前位置:网站首页>ROS2+DDS+RTPS
ROS2+DDS+RTPS
2022-06-26 00:35:00 【zhangrelay】
安装:
[email protected]:~$ sudo apt install ros-humble-rmw-fastrtps-cpp
[sudo] password for zhangrelay:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ros-humble-rmw-fastrtps-cpp is already the newest version (6.2.1-2jammy.20220520.012804).
ros-humble-rmw-fastrtps-cpp set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
支持的RMW:
ros-humble-rmw-connextdds ros-humble-rmw-fastrtps-dynamic-cpp
ros-humble-rmw-connextdds-common ros-humble-rmw-fastrtps-dynamic-cpp-dbgsym
ros-humble-rmw-connextdds-common-dbgsym ros-humble-rmw-fastrtps-shared-cpp
ros-humble-rmw-connextdds-dbgsym ros-humble-rmw-fastrtps-shared-cpp-dbgsym
ros-humble-rmw-cyclonedds-cpp ros-humble-rmw-gurumdds-cpp
ros-humble-rmw-cyclonedds-cpp-dbgsym ros-humble-rmw-gurumdds-cpp-dbgsym
ros-humble-rmw-dbgsym ros-humble-rmw-gurumdds-shared-cpp
ros-humble-rmw-dds-common ros-humble-rmw-gurumdds-shared-cpp-dbgsym
ros-humble-rmw-dds-common-dbgsym ros-humble-rmw-implementation
ros-humble-rmw-fastrtps-cpp ros-humble-rmw-implementation-cmake
ros-humble-rmw-fastrtps-cpp-dbgsym ros-humble-rmw-implementation-dbgsym1.1 什么是 DDS?
数据分发服务 (DDS) 是一种以数据为中心的通信协议,用于分布式软件应用程序通信。它描述了支持数据提供者和数据消费者之间通信的通信应用程序编程接口 (API) 和通信语义。
由于它是一个以数据为中心的发布订阅 (DCPS) 模型,因此在其实现中定义了三个关键应用实体:发布实体,定义信息生成对象及其属性;订阅实体,它定义了信息消费对象及其属性;和配置实体,定义作为主题传输的信息类型,并使用其服务质量 (QoS) 属性创建发布者和订阅者,确保上述实体的正确性能。
DDS 使用 QoS 来定义 DDS 实体的行为特征。 QoS 由单独的 QoS 策略(源自 QoSPolicy 的类型的对象)组成。这些在政策中有所描述。
1.1.1 DCPS 概念模型
在 DCPS 模型中,为开发通信应用系统定义了四个基本要素。
发布者。它是负责创建和配置其实现的 DataWriters 的 DCPS 实体。 DataWriter 是负责实际发布消息的实体。每个人都有一个分配的主题,在该主题下发布消息。有关详细信息,请参阅发布者。
订阅者。它是 DCPS 实体,负责接收在其订阅的主题下发布的数据。它为一个或多个 DataReader 对象提供服务,这些对象负责将新数据的可用性传达给应用程序。有关详细信息,请参阅订阅者。
主题。它是绑定发布和订阅的实体。它在 DDS 域中是唯一的。通过TopicDescription,它允许发布和订阅数据类型的统一。有关详细信息,请参阅主题。
域。这是用于链接所有发布者和订阅者的概念,属于一个或多个应用程序,它们在不同主题下交换数据。这些参与域的单个应用程序称为 DomainParticipant。 DDS 域由域 ID 标识。 DomainParticipant 定义域 ID 以指定它所属的 DDS 域。具有不同 ID 的两个 DomainParticipants 不知道彼此在网络中的存在。因此,可以创建多个通信通道。这适用于涉及多个DDS应用程序的场景,它们各自的DomainParticipants相互通信,但这些应用程序不得干扰。 DomainParticipant 充当其他 DCPS 实体的容器,充当发布者、订阅者和主题实体的工厂,并在域中提供管理服务。有关详细信息,请参阅域。

1.2 什么是 RTPS?
为支持 DDS 应用程序而开发的实时发布订阅 (RTPS) 协议是一种发布订阅通信中间件,它通过 UDP/IP 等尽力传输传输。 此外,Fast DDS 还支持 TCP 和共享内存 (SHM) 传输。
它旨在支持单播和多播通信。
在继承自 DDS 的 RTPS 顶部,可以找到域,它定义了一个单独的通信平面。 几个域可以同时独立地共存。 一个域包含任意数量的 RTPSParticipant,即能够发送和接收数据的元素。 为此,RTPSParticipants 使用他们的端点:
RTPSWriter:能够发送数据的端点。
RTPSReader:能够接收数据的端点。
RTPSParticipant 可以有任意数量的写入器和读取器端点。

通信围绕主题,主题定义和标记正在交换的数据。主题不属于特定参与者。参与者通过 RTPSWriters 对主题下发布的数据进行更改,并通过 RTPSReaders 接收与其订阅的主题相关联的数据。通信单元称为 Change,它表示在 Topic 下写入的数据的更新。 RTPSReaders/RTPSWriters 在其历史记录中注册这些更改,历史记录是一种用作最近更改缓存的数据结构。
在 eProsima Fast DDS 的默认配置中,当您通过 RTPSWriter 端点发布更改时,会在后台执行以下步骤:
更改将添加到 RTPSWriter 的历史缓存中。
RTPSWriter 将更改发送到它知道的任何 RTPSReaders。
接收到数据后,RTPSReaders 用新的变化更新他们的历史缓存。
但是,Fast DDS 支持多种配置,允许您更改 RTPSWriters/RTPSReaders 的行为。修改 RTPS 实体的默认配置意味着 RTPSWriters 和 RTPSReaders 之间的数据交换流发生变化。此外,通过选择服务质量 (QoS) 策略,您可以通过多种方式影响这些历史缓存的管理方式,但通信循环保持不变。您可以继续阅读 RTPS 层部分,了解更多关于快速 DDS 中 RTPS 协议的实现。
边栏推荐
- FPGA实现图像二值形态学滤波——腐蚀膨胀
- 影响个人成长的三个因素
- SDRAM控制器——仲裁模块的实现
- Getting to know OpenGL
- Multi type study of Worthington collagen protease
- keda 2.7.1 scaledJob 代码简要分析
- 静态库动态库的使用
- [JS] free API to judge holidays, working days, Saturdays and Sundays
- Two indicators for determining the value of points to the business
- Finding the sum of N multiplications
猜你喜欢

SDRAM controller -- implementation of arbitration module

Differences and functions of TOS cos DSCP

【js】免费api判断节假日、工作日和周六日

关于VS scanf出现‘scanf‘: This function or variable may be unsafe. Consider usi问题的解决方法

vscode调试时提示更新到最新调试版本

一分钟了解同步、异步、阻塞和非阻塞的区别

One stop solution EMQ for hundreds of millions of communication of Internet of things

shell学习记录(一)

Abnova anti GBA monoclonal antibody solution

Sweet cool girl jinshuyi was invited to be the spokesperson for the global finals of the sixth season perfect children's model
随机推荐
Tcp网络通信中各个状态的含义
Convert Weishi camera pictures
静态库动态库的使用
SDRAM Controller - add read / write FIFO
Graphics rendering pipeline
通俗易懂C語言關鍵字static
Jenkins localization and its invalid solution
接口测试用例设计
Dazhou suggested that we media bloggers do these four things in the early stage
vs2015+PCL1.8.1+qt5.12-----(1)
初识Opengl
Sunshine boy chenhaotian was invited to be the spokesperson for the global finals of the sixth season perfect children's model
Abnova actn4 DNA probe solution
Shell learning record (I)
weishi相机显示
It's better to finish one than start thousands of times (reprinted from Douban)
缓存技术之第一次亲密接触
shell学习记录(四)
树莓派 + AWS IoT 入门实验
Show spirit chenzitong was invited to be the chief experience officer of the global finals of the sixth season perfect children's model