# C program to find the rotation matrix (orientation) of a 6DOF robot from its end effector position and link parameters

I'm writing a C program to find the inverse kinematics of a 6DOF robot. I've been able to write it successfully based on the general concept of Inverse Kinematics using DH parameters (i.e. finding the joint angles of the robot from its known orientation and position).

But I only have the values of the position of the robot's end effector, and link parameters (link lengths, link twists and the distance between links). How do I calculate the orientation of the robot's end effector with these values?

I'll be glad if someone can help. I'm also open to further questions for clarifications. Thank you in advance. 🙏

• Maybe someone else can give a more detailed answer, but my first reaction was that you can't. You have a 6 DOF robot but you're only fixing 3 degrees of freedom (x/y/z position). The other three (roll/pitch/yaw) could be anything. Sep 2 at 12:43
• Agree with Chuck. Sep 2 at 17:13
• Have you obtain forward kinematic matrix? You can get orientation from there Sep 2 at 19:33
• @Chuck That's my point. I'm looking for a way to find the RPY of the robot. Sep 3 at 6:43
• @AlbertHM thanks for your response. Yes, I've been able to obtain forward kinematic matrix. And yes I was able to come up with equations to find the orientation matrix. But to find the numeric values of the orientation matrix using Forward Kinematics, I have to know the numeric values of the joint angles (Theta) of the robot....but I don't know them. That's why I asked if there's a way to find the joint angles knowing only the final position of the robot's EE and its link parameters Sep 3 at 6:48