Hey, so I’ve been stuck with this problem for a long time. I’m trying to get the shooter to work on variable power by getting the limelight Y angle and then introducing it to the formula: limelightHeight - targetHeight / tan(LLYangle - starting angle).
After getting the value I introduce it to a function that outputs the required RPM which I got by measuring it from different known distances. The function is a quadratic one btw.
Problem is, that although I’ve sent all three variables: angle, distance calc, and output calc, and though the angle doesn’t really chance much, the distance and output calc just start overshooting to the point where it literally says infinity.
What could it be?
We struggled with the same issue. The problem is the formula shown in the limelight documentation is a very crude estimate. The exact calculation needs to take in to account the fov of the camera and a lot more trigonometry. We ended up just correlating ty from limelight with measured distance from target.