Next Article in Journal
Influence of Saline Irrigation and Genotype on Yield, Grain Quality and Physiological Ideotypic Indicators of Bread Wheat in Hot Arid Zones
Previous Article in Journal
Phenological Development and Growth Responses of Industrial Hemp (Cannabis sativa L.) to Sowing Dates and Climatic Conditions in Elvas, Portugal
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Path Planning for a Cartesian Apple Harvesting Robot Using the Improved Grey Wolf Optimizer

1
College of Mechanical and Electronic Engineering, Nanjing Forestry University, Nanjing 210037, China
2
Co-Innovation Center of Efficient Processing and Utilization of Forest Resources, Nanjing Forestry University, Nanjing 210037, China
3
Engineering Training Center, Nanjing Forestry University, Nanjing 210037, China
*
Author to whom correspondence should be addressed.
Agronomy 2026, 16(2), 272; https://doi.org/10.3390/agronomy16020272
Submission received: 23 November 2025 / Revised: 20 December 2025 / Accepted: 19 January 2026 / Published: 22 January 2026
(This article belongs to the Section Precision and Digital Agriculture)

Abstract

As a high-value fruit crop grown worldwide, apples require efficient harvesting solutions to maintain a stable supply. Intelligent harvesting robots represent a promising approach to address labour shortages. This study introduced a Cartesian robot integrated with a continuous-picking end-effector, providing a cost-effective and mechanically simpler alternative to complex articulated arms. The system employed a hand–eye calibration model to enhance positioning accuracy. To overcome the inefficiencies resulting from disordered harvesting sequences and excessive motion trajectories, the harvesting process was treated as a travelling salesman problem (TSP). The conventional fixed-plane return trajectory of Cartesian robots was enhanced using a three-dimensional continuous picking path strategy based on a fixed retraction distance (H). The value of H was determined through mechanical characterization of the apple stem’s brittle fracture, which eliminated redundant horizontal displacements and improved operational efficiency. Furthermore, an improved grey wolf optimizer (IGWO) was proposed for multi-fruit path planning. Simulations demonstrated that the IGWO achieved shorter path lengths compared to conventional algorithms. Laboratory experiments validated that the system successfully achieved vision-based localization and fruit harvesting through optimal path planning, with a fruit picking success rate of 89%. The proposed methodology provides a practical framework for automated continuous harvesting systems.

1. Introduction

Apples are one of the most popular fruits globally [1,2]. In recent years, apple harvesting robots have achieved significant progress in key technologies such as target recognition, precise positioning, and adaptive picking mechanisms [3]. However, harvesting efficiency remains limited by complex orchard conditions and the irregular spatial distribution of fruits. Current fruit-picking robots mainly adopt two structural forms, including articulated arms and Cartesian robots [4]. Compared with jointed robots, Cartesian robots offer higher positioning accuracy and cost efficiency. However, due to their limited dexterity, Cartesian systems typically require structured orchard environments (e.g., V-trellis systems) to be effective. This makes them more suitable for structured picking tasks. Moreover, their limited degrees of freedom require careful consideration of spatial constraints and efficiency optimization in path planning [5,6,7,8].
Robotic harvesting path planning can be divided into local and global planning. Local path planning addresses obstacle avoidance to ensure the manipulator reaches the target fruit safely [9]. Global path planning, on the other hand, focuses on optimizing the picking sequence of multiple fruits. The task is a three-dimensional travelling salesman problem (TSP) [10], intending to minimize total travel distance to improve overall efficiency. Most existing studies concentrate on path planning for articulated robots, where paths are typically replanned after each pick-and-return cycle [11,12]. In contrast, path optimization for Cartesian robotic harvesting has received less attention. When dealing with a large number of fruits distributed unevenly in space, the conventional return-to-fixed-plane strategy may result in redundant motion and reduced efficiency. Therefore, developing an optimal continuous harvesting path for Cartesian robots is essential to overcome the operational efficiency bottleneck [13].
To address these challenges, researchers have explored various optimization algorithms for fruit harvesting path planning, which can be broadly categorized into heuristic methods and deep learning-based approaches [14,15]. Regarding heuristic algorithms, Gao et al. [16] applied an improved particle swarm optimization (PSO) to plan collision-free trajectories for an end-effector, effectively reducing interference with branches during apple picking. Li et al. [17] introduced an adaptive pheromone update mechanism into the ant colony algorithm (ACO) to dynamically determine the picking sequence of citrus, shortening the overall travel path. For continuous picking path planning, Zhang et al. [18] proposed the optimal sequential ant colony optimization (OSACO), which incorporates reward–penalty mechanisms and adaptive pheromone adjustment to enhance global search capability and avoid local convergence. Cao et al. [19] developed an improved multi-objective PSO (GMOPSO) that integrates mutation operators, annealing factors, and feedback mechanisms to maintain population diversity and accelerate convergence. The experiments showed that the GMOPSO-optimized trajectory achieved an average picking time of 25.5 s and a success rate of 96.67%. Zhang et al. [20] used an improved ACO to plan 3D picking paths for safflower harvesting, aiming to minimize time and distance while reducing the number of picking points via secondary optimization.
In deep learning-based methods, Lin et al. [21] formulated tea bud picking sequence planning as a TSP and proposed an improved pointer network. The model utilized self-attention instead of recurrent layers and leveraged reinforcement learning for parameter optimization. Combined with YOLOX-S for detection, the method effectively solved both detection and sequencing problems. Wang et al. [22] integrated model pruning and ODConv into YOLOv5s to optimize yellow peach picking paths, reducing the continuous picking path length to 29.56% of the original while maintaining an 80% success rate. Wang et al. [23] transformed coverage path planning into a TSP and solved it using an improved deep reinforcement learning approach (re-DQN), achieving a 31.56% shorter path in kiwifruit harvesting experiments.
Although ACO, PSO, and similar heuristics have been widely used, they often require manual tuning of multiple parameters, such as pheromone evaporation rate in ACO and inertia weight in PSO. The quality of solutions is sensitive to these settings, which affects robustness in solving TSP-type problems [24,25]. To overcome these limitations, this study introduced the grey wolf optimizer (GWO) for continuous apple picking sequence planning. GWO operates with fewer key parameters, primarily population size and maximum iterations. Its search behaviour is governed by a social hierarchy (α, β, δ wolves) and position updates, which eliminates the need for complex parameter adjustment. Unlike PSO, GWO does not require maintaining both position and velocity vectors, thereby reducing computational overhead. Consequently, GWO has gained broad applicability in optimization tasks.
The specific objectives of this study are as follows: (1) To develop a Cartesian robot with a cantilever-structured manipulator, which provides structural simplicity, high picking efficiency, and continuous operation. The system’s performance is underpinned by a hand–eye calibration process, which is conducted to evaluate the positioning accuracy of the RGB-D camera. (2) To propose a continuous picking strategy that introduces a fixed fruit detachment distance (H). This strategy allows the robot to move directly to the next target after picking, eliminating the need to return to a fixed horizontal plane. The harvesting process is formulated as a three-dimensional TSP and solved using an improved GWO (IGWO).

2. Materials and Methods

2.1. Continuous Apple Picking Strategy

Conventional and continuous apple-picking methods exhibit clear operational differences. The traditional method involves sequential picking and depositing actions, where the robotic manipulator repeatedly alternates between detaching a fruit and transporting it to a collection container. By contrast, the continuous harvesting strategy eliminates the need for intermediate manipulator movements between target fruits and the collection point. This approach operates under the assumption of a collision-free environment during picking, allowing the manipulator to move directly between successive fruit locations and achieve minimal-path trajectory planning under idealized conditions.

2.2. Design of the Cartesian Apple Harvesting Robot

The high cost and complex control of articulated robotic systems restrict their commercial feasibility in agricultural harvesting. This study employed a custom-designed Cartesian robot with a three-degree-of-freedom (3-DOF) structure that provided complete workspace coverage for orchard fruit picking, as shown in Figure 1. The system consisted of a 3-DOF Cartesian manipulator, a continuous harvesting end-effector, and a hand–eye calibration system adapted to the Cartesian configuration. The technical specifications of each subsystem are described in the following sections.

2.2.1. Mechanical Arm Structure and Continuous End-Effector Design

The robotic arm adopted a 3-DOF structure with X-, Y-, and Z-axis motion modules. The robot utilized a high-precision synchronous belt drive system. The three axes were rigidly connected using high-strength aluminum alloy connectors. The entire system was mounted on a movable base platform. The cantilever shafts employed a face-to-face assembly configuration, where the slider group remained statically fixed to the base while the aluminum guide rail performed telescopic motion. This design improved axial load stability. The end-effector comprised an adaptive electric gripper and a flexible damping collection hose, enabling nondestructive fruit picking and simultaneous transport. The compliant soft gripper employed was a three-finger electric model manufactured by Wheeltec Technology (Dongguan, China). It was actuated by a stepper motor and featured a lightweight aluminum alloy frame, with fingertip components constructed from flexible rubber material. This design provided high friction and prevented damage to delicate objects such as apples. The gripper offered a payload capacity of up to 1 kg and a maximum opening range of 110 mm.
The core drive unit employed a high-precision pulse width modulation (PWM) control strategy. An STM32F407 microcontroller (STMicroelectronics N.V., Geneva, Switzerland) generated adjustable PWM signals ranging from 200 Hz to 20 kHz. Tests confirmed a repeatable positioning accuracy of ±0.5 mm for the servo motors. Communication followed the RS232 serial protocol with a baud rate of 115,200 bps in a master-slave configuration. Instruction transmission used ASCII encoding and a parity check with an 8-bit word length. Each axis of the manipulator was equipped with EE-SX674 U-type photoelectric sensors (Omron Corporation, Kyoto, Japan) at both ends, each with a response time of 0.1 ms. A dual-threshold detection algorithm monitored the movement boundaries and ensured the safety of the linear modules. When an object entered the 3 mm effective sensing area, an EXTI external interrupt with a response delay under 50 μs was triggered to disable the driver enable signal.
During continuous picking operations, contact between fruits during transport can cause collision damage. This risk increases in high-density clusters where mechanical damage rates rise significantly. Although gripper-based end-effectors are widely used, rigid contact interfaces may still cause bruising. This study introduced a three-finger flexible end-effector with a bionic contact interface that reduced stress on the fruit skin, maintaining contact pressure below 0.60 MPa. To enable coordinated picking and conveying, a flexible transport channel with a corrugated hose was integrated at the lower end of the actuator. A multi-stage buffer structure attenuated the kinetic energy of falling fruit, controlling the damage rate below 5%. The integrated design provided a technical solution for lossless continuous apple picking.

2.2.2. Robot Hand–Eye Calibration Model

A precision hand–eye calibration framework was developed for the Cartesian robot using an eye-to-hand configuration. A RealSense D435i depth camera (Intel Corporation, Santa Clara, CA, USA) was mounted horizontally 50 cm behind the robot’s X-axis and remained fixed during calibration. The vision system used the YOLOv7 algorithm for real-time apple detection. Based on the robot’s physical parameters and calibration data, a transformation model from the camera frame to the robot base frame was established, as shown in Figure 2. The coordinate transformation matrix between the camera and robot systems was derived through spatial pose resolution, enabling accurate spatial positioning of the robotic end-effector.
To locate objects in the robot base frame and convert camera-recognized coordinates, coordinate transformation methods were applied. A homogeneous transformation matrix commonly represents the positional and attitude relationship between two coordinate systems, as expressed in Equation (1).
T c b = T g i b T m g T c m i
where T c b is the transformation from the camera frame to the robot base frame, which is the target output of the hand–eye calibration process; T g i b is the transformation from the end-effector frame to the robot base frame at its i-th position; T m g is the constant transformation from the calibration board frame to the end-effector frame, defined by the board’s mounting; T c m i is the transformation from the camera frame to the calibration board frame at the i-th robot pose.
For the manipulator at different positions i and j, the above form was transformed for solution via the Tsai–Lenz algorithm. The homogeneous equation AX = XB was solved as shown in Equation (2), with specific definitions given in Equation (3).
( T g j b T 1 g i b ) T c b = T c b ( T m j c T 1 m i c )
A = T g j b T 1 g i b = R A T A 0 1 B = T m j c T 1 m i c = R B T B 0 1 X = T c b = R X T X 0 1
Using the Tsai–Lenz algorithm, the transformation matrix between the camera and robot base frames was obtained by first solving for the rotation (R) and translation components (T). Since the camera’s Y-axis is oriented 180° opposite to the robot’s Y-axis and the robot had no rotational joints, conversion to the robot base frame involves only translation. The transformation matrix [ T x , T y , T z ] T was solved by Equation (4).
x 0 y 0 z 0 = 1 0 0 0 1 0 0 0 1 x c y c z c + T x T y T z
where [ x 0 ,   y 0 ,   z 0 ] T represents the coordinates of the apple in the robot base frame; [ x c ,   y c ,   z c ] T represents the coordinates of the apple in the camera frame; [ T x ,   T y ,   T c ] T is the translation vector.
A checkerboard calibration plate was used for hand–eye calibration. The plate was fixed at the robot’s end, and nine coordinate points were uniformly selected within the workspace. The robot was moved to each target coordinate, and the camera recorded the centre position of the calibration plate. The mean calibration errors along the X, Y, and Z axes were 9.5 mm, 15.4 mm, and 6.3 mm, respectively.

2.3. Improvements of Apple Picking Method Based on Cartesian Motion Mode

2.3.1. Original Picking Method

The conventional harvesting method for Cartesian robots follows a three-phase sequence comprising radial extension, fruit detachment, and full retraction. After detaching a fruit, the manipulator executes a complete return-to-home (RTH) trajectory to deposit the apple, as illustrated in Figure 3. The robotic arm moves along a fixed two-dimensional path through predefined positions, starting from O0 and traversing the sequence O0P0O0O1P1O1…→OnPnOnO0. Specifically, the arm retracts to its initial harvesting position, releases the fruit into a guide chute that directs it into a collection bin, and then repositions to start the next harvesting cycle. When apples are distributed across a wide horizontal area, however, the extended travel distances between targets reduce operational efficiency. The theoretical total path length for this process is given by Equation (5).
S sum 1 = 2 H 10 + L 10 + 2 H 11 + L 11 + + 2 H 1 n + L 1 n = 0 n ( 2 H 1 i + L 1 i )
where H1 represents the return distance in the original method, and L1 denotes the planar displacement between two fruits in the two-dimensional workspace.

2.3.2. Improved Picking Method

This study improved conventional fixed-plane harvesting by introducing a three-dimensional fixed-offset trajectory strategy, as shown in Figure 4. The green trajectory illustrated the continuous apple-picking path. To reduce the risk of collision with foliage during sequential harvesting, the end-effector retracted vertically by a fixed retraction distance H after each fruit was detached. The distance H corresponded to the minimum safe separation distance required for fruit release. The harvested apple was conveyed through a delivery conduit to the collection system. The end-effector then moved forward by the same vertical distance H to align with the next target apple, initiating a new picking cycle. This three-dimensional path planning method shortened the total travel path and improved collision avoidance compared to the conventional planar strategy. The theoretical total path length was expressed by Equation (6).
S sum 2 = 2 H + L 20 + 2 H + L 21 + + 2 H + L 2 n = 0 n ( 2 H + L 2 i )
where H represents the fixed retraction distance in the improved method, and L2 is the three-dimensional displacement between two fruits.
Relative to the original method, the total path length was modified by the term 0 n ( 2 ( H 1 i H ) + ( L 2 i L 1 i ) ) . Under actual picking conditions, H1i was much greater than H, and L1i was generally less than L2i. Theoretically, this led to an overall reduction in picking travel distance.

2.4. Grey Wolf Optimizer

GWO is a swarm intelligence algorithm that models the social hierarchy and collective hunting behaviour of grey wolves [26]. The algorithm organizes the population into a four-level decision-making structure. The alpha wolf (α) directs the overall search, while the beta (β) and delta (δ) wolves assist in refining the search path. The omega (ω) wolves perform localized fine-tuning. This hierarchical structure supports a balance between global exploration and local exploitation in the solution space.
In a D-dimensional search space with a population of N individuals, the position of the i-th grey wolf is denoted as X i = ( X i 1 , X i 2 , X i D ) . The optimization process starts with random population initialization. Three individuals with the best fitness values are assigned as α, β, and δ, representing the best candidate solutions. The position update mechanism uses the locations of α, β, and δ to guide the movement of the remaining wolves toward the global optimum. The hunting behaviour is modelled as follows:
D = C X P ( t ) X ( t )
X ( t + 1 ) = X P ( t ) A D
Equation (7) defines the distance between a grey wolf and the prey. Equation (8) updates the wolf’s position. Here, t is the current iteration, A and C are coefficient vectors, and XP(t) and X(t) represent the prey position and the wolf position, respectively. The vectors A and C are calculated as follows:
A = 2 a r 1 a
C = 2 r 2
a = 2 2 t t max
where a is a convergence factor that decreases linearly from 2 to 0 over the iterations, tmax is the maximum iteration count, and r1, r2 are random vectors in [0, 1].
In path planning, the three best solutions (α, β, δ) identify promising regions in the search space. The remaining wolves update their positions according to the locations of these leaders as follows:
D α = C 1 X α X D β = C 2 X β X D δ = C 3 X δ X
X 1 = X α A 1 D α X 2 = X β A 2 D β X 3 = X δ A 3 D δ
X ( t + 1 ) = X 1 + X 2 + X 3 3
where Dα, Dβ, and Dδ represent the distances from the current wolf to α, β, and δ; Xα, Xβ, and Xδ denote their positions; C1, C2, and C3 are random vectors; and X is the current wolf’s position.
For the shortest path sequence X = { x 1 , x 2 , , x N } , the Euclidean distance between consecutive nodes is used:
D i j = ( x j x i ) 2 + ( y j y i ) 2 + ( z j z i ) 2
The fitness function is defined as the reciprocal of the total path length:
f i t n e s s = 1 i = 1 N 1 D ( x i , x i + 1 ) + D ( x N , x 1 )

2.5. Improvements of the Grey Wolf Optimizer

TSP is an NP-hard combinatorial optimization problem that requires efficient algorithms to balance global exploration and local exploitation. In the standard GWO, parameter vectors A and C help regulate this balance. However, the algorithm suffers from limitations such as limited population diversity, slow convergence in later stages, and a tendency to fall into local optima. This study introduced several improvements to address the above shortcomings.

2.5.1. Logistic-Tent Chaotic Initialization Strategy

A hybrid logistic-tent chaotic mapping method was proposed to mitigate population clustering resulting from random initialization in the conventional GWO for TSP. The dynamic equation (Equation (17)) combined the ergodicity of the logistic map and the uniform distribution of the tent map to produce chaotic sequences with high diversity [27].
x n + 1 = r x n ( 1 x n ) + ( 4 r ) 2 x n x n < 0.5 r x n ( 1 x n ) + ( 4 r ) ( 1 x n ) 2 x n 0.5

2.5.2. Improved Mutation Strategy

To handle the discrete nature of GWO position updates, an order crossover strategy was used to simulate the encircling behaviour. The strategy selected the top three paths Xα, Xβ, and Xδ, randomly retained a sub-path segment from the α wolf, and filled the remaining positions with unvisited cities in the order they first appear in the β and δ wolves’ paths. To enhance the algorithm’s ability to escape local optima, a swap-based mutation was applied to the α wolf. The mutation probability η(t) decayed globally as the number of iterations t increased according to the following equation:
η ( t ) = η max e λ t / T max
where ηmax is the initial mutation probability, λ is the decay coefficient, and Tmax is the maximum number of iterations. This decay schedule promotes exploration in the early stages and facilitates fine-tuning exploitation in the later stages.
During the local search process, two positions i and j were randomly selected, and Xα[i] and Xα[j] were exchanged with probability η(t). A greedy selection strategy was then applied, whereby the new individual replaced the current one only upon demonstrating superior fitness (Equation (19)), thus ensuring continuous tracking of the global optimum. In summary, IGWO was a hybrid algorithm that integrated permutation-specific search operators from the genetic algorithm (GA) and a chaotic initialization strategy into the social hierarchy and collaborative framework of the GWO.
x n e w ( t ) = x f ( x ) < f ( x b e s t ) x b e s t f ( x ) f ( x b e s t )

2.5.3. Solution Procedure

The computational flow of the IGWO algorithm is illustrated in Figure 5. A detailed computational procedure of the improved IGWO algorithm is summarized below:
(1)
The fruit coordinate data were input. Key parameters were determined through preliminary tuning experiments to balance computational efficiency and solution quality.
(2)
The initial population was generated using the logistic-tent chaotic map according to Equation (17). For each grey wolf individual, a chaotic sequence of length N (number of fruits) was generated, and the initial path was obtained by sorting the indices based on the ascending order of the chaotic sequence { x 1 ,   x 2 ,   , x N } .
(3)
The initial fitness was calculated as the reciprocal of the total path length based on Equation (16). The initial α, β, and δ wolves were identified.
(4)
During the iteration phase, if the current iteration t was less than Tmax, a position update was performed. For each individual in the population, a new candidate path was generated using the order crossover strategy based on the current α, β, and δ wolf paths. A greedy selection was applied at the individual level, where the original individual was replaced by the new candidate path if the latter had better fitness.
(5)
The fitness values of all individuals were calculated and updated. The α, β, and δ wolves were reselected.
(6)
The improved mutation strategy was conducted. The current mutation probability η(t) was computed using Equation (18). Two positions in the newly selected α wolf path were randomly swapped with probability η(t), and the fitness was compared. If the new path was better, Xα was updated with the new solution according to Equation (19).
(7)
The termination conditions were checked. The loop was exited if Tmax was reached or the solution showed no improvement. Otherwise, t was incremented by one, and the process continued.
(8)
The globally optimal path and its length were returned.

3. Results

3.1. Measurement of Fixed Retraction Distance H

To determine a safe separation distance H for apple harvesting, experiments were conducted to measure the failure thresholds at the apple stem junction and the woody branch layer. As shown in Figure 6, a controlled tensile force was applied using an Edberg force gauge to apples at the stem junction, and the peak fracture force was recorded during detachment. A robotic end-effector prototype was then used to simulate harvesting motions at controlled retraction speeds of 200 mm/s and 300 mm/s. The displacement required for successful fruit separation was measured to define the safety parameter H. Approximately 40 apples were tested for each diameter–speed category. All experimental data are summarized in Table 1.
Analysis of the experimental data showed that the stem fracture load increased from 24.7 ± 2.4 N to 37.8 ± 4.2 N as the fruit diameter increased from 75.2 ± 1.3 mm to 85.6 ± 2.7 mm, while the fracture distance ranged from approximately 54 mm to 69 mm. A higher separation speed of 300 mm/s was positively correlated with a cleaner brittle fracture. The mechanical tests indicated that a retraction of 70 mm was sufficient to achieve stem fracture. However, to ensure collision-free movement through the canopy and account for potential obstacles (e.g., branches and leaves) during the manipulator’s transit, a larger safety margin was necessary. Based on this, a fixed retraction distance (H) of 100 mm was established as sufficient for safe operation and adopted for all subsequent path planning simulations.

3.2. Performance Evaluation of the IGWO

