Real-Time Particle Filter Localization on a Cortex-M7 Microcontroller: A Zephyr and Micro-ROS Implementation

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.

Authors

Institutions

Publication Details

Journal
Electronics
Published
2026-10-04
DOI
https://doi.org/10.3390/electronics15194537
Primary Topic
Robotics and Sensor-Based Localization
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Real-Time Particle Filter Localization on a Cortex-M7 Microcontroller: A Zephyr and Micro-ROS Implementation

Andrea Bonci, Alessandro Di Biase, Federico Brunella, Matteo Colletta et al.
Electronics
Robotics and Sensor-Based Localization
article

Real-Time Particle Filter Localization on a Cortex-M7 Microcontroller: A Zephyr and Micro-ROS Implementation

Andrea Bonci, Alessandro Di Biase, Federico Brunella, Matteo Colletta, Angjelo Libofsha
article en

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.

ElectronicsVol. 15(19)
Marche Polytechnic University (IT), Polytechnic University of Bari (IT)
Openalex Percentile: Top 16%
Robotics and Sensor-Based Localization
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.