Also, let’s review some previous features included in Fast DDS & ROS 2 Foxy but now widely known, for example for real-time applications:
Static Allocations: A feature for real-time applications. Allocating and deallocating memory implies some non-deterministic time consuming operations. Therefore, most real-time systems need to operate in a way that all dynamic memory is allocated during the application initialization, avoiding memory management operations in the main loop.
If the user provides some parameters, for example, the maximum number of participants, publishers and subscribers, Fast DDS is able to pre-allocate this memory, avoiding future dynamic allocations.
We have a comprehensive guide on how to use this feature and a complete use case example.
Non-Blocking Calls: Real-time applications need predictable behavior, including a predictable maximum time since a function is called until it returns control. In order to comply with this restriction, Fast DDS can be configured to limit the maximum blocking time of these functions. If the blocking time limit is exceeded, the requested operation is aborted and function terminated, returning the control to the caller.
Both features are available since Eloquent, actually.
Remember also, you can set-up easily any Feature of Fast DDS using XML profiles, no code required. You have some examples in our RMW documentation.
2 Likes