Simulation experiments were performed using field-measured apple position data to assess the performance of the IGWO for apple harvesting path planning. Based on prior mechanical characterization of apple stems, a fixed safe retraction distance H of 100 mm was applied. This distance enabled the manipulator to approach a target fruit, execute the picking motion within a cluster, and retract safely without interfering with adjacent branches, leaves, or other fruits during continuous operation. All simulations were conducted in MATLAB R2021b on a Windows 10 (64-bit) platform. Evaluations included instances with 20, 30, and 50 apples. A comparative analysis was carried out among the GA, PSO, the standard GWO, and the proposed IGWO, using the total Euclidean path length as the performance metric. Each algorithm was executed independently 20 times per instance, and the best, worst, and mean path lengths were recorded. All experiments were performed using a fixed seed value of 3 to initialize the random number generator, thus ensuring the reproducibility of the results. The common parameters across all metaheuristic algorithms were a population size of 200 and a maximum of 100 iterations as the termination criterion. For the GA, the crossover probability was set to 0.9 and the mutation probability to 0.1. The selection mechanism was tournament selection, with the tournament size for each tournament being dynamically calculated based on the population size and crossover probability. The crossover operator employed multi-point crossover, and the mutation operator used multi-point mutation. Both were applied within a steady-state replacement strategy, where offspring replaced their parents only if they had better fitness. For PSO, the inertia weight was set to 0.9, while both cognitive and social coefficients were set to 1.2. The conventional velocity update rule was applied, and particle positions were kept within bounds through boundary handling at the predefined lower and upper limits. The continuous position vector was mapped to a tour sequence, and a dedicated objective function was used to evaluate the sequence fitness. The standard GWO used a population size of 200 and a convergence factor that decreased linearly from 2 to 0 over the iterations. The proposed IGWO incorporated chaotic initialization with a parameter value of 0.5, adopted a segmented linear update strategy for the convergence factor, and then applied a greedy selection process to retain superior solutions.
Figure 7 compares the fitness convergence curves of the four algorithms across the three problem scales, while Table 2 summarizes the statistical results of path optimization. The GA produced the highest path lengths in three test cases, indicating a tendency to converge to local optima. The PSO found better paths than the GA, but its solutions were longer than those of the GWO across all instances. The standard GWO generated shorter paths than both GA and PSO. The proposed IGWO achieved the shortest path lengths (best, average, and worst) and the smallest performance fluctuation among all algorithms for every fruit quantity. Although the proposed IGWO required the longest total runtime among the compared algorithms, it consistently delivered the highest-quality solutions across all problem scales. Convergence analysis revealed that for the 20- and 30-fruit cases, the IGWO typically reached its best solution within approximately 20 iterations. This implied that employing an early-stop criterion could have reduced its runtime to about one-fifth of the recorded value.
Figure 8 illustrates the continuous picking paths generated by each algorithm for the 30-apple case. The GA produced paths with noticeable redundancy and discontinuities, further confirming its susceptibility to local optima. The PSO reduced path redundancy relative to the GA, though it still exhibited minor back-and-forth motions. In contrast, the standard GWO produced more regular and coherent paths with fewer intersections, reflecting its improved global search ability. The proposed IGWO generated the smoothest and most compact paths, with minimal overlapping segments, confirming its effectiveness in achieving high-quality solutions.
Quantitative results verified that the standard GWO consistently outperformed both the GA and PSO across all instance sizes. The IGWO further improved performance compared to the GWO, achieving total path length reductions of 1.2%, 4.4%, and 10.8% for the 20-, 30-, and 50-apple instances, respectively. These results demonstrated that the IGWO not only produced shorter and smoother paths but also maintained robust performance, especially in more complex and large-scale scenarios.

3.3. Laboratory Validation of Apple Harvesting Performance

To assess the structural performance of the mechanical system and the effectiveness of the harvesting sequence optimization algorithm, a laboratory-scale apple harvesting robot prototype was built. The experimental setup included biomimetic apple models and an artificial tree structure. Standardized apple analogues, each measuring 80 ± 5 mm in diameter, were fixed at nodal points using adjustable clamps. These analogues were arranged randomly at heights between 0.8 and 1.5 m. The overall layout of the simulated harvesting environment is shown in Figure 9.
The simulated tree structure was placed within the working range of a D435i depth camera for target identification. A YOLOv7-based detection algorithm performed real-time visual processing, allowing simultaneous fruit recognition and spatial localization. As shown in Figure 10a, detection results were marked with red bounding boxes and identifiers, while real-time positional feedback was displayed as green numerical indicators. After successful detection, the spatial coordinates of identified apples were sent to a MATLAB-based IGWO module to simulate a multi-target harvesting sequence, as illustrated in Figure 10b. The optimized picking sequence was visualized in the recognition interface, with right-aligned numbers indicating the execution order. The total trajectory length for this sequence was approximately 251.2 cm.
Using spatial detection data from the depth camera, the 3D Cartesian coordinates of target apples were obtained and converted to the robot manipulator base frame using the hand–eye calibration model. The control system then executed the harvesting sequence along the trajectories optimized by the IGWO. The procedure followed a fixed sequence in which the end-effector approached the target apple, opened the gripper to enclose the fruit, and then closed to secure it. After detaching and releasing an apple, the manipulator proceeded directly to the next target’s approach position as defined by the optimized path, eliminating the need to return to an initial state. This continuous workflow, shown in Figure 11, reduced the total travel distance and enhanced harvesting efficiency.
The harvesting experiment involved nine identified apples and demonstrated the practical performance of the proposed system. The end-effector successfully harvested eight targets, achieving a success rate of 89%. A quantitative summary is presented in Table 3. The one unsuccessful case was located at a spatial position that was one of the farthest and highest in the workspace. This outcome suggested that positioning errors might have played a role, possibly due to error amplification near the system’s operational limits or minor calibration residuals. The high success rate across the remaining trials supported the robustness of the integrated vision and path planning system.

4. Discussion

This study proposed a systematic engineering approach to improve the operational efficiency of a 3-DOF Cartesian robotic harvester through integrated mechanical design and algorithmic optimization. By formulating the harvesting sequence as a TSP solved with the IGWO and implementing a continuous picking strategy, a viable approach was provided for automating structured orchard operations. Experimental validation using a physical prototype demonstrated an 89% picking success rate under controlled conditions, confirming the fundamental feasibility of the system.
However, several limitations must be acknowledged, which highlight the gap between controlled validation and deployment in natural orchard environments. The algorithm operated under an explicit collision-free assumption during transit. This assumption allowed global path length minimization but did not account for the inherent complexity of natural canopies with obstructing branches and foliage. The assumption is most valid in highly structured orchards (e.g., V-trellis or hedgerow systems). Such environments minimize canopy randomness and align with the robot’s linear motion constraints, thereby enhancing recognition reliability and reducing collision probability during picking and movement. The performance findings are based on the three specific datasets used in this study. Broader generalizations would require further testing on more diverse and larger benchmark sets. In future work, a rigorous experimental analysis will be conducted following the statistical guidelines for comparing multiple algorithms across datasets [28].
Beyond environmental simplifications, key mechanical and perceptual challenges remain. The fixed retraction distance, determined from stem biomechanics, represents a static solution to a dynamic problem. In dense canopies, it may not ensure a collision-free path to subsequent fruits. Future systems should incorporate dynamic retraction strategies, adjusting the distance in real time based on local obstacles. Additionally, the mechanical design, particularly the long-span Y-axis module with belt drive, introduces vibration at high accelerations. This may compromise end-effector positioning accuracy and impair vision system performance through motion blur or target displacement. Practical implementation would require mechanical refinements (stiffer rails, tensioning systems, supplementary linear guides), vibration-damping components, and advanced motion control with vibration suppression and trajectory smoothing. The interaction between mechanical vibration and vision is further complicated by branch movement during picking, which may demand frequent vision recalibration and reduce throughput. Thus, robust operation requires vision algorithms that are either inherently tolerant of minor vibrations or capable of rapid online recalibration, preserving the cycle-time benefits of optimized path planning.
Regarding overall value, the proposed system may not achieve the shortest single-pick time or highest precision compared to articulated robotic arms. Its advantage lies in system-level cost-effectiveness for large-scale structured orchards, owing to lower manufacturing, maintenance, and control complexity. This work seeks to maximize the efficiency of this cost-effective platform through intelligent path planning and continuous operation, minimizing non-productive travel time to boost overall throughput. The trade-off accepts slightly lower peak performance in certain metrics to achieve a more favourable balance between total cost and operational productivity, which is a decisive factor for commercial adoption.
Finally, experimental results, including failures near workspace extremities and quantified positional errors, illustrate the effects of cantilever deflection and cumulative mechanical compliance. While acceptable for larger fruits, these errors may challenge the reliable picking of smaller or densely clustered fruits. These limitations outline a roadmap for future research, which should transition from idealized models to adaptive, perception-driven operation. Key directions include real-time sensor-based obstacle avoidance for dynamic local replanning, context-aware retraction strategies, vibration-resilient vision systems, rigorous field trials on living trees, and mechanical stiffening to improve precision across the workspace.

5. Conclusions

This paper presented a Cartesian apple harvesting robot integrated with a continuous-picking end-effector. The harvesting process was formulated as a travelling salesman problem to optimize the fruit picking sequence through shortest-path planning. To overcome the limitation of conventional Cartesian systems that require the end-effector to return to a fixed collection plane, a new harvesting strategy using a fixed retraction distance H was introduced. This parameter was determined based on the mechanical characterization of the apple stem’s brittle fracture. The proposed method was evaluated through simulations with the IGWO, tested on distributed apple models containing 20, 30, and 50 fruits. Compared with the standard GWO, the IGWO achieved reductions in total path length by 1.2%, 4.4%, and 10.8% for the 20-, 30-, and 50-apple instances, respectively, demonstrating enhanced effectiveness in multi-scale scenarios. A laboratory prototype using an eye-to-hand configuration achieved accurate positioning, enabling the detection and localization of apples on artificial tree models within the RGB-D camera’s field of view. The system computed three-dimensional coordinates, applied the IGWO to determine the optimal picking sequence, and executed automated harvesting. The picking success rate reached 89%, with a notable improvement in operational efficiency. The proposed Cartesian robot with a fixed retraction strategy demonstrated improved efficiency and path smoothness in continuous harvesting. Future work will validate the proposed method in real-world orchard environments.

Author Contributions

