具有多播和单播的DDS配置 [英] DDS configuration with multicast and unicast

查看:282
本文介绍了具有多播和单播的DDS配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我仍在尝试了解DDS及其概念. 我有一个配置,其中2台笔记本电脑运行基于dds的应用程序.我的环境不允许多播,所以我决定进行对等连接(单播).为了使两台笔记本电脑都处于同一网络中,我使用以太网电缆(不确定是否有必要)将它们连接起来.

I am still trying to understand DDS and its concepts. I have a configuration where 2 laptops run dds based application. My environment does not permit multicast so I decided to go for peer to peer connection(unicast). To bring both the laptops in the same network, I connected them using ethernet cable (Not sure if it was necessary or not).

现在,我没有更改QoS中的任何内容,即我没有对单播进行任何设置.但是现在我的应用程序正在相互通信.

Now I did not change anything in the QoS i.e. i did not do any settings for unicasting. But now my applications are communicating with each other.

问题:

  1. 如何发现参与者?多播?因为我没有对单播进行任何设置.
  2. 如果要使用单播,是否有必要将它们置于一个网络下,即用以太网电缆连接?

配置如下:

  • 第一台笔记本电脑:Windows操作系统:基于本机DDS的应用程序:发布者:不允许多播.
  • 第二台笔记本电脑:Linux:基于ROS2的订户:多播没问题

推荐答案

如何发现参与者?多播?因为我没有对单播进行任何设置.

How are the participants being discovered ? Multicasting ? as I did not do any settings for unicasting.

由于您将DDS用作ROS2框架的一部分,并且我不熟悉如何将两者设置为相互交互的确切细节,因此我不可能完全确定地回答此问题.话虽如此,从您的描述看来,参与者确实确实在使用多播来发现彼此.

It is not possible for me to answer this question with complete certainty since you are using DDS as part of the ROS2 framework and I am not familiar with the exact details of how the two are set up to interact together. Having said that, from your description it does seem that the participants are indeed using multicast to discover each other.

获得结论性答案的最佳方法是嗅探网络-假设您具有执行此操作所需的特权.例如,您可以使用Wireshark,它带有RTPS分解器,可让您过滤RTPS消息. (RTPS是标准化DDS有线协议的名称.)签出目标地址,看看是否在多播范围内检测到任何地址.您可以在启动单个基于DDS的应用程序时执行此操作.它将立即开始通过网络宣布自己.

The best way to get a conclusive answer is by sniffing the network -- assuming that you have the required privileges to do so. For example you can use Wireshark , which comes with an RTPS dissector that allows you to filter on RTPS messages. (RTPS is the name of the standardized DDS wire protocol.) Check out the destination address and see if you detect any addresses in the multicast range. You can do this while firing up a single DDS-based application. It will start announcing itself over the network immediately.

是否有必要将它们置于一个网络中,即如果我想使用单播,请用以太网电缆连接吗?

Was it necessary to bring them under one network i.e. connect with ethernet cable if I wanted to use unicasting ?

如果要使用单播,则需要知道所有对等节点的IP地址或主机名.只要那些对等节点可以通过UDP相互访问,您就可以开始使用.通常,但并非总是如此,ping会让您知道是否是这种情况.防火墙是造成问题的典型原因.

If you want to use unicasting, you will need to know IP addresses or host names of all peer nodes. As long as those peer nodes can reach each other over UDP, you are good to go. Often, but not always, ping will let you know whether this is the case. Firewalls are a typical cause of problems.

但是,请注意,不同类型的网络具有它们自己的特定属性,您可能必须将其调整为该属性.例如,在WiFi上,数据包丢失的可能性(尤其是数据突发)比直接用电线连接节点时的可能性要大得多. DDS允许调整其协议以处理该问题.

However, be aware that different types of network have their own specific properties that you might have to adjust your configuration to. Over WiFi for example, the likelihood of packets being dropped (especially with bursts of data) is much larger than when connecting nodes directly with a wire. DDS allows for tuning its protocol to deal with that.

这篇关于具有多播和单播的DDS配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