General inverse solution of six-degrees-of-freedom serial robots based on the product of exponentials model