I have estimated the conversion at
Angle = Offset / 2
Does anybody have a more optimal conversion equation?
((PAN_SERVO - 124) * 65)/124
((TILT_SERVO - 144) * 25)/50
In Kevin’s camera code check out terminal.c
Its the 65/124 degrees change for every pan incriment and 1/2 for every tilt incriment that you need.
That of course assumes that your CENTER pwm values are at 124 and 144 (not hard to change). But then my next question would be, why would the degree change be different for 2 identical servos?
My guess is it has something to do with the camera sensor–it isn’t a perfect square, but is rectangular with the “pan” side being longer than the “tilt” side.
Without having looked at that piece of code, I don’t really know for sure.
Yeah probably because the camera is centered around the pan axis but not the tilt axis.
Perhaps with the linkage in the KOP bracket the pan is longer or shorter.
With the help of the LabView software I have found that 45 degrees is right around 50 servo “ticks”.
Uh-oh…
So I did something bad by unscrewing the servo horn and re-centering the tilt axis to be exactly vertical at 127?
I wonder how many other teams did that as well…
Our’s is deliberately off center… we can tilt more upward then downward. Although if the target is ever below our robot, we won’t be able to see it (but at that point, we have more problems then that)
I did that too, but that is not what 6600 gt was referring to. It simply meant that the pan servo lies on the vertical axis of the camera lens, while the tilt servo is not in line with the horizontal axis.
Just one more quick reply here.
On my camera, at least, the camera lens is exactly in line with the pan and tilt servos. Did anyone mount the camera board upside-down, or is the offset just too slight to easily notice?