Conceptualization, D.W. and H.J.; methodology, D.W. and C.L.; software, X.W.; validation, D.W., H.J. and Q.C.; formal analysis, C.L.; investigation, L.Z.; resources, X.J.; data curation, X.W. and Q.C.; writing—original draft preparation, D.W.; writing—review and editing, H.J. and H.Z.; visualization, X.W.; supervision, X.J. and H.Z.; project administration, L.Z.; funding acquisition, D.W. and X.J. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Natural Science Foundation of Jiangsu Province, grant number BK20240682, and the Natural Science Foundation of the Jiangsu Higher Education Institutions of China, grant number 24KJB210014.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be acquired at https://github.com/JCDW123/Path-planning-for-a-Cartesian-apple-harvesting-robot-using-the-improved-grey-wolf-optimizer (accessed on 20 December 2025).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Huang, Y.; Lu, R.; Chen, K. Detection of Internal Defect of Apples by a Multichannel Vis/NIR Spectroscopic System. Postharvest Biol. Technol. 2020, 161, 111065. [Google Scholar] [CrossRef]
  2. Wang, F.; Zhao, C.; Yang, H.; Jiang, H.; Li, L.; Yang, G. Non-Destructive and in-Site Estimation of Apple Quality and Maturity by Hyperspectral Imaging. Comput. Electron. Agric. 2022, 195, 106843. [Google Scholar] [CrossRef]
  3. Lv, J.; Xu, H.; Xu, L.; Zou, L.; Rong, H.; Yang, B.; Niu, L.; Ma, Z. Recognition of Fruits and Vegetables with Similar-Color Background in Natural Environment: A Survey. J. Field Robot. 2022, 39, 888–904. [Google Scholar] [CrossRef]
  4. Yuan, F.; Wang, J.; Ding, W.; Mei, S.; Fang, C.; Chen, S. A Lightweight and Rapid Dragon Fruit Detection Method for Harvesting Robots. Agriculture 2025, 15, 1120. [Google Scholar] [CrossRef]
  5. Wang, Z.; Xun, Y.; Wang, Y.; Yang, Q. Review of Smart Robots for Fruit and Vegetable Picking in Agriculture. Int. J. Agric. Biol. Eng. 2022, 15, 33–54. [Google Scholar] [CrossRef]
  6. Hua, W.; Zhang, W.; Zhang, Z.; Liu, X.; Huang, M.; Igathinathane, C.; Vougioukas, S.; Saha, C.K.; Mustafa, N.S.; Salama, D.S.; et al. Vacuum Suction End-Effector Development for Robotic Harvesters of Fresh Market Apples. Biosyst. Eng. 2025, 249, 28–40. [Google Scholar] [CrossRef]
  7. Zhang, Z.; Igathinathane, C.; Li, J.; Cen, H.; Lu, Y.; Flores, P. Technology Progress in Mechanical Harvest of Fresh Market Apples. Comput. Electron. Agric. 2020, 175, 105606. [Google Scholar] [CrossRef]
  8. Zeng, Y.; Xue, L.; Tang, B.; Ying, C.; Liu, M.; Li, J.; Liao, K.; Ruan, C. Design and Experiment of Cantilevered Lotus Seedpod Picking Device. J. Field Robot. 2025, 42, 1550–1563. [Google Scholar] [CrossRef]
  9. Yan, B.; Quan, J.; Yan, W. Three-Dimensional Obstacle Avoidance Harvesting Path Planning Method for Apple-Harvesting Robot Based on Improved Ant Colony Algorithm. Agriculture 2024, 14, 1336. [Google Scholar] [CrossRef]
  10. Moradi, N.; Mafakheri, F.; Wang, C. Set Covering Routing Problems: A Review and Classification Scheme. Comput. Ind. Eng. 2024, 198, 110730. [Google Scholar] [CrossRef]
  11. Lin, G.; Zhu, L.; Li, J.; Zou, X.; Tang, Y. Collision-Free Path Planning for a Guava-Harvesting Robot Based on Recurrent Deep Reinforcement Learning. Comput. Electron. Agric. 2021, 188, 106350. [Google Scholar] [CrossRef]
  12. Cao, X.; Zou, X.; Jia, C.; Chen, M.; Zeng, Z. RRT-Based Path Planning for an Intelligent Litchi-Picking Manipulator. Comput. Electron. Agric. 2019, 156, 105–118. [Google Scholar] [CrossRef]
  13. Xiao, X.; Wang, Y.; Jiang, Y. Review of Research Advances in Fruit and Vegetable Harvesting Robots. J. Electr. Eng. Technol. 2024, 19, 773–789. [Google Scholar] [CrossRef]
  14. Reda, M.; Onsy, A.; Elhosseini, M.A.; Haikal, A.Y.; Badawy, M. A Discrete Variant of Cuckoo Search Algorithm to Solve the Travelling Salesman Problem and Path Planning for Autonomous Trolley inside Warehouse. Knowl.-Based Syst. 2022, 252, 109290. [Google Scholar] [CrossRef]
  15. Hu, X.; Pan, Z.; Lv, S. Picking Path Optimization of Agaricus Bisporus Picking Robot. Math. Probl. Eng. 2019, 2019, 8973153. [Google Scholar] [CrossRef]
  16. Gao, R.; Zhou, Q.; Cao, S.; Jiang, Q. Apple-Picking Robot Picking Path Planning Algorithm Based on Improved PSO. Electronics 2023, 12, 1832. [Google Scholar] [CrossRef]
  17. Li, C.; Ma, W.; Liu, F.; Fang, B.; Lu, H.; Sun, Y. Recognition of Citrus Fruit and Planning the Robotic Picking Sequence in Orchards. Signal Image Video Process. 2023, 17, 4425–4434. [Google Scholar] [CrossRef]
  18. Zhang, C.; Wang, H.; Fu, L.H.; Pei, Y.H.; Lan, C.Y.; Hou, H.Y.; Song, H. Three-Dimensional Continuous Picking Path Planning Based on Ant Colony Optimization Algorithm. PLoS ONE 2023, 18, e0282334. [Google Scholar] [CrossRef]
  19. Cao, X.; Yan, H.; Huang, Z.; Ai, S.; Xu, Y.; Fu, R.; Zou, X. A Multi-Objective Particle Swarm Optimization for Trajectory Planning of Fruit Picking Manipulator. Agronomy 2021, 11, 2286. [Google Scholar] [CrossRef]
  20. Zhang, H.; Ge, Y.; Sun, C.; Zeng, H.; Liu, N. Picking Path Planning Method of Dual Rollers Type Safflower Picking Robot Based on Improved Ant Colony Algorithm. Processes 2022, 10, 1213. [Google Scholar] [CrossRef]
  21. Lin, G.; Xiong, J.; Zhao, R.; Li, X.; Hu, H.; Zhu, L.; Zhang, R. Efficient Detection and Picking Sequence Planning of Tea Buds in a High-Density Canopy. Comput. Electron. Agric. 2023, 213, 108213. [Google Scholar] [CrossRef]
  22. Wang, Y.; Wu, H.; Zhu, Z.; Ye, Y.; Qian, M. Continuous Picking of Yellow Peaches with Recognition and Collision-Free Path. Comput. Electron. Agric. 2023, 214, 108273. [Google Scholar] [CrossRef]
  23. Wang, Y.; He, Z.; Cao, D.; Ma, L.; Li, K.; Jia, L.; Cui, Y. Coverage Path Planning for Kiwifruit Picking Robots Based on Deep Reinforcement Learning. Comput. Electron. Agric. 2023, 205, 107593. [Google Scholar] [CrossRef]
  24. Lu, Y.; Li, K.; Lin, R.; Wang, Y.; Han, H. Intelligent Layout Method of Ship Pipelines Based on an Improved Grey Wolf Optimization Algorithm. J. Mar. Sci. Eng. 2024, 12, 1971. [Google Scholar] [CrossRef]
  25. Zhang, W.; Zhang, S.; Wu, F.; Wang, Y. Path Planning of UAV Based on Improved Adaptive Grey Wolf Optimization Algorithm. IEEE Access 2021, 9, 89400–89411. [Google Scholar] [CrossRef]
  26. Mirjalili, S.; Mirjalili, S.M.; Lewis, A. Grey Wolf Optimizer. Adv. Eng. Softw. 2014, 69, 46–61. [Google Scholar] [CrossRef]
  27. Khan, M.F.; Ahmed, A.; Saleem, K. A Novel Design of Cryptographic SP-Network Based on Gold Sequences and Chaotic Logistic Tent System. IEEE Access 2019, 7, 84980–84991. [Google Scholar] [CrossRef]
  28. Demšar, J. Statistical Comparisons of Classifiers over Multiple Data Sets. J. Mach. Learn. Res. 2006, 7, 1–30. [Google Scholar]
