I kindly would like to make you aware of embeddedRTPS, our open-source (MIT license) and portable implementation of the RTPS protocol for microcontrollers. Our implementation is based on lwIP and FreeRTOS, which is available for many platforms. Discovery mechanisms are implemented (SPDP and SEDP) and embeddedRTPS is interoperable with FastRTPS for reliable and best-effort endpoints.
We have been able to port embeddedRTPS to Infineon Aurix, STM32 and Xilinx UltraScale+ R5.
Our implementation is far from complete, as many QoS policies are not supported yet. Nevertheless, I hope that embeddedRTPS could be useful for some of you here.
Thanks a lot for sharing @AKampmann, that’s a pretty interesting piece of work!
Could you maybe advice on the following matters?
Have performed any benchmark of embeddedRTPS that you could share? If so, are such measurement mechanisms available by any chance?
In the repo it’s mentioned that
Due to license issues, we can only make source code available for the STM32
I went through the code and dependencies somewhat quickly and while possibly beyond the scope of your project, the following popped: have you considered offering support for embeddedRTPS on top of POSIX/Linux for development? That’d be extremely helpful to many in this community IMHO and would allow comparison against other existing RTPS solutions out there while enhacing its portability to a wide variety of RTOSs.
I see that among the dependencies, a) there should not be any issues with Micro-CDR to run on Linux, b) there seems to be some existing work on getting lwIP in Linux (thought it’d be nice to get some other networking stacks, e.g. the Linux one or rtnet)
Could you share maybe a bit more about your goals and objectives with regard embeddedRTPS? Do you have an open roadmap for it? If someone wanted to jump in and help, how would best she/he do it?
Thank you for your feedback so far. I will try to answer most of your questions
Have performed any benchmark of embeddedRTPS that you could share? If so, are such measurement mechanisms available by any chance?
I have updated the repository with round-trip-times for two different setups:
2x Infineon Aurix running embeddedRTPS
STM32 running embeddedRTPS and Intel NUC running eProsima FastRTPS.
Measurements are obtained by toggling pins upon sending/reception and using a logical analyser for precise timing measurement.
I went through the code and dependencies somewhat quickly and while possibly beyond the scope of your project, the following popped: have you considered offering support for embeddedRTPS on top of POSIX/Linux for development? That’d be extremely helpful to many in this community IMHO and would allow comparison against other existing RTPS solutions out there while enhacing its portability to a wide variety of RTOSs.
That is definitely possible and we have followed that approach during the initial implementation. We used lwIP/FreeRTOS on top of Ubuntu, which also allows for unit testing. I will try to provide code for this setup as well, which will require some restructuring of the repositories. I will have to dig through some local branches.
Could you share maybe a bit more about your goals and objectives with regard embeddedRTPS? Do you have an open roadmap for it? If someone wanted to jump in and help, how would best she/he do it?
We noticed that there was no portable and open-source implementation of the RTPS protocol for embedded systems and we needed one in the context of our project (UNICARagil - Home). Especially in the context ROS2 and Adaptive AUTOSAR, we wanted microcontrollers that are unable to run Linux to be first-class participants in the communication network. Especially without having to rely on other platforms to tie them into the rest of the system, which is an issue for safety-critical systems (this is the approach for DDS-XRCE).
I have mentioned some of the limitations in the repository, and I’m sure there are plenty more things to implement and improve. I will release updates to embeddedRTPS if I make bugfixes or add new features, but I don’t have a formal roadmap for now.
People are of course welcomed to jump in and help with development. For this purpose, it would be best if I first provide the lwip/FreeRTOS layer on Ubuntu as mentioned above together with some unit tests.
Especially without having to rely on other platforms to tie them into the rest of the system, which is an issue for safety-critical systems (this is the approach for DDS-XRCE).
good catch, but i think this is really dependent on situation and use cases.
quick question, rmw_embeddedrtps is going to be ready for ROS2 user?
I’m not familiar with SafeRTOS, but embeddedRTPS only uses some rudimentary features of FreeRTOS (basically thread/mutex functionalities). As long as these functionalities are available in SafeRTOS, it should not be complicated to make embeddedRTPS work on top of SafeRTOS.
Making the internals of embeddedRTPS functional safe is probably a greater endeavour. I assume you mean compliance with, e.g. MISRA C++? AFAIK there are some free MISRA compliance checkers, but I haven’t had a chance to try them out.
SafeRTOS is almost API compatible to FreeRTOS. The differences are explained in an upgrade document. Using SafeRTOS instead of FreeRTOS should Not be a big deal. Of course embeddedRTPS is not compliant to IEC61508-3. But someone could fork and make it compliant. The same way how Apex.AI did with ROS2.
Really interesting work. Even though officially we have Micro-ROS, but in my opinion, embeddedRTOS is a useful alternative that avoids using agent-client interface.
Is there a long term plan for this project? @AKampmann
Thank you very much.
@huschen We will release an update that makes embeddedRTPS again compatible with latest fastDDS und that introduces support for multicast. We will also have a docker container that allows to run embeddedRTPS on Linux for development purposes. Otherwise we currently do not have a long-term plan for this project. There are a ton of QoS features that could be implemented. It would also be interesting to see if MISRA compliance could be achieved.
FYI, we are working on a brokerless P2P solution for Micro XRCE-DDS, micro-ROS’ middleware, which would then be inherited by micro-ROS.
Still quite prototypical, but we wish to move forward with it in the forthcoming months. For the moment, you can check it out here.