How ntnu-arl/embedded_rio works
Embedded-RIO is Teensy 4.x firmware for radar-inertial odometry, with an offline log-replay and analysis workflow. Firmware samples the IMU, radar and optional barometer; dispatches measurements to an ESKF; and publishes estimated state over MAVLink or USB while optionally logging sensor data to SD. Replay feeds recorded logs through the shared ESKF for tuning and validation, with plotting, PX4 ULog comparison and ablation analysis. Connections for unsampled analysis internals are limited to README statements and indexed file references.
Main entry points: main.cpp Firmware loop · replay.cpp Replay runner · eskf_node.cpp ESKF fusion · sd_logger.cpp SD card logger
Components 19
Sensor acquisition
- Firmware loop
src/main.cpp - BMI088 IMU
src/drivers/bmi08x.cpp - IWR6843 radar
src/drivers/xwr6843aop.cpp - BMP388 barometer
src/drivers/bmp388.cpp
State estimation
- ESKF fusion
src/filter/eskf_node.cpp - RIO ESKF library
lib/rio-lib
Outputs and logging
- MAVLink telemetry
src/io/telemetry.cpp - USB diagnostics
src/io/debug.cpp - Live serial plotter
scripts/serial_plotter.py - SD card logger
src/io/sd_logger.cpp
Offline replay and analysis
- Replay runner
tools/replay/src/replay.cpp - CSV log reader
tools/replay/src/log_reader.cpp - Ablation analysis
tools/replay/scripts/compare_ablation.py - PX4 ULog comparison
tools/replay/scripts/compare_with_ulog.py - Run plots
tools/replay/scripts/plot_runs.py - Plot conventions
tools/replay/scripts/plot_style.py
Other components
- PX4 flight controller
- SD card
- Recorded sensor log
Connections 21
- Firmware loop → BMI088 IMU: reads samples
src/main.cpp - Firmware loop → IWR6843 radar: drains frames
src/main.cpp - Firmware loop → BMP388 barometer: reads samples
src/main.cpp - Firmware loop → ESKF fusion: dispatches measurements
src/main.cpp - ESKF fusion → RIO ESKF library: runs filter
README.md - ESKF fusion → MAVLink telemetry: publishes state
src/filter/eskf_node.cpp - MAVLink telemetry → PX4 flight controller: streams MAVLink
README.md - ESKF fusion → USB diagnostics: prints state
src/filter/eskf_node.cpp - USB diagnostics → Live serial plotter: streams USB data
README.md - ESKF fusion → SD card logger: logs samples
src/filter/eskf_node.cpp - Firmware loop → SD card logger: flushes log
src/main.cpp - SD card logger → SD card: writes CSV
README.md - Recorded sensor log → CSV log reader: reads rows
- Replay runner → CSV log reader: loads events
tools/replay/src/replay.cpp - Replay runner → RIO ESKF library: runs shared ESKF
README.md - Replay runner → Ablation analysis: sweeps configurations
README.md - Replay runner → PX4 ULog comparison: compares estimates
README.md - Replay runner → Run plots: visualizes runs
README.md - Ablation analysis → Plot conventions: uses styles
tools/replay/scripts/compare_ablation.py - PX4 ULog comparison → Plot conventions: uses styles
tools/replay/scripts/compare_with_ulog.py - Run plots → Plot conventions: uses styles
tools/replay/scripts/plot_runs.py