View Single Post
  #2   Spotlight this post!  
Unread 28-07-2014, 22:36
MatthewC529 MatthewC529 is offline
Lcom/mattc/halp;
AKA: Matthew
FRC #1554 (Oceanside Sailors)
Team Role: Mentor
 
Join Date: Feb 2014
Rookie Year: 2013
Location: New York
Posts: 39
MatthewC529 is on a distinguished road
Re: Building a Library of Common Utilities

Quote:
Originally Posted by Pault View Post
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.
That is a neat idea! I will look into it. I had seen some examples but I think it would be a good idea to implement it.

I kind of want to make this a community thing (though that may be unlikely since everyone seems to like their personal libs) but I want to make a pretty decent, maybe expansive extension of WPILib with the introduction of Java 7 in 2015.

Thanks again!
__________________
Team 1554 -- Oceanside Sailors
  • 2013-2014 - Lead/Sole Programmer
  • 2014-2015 - Lead Programmer, President
  • 2015-? - Team 1554 Mentor
Independent Public Projects

Developer at Legend Zero LLC.
Java/C++ Programmer
Reply With Quote