View Single Post
  #26   Spotlight this post!  
Unread 29-12-2016, 20:59
SamcFuchs's Avatar
SamcFuchs SamcFuchs is offline
Programmer
AKA: Sam Fuchs
FRC #0236 (TechnoTicks)
Team Role: Programmer
 
Join Date: Aug 2015
Rookie Year: 2014
Location: Old Lyme, Connecticut
Posts: 50
SamcFuchs will become famous soon enoughSamcFuchs will become famous soon enough
Re: Drivetrain PID tuning

Quote:
Originally Posted by Jared Russell View Post
Yep this makes sense and is a problem if you have large errors that the gyro needs to correct (which would also be a problem if you didn't have a gyro present). Usually, though, your yaw errors will be fairly small and stem from the fact that your left and right profiles are executed independently and can encounter independent disturbances.

For example: Say we want to go in a straight line for 10 feet. You would generate left and right profiles that in this case would be identical. You begin following each profile. At some point, maybe there's a bunch in the carpet on the left side, so your left controller begins lagging a bit because of the disturbance...but the right controller keeps tracking accurately. If this happens, your robot is now veering off to the left.

The gyro's role in all of this being to coordinate the execution of your independent left and right profiles. If you are using a gyro to track your actual yaw angle compared to your profile, you'll see that you are now veering left, so your left side should try *extra* hard to get back on track, and the right side should ease up just a bit. With enough gain on the gyro term, the left side should recover very quickly and get synchronized with the right side before you've drifted too far from your intended path.
Ok, I can see how that would be effective...how does it compare to using encoders for correction?
__________________
Sam Fuchs
236 TechnoTicks, Old Lyme, CT

2015 - Programming, Electrical
2016 - Lead Programmer, Co-Driver
2017 - Lead Programmer, Co-Driver
Reply With Quote