Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Servo Offset -> Angle conversion (http://www.chiefdelphi.com/forums/showthread.php?t=42910)

bush 29-01-2006 17:33

Servo Offset -> Angle conversion
 
I have estimated the conversion at
Angle = Offset / 2
Does anybody have a more optimal conversion equation?

6600gt 29-01-2006 18:24

Re: Servo Offset -> Angle conversion
 
Quote:

Originally Posted by bush
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.

bush 29-01-2006 19:06

Re: Servo Offset -> Angle conversion
 
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?

Eldarion 29-01-2006 19:11

Re: Servo Offset -> Angle conversion
 
Quote:

Originally Posted by bush
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. :)

6600gt 29-01-2006 20:01

Re: Servo Offset -> Angle conversion
 
Quote:

Originally Posted by Eldarion
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.

Andrew Blair 29-01-2006 20:36

Re: Servo Offset -> Angle conversion
 
Perhaps with the linkage in the KOP bracket the pan is longer or shorter.

PEKMAN 29-01-2006 20:43

Re: Servo Offset -> Angle conversion
 
With the help of the LabView software I have found that 45 degrees is right around 50 servo "ticks".

Eldarion 29-01-2006 21:51

Re: Servo Offset -> Angle conversion
 
Quote:

Originally Posted by 6600gt
Yeah probably because the camera is centered around the pan axis but not the tilt axis.

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...

devicenull 29-01-2006 22:04

Re: Servo Offset -> Angle conversion
 
Quote:

Originally Posted by Eldarion
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)

bush 29-01-2006 22:04

Re: Servo Offset -> Angle conversion
 
Quote:

Originally Posted by Eldarion
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...

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.

DanDon 30-01-2006 08:55

Re: Servo Offset -> Angle conversion
 
Hi all,

If you still need help converting, there's a great thread about it here

Hope this helps,

Eldarion 30-01-2006 13:34

Re: Servo Offset -> Angle conversion
 
Quote:

Originally Posted by bush
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? :confused:


All times are GMT -5. The time now is 14:06.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi