Repolode
hijimasa

hijimasa/cxd5602pwbimu_localizer_arduino

Arduino IDE project for the Sony Spresense board that estimates position and attitude from its IMU using dead reckoning with ZUPT.

Stars
29
Forks
6
Open issues
1
Last commit
22 hours ago

What is it?

This project runs inertial localization on the Sony Spresense main board with the CXD5602PWBIMU add-on IMU. It reads acceleration and angular rate at 1920 Hz and estimates attitude, velocity and position in an Earth-frame NWU coordinate system. The work is split across the two Spresense cores: MainCore acquires IMU data and prints output over serial, while SubCore1 runs the Fusion AHRS library, zero-velocity updates (ZUPT), bias learning and trapezoidal integration.

The position estimate is built from a stationary start-up calibration of about 15 seconds, after which the device prints 18-value CSV lines at 30 Hz. Stationary periods reset velocity and suppress drift, and when a stop is confirmed the accumulated velocity error from the preceding motion is removed from the position. The algorithm is written as Arduino-independent C++ so it can be tested on a host PC with synthetic data, and recordings from the device can be replayed through the same code.

The repository also includes a six-orientation accelerometer bias calibration over serial, a recording tool for raw device data, and a ROS 2 node that converts the serial output into standard ROS messages.

Key features

  • 01Reads IMU data at 1920 Hz and passes it between the two Spresense cores through a ring buffer.
  • 02Estimates attitude with the Fusion AHRS library and removes gravity from acceleration.
  • 03Detects stationary periods with a variance and mean based ZUPT and resets velocity while still.
  • 04Learns accelerometer bias during rest and compensates earth rotation in the gyro.
  • 05Corrects accumulated position error retroactively when a stop is confirmed.
  • 06Provides a six-orientation accelerometer calibration stored in SPI flash.

Use cases

  • Experimenting with low-cost inertial dead reckoning on a Spresense board.
  • Studying ZUPT and sensor fusion implementations in Arduino-independent C++.
  • Feeding a Spresense IMU's serial output into ROS 2 for RViz visualization.

In collections

Topics

#imu#sensor-fusion#localization#arduino#embedded#zupt#spresense#robotics

FAQ

What is cxd5602pwbimu_localizer_arduino?
Arduino IDE project for the Sony Spresense board that estimates position and attitude from its IMU using dead reckoning with ZUPT. This project runs inertial localization on the Sony Spresense main board with the CXD5602PWBIMU add-on IMU. It reads acceleration and angular rate at 1920 Hz and estimates attitude, velocity and position in an Earth-frame NWU coordinate system. The work is split across the two Spresense cores: MainCore acquires IMU data and prints output over serial, while SubCore1 runs the Fusion AHRS library, zero-velocity updates (ZUPT), bias learning and trapezoidal integration.
Is cxd5602pwbimu_localizer_arduino free to use? What license does it have?
cxd5602pwbimu_localizer_arduino is open source under the MIT license. Check the license terms before using it in commercial products.
Is cxd5602pwbimu_localizer_arduino still maintained?
Actively maintained. The last commit to cxd5602pwbimu_localizer_arduino was on Nov 6, 2026.
What can I use cxd5602pwbimu_localizer_arduino for?
Experimenting with low-cost inertial dead reckoning on a Spresense board. Studying ZUPT and sensor fusion implementations in Arduino-independent C++. Feeding a Spresense IMU's serial output into ROS 2 for RViz visualization.
Where can I get cxd5602pwbimu_localizer_arduino?
The source code and installation instructions are on GitHub: https://github.com/hijimasa/cxd5602pwbimu_localizer_arduino

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects