A joint-trajectory-generation scheme for redundant robots is proposed which uses the redundancy to improve motion performance according to certain objective functions. The objective function can be either analytical or nonanalytical. For nonanalytical objective functions, a least-squares scheme is proposed to estimate the gradient vector. In addition, an approximation scheme is developed to compute the pseudoinverse of the Jacobian. Application of the scheme to a 4-link revolute planar robot manipulator is demonstrated through simulation. Several motion performance criteria are considered and their results analyzed.>