The Calculation of Inverse Kinematics for 6DOF Serial Robot