|
Re: Problems with Automatic Target Alignment
I would agree with Alan Anderson, I would make sure that the P term is large enough to avoid friction issues while using D to stop oscillation. The I term is not strictly necessary, it can be left out or replaced with a 2nd Derivative term.
Secondly, make sure that your code does the conversion from location on the image to angle if your PID code is based on angle, you will have to do some trigonometry.
If you encounter difficulties with gyro drift, magnetometers can avoid some of those issues in exchange for accuracy.
Finally, try to get a carpet that is similar to the actual field environment, and competitions will usually provide some time for calibration at the beginning, take advantage to tweak your constants.
|