a Kalman filter to fuse gyro and compass readings

Discussion specific to projects ideas and support.
rghansen
Posts: 67
Joined: 12 Oct 2010, 17:44

Re: a Kalman filter to fuse gyro and compass readings

Post by rghansen »

doc-helmut wrote:
if this really happens, this is obviously the wrong approach.


I'm not sure what the 2nd table really shows, but it seems to me that Odometry is about 6-7 times more accurate than compass or gyro. Or am I wrong?

Code: Select all

    Odom Comp Meas
    1.19 7.00 6.00
    2.08 13,00 11.00
    3.20 19.00 18.00
    4.32 27.00 25.00
I fairly sure that what they're trying to say is that the odometry values are what the odometry code thinks the heading value should be after the robot made a series of turns. It just shows how accurate the robot thought it was at executing these turns. Since this was a well engineered robot, these errors are as expected, very low. The compass error is an actual sensor error which shows what it thought about how accurate the robot was. And the measured value is the real value, the so called "ground truth".
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: a Kalman filter to fuse gyro and compass readings

Post by HaWe »

thanks, but your reply is a bit too theoretic to understand.
Is it correct that Odometry is (in reality) about 6-7 times more accurate than compass or gyro?
if yes: that's simillar like my own observations (although I myself have referred to it as "100 times " better)
If not: What are the real observations like?

(of course you'll have to have the correct test platform and software to examine this)

My English is not good enough to understand everything of what you wrote, so again:

referring to the compass acuracy: do you tell the robot to go ahead by evaluating simulateously the current stream of compass data?
Or how do you tell him to go straight regardless of odometry (or motor synchronization which actually is the same)?
And how do you let him turn 90° and then stop rotation? Do you measure compass headings simulateously while turning until it's 90° more than at the start of turning?

I'm not sure what the 2nd table really shows, but it seems to me that Odometry is about 6-7 times more accurate than compass or gyro. Or am I wrong?

Code: Select all

    Odom   Comp   Meas
    1.19    7.00     6.00
    2.08   13,00    11.00
    3.20   19.00    18.00
    4.32   27.00    25.00
ps:
@andy - what videos?
showing what?
Last edited by HaWe on 16 Oct 2010, 21:34, edited 3 times in total.
gloomyandy
Posts: 323
Joined: 29 Sep 2010, 05:03

Re: a Kalman filter to fuse gyro and compass readings

Post by gloomyandy »

The video I posted earlier showed how to use beacons to correct the accumulated error that you get from using pure odometry.

Which is pretty much how I would suggest that a compass sensor would be used. Basically to occasionally correct the accumulated error not for fine grained motor control. I doubt if anyone here is suggesting that you would not use a combination of the various sensors. What I think we are trying to say is that over time the errors from odometry accumulate to be much larger than the errors from a compass sensor, which is why it makes sense to use that device to correct the orientation from time to time....

So doc when you ran your original squares test just using odometry what would happen if you lifted it up from the floor? What position would the robot think it was at? Perhaps we are all misunderstanding what you did with your pure odometry robot. How did it work?

I have tried to answer your questions...

My tests did not use the gyro or the compass to correct the positioning data. The test was simply intended to collect the raw data and to show the accumulated error that results form odometry.

Also the final table shows that the orientation data from the compass was within about 2 degrees of the actual final position as opposed to 20 degrees of error for odometry. So I would say that when you perform a series of 40 consecutive turns then the compass data is about 5 times more accurate for orientation data than odometry...
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: a Kalman filter to fuse gyro and compass readings

Post by HaWe »

sure, when you just show and compare compass data "at the end" it's just like "wise after event".

In my model all my data are "real data". the errors that I reported occur at "real driving"
the point of interest is:
what is better for correcting navigation data and positioning:
odometriy
compass
or both?

My model used real heading correction of odometry (encoder data) vs. odometry or using both. If I lifted the robot, the calculations continue, but the "real" results (differences between real and calculated position) in this case are even worse than reported. My errors of deviation are "real" errors of deviation)

My observations showed that heading correction by odometry (encoder values) are the Golden Standard.
Using a compass sometime could improve the results of positioning, but only if used at intermediate stops - not if used for simultaneous heading correction during driving.

Can you confirm this? Or not? What sensor navigation model did you use in this case?
Last edited by HaWe on 16 Oct 2010, 21:46, edited 2 times in total.
rghansen
Posts: 67
Joined: 12 Oct 2010, 17:44

Re: a Kalman filter to fuse gyro and compass readings

Post by rghansen »

doc-helmut wrote:thanks, but your reply is a bit too theoretic to understand.
Is it correct that Odometry is (in reality) about 6-7 times more accurate than compass or gyro?
if yes: that's simillar like my own observations (although I myself have referred to it as "100 times " better)
If not: What are the real observations like?