Figure 1. Cartesian apple harvesting robot prototype.
Figure 1. Cartesian apple harvesting robot prototype.
Agronomy 16 00272 g001
Figure 2. Robot hand–eye calibration model.
Figure 2. Robot hand–eye calibration model.
Agronomy 16 00272 g002
Figure 3. Fixed-plane two-dimensional picking trajectory. (a) Path motion between two target fruits. (b) Overall harvesting sequence with integrated collection area.
Figure 3. Fixed-plane two-dimensional picking trajectory. (a) Path motion between two target fruits. (b) Overall harvesting sequence with integrated collection area.
Agronomy 16 00272 g003
Figure 4. Fixed-distance three-dimensional picking trajectory. (a) A picking path with a vertical offset between two fruits. (b) Continuous harvesting sequence based on fixed retraction.
Figure 4. Fixed-distance three-dimensional picking trajectory. (a) A picking path with a vertical offset between two fruits. (b) Continuous harvesting sequence based on fixed retraction.
Agronomy 16 00272 g004
Figure 5. Flowchart of the improved grey wolf optimizer.
Figure 5. Flowchart of the improved grey wolf optimizer.
Agronomy 16 00272 g005
Figure 6. Experimental measurement of the fixed retraction distance H. (a) Stem tensile force measurement. (b) Stem failure test under vertical retraction.
Figure 6. Experimental measurement of the fixed retraction distance H. (a) Stem tensile force measurement. (b) Stem failure test under vertical retraction.
Agronomy 16 00272 g006
Figure 7. Fitness convergence curves of the genetic algorithm (GA), particle swarm optimization (PSO), grey wolf optimizer (GWO), and improved grey wolf optimizer (IGWO) for harvesting scenarios with (a) 20, (b) 30, and (c) 50 apples.
Figure 7. Fitness convergence curves of the genetic algorithm (GA), particle swarm optimization (PSO), grey wolf optimizer (GWO), and improved grey wolf optimizer (IGWO) for harvesting scenarios with (a) 20, (b) 30, and (c) 50 apples.
Agronomy 16 00272 g007
Figure 8. Simulation results of continuous picking paths for 30 apples using different algorithms: (a) genetic algorithm (GA); (b) particle swarm optimization (PSO); (c) grey wolf optimizer (GWO); (d) improved grey wolf optimizer (IGWO).
Figure 8. Simulation results of continuous picking paths for 30 apples using different algorithms: (a) genetic algorithm (GA); (b) particle swarm optimization (PSO); (c) grey wolf optimizer (GWO); (d) improved grey wolf optimizer (IGWO).
Agronomy 16 00272 g008
Figure 9. The overall layout of the simulated harvesting environment.
Figure 9. The overall layout of the simulated harvesting environment.
Agronomy 16 00272 g009
Figure 10. Recognition and path planning interface. (a) Visual detection results. (b) Optimized harvesting sequence simulation.
Figure 10. Recognition and path planning interface. (a) Visual detection results. (b) Optimized harvesting sequence simulation.
Agronomy 16 00272 g010
Figure 11. Key stages of the robotic apple harvesting process, including (a) approach, (b) grasp, (c) detach, and (d) release and collect.
Figure 11. Key stages of the robotic apple harvesting process, including (a) approach, (b) grasp, (c) detach, and (d) release and collect.
Agronomy 16 00272 g011
Table 1. Tensile fracture mechanical properties of apple stem samples.
Table 1. Tensile fracture mechanical properties of apple stem samples.
Apple Diameter (mm)Test Speed (mm/s)Fracture Distance (mm)Fracture Force (N)Remarks
75.2 ± 1.320056.7 ± 4.524.7 ± 2.4brittle fracture
30053.8 ± 3.126.7 ± 3.1brittle fracture
80.7 ± 1.220060.4 ± 4.831.5 ± 1.5brittle fracture
30058.5 ± 3.632.1 ± 3.0brittle fracture
85.6 ± 2.720068.7 ± 4.536.3 ± 1.3ductile fracture
30067.9 ± 3.737.8 ± 4.2brittle fracture
Table 2. Statistical results of planned picking path lengths for different apple quantities using multiple algorithms.
Table 2. Statistical results of planned picking path lengths for different apple quantities using multiple algorithms.
Number of FruitsAlgorithm *Best Path LengthWorst Path LengthMean Path LengthRuntime (s)
20GA720.2739.3733.6 ± 5.83.4
PSO700.7715.2707.9 ± 4.13.2
GWO667.8690.5685.3 ± 6.22.7
IGWO659.6667.8664.1 ± 2.515.2
30GA942.6973.8954.9 ± 8.94.9
PSO945.3965.6951.8 ± 6.34.7
GWO912.0938.4920.5 ± 7.14.0
IGWO871.9878.4874.8 ± 3.823.0
50GA1498.01558.31533.6 ± 17.27.8
PSO1312.21413.41384.7 ± 28.97.6
GWO1264.31289.61274.6 ± 7.57.1
IGWO1128.11157.31137.4 ± 8.538.6
* GA, genetic algorithm; PSO, particle swarm optimization; GWO, grey wolf optimizer; IGWO, improved grey wolf optimizer.
Table 3. Coordinate mapping and results of the picking experiment.
Table 3. Coordinate mapping and results of the picking experiment.
Serial NumberImage Coordinate (mm)Base Frame Coordinates (mm)Result
XcYcZcXbYbZb
1123−28811661131093656Success
2−62−2471444−721052930Failure
329125137418681865Success
46451411038633665528Success
5625−501016616857501Success
6634−1541107624959590Success
7450−26010974381063583Success
8341−801001332883489Success
9481111011469795501Success
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, D.; Jin, H.; Lu, C.; Wu, X.; Chen, Q.; Zhou, L.; Jiang, X.; Zhou, H. Path Planning for a Cartesian Apple Harvesting Robot Using the Improved Grey Wolf Optimizer. Agronomy 2026, 16, 272. https://doi.org/10.3390/agronomy16020272

AMA Style

Wang D, Jin H, Lu C, Wu X, Chen Q, Zhou L, Jiang X, Zhou H. Path Planning for a Cartesian Apple Harvesting Robot Using the Improved Grey Wolf Optimizer. Agronomy. 2026; 16(2):272. https://doi.org/10.3390/agronomy16020272

Chicago/Turabian Style

Wang, Dachen, Huiping Jin, Chun Lu, Xuanbo Wu, Qing Chen, Lei Zhou, Xuesong Jiang, and Hongping Zhou. 2026. "Path Planning for a Cartesian Apple Harvesting Robot Using the Improved Grey Wolf Optimizer" Agronomy 16, no. 2: 272. https://doi.org/10.3390/agronomy16020272

APA Style

Wang, D., Jin, H., Lu, C., Wu, X., Chen, Q., Zhou, L., Jiang, X., & Zhou, H. (2026). Path Planning for a Cartesian Apple Harvesting Robot Using the Improved Grey Wolf Optimizer. Agronomy, 16(2), 272. https://doi.org/10.3390/agronomy16020272

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop