An infrared based obstacle avoiding robot