Second order sliding mode control of an underwater vehicle: obstacle avoidance in artificial potential fields