Published May 16, 2025 | Version v1
Software Open

Timing experiments with ROS applications using Rust R2R bindings

  • 1. ROR icon Czech Technical University in Prague

Description

Deterministic real-time performance is critical for robotic applications, many of which are developed in C++ using the ROS 2 framework. Recently, Rust has emerged as a compelling alternative to C++ in various domains, including robotics. This study explores whether ROS 2 applications written in Rust can achieve real-time performance comparable to their C++ counterparts. We focus on the R2R library, which provides Rust bindings for ROS 2 with a modern asynchronous programming interface.

This artifact includes source code for several ROS 2 nodes and supporting Python scripts. The nodes implement simple publishers or subscribers and vary in programming language (Rust, C++), Rust asynchronous runtime (futures, Tokio), and callback-to-OS-thread mapping with different thread priorities. The nodes are run with tracing enabled and by post-processing the traces we obtain statistics about end-to-end latencies. Our results demonstrate that specific configurations enable Rust R2R applications to match the real-time performance of C++ applications.

Running the artifact as is does not require any ROS 2 or Rust knowledge. Following our README and running mentioned shell commands should be sufficient. However to verify that the commands do what is promised, some familiarity with ROS 2 workspace structure and Rust's build tool cargo would be beneficial.

Files

Files (118.1 kB)

Name Size Download all
md5:ad707c64ef8fced102c589cd5a53b2c0
118.1 kB Download

Additional details

Software

Repository URL
https://gitlab.ciirc.cvut.cz/skoudmar1/ros-r2r-analysis
Programming language
Rust , C++
Development Status
Active