A review of the new tools available for ROS 2 Foxy and Fast DDS

I wanted to recap, as in the latest months we have developed plenty of new features and tools you can use with the latest version of ROS2: Foxy.

Shared Memory Transport: The best performance for intra and interprocess communications. The shared memory transport has been available since one year ago, but we have been iterating towards a zero-copy transport we are releasing next month, and you can make use of some intermediate performance improvements with our latest 2.1 release.

ROS2 Discovery Server: The solution for heterogeneous and lossy networks and large deployments. We released the discovery server 1.0 several months ago, but our new release 2.0 is a totally new discovery server. The discovery traffic is reduced up to 90% with respect to the traditional DDS discovery mechanism.

ROS2 Integration Service: As a result of a collaboration between Open Robotics and eProsima, we released the Integration Service, a tool to integrate ROS2 with other protocols & enable ROS2 over WAN/Internet. We demonstrated this tool past week with this cool demo.

Micro-ROS: The solution for Microcontrollers. We coordinate Micro-ROS and the embedded WG, and the middleware behind this project is our Micro XRCE-DDS, the standard extension of DDS for microcontrollers. All the suite is ready for Foxy, and during the last months we have added tons of new features, new supported hardware, new supported RTOS (Zephyr, FreeRTOS, NuttX, and more coming), and also Arduino

Quality - Q2 and working towards Q1: Fast DDS exposes the best quality among all the ROS2 DDS supported implementations: Q2. But this is not enough for us and we are working in code coverage to reach Q1. Last week we were at 79%, this week: 81%. Stay tuned, we will soon announce Q1.

Galactic is coming :slight_smile:

10 Likes

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

Sometimes you have a completely static system in a final application: You know in advance all the nodes you have, and the topics that nodes are publishing or subscribing to. In that case, you can speed up your discovery using:

Static Discovery: A ultra-fast discovery mechanism that uses the name of the remote participant to lookup the full configuration from a XML file (topics, publishers, subscribers, QoS settings) simplifying the discovery process, saving bandwidth and minimizing the start-up time.

1 Like

And more, much more:

Async and Sync publication mode: Depending on the application you could need Sync or Async Publishing. ROS 2 is Asynchronous by default, as it was ROS 1, and this is the behavior expected by most users, but we also support Synchronous. You can choose the behavior by just changing a parameter in an XML file.

DDS-XTypes APIs: This is an advanced feature allowing the user to create its data types at runtime without defining them on an IDL file in advance. You can use this feature for many applications, for example, we use dynamic types in the ROS 2 Integration Service, to create ROS 2 or DDS data types on the fly when routing information between two domains, WAN connections, or integrations with other protocols.

The XTypes can be used in combination with Topic and Data Type Discovery. You can information in our online docs: Discovery-Time Data Typing and Type Lookup Service

Multi-Network interface cards support and white list: Having more than one interface? No problem. Fast DDS uses all available network interfaces by default, except when the user configures a whitelist on the transport.

Persistence: ROS 2 allows you to send the history of published samples to late joining subscribers. By default this history is mantained in the publisher memory, but if you want a level more of persistence, Fast DDS allows you to set-up that history to be saved in persistent storage -a database-, us adding robustness to applications in the case of, for example, unexpected shutdowns. Configuring the persistence service, publishers and subscribers can resume their operation from the state in which they were when the shutdown occurred.

XML Profiles: Every feature can be set up using the Fast DDS XML profiles. No code required. Easy and Fast deployment of your application.

This was just a list in no specific order of things you can already do in Foxy with Fast DDS. We have a really comprehensive online doc, and we are continuously adding interesting use cases and tutorials, to both our docs and ROS 2 documentation.

If you are interested in what is coming next, please refer to this post in which we unveil our plans for Galactic.

1 Like

To finish this list, I included the security features, including the new logging plugin (a contribution from canonical) and created a full article here splitting them into categories.