Dead Reckoning for an FPV visualisation project

Hi all!

I've been into FPV for a few months now, and one of the things I've wanted to do was visualise practice race courses over the top of the FPV video feed.  That way I can practice courses at a higher altitude, with more variations, in a space (think: park) that in itself may have no natural obstacles.

I've spent some time doing research, and think it can be done using IMU/Baro/GPS + EKF, hopefully yielding an "accurate enough" position.  It doesn't have to be perfect, I'd say as long as the position isn't jumping around by more than 20cm it would be usable.  I've played with a couple of 9/10DOF IMU sensors and have a GPS sitting on my table ready to use....  except I'm getting stuck at the "how do I fuse that with the other sensor values?" part.

I've read Simon Levys excellent EKF tutorial (http://home.wlu.edu/~levys/kalman_tutorial/) and I understand most of it. It doesn't go into enough detail for me on how I'd get GPS into the mix, nor do I understand how I form the Jacobian matrices. It's right at that part that my eyes begin to glaze over. I feel like I need help with that particular piece as it's clearly not my area!

Can someone with more experience perhaps guide me in either what I should read, or code that I could adapt?  My goal at this stage is to develop & understand enough that I am processing the raw sensor values, mixing that with the GPS via EKF and ending up with coords that I can use.

I've found various examples that run filters over accel / gyro data, but nothing that is mixing both the integrations of those (to get IMU based position), with GPS data that is supplied at a lower Hz.

Open to any help or suggestions!

Replies

• I've tried this and current gen of mems gyro/accel are not nearly good enough.

I performed the follwing test:

1. Attached the sensor to a granite slab so it couldn't move
2. Measured the sensor bias in all six axii
3. Integrated the output

In a minute it showed as multiple meters out of position.  Vibration and actual movement will make this much much worse.

In the future, hopefully we will have sensor 1000X better and then short term dead reackoning will be viable.

Side note,  integration should be done with 64bit floats as 32 bit floats only have ~7 decimal digits of range, which isn't enough to both show position as a body moves and maintain enough resolution to integrate effectively.

• Hi Phillip,

Yeh, I expect that after a couple of minutes. What I'm really hoping for is that I can get a reasonable fix with GPS, and have the mems provide intermediate output in between GPS fixes.  That way it need only be good enough for 1/5th a second or so  (hence the extended kalman). Of course; this assumes that the GPS is itself "good enough" when filtered. So many things yet to actually test, but have to say I'm having fun learning it (it's been a while since I've done something like this).

I've been doing more reading, and am "further" towards a good understanding. Still not up to the details of extended yet.  However I can see how to do the fusion, and provide differing weights to the predictions and measurements using variance.

I'm working my way through: https://github.com/rlabbe/Kalman-and-Bayesian-Filters-in-Python. Currently in ch8.

rlabbe/Kalman-and-Bayesian-Filters-in-Python
Kalman Filter book using Jupyter Notebook. Focuses on building intuition and experience, not formal proofs. Includes Kalman filters,extended Kalman…
• Oh, and very cool link.

• If all you want is what I would call "short term dead reckoning", then that is very doable.  ArduPilot does this already.

I got into this by wanting to write my own drone control software and incorporate long term dead reckoning into it.  Many people said it could not be done.  I tried any way in the name of learning.  They were right, but I won in the end given how much I learned trying.  Some of this is discussed in my blog: http://philstech.blogspot.com/2012/03/quadcopter-project-overview.html

All my code has been written the arduino platform since it is easy and I enjoy the challenge of trying to make things work with very limited processing power.  I moved on from dead reckoning to create my own quaternion based complimentary filter.  It's not "better" than other options around, but I learned a ton doing it.

A blog about technology focusing on multicopters, my quaternion based IMU, and any thing else that catches my interest.
• It's partly why I'm going down this track. I know the existing ArduCopter code has EKF, but since I don't understand it I'm starting with the basics. I too want to place this onto a small Arduino board. Even if it's just a temporary thing and I move on from here, it'll be nice to get an understanding of the fundamentals so that I can look at various bits of code and apply just what I need (given the limited RAM space/speed of an Arduino).

Oh, and I have your complementary filter post sitting in a browser someplace, ready for reading. When I get the time :)

Activity

Apr 27
Apr 27
RT @f1tenth: Sliding (autonomously) into the weekend like ... 🤖😎 #f1tenth #robots #AutonomousVehicles @OpenRoboticsOrg @NVIDIAEmbedded @Aut…
Apr 25
RT @chr1sa: One of the problems with autonomous car racing is that watching software drive is not a very exciting spectator sport. To help…
Apr 25
RT @SmallpixelCar: Replaced AGX Xavier with @NVIDIAEmbedded Jetson Xavier NX. Now both cars look fast and clean https://t.co/jlcoY2EjZf
Apr 25
RT @chr1sa: Yesterday we had a record number of competitors (36) in our monthly @DIYRobocars virtual autonomous car race. We kept it going…
Apr 25
Apr 16
RT @chr1sa: After more than a year of only virtual races, @DIYRobocars returns to the newly renovated @circuitlaunch on May 22 for the resu…
Apr 11
RT @DAVGtech: And now available with LiDAR 🔥 https://twitter.com/Heavy02011/status/1381137016381964293
Apr 11
RT @Heavy02011: #VirtualRaceLeague: @DIYRobocars Race #9 - #ParkingLotNerds #thunderhillracetrack, CA Join us for the next race April 24th,…
Apr 11
RT @DWalmroth: Weather's finally cooperating, looking forward to racing 1:10 scale autonomous cars outdoors again! @diyrobocars, @NVIDIAEm…
Apr 7
RT @AIDRI_: I finally succeeded in optimizing the trajectory and speed of a car on a #racetrack. Next step: implement a 2d controller and…
Apr 7