QoS Matching#52
Conversation
- choose subscription QoS compatible with all known publishers - preserve client-provided history depth - avoid copying liveliness from only the first publisher - normalize explicit subscription type names - reject explicit types incompatible with an existing topic - update broken QoS-dependent tests - add tests for new subscription behavior
|
Looks I pushed my commits to wrong place? I cannot see them here. |
|
🦟 Oh I gotta drop in at least once a year. They say everyone has some kind of ghost that chases them around. Usually it's more metaphorical though lmao. Also Lyrical for 26.04 just got released three hours ago... Haha yeah, forgot about the tests. Things work so that's good enough right? 😝 I've tested the new changes out a bunch on a two Jazzy platforms with Cyclone (FastDDS is oddly bugged on Jazzy in general), and in Gazebo and it seems to check out. Cherry picking this to Humble also compiles and runs, though I haven't got anything notable to test with there anymore either.
Hmm that can happen yeah. I guess that's the only case where we really shouldn't subscribe so it doesn't mess up the DDS side and we'll get a message that likely breaks something somewhere in the client pipeline anyway.
It might actually make the most sense to plan for what's most compatible if any additional publishers join after we already subscribe too. Are there any downsides if we just check if there's any transient locals, and if so, use best effort + transient local, otherwise best effort + volatile? I think all other combinations should then be compatible. Those two cases will typically always get separated too (at least if /tf and /tf_static are to go by), since it doesn't semantically make any sense to send a single latched UDP packet when it's entirely possible it gets lost. The two major goofs are:
I'm not entirely sure what happens if you combine best effort + transient local in various RMWs, though in theory if the publisher is reliable it should still be fully reliable and not matter. The current setup is probably fine for 99.9% of cases though anyway. |

Hey, it's me again 😄
I've noticed recently that there are some more esoteric topics that get rejected by RWS completely due to incompatible QoS, mainly since it always subscribes with Reliable even to topics that are Best_effort. This change should match all params exactly instead of just durability.
The second thing is that often times I'll have a bunch of subscribers declared in the client ahead of time, and then only later on those publishers get set up and start sending. In this case we don't subscribe at all, and then one has to retry manually from the client.
So instead we can do what rosbridge does, which is subscribe to the given topic & type with the most compatible QoS, so Best_effort + Volatile. That will not receive old transient local messages since that needs to be set explicitly, but given the alternative I think this is still the far more practical solution.
It seems to work on my end, but I'll be testing a bit more in the coming days to see if I find any edge cases.