@Zenta , @Xan need ur help with IK for hexapod

hi ,
I have used the Denavit-Hartenberg convention to get the 3 joint angles , given x,y,z of the tip of feet. I have taken the Inertial/Fixed Reference frame at the center of the bottom plate of body. So in all I have 5 Co-ordinates frames

  1. -> Fixed f0 ,
  2. -> f1 ,
  3. ->f2 ,
  4. ->f3 ,
  5. -> Mobile frame f4/fm

Successive transforms are in this order : f0->f1->f2->f3->f4

Now my problem arises when i want to do Yaw , Pitch , Roll , Translate about/along the Fixed Frame f0 which lies at the center(bottom) of body. In this case the tip of the leg becomes fixed frame and the body center frame is mobile. Now does it mean i have to again solve for IK in reverse i.e from 4th frame to 0th frame : f4->f3->f2->f1->f0 ???

I have obtained the composite homogenous transformation matrix for a leg w.r.t origin of body. Now how do i use the rotation matrix (Y-P-R) to get the new angles given x,y,z of the tip of leg is constant.

-Regards ,
Power_user_EX