A general solution algorithm to coordinate transformation for robotic manipulators