Maximum Limit of String in ROS2
I am currently interfacing ROS2 with native RTI DDS Connext through RTI Connector for python.
In my ROS2 node, I have a custom message type which uses header
messages from std_msgs
. Now the header
has a member string frame_id_
. When the idl is generated for this msg, the size of the string is allocated as 2147483647 bytes
. I can see this in the RTI Admin console. Now to match the Types in native DDS and ROS2, I need to give the same string size in RTI Connext through a QoS.xml file. But the problem is, this is too big a size for RTI to handle and the program crashes.
As a workaround, I modified the header_.idl
in ROS2 lying in ROS2_base_ws/install/std_msgs/dds_connext/Header_.idl
as string<255> frame_id_
i.e. I limited the max size of this string.
I recompiled it and ran the same node, but it always has the previous size i.e. 2147483647 bytes
Any other workaround ?