Udder Automation: Using Vision-Guided Robotics to See and Scrub Away a Messy Farm Job
Key Highlights
- The vision guided robotic system inspects and cleans cows' udders and teats in about 20 seconds per animal, improving efficiency and hygiene compliance.
- The system addresses challenges such as ensuring cow safety, processing complex 3D data rapidly, and maintaining component durability in challenging farm environments.
- Automation reduces the physical strain on workers, minimizes exposure to unsanitary conditions, and standardizes cleaning quality across the herd..
A dairy farm in the United Kingdom recently implemented a vision-guided robotic system developed by machine vision integrator Fisher Smith (Corby, Northamptonshire, UK) designed to automatically inspect and clean a cow’s udder and teats prior to milking.
This is an important aspect of commercial dairy operations—not only for health and safety concerns regarding milk produced for commercial sales but also for the health and well-being of the cows. It is illegal to sell milk from “heavily soiled” animals due to high contamination risks, according to the UK’s Food Standards Agency, the government entity that regulates commercial agricultural activities. In fact, FAS regulations require a cow’s teats and udder to be cleaned according to specific hygiene standards prior to commercial milking.
Related: Affordable Vision-Enabled Robotic System Enhances Automation for Bioanalytical Labs
The Bovine Inspection and Cleaning Process
Inspecting and cleaning dairy cows for milking is a task that has, for the most, part been performed by human employees. The work, however, is strenuous and mundane, and the work environment challenging, notes Reece Donneky, a project engineer with Fisher Smith who headed up design of the vision-guided robotic inspection/cleaning system.
Donneky says the inspection and cleaning process for this dairy farm works like this: the cows are herded single-file through a chute that leads to a rotating carousel inside a milking barn. The carousel is subdivided into 50 enclosures, each large enough to contain one cow. Once the carousel is loaded, it slowly rotates so that each cow passes by a cleaning station.
Prior to installation of the automated system, a human employee visually inspected each cow, then using a scrub brush, antiseptic solution, and water cleaned each cow’s udder and teats. The employee performed these tasks while standing at the rear end of each cow, reaching with the brush under the cow’s hindquarters, between the back legs, to do the cleaning.
Cows, while docile, are also uninhibited, especially regarding bodily functions, notes Donneky. This, to put it mildly, makes the working atmosphere even more challenging.
“This one guy is standing there doing this job, getting crapped on, for lack of a better word., probably up to four hours at a time,” Donneky says. “As you can imagine, (the smell from) 1,000 cows bloody well stays with you. So, they were researching a way to automate.”
The robotic system performs the same task in the same manner, he says. Each individual cow on the carousel is slowly rotated past the cleaning station. But instead of a human farmhand standing by with a scrub brush, a time of flight (Tof) camera placed at the end of a robotic arm identifies and locates the cow, captures four images of the teats and udder, pre-processes the images on board the camera, then transmits those images to a PC located in a separate room in the milking barn and hard-wired to the robot and camera. The software analyzes the images and determines the correct 3D coordinates to guide the robotic arm. With a cleaning brush (it automatically self-loads the antiseptic solution) attached to the end of the arm, just behind the camera, the robot maneuvers under the cow’s backside, between its back legs, and scrubs and rinses the udder and teats, then returns to the home position, where a jet of water rinses the camera lens. The entire process takes about 20 seconds per cow.
While the farmer can monitor the data from the computer, the images are discarded, unless there is an anomaly that needs to be saved to train the AI algorithm, Donneky says.
“That’s basically it—wash, rinse, repeat,” Donneky says.
Components of the Vision-based Robotic Inspection/Cleaning System
The vision-guided robotic system uses the following components:
-
A LUCID Vision Labs (Burnaby, BC, CAN) Helios 2+ ToF monochrome camera. Rated IP67, it has a GigE interface, high dynamic range, 8.3m working distance, and .3MPixel resolution and up to 103 fps frame rate.
-
An off-the-shelf Windows-based industrial PC, in this case, an NVIDIA (Santa Clara, CA, USA) Jetson Orin with an A1000 NVidia GPU.
-
A Kuka (Shelby Township, MI, USA) robotic arm. The camera and cleaning brush are attached to the end of the arm.
-
Fisher Smith's Robovis AI machine vision software, which is integrated into the Cognex (Natick, MA, USA) Deep Vision Pro tool platform.
Technical Challenges in Developing the Automated Inspection/Cleaning System
Several challenges needed to be addressed, Donneky says. First, the system needed to be designed in such a way that it did not harm or stress cows. Donneky notes that the cows themselves are both docile and routinized. They want to be milked to relieve the discomfort of a full udder, and they are used to this process. Indeed, because they are facing away from the cleaning station, they not only never see what is happening, they do not really know who (or what) is doing the cleaning.
Accuracy, however, was an issue, Donneky says. The robotic arm needed precise positional guidance, which required robot-to-camera calibration and datum alignment to ensure positional certainty and repeatability.
Another challenge was processing complex 3D data—including X, Y, Z, and intensity images—fast enough to keep up with the carousel and the robot arm. Donneky says he had to build a deep learning pipeline so the system could reliably tell the difference between teats and other anatomical features, such as tails.
Finally, because the task is performed in difficult conditions, the components, especially the camera, had to be robust.
“Part of our design was to make sure we could pick a ToF camera that could fit in this housing, in this environment, and not corrupt the data too much, and could withstand being on the end of a brush that's going under the backside of a cow,” Donneky says. “It's right on the tip of the robot tooling, with the brushes behind it. And, after every cow cleaning, it gets hit with a jet of water.”
Future Steps for the Automated Inspection/Cleaning System
Donneky wanted to make the system scalable and affordable. By using off-the-shelf components to build the system, they were able to achieve that, he says.
The system has been successful and is being implemented on farms both in the UK and in Europe, Donneky says. The system can consistently and reliably perform an important yet mundane task the same way, at the same level of standard, freeing up a human employee for other important tasks while increasing throughput and reducing labor costs.

