Ok, so by aggregating comments from Miguel and Lukic, I successfully validate that DDS can be used with foxy.
To do so, you have to create an XML file called for example shm_profile.xml which will contains :
<?xml version="1.0" encoding="UTF-8" ?>
<profiles xmlns="http://www.eprosima.com/XMLSchemas/fastRTPS_Profiles">
<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>
</profiles>
Then, if you export the two environments variables :
export FASTRTPS_DEFAULT_PROFILES_FILE=`pwd`/shm_profile.xml RMW_IMPLEMENTATION=rmw_fastrtps_cpp
When you run two nodes that communicate on the same computer, you can observe in Wireshark that there are really few RTSP messages.
Now we can do latency, and bandwidth measurement, but that's another story !
You can find here for FastDDS: https://fast-dds.docs.eprosima.com/en...
That's what I have found and got to run in a standalone DDS application. But is it exposed via RMW? How can I have two ROS processes communicating via shared memory when using the RMW?
I am facing the same problem as you. I try to use the FastRTPS shared memory. If you look at this discourse post, it's said that Shared Memory is now ready to be used in FastRTPS in Foxy. In this gitub PR on rmw_fastrps, Miguel said that SHM is enabled by default.
I compiled foxy on my computer and when I send topics I can see them passing through the UDP loop back in wireshark.
The FastRTPS documentation say that Shared Memory is disabled by default. I tried to set a custom profile.xml file thanks to the environment variable FASTRTPS_DEFAULT_PROFILES_FILE to enable SHM, but it don't seems to work (I still see messages in wireshark).
So if someone know how to enable this feature, feel free to help us !
As I already answered here, you need to add
is_default_profile="true"
on the profile defined in the XML, otherwise ROS 2 will not take the profile into account.