Closed aditya2592 closed 2 years ago
Hi @aditya2592,
The shared memory directory (/dev/shm
) is not shared between containers, that is why we disable it by default.
To enable this communication, the directory should be mounted on your docker container: -v /dev/shm:/dev/shm
.
Thanks @Acuadros95, so to confirm, if we mount those folders to our container and to the agent container, then there is no reason to use UDP to communicate between them? Will I be able to use an XML config with purely SHM as transport:
<?xml version="1.0" encoding="UTF-8" ?>
<dds>
<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="super_client_profile" is_default_profile="true">
<rtps>
<!-- Link the Transport Layer to the Participant -->
<userTransports>
<transport_id>shm_transport</transport_id>
</userTransports>
<useBuiltinTransports>false</useBuiltinTransports>
</rtps>
</participant>
</profiles>
</dds>
Yes, you have to modify the FASTRTPS_DEFAULT_PROFILES_FILE
file of course.
Hi,
Both XML files in the entrypoint seem to be disabling SHM, is this actually needed? Shouldn't participants on same machine but in other docker containers still be able to talk to the agent using SHM?