A system includes a robotic arm, a laser, and a processor. The processor is configured to command the robotic arm to move to a location of an expected teat position of a dairy livestock and to command the laser to perform two scans of the dairy livestock. The processor is further configured to determine whether a first teat is found in both of the scans, and if so, determine whether locations of the first teat in the two scans are within a predetermined distance of each other. The processor is further configured to, in response to determining that locations of the first teat in the two scans are within the predetermined distance of each other, command the robotic arm to move to a location corresponding to the location of the first teat and to command the robotic arm to attach a teat cup to the first teat.