Actually color does not matter. I just happened to tape that white USPS cut box because we didn't paint the lead car and it's shell is transparent (which isn't too good for IR sensors). Plus it gives it a bit bigger detection region. You can see later in the video that it is following human beings, so it's not following a certain color.
The Sharp IR sensors (GP2Y0A02YK) actually have a pretty long range (from about 8" - 60") and only cost about $12.50 a piece. The two vehicles could have had a larger buffer region if wanted. I just had a threshold for the region in which acceleration/neutral/braking could take place. Since the sensor reading is ambiguous when the object is closer than 8", I know when to brake because logically, usually all 3 IR sensors (left, center, right) will detect an object in front of it when it's that close.
I tried to get really complicated with my code, but eventually found out that simplicity works best. I basically use only 1 loop get readings from the 3 sensors, apply digital smoothing to each to suppress the spikes. Now I basically have all the information I need to work with (distance from each sensor, and which sensor region has detected as object). I do my turning based on which IR sensors are triggered and within the threshold region. Then I use an autoscale function that performs linear interpolation on the sensor reading range to fit it into the range in which the ESC (electronic speed controller) can understand to control acceleration. The most challenging part was to figure out the timing specifications otherwise the ESC would lose signal and go haywire.
Let me know what you guys want to know or see. I made some nice looking diagrams containing the software flow chart and such. Thanks.