Transition from the annealed to the quenched asymptotics for a random walk on random obstacles