The field of autonomous mobile robotics has recently gained many researchers’ interests. Due to the specific needs required by various applications of mobile robot systems, especially in navigation, designing a real time obstacle avoidance and path following robot system has become the backbone of controlling robots in unknown environments. Therefore, an efficient collision avoidance and path following methodology is needed to develop an intelligent and effective autonomous mobile robot system. This paper introduces a new technique for line following and collision avoidance in the mobile robotic systems. The proposed technique relies on the use of low-cost infrared sensors, and involves a reasonable level of calculations, so that it can be easily used in real-time control applications. The simulation setup is implemented on multiple scenarios to show the ability of the robot to follow a path, detect obstacles, and navigate around them to avoid collision. It also shows that the robot has been successfully following very congested curves and has avoided any obstacle that emerged on its path. Webots simulator was used to validate the effectiveness of the proposed technique.