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

Galactic/Fast-DDS middleware can't loan messages

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

mschickler gravatar image

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

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Comments

1

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 -0500 )edit
2

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 -0500 )edit
2

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 -0500 )edit
1

Thanks folks. Appreciate the help!

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

Question Tools

2 followers

Stats

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

Seen: 703 times

Last updated: Jun 15 '21