Globally optimal kinematic control of redundant manipulators, with application to REDIESTRO