(of course you'll have to have the correct test platform and software to examine this)
I'm sorry, It's late and I didn't explain that as well as I wanted to.

The odometry code only thinks it's more accurate than the compass is. But its error values are so low because it only has to measure how far each wheel (or track) has turned. By looking at the difference in these two values, it compute what it thinks is the new heading.

However, the odometry code has no idea about errors caused by tire slippage, tire size error, or wheel base size error. That is why a correctly implemented odometry system will think it is computing the heading correctly even if the robot is sitting on wet ice and the tires are just slipping without moving the robot at all. But as long as the tires (or tracks) still turn, the robot will think that it is turning to the correct heading and will report a very low error value.

Or if one wheel has fallen off and the robot is going in circles, the odometry code will still think that it is going straight as long as both motors continue to turn at the same speed.

I hope I did a better job this time.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: a Kalman filter to fuse gyro and compass readings

Post by HaWe »

yes, I understood this, but this is not the point of interest.
We are not talking of the data about where the robot "thinks" where he is, but where he actually is.
According to this the experimental platform (software and hardware) has to be designed.

The point is: What happens in reality?
Calculate and drive your route by odometry (regardless of compass),
and then calculate and drive it by compass (regardless of encoder values or motor control).
Look where you land in the end.
Do this a dozen of times.
Which method is more reliable?
Last edited by HaWe on 16 Oct 2010, 21:57, edited 1 time in total.
rghansen
Posts: 67
Joined: 12 Oct 2010, 17:44

Re: a Kalman filter to fuse gyro and compass readings

Post by rghansen »

doc-helmut wrote:yes, I understood this, but this is not the point of interest.
We are not talking of that what the robot "thinks" where is is, but where he is.
So the experimental platform has to be designed.

The point is: What happnes in reality?
Calculate your route by odometry,
and then calculate it by compass.
Lokk wgere you land in the end.
Do this a dozen of times.
Which method is more reliable?
A very good odometry system may be better than a noisy compass in the short term, but because the odometry system will accumulate errors, the compass will be better in the long run.

A good Kalman filter knows what kind of errors it can expect from each source and uses this information to produce an optimal result.
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: a Kalman filter to fuse gyro and compass readings

Post by HaWe »

ok, I'll be gladly convinced by you.
Build it, and show me, and we'll see.

For the moment it's just "bloody theory".
physics-matt
Posts: 76
Joined: 29 Sep 2010, 06:57

Re: a Kalman filter to fuse gyro and compass readings

Post by physics-matt »

gloomyandy wrote: These results would tend to suggest that my basic platform may be a little more accurate than the one used by Matt
That's not at all surprising as I made no attempt to make my platform return to its original bearing. The point that (nearly) everyone here has realised is it's the comparison between sensor readings and ground truth that's important. In that respect, I'm very glad to see that we are (nearly) all getting comparable results.
rghansen wrote: In addition to adding a compass sensor to my room mapping robot, I was thinking of having it use its own map to reduce position error accumulation (classic bootstrapping). By knowing that most walls are straight and meet at right angles, and by periodically returning to remeasure features that it measure previously, it would be able to realign itself. Computing power is going to be an issue, but I think the NXT should be up to it.
Sounds like you are talking about SLAM (simultaneous location and mapping). It's well worth reading up on (wikipedia is a good place to start) and if you can get it working on the NXT then you'll get a lot of kudos!
gloomyandy wrote: Which is pretty much how I would suggest that a compass sensor would be used. Basically to occasionally correct the accumulated error not for fine grained motor control. I doubt if anyone here is suggesting that you would not use a combination of the various sensors. What I think we are trying to say is that over time the errors from odometry accumulate to be much larger than the errors from a compass sensor, which is why it makes sense to use that device to correct the orientation from time to time....
That's sort of how I think of it. We update the heading every so often with the compass reading, which will usually be accurate to a couple of degrees (assuming the motors are off etc). If the robot only used this sensor for navigation then its motion is likely to be a bit hectic as it constantly corrects the deviations it makes from the planned path. By using an additional sensor, such as a gyro or odometry, we can reduce the amount of deviation between compass readings, which will help to keep the robot to the path better.

This can be formulated more precisely with a bit of maths. If anyone wants me to write it down, please let me know.
doc-helmut wrote: Calculate your route by odometry,
and then calculate it by compass.
Lokk wgere you land in the end.
Do this a dozen of times.
Which method is more reliable?
doc-helmut: You are asking a different question here to the one we are discussing. We're talking about the relative accuracy of the gyro, compass and odometry as a means of measuring a robot's heading. That is what the OP was about and is what both gloomyandy and I have provided additional data for.

You are talking about using the compass or odometry as a means of navigation - how good is one method to the other of making the robot perform a set sequence of movements accurately. This is a very different thing and not the same as what we are discussing.

Matt
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

Re: a Kalman filter to fuse gyro and compass readings

Post by HaWe »

I'm not sure if this is a different question -
You are talking about using the compass or odometry as a means of navigation - how good is one method to the other of making the robot perform a set sequence of movements accurately. This is a very different thing and not the same as what we are discussing.
this is the Ultimate Question - why do we want to improve navigation data if we don't want to improve the results of navigation?
Last edited by HaWe on 16 Oct 2010, 22:05, edited 1 time in total.
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests