On the grasping stability and optimality under external perturbations