There seem to be a lot of assumptions taken to the extreme in your message. I
hope I can correct some of them.
If you're building from source, then you can change which rmw implementation
the package uses. That's why the actual communications middleware is hidden
behind the rmw API.
> And if alternative rmw implementations become available (like ROS1 or ZeroMQ),
> then it will not be possible to switch a large set of packages from one to the
> other, because each package may have fixed the rmw implementation in it's cmake
> file (and also have used verndor specific underlying API).
This is a valid use case for having an easy way to specify the rmw
implementation used for all packages in a workspace.
> And the problem applies also to licensing. If a user does not wish to use
> Connext but only OpenSplice, they will have trouble because any number of ROS2
> packages might be hard-wired to Connext. There is risk of users being unable to
> certain packages, or even of users violating Connext licensing restrictions
> without having been aware that there was a different license involved.
The above only applies to the binary packages. Anyone will still be free to
build from source using their preferred DDS vendor.
> If a user switches the implementation in a half-build workspace, the result
> would be incompatible executables?
>
> The executables would use different rmw implementations.
> But that does not make them "incompatible".
> A Connext talker can communicate with an OpenSplice listener because of the
> DDS standard.
>
>
> First of all, I believe rmw implementations have no contract of being
> compatible with each other (ROS1 could be made an rmw implementation, or
> ZeroMQ).
rmw implementations only need to comply with the API. If you are using binaries
from a single source, it is reasonable to assume that source built them all
using the same rmw implementation. If they didn't, then they are not providing
useful binaries...
If you are using source, then it doesn't matter. Build using the rmw
implementation suited to your needs.
> And even if only DDS-rmw variants were involved, the degree of compatibility
> can very well be questioned. I understand every two years major DDS vendors
> meet to demonstrate the exchange of a few messages between the systems. But
> that is not the same thing as giving any guarantee of compatibility. The
> integration of n different DDS implementations may still raise any number of
> bugs.
The major DDS vendors actually meet four times a year.
The demonstration (which I have seen twice, simply by being in the same place
at the same time) is simple, but the standard is comprehensive. DDS vendors
claim compatibility with the standard and their customers tend to hold them to
that. In the case of RTI, that's an advantage for us of them selling to the US
military, who demands standards compliance when suitable standards exist. The
rest of the commercial vendors comply to be able to claim compatibility with
RTI.
Certainly, bugs may exist in implementations, but the wire protocol itself is
relatively simple and the serialisation scheme has existed for longer than DDS
(it's CDR). The simple demonstration is actually enough to assume significant
compatibility across the wire.
> As an example DDS systems can be configured in a lot of ways via an XML, but I
> suspect different vendors do this in different ways each.
They do, but I don't see how this is relevant. All that sort of stuff will be
hidden behind the rmw API. ROS developers will not see it directly.
> I believe the different DDS vendors also disagreed on the way to implement
> service calls over DDS topics in the past. I can only guess they will also do
> what they can to add features to their implementations that make it difficult
> to switch vendors, like providing additional vendor-specific APIs for tooling.
RTI and PrismTech disagreed because they both already had their own solutions
to the problem, and obviously neither wanted to make a great deal of changes to
working code. It's a common situation. Fortunately that situation has been
resolved in a way that achieves compatibility. If it were open source projects,
the number of projects would probably have doubled instead...
Sometimes a standard is a useful thing for convincing the involved parties to
resolve differences rather than ignoring each other.
As for adding vendor-specific APIs, the vendors already do so to provide
additional useful functionality. It's a sensible business strategy. The
aforementioned XML configuration method is an example: It's not (yet) in the
standard but it's convenient so vendors provide ways to do it. I don't see the
relevance of this, either, though. If you're using the ROS tooling, what
tooling a DDS vendor chooses to provide is not relevant unless you explicitly
decide to use it. Depending on ROS (rmw) will shield you from a DDS vendor
behaving badly.
> The amount of development effort is probably manageable in industry when
> connecting 2 systems, like a sensor framework using one DDS implementation and
> an actuation system using another. A team of engineers can probably deal with
> the problems of combining such 2 systems via a small set of topics. But the
> engineering problem of maintaining a system of 100s of nodes each having an
> arbitrary DDS implementation under the hood is on a very different scale.
It's only arbitrary if you choose to accept whatever all the different package
maintainers have chosen for their packages. I don't think I've seen anyone
suggest that this will be the only possible outcome. A sensible user of ROS
will probably either use the default that works with the binary packages
provided by the OSRF, or (if they care about which DDS they use, which probably
means they are in industry)) they are going to chose their own preferred DDS
implementation and build all their packages to work with it.
> And debugging robot behavior will come down to debugging the code of multiple
> DDS vendors.
No it won't, unless you want it to.
> So ROS2 increases the ROS learning curve not just by requiring to learn the DDS
> standard, but also by requiring to familiarize oneself with multiple DDS
> implementations at the code level.
I don't know how you reached this conclusion. The OSRF developers have been
quite clear that the DDS implementation will not be used directly, but will be
hidden behind the rmw API. No learning DDS is *required*. It is *optional* for
advanced users who want to, for example, fine-tune the QoS policies of a
particular topic.
Certainly needing to be familiar with multiple DDS implementations at the code
level has never been mentioned as being required to use ROS2. I think we're
getting into hyperbole now.
> And how about dynamic languages then, like Python. If I install
> ros-nturtle-bar providing a scripted python ros node, I guess this
> would then have to carefully select the same rmw implementation as the
> C++ binaries?
>
>
> Since there is no link step for Python it will be a decision happening at
> the start time of a Python script.
>
>
> This means both the dynamic-language nodes as well as nodes with variable cmake
> code will have to be integration tested with multiple DDS vendors prior to
> release. And integration tests would basically have to run every possible
> permutation of nodes using differnt DDS vendors, which of course suffers
> combinatorial explosion.
I don't think this would be necessary. I think a reasonable approach is to test
with the default DDS that the OSRF assumes. Any testing with other DDS
implementations can be left up to the users who choose not to use the default.
It's a reasonable, and common, approach.
> This all sounds very scary to me. It sounds like OSRF is treating different DDS
> implementations as if they were merely different implementations of a simple
> serialization protocol provided by entities eager to cooperate.
> But it seems to me that on the contrary, DDS implementations are highly complex
> systems in themselves, provided by vendors in a tough competition with each
> other, grudgingly providing minimal communication compatibility, but trying
> very hard in every way they can to tie customers to their own implementation.
DDS vendors are in competition with each other, yes. But they don't provide
"minimal communication compatibility." The DDS wire protocol is completely
specified in the standard, so communication compatibility is complete. Any
vendor-specific additional functionality can only occur on the
application-facing side of their implementation. While the vendors will try to
tie customers to their implementation through extra tooling, ROS is free to
ignore that and stick to the standard API as closely as possible.
> There is no business case for any DDS vendor to support ROS and an easy way to
> switch out their commercially-licensed product by an LGPL-licensed one. It's
> the classic case of biting the hand that feeds you.
>
> While the DDS standard sounds like a good match for ROS2, I believe the only
> viable way would be to rely on a single implementation that is MIT-license
> compatible, and that OSRF could maintain itself when all other maintainers walk
> away.
There is a real (not "community") open-source implementation of DDS available,
which I'm sure you'll be able to use if you choose to do so. I understand that
the OSRF has actually had pushing *from* the two largest DDS vendors to get
their implementation to be the preferred one for ROS2. The vendors see the
potential benefit of already being their when a company wants to start shipping
robots using ROS2.
I hope the above has cleared up some of the misconceptions around using DDS.
Geoff