Knee-Angle Zero/Calibration of the Phoenix

There is an apparent offset problem with the Phoenix when positioning the knee servo perpendicularly to the floor/ground long-ways since the leg tip is not quite underneath the servo, like the picture on the left. How would you solve this mathematically? Or would it be the easiest to solve mechanically by centering the leg tip as shown by the picture on the right?

(Sienna, I hope you don’t mind me using a cut-and-paste of your picture you posted for the sole purpose of this discussion)

Well, mathematically, it’s not that difficult… If you call a the angle with the vertical, you have on your drawing tan(a) = 1.51/3.73 and that gives you a = 22°

Hi Tom,

I did it the mechanical way, center of servo aligned with center of tip/tars.

The image is not exactly accurate. The foot gets a rubber end cap that adds about 0.25" to the length.

Thanks guys, I guess what I’m going to do is make the offset that I subtract my IK calculation of the knee with the tangent of the two sides which is as Vincent stated and Jim added [for the rubber end cap], arctan a = 1.51/(3.73+0.25).

I’ve been subtracting the pulse that is sent to the servo by 90-degrees:

KneePulse = 90 degrees - IK Calculation of the Knee

I’m going to replace the angle “a” above in place of the 90 degrees.

I guess I’ll have to add the offset of the calibration length, 1.51" to the overall length of the legs at all=1500 when viewed from the top…

Thanks for all the help guys!

BTW, I saw my Phoenix take its first steps using my own home-brewed IK-based walking code last night! But due to this initial offset problem, the chassis angles upwards and downwards (pitch)… Time to correct this tibia offset problem and hopefully will cure this pitch problem…