<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article article-type="research-article" dtd-version="2.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Robot. AI</journal-id>
<journal-title>Frontiers in Robotics and AI</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Robot. AI</abbrev-journal-title>
<issn pub-type="epub">2296-9144</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">1081875</article-id>
<article-id pub-id-type="doi">10.3389/frobt.2023.1081875</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Robotics and AI</subject>
<subj-group>
<subject>Technology and Code</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>&#xb5;RT: A lightweight real-time middleware with integrated validation of timing constraints</article-title>
<alt-title alt-title-type="left-running-head">Sch&#xf6;pping et&#xa0;al.</alt-title>
<alt-title alt-title-type="right-running-head">
<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3389/frobt.2023.1081875">10.3389/frobt.2023.1081875</ext-link>
</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Sch&#xf6;pping</surname>
<given-names>Thomas</given-names>
</name>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/1951965/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Kenneweg</surname>
<given-names>Svenja</given-names>
</name>
<uri xlink:href="https://loop.frontiersin.org/people/1457569/overview"/>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Hesse</surname>
<given-names>Marc</given-names>
</name>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2072469/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>R&#xfc;ckert</surname>
<given-names>Ulrich</given-names>
</name>
<uri xlink:href="https://loop.frontiersin.org/people/94232/overview"/>
</contrib>
</contrib-group>
<aff>
<institution>Cognitronics and Sensor Systems Group</institution>, <institution>Faculty of Technology</institution>, <institution>Bielefeld University</institution>, <addr-line>Bielefeld</addr-line>, <country>Germany</country>
</aff>
<author-notes>
<fn fn-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/419322/overview">Jose Luis Sanchez-Lopez</ext-link>, University of Luxembourg, Luxembourg</p>
</fn>
<fn fn-type="edited-by">
<p>
<bold>Reviewed by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2088061/overview">Stefan Kowalewski</ext-link>, RWTH Aachen University, Germany</p>
<p>
<ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/300220/overview">Nico Hochgeschwender</ext-link>, Hochschule Bonn-Rhein-Sieg (H-BRS), Germany</p>
</fn>
<corresp id="c001">&#x2a;Correspondence: Thomas Sch&#xf6;pping, <email>tschoepp@techfak.uni-bielefeld.de</email>; Marc Hesse, <email>mhesse@techfak.uni-bielefeld.de</email>
</corresp>
<fn fn-type="other">
<p>This article was submitted to Robotic Control Systems, a section of the journal Frontiers in Robotics and AI</p>
</fn>
</author-notes>
<pub-date pub-type="epub">
<day>21</day>
<month>03</month>
<year>2023</year>
</pub-date>
<pub-date pub-type="collection">
<year>2023</year>
</pub-date>
<volume>10</volume>
<elocation-id>1081875</elocation-id>
<history>
<date date-type="received">
<day>27</day>
<month>10</month>
<year>2022</year>
</date>
<date date-type="accepted">
<day>30</day>
<month>01</month>
<year>2023</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2023 Sch&#xf6;pping, Kenneweg, Hesse and R&#xfc;ckert.</copyright-statement>
<copyright-year>2023</copyright-year>
<copyright-holder>Sch&#xf6;pping, Kenneweg, Hesse and R&#xfc;ckert</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p>
</license>
</permissions>
<abstract>
<p>Middlewares are standard tools for modern software development in many areas, especially in robotics. Although such have become common for high-level applications, there is little support for real-time systems and low-level control. Therefore, &#xb5;RT provides a lightweight solution for resource-constrained embedded systems, such as microcontrollers. It features publish&#x2013;subscribe communication and remote procedure calls (RPCs) and can validate timing constraints at runtime. In contrast to other middlewares, &#xb5;RT does not rely on specific transports for communication but can be used with any technology. Empirical results prove the small memory footprint, consistent temporal behavior, and predominantly linear scaling. The usability of &#xb5;RT was found to be competitive with state-of-the-art solutions by means of a study.</p>
</abstract>
<kwd-group>
<kwd>middleware</kwd>
<kwd>real-time computing</kwd>
<kwd>distributed computing</kwd>
<kwd>embedded</kwd>
<kwd>microcontroller</kwd>
<kwd>publish&#x2013;subscribe</kwd>
<kwd>remote procedure call</kwd>
<kwd>prevention through design</kwd>
</kwd-group>
<contract-num rid="cn001">1807ow003a</contract-num>
<contract-sponsor id="cn001">Ministerium f&#xfc;r Wirtschaft, Innovation, Digitalisierung und Energie des Landes Nordrhein-Westfalen<named-content content-type="fundref-id">10.13039/501100016377</named-content>
</contract-sponsor>
</article-meta>
</front>
<body>
<sec id="s1">
<title>1 Introduction</title>
<p>For sophisticated software architectures, middlewares have become important tools to facilitate modular systems, which&#x2014;despite their complexity&#x2014;are easy to maintain and can be extended with minimal effort. Although numerous solutions have been developed in the last decades, only a few consider real-time computing. Regarding robotic systems, which interact with their environment on a physical level, this paradigm of computer science is inevitable, though, as it is a vital requirement for safe operation. In contrast to other domains that require real-time processing, modern robotic platforms need high modularity and complete determinism regarding execution and reaction times to be adaptable and extensible but also safe (<xref ref-type="bibr" rid="B51">Stankovic, 1988</xref>; <xref ref-type="bibr" rid="B49">Shin and Ramanathan, 1994</xref>; <xref ref-type="bibr" rid="B37">Oshana, 2006</xref>; <xref ref-type="bibr" rid="B55">W&#xf6;rn, 2006</xref>; <xref ref-type="bibr" rid="B57">Zurawski, 2006</xref>; <xref ref-type="bibr" rid="B19">Jahn, 2021</xref>).</p>
<p>The novel middleware presented in this work has its roots in just this challenge to combine both worlds in a single system. When working with the AMiRo platform (<xref ref-type="bibr" rid="B14">Herbrechtsmeier&#xa0;et&#xa0;al., 2016</xref>; <xref ref-type="bibr" rid="B15">Herbrechtsmeier, 2017</xref>), which features a heterogeneous, distributed real-time architecture, the application development became disproportionally difficult as complexity increased. The monolithic software design did not resemble the modular hardware, nor could it satisfy fundamental use cases for the robot. AMiRo features multiple microcontrollers (MCUs), which form a loosely coupled real-time system, but each of which is responsible for multiple tasks, such as power management, motor control, sensor fusion, wireless communication, and behavioral applications (<xref ref-type="bibr" rid="B45">Sch&#xf6;pping&#xa0;et&#xa0;al., 2015</xref>; <xref ref-type="bibr" rid="B46">Sch&#xf6;pping&#xa0;et&#xa0;al., 2018</xref>; <xref ref-type="bibr" rid="B21">Korthals&#xa0;et&#xa0;al., 2019</xref>; <xref ref-type="bibr" rid="B43">Sch&#xf6;pping and Kenneweg, 2022a</xref>; <italic>cf.</italic> <xref ref-type="fig" rid="F12">Figure&#xa0;12</xref>). By introducing a communication middleware to the real-time level of the platform, these issues should be resolved, and several existing solutions have been evaluated. Unfortunately, none could satisfy all requirements, which eventually led to the decision to develop a completely new system: &#xb5;RT (pronounced like &#x201c;Marty&#x201d;: [m&#xe1;:rti]).</p>
<p>Before &#xb5;RT is described in detail in <xref ref-type="sec" rid="s2">section&#xa0;2</xref>, several types of existing middlewares and fundamental concepts are presented in this section (<italic>cf.</italic> <xref ref-type="sec" rid="s1-1">sections&#xa0;1.1</xref> and <xref ref-type="sec" rid="s1-2">1.2</xref>). In <xref ref-type="sec" rid="s3">section&#xa0;3</xref>, &#xb5;RT is evaluated thoroughly in three aspects: feature set (<italic>cf.</italic> <xref ref-type="sec" rid="s3-1">section&#xa0;3.1</xref>), performance (<italic>cf.</italic> <xref ref-type="sec" rid="s3-2">section&#xa0;3.2</xref>), and usability for software developers (<italic>cf.</italic> <xref ref-type="sec" rid="s3-3">section&#xa0;3.3</xref>). The findings are briefly discussed in <xref ref-type="sec" rid="s4">section&#xa0;4</xref> before conclusions about &#xb5;RT are drawn in <xref ref-type="sec" rid="s4-1">section&#xa0;4.1</xref>, and future enhancements are proposed in <xref ref-type="sec" rid="s4-2">section&#xa0;4.2</xref>.</p>
<sec id="s1-1">
<title>1.1 Related work</title>
<p>Today, it is very common to use middlewares for communication in modular architectures. During the last decades, a great number of middlewares have been developed, with CORBA (<xref ref-type="bibr" rid="B56">Yang and Duddy, 1996</xref>), MQTT (<xref ref-type="bibr" rid="B50">Stanford-Clark and Hunkeler, 1999</xref>), and ROS (<xref ref-type="bibr" rid="B38">Quigley&#xa0;et&#xa0;al., 2009</xref>; <xref ref-type="bibr" rid="B23">Macenski&#xa0;et&#xa0;al., 2022</xref>) being some of the most popular ones. Using such tools has numerous advantages:<list list-type="simple">
<list-item>
<p>&#x2022; Compatible applications can be executed on any system that runs the according middleware, allowing for high code portability.</p>
</list-item>
<list-item>
<p>&#x2022; Existing software can be reused and integrated with minimal effort.</p>
</list-item>
<list-item>
<p>&#x2022; Realization of further applications is simplified due to uniform interfaces and additional debugging and profiling tools most solutions provide, leading to high-quality code while minimizing development time.</p>
</list-item>
</list>
</p>
<p>One major issue with existing middlewares is that only very few consider real-time computing. Thus, most cannot be used for such use cases. There are exceptions to this rule, such as real-time CORBA (<xref ref-type="bibr" rid="B11">Fay-Wolfe&#xa0;et&#xa0;al., 2000</xref>), Orocos (<xref ref-type="bibr" rid="B4">Bruyninckx, 2001</xref>), R2P (<xref ref-type="bibr" rid="B29">Migliavacca, 2013</xref>; <xref ref-type="bibr" rid="B26">Matteucci&#xa0;et&#xa0;al., 2015</xref>; <xref ref-type="bibr" rid="B28">Migliavacca, 2016</xref>), and ROS 2 (<xref ref-type="bibr" rid="B23">Macenski&#xa0;et&#xa0;al., 2022</xref>), although those have other disadvantages. Notably, neither of the aforementioned solutions features actual validation of timing constraints at runtime. However, for large, potentially harmful, or even lethal platforms, the detection of real-time violations is a crucial requirement for safe operation. Even though static scheduling techniques exist to determine a valid task execution sequence and prevent timing violations at runtime, methods and solutions become much more complex for distributed systems and require a high level of control over individual components (<xref ref-type="bibr" rid="B6">Di&#xa0;Natale and Stankovic, 2000</xref>; <xref ref-type="bibr" rid="B57">Zurawski, 2006</xref>).</p>
<sec id="s1-1-1">
<title>1.1.1 Real-time CORBA</title>
<p>Although CORBA is actually an open standard defined by the Object Management Group (<xref ref-type="bibr" rid="B30">OMG, 2021</xref>), it contains several design flaws, which are consequently inherited by all implementations, such as TAO (<xref ref-type="bibr" rid="B41">Schmidt&#xa0;et&#xa0;al., 1998</xref>), TAOX11 (<xref ref-type="bibr" rid="B40">Remedy&#xa0;IT, 2019</xref>), or omniORB (<xref ref-type="bibr" rid="B12">Grisby, 2022</xref>). Due to its design by committee, it suffers from several issues regarding complexity, redundancy, and missing features (<xref ref-type="bibr" rid="B13">Henning, 2006</xref>). Because real-time CORBA is a modification of the original specification (<xref ref-type="bibr" rid="B33">OMG, 2005</xref>), it incorporates the same issues, rendering it a suboptimal solution. Especially when targeting resource-constrained platforms such as MCUs, the high complexity of CORBA inevitably results in high resource requirements, which such devices can rarely (and if so, just barely) satisfy. As a result, all implementations of newer versions of the CORBA specifications only support sophisticated operating systems, such as Linux or Windows, but are not designed to be deployed on MCUs.</p>
</sec>
<sec id="s1-1-2">
<title>1.1.2 Orocos</title>
<p>Originally developed by <xref ref-type="bibr" rid="B4">Bruyninckx (2001)</xref>, the Orocos project is a collection of libraries and tools for the efficient development of robotics software, which is portable and has high runtime performance, with real-time support being one of its core aspects. Moreover, it can be combined with other middlewares if desired. For certain communication schemes, Orocos employs CORBA (<italic>cf.</italic> <xref ref-type="sec" rid="s1-1-1">section&#xa0;1.1.1</xref>; optional for local, non-distributed setups), and it can also be integrated with ROS (<xref ref-type="bibr" rid="B38">Quigley&#xa0;et&#xa0;al., 2009</xref>) and ROS 2 (<xref ref-type="bibr" rid="B23">Macenski&#xa0;et&#xa0;al., 2022</xref>). However, Orocos is not designed to be deployed on MCUs and does not feature validation of timing constraints at runtime.</p>
</sec>
<sec id="s1-1-3">
<title>1.1.3 R2P</title>
<p>R2P has been developed by <xref ref-type="bibr" rid="B29">Migliavacca (2013)</xref> as an alternative to ROS (<xref ref-type="bibr" rid="B38">Quigley&#xa0;et&#xa0;al., 2009</xref>), LCM (<xref ref-type="bibr" rid="B16">Huang&#xa0;et&#xa0;al., 2010</xref>), and FAMOUSO (<xref ref-type="bibr" rid="B48">Schulze and Zug, 2008</xref>; <xref ref-type="bibr" rid="B47">Schulze, 2009</xref>) with improved support for hard real-time systems. It is focused to be used on MCUs, which communicate <italic>via</italic> a controller area network (CAN), specifically the RTCAN protocol (<xref ref-type="bibr" rid="B27">Migliavacca&#xa0;et&#xa0;al., 2013</xref>). As such, it seemed appropriate for the AMiRo platform at first glance, as it is also based on ChibiOS (<xref ref-type="bibr" rid="B8">di&#xa0;Sirio, 2020</xref>, <xref ref-type="bibr" rid="B7">2022</xref>), just like AMiRo-OS (<xref ref-type="bibr" rid="B44">Sch&#xf6;pping&#xa0;et&#xa0;al., 2016</xref>), the real-time operating system (RTOS) of AMiRo. Unfortunately, R2P relies on dynamic memory allocation as it employs memory pools. Therefore, complete determinism cannot be guaranteed. Because the development of the project ceased in 2016, there was no support to implement the according modifications, and there is little detailed documentation about the project to be found.</p>
</sec>
<sec id="s1-1-4">
<title>1.1.4 ROS 2</title>
<p>The arguably most popular solution in robotics is ROS, which introduced real-time support with ROS 2 (<xref ref-type="bibr" rid="B39">Quigley, 2015</xref>; <xref ref-type="bibr" rid="B23">Macenski&#xa0;et&#xa0;al., 2022</xref>) and its extensions, micro-ROS (<xref ref-type="bibr" rid="B34">OSRF, 2022a</xref>) and RT-ROS (<xref ref-type="bibr" rid="B53">Wei&#xa0;et&#xa0;al., 2016</xref>; <xref ref-type="bibr" rid="B10">Faust, 2022</xref>), respectively. However, the overall performance of ROS 2 strongly depends on the utilized data distribution service (DDS; <xref ref-type="bibr" rid="B32">OMG, 2015</xref>) implementation (<xref ref-type="bibr" rid="B25">Maruyama&#xa0;et&#xa0;al., 2016</xref>). Regarding MCUs and micro-ROS, DDS for eXtremely Resource Constrained Environments (DDS-XRCE; <xref ref-type="bibr" rid="B31">OMG, 2019</xref>) must be employed, which specifies a centralized communication topology with multiple clients interacting with a single server&#x2014;an undesired architecture for distributed systems composed of equal participants. Because its popularity makes it the <italic>de facto</italic> standard solution in robotics, ROS 2 has been evaluated to a particular extent.</p>
<p>Although the ROS ecosystem is generally very powerful, there are indications that the real-time capabilities of ROS 2 are still not optimal. First, <xref ref-type="bibr" rid="B20">Kay and Tsouroukdissian (2015)</xref> presented empirical results of the official ROS 2 demo application for real-time use cases &#x201c;pendulum demo,&#x201d; which were promising overall. However, they showed occasional latency spikes, especially when the CPU was put under load. Because these benchmarks are rather dated and real-time capabilities might have been optimized since, another set of benchmarks was conducted,<xref ref-type="fn" rid="fn1">
<sup>1</sup>
</xref> which still confirms the limited suitability of ROS 2 for hard real-time applications. The results of these benchmarks are depicted in <xref ref-type="fig" rid="F1">Figure&#xa0;1</xref> and reveal two important findings. The histograms show the results of the same benchmarks as presented by <xref ref-type="bibr" rid="B20">Kay and Tsouroukdissian (2015)</xref>, and the original result data is resembled very well. However, no &#x201c;outliers&#x201d; were visible in the presentation due to the linear scaling of the frequency axis. When the CPU is put under load, these &#x201c;outliers&#x201d; become even more frequent and resemble a Gaussian distribution. This is problematic regarding real-time systems because latency is not limited by an upper bound. The issue becomes even more evident when considering the goal of a jitter of fewer than 30&#x2009;&#xb5;s (3% of 1&#xa0;ms period), as defined by <xref ref-type="bibr" rid="B20">Kay and Tsouroukdissian (2015)</xref>. For the benchmark with additional CPU load, almost 25% of all data points violate that constraint. Although the cause for the worse performance, despite process priorities configured in favor of the &#x201c;pendulum demo&#x201d; (real-time vs. nice), may be rooted in the OS rather than ROS 2, there are obviously no mechanisms in place to limit execution times or at least notify about high latencies.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>ROS 2 &#x201c;pendulum demo&#x201d; benchmark results. While the system<xref ref-type="fn" rid="fn1">
<sup>1</sup>
</xref> was only running the &#x201c;pendulum demo&#x201d; for the left histogram <bold>(A)</bold>, additional stress was put on the CPU for the right-hand results <bold>(B)</bold>. Although the results presented by <xref ref-type="bibr" rid="B20">Kay and Tsouroukdissian (2015)</xref> are reproduced very well, logarithmic scaling of the frequency axis reveals a significant number of samples with high latency.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g001.tif"/>
</fig>
<p>Further evidence of the limited real-time capabilities of ROS 2 can be found in the performance analyses by <xref ref-type="bibr" rid="B25">Maruyama&#xa0;et&#xa0;al. (2016)</xref>. The data reveal that ROS 2 scales worse than linear in many situations. Hence, strict timing constraints become exponentially more difficult to meet when system complexity increases. The data also show strong latency variations, even exceeding 10% of the median for data sizes of 1&#xa0;MB and more. Overall, the real-time capabilities of ROS 2 remain insufficient for scenarios where timing constraints are critical and must be respected and its high resource requirements render it unsuitable for MCUs without sacrificing decentralization.</p>
</sec>
</sec>
<sec id="s1-2">
<title>1.2 Interaction concepts</title>
<p>When designing a new midleware, several alternate paradigms can be followed. <xref ref-type="bibr" rid="B9">Eugster&#xa0;et&#xa0;al. (2003)</xref> gave a comprehensive overview, and the most important concepts are summarized as follows.</p>
<sec id="s1-2-1">
<title>1.2.1 Decoupling</title>
<p>One of the most important characteristics of any distributed communication framework is decoupling. Participants can be coupled in three domains, all of which should be omitted:<list list-type="simple">
<list-item>
<p>&#x2022; <sc>space</sc>: If participants must know each other in order to exchange information, they are coupled in space.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>time</sc>: In case producers and consumers both have to be active and connected when data is transmitted, they are coupled in time.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>synchronization</sc>: For systems coupled in this domain, execution is blocked when sending or receiving data.</p>
</list-item>
</list>
</p>
</sec>
<sec id="s1-2-2">
<title>1.2.2 Interaction</title>
<p>Furthermore, <xref ref-type="bibr" rid="B9">Eugster&#xa0;et&#xa0;al. (2003)</xref> described six fundamental concepts of interaction and how communication between participants is realized. The publish&#x2013;subscribe paradigm eventually achieves decoupling in all three domains and thus is the most powerful technique in this regard. Another very popular concept is remote procedure calls (RPCs), tightly coupled according to <xref ref-type="bibr" rid="B9">Eugster&#xa0;et&#xa0;al. (2003)</xref>, but allowing for &#x201c;pulling&#x201d; communication, whereas information can only be &#x201c;pushed&#x201d; with publish&#x2013;subscribe. Fortunately, the coupling can be relaxed by an extension of RPC, called &#x201c;future&#x201d; (<xref ref-type="bibr" rid="B1">Ananda&#xa0;et&#xa0;al., 1992</xref>) or &#x201c;wait-by-necessity&#x201d; (<xref ref-type="bibr" rid="B5">Caromel, 1993</xref>; <italic>cf.</italic> <xref ref-type="bibr" rid="B9">Eugster&#xa0;et&#xa0;al., 2003</xref>).</p>
</sec>
<sec id="s1-2-3">
<title>1.2.3 Addressing</title>
<p>In order to establish communication between producers and consumers in a decoupled manner, addressing information needs to be abstracted. There are several approaches to how this can be realized (<xref ref-type="bibr" rid="B9">Eugster&#xa0;et&#xa0;al., 2003</xref>).<list list-type="simple">
<list-item>
<p>&#x2022; <sc>topic/service-based</sc>: Producers provide information <italic>via</italic> a certain topic or service, usually identified by a name. Consumers can declare interest in specific information by such identifiers and will eventually receive all data provided <italic>via</italic> the according topic/service.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>content-based</sc>: Consumers can define a set of rules (or filters) on whether they will receive new data. Only if the content of a message meets these rules, it (the message) is delivered to the consumer.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>type-based</sc>: When a producer emits a message with a complex data type as payload, a consumer might be interested but in a subset of that data. Hence, only this part of the original message is delivered to that specific consumer.</p>
</list-item>
</list>
</p>
<p>Hybrid techniques are also possible, such as the scope-based approach of Robotics Service Bus (RSB) (<xref ref-type="bibr" rid="B54">Wienke and Wrede, 2011</xref>). It employs a URI format for scope names, introducing a hierarchy and filtering capabilities without defining any requirements on the actual information payload.</p>
</sec>
<sec id="s1-2-4">
<title>1.2.4 Quality of Service</title>
<p>Quality of service (QoS) is typically used to track information such as latencies and the number of delivered and discarded messages<italic>.</italic> However, timing constraints are of major importance to guarantee system stability and safety regarding real-time systems. Therefore, the according mechanisms can prioritize important communication and preempt others. Furthermore, the system can be monitored to detect critical failures (i.e., timing violations) as soon as possible and initiate an appropriate reaction. Hence, when timing constraints are not met, temporal behavior tracking and execution of defined routines are also part of QoS in the nomenclature of this work.</p>
</sec>
</sec>
</sec>
<sec id="s2">
<title>2 &#xb5;RT</title>
<p>Although the original motivation for the development of a new middleware was the modularization of the software running on the MCUs of AMiRo (<xref ref-type="bibr" rid="B14">Herbrechtsmeier&#xa0;et&#xa0;al., 2016</xref>; <xref ref-type="bibr" rid="B15">Herbrechtsmeier, 2017</xref>), several additional goals were specified to make the resulting system applicable for a wide range of other devices with very strict real-time requirements:<list list-type="simple">
<list-item>
<p>1. Memory footprint small enough for mainstream and ultra-low-power MCUs.</p>
</list-item>
<list-item>
<p>2. Throughout real-time capability per completely deterministic and very consistent behavior at runtime.</p>
</list-item>
<list-item>
<p>3. At most linear scaling with increasing system complexity (e.g., number of participants).</p>
</list-item>
<list-item>
<p>4. Validation of timing constraints at runtime.</p>
</list-item>
<list-item>
<p>5. Support of periodic/time-based and event-based communication schemes.</p>
</list-item>
<list-item>
<p>6. Easy-to-use interfaces that help developers create correct and efficient code.</p>
</list-item>
<list-item>
<p>7. Interoperability with existing middleware.</p>
</list-item>
<list-item>
<p>8. High configurability to adapt the system to any specific use case.</p>
</list-item>
</list>
</p>
<p>The proposed solution to that challenge&#x2014;&#xb5;RT&#x2014;is an entirely event-based system, featuring a low memory footprint, full real-time capabilities, and built-in validation of timing constraints at runtime. It features a topic-based publish&#x2013;subscribe architecture and future RPCs (<italic>cf.</italic> <xref ref-type="sec" rid="s1-2">section&#xa0;1.2</xref>). It is implemented<xref ref-type="fn" rid="fn2">
<sup>2</sup>
</xref> in C (<xref ref-type="bibr" rid="B43">Sch&#xf6;pping and Kenneweg, 2022a</xref>) and declares all interface functions to external components by its operating system abstraction layer (OSAL), as described in <xref ref-type="sec" rid="s2-4">section&#xa0;2.4</xref>. The implementation is highly configurable at compile time through a comprehensive set of feature flags, which allow disabling entire subsystems (e.g., publish&#x2013;subscribe or RPC) to reduce memory footprint and improve performance. An overview of the &#xb5;RT architecture is depicted in <xref ref-type="fig" rid="F2">Figure&#xa0;2</xref>. Before the several components are described in detail in <xref ref-type="sec" rid="s2-5">sections&#xa0;2.5&#x2013;2.7</xref>, some basic concepts about its real-time classes and constraints and the fundamental approach of &#xb5;RT are presented in <xref ref-type="sec" rid="s2-1">sections&#xa0;2.1</xref>&#x2013;<xref ref-type="sec" rid="s2-3">2.3</xref>. Finally, the interface-agnostic approach to interacting with other components (e.g., foreign middlewares) in sophisticated, complex systems is described in <xref ref-type="sec" rid="s2-8">section&#xa0;2.8</xref>.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>&#xb5;RT architecture overview. While the <italic>thread</italic> type is defined by the underlying operating system <italic>via</italic> OSAL and <italic>payload</italic> are individual types for each <italic>topic</italic> and <italic>request</italic>, all other components are specified by &#xb5;RT.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g002.tif"/>
</fig>
<sec id="s2-1">
<title>2.1 Types of constraints</title>
<p>&#xb5;RT defines three types of timing constraints: latency, synchronicity, and rate. If a constraint is met, its validation function results to 1, whereas a value of 0 indicates a timing violation.</p>
<sec id="s2-1-1">
<title>2.1.1 Latency</title>
<p>Often referred to as &#x201c;deadline,&#x201d; a maximum expected latency <italic>&#x3c4;</italic> for information propagation can be specified. It is defined as a function <italic>l</italic>(<italic>&#x3c4;</italic>, &#x394;<italic>t</italic>) with &#x394;<italic>t</italic> the duration of an operation so far:<disp-formula id="e1">
<mml:math id="m1">
<mml:mi>l</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c4;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if&#x2009;</mml:mtext>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>&#x3c4;</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>otherwise</mml:mtext>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(1)</label>
</disp-formula>
</p>
</sec>
<sec id="s2-1-2">
<title>2.1.2 Synchronicity</title>
<p>For periodic tasks, it is often required that all iterations take similarly long and execution time varies as little as possible. For real-time systems, this &#x201c;jitter&#x201d; must be limited by an upper bound <italic>&#x3b4;</italic>. By tracking the minimum and maximum iteration times (<italic>t</italic>
<sub>min</sub> and <italic>t</italic>
<sub>max</sub>) during system operation, the validity of the synchronicity constraint <italic>s</italic>(<italic>&#x3b4;</italic>, <italic>t</italic>
<sub>min</sub>, <italic>t</italic>
<sub>max</sub>) can be calculated by<disp-formula id="e2">
<mml:math id="m2">
<mml:mi>s</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>min</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if&#x2009;</mml:mtext>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>min</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>&#x3b4;</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>otherwise</mml:mtext>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(2)</label>
</disp-formula>
</p>
</sec>
<sec id="s2-1-3">
<title>2.1.3 Rate</title>
<p>Although this constraint is not considered at all by most authors, it is crucial to detect the complete failure of individual components in an event-driven system at runtime. If a data source does not provide any further information, no data processing pipeline will be triggered, and neither latency nor synchronicity constraints will ever be violated. A possible solution to this challenge is the implementation of a dead man&#x2019;s switch, which is monitored and checked for regular activation by another component. Alternatively, rate constraints can be validated without the need for a dedicated monitor by introducing a maximum period <italic>&#x3f5;</italic> between subsequent data points and comparison of the current time <italic>t</italic> and the time of the latest data point <italic>t</italic>
<sub>
<italic>i</italic>&#x2212;1</sub>:<disp-formula id="e3">
<mml:math id="m3">
<mml:mi>r</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x3d;</mml:mo>
<mml:mfenced open="{" close="">
<mml:mrow>
<mml:mtable class="cases">
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>1</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>if&#x2009;</mml:mtext>
<mml:mi>t</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:mi>&#x3f5;</mml:mi>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mn>0</mml:mn>
<mml:mo>,</mml:mo>
<mml:mspace width="1em"/>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mtext>otherwise</mml:mtext>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(3)</label>
</disp-formula>
</p>
</sec>
</sec>
<sec id="s2-2">
<title>2.2 Real-time classes</title>
<p>&#xb5;RT distinguishes four classes of real time: hard, firm, soft, and non-real-time. Most authors consider only two classes&#x2014;hard and soft&#x2014;because the other definitions are special cases of the latter (<xref ref-type="bibr" rid="B37">Oshana, 2006</xref>; <xref ref-type="bibr" rid="B55">W&#xf6;rn, 2006</xref>). However, from an implementation point of view, it makes sense to consider all four cases. The common ground for all classes is that usefulness <italic>u</italic> &#x2208; [0, 1] is calculated so that the major differences are further restrictions in the mapping functions and interpretation of <italic>u</italic>.</p>
<sec id="s2-2-1">
<title>2.2.1 Non-real-time (NRT)</title>
<p>This trivial class has no real-time constraints at all. As a result, <italic>u</italic> &#x3d; 1 always holds.</p>
</sec>
<sec id="s2-2-2">
<title>2.2.2 Soft real-time (SRT)</title>
<p>As the most general class, the mapping &#x394;<italic>t</italic>&#x21a6;<italic>u</italic> can be of any form for SRT. Each component may define an individual mapping function to calculate <italic>u</italic> in order to assess the quality of each data point during operation. While monotonic decreasing functions are most common, partial functions can be used to model desired temporal frames (i.e., to represent jitter constraints). Most notably, the NRT and FRT classes are, in fact, special cases of SRT.</p>
</sec>
<sec id="s2-2-3">
<title>2.2.3 Firm real-time (FRT)</title>
<p>This class further restricts <italic>u</italic> to be either 1 or 0 (&#x201c;valid&#x201d; or &#x201c;invalid&#x201d;). Such a distinction makes sense from an implementation perspective for two reasons. Calculations and representations do not require &#x201c;sophisticated&#x201d; data types, such as <monospace>float</monospace>. Because many MCUs do not feature an FPU (floating-point unit), emulation of such types is computationally expensive and may result in temporal inconsistency. Furthermore, this allows for a general calculation of <italic>u</italic>, depending on constraints for latency, synchronicity, and rate:<disp-formula id="e4">
<mml:math id="m4">
<mml:mi>u</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mi>l</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3c4;</mml:mi>
<mml:mo>,</mml:mo>
<mml:mi mathvariant="normal">&#x394;</mml:mi>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>s</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b4;</mml:mi>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>min</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>r</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>i</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>t</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(4)</label>
</disp-formula>Note that each factor can be &#x201c;deactivated&#x201d; by setting its parameter (<italic>&#x3c4;</italic>, <italic>&#x3b4;</italic>, or <italic>&#x3f5;</italic>, respectively) to <italic>&#x221e;</italic>.</p>
</sec>
<sec id="s2-2-4">
<title>2.2.4 Hard real-time (HRT)</title>
<p>Similar to FRT, the usefulness <italic>u</italic> is interpreted more strictly for this class. Violations of hard real-time constraints (<italic>u</italic> &#x3d; 0) are considered severe incidents. The system is assumed to be in an undefined state. It may even be dangerous to itself and its environment. Such events must be detected and handled as quickly as possible to restore a stable situation and prevent any harm. This detection of violations is a key feature of &#xb5;RT and is implemented using timers, which will trigger either a recovery attempt (can be defined for each component individually) or a system panic (system-wide default) exactly when a violation occurs.</p>
<p>Furthermore, &#xb5;RT forbids HRT transmissions to be &#x201c;overwritten,&#x201d; which might result in the loss of a vital data point. As a result, further communication may be blocked as long as one or more HRT consumers have not processed previous messages yet (<italic>cf.</italic> <xref ref-type="sec" rid="s2-6">section&#xa0;2.6</xref>).</p>
</sec>
</sec>
<sec id="s2-3">
<title>2.3 Design concepts</title>
<p>Now that the fundamental definitions of constraints and real-time classes have been presented, several particularities remain about how &#xb5;RT achieves its real-time characteristics. Most importantly, &#xb5;RT uses a sophisticated approach to track communication timestamps to detect violations of real-time constraints, which is detailed in <xref ref-type="sec" rid="s2-3-2">section&#xa0;2.3.2</xref>.</p>
<sec id="s2-3-1">
<title>2.3.1 Event-driven system design</title>
<p>&#xb5;RT fully embraces the paradigm of event-driven architectures and avoids any periodic polling. This ensures that all events are handled as soon as possible with minimal latency and task prioritization and preemption are left to the scheduler of the underlying RTOS. Due to the absence of periodic &#x201c;synchronization points,&#x201d; jitter may increase, though, if the runtime complexity of some components varies greatly during operation. However, real-time software, in general, should be designed to exhibit consistent processing time in the first place. As a result, systems using &#xb5;RT are more sensitive to bad implementations (concerning real-time characteristics), so developers will be encouraged to optimize such a code. Nevertheless, periodic execution of tasks with a given frequency remains desired in many situations, such as reading sensor data. With &#xb5;RT, such behavior can be realized by means of periodic timers, which regularly fire with a specified frequency and emit events that eventually trigger task execution. This method is more elaborate as it involves an additional component (the timer) to achieve the time-triggered operation of the event-driven system, but that is actually intended. Because event-triggered task execution should be preferred in most situations, &#xb5;RT deliberately encourages developers to follow this software design paradigm.</p>
</sec>
<sec id="s2-3-2">
<title>2.3.2 Validation of timing constraints</title>
<p>Another important aspect of &#xb5;RT is its approach to tracking latencies and validation of timing constraints at runtime, which are not defined per data point (e.g., sensor data have to be processed within a certain time frame), but by individual participants in the system (e.g., information must be received before it is older than <italic>&#x3c4;</italic>). This approach effectively results in usability values per data point <italic>and</italic> consumer, so each participant can define and validate its individual timing constraints independently. Especially if additional stages are added to a data processing pipeline, making it more expensive regarding computation time, constraints of later stages remain valid and require no adjustment.</p>
<p>A crucial detail for this approach to work is correct tracking of the origin times of information, which is not the same as when the data are being transmitted within a system. While that data contains information, the latter emerges as soon as an event or state is observed and not only when it is encoded into some form of data structure, such that<disp-formula id="e5">
<mml:math id="m5">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>info</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2264;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>data</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(5)</label>
</disp-formula>holds. This definition is particularly important with regard to data processing pipelines, in which multiple components are arranged in a chain. After each stage in that pipeline, data is transmitted to the following component, and <italic>t</italic>
<sub>data,<italic>i</italic>
</sub> increases continuously, whereas <italic>t</italic>
<sub>info,<italic>i</italic>
</sub> remains unchanged.<xref ref-type="fn" rid="fn3">
<sup>3</sup>
</xref> The benefits of this approach become obvious when analyzing the opposite case. If each component <inline-formula id="inf1">
<mml:math id="m6">
<mml:mi>k</mml:mi>
<mml:mo>&#x2208;</mml:mo>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:mn>2</mml:mn>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:mfenced>
</mml:math>
</inline-formula> in a data processing pipeline of length <italic>n</italic> would define its own relative deadline <italic>&#x3c4;</italic>
<sub>
<italic>k</italic>
</sub> &#x3e; 0 regarding its preceding stage, the overall deadline of the entire pipeline <italic>&#x3c4;</italic>&#x2032; would be defined by<disp-formula id="e6">
<mml:math id="m7">
<mml:msup>
<mml:mrow>
<mml:mi>&#x3c4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x2264;</mml:mo>
<mml:munderover accentunder="false" accent="true">
<mml:mrow>
<mml:mo>&#x2211;</mml:mo>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
<mml:mo>&#x3d;</mml:mo>
<mml:mn>2</mml:mn>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:munderover>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3c4;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>k</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(6)</label>
</disp-formula>
</p>
<p>The edge case of an equilibrium would only occur if all components fully exhaust their time budget: &#x394;<italic>t</italic>
<sub>
<italic>k</italic>
</sub> &#x3d; <italic>&#x3c4;</italic>
<sub>
<italic>k</italic>
</sub>
<italic>&#x2200;k</italic>. As soon as any component requires less time (&#x394;<italic>t</italic>
<sub>
<italic>k</italic>
</sub> &#x3c; <italic>&#x3c4;</italic>
<sub>
<italic>k</italic>
</sub>), the overall time budget <italic>&#x3c4;</italic>&#x2032; is also reduced by that difference: <italic>&#x3c4;</italic>&#x2032; &#x2190; <italic>&#x3c4;</italic>&#x2032; &#x2212; (<italic>&#x3c4;</italic>
<sub>
<italic>k</italic>
</sub> &#x2212; &#x394;<italic>t</italic>
<sub>
<italic>k</italic>
</sub>). As a result, pipelines might miss <italic>&#x3c4;</italic>&#x2032; because individual components are too fast, or all <italic>&#x3c4;</italic>
<sub>
<italic>k</italic>
</sub> need to be increased to compensate for this effect, resulting in an overly optimistic initial value of <italic>&#x3c4;</italic>&#x2032;, which is no longer related to the actual use case. By referencing all timing constraints to the absolute origin time of information <italic>t</italic>
<sub>info</sub>, the constraints of the entire pipeline are defined exactly by the last component, and each previous component defines the timing constraints of the pipeline up to that stage.</p>
<p>&#xb5;RT specifies an information time <italic>t</italic>
<sub>info,<italic>i</italic>
</sub> per data point <italic>i</italic> and validation of all timing constraints always refer to this value. For latency constraints, the point in time <italic>t</italic>
<sub>l,<italic>i</italic>
</sub> at which the deadline <italic>&#x3c4;</italic> is missed is hence defined by<disp-formula id="e7">
<mml:math id="m8">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>l</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>info</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3c4;</mml:mi>
</mml:math>
<label>(7)</label>
</disp-formula>and &#xb5;RT can thus arm a timer to trigger as soon as <italic>t</italic>
<sub>l,<italic>i</italic>
</sub> has elapsed, indicating a timing violation. The two critical times for synchronicity constraints, <inline-formula id="inf2">
<mml:math id="m9">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mtext>min</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> and <inline-formula id="inf3">
<mml:math id="m10">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula>, are likewise defined by<disp-formula id="e8">
<mml:math id="m11">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mtext>min</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mi>&#x3b4;</mml:mi>
<mml:mspace width=".2em"/>
<mml:mtext>and</mml:mtext>
</mml:math>
<label>(8)</label>
</disp-formula>
<disp-formula id="e9">
<mml:math id="m12">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>min</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b4;</mml:mi>
</mml:math>
<label>(9)</label>
</disp-formula>While <inline-formula id="inf4">
<mml:math id="m13">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is validated by means of a timer as well (actually only a single timer is required for latency and synchronicity validation; <italic>cf.</italic> Equation&#xa0;<xref ref-type="disp-formula" rid="e12">12</xref>; <xref ref-type="sec" rid="s2-6">sections&#xa0;2.6</xref> and <xref ref-type="sec" rid="s2-7">2.7</xref>), <inline-formula id="inf5">
<mml:math id="m14">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mtext>min</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:math>
</inline-formula> is checked whenever data is retrieved by the consumer. If it was fetched too early, a timing violation has occurred. Regarding the rate, only the most critical constraint <italic>&#x3f5;</italic>&#x2032; among all <italic>n</italic> consumers of a data source needs to be considered for the definition of the critical time <italic>t</italic>
<sub>r,<italic>i</italic>&#x2b;1</sub>:<disp-formula id="e10">
<mml:math id="m15">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3d;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>info</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mspace width=".2em"/>
<mml:mtext>with</mml:mtext>
</mml:math>
<label>(10)</label>
</disp-formula>
<disp-formula id="e11">
<mml:math id="m16">
<mml:msup>
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
<mml:mo>&#x3d;</mml:mo>
<mml:mtext>min</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mfenced open="{" close="}">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mo>&#x2026;</mml:mo>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mi>n</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(11)</label>
</disp-formula>
</p>
<p>Hence, validation of <italic>&#x3f5;</italic>&#x2032; is not performed every time data is fetched by a consumer, but only when it is provided by the producer. Therefore, rate validation does not require another timer for each consumer but only one per producer (at most; <italic>cf.</italic> <xref ref-type="sec" rid="s2-6">section&#xa0;2.6</xref>).</p>
<p>Due to these mechanics, some possible side effects should be kept in mind when working with &#xb5;RT. When data is provided by a producer, the contained information might already violate the latency or synchronicity constraints of consumers:<disp-formula id="e12">
<mml:math id="m17">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>data</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3e;</mml:mo>
<mml:mtext>min</mml:mtext>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>l</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mtext>s</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mtext>max</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(12)</label>
</disp-formula>A similar effect occurs whenever the difference between <italic>t</italic>
<sub>info,<italic>i</italic>
</sub> and <italic>t</italic>
<sub>data,<italic>i</italic>
</sub> exceeds a rate constraint:<disp-formula id="e13">
<mml:math id="m18">
<mml:mtable class="align">
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>data</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>info</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3e;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mspace width="-3em"/>
<mml:mo>&#x21d4;</mml:mo>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>data</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3e;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>info</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:msup>
<mml:mrow>
<mml:mi>&#x3f5;</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mo>&#x2032;</mml:mo>
</mml:mrow>
</mml:msup>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="left">
<mml:mspace width="-3em"/>
<mml:mo>&#x21d4;</mml:mo>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>data</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3e;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(13)</label>
</disp-formula>As a result, a timing violation is detected as soon as the data is committed. Strictly speaking, this is already too late because, in both cases, the critical point in time has already elapsed. For &#xb5;RT&#x2019;s validation mechanisms, there is obviously no way of knowing about such data before it exists. Although detection of timing violations might be delayed in such situations, &#xb5;RT still acts as quickly as possible.</p>
<p>There is yet another possible edge case that should be considered when specifying the rate constraints of consumers. Because of Equation&#xa0;<xref ref-type="disp-formula" rid="e5">5</xref>, &#xb5;RT might detect a rate violation, although future data would provide valid information:<disp-formula id="e14">
<mml:math id="m19">
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>info</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>r</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>&#x3c;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>t</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>data</mml:mtext>
<mml:mo>,</mml:mo>
<mml:mi>i</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
</mml:math>
<label>(14)</label>
</disp-formula>Therefore, rate checks in &#xb5;RT are rather conservative, and constraints <italic>&#x3f5;</italic> should be specified with this in mind.</p>
<p>Finally, a last particularity of &#xb5;RT&#x2019;s timing validation mechanics is worth pointing out. As already mentioned, all constraints are defined by consumers, so in a sequential data processing pipeline, there are two steps for which no constraints can be defined: the observation, which initiates the pipeline, and the ultimate action at its end. In the former case, latency and jitter do not apply, and the rate can be validated by the subsequent component. However, for the latter case, the timing of the final action can only be validated by yet another consumer. The component that executes the action needs to provide information to confirm that the action has been conducted, and the additional component&#x2014;also called <italic>monitor</italic>&#x2014;consumes this information and validates its real-time behavior. While the use of such monitors seems complicated and inefficient at first glance, a single component can monitor all pipelines in a system, resulting in only minimal overhead.</p>
</sec>
<sec id="s2-3-3">
<title>2.3.3 Concurrency and mutual exclusion</title>
<p>For control of concurrent access to shared data structures, &#xb5;RT relies on mutex locks and condition variables. Although lock-free methods are generally to be preferred for real-time systems (<xref ref-type="bibr" rid="B2">Anderson&#xa0;et&#xa0;al., 1997</xref>), they are difficult to realize for many aspects of &#xb5;RT, in particular without the C concurrency support library (stdatomic.h), which was only introduced with C11 (<xref ref-type="bibr" rid="B17">ISO, 2011</xref>) and would make &#xb5;RT unusable for projects that do not support this version of the C standard. Especially in the context of MCUs, more conservative standards are often preferred (even Linux was only recently lifted to C11 from C89; <xref ref-type="bibr" rid="B52">Torvalds&#xa0;et&#xa0;al., 2022</xref>). Conversely, most MCUs feature only a single core anyway, such that the benefits of a lock-free implementation are rather limited.</p>
</sec>
<sec id="s2-3-4">
<title>2.3.4 Configurability</title>
<p>In order to adapt &#xb5;RT to the specific requirements of individual use cases, multiple feature flags and settings are provided to configure the implementation at compile time. First and foremost, the three subsystems&#x2014;synchronization, publish&#x2013;subscribe, and RPC (<italic>cf.</italic> <xref ref-type="fig" rid="F2">Figure&#xa0;2</xref>)&#x2014;can each be enabled or disabled as required, and another global flag selects between debug and release builds. These settings are particularly useful if code size needs to be reduced to reduce ROM utilization. Selecting a release build also disables many sanity checks and improves performance tremendously.</p>
<p>There are several more settings regarding the two communication subsystems. On the one hand, tracking of profiling information can be enabled or disabled for each of the two subsystems. While such information can help track down bottlenecks, the logic obviously requires additional resources in ROM, RAM, and CPU time. On the other hand, the validation of timing constraints can be enabled or disabled as required <italic>via</italic> a total of five flags; for publish&#x2013;subscribe validation of latency, synchronicity and rate constraints can be selected individually, and the same applies for latency and synchronicity constraints for RPC interaction. Even with all validation logic disabled, &#xb5;RT still distinguishes the four real-time classes (<italic>cf.</italic> <xref ref-type="sec" rid="s2-2">section&#xa0;2.2</xref>), which is a perfectly legitimate use case. Once again, disabling these components saves resources in all three domains.</p>
<p>Further settings allow fine-tuning &#xb5;RT even further by setting the sizes (i.e., number of bits) for several frequently used data types, such as temporal delays<xref ref-type="fn" rid="fn4">
<sup>4</sup>
</xref> and identifiers for topics and services (<italic>cf.</italic> <xref ref-type="sec" rid="s2-6">sections&#xa0;2.6</xref> and <xref ref-type="sec" rid="s2-7">2.7</xref>). There are also flags to select alternative algorithms for selected components of &#xb5;RT, although these are not recommended for most scenarios and therefore are not discussed in this work. Finally, more settings allow configuring and interfacing OSAL, the abstraction layer for interaction with the operating system (<italic>cf.</italic> <xref ref-type="sec" rid="s2-4">section&#xa0;2.4</xref>).</p>
</sec>
</sec>
<sec id="s2-4">
<title>2.4 Operating system abstraction layer</title>
<p>&#xb5;RT defines its own abstraction layer to interface the underlying OS and event system. For applications using this middleware, it is recommended to stick to this API as well to ensure portability. The following features must be made available to &#xb5;RT by mapping the according functions to OSAL.<list list-type="simple">
<list-item>
<p>&#x2022; <sc>unique timestamps</sc>: Hardware timers in many MCUs feature only limited ranges (i.e., 16 or 32&#x2009;bits) and tend to overflow frequently when setting the frequency to high values (e.g., 1&#xa0;MHz). By definition, &#xb5;RT uses timestamps at 1&#x2009;&#xb5;s resolution and requires the RTOS to provide an according accumulated system time or map a lower resolution time to &#xb5;s equivalents.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>mutex locks and condition variables</sc>: Concurrent access to several components of &#xb5;RT is prevented <italic>via</italic> mutex locks. Condition variables are used to inform nodes asynchronously about released locks.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>timers</sc>: &#xb5;RT makes extensive use of timers to detect timing violations. Preferably the RTOS uses actual hardware timers so that violations result in the execution of an interrupt service routine (ISR) and according reactions are triggered as soon as possible.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>threads</sc>: OSAL defines a set of functions to control thread execution. Although thread handling may differ significantly between individual RTOSes, only very common functions are required by &#xb5;RT.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>event system</sc>: &#xb5;RT does not implement its own event system but relies on an externally provided implementation. Such can be part of the RTOS (as is the case for ChibiOS; <xref ref-type="bibr" rid="B8">di&#xa0;Sirio, 2020</xref>, <xref ref-type="bibr" rid="B7">2022</xref>), or another system can be mapped to OSAL. &#xb5;RT requires events to be emitted <italic>via</italic> broadcasts, and threads can be signaled individually.</p>
</list-item>
<list-item>
<p>&#x2022; <sc>output</sc>: In order to print messages to output and error streams, the according functions must be provided. While in most cases, these will be aliases to the standard C function <monospace>fprintf()</monospace>, there are exceptions where this is not available (as is the case with AMiRo-OS).</p>
</list-item>
<list-item>
<p>&#x2022; <sc>assert</sc>: When built with debug flags enabled, &#xb5;RT performs many sanity checks in the form of assertions. As with the output functions, the OSAL assertion can be mapped directly to the standard C <monospace>assert()</monospace>. When further code (e.g., to stop a motor) shall be executed, such can be easily induced at this point.</p>
</list-item>
</list>
</p>
</sec>
<sec id="s2-5">
<title>2.5 Core components</title>
<p>As shown in <xref ref-type="fig" rid="F2">Figure&#xa0;2</xref>, the fundamental components of &#xb5;RT comprise the <italic>core</italic> and <italic>nodes</italic> as well as an optional mechanism to synchronize <italic>nodes</italic>. As a central entity, the <italic>core</italic> is a static data structure, which exists exactly once and is globally available within a &#xb5;RT context. It holds lists of all <italic>nodes</italic>, <italic>topics</italic>, and <italic>services</italic> and offers methods to control execution flow on a top level.</p>
<p>
<italic>Nodes</italic> define the interface for the actual participants in the system. Each <italic>node</italic> is executed in its individual thread but may control further threads. The <monospace>main()</monospace> function for each <italic>node thread</italic> is part of the &#xb5;RT implementation and subdivides the lifespan of each <italic>node</italic> into three phases, each of which can be interfaced <italic>via</italic> a custom callback function.<list list-type="simple">
<list-item>
<p>1. <sc>startup</sc>: This initialization phase is individual to each <italic>node.</italic> Before execution proceeds to the next stage, all <italic>nodes</italic> are synchronized by the <italic>core.</italic>
</p>
</list-item>
<list-item>
<p>2. <sc>operation</sc>: Since &#xb5;RT follows a strictly event-based approach, actions will only be performed if the <italic>node thread</italic> is triggered by some event source. Such triggers can be anything (e.g., communication, timers, or hardware interrupts) and are fully customizable. The only mandatory event belongs to the <italic>core</italic> in case of a shutdown request or a system panic.</p>
</list-item>
<list-item>
<p>3. <sc>shutdown</sc>: As soon as a <italic>node</italic> is requested to stop, it enters this final phase. The reason for the shutdown is propagated to all <italic>nodes</italic>, so appropriate actions can be executed.</p>
</list-item>
</list>
</p>
<p>In many situations, it is useful to synchronize multiple threads. This behavior is not trivial to realize by events only as each involved thread would require information about the others, resulting in a violation of the decoupling requirements (<italic>cf.</italic> <xref ref-type="sec" rid="s1-2-1">section&#xa0;1.2.1</xref>). To this end, &#xb5;RT features <italic>syncgroups</italic> that can hold an arbitrary number of <italic>syncnodes</italic>
<xref ref-type="fn" rid="fn5">
<sup>5</sup>
</xref> to be synchronized. Each thread that has joined a <italic>syncgroup</italic> can call a non-blocking <monospace>synchronize()</monospace> method at some point in time. If the result of that function call indicates that some <italic>syncnodes</italic> of the <italic>syncgroup</italic> have not synchronized yet, the calling thread has to wait for a synchronization event. As soon as the final <italic>syncnode</italic> executes that method, this event is emitted to the entire <italic>syncgroup</italic>, except for the calling thread, which receives an according return value. For use cases where the &#xb5;RT synchronization mechanism is not desired, it can be disabled entirely <italic>via</italic> a feature flag. If a system comprises multiple &#xb5;RT contexts (<italic>cf.</italic> <xref ref-type="sec" rid="s2-8">section&#xa0;2.8</xref>), these mechanics can also be employed to synchronize all <italic>nodes</italic> in the entire system. This is done once by default to make all <italic>nodes</italic> enter the operation phase simultaneously.</p>
</sec>
<sec id="s2-6">
<title>2.6 Publish&#x2013;subscribe</title>
<p>For unidirectional communication, <italic>publishers</italic> provide information anonymously through <italic>topics</italic>, which act as mediators and inform all registered <italic>subscribers</italic> (<italic>cf.</italic> <xref ref-type="fig" rid="F3">Figure&#xa0;3</xref>). In order to retrieve a <italic>topic</italic> by its identifier (&#xb5;RT uses no strings but numerical values to identify <italic>topics</italic>), the <italic>core</italic> provides the according methods to search among all available topics.<xref ref-type="fn" rid="fn6">
<sup>6</sup>
</xref> While <italic>publishers</italic> are registered to a <italic>topic</italic> at initialization, <italic>subscribers</italic> can subscribe and unsubscribe dynamically during operation. Every <italic>topic</italic> holds one or more <italic>messages</italic> in a ring buffer, each of which holds a custom payload structure to carry data. This buffer is implemented as a distributed list instead of a contiguous array. Therefore, further elements can be added by any component at any point in time.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Visualization of a publish&#x2013;subscribe interaction in &#xb5;RT. Information is provided by an arbitrary number of <italic>publishers</italic> and passed <italic>via</italic> a <italic>topic</italic> to an arbitrary number of <italic>subscribers</italic> (<inline-graphic xlink:href="frobt-10-1081875-fx1.tif"/>). <inline-graphic xlink:href="frobt-10-1081875-fx2.tif"/>represent aggregations (i.e., pointers in C). Data are buffered by the <italic>topic</italic> in a ring buffer of <italic>messages</italic> of arbitrary size <inline-formula id="inf6">
<mml:math id="m20">
<mml:mo>&#x2265;</mml:mo>
<mml:mn>1</mml:mn>
</mml:math>
</inline-formula>. Each message holds a counter of remaining <italic>HRT subscribers</italic>, so the <italic>topic</italic> will only reuse a <italic>message</italic> if its counter is 0. While each subscriber class holds different members, all track the last message consumed. <italic>HRT subscribers</italic> are also arranged in a list, starting at the <italic>topic</italic> and ordered by their rate constraints. In the depicted situation, only one more <italic>message</italic> can be published before the upper <italic>HRT subscriber</italic> has to fetch the lowermost <italic>message</italic>.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g003.tif"/>
</fig>
<p>The timestamp of each <italic>message</italic> is of major importance. As described in <xref ref-type="sec" rid="s2-3-2">section&#xa0;2.3.2</xref>, it does not describe the point in time when the <italic>message</italic> was published (<italic>t</italic>
<sub>data</sub>), but the origin time of the contained information (<italic>t</italic>
<sub>info</sub>). Due to this differentiation, the <italic>message</italic> buffer of each <italic>topic</italic> is not ordered by <italic>t</italic>
<sub>data</sub> but by <italic>t</italic>
<sub>info</sub>, so that the latest element in the buffer will always be the <italic>message</italic> with the latest information. Conversely, when a new <italic>message</italic> that carries older information is published, it is not appended but rather enqueued according to its <italic>t</italic>
<sub>info</sub> value.</p>
<p>Whenever information is published, several steps are executed by &#xb5;RT:<list list-type="simple">
<list-item>
<p>1. The <italic>publisher</italic> requests a <italic>message</italic> from the <italic>topic.</italic> If no <italic>message</italic> is available due to pending <italic>HRT subscribers</italic> (<italic>cf.</italic> <xref ref-type="sec" rid="s2-2">section&#xa0;2.2</xref>) or if the oldest element in the buffer already holds more recent information, the publish attempt fails. Otherwise, the metadata of the <italic>message</italic>, such as information time, is updated, and payload data is copied to its buffer. After that, the <italic>message</italic> is enqueued again in the <italic>topic</italic>&#x2019;s buffer, according to its <italic>t</italic>
<sub>info</sub>.</p>
</list-item>
<list-item>
<p>2. Metadata at the <italic>topic</italic> is updated. If the published <italic>message</italic> is the latest one in the buffer, the <italic>topic</italic>&#x2019;s rate timer is re-armed according to the timestamp of the new <italic>message</italic> and the most critical rate constraint among all registered <italic>HRT subscribers</italic> <italic>&#x3f5;</italic>&#x2032;. Each <italic>topic</italic> also holds a list of all registered <italic>HRT subscribers</italic>, so their timers to detect latency or jitter violations are updated as well. Finally, an event is emitted to inform all registered <italic>subscribers</italic> about the new <italic>message.</italic>
</p>
</list-item>
<list-item>
<p>3. A registered <italic>subscriber</italic> can fetch the next <italic>message</italic> from the buffer and copy its payload. In case multiple <italic>messages</italic> have been published since the last iteration of this <italic>subscriber</italic>, those can either be fetched subsequently, or the <italic>subscriber</italic> can fetch the latest <italic>message</italic> directly. For <italic>HRT subscribers</italic>, the timer is updated or deactivated if there are no further pending <italic>messages. SRT subscribers</italic> and <italic>FRT subscribers</italic> can calculate the usefulness <italic>u</italic> of the fetched <italic>message</italic> (<italic>cf.</italic> <xref ref-type="sec" rid="s2-2">section&#xa0;2.2</xref>).</p>
</list-item>
</list>
</p>
<p>Each <italic>HRT subscriber</italic> only needs to validate latency and synchronicity constraints individually, whereas rate constraints are validated by the <italic>topic</italic> for all registered <italic>HRT subscribers</italic>.</p>
<p>The described approach completely omits dynamic memory allocation, as all buffers are static. While this is beneficial for temporal consistency, each information transfer requires the data to be copied two times. First, the <italic>publisher</italic> writes to the <italic>message</italic> payload. Second, each <italic>subscriber</italic> has to copy that buffer when fetching the <italic>message</italic>. Although this will have a significant performance impact for increasing amounts of data, this approach optimizes &#xb5;RT for determinism and predictability. Computational complexity scales linearly with the number of <italic>messages</italic> in the buffer <italic>m</italic>, the payload <italic>p</italic>, and the number of <italic>HRT subscribers</italic> <italic>s</italic>
<sub>HRT</sub> registered to the <italic>topic</italic>:<disp-formula id="e15">
<mml:math id="m21">
<mml:mi mathvariant="script">O</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>m</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(15)</label>
</disp-formula>The weight factors <italic>&#x3b1;</italic>, <italic>&#x3b2;</italic>, and <italic>&#x3b3;</italic> are unknown but will be relevant for performance evaluation in <xref ref-type="sec" rid="s3-2-2">section&#xa0;3.2.2</xref>. Finally, producers and consumers are decoupled in space, time, and synchronization.</p>
</sec>
<sec id="s2-7">
<title>2.7 Remote procedure calls</title>
<p>The basic idea of RPCs is to trigger an action similar to a local function call but remotely at another component in the system architecture. Although this behavior can be achieved <italic>via</italic> publish&#x2013;subscribe using a &#x201c;request topic&#x201d; and another &#x201c;response topic,&#x201d; this approach is inefficient because two <italic>m</italic>-to-<italic>n</italic> communication channels are used to emulate a single 1-to-1 interaction, and <italic>services</italic> would have no priority information about <italic>requests</italic>. Therefore, the RPC subsystem of &#xb5;RT implements <italic>request queues</italic> at the <italic>service</italic>, which are ordered by real-time class and timing constraints (<italic>cf.</italic> <xref ref-type="fig" rid="F4">Figure&#xa0;4</xref>). Like <italic>topics</italic>, <italic>services</italic> are identified by numerical values and can be retrieved <italic>via</italic> the core.<xref ref-type="fn" rid="fn7">
<sup>7</sup>
</xref> &#xb5;RT employs a combination of locking and ownership mechanics to acquire <italic>requests</italic> and pass them between requesting and servicing threads. Each interaction is again subdivided into several steps:<list list-type="simple">
<list-item>
<p>1. A <italic>request</italic> must be acquired to be used for only one RPC interaction at a time. After a successful acquisition, the <italic>request</italic> is &#x201c;locked&#x201d; and &#x201c;owned&#x201d; by the requesting thread. Similar to publish&#x2013;subscribe, metadata is updated and argument data is copied to the payload buffer.</p>
</list-item>
<list-item>
<p>2. The <italic>request</italic> is submitted to the <italic>service</italic>, and an event is specified to inform the requesting thread of completion. As part of the submission procedure, ownership is handed over to the <italic>service</italic>, and the <italic>request</italic> is enqueued at the <italic>service</italic> according to its real-time class and constraints. Eventually, the thread providing the <italic>service</italic> is informed <italic>via</italic> an event.</p>
</list-item>
<list-item>
<p>3. The servicing thread dispatches one <italic>request</italic> at a time from the <italic>service</italic>&#x2019;s queue, thereby copying argument data and releasing its locked state.</p>
</list-item>
<list-item>
<p>4. As soon as the <italic>service</italic> is done, it tries to re-acquire the dispatched <italic>request.</italic> On success, it is locked again, any return values are copied to its payload buffer, and the requesting thread is informed <italic>via</italic> the previously specified event.</p>
</list-item>
<list-item>
<p>5. The requesting thread can retrieve the <italic>request</italic> and take over ownership again. For <italic>SRT requests</italic> and <italic>FRT requests</italic>, the usefulness <italic>u</italic> can be calculated at this point (<italic>cf.</italic> <xref ref-type="sec" rid="s2-2">section&#xa0;2.2</xref>).</p>
</list-item>
<list-item>
<p>6. As soon as all return data has been processed or copied, the <italic>request</italic> has to be released to finalize the interaction. Afterward, the <italic>request</italic> is unlocked and not owned by anyone anymore and hence is available again for further interactions.</p>
</list-item>
</list>
</p>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>Visualization of an RPC interaction in &#xb5;RT. Information is passed from <italic>request</italic> to <italic>service</italic> on submission and <italic>vice versa</italic> on response (<inline-graphic xlink:href="frobt-10-1081875-fx3.tif"/>). <inline-graphic xlink:href="frobt-10-1081875-fx4.tif"/>represent aggregations (i.e., pointers in C). An arbitrary number of <italic>requests</italic> may be submitted to a <italic>service</italic>, which buffers those in a queue, ordered by real-time class and constraints. The servicing thread dispatches one <italic>request</italic> at a time from the front of that queue, processes it, and returns a response (by reusing the original <italic>request</italic> instance). In the depicted situation, four <italic>requests</italic> are already enqueued at the <italic>service</italic>, whereas another <italic>HRT request</italic> is available but currently not in use.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g004.tif"/>
</fig>
<p>The interplay of locking and ownership mechanisms plays a key role in this procedure. In contrast to <italic>messages</italic>, <italic>requests</italic> are not associated with a <italic>service</italic> for the lifetime of the latter but only during an ongoing interaction. This allows using a single <italic>request</italic> for interaction with multiple <italic>services</italic>. The downside of this approach is that a <italic>request</italic> could &#x201c;get stuck&#x201d; in the queue of a <italic>service</italic>, not being served for a long time and thus not being available for other, potentially more important interactions, which might compromise the responsiveness of a system and hence its real-time capability. In order to solve this issue, the two mechanics have been employed, and the following rules apply for handling <italic>requests</italic>.<list list-type="simple">
<list-item>
<p>&#x2022; A <italic>request</italic> is available if it has no owner and is not locked.</p>
</list-item>
<list-item>
<p>&#x2022; A <italic>service</italic> may only act on a <italic>request</italic> if it is locked and owned by the <italic>service.</italic>
</p>
</list-item>
<list-item>
<p>&#x2022; The requesting thread may retrieve a previously submitted <italic>request</italic> at any time, as long as it is not locked (by the <italic>service</italic>).</p>
</list-item>
</list>
</p>
<p>As a result, a submitted <italic>request</italic> can be aborted anytime and reused if needed. Although the servicing thread is not notified about this termination and will keep processing an already dispatched <italic>request</italic>, re-acquisition to return a response will fail. Because the canceled <italic>request</italic> might be used for the same <italic>service</italic> again and <italic>services</italic> cannot distinguish whether a <italic>request</italic> has already been dispatched or was just submitted but not dispatched yet, just checking ownership and lock state does not suffice. Therefore, the <italic>request</italic>&#x2019;s submission time is saved on dispatch and used for comparison during re-acquisition before returning a response. If the timestamps do not match, re-acquisition fails, results are discarded, and no response event is emitted. However, it is often the case that neither return data nor a notification on completion is desired by the requesting thread in the first place. To this end, <italic>requests</italic> can be flagged as &#x201c;fire-and-forget&#x201d; by not specifying a response event on submission.</p>
<p>In contrast to the publish&#x2013;subscribe interaction, there are no rate constraints for RPCs, so each <italic>HRT request</italic> validates its individual latency and synchronicity constraints by itself. Moreover, the timestamp each <italic>request</italic> holds describes the time when it was submitted to the <italic>service</italic> and is not related to the content of the payload as was the case for <italic>messages</italic>, so <italic>t</italic>
<sub>info</sub> &#x3d; <italic>t</italic>
<sub>data</sub> always holds. The rationale behind these design choices is that RPCs should not be used for periodic communication within data processing pipelines but rather for sporadic or regular events to interact with such pipelines (<italic>cf.</italic> <xref ref-type="fig" rid="F12">Figure&#xa0;12</xref>). As mentioned previously, the <italic>request</italic> queue of each <italic>service</italic> is ordered and therefore subdivided into three parts. <italic>HRT requests</italic> are always inserted in the front part of the queue, ordered by their timing constraints, such that the most critical <italic>HRT request</italic> is served first. <italic>FRT</italic> and <italic>SRT requests</italic> are placed in the middle part of the queue, following the &#x201c;first come, first serve&#x201d; principle. The same applies to <italic>NRT requests</italic>, which are always appended at the very end of the queue.</p>
<p>Once again, all involved data structures are static, and no dynamic memory allocation is required. As with publish&#x2013;subscribe, the downside is multiple copy operations. However, this approach allows all involved threads to be responsive to other events at all times and thus prevents stalling (i.e., deadlocks) by design. Computational complexity scales linearly with the queue length <italic>q</italic>, the payload <italic>p</italic>, and the number of enqueued <italic>HRT requests</italic> <italic>r</italic>
<sub>HRT</sub>:<disp-formula id="e16">
<mml:math id="m22">
<mml:mi mathvariant="script">O</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>q</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>4</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:math>
<label>(16)</label>
</disp-formula>As with publish&#x2013;subscribe, the weight factors <italic>&#x3b1;</italic>, <italic>&#x3b2;</italic>, and <italic>&#x3b3;</italic> are unknown. <italic>r</italic>
<sub>HRT</sub> is reduced by 1 because the case to &#x201c;enqueue&#x201d; a single <italic>HRT request</italic> is trivial, so this term is only relevant for <italic>r</italic>
<sub>HRT</sub> &#x3e; 1. Requesting and servicing threads are decoupled in space, time, and synchronization.</p>
</sec>
<sec id="s2-8">
<title>2.8 Platform-level interaction</title>
<p>All concepts of &#xb5;RT so far only apply locally within a single process. On the one hand, this approach allows for fast information transfer <italic>via</italic> shared memory and simplifies several aspects, as details such as endianness and (de)serialization of data are of no concern. Especially in the context of MCUs, this is sufficient because many RTOSes do not feature strictly separated processes, and most MCUs do not even host an MPU (memory protection unit), which is fundamentally required to (efficiently) facilitate separated regions in memory. On the other hand, network communication is essential for modular systems and thus has to be considered. The major challenge in this regard is the vast variety of transports (e.g., Ethernet, SPI, UART, CAN, or FlexRay); protocols (e.g., TCP for Ethernet or TTCAN for CAN); and higher-level data distribution services (DDS). Hence, many solutions, such as ROS, ROS 2, MQTT, and RSB, only support selected interfaces (<xref ref-type="bibr" rid="B50">Stanford-Clark and Hunkeler, 1999</xref>; <xref ref-type="bibr" rid="B38">Quigley&#xa0;et&#xa0;al., 2009</xref>; <xref ref-type="bibr" rid="B54">Wienke and Wrede, 2011</xref>; <xref ref-type="bibr" rid="B36">OSRF, 2020</xref>; <xref ref-type="bibr" rid="B35">OSRF, 2022b</xref>) and may have even further restrictions (e.g., DDSes supported by ROS 2).</p>
<p>&#xb5;RT approaches this challenge by not supporting any transport out-of-the-box but commits these tasks to <italic>bridge nodes</italic>. Such <italic>nodes</italic> can implement any transport and protocol and even filter messages if bandwidth is too limited to communicate all information. This method allows for integrating &#xb5;RT in existing platforms, which already employ other middlewares, as depicted in <xref ref-type="fig" rid="F5">Figure&#xa0;5</xref>, and even further transports can also be supported.</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption>
<p>Example setup in a complex system with multiple hardware modules and various middlewares (only the most relevant interactions are depicted). Publish&#x2013;subscribe interaction is indicated by <inline-graphic xlink:href="frobt-10-1081875-fx5.tif"/>, <inline-graphic xlink:href="frobt-10-1081875-fx6.tif"/>represent RPC interactions, and <inline-graphic xlink:href="frobt-10-1081875-fx7.tif"/>depict network and inter-process communication. &#xb5;RT&#x2019;s transport agnostic communication is realized by <italic>bridge nodes</italic>, such as &#x201c;<italic>network bridge&#x201d;</italic> and &#x201c;<italic>ROS 2 adapter&#x201d;</italic> in the figure. While the former has to (de)serialize <italic>messages</italic> and <italic>requests</italic> from/to a common format as defined for that network channel, the latter needs to translate them according to the employed DDS. The <italic>bridge nodes</italic> can provide an arbitrary subset of the remote/foreign <italic>topics</italic> and <italic>services</italic> they connect with to the local &#xb5;RT instance and <italic>vice versa</italic>. If the network supports real-time communication (e.g., CAN), all modules running &#xb5;RT form a distributed, real-time capable union in which network communication is completely transparent to all <italic>nodes</italic> (except <italic>bridge nodes</italic>, of course).</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g005.tif"/>
</fig>
<p>There are two reasons for this design choice. First, several established solutions are available, and there is no need to develop yet another one. Instead, &#xb5;RT aims to be used alongside traditional middlewares to enable the modularization of the real-time software of a system. Second, while TCP and UDP have been established as the <italic>de facto</italic> standard protocols for most communication in modern applications, there is no common standard for embedded designs and MCUs. Such devices are typically not powerful enough for these protocols, so less demanding technologies are employed, which are numerous and have differing properties. A limitation to a subset of these interfaces and protocols would therewith render &#xb5;RT unsuitable for many use cases. As every module in a system may host different hardware with different capabilities and real-time requirements also vary significantly between use cases, &#xb5;RT opts for this more general method.</p>
<p>The benefits of this approach are its flexibility and technology independence. Therefore, &#xb5;RT can interface any communication channel. Moreover, as long as such an interface supports real-time communication, multiple &#xb5;RT instances can form a distributed union in which all <italic>topics</italic> and <italic>services</italic> are accessible by all <italic>nodes</italic>, making the entire network effectively a single virtual &#xb5;RT instance. This method has some drawbacks, as the additional work required to develop <italic>bridge nodes</italic> is less convenient and presents an initial hurdle. However, the intention is as follows: once a <italic>bridge node</italic> for an interface has been developed, it can be provided to the community and other developers can henceforth utilize it with minimal effort and enhance it as required.</p>
<p>Another potential pitfall when combining &#xb5;RT with other middlewares is the absence of any discovery and advertising mechanisms. Such interaction schemes are commonly employed by other solutions to inform the system about newly created topics and services. Due to the strict real-time requirements of &#xb5;RT, all such objects must be available as soon as system initialization is completed and may not be removed until shutdown. This may result in situations where a remote <italic>topic</italic> or <italic>service</italic> is available on the &#xb5;RT side, although it has not been initialized yet (or has been removed again) within the foreign middleware, thus violating assumptions about the state of the communication network. Bridge nodes can solve this issue to some degree by providing a <italic>topic</italic> or <italic>service</italic> only after the advertising message has been received. The opposite case, which is removing a <italic>topic</italic> or <italic>service</italic>, is not possible, though.</p>
</sec>
</sec>
<sec id="s3">
<title>3 Evaluation</title>
<p>&#xb5;RT has been evaluated in three ways to compare it to existing middlewares. First, a qualitative comparison of features is given with respect to R2P and ROS 2 (<italic>cf.</italic> <xref ref-type="sec" rid="s3-1">section&#xa0;3.1</xref>), and performance data are presented thereafter in <xref ref-type="sec" rid="s3-2">section&#xa0;3.2</xref>. Because middlewares are fundamentally only a means to an end to ease software development, usability for developers is an essential aspect. Therefore, a study has been conducted and described in detail, and results are presented in <xref ref-type="sec" rid="s3-3">section&#xa0;3.3</xref>.</p>
<sec id="s3-1">
<title>3.1 Features</title>
<p>For a qualitative comparison of features, the two most important competitors among the plethora of existing middlewares have been selected: ROS 2 due to its popularity in robotics and its ambitions to support real-time computing and R2P because it had been developed with similar goals in mind as for &#xb5;RT. <xref ref-type="table" rid="T1">Table&#x20;1</xref> lists ten important middleware aspects concerning the target application of &#xb5;RT.</p>
<table-wrap id="T1" position="float">
<label>TABLE 1</label>
<caption>
<p>Feature comparison of &#xb5;RT, R2P (<xref ref-type="bibr" rid="B29">Migliavacca, 2013</xref>), and ROS 2 (<xref ref-type="bibr" rid="B23">Macenski&#xa0;et&#xa0;al., 2022</xref>).</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Feature</th>
<th align="center">ROS 2</th>
<th align="center">R2P</th>
<th align="center">&#xb5;RT</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="3" align="left">Interaction schemes</td>
<td align="left">Publish&#x2013;subscribe</td>
<td align="left">Publish&#x2013;subscribe</td>
<td align="left">Publish&#x2013;subscribe</td>
</tr>
<tr>
<td align="left">RPC</td>
<td align="left"/>
<td align="left">RPC</td>
</tr>
<tr>
<td align="left">actions</td>
<td align="left"/>
<td align="left"/>
</tr>
<tr>
<td rowspan="3" align="left">Decoupling</td>
<td align="left">Space</td>
<td align="left">Space</td>
<td align="left">Space</td>
</tr>
<tr>
<td align="left">Time</td>
<td align="left">Time</td>
<td align="left">Time</td>
</tr>
<tr>
<td align="left">Synchronization</td>
<td align="left">Synchronization</td>
<td align="left">Synchronization</td>
</tr>
<tr>
<td rowspan="2" align="left">Real-time capability</td>
<td align="left">Up to soft</td>
<td align="left">Hard</td>
<td align="left">Hard</td>
</tr>
<tr>
<td align="left">(depends on DDS)</td>
<td align="left">(system-wide)</td>
<td align="left">(system-wide)</td>
</tr>
<tr>
<td rowspan="2" align="left">Real-time classes</td>
<td rowspan="2" align="left">NA</td>
<td align="left">Hard, soft, and non</td>
<td rowspan="2" align="left">Hard, firm, soft, and non</td>
</tr>
<tr>
<td align="left">(by RTCAN)</td>
</tr>
<tr>
<td align="left">Validation of</td>
<td rowspan="3" align="left">&#xd7;</td>
<td rowspan="3" align="left">&#xd7;</td>
<td align="left">Latency</td>
</tr>
<tr>
<td align="left">timing constraints</td>
<td align="left">Synchronicity</td>
</tr>
<tr>
<td align="left"/>
<td align="left">rate</td>
</tr>
<tr>
<td align="left">All static memory</td>
<td align="left">&#xd7;</td>
<td align="left">&#xd7;</td>
<td align="left">
<italic>&#x2713;</italic>
</td>
</tr>
<tr>
<td align="left">Zero-copy communication</td>
<td align="left">
<italic>&#x2713;</italic>
</td>
<td align="left">
<italic>&#x2713;</italic>
</td>
<td align="left">&#xd7;</td>
</tr>
<tr>
<td rowspan="2" align="left">QoS</td>
<td rowspan="2" align="left">
<italic>&#x2713;</italic>
</td>
<td rowspan="2" align="left">&#xd7;</td>
<td align="left">
<italic>&#x2713;</italic>
</td>
</tr>
<tr>
<td align="left">(If profiling enabled)</td>
</tr>
<tr>
<td align="left">Suitable for MCUs</td>
<td align="left">&#xd7;</td>
<td align="left">
<italic>&#x2713;</italic>
</td>
<td align="left">
<italic>&#x2713;</italic>
</td>
</tr>
<tr>
<td rowspan="3" align="left">Programming languages</td>
<td align="left">C<bold>&#x2b;&#x2b;</bold>
</td>
<td rowspan="3" align="left">C<bold>&#x2b;&#x2b;</bold>
</td>
<td rowspan="3" align="left">C</td>
</tr>
<tr>
<td align="left">Python</td>
</tr>
<tr>
<td align="left">&#x2026;</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>First, while R2P supports publish&#x2013;subscribe interaction only, ROS 2 not only offers RPCs like &#xb5;RT but also provides an additional &#x201c;actions&#x201d; interaction scheme. Actions are similar to RPCs but intended for long-running tasks. In short, an action is initiated by a client and the action server provides periodic feedback until the goal has been reached. Because such use cases should not require real-time capabilities in itself (underlying processes might, though), supporting actions was no goal for &#x00B5;RT. If such behavior is desired, it can still be realized using a service to initiate execution and a topic to provide periodic feedback or another service to provide feedback on demand.<xref ref-type="fn" rid="fn8">
<sup>8</sup>
</xref> Concerning decoupling, all three middlewares are decoupled in all three domains.</p>
<p>However, when it comes to real-time capabilities, it is obvious that complete real-time support is not the primary focus of ROS 2. It cannot provide stricter than soft real-time and does not differentiate real-time levels at all. Conversely, R2P and &#xb5;RT allow for system-wide hard real-time constraints and define multiple real-time classes with &#xb5;RT even specifying an additional fourth class. Probably, the most distinguishing feature of &#xb5;RT is its capability to validate real-time constraints at runtime. To the best of our knowledge, ROS 2 and R2P do not offer this functionality, nor does any other middleware.</p>
<p>An important aspect of real-time capabilities is memory management, more precisely, the absence of dynamic allocation. R2P still relies on memory pools, which are an optimized form of dynamic memory management but still include dynamic allocation. Therefore, only &#xb5;RT manages to completely omit dynamic memory. The downside of this approach is that interaction in &#xb5;RT involves payload data being copied multiple times. Conversely, ROS 2 and R2P allow for zero-copy communication.</p>
<p>Finally, ROS 2 and &#xb5;RT provide QoS statistics, whereas R2P does not. Although ROS 2 can be used on MCUs, doing so comes with several limitations (<italic>cf.</italic> <xref ref-type="sec" rid="s1-1-4">section&#xa0;1.1.4</xref>). Hence, only R2P and &#xb5;RT are considered suitable for such restricted platforms. The different focus on target platforms also shows in the (primarily) supported programming languages. &#xb5;RT is completely written in C and only supports this language so far.<xref ref-type="fn" rid="fn9">
<sup>9</sup>
</xref> For R2P, it is the same, but with C<bold>&#x2b;&#x2b;</bold> instead of C. ROS 2, however, provides APIs for multiple languages (first and foremost C<bold>&#x2b;&#x2b;</bold> and Python but also C) and thus offers the highest flexibility for developers.</p>
<p>Overall, this comparison shows the different focus areas of the three middlewares. Although ROS 2 primarily focuses on high-level software and offers many conveniences for developers of such but supports real-time computing and MCUs only subordinate, R2P and &#xb5;RT aim at exactly these use cases. Again, &#xb5;RT surpasses R2P in almost every aspect, except for zero-copy communication, in which &#xb5;RT trades for uncompromising real-time capability.</p>
</sec>
<sec id="s3-2">
<title>3.2 Performance</title>
<p>The performance of &#xb5;RT has been evaluated in terms of memory requirements and runtime performance scaling. Results regarding the former are presented in <xref ref-type="sec" rid="s3-2-1">section&#xa0;3.2.1</xref>, and scaling benchmarks are presented in <xref ref-type="sec" rid="s3-2-2">section&#xa0;3.2.2</xref>.</p>
<sec id="s3-2-1">
<title>3.2.1 Memory utilization</title>
<p>The memory footprint of &#xb5;RT is of major importance as the middleware is targeted to be used on (32-bit) MCUs, for which available resources are very limited. The sizes of the integrated flash memory of such devices typically range from 16&#xa0;to 1,024&#xa0;kB, so compiled images need to be rather compact. System memory is even more scarce, with entry-level products featuring no more than 8&#xa0;kB of RAM and only the most powerful devices exceeding 256&#xa0;kB. Therefore, it is a crucial requirement for &#xb5;RT to exhibit a small footprint in both regards. Therefore, it can be deployed on a wide range of MCUs.</p>
<p>
<xref ref-type="table" rid="T2">Table&#xa0;2</xref> shows the sizes of all major components of &#xb5;RT in system memory and compares them to R2P, as presented by <xref ref-type="bibr" rid="B29">Migliavacca (2013)</xref>. Most noticeably, many rows in the table contain no values for R2P at all due to the lack of such components because R2P does feature neither synchronization mechanisms nor RPC interaction. Compared to &#xb5;RT, it also omits a core component. Because there is only a single core per instance, these 37 bytes should be negligible in most scenarios. Other than that, nodes are about 50% larger for &#xb5;RT, which is a significant increase, but with an absolute value of 56&#x2009; B, the footprint is still considered reasonable. Both components of the synchronization subsystem are acceptably small, with no more than 32&#xa0;B. Publishers are much smaller for &#xb5;RT and require only 4&#xa0;B (25% compared to R2P), as they essentially hold just a pointer to the topic. Topics are also larger for &#xb5;RT than they are with R2P. Especially when QoS is enabled, the memory footprint is 157% larger, but even without QoS, the increase is still 57%. It should be noted that each topic in &#xb5;RT already holds a message, so those 32&#xa0;B need to be subtracted for an apples-to-apples comparison, resulting in a somewhat smaller increase of 100% with QoS enabled and even the same 56&#xa0;B as for R2P with QoS disabled. The size of subscribers in &#xb5;RT depends on their real-time class (<italic>cf.</italic> <xref ref-type="sec" rid="s2-2">section&#xa0;2.2</xref>) but is estimated in <xref ref-type="table" rid="T2">Table&#xa0;2</xref> with the upper bounds. While they are slightly smaller when QoS is disabled (92%), size increases by a factor of 2 when enabled. Finally, the footprints of RPC components are similar to those of the publish&#x2013;subscribe subsystem. Requests are again much larger when QoS is enabled, with an even starker difference of 88&#xa0;B (157%). Conversely, services are of constant size, with 48&#xa0;B acceptably small. Overall, the memory footprints of &#xb5;RT&#x2019;s components are about 50%&#x2013;150% larger than their pendants in R2P, but absolute values remain small enough to be reasonable even for entry-level MCUs.</p>
<table-wrap id="T2" position="float">
<label>TABLE 2</label>
<caption>
<p>Memory footprints of the most important components of &#xb5;RT and R2P (<xref ref-type="bibr" rid="B29">Migliavacca, 2013</xref>). For these measurements, &#xb5;RT has been configured to reasonable settings, e.g., identifier sizes for <italic>topics</italic> and <italic>services</italic> were set to 16&#x2009;bits. All values are given in bytes.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left">Subsystem</th>
<th align="left">Component</th>
<th align="center">&#xb5;RT</th>
<th align="center">&#xb5;RT (no QoS)</th>
<th align="center">R2P</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td rowspan="2" align="left">Core</td>
<td align="left">Core</td>
<td align="left">37</td>
<td align="left">37</td>
<td align="left">&#x2013;</td>
</tr>
<tr>
<td align="left">Node</td>
<td align="left">56</td>
<td align="left">56</td>
<td align="left">36</td>
</tr>
<tr>
<td rowspan="2" align="left">Synchronization</td>
<td align="left">Syncgroup</td>
<td align="left">28</td>
<td align="left">28</td>
<td align="left">&#x2013;</td>
</tr>
<tr>
<td align="left">Syncnode</td>
<td align="left">32</td>
<td align="left">32</td>
<td align="left">&#x2013;</td>
</tr>
<tr>
<td rowspan="4" align="left">Publish&#x2013;subscribe</td>
<td align="left">Publisher</td>
<td align="left">4</td>
<td align="left">4</td>
<td align="left">16</td>
</tr>
<tr>
<td align="left">Topic</td>
<td align="left">144&#x2b; messages</td>
<td align="left">88&#x2b; messages</td>
<td align="left">56</td>
</tr>
<tr>
<td align="left">Subscriber</td>
<td align="left">
<inline-formula id="inf7">
<mml:math id="m23">
<mml:mo>&#x2264;</mml:mo>
<mml:mn>136</mml:mn>
</mml:math>
</inline-formula>
</td>
<td align="left">
<inline-formula id="inf8">
<mml:math id="m24">
<mml:mo>&#x2264;</mml:mo>
<mml:mn>44</mml:mn>
</mml:math>
</inline-formula>
</td>
<td align="left">48&#x2b; messages</td>
</tr>
<tr>
<td align="left">Message</td>
<td align="left">32&#x2b; payload</td>
<td align="left">32&#x2b; payload</td>
<td align="left">Payload</td>
</tr>
<tr>
<td rowspan="2" align="left">RPC</td>
<td align="left">Request</td>
<td align="left">
<inline-formula id="inf9">
<mml:math id="m25">
<mml:mo>&#x2264;</mml:mo>
<mml:mn>144</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mtext>payload</mml:mtext>
</mml:math>
</inline-formula>
</td>
<td align="left">
<inline-formula id="inf10">
<mml:math id="m26">
<mml:mo>&#x2264;</mml:mo>
<mml:mn>56</mml:mn>
<mml:mo>&#x2b;</mml:mo>
<mml:mtext>payload</mml:mtext>
</mml:math>
</inline-formula>
</td>
<td align="left">&#x2013;</td>
</tr>
<tr>
<td align="left">Service</td>
<td align="left">48</td>
<td align="left">48</td>
<td align="left">&#x2013;</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>When considering the required amount of flash memory, &#xb5;RT can scale from a modest 2.2&#xa0;kB to 18.2&#xa0;kB due to its high configurability (<italic>cf.</italic> <xref ref-type="sec" rid="s2-3-4">section&#xa0;2.3.4</xref>). Unfortunately, a direct comparison with R2P is difficult to achieve because <xref ref-type="bibr" rid="B29">Migliavacca (2013)</xref> only stated values, including the RTOS; hence, such was not conducted for this work. Absolute footprint sizes of &#xb5;RT&#x2019;s core, the three subsystems, and a complete configuration are given in <xref ref-type="table" rid="T3">Table&#xa0;3</xref> and represent the worst-case scenario among all evaluated MCUs.<sup>10</sup> When comparing memory footprints in the binary image, the publish&#x2013;subscribe subsystem is the most expensive component, with RPC close behind. Conversely, synchronization functionality has a minor impact of no more than 1&#xa0;kB, even for debug builds. When comparing release and debug scenarios, footprints increase between 49% and 95% for the latter (67% on average). Enabling QoS is less expensive, with only 13%&#x2013;50% larger footprints (29% on average). In both cases, impacts are most pronounced for the publish&#x2013;subscribe subsystem. Considering the required flash memory exceeding 16&#xa0;kB with everything enabled and considering that a sophisticated RTOS is required, &#xb5;RT is hardly a viable option for MCUs with 32&#xa0;kB of flash or even less. Based on our experience, a minimum of 128&#xa0;kB is recommended for development (debug builds) and 64&#xa0;kB for deployment (release builds), even with optimizations (i.e., garbage collection and link time optimization) enabled.</p>
<table-wrap id="T3" position="float">
<label>TABLE 3</label>
<caption>
<p>Memory footprint of &#xb5;RT in a compiled image. Results have been obtained on a STM32-F405RG (32-bit Arm Cortex-M4), for which the values were the largest among all evaluated MCUs.<xref ref-type="fn" rid="fn10">
<sup>10</sup>
</xref> Code has been compiled using GCC 11.3.1 (Arm GNU Toolchain) with optimizations such as garbage collection (GC) and link time optimization (LTO) disabled. Further settings of &#xb5;RT have been configured to reasonable values; for e.g., identifier sizes for <italic>topics</italic> and <italic>services</italic> were set to 16&#x2009;bits and profiling was enabled. All values are given in bytes.</p>
</caption>
<table>
<thead valign="top">
<tr>
<th align="left"/>
<th colspan="2" align="center">Debug build</th>
<th colspan="2" align="center">Release build</th>
</tr>
<tr>
<th align="left"/>
<th align="center">QoS enabled</th>
<th align="center">QoS disabled</th>
<th align="center">QoS enabled</th>
<th align="center">QoS disabled</th>
</tr>
</thead>
<tbody valign="top">
<tr>
<td align="left">Core</td>
<td colspan="2" align="center">3,384</td>
<td colspan="2" align="center">2,264</td>
</tr>
<tr>
<td align="left">Synchronization</td>
<td colspan="2" align="center">1,024</td>
<td colspan="2" align="center">640</td>
</tr>
<tr>
<td align="left">Publish&#x2013;subscribe</td>
<td align="left">7,952</td>
<td align="left">6,224</td>
<td align="left">4,800</td>
<td align="left">3,200</td>
</tr>
<tr>
<td align="left">RPC</td>
<td align="left">6,296</td>
<td align="left">5,592</td>
<td align="left">3,952</td>
<td align="left">3,184</td>
</tr>
<tr>
<td align="left">Complete</td>
<td align="left">18,648</td>
<td align="left">16,216</td>
<td align="left">11,520</td>
<td align="left">9,216</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s3-2-2">
<title>3.2.2 Runtime performance and scaling</title>
<p>In order to evaluate the runtime performance of &#xb5;RT, an extensive set of benchmarks has been conducted.<xref ref-type="fn" rid="fn11">
<sup>11</sup>
</xref> These benchmarks have been designed in a way that scaling effects for each middleware component can be assessed, as well as differences between real-time classes. Therefore, scenarios have been implemented carefully to represent worst-case situations. Thread priorities were set in a way that nodes would constantly block each other, and the MCUs were continuously stressed by an additional low-priority thread. Moreover, each benchmark was repeated 1,000 times, so meaningful minimum and maximum values could be obtained to assess synchronicity performance.</p>
<p>The graphs in this section depict only the results of the worst-performing component (e.g., the node with the highest latency). Note that each graph consists of a line and a shaded area &#x201c;hanging&#x201d; below. Although the former represents the largest measured values, the latter depicts the range between the lowest and highest values in the result data. However, for most graphs, the shaded area is barely visible. Except for the data shown in <xref ref-type="fig" rid="F6">Figure&#xa0;6A</xref>, all results were obtained using an STM32L476RG (Cortex-M4 @ 80&#xa0;MHz).</p>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption>
<p>General performance measurements of &#xb5;RT. On the left-hand side <bold>(A)</bold>, performance scaling when increasing the total number of nodes in a system is depicted, thereby comparing different MCUs. On the right-hand side <bold>(B)</bold>, the performance impact of payload sizes is shown for both communication schemes supported by &#xb5;RT.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g006.tif"/>
</fig>
<p>First, performance scales linearly with the number of nodes in a system, as shown in <xref ref-type="fig" rid="F6">Figure&#xa0;6A</xref>. For this benchmark, a single timer triggered all nodes, which just measured the latency until the event was eventually processed. As expected, absolute performance varies significantly between different MCUs. Although most MCUs demonstrate consistent performance, the STM32G0 exhibits significant temporal variance, which is most probably caused by its Cortex-M0&#x2b; core.</p>
<p>
<xref ref-type="fig" rid="F6">Figure&#xa0;6B</xref> depicts performance scaling for publish&#x2013;subscribe and RPC interaction with increasing payload sizes. Again, performance scales linearly, as expected. More interestingly, the first communication of an RPC interaction (until the service dispatched the request) is significantly faster than publish&#x2013;subscribe, although the return communication (until the answered request is retrieved again) takes longer overall. This finding indicates that fire-and-forget requests should be used whenever possible. The graphs also show the potential performance gains if zero-copy communication was possible with &#xb5;RT. Especially when comparing the time scales with <xref ref-type="fig" rid="F7">Figures&#xa0;7</xref>, <xref ref-type="fig" rid="F8">8</xref>, copy operations have only a minor impact on the overall performance.</p>
<fig id="F7" position="float">
<label>FIGURE 7</label>
<caption>
<p>In-depth performance analysis of the publish&#x2013;subscribe subsystem. On the left-hand side <bold>(A)</bold>, performance scaling when increasing the number of components in a system is depicted. On the right-hand side <bold>(B)</bold>, the performance of the four real-time classes is compared for increasing number of topics.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g007.tif"/>
</fig>
<fig id="F8" position="float">
<label>FIGURE 8</label>
<caption>
<p>In-depth performance analysis of the RPC subsystem. On the left-hand side <bold>(A)</bold>, performance scaling when increasing the number of components in a system is depicted. On the right-hand side <bold>(B)</bold>, the performance of the four real-time classes is compared for an increasing number of requests.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g008.tif"/>
</fig>
<p>For benchmark results of the publish&#x2013;subscribe subsystem, as depicted in <xref ref-type="fig" rid="F7">Figure&#xa0;7</xref>, two striking features catch the eye. First, for an increasing number of communication hops, topics and (HRT) subscribers, synchronicity characteristics deteriorate. A closer look at the data reveals that only the very first interaction is significantly faster (by 13.2% for topics), and excluding this data point results in a jitter of 1.2% instead of 12.2% regarding topics. Second, performance graphs of communication hops and topics do not scale linearly but slightly exponentially. Again, this is only the case for HRT interaction, whereas performance scales linearly for all other real-time classes. When recalling the estimated complexity of publish&#x2013;subscribe interaction from Equation&#xa0;<xref ref-type="disp-formula" rid="e15">15</xref>, the reason becomes obvious. Neither the number of hops nor the number of topics can be increased without increasing the number of subscribers <italic>s</italic>
<sub>HRT</sub>. Doing so effectively results in a complexity multiplied by <italic>s</italic>
<sub>HRT</sub> and, therefore, a quadratic increase in latency because validation timers of all HRT subscribers need to be updated with every interaction:<disp-formula id="e17">
<mml:math id="m27">
<mml:mtable class="align">
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="script">O</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>m</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mo>&#x3d;</mml:mo>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mspace width="0.17em"/>
<mml:mi mathvariant="script">O</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>m</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mo>&#x3d;</mml:mo>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mspace width="0.17em"/>
<mml:mi mathvariant="script">O</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>m</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>2</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msubsup>
<mml:mrow>
<mml:mi>s</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(17)</label>
</disp-formula>
</p>
<p>Nonlinear performance scaling for HRT communication is an accepted trade-off made by &#xb5;RT, though, in order to validate timing constraints for such critical components. Moreover, the rather low expression of exponential scaling in the data suggests that the corresponding weight <italic>&#x3b3;</italic> is rather small compared to <italic>&#x3b1;</italic> and <italic>&#x3b2;</italic>. <xref ref-type="fig" rid="F7">Figure&#xa0;7A</xref> shows constant performance for an increasing number of messages. This benchmark does not represent the worst-case scenario, as <italic>t</italic>
<sub>info</sub> increased with every interaction, so messages did not have to be enqueued (general case; linear complexity) but could just be appended (constant complexity). With this in mind, the presented graph must be interpreted as typical performance rather than worst-case performance, which scales linearly.</p>
<p>A similar picture emerges for the RPC subsystem. Performance evaluation, as presented in <xref ref-type="fig" rid="F8">Figure&#xa0;8</xref>, apparently shows the same effects as the publish&#x2013;subscribe, but more pronounced. Again, recalling the complexity estimation from Equation&#xa0;<xref ref-type="disp-formula" rid="e16">16</xref> reveals the cause. As with HRT subscribers for publish&#x2013;subscribe interaction, increasing the number of HRT requests <italic>r</italic>
<sub>HRT</sub> effectively results in quadratic scaling regarding this factor:<disp-formula id="e18">
<mml:math id="m28">
<mml:mtable class="align">
<mml:mtr>
<mml:mtd columnalign="right"/>
<mml:mtd columnalign="left">
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi mathvariant="script">O</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>q</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>4</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mo>&#x3d;</mml:mo>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mspace width="0.17em"/>
<mml:mi mathvariant="script">O</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>q</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>4</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
<mml:mtr>
<mml:mtd columnalign="right">
<mml:mo>&#x3d;</mml:mo>
</mml:mtd>
<mml:mtd columnalign="left">
<mml:mspace width="0.17em"/>
<mml:mi mathvariant="script">O</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:mi>&#x3b1;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mi>q</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b2;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mn>4</mml:mn>
<mml:mi>p</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
<mml:mo>&#x2b;</mml:mo>
<mml:mi>&#x3b3;</mml:mi>
<mml:mo>&#x22c5;</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msubsup>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
<mml:mrow>
<mml:mn>2</mml:mn>
</mml:mrow>
</mml:msubsup>
<mml:mo>&#x2212;</mml:mo>
<mml:msub>
<mml:mrow>
<mml:mi>r</mml:mi>
</mml:mrow>
<mml:mrow>
<mml:mtext>HRT</mml:mtext>
</mml:mrow>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:mrow>
</mml:mfenced>
</mml:mtd>
</mml:mtr>
</mml:mtable>
</mml:math>
<label>(18)</label>
</disp-formula>Notably, performance does not scale exponentially when increasing number of communication hops this time because there is only a single request per hop (<italic>r</italic>
<sub>HRT</sub> &#x3d; 1), so the hindmost term has no effect in this case. Although exponential effects are much more pronounced for RPC than was the case for publish&#x2013;subscribe, the weighting factor <italic>&#x3b3;</italic> remains relatively small.</p>
<p>Overall, performance figures confirm the overall linear scaling of &#xb5;RT, although some scenarios exhibit exponential latency increase. However, this is only the case for HRT communication, and even then, nonlinearity is little pronounced for scales reasonable for MCUs. Especially when considering the findings concerning RPC interaction, request queues with lots of HRT requests should be avoided in the first place for the sake of a responsive system.</p>
</sec>
</sec>
<sec id="s3-3">
<title>3.3 Usability</title>
<p>In order to assess the usability of &#xb5;RT for software developers, a study has been conducted. The goal of this study was not just to evaluate the ease of use of &#xb5;RT by itself because this information alone would not be meaningful, but how it fares compared to ROS. It was conducted as part of the exercises for the lecture &#x201c;Autonomous Systems Engineering&#x201d; at Bielefeld University and carried out in multiple weekly sessions. This way, a comprehensive set of introductory information, programming tasks, and questionnaires could be used in the study. In <xref ref-type="sec" rid="s3-3-1">section&#xa0;3.3.1</xref>, the study design and applied methods are described in detail before the results are presented afterward in <xref ref-type="sec" rid="s3-3-2">section&#xa0;3.3.2</xref>.</p>
<sec id="s3-3-1">
<title>3.3.1 Study design</title>
<p>First, a within-person design was chosen for the study, and it was subdivided into four parts, conducted in weekly sessions of 2&#xa0;h each.<list list-type="simple">
<list-item>
<p>1. <sc>ex ante</sc>: Participants were asked to fill in a questionnaire about demographic information and prior experience in various areas of computer science. For the latter, six-level Likert scales were used with the available options &#x201c;none,&#x201d; &#x201c;novice,&#x201d; &#x201c;advanced beginner,&#x201d; &#x201c;competent,&#x201d; &#x201c;proficient,&#x201d; and &#x201c;expert.&#x201d;</p>
</list-item>
<list-item>
<p>2. <sc>ROS line following</sc>: In the first session, an introductory lecture was given, explaining fundamental concepts of middlewares in general and specifically ROS. In the second session, participants were given the task of making AMiRo follow a line in a simulation environment using ROS (C<bold>&#x2b;&#x2b;</bold> only), for which they were allowed two sessions to complete. Afterward, participants were asked to complete a questionnaire to assess their experience.</p>
</list-item>
<list-item>
<p>3. <sc>&#xb5;RT tutorial</sc>: This time, no introductory lecture was provided, but participants were instructed to work through a tutorial on &#xb5;RT instead and to fill in another questionnaire afterward. Participants were allowed to spend two sessions with this part.</p>
</list-item>
<list-item>
<p>4. <sc>&#xb5;RT line following</sc>: Another task was given to make AMiRo follow a line, but this time using &#xb5;RT on a real robot, and again participants were asked to rate their experience thereafter by means of another questionnaire. As with the other tasks, participants could spend two sessions on this one.</p>
</list-item>
</list>
</p>
<p>Questionnaires for the three tasks were identical, each consisting primarily of a USE questionnaire as defined by <xref ref-type="bibr" rid="B22">Lund (2001)</xref>, but supplemented by three further questions&#x2014;level of completion (self-estimation), required time, and the number of requests for assistance&#x2014;as well as corresponding free-text fields to account for qualitative responses. Obviously, the results of those questionnaires are the dependent variables in this study.</p>
<p>The independent variable of interest was the employed middleware&#x2014;ROS <italic>versus</italic> &#xb5;RT&#x2014;so the two most important parts of the study are the line-following tasks. The decision was made against a between-person design because the scenarios could not match each other exactly. As ROS cannot be run on the MCUs of AMiRo, that task had to be conducted in a simulation environment rather than an actual robot. Conversely, no simulator integration for &#xb5;RT exists so far, so these scenario differences were inevitable. Furthermore, the acquisition of participants for a study of this scale is difficult, especially during the COVID-19 pandemic, making those a very scarce &#x201c;resource.&#x201d; The information gained per participant hence needed to be maximized. Moreover, the in-person design with this order&#x2014;ROS first and &#xb5;RT thereafter&#x2014;does not compromise the validity of this study&#x2019;s results because many software developers in robotics are already experienced with ROS and would use &#xb5;RT as supplemental middleware on the real-time level of a system. Hence, the study design represents real use case scenarios very well.</p>
<p>Each task of this study was designed so it could be completed in about 90&#xa0;min, but participants were permitted up to 4&#xa0;h. For optimal comparability, both line-following tasks were designed identically: participants had to create a new node, add a subscriber to receive sensor information from a prepared topic, write a simple logic to calculate a two-dimensional motion vector, and interface an existing service to make AMiRo move. The quality of the implemented line-following algorithm was of no concern for this study, as the focus was on understanding middleware concepts and the ability to apply these to actual implementation.</p>
</sec>
<sec id="s3-3-2">
<title>3.3.2 Questionnaire results</title>
<p>In total, 21 students in computer science participated in the study. Ages ranged 21&#x2013;28 (median 23.5) years. Of the 21 students, thirteen were male and six were female participants, and two were not specified. All students had a bachelor&#x2019;s degree except one who had no academic degree yet. Thirteen (62%) participants had already worked with ROS before, and seven (33%) had experience in robotics, although self-assessed skill levels ranged no higher than &#x201c;competent.&#x201d; The same applies to experience in the two relevant programming languages, C<bold>&#x2b;&#x2b;</bold> and C, whereby the mean expertise for the former was about 1/2 skill level higher. Notably, experience in Python was much higher, with the median at &#x201c;competent.&#x201d; This result confirms the decision to restrict the ROS task to C<bold>&#x2b;&#x2b;</bold> because the strongly differing programming skills might have influenced the study results. Finally, although 11 (52%) participants had worked with MCUs before, none stated any expertise with RTOSes, indicating that the previous experiences were made in bare-metal programming of MCUs instead of using sophisticated RTOS software environments.</p>
<p>Unfortunately, although all students did work on all tasks, not all questionnaires were completed. Of the 21 participants, only 12 (57%) assessed the ROS line-following task, 10 (48%) submitted valid questionnaires for the &#xb5;RT tutorial, and 6 (29%) rated the &#xb5;RT line-following task. Moreover, complete data about all three tasks are available for just five students (24%). For this reason, results will be distinguished hereafter by whether they were obtained from the entire cohort or only from the five participants who provided complete information. Those two subsets of the cohort will be referred to as group A and group B.</p>
<p>Before examining the results of the USE questionnaires, the evaluation of the three additional questions provides insights into the correlation between participants who only filled in the questionnaires about ROS (group A) and who also provided information about their experience with &#xb5;RT (group B). <xref ref-type="fig" rid="F9">Figure&#xa0;9</xref> shows that the ROS task completion level varies much more for group A, whereas group B performed consistently well. In fact, the level of completion of the ROS task and whether or not a participant filled in the questionnaire about the &#xb5;RT task are highly correlated: <italic>&#x3c1;</italic> &#x3d; 0.678. This finding suggests that many students had issues understanding the concepts of publish&#x2013;subscribe and RPC interaction in general and could not apply those with either middleware. Although discrepancies between the two groups are not as pronounced for the time required and the number of requests for assistance, where average and median values are similar, variances of the answers to these questions are also much higher for group A.</p>
<fig id="F9" position="float">
<label>FIGURE 9</label>
<caption>
<p>Statistical evaluation of the three additional questions of the questionnaires: self-estimated level of completion <bold>(A)</bold>, required time <bold>(B)</bold>, and number of requests for assistance <bold>(C)</bold>. Each pair of box plots depicts results for ROS <inline-formula id="inf13">
<mml:math id="m31">
<mml:mrow>
<mml:mo mathvariant="bold">(</mml:mo>
<mml:mstyle displaystyle="false" mathcolor="blue">
<mml:mtext mathvariant="bold">(left)</mml:mtext>
</mml:mstyle>
<mml:mo mathvariant="bold">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>() and &#xb5;RT <inline-formula id="inf16">
<mml:math id="m34">
<mml:mrow>
<mml:mo mathvariant="bold">(</mml:mo>
<mml:mstyle displaystyle="false" mathcolor="green">
<mml:mtext mathvariant="bold">right</mml:mtext>
</mml:mstyle>
<mml:mo mathvariant="bold">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>(), respectively. Each axis shows results for the entire cohort (group A) and only those participants who filled in the questionnaires about ROS and &#xb5;RT (group B). Vertical axes are labeled by the options participants had to choose from, as they were available in the questionnaires.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g009.tif"/>
</fig>
<p>Participants, on average, required 1/2 to one more hour to complete the line-following task with &#xb5;RT than using ROS. Participants also asked for assistance five times more often when working on the &#xb5;RT task. These two findings are again correlated with <italic>&#x3c1;</italic> &#x3d; 0.746 for ROS and <italic>&#x3c1;</italic> &#x3d; 0.809 for &#xb5;RT. This indicates that participants could have completed the tasks in less time if they had been able to solve them completely on their own. While the overall higher number of requests for assistance for &#xb5;RT shows that tutorial and documentation need to be improved, a participant stated for the &#xb5;RT tutorial task that two of five requests for assistance were due to hardware issues with the robot rather than about &#xb5;RT. This comment indicates that difficulties of understanding are not five times higher for &#xb5;RT. However, as such differentiation was not considered in the study design, no definitive statement can be made based on the obtained data.</p>
<p>Results of the USE questionnaires are depicted in <xref ref-type="fig" rid="F10">Figure&#xa0;10</xref> and show strong differences between groups A and B. Although &#xb5;RT seems to outperform ROS in all four aspects when considering group A, results are more heterogeneous for group B. Due to the small size of the latter, the exact values depicted in <xref ref-type="fig" rid="F10">Figure&#xa0;10B</xref> cannot be considered significant. However, the overall positive trend for all aspects of USE and both middlewares is evident.</p>
<fig id="F10" position="float">
<label>FIGURE 10</label>
<caption>
<p>Statistical evaluation of the USE questionnaires. Each pair of box plots depicts results for ROS <inline-formula id="inf15">
<mml:math id="m33">
<mml:mrow>
<mml:mo mathvariant="bold">(</mml:mo>
<mml:mstyle displaystyle="false" mathcolor="blue">
<mml:mtext mathvariant="bold">(left)</mml:mtext>
</mml:mstyle>
<mml:mo mathvariant="bold">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>() and &#xb5;RT <inline-formula id="inf14">
<mml:math id="m32">
<mml:mrow>
<mml:mo mathvariant="bold">(</mml:mo>
<mml:mstyle displaystyle="false" mathcolor="green">
<mml:mtext mathvariant="bold">right</mml:mtext>
</mml:mstyle>
<mml:mo mathvariant="bold">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>(), respectively. In the axis on the left-hand side <bold>(A)</bold>, all participants are considered, although only six participants filled in the questionnaire for &#xb5;RT while 12 participants did so for ROS. On the right-hand side <bold>(B)</bold>, only five participants who filled in both questionnaires are considered.</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g010.tif"/>
</fig>
<p>When investigating the correlations between previous experience in various areas of computer science and the information given in the USE questionnaires depicted in <xref ref-type="fig" rid="F11">Figure&#xa0;11</xref>, several further observations were made. First, the results of the USE questionnaire regarding the ROS task are correlated to prior experience in robotics but are uncorrelated to MCUs, both of which meet expectations. When investigating the correlation matrix regarding &#xb5;RT, the first thing that stands out is the consistently inverse correlations. In particular, the strong (inverse) correlations with prior experience with MCUs and ROS are noteworthy but difficult to interpret. Either developers without previous knowledge in these topics rate &#xb5;RT positively, or those who already have such experience rate &#xb5;RT negatively, or both. Again, no clear conclusion can be drawn due to the small sample sizes (12 and 6 participants, respectively), so these findings should be considered and further investigated in future studies.</p>
<fig id="F11" position="float">
<label>FIGURE 11</label>
<caption>
<p>Correlation matrices showing the correlation between previous experience in three topics of computer science and the four aspects of the USE questionnaires. The left-hand side <bold>(A)</bold> depicts the correlation matrix regarding the USE questionnaire of the ROS line-following task (based on 12 data points), whereas the right-hand side <bold>(B)</bold> relates to &#xb5;RT (based on six data points).</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g011.tif"/>
</fig>
<p>Finally, the USE questionnaires also contain qualitative questions, and some answers given by participants are worth mentioning. When asked about the most negative aspects of ROS and &#xb5;RT, respectively, many complaints were made about the high complexity of ROS and the insufficient documentation of &#xb5;RT. There were also some comments about &#xb5;RT not supporting object-oriented programming languages such as C<bold>&#x2b;&#x2b;</bold> and Python. On the contrary, many praised ROS that it supports exactly those languages and that it is an open-source project with a large community supporting it. However, positive mentions about &#xb5;RT were its simplicity and that it is &#x201c;not overloaded with features.&#x201d;</p>
</sec>
</sec>
</sec>
<sec sec-type="discussion" id="s4">
<title>4 Discussion</title>
<p>As mentioned at the very beginning of this work (<italic>cf.</italic> <xref ref-type="sec" rid="s1">section&#xa0;1</xref>), &#xb5;RT was developed as part of the software ecosystem of the AMiRo platform (<xref ref-type="bibr" rid="B45">Sch&#xf6;pping&#xa0;et&#xa0;al., 2015</xref>; <xref ref-type="bibr" rid="B14">Herbrechtsmeier&#xa0;et&#xa0;al., 2016</xref>). In addition to the evaluation results presented in <xref ref-type="sec" rid="s3">section&#xa0;3</xref>, practical experience was already gained by restructuring the entire real-time software of AMiRo to take advantage of the novel middleware and split the monolithic software into multiple applications (<xref ref-type="bibr" rid="B42">Sch&#xf6;pping and Kenneweg, 2022b</xref>). The new architecture allows arranging such applications among the several MCUs of AMiRo (<italic>cf.</italic> <xref ref-type="bibr" rid="B14">Herbrechtsmeier&#xa0;et&#xa0;al., 2016</xref>; <xref ref-type="bibr" rid="B15">Herbrechtsmeier, 2017</xref>) by means of <italic>configurations</italic>. Because all MCUs communicate <italic>via</italic> a common CAN interface (<xref ref-type="bibr" rid="B18">ISO, 1993</xref>), an according bridge node has been implemented and used to combine the individual &#xb5;RT instances of all MCUs into a single virtual environment. An example configuration is depicted in <xref ref-type="fig" rid="F12">Figure&#xa0;12</xref>, which allows a user to select from four modes: idle (no action executed at all), sensor visualization (sensor readings are visualized <italic>via</italic> LEDs), line following (AMiRo follows a line on the ground), and obstacle avoidance (AMiRo moves forward. However, it avoids any encountered obstacles). Although the motor control loop is entirely processed on the same MCU (<italic>cf.</italic> right part of <xref ref-type="fig" rid="F12">Figure&#xa0;12</xref>), control logic, sensor input, and visualization are distributed among the entire robot. In order to change the behavior of AMiRo, many nodes can be reused, whereas others are modified or replaced, or even further nodes are added to the system.<xref ref-type="fn" rid="fn12">
<sup>12</sup>
</xref> All in all, &#xb5;RT already proved its benefits and effectiveness as it is employed as a standard tool for the productive use of AMiRo in educational and scientific contexts.</p>
<fig id="F12" position="float">
<label>FIGURE 12</label>
<caption>
<p>Example architecture as implemented on the AMiRo platform. Rectangles depict nodes, whereas topics are visualized as diamond shapes. Publish&#x2013;subscribe interaction is indicated by <inline-graphic xlink:href="frobt-10-1081875-fx8.tif"/>. <inline-graphic xlink:href="frobt-10-1081875-fx9.tif"/>and <inline-graphic xlink:href="frobt-10-1081875-fx10.tif"/>represent complete and &#x201c;fire-and-forget&#x201d; RPC interaction, respectively. Various shadings of nodes indicate that those are executed on different MCUs. Communication is hence tunneled over CAN by bridge nodes as required (not depicted).</p>
</caption>
<graphic xlink:href="frobt-10-1081875-g012.tif"/>
</fig>
<sec id="s4-1">
<title>4.1 Conclusion</title>
<p>In this work, a novel, real-time, capable middleware&#x2014;&#xb5;RT&#x2014;was presented. In contrast to existing solutions, it is used in resource-constrained platforms, such as microcontrollers (MCUs), and features validation of timing constraints at runtime. &#xb5;RT provides two communication schemes, publish&#x2013;subscribe and future RPCs, and overall offers a similar feature set to popular middlewares such as ROS 2. This work also presented a thorough evaluation of &#xb5;RT, including a feature comparison with existing solutions, an in-depth performance analysis, and a usability study, which assessed the experience software developers had with &#xb5;RT. Although the middleware showed excellent results overall, some issues and potential areas for improvement were identified. Findings of all analyses regarding &#xb5;RT are summarized by recalling the initial goals as defined at the very beginning of <xref ref-type="sec" rid="s2">section&#xa0;2</xref>.<list list-type="simple">
<list-item>
<p>1. While the memory footprint of &#xb5;RT is slightly higher than that for existing solutions targeting MCUs, it is still reasonably small.</p>
</list-item>
<list-item>
<p>2. Real-time capabilities were suitable for even hard real-time use cases with strict timing constraints.</p>
</list-item>
<list-item>
<p>3. Performance of &#xb5;RT scales linearly in most regards, but some aspects concerning hard real-time interaction exhibit slightly exponential scaling.</p>
</list-item>
<list-item>
<p>4. &#xb5;RT allows validating real-time constraints at runtime, a unique feature among all middlewares to our knowledge.</p>
</list-item>
<list-item>
<p>5. Topic-based publish&#x2013;subscribe interaction is provided for periodic/time-based communication, and RPCs allow for event-based interaction.</p>
</list-item>
<list-item>
<p>6. While the usability study proved the effectiveness of &#xb5;RT for developers, current API documentation is lacking.</p>
</list-item>
<list-item>
<p>7. &#xb5;RT can interact with other middlewares by means of dedicated bridge nodes.</p>
</list-item>
<list-item>
<p>8. Depending on the requirements of individual use cases, the feature set and performance characteristics of &#xb5;RT can be optimized by its fine-grained configurability.</p>
</list-item>
</list>
</p>
</sec>
<sec id="s4-2">
<title>4.2 Future prospect</title>
<p>The most pressing drawback of &#xb5;RT is its lacking documentation. Although a tutorial exists and HTML-based documentation of the entire API is provided, the usability study revealed that both are insufficient in their current state (<italic>cf.</italic> <xref ref-type="sec" rid="s3-3-2">section&#xa0;3.3.2</xref>). Another complaint of participants in the study was the missing support of popular object-oriented programming languages, such as C<bold>&#x2b;&#x2b;</bold> and Python. This demand was already considered with the design of &#xb5;RT, so that the according wrappers of its API and integration in further tools, such as GenoM (<xref ref-type="bibr" rid="B24">Mallet&#xa0;et&#xa0;al., 2010</xref>) or BRICS (<xref ref-type="bibr" rid="B3">Bruyninckx&#xa0;et&#xa0;al., 2013</xref>), can be realized with relative ease. This study also revealed several aspects which should be investigated further, as no clear conclusions could be drawn from the data obtained so far because of the study design and sample size. Another lacking feature of &#xb5;RT, or more precisely the ecosystem on top, is bridge nodes interfacing other popular middlewares such as ROS 2 or MQTT (<italic>cf.</italic> <xref ref-type="sec" rid="s2-8">section&#xa0;2.8</xref>). Although those are not part of &#xb5;RT itself, the availability of such interface nodes would most probably benefit its adoption for other platforms. Due to its focus on real-time capability and validation of timing constraints at runtime, some compromises were made with the design of &#xb5;RT. First, its current implementation makes extensive use of mutex locks but does not feature preferable lock-free methods. Whether such are actually possible and what benefits this would bring for &#xb5;RT need further investigation. Moreover, performance analyses showed nonlinear scaling in some situations (<italic>cf.</italic> <xref ref-type="sec" rid="s3-2-2">section&#xa0;3.2.2</xref>). As this can become an issue for large, highly complex systems, performance in this regard needs to be further improved. Finally, some proposed enhancements include providing a fallback event system if no external implementation is mapped to its operating system abstraction layer (OSAL; <italic>cf.</italic> <xref ref-type="sec" rid="s2-4">section&#xa0;2.4</xref>).</p>
<p>As &#xb5;RT has already matured to the point that it has become a core component of the AMiRo software habitat, many of these issues and requested features will be addressed in the future. By the regular employment of the platform for teaching, user feedback on changes made to the system can be obtained quickly, and &#xb5;RT will be refined in the upcoming years. Assuming that &#xb5;RT will be accepted by the robotics community and adopted to further platforms, development could be accelerated thanks to its open-source approach.</p>
</sec>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="s5">
<title>Data availability statement</title>
<p>The datasets presented in this study can be found in online repositories. The names of the repository/repositories and accession number(s) can be found at: <ext-link ext-link-type="uri" xlink:href="https://gitlab.ub.uni-bielefeld.de/uRT-evaluation-data/ROS-2-pendulum-demo">https://gitlab.ub.uni-bielefeld.de/uRT-evaluation-data/ROS-2-pendulum-demo</ext-link> <ext-link ext-link-type="uri" xlink:href="https://gitlab.ub.uni-bielefeld.de/uRT-evaluation-data/uRT-performance-benchmark">https://gitlab.ub.uni-bielefeld.de/uRT-evaluation-data/uRT-performance-benchmark</ext-link> <ext-link ext-link-type="uri" xlink:href="https://gitlab.ub.uni-bielefeld.de/uRT-evaluation-data/uRT-usability-study">https://gitlab.ub.uni-bielefeld.de/uRT-evaluation-data/uRT-usability-study</ext-link>.</p>
</sec>
<sec id="s6">
<title>Ethics statement</title>
<p>The studies involving human participants were reviewed and approved by the Ethics Committee of Bielefeld University (EUB). The patients/participants provided their written informed consent to participate in this study.</p>
</sec>
<sec id="s7">
<title>Author contributions</title>
<p>TS contributed to the conception of &#xb5;RT, its implementation, and integration in the AMiRo software habitat. TS designed and conducted all experiments and evaluated the resulting data. SK contributed to the implementation of &#xb5;RT and the development of further applications using it (most notably the CANBridge transport application) and thus greatly helped optimize and fix the code. This manuscript was primarily written by TS with contributions from SK. MH and UR supervised the project and helped enhance and refine the manuscript.</p>
</sec>
<sec id="s8">
<title>Funding</title>
<p>This research was funded under Grant no. 1807ow003a by the <italic>Ministry of Economic Affairs, Innovation, Digitalisation and Energy</italic> (MWIDE) of the State of North Rhine-Westphalia within the Leading-Edge Cluster <italic>Intelligent Technical Systems OstWestfalenLippe</italic> (it&#x2019;s OWL).</p>
</sec>
<ack>
<p>We acknowledge the financial support of the German Research Foundation (DFG) and the Open Access Publication Fund of Bielefeld University for the article processing charge. Many thanks to the numerous students who helped develop &#xb5;RT (and its rather unsuccessful prototype) and especially to the participants of the usability study. Special thanks go to Kathrin Krieger, who greatly helped us with her expertise in designing and evaluating the study and interpreting the results. Further thanks to all other people involved in the AMiRo project for their patience as the development of &#xb5;RT took much longer than expected.</p>
</ack>
<sec sec-type="COI-statement" id="s9">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec sec-type="disclaimer" id="s10">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<fn-group>
<fn id="fn1">
<label>1</label>
<p>CPU: Intel Core i7-7567U (2 cores) locked at 3.5&#xa0;GHz and hyper-threading disabled; OS: Ubuntu 22.04 with real-time kernel (Linux 5.15.0&#x2013;1016-realtime x86&#x5f;64); ROS: &#x201c;Humble Hawksbill&#x201d;</p>
</fn>
<fn id="fn2">
<label>2</label>
<p>
<ext-link ext-link-type="uri" xlink:href="https://gitlab.ub.uni-bielefeld.de/AMiRo/uRtWare">https://gitlab.ub.uni-bielefeld.de/AMiRo/uRtWare</ext-link>; licensed under LGPL 3</p>
</fn>
<fn id="fn3">
<label>3</label>
<p>Modification of <italic>t</italic>
<sub>info,<italic>i</italic>
</sub> is possible if desired</p>
</fn>
<fn id="fn4">
<label>4</label>
<p>While timestamps are defined by &#xb5;RT to be 64-bit wide, delays may be represented by a smaller type</p>
</fn>
<fn id="fn5">
<label>5</label>
<p>Although it is recommended to synchronize <italic>nodes</italic>, the implementation actually works on a thread level</p>
</fn>
<fn id="fn6">
<label>6</label>
<p>Retrieval of a <italic>topic</italic> by its identifier has linear runtime complexity: <inline-formula id="inf11">
<mml:math id="m29">
<mml:mi mathvariant="script">O</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>&#x23;</mml:mi>
<mml:mtext mathvariant="italic">topics</mml:mtext>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</fn>
<fn id="fn7">
<label>7</label>
<p>Retrieval of a <italic>service</italic> by its identifier has linear runtime complexity: <inline-formula id="inf12">
<mml:math id="m30">
<mml:mi mathvariant="script">O</mml:mi>
<mml:mrow>
<mml:mo stretchy="false">(</mml:mo>
<mml:mrow>
<mml:mi>&#x23;</mml:mi>
<mml:mtext mathvariant="italic">services</mml:mtext>
</mml:mrow>
<mml:mo stretchy="false">)</mml:mo>
</mml:mrow>
</mml:math>
</inline-formula>
</p>
</fn>
<fn id="fn8">
<label>8</label>
<p>In fact, actions in ROS 2 are composed of multiple topics and services as well</p>
</fn>
<fn id="fn9">
<label>9</label>
<p>Due to the wide support of C by most programming languages, additional interface layers can be added to ease development (<italic>cf.</italic> <xref ref-type="sec" rid="s4-2">section&#xa0;4.2</xref>)</p>
</fn>
<fn id="fn10">
<label>10</label>
<p>STM32F1 (Cortex-M3), STM32F4 (Cortex-M4), STM32F7 (Cortex-M7), STM32-G0 (Cortex-M0&#x2b;), and STM32-L4 (Cortex-M4)</p>
</fn>
<fn id="fn11">
<label>11</label>
<p>Software environment: AMiRo-OS version 2.3 (<xref ref-type="bibr" rid="B44">Sch&#xf6;pping&#xa0;et&#xa0;al., 2016</xref>), which incorporates ChibiOS version 21.11 (<xref ref-type="bibr" rid="B7">di&#xa0;Sirio, 2022</xref>); <italic>cf.</italic> <xref ref-type="bibr" rid="B42">Sch&#xf6;pping and Kenneweg, 2022b</xref>, commit e8ddcd253bb5996509cb82adde700b0fec7798f1</p>
</fn>
<fn id="fn12">
<label>12</label>
<p>Actually, several more applications are already implemented for AMiRo (e.g., for power management), which are not depicted in <xref ref-type="fig" rid="F12">Figure&#xa0;12</xref>.</p>
</fn>
</fn-group>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Ananda</surname>
<given-names>A. L.</given-names>
</name>
<name>
<surname>Tay</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Koh</surname>
<given-names>E.-K.</given-names>
</name>
</person-group> (<year>1992</year>). <article-title>A survey of asynchronous remote procedure calls</article-title>. <source>ACM SIGOPS Oper. Syst. Rev.</source> <volume>26</volume>, <fpage>92</fpage>&#x2013;<lpage>109</lpage>. <pub-id pub-id-type="doi">10.1145/142111.142121</pub-id>
</citation>
</ref>
<ref id="B2">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Anderson</surname>
<given-names>J. H.</given-names>
</name>
<name>
<surname>Ramamurthy</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Jeffay</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>1997</year>). <article-title>Real-time computing with lock-free shared objects</article-title>. <source>ACM Trans. Comput. Syst. (TOCS)</source> <volume>15</volume>, <fpage>134</fpage>&#x2013;<lpage>165</lpage>. <pub-id pub-id-type="doi">10.1145/253145.253159</pub-id>
</citation>
</ref>
<ref id="B3">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Bruyninckx</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Klotzb&#xfc;cher</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Hochgeschwender</surname>
<given-names>N.</given-names>
</name>
<name>
<surname>Kraetzschmar</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Gherardi</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Brugali</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2013</year>). &#x201c;<article-title>The BRICS component model: A model-based development paradigm for complex robotics software systems</article-title>,&#x201d; in <conf-name>Proceedings of the 28th Annual ACM Symposium on Applied Computing</conf-name>, <fpage>1758</fpage>&#x2013;<lpage>1764</lpage>.</citation>
</ref>
<ref id="B4">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Bruyninckx</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2001</year>). &#x201c;<article-title>Open robot control software: The OROCOS project</article-title>,&#x201d; in <conf-name>Proceedings 2001 ICRA. IEEE International Conference on Robotics and Automation (IEEE)</conf-name>, <fpage>2523</fpage>&#x2013;<lpage>2528</lpage>.</citation>
</ref>
<ref id="B5">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Caromel</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>1993</year>). <article-title>Toward a method of object-oriented concurrent programming</article-title>. <source>Commun. ACM</source> <volume>36</volume>, <fpage>90</fpage>&#x2013;<lpage>102</lpage>. <pub-id pub-id-type="doi">10.1145/162685.162711</pub-id>
</citation>
</ref>
<ref id="B6">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Di Natale</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Stankovic</surname>
<given-names>J. A.</given-names>
</name>
</person-group> (<year>2000</year>). <article-title>Scheduling distributed real-time tasks with minimum jitter</article-title>. <source>IEEE Trans. Comput.</source> <volume>49</volume>, <fpage>303</fpage>&#x2013;<lpage>316</lpage>. <pub-id pub-id-type="doi">10.1109/12.844344</pub-id>
</citation>
</ref>
<ref id="B7">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>di Sirio</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>ChibiOS</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="http://www.chibios.org">www.chibios.org</ext-link>
</comment>.</citation>
</ref>
<ref id="B8">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>di Sirio</surname>
<given-names>G.</given-names>
</name>
</person-group> (<year>2020</year>). <article-title>ChibiOS/RT the ultimate guide (giovanni di Sirio)</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://www.chibios.org/dokuwiki/doku.php?id=chibios:documentation:books:rt:start">https://www.chibios.org/dokuwiki/doku.php?id&#x3d;chibios:documentation:books:rt:start</ext-link>
</comment>.</citation>
</ref>
<ref id="B9">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Eugster</surname>
<given-names>P. T.</given-names>
</name>
<name>
<surname>Felber</surname>
<given-names>P. A.</given-names>
</name>
<name>
<surname>Guerraoui</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Kermarrec</surname>
<given-names>A.-M.</given-names>
</name>
</person-group> (<year>2003</year>). <article-title>The many faces of publish/subscribe</article-title>. <source>ACM Comput. Surv. (CSUR)</source> <volume>35</volume>, <fpage>114</fpage>&#x2013;<lpage>131</lpage>. <pub-id pub-id-type="doi">10.1145/857076.857078</pub-id>
</citation>
</ref>
<ref id="B10">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>Faust</surname>
<given-names>J.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>Rosrt</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://wiki.ros.org/rosrt">https://wiki.ros.org/rosrt</ext-link>
</comment>.</citation>
</ref>
<ref id="B11">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Fay-Wolfe</surname>
<given-names>V.</given-names>
</name>
<name>
<surname>DiPippo</surname>
<given-names>L. C.</given-names>
</name>
<name>
<surname>Cooper</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Johnson</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Kortmann</surname>
<given-names>P.</given-names>
</name>
<name>
<surname>Thuraisingham</surname>
<given-names>B.</given-names>
</name>
</person-group> (<year>2000</year>). <article-title>Real-time CORBA</article-title>. <source>IEEE Trans. Parallel Distributed Syst.</source> <volume>11</volume>, <fpage>1073</fpage>&#x2013;<lpage>1089</lpage>. <pub-id pub-id-type="doi">10.1109/71.888646</pub-id>
</citation>
</ref>
<ref id="B12">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>Grisby</surname>
<given-names>D.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>omniORB</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://omniorb.sourceforge.io/">https://omniorb.sourceforge.io/</ext-link>
</comment>.</citation>
</ref>
<ref id="B13">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Henning</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2006</year>). <article-title>The rise and fall of CORBA</article-title>. <source>Queue</source> <volume>4</volume>, <fpage>28</fpage>&#x2013;<lpage>34</lpage>. <pub-id pub-id-type="doi">10.1145/1142031.1142044</pub-id>
</citation>
</ref>
<ref id="B14">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Herbrechtsmeier</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Korthals</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Sch&#xf6;pping</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>R&#xfc;ckert</surname>
<given-names>U.</given-names>
</name>
</person-group> (<year>2016</year>). &#x201c;<article-title>AMiRo: A modular &#x26; customizable open-source mini robot platform</article-title>,&#x201d; in <conf-name>2016 20th International Conference on System Theory, Control and Computing</conf-name> (<publisher-name>ICSTCC)IEEE</publisher-name>), <fpage>687</fpage>&#x2013;<lpage>692</lpage>.</citation>
</ref>
<ref id="B15">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Herbrechtsmeier</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2017</year>). <source>Modell eines agilen Leiterplattenentwurfsprozesses basierend auf der interdisziplin&#xe4;ren Entwicklung eines modularen autonomen Miniroboters</source>. <comment>Ph.D. thesis</comment>. <publisher-loc>Bielefeld (Germany)</publisher-loc>: <publisher-name>Bielefeld University</publisher-name>.</citation>
</ref>
<ref id="B16">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Huang</surname>
<given-names>A. S.</given-names>
</name>
<name>
<surname>Olson</surname>
<given-names>E.</given-names>
</name>
<name>
<surname>Moore</surname>
<given-names>D. C.</given-names>
</name>
</person-group> (<year>2010</year>). <source>Lcm: Lightweight communications and marshalling</source> in <conf-name>2010 IEEE/RSJ International Conference on Intelligent Robots and Systems (IEEE)</conf-name>, <fpage>4057</fpage>&#x2013;<lpage>4062</lpage>.</citation>
</ref>
<ref id="B17">
<citation citation-type="book">
<collab>International Organization for Standardization (ISO)</collab> (<year>2011</year>). <source>Information technology &#x2014; programming languages &#x2014; C</source>, <comment>Tech. Rep.9899</comment>. <publisher-loc>Geneva, Switzerland</publisher-loc>: <publisher-name>International Organization for Standardization ISO</publisher-name>, <fpage>2011</fpage>.</citation>
</ref>
<ref id="B18">
<citation citation-type="book">
<collab>International Organization for Standardization (ISO)</collab> (<year>1993</year>). <source>Road vehicles &#x2013; controller area network (CAN)</source>. <comment>Tech. Rep. 11898</comment>. <publisher-loc>Geneva, Switzerland</publisher-loc>: <publisher-name>International Organization for Standardization ISO</publisher-name>.</citation>
</ref>
<ref id="B19">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Jahn</surname>
<given-names>U.</given-names>
</name>
</person-group> (<year>2021</year>). <source>Verteilte Systemarchitektur f&#xfc;r mobile roboter</source>. <comment>Ph.D. thesis</comment>. <publisher-loc>Bielefeld (Germany)</publisher-loc>: <publisher-name>Bielefeld University</publisher-name>.</citation>
</ref>
<ref id="B20">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Kay</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Tsouroukdissian</surname>
<given-names>A. R.</given-names>
</name>
</person-group> (<year>2015</year>). <source>Real-time control in ROS and ROS 2.0</source>. <publisher-loc>Hamburg, Germany</publisher-loc>: <publisher-name>ROSCon15</publisher-name>.</citation>
</ref>
<ref id="B21">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Korthals</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Wolf</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>Rudolph</surname>
<given-names>D.</given-names>
</name>
<name>
<surname>R&#xfc;ckert</surname>
<given-names>U.</given-names>
</name>
</person-group> (<year>2019</year>). &#x201c;<article-title>Fiducial marker based extrinsic camera calibration for robot experiment platforms</article-title>,&#x201d; in <conf-name>2019 European Conference on Mobile Robots (ECMR)</conf-name>, <fpage>1</fpage>&#x2013;<lpage>6</lpage>.</citation>
</ref>
<ref id="B22">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Lund</surname>
<given-names>A. M.</given-names>
</name>
</person-group> (<year>2001</year>). <article-title>Measuring usability with the use questionnaire</article-title>. <source>Usability interface</source> <volume>8</volume>, <fpage>3</fpage>&#x2013;<lpage>6</lpage>.</citation>
</ref>
<ref id="B23">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Macenski</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Foote</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Gerkey</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Lalancette</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Woodall</surname>
<given-names>W.</given-names>
</name>
</person-group> (<year>2022</year>). <article-title>Robot operating system 2: Design, architecture, and uses in the wild</article-title>. <source>Sci. Robotics</source> <volume>7</volume>, <fpage>eabm6074</fpage>. <pub-id pub-id-type="doi">10.1126/scirobotics.abm6074</pub-id>
</citation>
</ref>
<ref id="B24">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Mallet</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Pasteur</surname>
<given-names>C.</given-names>
</name>
<name>
<surname>Herrb</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Lemaignan</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Ingrand</surname>
<given-names>F.</given-names>
</name>
</person-group> (<year>2010</year>). &#x201c;<article-title>GenoM3: Building middleware-independent robotic components</article-title>,&#x201d; in <conf-name>2010 IEEE International Conference on Robotics and Automation</conf-name> (<publisher-name>IEEE</publisher-name>), <fpage>4627</fpage>&#x2013;<lpage>4632</lpage>.</citation>
</ref>
<ref id="B25">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Maruyama</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Kato</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Azumi</surname>
<given-names>T.</given-names>
</name>
</person-group> (<year>2016</year>). &#x201c;<article-title>Exploring the performance of ROS2</article-title>,&#x201d; in <conf-name>Proceedings of the 13th International Conference on Embedded Software</conf-name> (<publisher-loc>New York, NY</publisher-loc>: <publisher-name>EMSOFT</publisher-name>), <fpage>9</fpage>. <pub-id pub-id-type="doi">10.1145/2968478.2968502</pub-id>
</citation>
</ref>
<ref id="B26">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Matteucci</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Migliavacca</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Bonarini</surname>
<given-names>A.</given-names>
</name>
</person-group> (<year>2015</year>). &#x201c;<article-title>Practical applications of the R2P embedded framework for robot rapid development</article-title>,&#x201d; in <conf-name>2015 IEEE International Conference on Technologies for Practical Robot Applications (TePRA</conf-name> (<publisher-name>IEEE</publisher-name>), <fpage>1</fpage>&#x2013;<lpage>6</lpage>.</citation>
</ref>
<ref id="B27">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Migliavacca</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Bonarini</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Matteucci</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2013</year>). <article-title>RTCAN-A real-time CAN-bus protocol for robotic applications</article-title>. <source>ICINCO</source> (<issue>2</issue>), <fpage>353</fpage>&#x2013;<lpage>360</lpage>.</citation>
</ref>
<ref id="B28">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>Migliavacca</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2016</year>). <article-title>Rapid robot prototyping</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://github.com/r2p">https://github.com/r2p</ext-link>
</comment>.</citation>
</ref>
<ref id="B29">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Migliavacca</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2013</year>). <source>The R2P framework for robot prototyping: Methodological approach, hardware modules, and software components</source>. <comment>Ph.D. thesis</comment>. <publisher-loc>Politecnico di Milano</publisher-loc>.</citation>
</ref>
<ref id="B30">
<citation citation-type="book">
<collab>Object Management Group (OMG)</collab> (<year>2021</year>). <article-title>Common object request broker architecture</article-title>. <comment>Tech. rep.</comment> <publisher-loc>Milford, MA</publisher-loc>: <publisher-name>Object Management Group OMG</publisher-name> <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://www.omg.org/spec/CORBA/3.4/About-CORBA">https://www.omg.org/spec/CORBA/3.4/About-CORBA</ext-link>
</comment>.</citation>
</ref>
<ref id="B31">
<citation citation-type="book">
<collab>Object Management Group (OMG)</collab> (<year>2019</year>). <article-title>DDS-XRCE: DDS for eXtremely resource constrained environments</article-title>. <comment>Tech. rep.</comment> <publisher-loc>Milford, MA</publisher-loc>: <publisher-name>Object Management Group OMG</publisher-name>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://www.omg.org/spec/DDS-XRCE/1.0/PDF">https://www.omg.org/spec/DDS-XRCE/1.0/PDF</ext-link>
</comment>.</citation>
</ref>
<ref id="B32">
<citation citation-type="book">
<collab>Object Management Group (OMG)</collab> (<year>2015</year>). <article-title>OMG data distribution service</article-title>. <comment>Tech. rep.</comment> <publisher-loc>Milford, MA</publisher-loc>: <publisher-name>Object Management Group (OMG)</publisher-name>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://www.omg.org/spec/DDS/1.4/PDF">https://www.omg.org/spec/DDS/1.4/PDF</ext-link>
</comment>.</citation>
</ref>
<ref id="B33">
<citation citation-type="web">
<collab>Object Management Group (OMG)</collab> (<year>2005</year>). <article-title>Real-time CORBA. Tech. Rep., object management group (OMG)</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://www.omg.org/spec/RT/1.2">https://www.omg.org/spec/RT/1.2</ext-link>
</comment>.</citation>
</ref>
<ref id="B34">
<citation citation-type="web">
<collab>Open Source Robotics Foundation (OSRF)</collab> (<year>2022a</year>). <article-title>micro-ROS</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://micro.ros.org/">https://micro.ros.org/</ext-link>
</comment>.</citation>
</ref>
<ref id="B35">
<citation citation-type="web">
<collab>Open Source Robotics Foundation (OSRF)</collab> (<year>2022b</year>). <article-title>Ros 2</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://github.com/ros2">https://github.com/ros2</ext-link>
</comment>.</citation>
</ref>
<ref id="B36">
<citation citation-type="web">
<collab>Open Source Robotics Foundation (OSRF)</collab> (<year>2020</year>). <article-title>Ros</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://www.ros.org/">https://www.ros.org/</ext-link>
</comment>.</citation>
</ref>
<ref id="B37">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Oshana</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2006</year>). &#x201c;<article-title>2 - overview of embedded systems and real-time systems</article-title>,&#x201d; in <source>DSP software development techniques for embedded and real-time systems</source>. Editor <person-group person-group-type="editor">
<name>
<surname>Oshana</surname>
<given-names>R.</given-names>
</name>
</person-group> (<publisher-loc>Burlington: Newnes</publisher-loc>: <publisher-name>Embedded Technology</publisher-name>), <fpage>19</fpage>&#x2013;<lpage>34</lpage>. <pub-id pub-id-type="doi">10.1016/B978-075067759-2/50004-1</pub-id>
</citation>
</ref>
<ref id="B38">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Quigley</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Conley</surname>
<given-names>K.</given-names>
</name>
<name>
<surname>Gerkey</surname>
<given-names>B.</given-names>
</name>
<name>
<surname>Faust</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Foote</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Leibs</surname>
<given-names>J.</given-names>
</name>
<etal/>
</person-group> (<year>2009</year>). &#x201c;<article-title>Ros: An open-source robot operating system</article-title>,&#x201d; in <conf-name>ICRA workshop on open source software</conf-name> (<publisher-loc>Kobe, Japan</publisher-loc>), <fpage>5</fpage>.</citation>
</ref>
<ref id="B39">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>Quigley</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2015</year>). <article-title>ROS2 on &#x201d;small&#x201d; embedded systems</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://roscon.ros.org/2015/presentations/ros2_on_small_embedded_systems.pdf">https://roscon.ros.org/2015/presentations/ros2_on_small_embedded_systems.pdf</ext-link>
</comment>.</citation>
</ref>
<ref id="B40">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>Remedy</surname>
<given-names>I. T.</given-names>
</name>
</person-group> (<year>2019</year>). <article-title>TAOX11</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://www.taox11.org/">https://www.taox11.org/</ext-link>
</comment>.</citation>
</ref>
<ref id="B41">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Schmidt</surname>
<given-names>D. C.</given-names>
</name>
<name>
<surname>Levine</surname>
<given-names>D. L.</given-names>
</name>
<name>
<surname>Mungee</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>1998</year>). <article-title>The design of the TAO real-time object request broker</article-title>. <source>Comput. Commun.</source> <volume>21</volume>, <fpage>294</fpage>&#x2013;<lpage>324</lpage>. <pub-id pub-id-type="doi">10.1016/s0140-3664(97)00165-5</pub-id>
</citation>
</ref>
<ref id="B42">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>Sch&#xf6;pping</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Kenneweg</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2022b</year>). <article-title>AMiRo-Apps</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://gitlab.ub.uni-bielefeld.de/AMiRo/AMiRo-Apps">https://gitlab.ub.uni-bielefeld.de/AMiRo/AMiRo-Apps</ext-link>
</comment>.</citation>
</ref>
<ref id="B43">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sch&#xf6;pping</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Kenneweg</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2022a</year>). <article-title>&#xb5;RT</article-title>. <pub-id pub-id-type="doi">10.4119/unibi/2966336</pub-id>
</citation>
</ref>
<ref id="B44">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Sch&#xf6;pping</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Korthals</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Herbrechtsmeier</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>Chinapirom</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Abel</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Barther</surname>
<given-names>M.</given-names>
</name>
<etal/>
</person-group> (<year>2016</year>). <article-title>AMiRo-OS</article-title>. <pub-id pub-id-type="doi">10.4119/unibi/2902276</pub-id>
</citation>
</ref>
<ref id="B45">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Sch&#xf6;pping</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Korthals</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Herbrechtsmeier</surname>
<given-names>S.</given-names>
</name>
<name>
<surname>R&#xfc;ckert</surname>
<given-names>U.</given-names>
</name>
</person-group> (<year>2015</year>). &#x201c;<article-title>AMiRo: A mini robot for scientific applications</article-title>,&#x201d; in <conf-name>International Work-Conference on Artificial Neural Networks</conf-name> (<publisher-name>Springer</publisher-name>), <fpage>199</fpage>&#x2013;<lpage>205</lpage>.</citation>
</ref>
<ref id="B46">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Sch&#xf6;pping</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Korthals</surname>
<given-names>T.</given-names>
</name>
<name>
<surname>Hesse</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>R&#xfc;ckert</surname>
<given-names>U.</given-names>
</name>
</person-group> (<year>2018</year>). &#x201c;<article-title>AMiRo: A mini robot as versatile teaching platform</article-title>,&#x201d; in <conf-name>International Conference on Robotics and Education RiE 2017</conf-name> (<publisher-name>Springer</publisher-name>), <fpage>177</fpage>&#x2013;<lpage>188</lpage>.</citation>
</ref>
<ref id="B47">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Schulze</surname>
<given-names>M.</given-names>
</name>
</person-group> (<year>2009</year>). <article-title>FAMOUSO&#x2013;Eine adaptierbare Publish/Subscribe Middleware f&#xfc;r ressourcenbeschr&#xe4;nkte Systeme</article-title>. <source>Electron. Commun. EASST</source> <volume>17</volume>.</citation>
</ref>
<ref id="B48">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Schulze</surname>
<given-names>M.</given-names>
</name>
<name>
<surname>Zug</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2008</year>). &#x201c;<article-title>A middleware based framework for multi-robot development</article-title>,&#x201d; in <conf-name>Proceedings of the 3rd. IEEE European Conference on Smart Sensing and Context (EuroSSC)</conf-name>, <fpage>29</fpage>&#x2013;<lpage>31</lpage>.</citation>
</ref>
<ref id="B49">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Shin</surname>
<given-names>K. G.</given-names>
</name>
<name>
<surname>Ramanathan</surname>
<given-names>P.</given-names>
</name>
</person-group> (<year>1994</year>). <article-title>Real-time computing: A new discipline of computer science and engineering</article-title>. <source>Proc. IEEE</source> <volume>82</volume>, <fpage>6</fpage>&#x2013;<lpage>24</lpage>. <pub-id pub-id-type="doi">10.1109/5.259423</pub-id>
</citation>
</ref>
<ref id="B50">
<citation citation-type="web">
<person-group person-group-type="author">
<name>
<surname>Stanford-Clark</surname>
<given-names>A.</given-names>
</name>
<name>
<surname>Hunkeler</surname>
<given-names>U.</given-names>
</name>
</person-group> (<year>1999</year>). <article-title>MQ telemetry transport (MQTT)</article-title>. <comment>Available at: <ext-link ext-link-type="uri" xlink:href="https://mqtt.org">https://mqtt.org</ext-link>
</comment>.</citation>
</ref>
<ref id="B51">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Stankovic</surname>
<given-names>J. A.</given-names>
</name>
</person-group> (<year>1988</year>). <article-title>Misconceptions about real-time computing: A serious problem for next-generation systems</article-title>. <source>Computer</source> <volume>21</volume>, <fpage>10</fpage>&#x2013;<lpage>19</lpage>. <pub-id pub-id-type="doi">10.1109/2.7053</pub-id>
</citation>
</ref>
<ref id="B52">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Torvalds</surname>
<given-names>L.</given-names>
</name>
<name>
<surname>Kroah-Hartman</surname>
<given-names>G.</given-names>
</name>
<name>
<surname>Levin</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2022</year>). <source>Linux v5.18</source>.</citation>
</ref>
<ref id="B53">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wei</surname>
<given-names>H.</given-names>
</name>
<name>
<surname>Shao</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Huang</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Chen</surname>
<given-names>R.</given-names>
</name>
<name>
<surname>Guan</surname>
<given-names>Y.</given-names>
</name>
<name>
<surname>Tan</surname>
<given-names>J.</given-names>
</name>
<etal/>
</person-group> (<year>2016</year>). <article-title>RT-ROS: A real-time ROS architecture on multi-core processors</article-title>. <source>Future Gener. Comput. Syst.</source> <volume>56</volume>, <fpage>171</fpage>&#x2013;<lpage>178</lpage>. <pub-id pub-id-type="doi">10.1016/j.future.2015.05.008</pub-id>
</citation>
</ref>
<ref id="B54">
<citation citation-type="confproc">
<person-group person-group-type="author">
<name>
<surname>Wienke</surname>
<given-names>J.</given-names>
</name>
<name>
<surname>Wrede</surname>
<given-names>S.</given-names>
</name>
</person-group> (<year>2011</year>). &#x201c;<article-title>A middleware for collaborative research in experimental robotics</article-title>,&#x201d; in <conf-name>2011 IEEE/SICE International Symposium on System Integration (SII)</conf-name> (<publisher-name>IEEE</publisher-name>), <fpage>1183</fpage>&#x2013;<lpage>1190</lpage>.</citation>
</ref>
<ref id="B55">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>W&#xf6;rn</surname>
<given-names>H.</given-names>
</name>
</person-group> (<year>2006</year>). <source>Echtzeitsysteme: Grundlagen, funktionsweisen, anwendungen</source>. <publisher-name>Springer-Verlag</publisher-name>.</citation>
</ref>
<ref id="B56">
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Yang</surname>
<given-names>Z.</given-names>
</name>
<name>
<surname>Duddy</surname>
<given-names>K.</given-names>
</name>
</person-group> (<year>1996</year>). <article-title>Corba: A platform for distributed object computing</article-title>. <source>ACM SIGOPS Oper. Syst. Rev.</source> <volume>30</volume>, <fpage>4</fpage>&#x2013;<lpage>31</lpage>. <pub-id pub-id-type="doi">10.1145/232302.232303</pub-id>
</citation>
</ref>
<ref id="B57">
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Zurawski</surname>
<given-names>R.</given-names>
</name>
</person-group> (<year>2006</year>). <source>Embedded systems handbook</source>. <publisher-loc>Boca Raton, FL</publisher-loc>: <publisher-name>CRC Press</publisher-name>.</citation>
</ref>
</ref-list>
</back>
</article>