Skip to content

IMU sensor fusion using NuttX and MQTT. Visualize pitch, roll and yaw on Python.

Notifications You must be signed in to change notification settings

fdcavalcanti/nuttx-imu-fusion-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IMU Fusion Demo

This project uses the NuttX RTOS process accelerometer data using the Attitude And Heading Reference System (AHRS) algorithm Fusion and transmits yaw, pitch and roll information through MQTT. On the other side, a Python scripts allows you to visualize this information using a 3D application, based on PyTeapot.

Functional View

Implementation

Deployment

To compile on NuttX through menuconfig, add the nuttx directory as a symbolic link on nuttx-apps.

  $ cd ~/nuttxspace/nuttx-apps
  $ ln -s ~/imu-nuttx-fusion-demo/nuttx FusionDemo

Run make clean and it should appear on Application Configuration under Fusion DEMO.

The important configuration options are:

  • Accelerometer sensitivity (it was tested using MPU6050)
  • Sample rate in milliseconds (defaults to 10 Hz)
  • MQTT Broker IP, port and topic

On the computer side, the best option to run the 3D visualizer or the MQTT dump script is to create a Python virtual environment and install the required packages:

  $ cd ~/imu-nuttx-fusion-demo
  $ python3 -m venv venv
  $ source venv/bin/activate
  $ pip3 install -r requirements.txt
  $ python3 scripts/view_3d.py
  $ python3 scripts/dump_mqtt.py

NOTE: A MQTT broker is required to run this application. I recommend to use Mosquitto, simple to install and to start running.

About

IMU sensor fusion using NuttX and MQTT. Visualize pitch, roll and yaw on Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published