This project aims at implementing a ball tracking algorithm on the Oncilla robot. Oncilla is a quadruped with passively compliant legs, to which vision is added with a basic webcam. The algorithm impemented analyses the position of a ball of a given color and controls the speed and the direction of locomotion such as to reach the ball and keep it in the field of view. First the algorithm was developped in simulation using Webots, then it was implemented on the real robot. Experiments show a nice behavior of the robot following the ball.