|
a simple way to solve the gyro 'zero' problem, when you first start auton mode, read the gyro and see what its putting out. Since the bot is not moving, THAT is your zero reading.
subtract that from all subsequent readings - and it wouldnt hurt to ignore any outputs that are +/- 1 or 2 counts from that as well - its very unlikely that your robot would ever be turning that slow.
Then you should be able to use the output over a longer period of time.
Also - make sure your gyro is firmly mounted to the most solid part of the chassis, thats its perfectly flat on its plane of rotation, and that its as low on the robot as possible.
dont forget to check delta_t when integrating the gyro output - if delta_t is not zero, you have to account for the additional time (add the gyro output to the integration for each count of delta_t)
also- make sure when you turn, you do not turn faster than the 75°/ S rate
|