View Single Post
  #11   Spotlight this post!  
Unread 16-06-2014, 11:01
Owen Makin Owen Makin is offline
Registered User
FRC #1972
 
Join Date: Jan 2013
Location: CUHS El Centro
Posts: 50
Owen Makin is an unknown quantity at this point
Re: Driving Straight

Quote:
Originally Posted by Jon Stratis View Post
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.
This is why you should understand calculus before doing PID's. The derivative of the curve of distance traveled, is the curve of the velocity, or speed, which is why you should use the velocity curve becausr it is the most accurate.
Reply With Quote