Quote:
Originally Posted by ToddF
Keep in mind that if both sides turn the exact same amount, the robot will go straight, in theory ONLY. In the real world, tiny inconsistencies will prevent this from ever happening. Tiny perturbances lead to vastly varying results. Things like: wheels being slightly different diameters; slightly wrinkled carpeting; driving over a wire tie with one side, one side of the robot being heavier and sinking into the carpet more etc. Counting on dead reckoning for less than a 1" drift over 100" of travel seems iffy, even with perfect software. The actual physical environment just isn't that theoretically perfect.
For example, you might expect repeatability of a 4" diameter cast rubber wheel to be about +/-.020". If one side has wheels 3.98" and the other side has wheels 4.02" in diameter, if you tell the robot to drive 100" (7.958 revolutions of a 4.000" wheel) one side will travel 99.5 inches, and the other side will travel 100.5", and that's just one factor out of many that will cause drift. If you are lucky, all those factors will cancel each other out, but it's likely they won't.
I'm not trying to discourage you from implementing a purely encoder based solution. But you need to realize that even if your software is perfect, the robot may still not drive straight. You may need to add some other sensors to your control algorithm. This could be computer vision, keeping you headed exactly at your target. It could be a sideways looking distance sensor, keeping you driving parallel to a wall. It could be a highly accurate gyro telling you if you are drifting off course. Hopefully, you have a practice bot with which to experiment. If not, next summer is a great time for experimentation, so you have a thoroughly tested solution ready for next season.
|
Thank you very much for this Todd. I do understand that it's almost impossible to drive straight with just encoders... However that's the situation the programmers on our team have been put on. Next year we're going to have to get this driving straight thing down earlier!
We do have a practice bot. I'm not sure how practical it is to try and implement something new completely to our bot, given time constraints. However I do think we will try the "keep encoder delta at 0" PID strategy.
Just out of curiosity - what is considered the "best" way to drive straight (assuming a tank drive bot and a moderate budget)? Would that be encoders + a gyro?