ultrasonic sensor, servo, and dc mototrs

delay(999);if you were running down a street, and you closed your eyes and ears for a second at a time, don't you think you would crash into things?

Get rid of the delays.
Figure on a maximum of about 20 sonar pings per second.