View Single Post
  #9   Spotlight this post!  
Unread 17-02-2012, 11:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,089
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Using PID controls to center robot on target with camera

Quote:
Originally Posted by guoruiwu1994 View Post
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).


Reply With Quote