Made robot stop when too close to an obstacle.