欢迎您访问《智慧农业(中英文)》官方网站! English

Smart Agriculture ›› 2026, Vol. 8 ›› Issue (1): 178-191.doi: 10.12133/j.smartag.SA202504004

• 信息处理与决策 • 上一篇    

规模化牛场智能巡检路径规划算法

陈若彤1,2(), 刘继芳1(), 张志勇3, 马楠1,3, 卫培刚1,2, 王亿1,2, 杨艳涛4,5   

  1. 1. 中国农业科学院农业信息研究所,北京 100081,中国
    2. 国家农业科学数据中心,北京 100081,中国
    3. 新疆农业大学 计算机与信息工程学院,新疆 乌鲁木齐 830052,中国
    4. 中国农业科学院农业经济与发展研究所,北京 100081,中国
    5. 三亚中国农业科学院国家南繁研究院,海南 三亚 572024,中国
  • 收稿日期:2025-04-04 出版日期:2026-01-30
  • 基金项目:
    国家重点研发计划项目课题(2024YFD2000305); 中国农业科学院国家南繁研究院“南繁专项”(YBXM2544)
  • 作者简介:

    陈若彤,硕士,研究方向为农业信息技术。E-mail:

  • 通信作者:
    刘继芳,博士,研究员,研究方向为农业可持续发展与信息化。E-mail:

Intelligent Inspection Path Planning Algorithm for Large-Scale Cattle Farms

CHEN Ruotong1,2(), LIU Jifang1(), ZHANG Zhiyong3, MA Nan1,3, WEI Peigang1,2, WANG Yi1,2, YANG Yantao4,5   

  1. 1. Agricultural Information Institute of CAAS, Beijing 100081, China
    2. National Agriculture Science Data Center, Beijing 100081, China
    3. College of Computer and Information Engineering, Xinjiang Agricultural University, Urumqi 830052, China
    4. Institute of Agricultural Economics and development of CAAS, Beijing 100081, China
    5. National Nanfan Research Institute (Sanya) of CAAS, Sanya 572024, China
  • Received:2025-04-04 Online:2026-01-30
  • Foundation items:National Key Research and Development Program of China(2024YFD2000305); The Nanfan Special Project of the National Nanfan Research Institute, Chinese Academy of Agricultural Sciences(YBXM2544)
  • About author:

    CHEN Ruotong, E-mail:

  • Corresponding author:
    LIU Jifang, E-mail:

摘要:

[目的/意义] 畜禽健康问题的及时发现和早期预警对绿色高效养殖至关重要,传统人工巡检耗时耗力且易漏检错检。机器人巡检具有全天候、高精度、高效率和低成本等优势,但现有巡检路径规划较少考虑规模养殖场内肉牛、奶牛等大型畜种个体的全局遍历和动态障碍物导致的局部可通行性优化问题。 [方法] 本研究提出了一种融合旅行商问题(Traveling Salesman Problem, TSP)、A*(A-Star)和动态窗口法(Dynamic Window Approach, DWA)的全局-局部优化的规模化牛场智能巡检路径规划算法,解决了牛场动态场景下的全局多目标个体遍历、路径冗余与局部通行避障的问题。在全局遍历优化上,提出了融合改进TSP和A*算法的全局巡检路径规划算法;在局部通行优化上,改进DWA实现动态障碍物引起的局部区域可通行性实时判别与提前主动避障。融合全局和局部算法并在Matlab中搭建动态环境验证。 [结果和讨论] 改进A*算法在规划时间、路径平滑性、路径长度和搜索效率上均优于传统A*算法;融合TSP和A*的全局巡检算法的平均巡检覆盖率达100%,巡检距离和时间较经典蚁群算法分别缩短了17.99%和20.85%;改进DWA可根据障碍物的尺寸提前判断巡检通道的局部可通行性,实时调整机器人线速度、角速度和姿态角度,提前主动避障。 [结论] 本研究提出的智能巡检算法能够在规模化牛场中实现一定时间内的牛只个体遍历和实时主动避障,有效提升了巡检效率和质量。

关键词: 智能巡检, 多目标路径规划, 全局个体遍历, 局部通行避障, 巡检机器人, A*

Abstract:

[Objective] Timely detection and early warning of livestock health issues are critical for green and efficient management within large-scale cattle farms. Traditional manual inspections are time-consuming, labor-intensive, and prone to missed or erroneous detections. Robotic inspections offer significant advantages including all-weather operation, high precision, high efficiency, and low cost. However, existing path planning approaches predominantly focus on dynamic obstacle avoidance and fixed target point inspection path, often failing to address two key challenges in dynamic large-scale farm environments: global traversal of individual large livestock (e.g., beef cattle, dairy cows) and accessibility of local areas compromised by dynamic obstacles. This study aims to overcome the limitations of existing robotic inspection systems in large-scale cattle farms, specifically addressing the lack of comprehensive inspection capability for dynamic individuals, excessive path redundancy, and insufficient proactive obstacle avoidance capability. [Methods] A global-local optimization algorithm was proposed for large-scale cattle farm intelligent inspection path planning, which integrated the traveling salesman problem (TSP), A* and dynamic window approach (DWA), and solved the problems of global multi-objective individual traversal, path redundancy and local passability with proactive obstacle avoidance in dynamic cattle farm scenarios. ​​For global traversal optimization, a global path planning algorithm was introduced which combined ​​improved TSP​​ and ​​optimized A*. Specifically, the inspection status list tracking breeding sheds and individual cattle was maintained to enhance the TSP's Nearest Neighbor Algorithm, dynamically updating targets to avoid re-visits. A dynamic priority mechanism optimized multi-objective inspection, determining the optimal visitation sequence across barns and dynamic paths within barns. The data structure of the A* algorithm was optimized, a diagonal distance heuristic function was introduced to replace Manhattan distance, which more accurately reflected the movement cost in eight directions. The path obtained by the A* algorithm through greedy strategy was simplified, and Bresenham's line algorithm was used to check whether there were obstacles in the straight line field of view. If there were no obstacles, redundant inflection points were removed to construct an efficient moving path between sheds. For local passability optimization, an enhanced DWA-based local path was proposed for planning algorithm. The dynamic safety threshold of obstacle size was introduced to improve the DWA. When the inspection robot judged that the size of the obstacle in the local accessible area was too large and the robot was difficult to pass, it would actively avoid or detour in advance to ensure the safe avoidance of large obstacles in narrow passages. The improved DWA also increased the task progress potential field​​, drived the robot to move to the breeding shed to be visited with the attractive force field model, balanced the local obstacle avoidance and global inspection efficiency, and realized the real-time judgment of local area passability caused by dynamic obstacles and proactive obstacle avoidance in advance. [Results and Discussions] The optimized A* algorithm's data structures significantly improved search efficiency. The diagonal distance heuristic and greedy strategy substantially enhanced path smoothness. Compared to the traditional A*, the improved A* achieved average reductions of 90.06% in planning time, 85.13% in path turns, and 1.83% in path length. The global inspection algorithm combining improved TSP and optimized A* achieved 100% average coverage of individual cattle. Inspection path length and time were reduced by 17.99% and 20.85%, respectively, compared to the classic ant colony optimization (ACO) algorithm, demonstrating superior efficiency in dynamic multi-objective inspection scenarios. The improved DWA successfully enabled proactive judgment of local path passability based on obstacle size. By adjusting the robot's linear velocity, angular velocity, and attitude angle in real time, the algorithm achieved robust proactive obstacle avoidance. The inspection robot would reduce the linear velocity in advance when encountering obstacles, and realize proactive obstacle avoidance by adjusting the attitude angle. Simulation experiments confirmed that robots equipped with the improved DWA effectively navigated around unknown static and dynamic obstacles while maintaining global path-tracking capability. [Conclusions] The global inspection algorithm combining improved TSP and optimized A*, utilizing dynamic inspection status lists and path optimization techniques, achieved global inspection coverage of individual cattle and could significantly improve inspection quality and efficiency. The local inspection algorithm based on improved DWA, incorporating obstacle size dynamic safety threshold and task progress, achieved real-time judgment of local passability and proactive obstacle avoidance, ensuring safe robot navigation in complex environments. The global-local co-optimization framework demonstrated adaptability to the dynamic farm environment, enabling the timely completion of individual traversal tasks, and providing a robust solution for intelligent inspection in large-scale cattle operations. Future work involves integrating the proposed path planning algorithm with simultaneous localization and mapping (SLAM), cattle identification, distance detection systems on inspection robot platforms, and conducting extensive field tests within operational cattle farms. Exploring multi-robot collaborative inspection frameworks and incorporating the Vision-and-Language Navigation model to enhance environmental perception and anomaly-handling capabilities are promising directions for adapting to the complexities of even larger-scale farming scenarios.

Key words: intelligent inspection, multi-objective path planning, global individual traversal, local traffic obstacle avoidance, inspection robot, A*

中图分类号: