|
Re: Turning autonomously
We have always gotten 'close enough' in the turn, using turn-in-place (differential steer) and slightly more accurate turn almost in place (driving only one side while holding the other) depending on desired accuracy, and compensated for whatever angular error is in the next straight move.
Our 2011 code has all of this, it's not as neat as more recent code but it all works.
As for the 'cheat' system, we occasionally overshoot the target given to the PID controller (e.g. add 5degrees * sign of angle) to help it along. We always do this with the distance-based controllers, by up to 2 feet (I believe we're currently running 18" of distance bias).
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor
"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack
|