Adaptive control System for robotic arm