fixed obstacle detection and add random obstacles to the test scene