My name in Ananya Muddukrishna. I am a researcher in Ericsson working on productive methods to connect ROS2 applications to 5G networks (telecommunication). The topic is relevant to Ericsson since ROS2 and 5G networks have machine-machine communication QoS concepts that stand out.
I would like to discuss a limitation in ROS2 design and potential solutions with you.
5G networks enable robotic applications to assign required quality of service (QoS) to IP (internet protocol) flows [1,2]. The QoS assignment requires that IP flows between communicating entities be unambiguously identified. However, this is problematic in the context of ROS2 due to ambiguity in the IP flows between publishers and subscribers across the same source and destination nodes. One solution to the problem involves exposing the transport_priority QoS policy of DDS within ROS2 API so that the ambiguity is reduced.
As an example, consider a ROS2 application with nodes N1 and N2. N1 contains publishers P1 and P2. N2 contains subscribers S1 and S2. P1 and S1 are associated with the same topic T1 and compatible QoS. Similarly P2 and S2 are associated with topic T2 and compatible QoS. So connections P1-S1 and P2-S2 are established and messages start to flow.
Nodes N1 and N2 are assigned unique transport layer identifiers in the DDS layer. These transport identifiers are a combination of IP addresses and UDP/TCP ports. The IP packets of messages from P1 and P2 have the same transport identifier. So do packets from S1 and S2. Since source and destination nodes are the same, the IP flows of P1-S1 and P2-S2 appear similar from a transport layer viewpoint.
Assume that P1-S1 requires a 5G network QoS, say delay of 5ms, that is different from P2-S2, say delay of 300ms. Then, by construction, since their IP flows are similar, they cannot be assigned the required 5G network QoS. Both P1-S1 and P2-S2 can either be assigned QoS 5ms delay or QoS 300ms delay. The former case represents a waste of resources, the latter case leads to performance loss.
DDS has a good solution for reducing such ambiguity. It is the transport_priority QoS policy. This policy can be used to differentiate packets across publisher-subscriber connections. The idea is that publishers specify a transport_priority value (unsigned long type). This value is transferred (perhaps with some bit-twiddling) to the Differentiated Services (DSCP) field [3] in IP packets of the messages between the publisher and its subscribers. No other action is taken by DDS. Now the transport identifier of the publisher becomes a combination of IP address, TCP/UDP port, and DSCP value, enabling unambiguous IP flow differentiation (upto 2^6 publisher-subscriber pairs across two nodes)
However, the transport_priority policy is not available in ROS2. I don’t know the reasons for its exclusion. In my own private forks of ROS2 repositories, I have found that simple refactoring can expose transport_priority from DDS implementations to rclcpp/rclpy.
Are there any fundamental design problems with exposing transport_priority as a new QoS policy in ROS2?
Do you see other good methods to resolve the IP flow ambiguity problem?
References: