GithubHelp home page GithubHelp logo

imu-position-tracking's Introduction

IMU Position Tracking

3D position tracking based on data from 9 degree of freedom IMU (Accelerometer, Gyroscope and Magnetometer). This can track orientation pretty accurately and position but with significant accumulated errors from double integration of acceleration.

Project Structure

  • main.py: where the main Extended Kalman Filter(EKF) and other algorithms sit.
  • butter.py: a digital realtime butterworth filter implementation from this repo with minor fixes. But I don't use realtime filtering now.
  • mathlib: contains matrix definitions for the EKF and a filter helper function.
  • plotlib.py: some wrappers for visualization used in prototyping.
  • main.ipynb: almost the same as main.py, just used for prototyping.
  • /Ref: Some paper found on the internet that is helpful.
  • /Doc: an Algorithm description (you can view it in html as github doesn't support markdown latex extension) and an API documentation in Chinese.

Data Source

I use an APP called HyperIMU to pull (uncalibrated) data from my phone. Data is sent through TCP and received using data_receiver.py.

imu-position-tracking's People

Contributors

john2zy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

imu-position-tracking's Issues

Units of "data"

Hello, your code gives me a good reference meaning, but after reading the code, I still have a question, that is, what are the units of angular velocity, acceleration, and magnetic declination as input data, and the units of output data of different sensors are different, so the data needs to be converted in advance. Can you please answer that?

imu units

what the imu units should be?
acc in m/s2, gyroscope in rad/sec, magnetometer in micro tesla? correct me please

Pull data from a Serial Device

I'm trying to use a HW-290 IMU connected via a ESP32 on COM10 to send data to this program but I don't know where to start to modify the code (or how to), can anyone point me in the right direction?

IMU DATA format

I just downloaded the APK app and exported the data. The file format is CSV, not "data.txt." Can you please explain how the data is stored in the txt format in the original data used by this code? Thank you.

Can 6 DoF IMU use this codes?

I have an IMU with 6 DoF (Accelerator anf gyroscope), but this project is designed for 9 DoF IMU.
I want to know that whether it can deal with 6 DoF IMU's position tracking.
If it can do this job, How can I set the values of magnetometer?

Online using

Your project is really good.I'd like to use it for data processing in real-time. Is that work still well?Could you give me some advice for modifications. Thanks a lot

I implement your test and can not track my position

Hello, i use hyperimu to pull (uncalibrated) data from my phone, set the data order in your code , when I plot my tracjectory and position, I found the plotted position in figure do not match the real positon. Is it availble to post your data and result plot? Thank you

ASK FOR IMU DATA

Sorry to bother you, I would like to ask if you can send a copy of IMU data. Although you mentioned in read me that you can download data from HyperIMU through TCP, unfortunately, my google play has been banned now, (cause I am in CHN)so I can't get the app. I would like to ask if you can provide a copy of IMU data.Thank you very much.

Who are you?

What a wonderfully clean code.
Who are you? Is this code part of a class?
If so, are some other materials (e.g. syllabus, books) available?

An error reported while running : LinAlgError("Singular matrix")

initializing...
acc var: [0. 0. 0.], norm: 0.0
ang var: [2.22264042e-07 3.78493540e-01 2.42670246e+01], norm: 24.269976085242057
mag var: [74.9536 0. 0. ], norm: 74.9536

processing...
/Users/biumr/Documents/python/IMU-Position-Tracking/mathlib.py:16: RuntimeWarning: invalid value encountered in divide
return x / np.linalg.norm(x)
/Users/biumr/Documents/python/IMU-Position-Tracking/main.py:149: RuntimeWarning: invalid value encountered in scalar divide
Ra = [(acc_noise / np.linalg.norm(at))**2 + (1 - g0 / np.linalg.norm(at))**2] * 3
Traceback (most recent call last):
File "/Users/biumr/Documents/python/IMU-Position-Tracking/main.py", line 367, in
plot_trajectory()
File "/Users/biumr/Documents/python/IMU-Position-Tracking/main.py", line 342, in plot_trajectory
a_nav, orix, oriy, oriz = tracker.attitudeTrack(data[30:], init_list)
File "/Users/biumr/Documents/python/IMU-Position-Tracking/main.py", line 156, in attitudeTrack
K = P @ Ht.T @ np.linalg.inv(S)
File "/Users/biumr/Library/Python/3.9/lib/python/site-packages/numpy/linalg/linalg.py", line 561, in inv
ainv = _umath_linalg.inv(a, signature=signature, extobj=extobj)
File "/Users/biumr/Library/Python/3.9/lib/python/site-packages/numpy/linalg/linalg.py", line 112, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.LinAlgError: Singular matrix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.