ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Galactic/Fast-DDS middleware can't loan messages

asked 2021-06-14 16:00:34 -0600

mschickler gravatar image

updated 2021-06-15 07:59:49 -0600

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):

    <!-- Create a descriptor for the new transport -->

<participant profile_name="SHMParticipant" is_default_profile="true">
        <!-- Link the Transport Layer to the 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:

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-06-15 09:45:03 -0600

allenh1 gravatar image

As far as I'm aware, FastDDS does not support the loaned messages, and performs their shared memory transport in some other method.

The loaned message API is used in iceoryx right now, which _does_ work with CycloneDDS.

edit flag offensive delete link more



Do you know how I would go about configuring to use Cyclone DDS with iceoryx integration? When I try this test with default RMW (Cyclone) the results still don't look like zero copy is happening.

mschickler gravatar image mschickler  ( 2021-06-15 10:55:11 -0600 )edit

Yep -- it's not on by default, but you can read about it here, it's pretty painless.

allenh1 gravatar image allenh1  ( 2021-06-15 11:25:47 -0600 )edit

There is also additional documentation in rmw_cyclonedds. Also note that the patch release 1 for Galactic should be released in the next 2 weeks and does include improvements and bug fixes for the zero-copy case

budrus gravatar image budrus  ( 2021-06-15 11:52:39 -0600 )edit

Thanks folks. Appreciate the help!

mschickler gravatar image mschickler  ( 2021-06-15 12:49:56 -0600 )edit

Question Tools



Asked: 2021-06-14 16:00:34 -0600

Seen: 606 times

Last updated: Jun 15 '21