|
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.
|