-
Notifications
You must be signed in to change notification settings - Fork 33
Conversation
Sounds good to me. I guess the assumption is that the issue @nuclearsandwich faced with Opensplice<=>FastRTPS communication is different? Or does opensplice also sends additional data not in the spec that can cause this to happen? Are there any "standard scenarios" where we could hit this 5000 bytes limit ? |
@mikaelarguedas eProsima/Fast-DDS#213 I couldn't find an upper limit to the size of |
@mikaelarguedas I'm assuming the opensplice and fastrtps issue is different. How reproducible is it? |
I'm not sure actually that's why I focused the issue description to the reproducible Fast-RTPS <=> Connext communication with my rcl_interfaces changes. Maybe @nuclearsandwich has a better recollection. As we don't run opensplice nightly I cant really provide multiple examples of failures.
Yeah totally, I just wanted to make sure we reported it upstream to avoid future issues as this seems to be more of a workaround than a solution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
I still have the log file for this job. I can't upload or gist it due to file size but I will stick it
As far as I remember I only saw this the once while testing for connectivity issues. |
This unblocks ros2/rcl_interfaces#32 and ros2/rclcpp#443. It's a workaround for ros2/rmw_fastrtps#194. In short it disables a nonstandard feature to reduce the size of a message sent during discovery by RTI connext.
To reproduce the issue this works around:
rcl_interfaces
branchparemeter_type_array
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run demo_nodes_cpp listener
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 run demo_nodes_cpp talker
Without this PR the node using
rmw_fastrtps_cpp
will spam the console withThese fail to communicate because RTI sends a very large message during discovery and FastRTPS seems to have a fixed size buffer (5000 bytes) that is too small. The reason RTI's message is so large has to do with its support for DDS-XTYPES.
RTI connext 5.x partially supports DDS-XTYPES, but versions 4.5f and lower implemented something similar but non-standard. The standard version is
TypeObject
and pre-standard isTypeCode
. These contain full descriptions of the message, so more message fields means more data is sent. For backwards compatibility with 4.5f and below, 5.x versions sends both aTypeObject
andTypeCode
.TypeObject
andTypeCode
have a default maximum serialized length of 3072 and 2048 bytes respectively. A message that almost maxes both of these out would exceed FastRTPS's buffer size. However, a message that is even larger causes connext to just not send the field and fall back to matching using the topic name. This means fastrtps and default configured connext will fail to communicate ifTypeObject
+TypeCode
+ (lots of smaller stuff) > 5000 bytes andTypeObject
< 3072 andTypeCode
< 2048. The parameter events message with array support falls into this sweet spot.The fix here is to set the maximum serialized length of
TypeCode
to zero so that connext never sends it.CI