created obstacle threshold and delay variables