We and other people have noticed that the gyro sensor suffers from a "drift" problem. This is a massive problem if you are trying to write a simple "stay on course" program.
The problem seems to stem from the fact the gyro reset block does what it says rather than what you would really want it to do. What you want to do at the start of the program is set a reference compass bearing of zero so that it maintains that heading when it runs. But there are two problems with what it actually does….
1. All it does is reset the current angle to zero. It does not reset the rate of change of the angle. So if the sensor thought it was moving before the reset, it will still think it is moving after the reset, the only difference is the absolute angle is different.
2. Reset does not calibrate the gyro sensor. I’m still not actually sure when it calibrates the gyro sensor but it calibrates at least when you first power it up and when you unplug and plug back in the gyro sensor. The critical things appears to be the robot must be stationary when you calibrate otherwise it will get the wrong idea of what zero rate of change is, i.e. it will think it is moving when it is not. More often than not I think our team were holding the robot in their hands when the gyro calibrated, thereby producing unreliable results.
My question is when exactly does is calibrate? Because it seems we got drift between runs. One run it worked and the next it didn't, which suggests it calibrated at some point in between. Maybe downloading a new program recalibrates it?
Some people have suggested that adding a gyro sensor block in measure rate mode, then a gyro sensor block in measure angle mode also causes a recalibrate. I'm not entirely sure why but empirically that does appear to be true.