Galactic/Fast-DDS middleware can't loan messages
I am using ROS 2 galactic and running with my environment set for FastRTPS middleware. I am using the loaned message buffer API and the XML configuration for shared memory described in the Fast-DDS documentation (snippet):
<transport_descriptors>
<!-- Create a descriptor for the new transport -->
<transport_descriptor>
<transport_id>shm_transport</transport_id>
<type>SHM</type>
</transport_descriptor>
</transport_descriptors>
<participant profile_name="SHMParticipant" is_default_profile="true">
<rtps>
<!-- Link the Transport Layer to the Participant -->
<userTransports>
<transport_id>shm_transport</transport_id>
</userTransports>
</rtps>
</participant>
When I run my publish code, I get the following output:
Currently used middleware can't loan messages. Local allocator will be used.
My testing shows that latency is increasing as data size increases so it appears that it really isn't using zero copy.
Code can be found at: https://github.com/mschickler/simple_...
It was announced in ROS discourse that the latest Fast-DDS supported zero copy / shared memory. Am I doing something wrong? Does the rmw layer not yet support the new functionality? Any ideas?