Obstacle Avoidance in a Programmable Path based Mobile Robot Control. –Distance Measurement, and path replanning