# How to get each joint angle if all joint positions (x,y,z) are known?

If all joint positions or coordinates of each joint are known, How can I get each joint's angle?

e.g. there is a 6 DOF robot and its joint positions are known, **P** = [p1, p2, p3, p4, p5, p6].

How to calculate **θ** = [θ1, θ2, θ3, θ4, θ5, θ6]? Any api in ROS?

Thanks in advance!