I don't recall seeing you produce any data either.
I have published my navigation robot about 3 years ago in the RobotC forum. During that time I have published several versions and also explained intermediately the results:
A) only odometry
B) odometry + simultaneously compass all over the time (worst)
C) odometry + compass correction at standstill (like A, slightly worse, but improvable by filters)
The problem with trying to feed odometry into this system is that because of the accumulation of errors over time the probability/confidence associated with the data for this source will mean that that it does not contribute very much to the overall result.
Of course not the raw odometric data (encoder values) should be taken as inputs but the calculated headings and positions . The same it's with all other KF inputs:
relative heading angle by encoder trigonometry;
compass heading can be directly used as a heading input to KF,
the gyro value has to be integrated to be used for heading input to KF,
distance from wheel circumference and encoder ticks (gyro and compass are useless for distance calculation)
distance from accelation sensor by integration.
The position (x,y) is calculated by conversion of the polar coordinates (distance, heading) into cartesic coordinates.
If the errors are so bad, then why bother even using it?
The values of course not always are bad - but sometimes, intermediately, e.g. having the compass ad the related odometry heading (plus a fictive gyro):
Code: Select all
90 - 93 - 77 - 88 - 89 - 112 - 91 - 92 (compass, direct)
90 - 91 - 90 - 91 - 90 - 89 - 88 - 89 (odometry, by trigonometry)
90 - 92 - 88 - 114 - 98 - 90 - 84 - 85 (fictive gyro, by integration)
odometry values normaly do not jump or shift (because they base on integer counter values), but they may drift;
compass may shift and have declination, gyro may shift and drift (probably I guess, I don't have one)
If you really only have 2 KF inputs because 3 are too complicated to calculate (as aswin wrote), you will have to make a decision which one you'll dismiss - or you really manage to have 3 inputs to KF (for heading; for distance you only have 2 independent inputs anyway by odometry + acceleration)