A method of controlling a redundant robot having n joints operating in m-dimensional task space with redundancy r=n-m, and having an end effector, said method comprising:
- first defining a basic task motion of said robot within a set of end-effector coordinates, corresponding to m constraints on movement of said n joints;
- second defining not more than r constraints on said basic task motion corresponding to a minimization of gravity loading on said joints, wherein said second defining comprises,
- defining an n-by-r matrix operator, N.sub.e, spanning a null space of a Jacobian operator of said end-effector,
- defining an n-by-1 vector which is a partial derivative of a gravity loading function with respect to angles of said joints, and
- setting the product of said matrix operator and said vector to zero as a minimization condition;
- and,
- controlling said joints so as to simultaneously fulfill the m constraints of said basic task motion and the r constraints of said minimization of gravity loading.