Unit quaternion: a useful tool for inverse kinematics of robot manipulators