Interest in the adoption of autonomous vehicles (AVs) continues to grow. It is essential to design new software architectures that meet stringent real-time, safety, and scalability requirements while integrating heterogeneous hardware and software solutions from different vendors and developers. This paper presents a lightweight, modular, and scalable architecture grounded in Service-Oriented Architecture (SOA) principles and implemented in ROS 2 (Robot Operating System 2). The proposed design leverages ROS 2’s Data Distribution System-based Quality-of-Service model to provide reliable communication, structured lifecycle management, and fault containment across distributed compute nodes. The architecture is organized into Perception, Planning, and Control layers with decoupled sensor access paths to satisfy heterogeneous frequency and hardware constraints. The decision-making core follows an event-driven policy that prioritizes fresh updates without enforcing global synchronization, applying zero-order hold where inputs are not refreshed. The architecture was validated on a 1:10-scale autonomous vehicle operating on a city-like track. The test environment covered canonical urban scenarios (lane-keeping, obstacle avoidance, traffic-sign recognition, intersections, overtaking, parking, and pedestrian interaction), with absolute positioning provided by an indoor GPS (Global Positioning System) localization setup. This work shows that the end-to-end Perception–Planning pipeline consistently met worst-case deadlines, yielding deterministic behaviour even under stress. The proposed architecture can be deemed compliant with real-time application standards for our use case on the 1:10 test vehicle, providing a robust foundation for deployment and further refinement.
Resource-constrained robotic platforms require localization estimators with predictable computational and memory costs. This paper presents the implementation and experimental characterization of a compact hybrid Extended Kalman Filter (EKF)–particle estimator on a single STM32H745 Cortex-M7 core under Zephyr RTOS and micro-ROS, distributed by STMicroelectronics, the Linux Foundation, and eProsima, respectively. This study originates from an existing autonomous-vehicle prototype whose localization pipeline runs on an NVIDIA Jetson platform and comprises two estimators in cascade: a 15-state pose-fusion EKF, which combines wheel-odometry and inertial data into a filtered local pose, followed by a map and vision-aided particle filter that uses the EKF output for particle propagation and incorporates UWB and occupancy-map likelihoods. This architecture provides both the application context and the reference trajectory for the present work, but its computational and sensing requirements prevent direct migration to a microcontroller. The localization function is therefore reformulated as a three-state estimator using wheel-encoder velocity, inertial measurements, and pre-trilaterated Ultra-Wideband (UWB) position fixes. A shared EKF maintains a Gaussian state approximation and supports particle-cloud regeneration, avoiding per-particle covariance matrices. The estimator is integrated into a statically allocated, two-thread architecture that separates middleware communication from estimation. Its performance was evaluated using a Hardware-in-the-Loop (HIL) approach, in which recorded vehicle sensor data were replayed through the physical STM32H745 target. An additional on-vehicle run verified the estimator’s operation within the live ROS 2 sensor graph. At the default configuration of 256 particles, the estimator achieved a position RMSE of m (mean ± SD of run-level RMSE across 18 replays of the reference session in four campaigns) relative to the vehicle’s on-board reference estimator. In the dedicated operating-point campaign, the estimator had a mean update time of approximately 1.13 ms and no observed violations of the adopted 5 ms estimator-step limit. Accuracy changed only marginally for particle counts of 64 or more, whereas computational cost increased approximately linearly with particle count. The complete firmware occupied 196 KB of FLASH and 158 KB of RAM. These results establish the feasibility and empirical real-time envelope of the proposed embedded implementation, while absolute localization accuracy and performance under genuinely multimodal likelihoods remain subjects for future validation.