A first look at ROS~2 applications written in asynchronous Rust

📅 2025-05-27
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the lack of real-time guarantees in Rust asynchronous programming for ROS 2 robotic applications. We first systematically model the coupling between Rust’s async execution model—via the R2R binding—and ROS 2’s real-time scheduling, revealing its detrimental impact on end-to-end response time determinism. To restore temporal predictability, we propose a structured scheduling framework for deterministic real-time operation, comprising (i) dynamic thread priority assignment and (ii) explicit callback-to-thread mapping, compatible with both Tokio and async-std runtimes. We evaluate the framework under synthetic workloads and an autonomous driving case study, demonstrating bounded response times, significantly reduced latency for critical tasks, and practical scalability. This work bridges a critical gap in both the theoretical analysis and practical scheduling of Rust-based asynchronous ROS 2 systems.

Technology Category

Planning, Routing, and Scheduling: Scheduling under UncertaintyIntelligent Robots: Multi-Robot SystemsReasoning under Uncertainty: Sequential Decision Making

Application Category

Responsible Web: Machine-in-the-loop, human agency and autonomySystems and Infrastructure for Web, Mobile and WoT: Applied ML and AI for Web-based mobile applicationsSearch and Retrieval-Augmented AI: Web learning to rank, online learning, and counterfactual learning for ranking
📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

Assessing real-time capabilities of Rust in ROS~2 applications
Addressing gaps in scheduling for Rust's async ROS~2 bindings
Proposing deterministic real-time structures for R2R applications
Innovation

Methods, ideas, or system contributions that make the work stand out.

Analyzes R2R execution model in Rust
Proposes thread prioritization for real-time
Demonstrates bounded response times effectively
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
M
Martin Škoudlil
Czech Institute of Informics, Robotics and Cybernetics, Czech Technical University in Prague, Czech Republic
M
Michal Sojka
Czech Institute of Informics, Robotics and Cybernetics, Czech Technical University in Prague, Czech Republic
Z
Zdeněk Hanzálek
Czech Institute of Informics, Robotics and Cybernetics, Czech Technical University in Prague, Czech Republic