,
Michal Sojka
,
Zdeněk Hanzálek
Creative Commons Attribution 4.0 International license
The increasing popularity of the Rust programming language in building robotic applications using the Robot Operating System (ROS 2) raises questions about its real-time execution capabilities, particularly when employing asynchronous programming. Existing real-time scheduling and response-time analysis techniques for ROS 2 focus on applications written in C++ and do not address the unique execution models and challenges presented by Rust’s asynchronous programming paradigm. In this paper, we analyze the execution model of R2R - an asynchronous Rust ROS 2 bindings and various asynchronous Rust runtimes, comparing them with the execution model of C++ ROS 2 applications. We propose a structured approach for R2R applications aimed at deterministic real-time operation involving thread prioritization and callback-to-thread mapping schemes. Our experimental evaluation based on measuring end-to-end latencies of a synthetic application shows that the proposed approach is effective and outperforms other evaluated configurations. A more complex autonomous driving case study demonstrates its practical applicability. Overall, the experimental results indicate that our proposed structure achieves bounded response times for time-critical tasks. This paves the way for future work to adapt existing or develop new response-time analysis techniques for R2R applications using our structure.
@InProceedings{skoudlil_et_al:LIPIcs.ECRTS.2025.1,
author = {\v{S}koudlil, Martin and Sojka, Michal and Hanz\'{a}lek, Zden\v{e}k},
title = {{A First Look at ROS 2 Applications Written in Asynchronous Rust}},
booktitle = {37th Euromicro Conference on Real-Time Systems (ECRTS 2025)},
pages = {1:1--1:21},
series = {Leibniz International Proceedings in Informatics (LIPIcs)},
ISBN = {978-3-95977-377-5},
ISSN = {1868-8969},
year = {2025},
volume = {335},
editor = {Mancuso, Renato},
publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik},
address = {Dagstuhl, Germany},
URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECRTS.2025.1},
URN = {urn:nbn:de:0030-drops-235794},
doi = {10.4230/LIPIcs.ECRTS.2025.1},
annote = {Keywords: ROS, Rust, Real-time, Response time}
}