*Article* **Research on Navigation Path Extraction and Obstacle Avoidance Strategy for Pusher Robot in Dairy Farm**

**Fuyang Tian 1,2, Xinwei Wang 2,3, Sufang Yu 4, Ruixue Wang 5, Zhanhua Song 1,2, Yinfa Yan 1,2, Fade Li 1,2, Zhonghua Wang <sup>6</sup> and Zhenwei Yu 1,2,\***


**Abstract:** Existing push robots mainly use magnetic induction technology. These devices are susceptible to external electromagnetic interference and have a low degree of intelligence. To make up for the insufficiency of the existing material pushing robots, and at the same time solve the problems of labor-intensive, labor-intensive, and inability to push material in time at night, etc., in this study, an autonomous navigation pusher robot based on 3D lidar is designed, and an obstacle avoidance strategy based on the improved artificial potential field method is proposed. Firstly, the 3D point cloud data of the barn is collected by the self-designed pushing robot, the point cloud data of the area of interest is extracted using a direct-pass filtering algorithm, and the 3D point cloud of the barn is segmented using a height threshold. Secondly, the Least-Squares Method (LSM) and Random Sample Consensus (RANSAC) were used to extract fence lines, and then the boundary contour features were extracted by projection onto the ground. Finally, a target influence factor is added to the repulsive potential field function to determine the principle of optimal selection of the parameters of the improved artificial potential field method and the repulsive direction, and to clarify the optimal obstacle avoidance strategy for the pusher robot. It can verify the obstacle avoidance effect of the improved algorithm. The experimental results showed that under three different environments: no noise, Gaussian noise, and artificial noise, the fence lines were extracted using RANSAC. Taking the change in the slope as an indicator, the obtained results were about −0.058, 0.058, and −0.061, respectively. The slope obtained by the RANSAC method has less variation compared to the no-noise group. Compared with LSM, the extraction results did not change significantly, indicating that RANSAC has a certain resistance to various noises, but RANSAC performs better in extraction effect and real-time performance. The simulation and actual test results show that the improved artificial potential field method can select reasonable parameters and repulsive force directions. The optimized path increases the shortest distance of the obstacle point cloud from the navigation path from 0.18 to 0.41 m, where the average time is 0.059 s, and the standard deviation is 0.007 s. This shows that the optimization method can optimize the path in real time to avoid obstacles, basically meet the requirements of security and real-time performance, and effectively avoid the local minimum problem. This research will provide corresponding technical references for pusher robots to overcome the problems existing in the process of autonomous navigation and pushing operation in complex open scenarios.

**Keywords:** dairy farm; pusher robot; path extraction; obstacle avoidance

**Citation:** Tian, F.; Wang, X.; Yu, S.; Wang, R.; Song, Z.; Yan, Y.; Li, F.; Wang, Z.; Yu, Z. Research on Navigation Path Extraction and Obstacle Avoidance Strategy for Pusher Robot in Dairy Farm. *Agriculture* **2022**, *12*, 1008. https://doi.org/10.3390/ agriculture12071008

Academic Editor: Tomas Norton

Received: 23 May 2022 Accepted: 6 July 2022 Published: 12 July 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

#### **1. Introduction**

Dairy farming is an indispensable part of modern agriculture, which occupies a high proportion in the agricultural industry [1,2]. In China, the traditional technology of dairy farming is relatively backward, and most of them adopt the management mode of small-scale scattered farming, which is not conducive to the development of modern agriculture; as a result, the mode is changing toward the direction of large-scale, factory, and standardization. [3,4]. In the past few years, China's dairy industry has developed rapidly, and its output value and scale are at the forefront of the world [5]. According to the data released by the Ministry of Agriculture and Rural Affairs, China's milk production in 2020 was 35.3 million tons, an increase of 7% over 2015, on the other hand, the proportion of farming with more than 100 heads reached 67.2%, an increase of 18.9% compared with 2015. In this situation, it is undeniable that the dairy industry not only meets the residents' consumption demand for milk, but also increases the income of dairy farmers. In addition, it plays a key role in optimizing the rural industrial structure [6].

The continuous prosperity of the social economy makes the public put forward higher requirements for the quality of dairy products, which indirectly promotes the development of the dairy industry [7,8]. However, the rapid development has also exposed new problems, operators gradually found that the existing high-tech aquatic products could not meet the production needs. For example, in the process of cow feeding, part of the feed will be removed from the feeding area due to the cow's activity, resulting in accumulation, which will lead to the deterioration of uneaten feed in the long run. The current solution is to use manual or manual pushing equipment to push the accumulated feedback into the feeding area. In this situation, enterprises need to arrange more labor or equipment to promote feed [9]. Relying on manual labor will make it impossible for the farm to complete the feeding work in a timely and stable manner; as a result, the milk yield of the cow will be reduced. In this case, the robot used to push feed is very practical.

The accuracy and execution efficiency of multimedia target recognition technology have been greatly improved with the development of deep learning (DL) and machine learning, under the circumstances [10–12]; the application of the technology has been extended to the fields of medical imaging [13], video surveillance [14], and robot navigation [15]. In the wave of technological change, traditional agricultural machinery has ushered in a new opportunity for development. Agricultural robots such as feeding robots, transport robots, and picking robots have begun to apply DL and machine learning techniques [16–18]. Among them, the self-propelled robot has been favored by many scholars as a new research hotspot. Some researchers have studied the technical difficulties of navigating the path extraction of agricultural robots based on visual geometry inference and DL [19]. The classical methods to infer visual geometry include simultaneous localization, mapping, and motion structure. This kind of technology obtains parameter values through sensors such as optical detection and ranging (LiDAR), sound navigation and ranging, optical flow, and stereo and monocular cameras, and uses corresponding algorithms for obstacle avoidance and path planning [20]. Among similar sensors, Lidar has the advantages of high-ranging accuracy, good resolution, and a strong anti-jamming ability. It has been widely used in the perception and extraction of agricultural indoor environmental information, and has become a research hotspot for agricultural production robots [21]. In the research field of push robots, new technologies continue to emerge. DeLaval has developed an automatic mixing and pushing robot using magnetic induction technology, which can independently plan the walking route and speed, and is suitable for automatic mixing and the pushing of different types and quantities of feed. Pavkin et al. [22] concentrated on the simulation modeling of a feed pusher robot using Simulink tools in the Matlab environment to facilitate robot modernization or optimize the final cost for artificial testing of typical system elements and reduce production costs. However, the application of Lidar in the bullpen has not been reported, but the research on bullpen path extraction and obstacle avoidance based on Lidar and machine vision has a certain application value.

At present, the existing research at home and abroad has solved the problem of navigation path extraction in some agricultural scenarios, but the working environment of dairy farms was rarely mentioned. In this study, a new type of machine vision system was developed to fill this gap. The system will be used for extraction and tracking control of the working path of the pusher robot. Taking the cowshed environment as the research object, the self-designed pusher robot and 3D lidar were used to collect the point cloud data of the cowshed. The ground point cloud was removed by point cloud preprocessing, and the pass-through filtering algorithm extracted the point cloud data of the region of interest. Then, the least-squares method (LSM) and random sample consensus (RANSAC) were used to extract fence lines, project them and obtain boundary contour features, and extract fence lines and initial paths. At the same time, a robot navigation path optimization and obstacle avoidance method based on the improved artificial potential field method is proposed, which will provide corresponding technical references for pusher robots to overcome the problems existing in autonomous navigation and pushing operations in complex open scenarios. The system designed in this study could autonomously generate accurate navigation paths for robots in a dynamic farm environment, which will provide technical reference for autonomous navigation of farming robots and the development of precision animal husbandry.

This paper is organized as follows: Section 2 details the materials and methods employed to achieve the research objective. In Section 3, experimental results and discussion of the proposed technique are presented. Finally, in Section 4, the conclusion and future work is provided.
