A method for performing a teat-related operation with the aid of a robot device on a dairy animal at an animal location. The robot device has a robot arm with a camera and a teat treatment device. The method comprises providing the robot arm outside the animal location, performing a camera image determination at least once, searching for a leg in the image, if no leg is recognized in the image: moving outside the animal location the robot arm in the longitudinal direction, until a leg is recognized in the image, determining the longitudinal position of the leg relative to the camera, moving the robot arm in the direction of a predetermined position range relative to the determined leg as long as the determined position is not lies in the predetermined position range, moving the end part of the robot arm perpendicular to the longitudinal direction from outside the animal location to below the dairy animal, and performing the teat-related operation. Furthermore, a robot device with a robot arm, a teat treatment device and a camera is provided for performing the method.Een werkwijze voor met behulp van een robotinrichting uitvoeren van een speengerelateerde handeling op een melkdier op een dieropstelplaats. De robotinrichting heeft een robotarm met een camera en een speenbehandelingsinrichting. De werkwijze omvat verschaffen van de robotarm buiten de dieropstelplaats, ten minste eenmaal uitvoeren van met de camera bepalen van een beeld van de omgeving, zoeken naar een poot in het beeld, als er geen poot in het beeld is herkend: buiten de dieropstelplaats verplaatsen van de robotarm in langsrichting, totdat een poot is herkend in het beeld, bepalen van de langspositie van de poot ten opzichte van de camera, verplaatsen van de robotarm in de richting van een vooraf bepaald positiebereik ten opzichte van de bepaalde poot zolang de bepaalde positie niet ligt in het vooraf bepaalde positiebereik, verplaatsen van het einddeel van de robotarm loodrecht op de langsrichting van