View Single Post
  #11   Spotlight this post!  
Unread 02-11-2015, 08:51 AM
cstelter cstelter is offline
Programming Mentor
AKA: Craig Stelter
FRC #3018 (Nordic Storm)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Mankato, MN
Posts: 77
cstelter will become famous soon enough
Re: PID control help

After reflecting on the code from last year a bit, I'm thinking the same thing could have been accomplished (more simply) simply by writing a PID command along the lines if

Code:
public void returnPIDValue()
{
    return leftEncoder.getDistance()-rightEncoder.getDistance();
}

public void returnPIDOutput(double output)
{
    driveTrain.tankDrive(baseSpeed+output, baseSpeed-output);
}
the setpoint of the PID would always be zero (a zero difference between left and right distance).

Our code did something similar, but not entirely identical.

Thoughts?
Reply With Quote