ros2 / rmw_fastrtps

Implementation of the ROS Middleware (rmw) Interface using eProsima's Fast RTPS.
Apache License 2.0
147 stars 116 forks source link

Keep reference to `DomainParticipantFactory` #770

Open MiguelCompany opened 3 weeks ago

MiguelCompany commented 3 weeks ago

We've seen several issues related with destruction order lately.

This PR aims to mitigate them by leveraging Fast DDS DomainParticipantFactory::get_shared_instance().

It should then avoid the automatic destruction of the factory (and the participants it created) until all the contexts in the process have been destroyed.

This can be backported to Jazzy and Iron, but not Humble, since get_shared_instance() is only available from Fast DDS 2.8.0 onwards.

ahcorde commented 1 week ago