Model-Based Development for Event-Driven and Timer-Driven ROS 2 Nodes Considering Parallelization

Read full text
Authors: Kenshin Obi, Takumi Onozawa, Ryo Yoshinaka, Hiroshi Fujimoto, Takuya Azumi
Cited by: 1
References: 31

Abstract

In recent years, the increasing complexity of industrial cyber-physical systems such as autonomous vehicles has tightened real-time constraints, yet conventionalmodel-based development(MBD) does not always exploit embedded multi/many-core processors effectively. Practical obstacles include the need to manually implement ROS 2 I/O and node structure even with a Simulink model, the requirement in ROS 2 to handle execution timing such as event-driven and timer-driven callbacks and multi-input synchronization, and the fact that parallelization often must be repeated for each target hardware configuration. AlthoughModel-based Parallelizer(MBP) can generate task-parallel code from Simulink models, its support for MATLAB/Simulink Toolbox blocks (e.g., ROS Toolbox) is limited, and lacking data parallelism, speedup is hard to obtain. This paper proposes a Simulink-to-ROS 2 parallel code generation method that automatically generates parallelized ROS 2 C++ nodes from Simulink models that include Toolbox blocks, eliminating manual node I/O implementation and extra parallelization effort. The proposed method converts Toolbox-dependent portions into an MBP-applicable representation while extracting ROS 2 metadata and applying SHIM-based core allocation. It preserves Toolbox-equivalent functionality while preventing excessive block reduction from degrading parallelism, and generates ROS 2 C++ nodes that support event-driven and timer-driven execution with optional multi-topic time synchronization. Functional correctness is validated through split-merge-based verification and back-to-back tests using identical rosbag2 inputs. Beyond single-node execution time, the method measures end-to-end pipeline execution time across multiple nodes and ROS 2 latency; variability is quantified using empirical WCET (maximum over 1,000 runs), jitter, and variance. Autoware Universe-derived ROS 2 nodes are evaluated on Raspberry Pi 4 and the Kalray MPPA Coolidge 2 platform, demonstrating up to 15.92 times speedup on a 16-core Coolidge configuration. In a WSL2 planning-to-control pipeline evaluation, increasing intra-node parallelism from 1 to 8 threads reduces mean latency from 87.41 ms to 20.67 ms, while ROS 2 communication and scheduling latency remains below 1% of a 100 ms cycle. These results demonstrate practical, reproducible high-performance ROS 2 deployment on embedded platforms using Toolbox-based MBD.

Fields of Study & Subjects

Embedded Systems Design Techniques Real-Time Systems Scheduling Formal Methods in Verification

Publication details

Journal / source
IEEE Open Journal of the Industrial Electronics Society
Publisher
Institute of Electrical and Electronics Engineers (IEEE)
Volume
7
Pages
348–368
Publication date
1 January 2026