Hexapod final angle calculation help pleaseee

Hi

This is my first ever post here so please accept my apologies if there are any mistakes.
I am trying to build a hexapod and also i want to understand the aspects of IK and the joint angles etc. I have understood and worked out myself as an exercise the equations for the angles and various lengths. I had referred the code by kurtE on the repository.

I have a question regarding the final femur and tibia angles being calculated. I dont understand the 90 degrees being taken away from the femur and tibia angle calculation. How should I measure the angles which I need to send to the servo. This is really driving me crazy. Any diagram should help me understand please

Thanking you all in anticipation.

Thanks a lot !

HI

Can Anyone here please help ?

Hi madmax,

Welcome to the RobotShop Community and thank you for posting. Did you have a look at the Robot Leg Torque Tutorial ?
Here is also a Hackaday article that further explains the Inverse Kinematics calculations and equations involved for an Hexapod :
https://hackaday.io/project/21904-hexapod-modelling-path-planning-and-control/log/62326-3-fundamentals-of-hexapod-robot
Do you have a github link to the code line in question ?

1 Like

HI @bdaouas

Apologies I was off this thread due to some personal issues . The line in question is https://github.com/KurtE/Arduino_Phoenix_Parts/blob/35eb0e1a93af1d32a9ef6e2501a3c74fdbd27eca/Phoenix/Phoenix_Code.h#L1768

FemurAngle1[LegIKLegNr] = -(long)(IKA14 + IKA24) * 180 / 3141 + 900 + CFEMURHORNOFFSET1(LegIKLegNr);//Normal

and https://github.com/KurtE/Arduino_Phoenix_Parts/blob/35eb0e1a93af1d32a9ef6e2501a3c74fdbd27eca/Phoenix/Phoenix_Code.h#L1795
which is

TibiaAngle1[LegIKLegNr] = -(900-(long)AngleRad4*180/3141 + CTIBIAHORNOFFSET1(LegIKLegNr));

I am trying to understand why the sigss and angles are subtracted the way they are. Can you please help? Any diagram would really help me understand it. Really appreciate all the help around here.

Thanks and Regards,

@madmax That code actually goes back quite a while, and was developed by @zenta, who became an expert in the field. You can likely derive some of the equations based on the PEP spreadsheet here: http://www.lynxmotion.com/images/html/proj098.htm?utm_source=rb-community&utm_medium=forum&utm_campaign=project-phoenix-excel-program-manual
There’s also an excellent diagram.

@cbenson

Thanks for your reply. I have tried it actually and can derive the equations and work out by hand. The problem is understanding why the final angles are calculated the way they are. Actually, I have another post in this forum and both these post are now converging towards the same question. (May be it is better to close this one).

The link for the other one is at

Thanks and Regards,

Ah - good to note. The master himself seems to be replying there.