|
Re: Autonomous using encoders
There are a few ways to address this problem. The simplest is probably, as stated, to just find a constant which will get your fairly close to driving straight.
Another method would be to implement checks while trying to run straight. Maybe after every 100 encoder counts, you would, at that point, get your robot to adjust by sending a forward signal to one side, and a 127 to the other. One the counts were equal again, you could try going straight once more.
Another way is to adjust pwm values on the fly, implementing a straight drive. You could add and subtract to your pwm values depending on which side was going faster throughout your entire autonomous, which would make your robot travel much straighter. We implented this system with a gyro last year during human control, and it worked wonderfully.
|