Detecting the sound is easy, because the initial sound travels so much farther than the echo does. Detecting the echo is hard. Hitting an object scatters the sound a lot more than the initial sound ...