Builds on the previous example by mounting Sharp IR detectors at the front of the robot to try to steer away from objects. If it hits something then it works like before.
Sharp IR detectors send out a narrow beam and so aren't good at seeing small objects like chair legs.
As a result - I quickly came to the conclusion that this wasn't much better than the BumperBot. If anyone is interested I could be up the code.
The next example gives a far superior solution.