1. Introduction
The sustained growth of poultry farming is catalyzing progress in both animal welfare and technological innovation [
1]. The integration of smart equipment is becoming more prevalent across different components of unmanned poultry farming systems [
2,
3]. Cage-based rearing systems predominate in intensive poultry husbandry [
4,
5], characterized by centralized management that facilitates environmental adjustment, daily inspection, and poultry processing [
6]. Regular inspections are essential for ensuring poultry health and welfare. However, the vertical and dense structure of coops presents substantial challenges for manual inspections. Inspectors are required to frequently ascend and descend lifting platforms, a process that is not only time-consuming, but also physically demanding. Moreover, inspectors are exposed to airborne particles and irritant gases, posing significant health risks. Consequently, there is an urgent need for automated inspection vehicles in cage-rearing systems to supplant the labor-intensive and physically taxing nature of manual inspections [
7].
Inspection vehicles, integral to unmanned poultry farming systems, are used for autonomous patrolling and poultry behavior monitoring [
8]. Path planning is crucial for the operation of inspection vehicles. Common types of inspection vehicles in poultry houses include orbital robots, automated guided vehicles (AGVs), and autonomous mobile robots (AMRs). The first two types of inspection device rely on physical guide lines for path planning, while AMRs utilize algorithmic path planners.
Orbital robots, which traverse fixed tracks on surfaces such as flooring, cages [
9], and ceilings, are used for fixed-area inspections. The ChickenBoy, developed by Faromatics [
10], is an example of such a system. However, most inspection vehicles are designed with wheeled chassis, using lightweight magnetic strips or colored tapes for navigation (AGVs). Feng et al. [
11] combined RFID and magnetic tags to construct linear paths and aid vehicle turns. Li et al. [
12] developed a coop inspection method using electromagnetic tracing and metal marks. Track-based systems face challenges such as tire wear and manure contamination, leading to track misalignment and detachment, which cause navigation and positioning errors. Additionally, track installation and maintenance are troublesome, requiring structural adjustments to accommodate changes in the operating environment and reliance on other physical media for cage positioning and checkpoint design. Due to their inability to autonomously plan paths, the functionality of such inspection vehicles is restricted.
The supremacy of rail-less inspection schemes stems from advances in mobile robot technology [
13]. By leveraging breakthroughs in perception [
14,
15], planning, localization [
16,
17,
18], and motion control, various functional modules can be integrated into AMRs to address complex and diverse inspection requirements. In terms of path planning in caged poultry houses, Peng [
19] utilized the A* algorithm, known for its lowest time complexity, for single- and multi-point navigation in long corridors. Li [
20] applied Dijkstra and A* algorithms for global path planning in straight corridors between cages based on ROS. Zhang [
21] combined the A* algorithm with insertion and jump points, further enhancing the path planning with a Reeds-Shepp curve-based TEB algorithm on a differential-drive inspection vehicle. Han [
22] employed 3D laser technology to extract the centerline of the passage in the poultry house to generate a path. However, the paths generated by these approaches were often twisted or intermittent, failing to fully meet the systematic inspection requirements nor optimally align with the caged poultry house environment. As a result, existing rail-less inspection schemes have yet to find a stable and reliable path planner.
The planning of inspection routes in caged poultry houses necessitates a balance between point-to-point and full-coverage path planning. The inspection vehicle must follow a fixed path and traverse corridors while also reaching “target points” (determined by higher-level decisions) via the shortest path. However, existing rail-less solutions typically assess only limited path segments and do not fully consider the environmental features of poultry settings, thus failing to comprehensively address the planning requirements [
23]. Furthermore, current inspection vehicles follow a “one house, one vehicle” model, which limits house-to-house inspection and results in high vehicle costs for large-scale poultry farms.
To address these challenges, this study proposes TSO-HA*-Net, a novel global path planner for coop inspection. TSO-HA*-Net is a hybrid algorithm based on a pre-existing grid map of the poultry houses. Initially, a spatiotemporally optimized Hybrid A* (TSO-HA*) algorithm is employed as the underlying planning mechanism, incorporating inspection rules to rapidly construct a semi-structured topological network that reflects the actual inspection environment. Subsequently, connection points and a graph-based algorithm (Dijkstra) are applied to find the shortest path within the network, deriving a smooth path that aligns with the starting and ending poses while adhering to network constraints, thus delineating the inspection route. The objective of this study is to develop a feasible global planner capable of flexibly, continuously, and rapidly generating inspection routes that adhere to the constraints of a predefined topological network, highlighting the planner’s overall continuity and coherence. This enables the inspection vehicle to follow a fixed route and traverse corridors while reaching target locations via the shortest path. The planner is specifically designed to be adaptable to the unique environment of poultry houses, thereby fulfilling the stringent requirements for inspection routes within these facilities. Additionally, the planner is expected to be a foundation tool for achieving cross-regional and multi-vehicle inspections.
The main contributions of this study are as follows:
- (1)
An improved Hybrid A* algorithm is proposed which demonstrates shorter computational time, reduced resource consumption, and a higher success rate when applied to high-resolution maps. This improvement is achieved through a new heuristic value calculation using the distance reference tree and simplified occupancy grid templates for collision detection.
- (2)
A hybrid path planner called TSO-HA*-Net is proposed, integrating the improved HA* algorithm, specific inspection rules, and topological planning. This planner is efficient and flexible for planning inspection routes in large-scale maps, establishing an intermediate planning scheme between point-to-point and full-coverage path planning. It addresses the route requirements for coop inspection and adapts to the actual poultry house environment.
- (3)
The rail-less navigation system based on the presented planning scheme offers a viable alternative to traditional electromagnetic and line-following navigation. This study provides valuable case studies and algorithmic references for inspection tasks in caged poultry houses and similar facilities.
2. Materials and Methods
2.1. Experimental Platform
Figure 1 shows the experimental inspection vehicle utilized in this study. It is an autonomous mobile robot equipped with decision-making capabilities and relies on sensors and algorithms for path planning and environmental perception. A functional diagram of the inspection vehicle is presented in
Figure 2 to systematically introduce its architecture and operational framework, consisting of three main systems: perception, decision and planning, and control. This study focuses on an in-depth algorithmic investigation of the global planning component within the decision and planning system, specifically addressing the global path planning problem for the autonomous inspection vehicle.
2.2. Environmental Analysis and Mapping
The map serves as the foundation for global path planning in large-scale caged poultry farms. As shown in
Figure 3, the site structure of such farms is characterized by poultry houses arranged in parallel rows, separated by passages. The interiors of houses contain multiple rows of stacked cages, which are interspersed with corridors. After map exploration [
24], fusion [
25,
26], dimensionality reduction [
27], and post-processing (e.g., artificially setting fixed obstacles), the environment of the poultry farm is accurately represented as a global occupancy grid map, providing a robust basis for the development and implementation of efficient path planning strategies. This study assumes that the map has been generated using the method above, and the target points are manually specified to simulate higher-level decision-making behavior.
The topological map [
28] provides a concise graphical representation of the key nodes
and their interconnectedness (edges,
) within the environment. When each edge is assigned the explicit orientation (i.e.,
) and a distance weight
, along with the rule constraint
from
to
, this type of topological map is referred to as a “semi-structured” topological network.
The TSO-HA*-Net algorithm is developed based on the fusion map shown in
Figure 4, which integrates the grid map with the topological network. By artificially adding
into the grid map, the semi-structured topological network is obtained using the TSO-HA* algorithm as detailed in
Section 2.5, where
and
are defined by inspection requirements.
2.3. Problem Description
Efficient path planning plays a crucial role in optimizing operational time and avoiding inefficient navigation strategies. To ensure collision-free movement and enable the onboard camera to maintain an expansive forward field of view for identifying unhealthy chickens, the inspection vehicle should adhere to a straight trajectory as much as possible while traversing corridors. Considering the multiple “U”-shaped bends, it is essential to design smooth, appropriately curved paths along these turns to minimize motor strain and reduce tire wear. Moreover, seamless interconnectivity between topological edges is crucial for the smooth entry and exit of the inspection vehicle.
In this study, the Hybrid A* (HA*) algorithm is introduced, which incorporates motion constraints and accounts for initial and final poses [
29,
30]. However, the traditional HA* algorithm faces challenges such as slow planning speed, high resource consumption, and low success rate when applied to single, large-scale, and high-resolution maps [
31,
32,
33]. To address these issues, an improved algorithm called TSO-HA* is proposed, with a new heuristic value calculation based on a K-dimensional tree and the KNN algorithm, along with rapid collision detection using simplified occupancy grid templates, which optimizes HA* in both temporal and spatial dimensions. TSO-HA* enables the rapid and efficient planning of collision-free, smooth paths with curvature constraints directly on the original-resolution grid map, thereby providing a robust algorithmic foundation for successful topological planning in a single operation.
Furthermore, the inspection vehicle typically follows a fixed route, and the route can be preplanned based on specific inspection requirements. This study further proposes a hybrid path planner, TSO-HA*-Net, that integrates the TSO-HA* algorithm, inspection rules, and topological planning, enabling the rapid generation of a complete inspection route. Commonly used graph-based path planning approaches include Dijkstra, A*, Floyd–Warshall, and Bellman–Ford algorithms. In the context of topological planning, the primary challenge is to compute the single-source shortest paths in sparse graphs. Dijkstra is a well-suited solution for this problem, leveraging a priority queue to ensure low computational overhead. However, A* performs suboptimally in the absence of accurate heuristic information, and designing an effective heuristic function remains a significant challenge. The Floyd–Warshall algorithm is suitable for computing shortest paths between all pairs of nodes, but it becomes redundant when only the path from a single source to a target is required. Moreover, its high computational complexity, and , make it unsuitable for the spatiotemporal optimization scope discussed in this study. The Bellman–Ford algorithm, although more general and capable of handling graphs with negative-weight edges, also faces similar computational complexity issues.
A semi-structured topological network, combined with connection points, is introduced for topological planning, employing a specific Dijkstra’s algorithm and the Hash map to derive the shortest inspection route.
2.4. Overall Framework
The proposed planner consists of two parts: the lower-level TSO-HA* module and the upper-level topological planning module. Essentially, it performs the task of planning a topological network and determining a route within the network. The overall flowchart is shown in
Figure 5. The main steps are as follows:
- (1)
Adding pairs of starting and ending points with poses on the grid map as key topological nodes , and designating topological connections , on the basis of the required inspection rules.
- (2)
Deploying the global planning algorithm TSO-HA* for path preplanning.
- (3)
Saving all the information about path lengths and waypoints preplanned to form a semi-structured topological network of the poultry houses, which is then abstracted into a cost matrix guided by the path lengths.
- (4)
Designating a new pair of starting and ending points in the network, with connection points generated, the network, and the corresponding matrix dynamically updated.
- (5)
Using Dijkstra’s algorithm to search for an inspection route within the network, resulting in a complete inspection route for the poultry houses.
2.5. TSO-HA*: Lower-Level Path Planner
In contrast to the A* algorithm, which expands nodes based on grid-based four or eight neighborhoods [
34], the HA* algorithm incorporates kinematics or dynamics constraints. By considering the node’s pose
as an additional computational dimension, HA* allows for a more flexible expansion strategy, resulting in smoother paths that better conform to actual motion. The TSO-HA* algorithm inherits the advantages of HA* while enhancing computational efficiency in both time and space through a refined node expansion strategy, the distance reference tree and simplified occupancy grid templates. It is employed for path planning between topological nodes, resulting in the creation of a semi-structured topological network.
2.5.1. Node Expansion
Given an HA* node
at time
in the grid map, the node expansion under low-speed conditions can be accomplished using a simplified bicycle model, as shown in
Figure 6. In an extremely short time step
, the vehicle’s motion can be approximated as traveling in its current direction, with the arc length of the single-step movement
equaling the vehicle’s travel distance. By employing the discrete bicycle kinematic model in Equations (1) and (2), the pose of the neighboring node
at time
can be derived, referred to as the motion primitive:
where the steering angle
is determined by the orientation subdivision number
and the maximum steering angle
;
represents the wheelbase.
In this study, a relatively smaller value of
is chosen to plan paths with a larger curvature radius. The curvature radius
determines the path curvature constrained by the steering angle
. Detailed parameters are shown in
Table 1.
As shown in
Figure 7, the expansion of nodes starting from the current node
is performed using a predefined set of motion primitives
times in each direction of the total
directions, with an expansion distance of
. However, only the terminal poses are considered neighboring (parent) nodes for each direction. When the arc length
is fixed, the motion primitives are determined based on the values of steering angle
. This method reduces the computational overhead associated with parent nodes and accelerates the planning process. In this study, a fixed
is used to generate evenly spaced waypoints, which facilitates path length measurement and integration into the topological weights as detailed in
Section 2.6.
In the HA* algorithm, the node with the lowest cost expands new nodes, where the cost
is calculated using the heuristic functions in Equations (3)–(5):
where the cumulative cost
along the path represents the total movement cost from the starting point, with
being the cost of a single-step move; the heuristic cost
measures the distance from the current HA* node
to the target and guides the expansion towards it.
The
is a heuristic value determined by the length of the shortest Dubins (DB) curve
from
to the target, computed in a one-shot manner without considering obstacles [
35]. The DB curve ensures that the terminal segment of the path aligns precisely with the expected position and orientation, enabling seamless and smooth transitions between paths in the topological network. In this study, for simplicity in path length calculation, the length
of each segment in the DB curve is set equal to
, as shown in
Table 1. The curvature radius
of the DB curve varies for TSO-HA* and topological planning.
The
is another heuristic value that represents the anticipated distance
measured from
to the target, with obstacles considered. Conventional methods for calculating
include the real-time A* search where the A* path length is treated as
[
36], referred to as A*-dis, and the dynamic programming-based heuristic cost lookup table, known as DP-Map [
37]. Experiments show that generating a DP-Map is both time- and storage-intensive, particularly for high-resolution maps, while LDP-Map (Limited DP-Map) constrains Dijkstra’s search space and significantly reduces resource consumption, making it a more suitable candidate for comparison.
However, due to the non-G2-continuity of curvature at the junction between the DB curve and the HA*expansion path, along with the suboptimal heuristic function weight assignment, the paths planned often exhibit redundant turns. To improve path smoothness and better align with actual motion, this study utilizes the coarse-planned HA* waypoints as an initial solution for back-end path optimization. The quasi-Newton method Limited-memory BFGS (L-BFGS) is then employed for path smoothing. Notably, the pre-optimized path lengths are still used as weights in the topological network, which generally suffices for practical applications.
2.5.2. Distance Reference Tree
This study proposes a novel
calculation method called the distance reference tree (DRT), which considers planning time, spatial efficiency, and success rate. The DRT integrates A* search and dynamic programming principles. By preplanning the approximately shortest piecewise-linear A* path, the distance
from each waypoint
of the path to the endpoint (target,
) is calculated, and mapped with
to create a unique mapping. Each waypoint
is stored in a K-dimensional tree (KD-tree) [
38,
39] to construct the DRT. During the planning process, the K-nearest neighbor (KNN) algorithm is employed to find within the DRT the A* waypoint (
) closest to the current neighboring node (
) and free of collisions. The path distance
from
to
is then directly obtained from the precomputed mapping, along with the distance
between neighbors. This provides the approximate shortest distance from
to
, which is used as the
value.
Figure 8 shows the DRT-based
h2 calculation, using a relatively complex scenario for demonstration. This not only maintains generality, but also intuitively expresses the DRT’s logic. The specific process is as follows:
Step I. As shown in
Figure 8a, the initial and final poses are used to construct the original A* path. Given that A* expands nodes in 8 directions, a predefined key-value table <
-index pairs, fixed-pose> is employed to efficiently expand each new node. This table references the appropriate angle as the pose
from the key-value table, based on the row–column index.
Step II. To simplify the original A* path, turning points between consecutive straight-line paths are identified. As shown in
Figure 8b, nodes with differing
-values are extracted from the original A* path and assembled into a new, sparser A* path.
Step III. Linear interpolation is performed on the sparse A* path, followed by the subdivision and interconnection of the interpolation points, as shown in
Figure 8c. Passable connections, which do not intersect obstacles, are treated as edges in a weighted directed graph [
40]. The length of each edge serving as the Dijkstra weight, with endpoint indexes and connection lengths defining the edge attributes.
Step IV. Dijkstra’s algorithm is used to find the shortest path, resulting in an approximate shortest piecewise-linear A* path, as shown in
Figure 8d. This piecewise path connects the starting and ending points more directly than the original A* path, facilitating a more accurate and efficient
calculation.
Step V. The piecewise-linear A* path is interpolated at equidistant intervals, and the path distances
from each interpolated point
to the target
are computed and stored, as shown in
Figure 8e. Notably, all grid-based indexes
of the interpolated points are stored in a KD-tree as “branch points” to construct the DRT. Each index is linked to its corresponding path distance
via a one-to-one mapping. The process for computing
is detailed in Algorithm 1. After interpolation, the discretized grid points
exhibit significant data volume and uneven distribution. The KD-tree is adopted to organize the row–column indexes of the interpolated points in the approximate A* path as branch points, thereby enhancing the efficiency of querying neighboring nodes
for the nearest A*-interpolated points.
Algorithm 1 Calculating path lengths from “branch points” to the target |
Input: waypoints P of the piecewise-linear A* path, interpolation interval δ |
Output: interpolation-point(pi) set Φ |
1: function GetPointsOnPolyline(P, δ) |
2: for i in [0, P.size − 1] do |
3: L ← EuclidDistance(Pi, Pi+1); | ▷ Total length of the piecewise-linear A* path. |
4: end for |
5: Np ← ⌈L/δ⌉; | ▷ Number of pi. |
6: j ← 0; |
7: l ← 0; | ▷ LengthMoved. |
8: while 0 ≤ i < P·size − 1 and j < Np do |
9: sl ← EuclidDistance(Pi, Pi+1); |
10: while l + δ ≤ sl and j < Np do |
11: ω ← (l + δ)/sl; | ▷ Ratio. |
12: Φj·x ← Pi·x + ⌊ω × (Pi+1·x − Pi·x) + 0.5⌋; | |
13: Φj·y ← Pi·y + ⌊ω × (Pi+1·y − Pi·y) + 0.5⌋; | |
14: Φj·d ← L − (l + δ); | ▷ di |
15: l ← l + δ; |
16: j ← j + 1; |
17: end while |
18: L ← L − sl; |
19: l ← l − sl; |
20: end while |
21: return Φ |
22: end function |
Step VI. During node expansion, as shown in
Figure 8f, the k-nearest neighbor (KNN) algorithm is used to find the closest branch point
in the DRT that can establish a collision-free connection with the current node
. The distance
between these two points is retrieved, and the index
is then used for mapping to the precomputed path distance
, which is added to
for determining the
value of
. The process for obtaining each distance is detailed in Algorithm 2 where the Safe Travel Corridor (STC) defined by the distance threshold
constrains the node expansion scope.
Algorithm 2 Querying the approximate shortest path length from Sk+1 to the target through DRT |
Input: Sk+1 = current node |
Require: = an unordered set storing remote and impassable points |
Require: pidx = a collection of indexes for ”branch points” on DRT |
Require: pD2 = the squared distance from Sk+1 to ”branch points” |
Output: h2 = path length from Sk+1 to the ending point |
1: function CheckLookUpTable(Sk+1) |
2: K ← 1; | ▷ K = 1, for the nearest neighbor search algorithm. |
3: d2 ← 40 × 40; | ▷ 40:the grid distance. |
4: δxy ← 0.1 | ▷ δxy:Spatial resolution of the grid map. |
5: loop |
6: if kdtree.nearestKSearch(Sk+1, K, pidx, pD2) > 0 then |
7: for all element i of pidx do |
8: if =.end then |
9: p0 ← kdtree.getInputCloud ▷ Ψi; | ▷ Get the corresponding point in Ψ. |
10: ← pD2[i]; |
11: if > d2 then |
12: return h2 ← +∞; | ▷ Distance detection. |
13: end if |
14: j← pidx[i]; |
15: if not LineHit(Sk+1,p0) then | ▷ Collision detection. |
16: h2 ← (+ Φj·d0) × δxy |
17: return h2; |
18: else |
19: .insert(j); |
20: end if |
21: end if |
22: end for |
23: K ← K +1; |
24: if K>10 then |
25: return h2 ← +∞; | ▷ Overrun. |
26: end if |
27: else |
28: return h2 ← +∞; |
29: end if |
30: end loop |
31: end function |
By simplifying and straightening the original A* path, a reference path with heuristic information is generated to guide the expansion of HA* nodes towards the target.
2.5.3. Occupancy Grid Template
Collision detection is crucial for simulating vehicle impacts with obstacles during node expansion. The traditional HA* algorithm relies on the entire vehicle overlay for accurate collision detection, but significantly increasing computational time. In scenarios with densely distributed waypoints, line collision detection using the vehicle’s contour may be sufficient. Schock and Langlois [
41] proposed a relatively precise approach for line collision detection using oriented bounding boxes with heading. Nevertheless, the real-time computation of multiple trigonometric functions in OBBs slows down the planning speed.
In this study, a set of improved occupancy grid templates [
42,
43] based on the vehicle’s contour are employed for more efficient line collision detection, as shown in
Figure 9a. By precomputing the grid coordinates representing the relative row–column offsets from the grid origin, which correspond to the vehicle’s contour in multiple sampling directions with the vehicle’s center at the origin, these coordinates are then compiled into a collision lookup table indexed by orientation
, forming the final occupancy grid template, as shown in
Figure 9b. The template is generated once before the planning task begins and can be applied to all planning cycles. The method for computing the four vertices
of the template is described in Equations (6) and (7):
where
and
denote the vehicle’s length and width, respectively, and
represents the inflation value used to enlarge the vehicle’s contour and maintain a safety margin.
The corresponding collision parameters are shown in
Table 2. When the rectangular vertices are determined, the grid coordinates can be calculated through the linear interpolation of the connecting lines between vertices. Upon acquiring the precomputed occupancy grid templates, node expansion involves matching the sample angle
closest to the current node’s orientation
to retrieve the corresponding grid coordinates. These coordinates are then offset to the node’s position for collision detection by comparing them with the environmental grids at that location, as shown in
Figure 9c.
2.6. Upper-Level Topological Planning
The connection point is introduced before initiating topological planning on the semi-structured network, which serves to link the starting or ending point with the network, enabling the inspection vehicle to smoothly enter and exit. Specifically, the path segments generated from the starting point to its associated connection points integrate into the semi-structured network, as do the segments originating from the terminal connection points to the target. Connection points are located along directed edges and are defined as the front or rear pseudo-projection points from the starting or ending point to . The projection point is identified as the waypoint of closest to the respective starting or ending point, while the front or rear pseudo-projection point represents the waypoint several steps forward or backward from the projection point, based on the orientation of . If the pseudo-projection point extends beyond the boundary of , the beginning waypoint of is designated as the pseudo-projection point for the starting point, and similarly for the ending point. The number of connection points depends on application requirements. In the context of the caged poultry houses, a single connection point suffices, whereas in more complex environments, can be increased to create a more comprehensive network, aiding in the search for an optimal route. After acquiring the connection points, the TSO-HA* is performed between the connection points and the starting point to derive the connecting paths for integration into the network, as does the process between and the ending point.
In topological planning, a Hash map is employed to manage the collection of waypoints along each path planned using TSO-HA*. The sequential numbers of the initial and final poses for each directed path, including
and
in
Figure 4, serve as the indexes (i.e., keys) in the Hash map. In addition, the sets of waypoints
from the connection points to the endpoints of
, as well as those between the connection points
and
along the same
, as shown in
Figure 10, are also indexed. Consequently, by simply providing the initial and final sequence numbers, all waypoints along the path can be accessed.
A predetermined cost matrix is maintained by the TSO-HA*-Net for the numerical representation of the semi-structured topological network, with the costs
measured by the TSO-HA* path lengths in Equation (8):
where the length of the TSO-HA* path is distinguished as follows: in most cases, it is determined by the TSO-HA*-planned path, where
represents the number of TSO-HA* parent nodes,
denotes the length of the direct DB curve and,
and
are shown in
Table 1; in cases where the path is planned from the connection points to the corresponding endpoint of
, or between the points themselves, it is only a sub-segment of the complete TSO-HA* path, with
representing the number of waypoints in each segment.
Based on the matrix, as shown in
Figure 11, Dijkstra’s algorithm is applied to obtain a series of sequence numbers that represent the shortest path between the starting and ending points in the network. The procedure for identifying the minimal-cost path segments is detailed in Algorithm 3. When the sequential indexes representing the shortest path in the network are obtained, the corresponding set of waypoints can be retrieved from the Hash map in order, thereby composing the complete shortest path. The inspection route is derived from this process.
Algorithm 3 Planning the shortest path in the topological network using Dijkstra |
Require: dijnode = the custom node used in Dijkstra containing attributes such as node number node, parent node number prev_node, distance cost cost and comparison function for ascending sorting of distance cost |
Data: open_ list = an ordered set of dijnode sorted in ascending order by node cost |
Data: close_ list = a collection of dijnode storing processed nodes |
Result: idxes = sequence numbers (label) of the shortest path |
1: function DIJKSTRA( ) |
2: open_ list.insert(dijnode {0, 0, 0.0}); | ▷ Insert the starting point into open_ list as the initial node. |
3: repeat |
4: node_ ← open_list.extract(open_list.begin); | ▷ Extract the first element from open_list. |
5: if node_.node = 1 then | ▷ 1 is the number of the end, which means open_list is complete. |
6: while node_.prev_node ≠ 0 do | ▷ 0: the number of the start./Backtracking the path. |
7: idxes.insert(node_.node); |
8: for all element a of close_ list do |
9: if a.node = node_ .prev_node then | ▷ The parent node of the current node exists. |
10: node_ ← a; | ▷ Update. |
11: else |
12: ERROR: No whole path. Stop while. |
13: end if |
14: end for |
15: end while |
16: idxes.insert(node_.node); | ▷ This is the child node of the starting point. |
17: reverse_path(idxes.begin, idxes.end); | ▷ Reversing the path. |
18: Stop repeat.; |
19: end if //Now look for the shortest path. |
20: close_list.insert(node_); | ▷ Points placed in close_list will no longer be processed. |
21: for i in [0, node_num) do | ▷ node_num: predefined number of network nodes. |
22: if i = node_.node then | ▷ The current node. |
23: Next for; |
24: end if |
25: for all element a of close_ list do |
26: if a.node = i then | ▷ The node is in close_ list. |
27: Next for-21; |
28: end if |
29: end for |
30: if graph_ [node_.node][i] = +∞ then | ▷ graph_: cost matrix indexed by waypoints’ label. |
31: Next for; | ▷ Ignore nodes with infinite cost. |
32: end if | ▷ The node with the least cost so far. |
33: dijnode: open_node{i, node_.node, node_ .cost + graph_ [node_.node][i]}; |
34: for all element b of open_ list do |
35: if b.node = open_node.node then | ▷ Identical label. |
36: ifb.cost > open_node.cost then | ▷ The cost in open_list is too large. |
37: open_list.erase(b); | ▷ Update. |
38: open_list.insert(open_node); |
39: end if |
40: else |
41: open_ list.insert(open_node); |
42: end if |
43: end for |
44: end for |
45: until open_ list.empty |
46: return idxes |
47: end function |
3. Result and Discussion
This study conducts comparative experiments of global path planning based on several algorithms using the Jetson Orin NX 8GB with an Arm Cortex A78AE 6-core CPU, running the Ubuntu 20.04LTS operating system and ROS Noetic meta-operating system. Rviz 1.14.17 is utilized as the visualization interface.
3.1. h2 Calculation
Given the same initial and final poses, as well as the identical node-expansion parameters, the DB curve settings shown in
Table 1, the back-end optimization method described in
Section 2.5.1, and the collision detection method detailed in
Section 2.5.3, the TSO-HA* planning results for six different scenes within the poultry houses are obtained using DRT, described in
Section 2.5.2. As shown in
Figure 12, the TSO-HA* algorithm generates collision-free, smooth paths with short distances and curvature constraints, requiring only the specification of initial and final poses.
To minimize variability, multiple planning runs are performed for each scene, and the average results using DRT in TSO-HA*, LDP-MAP, and A*-dis are shown in
Table 3. The DRT method achieves a planning success rate close to 100% and demonstrates exceptional robustness across various scenes, significantly outperforming LDP-MAP, which has a success rate of 83.3%, and A*-dis, which achieves only 50%. The DRT method benefits from a more valuable lookup table, ensuring the optimal utilization of pre-stored nodes, whereas LDP-MAP results in the accumulation of redundant stored nodes and inefficient utilization. Despite minor variations in path lengths across the three algorithms, TSO-HA* consistently guarantees asymptotically optimal path lengths. Summaries of temporal and spatial performance for the three algorithms are shown in
Figure 13, which indicate that TSO-HA* achieves shorter computation time, reduced resource consumption, and a higher success rate when applied to high-resolution maps.
The LDP-MAP requires more time to construct the lookup table, with an average increase in table-generation time of 74.5%, and a minimum increase of 15.9% compared to DRT in this study. In contrast, DRT achieves an average reduction in total time of 66.6%, with a minimum reduction of 56.2% compared to LDP-MAP, and an average time decrease of 96.4% compared to A*-dis. Furthermore, fewer nodes are used in DRT to assist in the h2 calculation due to its reliable lookup table, the average number of stored nodes is reduced by 99.7% compared to LDP-MAP, and the average numbers of stored and explored nodes are reduced by 97.4% and 6.9%, respectively, compared to A*-dis. The results show that the DRT method employed by TSO-HA* is the most time- and space-efficient for h2 calculation across various planning scenes.
As shown in
Table 4, a computational complexity analysis is conducted to further validate the performance of DRT despite variations in the experimental environment. Due to the large number of stored nodes used in LDP-MAP and A*-dis presented in
Table 3, the overall analysis demonstrates that the DRT method has the lowest time and space complexity, verifying its low computational time and memory usage.
3.2. Line Collision Detection
Under unified planning points and scenarios, and utilizing the same
h2 calculation method described in
Section 2.5.2, collision detection experiments are conducted using the collision parameters listed in
Table 2 with the occupancy grid template (OGT) and the oriented bounding box (OBB). As shown in
Table 5, using the pre-existing occupancy grid templates results in only 2592 collision grid storage consumption and an average template-generation time of 0.78 ms, in comparison to the OBB. However, the front-end planning time is decreased by at least 4.0%, with an average reduction of 22.6%. This finding indicates that the use of occupancy grid templates significantly enhances planning speed while incurring only a minimal static memory overhead.
Furthermore, integrating collision detection into the original A* path of DRT, referred to as prior collision detection, helps prevent the piecewise-linear A* path from being obstructed in impassable narrow passages. This approach thereby avoids planning failures, as shown in
Figure 14.
The experimental results before and after implementing prior collision detection, using occupancy grid templates as an example, are shown in
Table 6. The results show that the incorporation of prior collision detection leads to a marginal average increase of 1.9% in node storage and 1.8% in node exploration, respectively. The maximum observed increments are 4.7% for node storage and 4.8% for exploration. Additionally, the average generation time for the lookup table is increased by 274.08 ms. However, the total time decreased by an average of 332.64 ms, representing a reduction of 19.1%. The results show that, despite the slight increase in table-generation time and node storage, the integration of prior collision detection improves the distribution rationality of the stored nodes, thus accelerating the planning process.
3.3. Planning Inspection Routes Based on TSO-HA*-Net
The TSO-HA* algorithm, leveraging the distance reference tree and occupancy grid templates, achieves a significant reduction in both the time and spatial consumption required for path planning. This enhancement is crucial for improving the speed, efficiency, and success rate of constructing the semi-structured topological network and inspection routes. Based on the edge connectivity depicted in
Figure 4, a semi-structured topological network is constructed using the TSO-HA* algorithm, as shown in
Figure 15a. Subsequently, topological planning is conducted based on this network.
Figure 15b demonstrates how the planned path is constrained by the topological network and relies on the connection points to merge seamlessly into the network. These connection points (indicated by labels 2 and 3 in
Figure 15b) are key components in constructing the complete network, and serve as critical points for the inspection vehicle to enter and exit the network.
Planning inspection routes using TSO-HA*-Net demonstrates outstanding planning performance. In
Figure 16a, pathways through elongated inter-cage corridors maintain linear trajectories, while “U”-shaped intersections exhibit seamless connectivity and smooth transitions. This both helps mitigate tire wear and motor strain caused by stationary rotations in the differential-drive inspection vehicle, and complies with the Ackermann steering geometry. By extracting key waypoints from linear path segments at regular intervals and storing them in a KD-tree format, detection points are designated where inspection vehicles can stop to identify diseased or dead poultry.
Figure 16b illustrates that the inspection route retains the capability to cover specific areas, indicating that the inspection vehicle can reach designated locations such as charging stations and maintenance areas via the shortest path while adhering to the constraints of the topological network. Collectively, these findings demonstrate that the inspection route designed by the TSO-HA*-Net algorithm not only continuously covers the corridors within the poultry house, but also ensures optimal and shortest path characteristics. This enables the inspection vehicle to follow a fixed work route while retaining the flexibility to reach specific locations through the shortest path. The TSO-HA*-Net algorithm thus successfully establishes a compromise between point-to-point path planning and full-coverage path planning, systematically addressing the inspection route requirements for the poultry houses and aligning with the actual environment. Moreover, the planned route enables house-to-house inspection, as shown in
Figure 17, reducing the need for additional vehicles.
The TSO-HA*-Net algorithm efficiently reduces the computational time required for both single-house and multiple-house topological planning. Planning an inspection route for a single house takes an average of 257.98 ms, while planning the global route that involves cross-coop transfers requires only 546.62 ms. These results fully demonstrate the efficiency of the algorithm, making it particularly suitable for the continuous, flexible, and rapid planning of inspection routes on large-scale, high-resolution grid maps.
Furthermore, depending on the semi-structured network via TSO-HA*-Net, coordinated inspections by multiple vehicles across single or multiple houses can be realized, enhancing inspection efficiency in large-scale poultry farming, as shown in
Figure 18. This capability ensures the synchronization and stability of inspection operations, thereby providing technical support for the efficient management of modern poultry farming.
4. Conclusions
Track-based inspection schemes face challenges such as track disconnection, contamination, and high installation and maintenance costs, while current rail-less solutions lack stable and reliable path planners. To address these issues, we propose a hybrid global path planner TSO-HA*-Net, which combines the spatiotemporally optimized Hybrid A* (TSO-HA*) algorithm with topological planning. The TSO-HA* incorporates an enhanced node expansion strategy, the distance reference tree, and simplified occupancy grid templates. Topological planning is adopted to find the shortest path within the network via connection points to derive an inspection route.
The experiments conducted in poultry houses show the time- and space-efficiency of the TSO-HA* algorithm. Compared to LDP-MAP and A*-dis, the total planning time of the TSO-HA* utilizing the DRT for h2 calculation is reduced by 66.6% and 96.4%, respectively, and the number of stored nodes is decreased by 99.7% and 97.4%, respectively. TSO-HA*-Net is efficient and flexible for planning inspection routes in caged poultry houses, requiring only 546.62 ms for a single global route. A balanced planning approach between point-to-point and full-coverage path planning is established, meeting the route requirements for coop inspection while adapting to the actual poultry house environment. The proposed planner can generate a continuous and complete route within a single planning process and serve as a foundational tool for facilitating cross-regional and multi-vehicle inspections. This innovation fills the gap in the inspection vehicle’s lack of a reliable global planner.
Future work will focus on integrating localization and navigation capabilities. By building on existing localization techniques, translating waypoints into trajectories, and employing control algorithms such as MPC, inspection task execution can be truly fulfilled. Additionally, nearest neighbor search algorithms will be used for precise localization to track the cage location of abnormal poultry.