Page 5 of 8

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 19:29
by HaWe
I personally mounted my compass about 30cm above the robot platform (including the motors).
And I made it strictly horizontal (using a spirit level).
But my English is not good enough to understand your results,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

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 19:46
by rghansen
Thank you physics-matt for some more hard data.

Your results are even better than those of gloomyandy. Did you try the things that aswin suggested in his blog?

Could I also ask you for an image of your robot and your compass mount?

I'd happily send you an image of my wander robot, but I'm too much of a newbee to even understand all of what the FAQ about posting images was trying to tell me.

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 19:48
by physics-matt
Here are a couple of pictures of my robot. The compass is mounted about 22cm above the NXT. I have used a ball as a caster, and with the rubber wheels there was no noticeable slippage on my tiled floor.

I took a fair amount of care with mounting the caster wheel to ensure the compass was as horizontal as possible.

Image
Image

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 19:52
by mightor
You guys will love these when they come out:
Image

More info here: http://www.rotacaster.com.au/robot-wheels.html

They'll be out really soon and go for about $16 a piece or so. I used one for a caster wheel and it works very smoothly.

- Xander

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 20:01
by rghansen
Thanks for the photos.

Any tips on making images a little smaller?

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 20:11
by gloomyandy
None of these tests use anything other than the standard leJOS motor control to perform the movement. Neither the compass or the gyro is used to correct the movement at all... It is simply intended to provide a data set of measurements that can be used as a basis for discussion. My intention was that they would be the equivalent of the data table you posted earlier (but with real sensor readings for gyro). So for instance you might like to suggest which values you would choose to feed into your two input kf...

As to the odemetry results being more accurate, not really, all they show is the accuracy of the motor control. As I said if the robot is not on the ground (so 100% slip) you will still get the same odometry results even though the robot does not move at all. In this case we told the motors to move the required amount to rotate the robot by 90 degrees so unless you have a very poor motor controller it should not be a surprise that they moved that far. The key thing is did the robot actually rotate by the required amount? In this case I spent a long time tuning the wheel size and wheel base data used by these calculations to get then as good as I could. You posted data for a similar test (though using 1m squares). This is basically the same. In this case after 10 0.5m squares the orientation is 5 degrees out (I think you reported 20 degrees for four 1m squares). Unless you are using some form of motor regulation that does not use the tachometers at all it is not really possible to get an independent set of odometry data without having a separate set of tachometers connected to an independent set of wheels (there are many examples of doing just this in the literature). Using odometry from driven wheels is always a risky thing to do as they are likely to suffer from slip etc...

Possibly the most important set of results are the final set which compare the sensed results against the actual manually measured position of the robot. So for instance the final line of the final table after 40 squares has the numbers 4.32, 27.0, 25.0, so what does this mean. Well if everything was perfect then after commanding 40 square movements then the robot might assume the heading would be 0 (the same as it was when it started), however, due to variations in the motor movements and based on the tacho counts it is reporting that it expects the heading to be 4.32 degrees. The value returned by the compass sensor is 27.0 degrees and actually measuring the orientation of the robot manually shows that it has actually got a heading of 25 degrees. So in this case the compass is wrong by 2 degrees while the value suggested by the tachometers is off by 20 degrees or so...

These results would tend to suggest that my basic platform may be a little more accurate than the one used by Matt, but they show the same accumulation of errors and how the compass sensor (being in theory an absolute device) can be used to obtain more accurate orientation data...


As I said before my robot uses tracks (which are not ideal for performing turns). The compass sensor is mounted about 10cm above the centre of the robot along with the gyro... The video clip I posted earlier shows this robot in action...

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 20:22
by mightor
rghansen wrote:Thanks for the photos.

Any tips on making images a little smaller?
Use Picasa to resize them. That's what I do. It's free. Artweaver is another great free image editing program.

- Xander

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 20:52
by HaWe
my robot model was quite similar to this one:
Image
Using odometry from driven wheels is always a risky thing to do as they are likely to suffer from slip etc...
driving with rubber wheels on parquet or carpet there will be no slip at all.
if you want to test odometric data vs. compass data you'll have to switch off motor control (by Lejos or NXC or RobotC motor synchronization or what ever).
I guess you've done this. And you'll have to take compass data (vs. encoder data) simultaneosly when driving, not only at the end of the 1m edges.
You'll have to make your heading correction by your own, otherwise you don't know how the motor control interferes with your compass or odometric navigation data.
None of these tests use anything other than the standard leJOS motor control to perform the movement. Neither the compass or the gyro is used to correct the movement at all..... As to the odemetry results being more accurate, not really, all they show is the accuracy of the motor control. As I said if the robot is not on the ground (so 100% slip) you will still get the same odometry results even though the robot does not move at all.
if this really happens, this is obviously the wrong test approach.

I still haven't read the answers to my questions above:

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

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 21:02
by rghansen
I was very impressed by your video, gloomyandy. I thought it was an excellent presentation of a very good piece of work.

I was also impressed by how accurate you odometry was despite using a tracked robot. Maybe I was wrong about them being worse at odometry than caster robots.

Could I ask your opinion of the following idea?

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.

I could still use a Kalman filter to combine the odometry and compass heading values.

Re: a Kalman filter to fuse gyro and compass readings

Posted: 16 Oct 2010, 21:07
by HaWe
ps:
@andy - what videos?
showing what?