**4. Conclusions**

Based on the research on the existing cowshed fence line extraction method, a robot navigation path optimization method based on the improved artificial potential field method is proposed. This method improves the safety of the unmanned driving of the feeding machine, and provides theoretical support and development basis for the intelligent agricultural equipment in the dairy farm.


noise in processing time (between 1.157 × <sup>10</sup>−<sup>3</sup> and 1.165 × <sup>10</sup>−<sup>3</sup> s). It was shown that the running time, anti-noise ability, and extraction effect of RANSAC were better.

(3) The obstacle avoidance method of the pusher robot was optimized. The target point influence factor was introduced into the repulsive potential field function, and the parameter selection strategy of the improved artificial potential field method was analyzed. Finally, the correctness and feasibility of the obstacle avoidance method were verified by simulation experiments.

**Author Contributions:** Conceptualization, Z.Y. and F.T.; methodology, F.L. and Z.W.; validation, Y.Y.; formal analysis, Z.S.; investigation, R.W.; resources, S.Y.; writing—original draft preparation, X.W.; writing—review and editing, Z.Y. and F.T.; project administration, F.T.; funding acquisition, Z.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** This study was funded partly supported by National Natural Science Foundation of China, grant number 32072786, and the Shandong Agricultural University Research Foundation, grant number 030-72195.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** The data used to support the findings of this study are included in the article.

**Conflicts of Interest:** The authors declare no conflict of interest.
