help with labview camera target tracking with turret needed

We are using a webcam to track the rectangles around the hoops, and our program can pick up the rectangles but we cannot figure out how to lock on to the rectangles and have the program automatically stay aimed at the rectangle. We are using a PID but are having a hard time trying to figure it out.

I know other teams are doing this with their camera so if you know how, team 2512 will greatly appreciate your help.

Moving the whole robot to aim at the target is pretty difficult since there is a lot of friction to overcome, and lots of momentum once it moves. A turret is/should be easier.

If you are calculating the amount to turn the turret, close the loop using an encoder or potentiometer. A PID may be a nice way to do it, but depending on the gearing and mass, you may be able to start with just P.

What area is causing the problem.

Greg McKaskle

Right now we have a PID with just P and it tracks the backboard based on the camera’s x value. With P at .45 it gets pretty close, but it sends a speed too small for the motor to run off of.

After the P term makes the motor drive too small when the process variable gets very close to the set point, the I term is designed to account for the remaining steady-state error.

How much should I change the I by to correct for extremely small error?

That depends entirely on the detailed response of your robot hardware.

You can do it by trial and error; many teams get an adequately tuned PID system that way. Or you can look up the Zeigler-Nichols method and try using it.