add different modes for getOutOfObstacle