kriswiner/MPU6050

[Question] how to compute relative position (vector) with sensor fusion?

gotgot1995 opened this issue · 4 comments

@kriswiner Hi,

Thanks for your work on sensor fusion. It has been a real help for my classmates and I. It's also great that you got interested in porting your work on the STM32 board family, these are great products.

For our school project, we're more interested in the trajectory than in the orientation of the sensor (in other words "where is it going in 3D space").

How can we retrieve that information based on sensor fusion ? We have the same breakout bord as described in your article.

We're not algebra masters so we don't really know how to compute this data.

Any ideas ?

Thanks in advance,

Hi Kris,

I'm sharing a YouTube link where I demonstrated this "1-2 seconds" of positional accuracy (inaccuracy). https://www.youtube.com/watch?v=1Unwo9w_I28
I'm using the 9250, cousins I think, but my code is not efficient yet because I'm not reading motion data using it's interrupt, I'm just polling it and that screws up my time accuracy. I sample around 30/sec, and even with my random code timing, it does track somewhat.

Ironically, I took the exact same approach as you did (gotgot1995) in that I removed gravity and double integrated Accel. (probably got that tip from Kris... I've been at this a while). Keep in mind, I had to also remove acceleration vectors due to rotation and that had some Tan functions in there. I also only need the position over a 1 second period of foot travel with clear start and end sensing because of the pressure sensor in the pedal, so I may have a use case for this approach. Also, notice that I'm squeezing the pedal near the toe - just before moving and when I stop. Any longer and it would drift off to infinity very quickly (butterfly effect from errors). And this is only 1 axis, I need 2 for my application, and in space you need 3 and then come those Euler coordinates and stuff.

I will be attempting to update my code soon (working on the SoulPedal.com hardware still/again) and I could speed things up (I think) but that's going to be a lot of calculations. Oh, and I believe I was only using floats not doubles. I just realized this in looking at the compiler where double option was unselected.

Anyway, fun stuff and I do watch this topic. Kris has been a big help so far, thanks man. My plan is to complete a build of 15 units then look for beta testers. I'm thinking this forum might be a good start for the Arduino interface, right?

21 (AKA John)

Thanks a lot for all these precious details @kriswiner, I'll take a look into these sensors. Also thanks for the heads-up @SoulPedal .

I know that most things you can find on the Internet are irrelevant, however I was surprised to see what this guy could achieve with just a simple 6DoF IMU : 3D Tracking with IMU .

What do you guys think ?