Skip to content

🧭 Visualize attitude tracking algorithm using mobile phone sensors

Notifications You must be signed in to change notification settings

malmgrek/sensorstream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visualize mobile phone sensor data with Python

gif-animation

Table of Contents

Purpose

Stream and visualize mobile phone sensor data in Python. As an example algorithm, a Quaternion-free inclination tracking Kalman filter.

Introduction

Mobile phones contain many interesting sensors that can be useful tools when developing e.g. sensor fusion algorithms for drones or robotics. Python is useful for quickly experimenting with sensor data processing algorithms before implementing the embedded version. This project contains an example implementation of a development environment consisting of

  • Data receiving from mobile phone to (e.g. laptop) computer,
  • Sensor fusion algorithm for estimating sensor orientation,
  • Real-time visualization on display.

The inclination (gravitation) tracking in based on a quaternion-free Kalman filtering method for estimating gravitation direction in sensor's coordinates. Visualization using OpenGL and Pygame.

Instructions

Requirements

Client (laptop computer)

Python programming environment can be installed with

pip install -r requirements.txt

NOTE: PyOpenGL requires typically an OpenGL utility toolkit, e.g. freeglut3-dev on Ubuntu Linux.

Server (mobile phone)

Currently tested only with the Android app SensorStreamer that sets up a mobile server for sending sensor data.

  1. Install the SensorStreamer app
  2. Configure a data package with gyroscope and accelerometer data
  3. Configure a connection with your favorite port (e.g. 3400)
  4. Find out our mobile phone IP address (Search "IP Address" in Android)
    • An option is to activate a "Mobile hotspot" local network and connect the laptop to the network
  5. Start a stream in the app with Lowest possible period
  6. Launch visualization program:
python sensorstream.py --host=<insert_your_phone_ip_address> \
                       --port=3400 \
                       --buffer=8192 \
                       --method=naive

References

S. Särkkä et. al, Adaptive Kalman filtering and smoothing for gravitation tracking in mobile systems

About

🧭 Visualize attitude tracking algorithm using mobile phone sensors

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages