Quote:
Originally Posted by notmattlythgoe
Would you mind explaining why one way is better than the other? As one side starts to travel further than the other side the PID loop speeds the corrected side of the drive train up. It's the same effect using a different measurement. We're measuring the difference in speed in the distances traveled compared to the actual speed value.
|
How often, outside of auto, are you instructing the robot to drive exactly straight? Joysticks work by defining the speed of your drive train, not the distance traveled. Using the encoders to measure distance traveled requires you to pick some arbitrary time interval to use to convert between the encoder feedback and the joystick input. If you pick an interval that's too large, you'll notice significant challenges as the robot drifts one way, then compensates by drifting back the other way. If you pick one sufficiently small, then you're basically doing exactly what the encoder class does for you when you use it for speed - taking the number of ticks over a set period of time to determine the speed.