Self-tuning control of robot manipulators