Optimization of robotic drilling operations by leveraging functional kinematic redundancy to minimize joint reversals