View Single Post
  #1   Spotlight this post!  
Unread 28-07-2014, 17:56
Pault's Avatar
Pault Pault is offline
Registered User
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Boston
Posts: 618
Pault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond reputePault has a reputation beyond repute
Re: Building a Library of Common Utilities

How about a class that extends PIDController built specifically for drivetrains? Have instance variables for the drivetrain, left encoder, and right encoder, then do whatever method you want to turn it into PID driving (average the encoders, run each side seperately with error correction if they get out of sync, or whatever else you want to do). It takes a suprising amount of effort to do such a basic task with the current WPILIB. Even better would be if you could extend PIDSubsystem using this special controller.
Reply With Quote