Dynamic Type Distribution Doesn't Work For Nested Structs (with minimal example) #2984
Closed
1 task done
Labels
bug
Issue to report a bug
Is there an already existing issue for this?
Expected behavior
With a modified form of the HelloWorld dynamic data example that publishes a message like:
Attempt to publish and subscribe. It should work, and the
eprosima::fastrtps::types::DynamicType_ptr
that gets passed to theSubListener
'son_type_discovery
method should match the DynamicType that was constructed on the publishing process.Current behavior
The DynamicType does not match.
Printing the type members (with names) shows that the nested member is MISSING. This causes the subscriber to not be able to receive messages because the type matching fails.
Additionally, if you deliberately construct the type on the subscriber (with the same code used in the publisher), the publishing works as expected. So this issue is localized to the transmission of the type information but not the data itself.
The relevant log for this behavior is here:
Steps to reproduce
I've prepared a minimal example:
methylDragon/fastdds-pr-minimal-examples
Once built, run:
The relevant code can be found here
For the deliberate construction example, instead run:
Fast DDS version/commit
FastDDS 2.8.x: 78473a0
The examples workspace is using that specific SHA in the submodule, for convenience.
Platform/Architecture
Other. Please specify in Additional context section.
Transport layer
Default configuration, UDPv4 & SHM
Additional context
This is on 22.04.
I don't know what the cause of the problem is, I haven't been looking into it.
This bug is hampering the progress of the dynamic types and type introspection reference implementation for ROS 2 as proposed in REP 2011, to be presented in ROSCon 2022, and for implementing the actual feature.
It is essential that type description distribution on the XTypes/DDS layer works for detecting type mismatches. So this is quite critical, especially as FastDDS is currently the default for ROS2 and the feature being implemented would be very impactful/life in the core of ROS2.
XML configuration file
No response
Relevant log output
The text was updated successfully, but these errors were encountered: