Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to calibrate the IMU? #2

Open
shujaatak opened this issue Jan 21, 2019 · 7 comments
Open

How to calibrate the IMU? #2

shujaatak opened this issue Jan 21, 2019 · 7 comments

Comments

@shujaatak
Copy link

Can you mention how to calibrate the IMU please?

@aster94
Copy link
Owner

aster94 commented Jan 21, 2019

Hi @shujaatak the IMU calibration is something that relies on the library you are using for the IMU not to the filter to get the data

This is an example of the calibration you could use for the MPU9250 with the library i use https://github.com/bolderflight/MPU9250/blob/master/README.md#calibration-functions

@lcipolina
Copy link

Hi, can you explain a little bit further how do you obtain the graphics for the filtered data. Are you using Processing? if so, which is the sketch?

Also, what is the output of the "Euler Data"? For example, is the YAW measured in angles?

@aster94
Copy link
Owner

aster94 commented Nov 26, 2019

The function get*() returns angles, meanwhile the functions get*Radiant() returns radiants

Which graphics do you mean?

@lcipolina
Copy link

Hi, thanks for the reply. Several questions here if you don't mind...

  1. So I guess one has to run a magnetometer calibration function before running your script? As you suggested above. We should add this function at the beginning of the script:

int calibrateMag()

  1. For "graphics" I meant the video you posted. Did you just copy and pasted the code in the software "Processing" to see the object in 3D? or how do I reproduce your video?

Thank you so much!

PD> By the way, I am using your library with Wire, so I've changed these lines:
const int mpuAddress = 0x68; //usually 0x68 or 0x69
MPU9250 IMU(Wire, mpuAddress);
//#define SS_PIN PB12
//MPU9250 IMU(mySPI, SS_PIN);

@aster94
Copy link
Owner

aster94 commented Nov 26, 2019

  1. the calibration should be run only once, and as i said before " is something that relies on the library you are using for the IMU"

  2. yes you can just copy and paste it into processing

@lcipolina
Copy link

ok, I just wanted to confirm that your script doesnt come with a calibration routine.
I am new to Processing if you don't mind, I am getting an error when Processing tries to find these libraries, as it doesn't know where to look for.

How do I include them? thanks!

#include "MPU9250.h"
#include "Streaming.h"
#include "SensorFusion.h"

@aster94
Copy link
Owner

aster94 commented Nov 26, 2019

you are trying to run the same code for the MCU to a computer, run the code in the extra folder, how it is explained in the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants