|
Re: PID robot heading--comments?
Using the gyro is an ok idea, but keep in mind that your gyro will drift naturally over time (without vibration, ours was drifting about 1 deg/minute today in the shop).
Much worse than that however, is that if your robot gets hit hard (likely in this high-contact game) you'll briefly exceed the gyro's maximum speed which will mess up your current heading calculation.
We were thinking of something similar, but rather than aiming to point the robot at a certain absolute angle, have the X position of your joystick describe a desired turn rate in degrees per second, then have a PID loop attempt to achieve that.
|