Patent ID: 8807080

Claim:
A method for automatically milking a dairy animal in a milking parlour, comprising: providing a milking robot for automatically attaching at least one teat cup to at least one teat, the milking robot comprising a robot arm having at least two pivoting joints, at least one teat cup and at least one 3D sensor being disposed on an end of the robot arm, which at least one 3D sensor observes at least one teat and the at least one teat cup, and a robot control unit operatively connected to the 3D sensor, wherein the at least one 3D sensor comprises: a radiation source for emitting electromagnetic radiation; a receiver comprising a matrix with a plurality of rows and a plurality of columns of receivers for receiving electromagnetic radiation reflected from the dairy animal and the at least one teat cup; a lens for imaging the reflected electromagnetic radiation onto the receiver; and a sensor control unit; observing via the at least one 3D sensor at least one teat and at least one teat cup, generating a three-dimensional image and calculating distances from the at least one 3D sensor to a plurality of points on the dairy animal including the at least one teat and further calculating distances from the 3D sensor to a plurality of points on the at least one teat cup and transmitting these calculated distances to the robot control unit; and wherein the robot control unit calculates a mutual distance between at least one teat cup and at least one teat and controls motion of the at least two pivoting joints of the robot arm, and further controls a longitudinal displacement of the robot arm, on the basis of the calculated mutual distance to move the at least one teat cup to the at least one teat.