Quote:
Originally Posted by guoruiwu1994
Using the camera, we can get how many pixels we are off target. Is there a way to feed that into the PID controls and then have the PID controls output into the robotdrive?
|
A PID takes a setpoint and a processVariable as inputs, and adjusts its output to make the plant's output (the processVariable) equal to the setpoint.
You want the "how many pixels we are off target" to be zero, right?
So your setpoint would be 0 (zero), and "how many pixels we are off target" is your process variable. The output from the PID would be your drivetrain rotation command (assuming that "how many pixels we are off target" is a measure of aim, not range).