In this paper, the implementation in the e-puck robot of an algorithm to keep going in a trajectory while evading fixed obstacles is presented. A review of some existing algorithms for trajectory tracking with obstacles avoidance is done. Also the basic characteristics of the mobile robot e-puck and the programming environment used to implement the control algorithm and prove the performance of the robot are summarized. By modeling the kinematics of the robot and simulating the implementation of the algorithm, the good performance of the control in both the simulated environment and the real robot in different surroundings are shown. The effects of different environmental factors in the performance of the robot are analyzed. This leads to suggest some algorithm improvements as a matter of future works.