Hmm wish searched worked for me. So i will make this short since in another topic this was covered very long wise.
IR works good. It limitation is its very narrow detection and lighting conditions can mess it up. Certain colors of objects also cause issues.
ultra sonic works good. Its limitations are that is generally very wide detection. Certain fabric on things can limit its effects. Echo can be a issue.
It really comes down to the environment you plan on using it in and how accurate you need it to be in object avoidance. When search works better for me i will see if i can find the topic that discusses this in much more detail.
You also have laser range finding and camera based which is more expensive.
I prefer the Maxbotix sonar sensors. Sharp IR sensors work well too. If you mount a Sharp IR on a servo you can scan and with a little vector banging do some neat stuff. Of course by next year some one may have whipped up a fez class for the microsoft Kinect and we’ll all have machine vision.