View Single Post
  #11   Spotlight this post!  
Unread 16-06-2014, 10:15
Jon Stratis's Avatar
Jon Stratis Jon Stratis is online now
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,732
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Driving Straight

Quote:
Originally Posted by notmattlythgoe View Post
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.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote