Volume 7, Issue 2 e70009
RESEARCH ARTICLE
Open Access

Study on Multiobjective Path Optimization of Plant Protection Robots Based on Improved ACO-DWA Algorithm

Jing Niu

Corresponding Author

Jing Niu

Tianshui Normal University, Tianshui, Gansu, China

Correspondence:

Jing Niu ([email protected])

Contribution: Conceptualization, Methodology

Search for more papers by this author
Chuanyan Shen

Chuanyan Shen

Tianshui Normal University, Tianshui, Gansu, China

Contribution: Data curation, Writing - review & editing

Search for more papers by this author
Lipeng Zhang

Lipeng Zhang

Yanshan University, Qinhuangdao, Hebei, China

Contribution: Funding acquisition, Formal analysis

Search for more papers by this author
Guanghao Gao

Guanghao Gao

Tianshui Normal University, Tianshui, Gansu, China

Contribution: Software, Writing - review & editing

Search for more papers by this author
Jiahao Zheng

Jiahao Zheng

Tianshui Normal University, Tianshui, Gansu, China

Contribution: Formal analysis, Writing - review & editing

Search for more papers by this author
First published: 07 February 2025
Citations: 1

Funding: This work was supported by Gansu Provincial Department of Education 2013A-114, 23YFFE0001, Tianshui Normal University, CYZ2023-05, CXCYJG-JGXM202304JD.

ABSTRACT

The use of large-scale agricultural machinery for plant protection in nonstandard orchards of mountainous areas is very limited, while small-wheeled robots have great application prospect. To address the false judgment of visual information caused by the shading of branches and leaves and the difficulty in avoiding obstacles in complex orchard terrain, an operation trajectory optimization approach based on the improved dynamic window algorithm (DWA) with ant colony optimization (ACO) was developed. First, the orchard environment information was acquired by laser radar, and the voxel method was used to reduce the point cloud density of orchard ground. The grid method was used to segment the point clouds. Using the K-means clustering algorithm to extract navigation lines of the tree row. Second, combining with the kinematic model and the motion path constraints of robots, a series of candidate trace points were generated using the model-based prediction algorithm (SBMPO). Then, using the improved ACO-DWA algorithm, the robot access cost was integrated into the objective function of the search node, and the path planning was carried out online based on the environment grid map. Finally, in simulation and orchard validation scenes, the effects of this improved approach were checked through the simulation platform Matlab R2021 and ROS2 operating system. Simulation results on Matlab R2021 show that this improved algorithm has an average of 28%, 16% and 37% reduction in three indicators of the travel path, the number of detours, and the calculation time, respectively. In the orchard real-time experiment, compared with other excellent algorithms, the navigation distance error is reduced obviously. These experimental results show that this method would obviously improve the robot access effect in the inner area between the tree row, significantly meet the requirements of high safety and speed level of robots in these scenes. Also, it could be applied in the field such as picking and spraying robots.

1 Introduction

Nowadays, wheeled robots integrated many intelligent technologies such as depth vision, system integration, and trajectory optimization, which have widespread development and application in the military and civilian fields. In recent years, operation trajectory planning and optimization are key issues in these fields. The algorithms used in path search mainly include intelligent algorithms such as the dynamic window algorithm (DWA), the genetic algorithm, the particle swarm optimization (PSO), and the graph-based search algorithms. The prominent feature of DWA is to limit the acceleration and deceleration performance of the robot to a feasible dynamic range in the velocity sampling space. However, in complex dynamic environments, such as when encountering a “C” shaped barrier, it may not be possible to avoid the hazard well. In addition, it may also generate an smoothless path when generating tracks, especially when precise attitude control or complex environment navigation is required. Genetic algorithm is a randomized search method that has evolved from the evolutionary laws of the biological world, which means survival of the fittest, genetic mechanism of survival of the fittest. PSO is a type of swarm intelligence algorithm designed to simulate the hunting behavior of bird flocks. For the graph-based search algorithms, it has two kinds of methods, such as breadth-first search (BFS) and depth-first search (DFS). BFS is realized by queue, first-in first-out, suitable path planning, shortest path but very inefficient. DFS uses stack implementation, first-in last-out. DFS path is often complex, not shortest. In order to promote the computing efficiency of A* operation, a hop search method has been proposed [1], but this method can not ensure optimal global path in complex. The straight-arc strategy has been used to smooth the trajectory [2]. Using the differential methods has reduced the inflection points number, however increased the calculating cost [3]. The heuristic function of A* was optimized, and the selection strategy of key nodes was improved, so the path redundancy points were reduced [4]. The curvature velocity method (CVM) has been proposed [5], where the obstacle avoidance problem with constraints of the velocity and space were described and an objective optimization function considering three factors, such as speed, safety, and path was developed. On the basis of CVM, a more complete DWA algorithm was proposed [6], where the objective function was addressed with three factors, such as heading angle, velocity, and obstacle distance. The trajectory obtained was relatively smooth and effectively solved the problem of detouring around the obstacles. In the operation of the orchard environment, the kinematic constraints of the robots should also be an important factor to be considered, in addition to obstacle avoidance and access cost. Therefore, some scholars have proposed a method of combining path planning with trajectory optimization to optimize the trajectory [7]. Chen et al. used a quadric spline curve to express the shape of trajectory; however, the limitations of the B-spline curve was not suitable for complex conditions [8]. Al et al. used B-spline curve to optimize the global path step-by-step at the corner and represented the global path by the way of straight line, curve, and straight line [9]. Using cubic uniform B-spline curves to describe the forklift path and optimizing the global path shape; however, this method was mainly suitable for simple operation [10, 11].

To address the false judgment of visual information misjudgment caused by the shading of branches and leaves and the difficulty in avoiding obstacles in complex orchard terrain, this article offers an operation trajectory optimization algorithm based on improved ACO-DWA algorithm including extracting orchard environmental information through laser radar, simplifying point cloud density using voxel grid method, extracting navigation lines of the tree row using K-means algorithm, and combining with the kinematic model and the motion path constraints of robots, etc. A series of candidate trace points were generated using the model-based prediction algorithm (SBMPO). Using the improved ACO-DWA algorithm, the robot access cost was integrated into the objective function of the search node, and the path planning was carried out online based on the environment grid map. Finally, in simulation and orchard validation scenes, the effects of this improved approach were checked through the simulation platform Matlab R2021 and ROS2 operating system.

2 Materials and Methods

2.1 Information Identification System in Orchard Environment

This plant protection robot is made up of a distributed pure electric drive chassis, a 16-line laser radar, a GNSS navigation system, a lithium battery pack, and a chassis controller, etc. It is shown in Figure 1.

Details are in the caption following the image
Plant protection robot structure.

In the orchard environment, the GNSS navigation system serves the robots for global path positioning. The laser radar is used to obtain local environmental information. The size of the robot must meet the requirements between the rows of fruit trees. This is in order to ensure the robot could turn around smoothly during the operation between the rows. The row design width is 100 cm. Most mountain orchards are built according to mountain terrain, and the ground is prone to undulation. In addition, the shading of branches and leaves, the density of trees in the row, and the uneven distribution of orchard light intensity are easy to affect the stability of GNSS signals. These factors will lead to collisions during robot operation. Therefore, in the inner-row of fruit trees, the laser radar would offer the navigation service for local operation path optimization.

2.2 Radar Navigation Process in the Tree Rows

Affected by the shading of branches and leaves and the uneven illumination, actually, in the most areas of the orchard, the distribution of point clouds through radar is more concentrated. The point clouds around it are scattered. However, the area in the middle ground part is significantly smaller than the actual passable size, as shown in Figure 2.

Details are in the caption following the image
Orchard information. (a) Real orchard scene. (b) Point cloud information collected by radar.
In this article, we establish a ground point cloud grid map of the orchard as shown in Figure 3. The ground point cloud is obtained by the height difference, height variance, and height gradient segmentation of the grid cells. The coordinate origin is the center of the radar. The side length of the grid cell is 0.1 cm. The grid cell g ( r , c ) $$ g\left(r,c\right) $$ is belonged to which the laser dot P ω x ω , y ω , z ω $$ {P}_{\omega}\left({x}_{\omega },{y}_{\omega },{z}_{\omega}\right) $$ . The calculation method is as follows [1]:
g ( r , c ) = floor x ω 0.1 + 15 , floor y ω 0.22 0.1 $$ g\left(r,c\right)=\left( floor\left(\frac{x_{\omega }}{0.1}\right)+15, floor\left(\frac{y_{\omega }-0.22}{0.1}\right)\right) $$ (1)
where floor() is the rounding-down function.
Details are in the caption following the image
Radar grid map.

To issue the split task of point clouds, thresholds are applied to evaluate the height difference, height variance, and height gradient of the grid cells. The grid cells are divided into ground areas and other areas. The established ground area projection of the point cloud is shown in Figure 4.

Details are in the caption following the image
Projection of the ground point cloud.

In this article, we use K-mean clustering method to cluster the point cloud in the rows of trees, and the clustering center is used as the backbone area point of the rows. Then, the robot route equation could be fitted.

We set the position of any ground point cloud as S i x i , y i $$ {\mathrm{S}}_{\mathrm{i}}\left({x}_i,{\mathrm{y}}_i\right) $$ , then the euclidean distance between any point x i , y i $$ \left({x}_i,{\mathrm{y}}_i\right) $$ and its cluster center x j , y j $$ \left({x}_j,{y}_j\right) $$ is expressed as follows [2]:
d ij = x i x j 2 + y i y j 2 $$ {d}_{ij}=\sqrt{{\left({x}_i-{x}_j\right)}^2+{\left({y}_i-{y}_j\right)}^2} $$ (2)
Estimating the number of point clouds in the rows of trees by the k-value through the following Equation (3) [3], the distance from each ground point cloud point to the k center points is calculated, and the points are grouped into clusters of the center point by the smallest distance from them.
k = h l p tan 15 o $$ k=\frac{h}{l_p\tan {15}^{\mathrm{o}}} $$ (3)
where h is the height of the radar baseline above the ground. lp is the estimated spacing between fruit trees.
After clustering, the center points of k clusters are [4]
X i = 1 S i x S i x $$ {X}_i=\frac{1}{\left|{S}_i\right|}{\sum}_{x\in {S}_i}x $$ (4)
The clustering criteria of the algorithm are as follows [5]:
ε k - means S i = arg min i = 1 k x S i x X i $$ {\varepsilon}_{\mathrm{k}\hbox{-} \mathrm{means}}\left({S}_i\right)=\mathrm{argmin}\sum \limits_{i=1}^k\sum \limits_{x\in {S}_i}\left\Vert x-{X}_i\right\Vert $$ (5)

The point cloud information in the rows of trees obtained by the clustering approach is shown in Figure 5. It can be seen that the point cloud density of the proximal data is higher than that of the far-end data due to the large density of point clouds collected by 16-line laser radar and the lush distribution of branches and leaves.

Details are in the caption following the image
Point clouds data of the tree rows after clustering.

2.3 Classic ACO Model

The basic principle of the ant colony optimization (ACO) has been explained in detail in [12] and other works. The following paragraph only explained the state transition rate and the pheromone increment model briefly.

2.3.1 State Transition Rate

At time t, the state transition rate of ants moving from state node I to adjacent state node J can be defined as [7]
P ij m ( t ) = τ ij α ( t ) η ij β ( t ) s U m τ is α ( t ) η is β ( t ) , if j U m 0 , else $$ {\mathrm{P}}_{\mathrm{ij}}^{\mathrm{m}}\left(\mathrm{t}\right)=\left\{\begin{array}{ll}\frac{\uptau_{\mathrm{ij}}^{\upalpha}\left(\mathrm{t}\right)\cdot {\upeta}_{\mathrm{ij}}^{\upbeta}\left(\mathrm{t}\right)}{\sum \limits_{\mathrm{s}\in {\mathrm{U}}^{\mathrm{m}}}{\uptau}_{\mathrm{is}}^{\upalpha}\left(\mathrm{t}\right)\cdot {\upeta}_{\mathrm{is}}^{\upbeta}\left(\mathrm{t}\right)},& \mathrm{if}\ \mathrm{j}\in {\mathrm{U}}^{\mathrm{m}}\\ {}0,& \mathrm{else}\end{array}\right. $$ (6)
where P ij m ( t ) $$ {\mathrm{P}}_{\mathrm{ij}}^{\mathrm{m}}\left(\mathrm{t}\right) $$ is the state transition probability of the m-Th ant moving from state node I to state node J at time T. τ ij α ( t ) $$ {\uptau}_{\mathrm{ij}}^{\upalpha}\left(\mathrm{t}\right) $$ is the pheromone concentration on the path (i,j), where α $$ \upalpha $$ is the information heuristic factor [8, 9], reflecting the influence of pheromone on the ant's path selection. η ij β ( t ) $$ {\upeta}_{\mathrm{ij}}^{\upbeta}\left(\mathrm{t}\right) $$ is the heuristic function of the m-Th ant to select the adjacent state node J at the state node I, where β $$ \upbeta $$ is the expected heuristic factor, reflecting the importance of heuristic information in guiding the ant colony search process. U m $$ {\mathrm{U}}^{\mathrm{m}} $$ is the next node set that the ant has not visited. S is an optional node set adjacent to the current position. τ is α ( t ) $$ {\uptau}_{\mathrm{is}}^{\upalpha}\left(\mathrm{t}\right) $$ is the pheromone concentration of the m-Th ant between the current state node I and the adjacent state nodes. η is β ( t ) $$ {\upeta}_{\mathrm{is}}^{\upbeta}\left(\mathrm{t}\right) $$ is the heuristic function of the m-Th ant between the current node I and the adjacent state nodes.
The heuristic function η ij ( t ) $$ {\upeta}_{\mathrm{ij}}\left(\mathrm{t}\right) $$ can be expressed as
η ij ( t ) = 1 / D ij $$ {\upeta}_{\mathrm{ij}}\left(\mathrm{t}\right)=1/{\mathrm{D}}_{\mathrm{ij}} $$ (7)
where D ij $$ {\mathrm{D}}_{\mathrm{ij}} $$ is the distance between state node I and state node J.

2.3.2 Pheromone Concentration Update Model

Here, the pheromone concentration updating models are ant density system (ADS), ant quantity system (AQS), and ant cycle system (ACS) commonly. ADS and AQS are applied to the local updating strategy, while the ACS is applied to global update strategy [13]. Considering the computing efficiency and obstacle avoidance ability, this paper uses AQS model as the prototype.

Supposing the m-th ant is passing the state node X { ( i , j ) | i = 1 , 2 , , n ; j = 1 , 2 , , n } $$ \mathrm{X}\left\{\left(\mathrm{i},\mathrm{j}\right)|\mathrm{i}=1,2,\dots, \mathrm{n};\mathrm{j}=1,2,\dots, \mathrm{n}\right\} $$ currently [14, 15]. So, the pheromone concentration is updating as follows [7]:
τ ij m ( t ) = Q D ij , if ( i , j ) X 0 , else $$ \Delta {\uptau}_{\mathrm{ij}}^{\mathrm{m}}\left(\mathrm{t}\right)=\left\{\begin{array}{l}\frac{\mathrm{Q}}{{\mathrm{D}}_{\mathrm{ij}}},\kern1em \mathrm{if}\left(\mathrm{i},\mathrm{j}\right)\in \mathrm{X}\\ {}0,\kern1.7em \mathrm{else}\end{array}\right. $$ (8)
where τ ij m ( t ) $$ \Delta {\uptau}_{\mathrm{ij}}^{\mathrm{m}}\left(\mathrm{t}\right) $$ is the increase in path pheromone of the m-Th and moving from the state node I to the adjacent state node J from time t − 1 to time T. Q is the pheromone intensity which is a constant greater than 0.

2.3.3 Improved ACO-DWA Algorithm Process

Traditionally, the process of the classical DWA algorithm is to convert the position control into speed control. It describes the obstacle avoidance problems as an optimization problem with constraints in the speed space [16]. The speed space includes the speed, the driving direction, and the position constraints in the surrounding environment.

Determined by the physical constraints of obstacles around the robot trajectory node, the speed space U s u a , ω r $$ {U}_s\left({u}_a,{\omega}_r\right) $$ composed of the longitudinal speed of the robot and the angular velocity limit of the yaw. The speed space is described as Equation (9):
U s = u a ω r | 0 u a u amax , ω rmax ω r ω rmax $$ {U}_s=\left\{\left({u}_a{\omega}_r\right)\mid 0\le {u}_a\le {u}_{amax},-{\omega}_{rmax}\le {\omega}_r\le {\omega}_{rmax}\right\} $$ (9)
where u a $$ {u}_a $$ represents the current speed. ω r $$ {\omega}_r $$ represents the current yaw rate.
The trajectory of the robot can be considered to be composed of several broken line segments in n periods. The connection point of the broken line segment is considered to be close to the position of the obstacle on the premise of meeting the expansion size limit of the obstacle [17]. To ensure that obstacles encountered in the process of robot movement do not collide, after the time at can be obtained by kinematic conditions, the speed set U a $$ {\mathrm{U}}_{\mathrm{a}} $$ must satisfy:
U a = u a ω r | u a 2 dist u a ω r u a ˙ , ω r 2 dist u a ω r ω r ˙ $$ {U}_a=\left\{\left({u}_a{\omega}_r\right)\mid {u}_a\le \sqrt{2\cdot dist\left({u}_a{\omega}_r\right)\cdot \dot{u_a}},{\omega}_r\le \sqrt{2\cdot dist\left({u}_a{\omega}_r\right)\cdot \dot{\omega_r}}\right\} $$ (10)
where dist u a , ω r $$ dist\left({u}_a,{\omega}_r\right) $$ represents the linear distance between the robot and the obstacle at the next moment.
Assuming the speed at the current moment is u acurr , ω rcurr $$ \left({\mathrm{u}}_{\mathrm{acurr}},{\upomega}_{\mathrm{rcurr}}\right) $$ . Then, the speed U d $$ {U}_d $$ at the next moment must satisfy as Equation (11):
U d = u ad , ω rd = u acurr u amax ˙ d t u a u acurr + u amax ˙ dt ω rcurr ω rmax ˙ d t ω r ω rcurr + ω rmax ˙ dt $$ {U}_d=\left({u}_{ad},{\omega}_{rd}\right)=\left\{\begin{array}{l}{u}_{acurr}-\dot{u_{amax}}{d}_t\le {u}_a\le {u}_{acurr}+\dot{u_{amax}} dt\\ {}{\omega}_{rcurr}-\dot{\omega_{rmax}}{d}_t\le {\omega}_r\le {\omega}_{rcurr}+\dot{\omega_{rmax}} dt\end{array}\right. $$ (11)
The final speed U could be expressed as
U = U s U a U d $$ \mathrm{U}={U}_s\cap {U}_a\cap {U}_d $$ (12)
The robot predicts the speed at the next moment through the evaluation function [18, 19]. The evaluation function defined here considering the moving speed, orientation, and collision safety. The evaluation function is defined as Equation (13):
G u ad , ω rd = l θ + m dist u a , ω r + n u amax $$ \mathrm{G}\left({u}_{ad},{\omega}_{rd}\right)=l\cdot \theta +m\cdot dist\left({u}_a,{\omega}_r\right)+n\cdot {u}_{amax} $$ (13)
where θ $$ \uptheta $$ indicates the angle between the driving direction and the target line. dist u a , ω r $$ \mathrm{dist}\left({\mathrm{u}}_{\mathrm{a}},{\upomega}_{\mathrm{r}}\right) $$ indicates the shortest distance between the robot position and the obstacles. l, m, and n are three weight coefficients, respectively.

The evaluation function of each possible trajectory node are calculated through Equation (13). We choose the maximum function to the best speed space. Commonly, each weight coefficient in DWA is fixed [20]. Using the voxel grid map to test the approch can be seen that when all the weight coefficients are large [21], the running steps is relatively small, and the computing time is short (as shown in Figure 6). When angle weight coefficient is smaller, the steps is too large and the computing time is long (as shown in Figure 7). When the distance and speed weight coefficients are both smaller, the steps increases significantly and the robot chooses to detours [22]. Meanwhile, the computing time increases significantly (as shown in Figure 8).

Details are in the caption following the image
Large-weight coefficient motion trajectory.
Details are in the caption following the image
Low-angle weight coefficient motion trajectory.
Details are in the caption following the image
Low-distance and low-speed weight coefficients motion trajectory.

Therefore, when a robot is moving at high speed, if the density of surrounding obstacles is too high, the classic DWA will reduce the passing ability. At the same time, the planned path will make the robot too close to the obstacles [23, 24]. Especially when the density of obstacles further increases, the above algorithm will make the robot to go around obstacles. So the path here is too long [25]. In some cases, the path will not be smooth, making the robot to shake between obstacles [26]. The fundamental reason for these problems is that once the weight coefficients are determined, it cannot suitable to different various complex environment. When the environment is changed, it is possible to develop some strange paths which are different to human habits [27, 28].

Based on the above considerations, this article synthesizes the advantages of ACO algorithm globally and continuous search process and develops an improved ACO-DWA algorithm where the weights of evaluation factors are self-adaption through the ACO. It especially reduces the detour distance of robots and improves passing ability and safety in complex and dense obstacle scenes [29].

The specific process of the above weight factors updating based on ACO will be introduced below.

2.3.4 Improved ACO-DWA Algorithm

The high-precision laser radar installed in robots can detect the size and distance information of obstacles in the surrounding area quickly [30, 31]. Assuming at time t, there are certain density obstacles in the surrounding area of the robot as shown in Figure 6.

Assuming the number of obstacles is K, the shortest distance between the robot and the i-Th obstacle is D i $$ {\mathrm{D}}_{\mathrm{i}} $$ , and the azimuth angle is θ i $$ {\uptheta}_{\mathrm{i}} $$ . Define that when K is greater than the threshold, the area is a dense area of obstacles. Then, the shortest distance D ij $$ {\mathrm{D}}_{\mathrm{ij}} $$ between the i-Th and the j-Th obstacle is calculated as follows:
D ij = D i 2 + D j 2 D i D j cos θ i θ j , θ i θ j $$ {\mathrm{D}}_{\mathrm{i}\mathrm{j}}=\sqrt{{\mathrm{D}}_{\mathrm{i}}^2+{\mathrm{D}}_{\mathrm{j}}^2-{\mathrm{D}}_{\mathrm{i}}{\mathrm{D}}_{\mathrm{j}}\cos \left({\uptheta}_{\mathrm{i}}-{\uptheta}_{\mathrm{j}}\right)},{\theta}_i\ge {\theta}_j $$ (14)
Considering the passing safety between obstacles, in order to measure the passing ability of a robot between obstacles, the passing function evaluation D s $$ {\mathrm{D}}_{\mathrm{s}} $$ is defined as Equation (15):
D s = δ θ max ω ramx + ϵ u amx u a ˙ $$ {\mathrm{D}}_{\mathrm{s}}=\updelta \cdot \frac{\uptheta_{\mathrm{max}}}{\omega_{ramx}}+\upvarepsilon \cdot \frac{{\mathrm{u}}_{\mathrm{a}\mathrm{mx}}}{\dot{{\mathrm{u}}_{\mathrm{a}}}} $$ (15)
where ω rmax $$ {\upomega}_{\mathrm{rmax}} $$ is the maximum value of ω r $$ {\upomega}_{\mathrm{r}} $$ . θ max $$ {\uptheta}_{\mathrm{max}} $$ is the maximum value of θ $$ \theta $$ . u amx $$ {u}_{amx} $$ is the maximum value of u a $$ {u}_a $$ . The coefficient δ $$ \updelta $$ is a parameter that reflects the influence of robot orientation on passing ability, a value of 0.6 based on the experience of modeling raster maps. The coefficient δ $$ \updelta $$ is inversely proportional to it. The greater the maximum speed of the robot, the easier it is for the robot to pass through, and this number is directly proportional to it. The coefficient ϵ $$ \upvarepsilon $$ is a parameter that reflects the impact of robot speed on passing ability, with values 0.4 based on the experience of modeling raster maps.
Considering the expansion radius of the obstacle, we introduce the expansion radius influence coefficient σ $$ \upsigma $$ , the requirement for a robot to pass safely between two obstacles is
D s > D ij σ $$ {D}_s>\frac{D_{ij}}{\sigma } $$ (16)
where σ $$ \upsigma $$ is the expansion radius of the obstacle, it is 0.3 based on the experience.
Then, the update model of the dynamic pheromone [32] is as follows:
τ ij m = σ D smax D ij D ij σ D smin , δ > ε D ij σ D smax D ij σ D smin , δ ε $$ \Delta {\tau}_{ij}^m=\left\{\begin{array}{l}\frac{\sigma \cdot {D}_{smax}-{\mathrm{D}}_{\mathrm{ij}}}{{\mathrm{D}}_{\mathrm{ij}}-\upsigma \cdot {\mathrm{D}}_{\mathrm{smin}}},\delta >\varepsilon \\ {}\frac{{\mathrm{D}}_{\mathrm{ij}}-\upsigma \cdot {D}_{smax}}{{\mathrm{D}}_{\mathrm{ij}}-\upsigma \cdot {\mathrm{D}}_{\mathrm{smin}}},\delta \le \varepsilon \end{array}\right. $$ (17)
where δ = D smax D smin . ε $$ \updelta ={\mathrm{D}}_{\mathrm{smax}}-{\mathrm{D}}_{\mathrm{smin}}.\upvarepsilon $$ is the acceptable error for the n-th iteration which is a constant. It is 0.3. D smax $$ {\mathrm{D}}_{\mathrm{smax}} $$ refers to the maximum value of the passing function evaluation. D smin $$ {\mathrm{D}}_{\mathrm{smin}} $$ refers to the minimum value of the passing function evaluation.

Then, the feasible solution of this optimization problem is represented by the path of the ants, and all the paths of the whole ant colony constitute the solution space of the optimization. Ants will choose the path with higher pheromone concentration with a higher probability of forming positive feedback. We take the pheromone concentration of the ants as an objective function. The input variable is u a , ω r , θ $$ \left({\mathrm{u}}_{\mathrm{a}},{\upomega}_{\mathrm{r}},\uptheta \right) $$ , and the optimization variable is ( l , m , n ) $$ \left(\mathrm{l},\mathrm{m},\mathrm{n}\right) $$ . Finally, the solution space that satisfies the maximum objective function is the output. The adaptive optimization process of the weight evaluation factors is described as below.

2.3.5 Algorithm Procedure

1st: Environment map information is obtained using high-precision laser radar.

2nd: The starting point, target point, initial heading angle, position, heading, and linear angular velocity are collected.

3rd: The kinematic constraints of the velocity space of the trajectory nodes are determined by the Equations (9-12).

4th: Initialization of ACO parameters.

5th: The solution space is initialized at random. The pheromone concentration is updating according to Equations (14-17). The heuristic information matrix is calculated. The adjacent matrix is queried. The probability that the m-Th ant will choose the adjacent speed state node is calculated according to Equation (11).

6th: The path length of each ant is calculated. The optimal solution (l, m, n) in the current iteration times is recording, which minimizes the evaluation function shown in Equation (13).

7th: Whether to terminate the iteration is a judge: make the number of iterations +1, empty the list of the ant state space, and return to steps 4th–6th. If the value of the evaluation function calculated by Equation (13) becomes larger, terminate the iteration and record the optimal (l, m, n). The population evolution algebra is less than or equal to the maximum evolution algebra G.

8th: The three parts of the evaluation function shown in Equation (13) are normalized. The optimal (l, m, n) is substituted into Equation (13). The corresponding predicted state could be taken into the next original U s u a , ω r $$ {\mathrm{U}}_{\mathrm{s}}\left({\mathrm{u}}_{\mathrm{a}},{\upomega}_{\mathrm{r}}\right) $$ .

9th: The state of the robot speed space is updated. The optimal speed state space is obtained.

3 Results and Discussion

3.1 Parameter Initialization

When the robot faces a unknown environment, the path planning results should be closer to the human riding experience, striving for increased efficiency and convenience. To verify the advantages of this improved algorithm in path planning length, trajectory smoothness, and computing efficiency, this article develops an environment grid map in Matlab and carries out planning experiments on this technology.

In this article, an environment grid map of 10 × 10 ( m 2 ) $$ 10\times 10\ \left(\mathrm{m}2\right) $$ is constructed as shown in Figure 6. In Figure 6, the red square represents the starting point and the target point, the black squares represent obstacles, and the white squares represent the open space. The square area reflects the expanded size of the robot and obstacles, and the dotted line with an arrow represents the initial start of the planned global path. The colored solid line represents the actual running path.

The parameter settings of the improved DWA algorithm are shown in Table 1. The grid side length is 1. If the expansion radius is 0.5, the robots would collide with obstacles. To ensure that the distance between the robot and the obstacle is not too sensitive and the robot does not bypass, the expansion radius is 0.3 [33]. There are 100 cells in the grid map. Only 1% of the linear speed and angular speed of the robot is taken as resolution. So, each cell can be guaranteed to have a state node. So the resolutions of linear speed and angular velocity are 0.03 and 0.2. According to the level of the initial linear velocity of the robot and the size of the grid map, considering the longest range of path planning, the design simulation test time is 4.

TABLE 1. Improved DWA algorithm parameters.
Expansion radius m Time resolution s Resolution of linear speed m/s Resolution of angular velocity rad/s Test time s
0.3 0.01 0.03 0.2 4

The parameter settings of the ACO algorithm are shown in Table 2. α $$ \upalpha $$ reflects the intensity of random factors in the path search. The greater its value is, the more ants will choose the previous path, and the randomness of the search will be weakened [33]. The smaller its value is, the search will fall into the local optimum. According to experience, the general range of the value is [1, 4]. So 3 is chosen in this paper, which has a better comprehensive solution performance [34]. The factor β $$ \upbeta $$ reflects the strength of transcendental and deterministic factors in the process of searching for the optimal path. Based on experience, the general value range is [3, 5]. The size of ρ $$ \uprho $$ would affect the convergence speed and global search performance of the algorithm [35]. So it is a number between 0 and 1. According to experience, the value is 0.5. If the number of ant colonies m is too small, the global performance will be reduced and premature stagnation will occur. If m is too large, the convergence speed of the algorithm will slow down. Therefore, based on experience, m generally takes the value of 10–50. The selection of Q is optional without special consideration. The maximum evolutionary algebra G is a parameter indicating the running end condition of the ant colony algorithm, which is generally taken as 100–500.

TABLE 2. Parameters of the ant colony algorithm.
G m α $$ \upalpha $$ β $$ \upbeta $$ ρ $$ \uprho $$ Q
100 40 3 4 0.5 100

3.2 Discussion

To further verify the solution effectiveness and security of the improved ACO-DWA algorithm proposed in this article, simulation testing of the algorithm is conducted on Matlab R2021 platform here. Simulation testing is performed in three stages: (1) the convergence and global search experiments, (2) the performance test in a grid map environment, and (3) orchard real-time experiments based on the robot ROS2 system.

3.2.1 The Convergence and Global Search Experiments of the Improved ACO-DWA Algorithm

Here, the IEEE CEC2005 benchmark test was used to test the algorithm. The IEEE CEC2005 benchmark test contains 25 test functions including 5 types unimodal functions, 8 multimodal functions, and 12 complex functions. The improved ACO-DWA algorithm in the article was compared and tested with the DWA with fixed weights, DWA-A*, and bidirectional searching DWA (BSDWA). To ensure the objectivity and reliability of the experimental results, the results in the experiment are obtained on the basis of 20 independent runs. The convergence process reflects the optimization details at different stages.

Limited by space, here Figure 9, is showing two representative sets of convergence curves only. The unimodal function f1 tests the convergence performance, and the multimodal function f10 tests the balance ability of the global search and local development. The test results of f1 show that the improved ACO-DWA algorithm performs similarly to BSDWA, with a fast convergence speed, and quickly converges to the global optimum in the early stages of iteration. However, the convergence speeds of DWA and DWA-A* are relatively slow. The test results of f10 show that the improved ACO-DWA performs very similarly to BSDWA, with a very fast convergence speed in the early stages of iteration, which is one order of magnitude faster than the other five variants.

Details are in the caption following the image
Convergence curves of the improved ACO-DWA algorithm testing. (a) Test curves of the unimodal function f1. (b) Test curves of the multimodal function f10.

3.2.2 Performance Test in a Grid Map Environment

In order to verify the effectiveness of the above improved ACO-DWA algorithm in different scenarios, multiple sets of static obstacle experiments are built in a grid map simulation environment. We compare the differences in path length, smoothness and computing time between these algorithms, and also change the speed and grid map accuracy in three typical static obstacle scenarios. The simulation test results are shown as follows.

As shown in Figure 10, the red line represents the path trajectory of the ACO-DWA algorithm, the black line represents DWA, the blue line represents DWA-A*, and the yellow line represents BSDWA. When we use 10 × 10 grid maps and the robot speed is 10 km/h, it can be seen that there are significant differences in the path trajectories planned. In the circular type, the ACO-DWA and DWA-A* path trajectories are relatively short, with fewer turns and greater fitness with human driving logic. In contrast, BSDWA and DWA prefer to choose a long path when confronting obstacles for the first time. In staggered type, the BSDWA shakes obviously between obstacles. However, the DWA and DWA-A* are obviously longer. In the maze type, there is not much difference in the effectiveness of the four algorithms in the initial stage. However, in the later stage, a more direct way of traveling by ACO-DWA was chosen. So the trajectory of ACO-DWA is the shortest of them. Due to space limitations, the testing path length, number of turns, and computation time in staggered type are shown in Table 3 only. From the below three evaluation indicators, taking DWA as the benchmark, the average enhancement rate of the other three excellent algorithm indicators, respectively, reaches 29%, 22% and 1.8%. So, this improved ACO-DWA is the best of them.

Details are in the caption following the image
Three types of scenarios testing results in 10 km/h. (a) Circular. (b) Staggered. (c) Maze.
TABLE 3. Testing results information.
Parameter Dist/m Turning/ number Computation time/s aAerage enhancement %
DWA 18.309 1 1.20
Improved ACO-DWA 14.167 2 0.78 29%
DWA-A* 16.701 2 0.84 22%
BSDWA 17.860 4 1.19 1.8%

Considering that robot speed is an important variable which affects the algorithm function, this time we choose the speed is 50 km/h. The simulation results are shown in Figure 11.

Details are in the caption following the image
Three types of scenarios testing results in 50 km/h. (a) Circular. (b) Staggered. (c) Maze.

Compared to the results shown in Figure 11, it can be seen that in circular type the DWA chooses a further way to turn less. However, the performance of ACO-DWA has not changed much. In staggered type, the results of these four algorithms have significant changes. To avoid shaking in a staggered obstacle environment at high speeds, ACO-DWA chooses a detour path without turning. In Figure 11b, for the BSDWA algorithm, in order to achieve the goal with the shortest local path, when the robot speed increases and encounters the staggered obstacle environment, it is more inclined to walk between obstacles, which eventually leads to collision with obstacles. In the maze type, DWA has planned a very strange path, and the distance has increased significantly. The other three paths have different degrees of much longer routes. Among them, ACO-DWA has the shortest path. Overall, as the speed increases, the path planned by the ACO-DWA algorithm is relatively short and more suitable to the human driving logic.

3.2.3 Orchard Real-Time Experiments Based on the Robot ROS 2 System

To verify the effectiveness of this algorithm, a physical experiment was conducted in a mountainous orchard in Gansu, as shown in Figure 2. In this orchard, the plant spacing is 20–30 cm, and the row spacing is 65–80 cm. The altitude ranges from 500 to 1000 m, with a relative height of no more than 200 m, and the slope is relatively gentle. The navigation line was planned by defining the communicable area through the central area. Variations in width between 70 and 80 cm had minimal impact on recognition error within the central area.

In this experiment, the maximum navigation line error is 5.68 cm, the minimum error is 0.32 cm, and the average error is 3.16 cm. Furthermore, in the physical environment, DWA with fixed weights, DWA-A*, BSDWA, and the improved ACO-DWA are each loaded onto the robot ROS2 system, and the path planning performance is shown in Figure 12. In Figure 12, the cluster centers of fruit trees are extracted using the K-means clustering algorithm, and the row size of fruit trees is determined based on the least squares method, indicated by the black line in this figure. The obstacle positions are marked by black dots. It is observed that the improved ACO-DWA algorithm selected a more direct, non-detour path, while the other three algorithms chose a longer, more circuitous route around obstacles. This trajectory closely resembles the path obtained by controlling the robot between rows of fruit trees via the upper computer, demonstrating the high feasibility. Compared with DWA, DWA-A*, and BSDWA, this improved method has the precision of navigation line planning increased by 18% in average.

Details are in the caption following the image
Orchard real-time path planning experiment results.

4 Conclusions

In this article, a wheeled plant protection robot path planning approach in mountainous nonstandard orchards is proposed. The improved ACO-DWA algorithm supported by ROS2 system can improve the operation efficiency, reduce the detour cost outside the obstacle, and improve the driving safety. The maximum navigation line error is 5.68 cm, the minimum error is 0.32 cm, and the average error is 3.16 cm. The navigation accuracy has improved by an average of 14.2%. Through defining the performance function and considering the obstacle expansion radius, updating the dynamic pheromone model by an optimized ACO, and updating the three weight coefficients of the classic DWA evaluation function as the optimization objective, it is ensure that the robot can arrive at the target point accurately safely and efficiently, especially in complex multiobstacle environment.

Through the convergence and global search performance test, the experimental results show that ACO-DWA has a relatively fast convergence speed and quick converges to the global optimum in the early stages of iteration compared with the classic DWA and the other three excellent transformations of DWA. Through three typical path planning performance tests, ACO-DWA has an excellent performance in both path length, number of turns, and computation time. In staggered type, ACO-DWA has a 14.167 m path length, 2 turnings, and 0.78 s computation time. When the robot speed increases because of the integration of ACO, the global search performance and fast convergence of ACO-DWA are improved. The experiment results show that the robot can still reach the target point with both safety and speed and ensure adaptability and accuracy with the environment transformation. Compared to classic DWA, the improved ACO-DWA in this article is better obviously.

Author Contributions

Jing Niu: conceptualization, methodology. Chuanyan Shen: data curation, writing – review and editing. Lipeng Zhang: funding acquisition, formal analysis. Guanghao Gao: software, writing – review and editing. Jiahao Zheng: formal analysis, writing – review and editing.

Acknowledgments

First of all, I would like to give my heartfelt thanks to all the people who have ever helped me in this paper. This article was supported by Innovation Fund for College Teachers in Gansu Province No. 2013A-114, Key R&D Program of Gansu Province No. 23YFFE0001, Tianshui Normal University Industry Support and Guidance Project No. CYZ2023-05, and Tianshui Normal University Innovation and Entrepreneurship Project No. CXCYJG-JGXM202304JD.

    Conflicts of Interest

    The authors declare no conflicts of interest.

    Data Availability Statement

    The data that support the findings of this study are available on request from the corresponding author. The data are not publicly available due to privacy or ethical restrictions.

      The full text of this article hosted at iucr.org is unavailable due to technical difficulties.