Selection of the hand path in obstacle avoidance