Real-Time Particle Filter Localization on a Cortex-M7 Microcontroller: A Zephyr and Micro-ROS Implementation
Andrea Bonci, Federico Brunella, Matteo Colletta, Alessandro Di Biase, Angjelo Libofsha
Key points
From the paper's conclusion- 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.
Abstract
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 0.235±0.003 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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Embedded implementation of a lightweight multi-rate asynchronous fusion estimator for differential mobile robotsJournal of Physics: Conference Series · 2026
- Embedded Bare-Metal Radar-Inertial OdometryarXiv · 2026
- Onboard Vision and MPC Navigation for Underwater Robots: An Open BlueROV2 Platform for Multi-Robot Experiments & DockingarXiv · 2026
- Toward Autonomous Ecological Monitoring with Betaflight FPV Drones: Test-Stand Validation of a Lightweight Visual Servoing PipelineApplied Sciences · 2026
- Monte Carlo-Based Indoor UAV Localization in Dynamic Environments Using Only Four Onboard Range SensorsarXiv · 2026
- Borrowed Eyes: Markerless Nano-UAV Flight with an Active Quadruped ObserverarXiv · 2026