Next Article in Journal
Modeling, Comparative Investigation and Compensation for Hysteresis Response of Actuator Using Nonlinear Transformation
Previous Article in Journal
Reduced-Order Nonlinear Dynamic Analysis and Lyapunov-Based Chaos Characterization of SMA Hybrid Composite Actuator Beams Under Thermo-Aeroelastic Excitation
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Canopy-Adaptive TAD-IRRT* Algorithm for 3D Path Planning of 6-DOF Apple-Harvesting Robots in Dense Orchards

1
College of Automation, Jiangsu University of Science and Technology, Zhenjiang 212100, China
2
Jiangsu Ruidong Intelligent Technology Co., Ltd., Zhenjiang 212000, China
*
Author to whom correspondence should be addressed.
Actuators 2026, 15(6), 336; https://doi.org/10.3390/act15060336 (registering DOI)
Submission received: 20 April 2026 / Revised: 27 May 2026 / Accepted: 10 June 2026 / Published: 13 June 2026
(This article belongs to the Section Actuators for Robotics)

Abstract

This study proposes a canopy-adaptive TAD-IRRT* (target-biased sampling, artificial potential field, and dynamic step-size informed rapidly-exploring random tree star) algorithm to solve the collision-free 3D path-planning problem for a 6-DOF apple-harvesting robotic arm. To improve computational speed and search directionality, the method integrates target-biased sampling and a distance-regulated artificial potential field (APF) into the Informed-RRT* framework. Furthermore, an obstacle-distance-based dynamic step-size mechanism is introduced to optimize spatial exploration. The generated routes undergo greedy path pruning and cubic B-spline smoothing to ensure kinematic executability. The simulation results in complicated ROS-based scenarios demonstrate that the TAD-IRRT* algorithm achieves a 100% planning success rate, reducing the average computational time and joint-space path length by approximately 60.1% and 15.6%, respectively, compared to the standard Informed-RRT*. Kinematic analysis via Fourier curve fitting ( R 2 = 0.9849 ) confirms continuous angular velocity and acceleration without high-frequency chattering. Physical prototype experiments in the dense-obstacle scenarios show that the proposed method increases the path execution success rate by 36.7% and reduces the average execution time by 41% compared to the standard Informed-RRT* algorithm. The proposed approach effectively balances high-quality path generation with low computational overhead, providing a reliable and safe solution that significantly reduces mechanical wear.

1. Introduction

As one of the world’s major fruits, apples are widely cultivated globally [1]. With the continuous advancement of technology, harvesting robots have gradually become the optimal choice for mechanized apple harvesting in the agricultural sector [2,3,4]. Among these, the six-degree-of-freedom (6-DOF) robotic arm serves as the core mechanism for executing harvesting, obstacle avoidance, and posture adjustment. Its motion efficiency and operational safety highly depend on high-quality three-dimensional (3D) spatial path-planning algorithms. However, due to the dense branches and leaves, the irregular distribution of obstacles, and the complicated distribution of target points within orchards, the path planning of the robotic arm faces significant challenges such as high-dimensional nonlinearity, strong constraints, and real-time processing requirements [2]. Therefore, generating collision-free, safe, and smooth executable trajectories for robotic arms in complicated scenarios has become a crucial scientific problem in the research of intelligent harvesting robots.
At present, trajectory-planning strategies for robotic arms primarily fall into three categories: traditional approaches [5], graph-based search techniques [6], and sampling-based methods [7]. Among them, the artificial potential field (APF) method, proposed by Khatib, is representative of traditional methods [8]. This method is computationally efficient, but it is highly susceptible to falling into local minima or experiencing target unreachability when obstacles exist near the target point [9]. To address such issues, numerous scholars have conducted corresponding improvement studies. For instance, Zhuang et al. [10] proposed an obstacle avoidance path-planning method integrating APF and the A* algorithm, which improved obstacle avoidance efficiency and path smoothness by incorporating the IRRT (Improved Rapidly Exploring Random Tree) algorithm for path replanning and optimizing the potential field function. Wang et al. [11] proposed the DAPF-RRT path-planning method, combining dynamic step sizes with APF, which effectively resolved the randomness problem of node expansion and improved planning accuracy by using attractive and repulsive functions to constrain the node growth direction.
To overcome the inherent tendency of conventional techniques to become trapped in local optima, researchers have increasingly adopted globally optimal graph-based search strategies, including the A*, Dijkstra, and D* algorithms. These frameworks are highly valued for their adaptable and predictable trajectory generation [12]. For instance, Gu et al. [13] engineered an upgraded Dijkstra approach for mobile robot navigation, leveraging ultrasonic sensing to enable real-time path updates. Similarly, Ji et al. [14] implemented a modified Dijkstra strategy to establish preliminary routes for apple-picking robots, which were subsequently refined through an advanced ant colony optimization. Furthermore, a customized hybrid D* Lite framework introduced by Jiang et al. [15] for orchard harvesters notably augmented both the stability of global routes and the success rates of collision avoidance. Nevertheless, as the dimensionality of the map expands or the orchard environment becomes increasingly cluttered, the computational overhead of these graph-search techniques grows exponentially. Consequently, they struggle to satisfy the strict real-time execution constraints required for the online control of robotic manipulators.
In the motion planning of multi-DOF robotic arms in high-dimensional spaces, sampling-based methods are widely adopted [16,17]. Among them, sampling-based path-planning methods represented by Rapidly-exploring Random Trees (RRTs) [18,19] have become a research hotspot due to their simple structural formulation and ability to rapidly generate feasible paths. These methods can obtain feasible solutions relatively quickly in low-dimensional spaces. However, when confronting the high-dimensional complicated configuration space of a robotic arm, the search space grows exponentially, leading to a sharp decline in planning efficiency [20]. Pure random sampling not only struggles to balance search efficiency and path quality, but its high randomness also increases search blindness, often resulting in tortuous paths that deviate from the optimal solution [21,22,23]. Consequently, how to balance search efficiency and optimality while maintaining the probabilistic completeness of RRT has emerged as the focal point of current research.
In recent years, scholars have proposed various improvement strategies addressing the sampling efficiency and path optimization problems of the RRT algorithm, primarily focusing on two aspects: heuristic spatial restriction and goal-oriented expansion. In terms of spatial restriction, Gammell et al. [24] proposed the Informed-RRT* algorithm, which significantly accelerates convergence speed by constructing an admissible ellipsoidal sampling region after finding an initial path. The EP-RRT* proposed by Ding et al. [25] further improves search efficiency by utilizing extended region heuristic sampling. Regarding goal-oriented expansion, numerous studies have introduced multi-tree growth and adaptive mechanisms. Li et al. [26] and Chen et al. [27], respectively, proposed improved RRT-Connect algorithms based on the simultaneous expansion of multiple random trees, significantly reducing the number of iterations by incorporating a goal-biasing strategy. The BPFPS-RRT algorithm proposed by Liu et al. [28] introduced a high-probability goal bias coupled with a dynamic step-size exploration strategy, demonstrating excellent performance in search time.
Nevertheless, although the aforementioned optimization algorithms have achieved significant success in conventional industrial or structured scenarios, substantial limitations remain when they are directly applied to orchard harvesting environments. The unstructured environment of an orchard is characterized by a highly uneven distribution of obstacles (such as branches, leaves, and fruits) and severely restricted local spaces. Existing ellipsoidal sampling domains or global goal-biasing strategies are highly prone to generating numerous invalid collision detections when encountering dense overlapping branches due to the lack of fine guidance for local obstacle avoidance [29]. Concurrently, fixed or simplistic step-size adjustment mechanisms struggle to switch flexibly between open rows and crowded canopies, causing the algorithm to easily stall during expansion within narrow passages [30].
To overcome these limitations, we introduce the Canopy-Adaptive TAD-IRRT* (Target-biased, APF-guided, Dynamic step-size Informed-RRT*) algorithm, a multi-faceted 3D trajectory-planning framework tailored for 6-DOF apple-harvesting manipulators. Building upon the foundational Informed-RRT* architecture, our approach fuses a target-oriented sampling heuristic with a refined artificial potential field (APF) to effectively guide the growth of the random tree while bypassing local minima. Furthermore, the integration of an obstacle-aware dynamic step-size controller optimizes the trade-off between rapid exploration in open spaces and precise maneuvering in cluttered zones. To yield executable motions, the raw routes undergo greedy pruning followed by cubic B-spline smoothing, ultimately delivering seamless trajectories fully compliant with the robot’s physical constraints.
The remainder of this paper is organized as follows: Section 2 details the materials and methods, including the kinematic modeling, collision detection strategy, and the optimization components of the Canopy-Adaptive TAD-IRRT* algorithm. Section 3 presents the 2D and 3D simulation results, simulation obstacle avoidance path-planning experiment, joint space continuity analysis and physical obstacle avoidance verification experiments. Section 4 discusses the algorithm’s performance advantages and outlines directions for future research. Finally, Section 5 concludes this study.

2. Materials and Methods

2.1. Kinematic Model of the Robotic Arm

Figure 1 depicts the physical prototype of the apple-harvesting robot utilized in this study. The integrated system consists of a mobile chassis, a robotic arm, a force-controlled gripper, a vision sensor (ZED2i stereo camera (Stereolabs, San Diego, CA, USA)), a communication router, a human–machine interface, and a control cabinet. Serving as the primary execution mechanism for harvesting tasks, the manipulator features six rotational degrees of freedom (6-DOF).
To mathematically describe the spatial pose of the end-effector relative to the base frame and to establish a theoretical foundation for subsequent 3D obstacle-avoidance path planning, the standard Denavit–Hartenberg (D-H) convention was employed to formulate the kinematics model. The nominal D-H parameters of the robotic arm are summarized in Table 1.
As detailed in Table 1, i denotes the link index; a i represents the link length, defined as the common normal distance between two adjacent joint axes; α i indicates the link twist angle; d i represents the joint offset along the joint axis; and θ i is the joint angle variable.

2.2. Collision Detection of Robotic Arm

Collision detection serves as a fundamental safety constraint in the path-planning process of apple-harvesting robotic arms, ensuring that the manipulator avoids spatial interference with orchard elements (e.g., trunks, branches, and fruits) and prevents self-collision during movement. This process provides robust safety boundaries for the planning algorithm, guaranteeing that the generated motion trajectories are strictly collision-free [31]. To achieve an optimal balance between real-time computational efficiency and the precision required for unstructured orchard environments, this study adopts a geometric bounding volume strategy to model both the robotic structure and environmental obstacles [32]. To accurately represent the irregular and curved nature of actual tree branches in dense orchards, a piecewise cylindrical approximation strategy is employed in this model. Specifically, a continuous curved branch is discretized into a series of short, interconnected straight cylindrical segments. Furthermore, the radius of these bounding cylinders is deliberately inflated with a predefined safety margin. This margin ensures that any local curvatures, minor bends, and irregular protrusions of natural branches are strictly enveloped within the cylindrical volumes. Consequently, this approach transforms the complicated curved obstacle detection into mathematically efficient multi-cylinder distance calculations, thereby ensuring the absolute collision-free execution of the manipulator.As illustrated in Figure 2, discrete objects such as target apples are abstracted as sphere models, while the manipulator links and elongated branches are simplified into capsules (sphero-cylinders). This modeling approach maintains essential spatial constraints while significantly streamlining the mathematical evaluation of distance-based collision criteria.
Based on these geometric abstractions, the detection task is transformed into evaluating the proximity between capsules and spheres or between pairs of capsules. Following the methodology introduced in literature [33], physical interferences are evaluated by transforming physical boundaries into a set of distance-based nonlinear inequalities. For a manipulator link modeled as a capsule with axis A 1 A 2 and radius r A , and a spherical obstacle with center P and radius r S , the relative spatial relationship is defined by the projection parameter t of the sphere center onto the link axis:
t = ( P A 1 ) · ( A 2 A 1 ) A 2 A 1 2
The absolute shortest spatial distance, d m i n , between the obstacle center P and the link axis segment A 1 A 2 is subsequently determined by the following piecewise relationship:
d m i n = P A 1 , t < 0 ( P A 1 ) × ( A 2 A 1 ) A 2 A 1 , t [ 0 , 1 ] P A 2 , t > 1
Figure 3 explicitly illustrates the shortest spatial distance d m i n and the projection parameter t.
A collision state is registered if the calculated minimum distance falls below the combined safety threshold of their respective radii:
d m i n r A + r S
Furthermore, the assessment of potential collisions between the manipulator and capsule-shaped branches depends on the relative spatial orientation of their corresponding axes. This is categorized into two geometric scenarios:
(1) When the axes are parallel: The coordinate system is rotated to project both axes orthogonally onto a common perpendicular plane. The interference threshold is then determined by the planar projection distance ( u 1 ) and the axial spacing offset ( u 2 ):
D m i n = u 1 2 + u 2 2 r A + r C
(2) When the axes are non-parallel (skew or intersecting): An auxiliary reference plane is constructed such that it contains the branch axis C 1 C 2 while remaining parallel to the manipulator axis A 1 A 2 . The collision criterion is established as follows:
D m i n = u 3 2 + u 4 2 r A + r C
where u 3 represents the normal distance from the link axis A 1 A 2 to the auxiliary plane, and u 4 denotes the minimum planar separation between the branch axis C 1 C 2 and the projection of the manipulator axis on said plane.

2.3. Standard Informed-RRT* Algorithm

The standard RRT* algorithm typically performs uniform sampling across the entire free space, which often leads to the generation of numerous redundant branches and high computational costs when searching for a globally optimal path. To mitigate this inefficiency and accelerate convergence, Gammell et al. [24] proposed the Informed-RRT* algorithm. This framework initially utilizes standard RRT* exploration to identify a feasible guiding path. Once an initial solution is found, the algorithm constructs a heuristic elliptical sampling region (or hyperellipsoid in higher dimensions) defined by the start point, the goal point, and the current path length. This strategic restriction effectively concentrates the search within a promising subset of the state space, thereby significantly accelerating the convergence toward the optimal path.
The mathematical formulation of this elliptical boundary is expressed as in Equation (6):
x 2 a 2 + y 2 b 2 = 1
where a and b represent the lengths of the semi-major and semi-minor axes, respectively. The foci of the ellipse are located at ( ± c , 0 ) , satisfying the geometric relationship a 2 = b 2 + c 2 . In the context of robotic path planning, the semi-major axis a is defined as half of the current optimal path length ( c b e s t / 2 ), while the focal distance c corresponds to half of the theoretical minimum distance between the start and goal positions ( c m i n / 2 ). Consequently, the semi-minor axis is computed as b = c b e s t 2 c m i n 2 2 . The conceptual geometric modeling of this elliptical region is illustrated in Figure 4.
During each subsequent iteration, if a superior path with a shorter length is identified, the algorithm updates the current optimal path length c b e s t and reconfigures the sampling ellipse. As c b e s t decreases, the major axis of the ellipse contracts, causing the sampling space to shrink accordingly. This dynamic adaptation enables the random tree to converge more rapidly toward the theoretical optimal solution, thereby significantly enhancing planning efficiency.

2.4. Optimization Methods for Informed-RRT*

2.4.1. Target-Biased Sampling Strategy

In apple-harvesting operations, the harvesting targets are typically distributed as discrete fruits within the canopy, with clear spatial locations but surrounded by complicated obstacles. Although the traditional Informed-RRT* algorithm narrows the search scope through elliptical constraints, it may still generate a large number of invalid expansions in non-target areas when lacking clear directional guidance. By introducing a target-biased strategy, this study aims to guide the search process toward higher-quality solution spaces, reduce the search space and execution time, and accelerate the convergence to the optimal solution. Furthermore, this strategy assists the algorithm in escaping local dead ends and avoiding the problem of becoming trapped in local optima, thereby enhancing the robustness and reliability of the path-planning process.
First, a target bias probability p ( 0 p 1 ) is established. During each sampling iteration, a uniformly distributed random variable r [ 0 , 1 ] is generated. The sampling mode is determined by comparing r and p: if r < p , the algorithm executes target-directed sampling, directly setting the target point x g o a l as the current sampling point x s a m p l e to force the random tree to extend toward the endpoint. If r p , the algorithm executes heuristic candidate sampling, generating multiple random candidate points within the current sampling regoin and selecting the one closest to the target point as x s a m p l e .
The mathematical expressions for generating the sampling points are presented in Equations (7) and (8), and the underlying principle of the target bias strategy and tree expansion is illustrated in Figure 5.
x s a m p l e = x g o a l , r < p x r a n d o m _ s a m p l e , r p
x r a n d o m _ s a m p l e = arg min x { x s a m p l e 1 , x s a m p l e 2 , , x s a m p l e n } x x g o a l
Figure 5 intuitively demonstrates the algorithm’s decision-making process for generating the sampling point x s a m p l e and the subsequent tree node expansion. Rather than relying solely on uniform, blind random sampling, the algorithm combines probabilistic guidance with heuristic selection. The right side of Figure 5 illustrates the heuristic candidate sampling process when r p : the algorithm generates multiple candidate nodes in the operational space (e.g., x s a m p l e 1 , x s a m p l e 2 , x s a m p l e 3 ) and calculates their Euclidean distances to the target point x g o a l , selecting the node with the shortest distance as the final target for the current sampling iteration. The left side of Figure 5 illustrates the tree expansion process, where the random tree extends from the nearest node x n e a r toward the chosen sampling direction to generate a new node x n e w . This mechanism preserves the algorithm’s exploration capability in unknown spaces while simultaneously enhancing the directionality of growth toward the target through the optimal selection of candidate points.

2.4.2. Guided Sampling Strategy Based on Improved Artificial Potential Field

In highly constrained 3D orchard canopy environments, the random tree of the standard Informed-RRT* algorithm tends to blindly expand into infeasible regions, significantly reducing planning efficiency. To mitigate this issue within the Informed-RRT* framework, this study integrates an improved artificial potential field (APF) as a local guidance mechanism. However, traditional APF models often encounter the “Goal Non-Reachability with Obstacle Near” (GNRON) problem. In dense orchards, target fruits are typically surrounded closely by branches; as the end-effector approaches the target sampling point, the local repulsive force often becomes overwhelmingly dominant, preventing the robotic arm from converging to the final picking posture.
To fundamentally resolve this limitation and ensure high-precision kinematic convergence of the end-effector, this study introduces a nonlinear distance regulation factor, k g , based on an exponential function, into the repulsive field model. Its mathematical definition is expressed in Equation (9):
k g = 1 e α ρ ( x near , x sample )
where α is a positive tuning parameter ( α > 0 ), and ρ ( x near , x sample ) represents the Euclidean distance between the current search tree node x near and the sampling point x sample . When the robotic arm operates at a location far from the target (i.e., ρ is large), the exponential term approaches 0, ensuring k g 1 . This allows the APF to exert the complete repulsive force for safe obstacle avoidance. Conversely, as the end-effector converges toward the sampling point ( ρ 0 ), the exponential term approaches 1, forcing the regulation factor k g to decrease to zero smoothly and nonlinearly.
By employing this enhanced APF approach, the overall potential field U t o t a l governing the manipulator is formulated by superimposing the localized attraction U a t t and the cumulative repulsion U r e p , i generated by N o b s surrounding obstacles:
U t o t a l = U a t t + i = 1 N o b s U r e p , i
Consequently, the net spatial force F t o t a l guiding the robotic arm’s configuration is computed via Equation (11):
F t o t a l = F a t t + i = 1 N o b s F r e p , i
The structure of the distance-regulated repulsive field is defined in Equation (12):
U r e p = 1 2 k r e p k g 1 ρ ( x n e a r , x o b s ) 1 ρ 0 2 , 0 ρ ( x n e a r , x o b s ) ρ 0 0 , ρ ( x n e a r , x o b s ) > ρ 0
where k r e p signifies the repulsion gain coefficient, ρ ( x n e a r , x o b s ) represents the spatial clearance to the collision source, and ρ 0 establishes the maximum effective boundary of the repulsive force. As shown in Equation (12), after integrating this factor into the traditional repulsive potential field, the resultant repulsive force naturally drops to zero at the target position. This nonlinear mathematical architecture not only continuously eliminates repulsive interference near the target, but also effectively prevents the abrupt force jumps and joint trajectory oscillations that might be induced by simple linear adjustments. Consequently, it theoretically guarantees the force equilibrium and robust execution of the 6-DOF robotic arm within the target region.
By computing the negative gradient of U r e p , the resultant repulsive vector F r e p is derived. As delineated in Equations (13)–(15), this vector splits into two distinct components: a primary outward push ( F r e p 1 ) steering the arm away from physical barriers, and a supplementary inward pull ( F r e p 2 ) dragging the node toward the intended sampling coordinate:  
F r e p = U r e p = F r e p 1 + F r e p 2 , 0 ρ ( x n e a r , x o b s ) ρ 0 0 , ρ ( x n e a r , x o b s ) > ρ 0
F r e p 1 = k r e p k g 1 ρ ( x n e a r , x o b s ) 1 ρ 0 1 ρ 2 ( x n e a r , x o b s ) ρ ( x n e a r , x o b s )
F r e p 2 = 1 2 k r e p 1 ρ ( x n e a r , x o b s ) 1 ρ 0 2 k g
Geometrically, the direction of F r e p 1 aligns along the vector pointing from x o b s to x n e a r , whereas the negative gradient logic within F r e p 2 ensures its vector persistently points from x n e a r straight to x s a m p l e .
The formulations for the attractive potential function U a t t and the resultant attractive force F a t t (derived via its negative gradient) are detailed as follows:
U a t t = 1 2 k a t t ρ 2 ( x n e a r , x s a m p l e )
F a t t = U a t t = k a t t ( x s a m p l e x n e a r )
where k a t t denotes the attractive gain coefficient. The conceptual geometric modeling of this improved APF-guided sampling process is illustrated in Figure 6. By introducing k g , which encapsulates the distance information relative to the sampling point, the factor approaches zero as the tree node continuously converges toward x s a m p l e . This mechanism guarantees that both the attractive and repulsive forces decay to zero synchronously. Consequently, it effectively overcomes the inherent GNRON deficiency of the traditional APF method and maximizes the avoidance of local minima traps by synergizing with the probabilistic exploration characteristics of the Informed-RRT* algorithm.

2.4.3. Dynamic Expansion Step Size Mechanism

In orchard environments, the distribution of obstacles (such as branches and leaves) exhibits strong non-uniformity, characterized by high density in local regions and relative openness in inter-row spaces or the canopy periphery. This dramatic variation in spatial scale makes it difficult for the fixed expansion step size in the traditional Informed-RRT* algorithm to balance the search requirements of different regions. Specifically, an overly small fixed step size drastically retards the growth of the search tree in open areas, thereby severely degrading the global exploration efficiency of the algorithm. Conversely, an excessively large step size renders the algorithm highly prone to collisions with obstacles within dense canopies, generating a multitude of invalid samples and significantly compromising the system’s traversal performance in narrow spaces.
To resolve this spatial adaptability conflict caused by the fixed step size, inspired by the step-size calculation method proposed in literature [34], this paper introduces a dynamic step-size strategy based on obstacle–distance perception. This strategy establishes a non-linear mapping relationship, and its calculation is formulated as in Equation (18):
λ d = ( ζ e A · D o b s 0.8 ) · λ
where the default initial expansion length is denoted by λ ; λ d represents the dynamically adjusted expansion step size; ζ is the regulation coefficient controlling the baseline step amplitude; A is the positive coefficient adjusting the decay rate of the exponential function; and D o b s denotes the shortest spatial distance between the nearest node of the current search tree and the surrounding obstacles. By dynamically adjusting the step size, this strategy not only assists the random tree in escaping obstacle-dense regions but also enhances the overall smoothness of the path.
Based on this exponential mapping model, when a node is situated in an open area far from obstacles (i.e., D o b s is large), the exponential term tends to amplify, and the algorithm adaptively uses a larger step size λ d for expansion, thereby maximizing search efficiency and accelerating the convergence rate. Conversely, when the node approaches dense branches (i.e., D o b s converges toward a minimum value), the exponential term decays rapidly, forcing the expansion step size λ d to shrink continuously and smoothly. Through this dynamic step-size regulation mechanism of “fine-tuning near obstacles and accelerating in open spaces,” it not only compels the manipulator to execute high-resolution, safe collision-avoidance movements in hazardous areas, substantially improving the escape rate of the random tree in dense obstacle regions, but also effectively suppresses trajectory oscillations induced by fixed large step sizes, inherently enhancing the overall smoothness and execution safety of the path.
To prevent this localized expansion stagnation, we engineered a bounded, piecewise adaptive mechanism. This upgraded strategy introduces a perception threshold D s alongside a hard operational lower bound λ m i n , comprehensively formulated in Equation (19):
s t e p s i z e = λ , D o b s > D s λ d , D o b s D s and λ d λ m i n λ m i n , D o b s D s and λ d < λ m i n
The geometric interpretation of this bounded expansion strategy is depicted in Figure 7. When the spatial clearance D o b s exceeds the safety threshold D s , the environment is deemed sufficiently open, prompting the algorithm to execute maximum-stride explorations using the default λ . Conversely, once the arm breaches the obstacle perception zone ( D o b s D s ), the dynamic scaling factor λ d is activated, proportionally dampening the step size to delicately maneuver through narrow branch gaps. Crucially, if this decayed value drops below the functional limit λ m i n , the algorithm overrides the continuous decay and enforces λ m i n as the absolute minimum stride. This safeguard ensures continuous, albeit cautious, mobility even in the most severely constricted environments.
Ultimately, synthesizing the heuristic target-biasing, the enhanced APF directional guidance, and the bounded dynamic step size yields the final node generation protocol. For the current expanding node x n e a r , the exact spatial coordinate of the newly generated node x n e w is calculated via Equation (20):
x n e w = x n e a r + s t e p s i z e · n
where n represents the normalized unit vector dictating the optimal growth trajectory. This vector is directly extracted from the localized APF resultant force F t o t a l , mathematically defined in Equation (21):
n = F t o t a l ( x n e a r , x s a m p l e ) F t o t a l ( x n e a r , x s a m p l e )

2.4.4. Path Post-Processing and Trajectory Optimization Strategy

Raw spatial trajectories synthesized by the aforementioned sampling phase typically consist of disjointed linear segments, inducing undesirable sharp corners and unnecessary joint wear for the robotic arm. To refine these geometric zigzags into an efficient, kinematically executable trajectory, we propose a two-stage post-processing framework: a greedy line-of-sight (LOS) pruning mechanism followed by cubic B-spline relaxation.
The core logic of the redundant node elimination is driven by a forward-scanning spatial inspection, structured as follows:
(1) Initialize the pruned trajectory array, P a t h n e w , with the spatial starting point x i n i t , designating it as the active anchor point x c u r :
P a t h n e w = { x i n i t }
x c u r = x i n i t
(2) From the active anchor x c u r , sequentially project a virtual LOS vector to subsequent waypoints in the unoptimized sequence P a t h o l d . If the linear interpolation between x c u r and a candidate node is strictly collision-free, the inspection continues to advance to the next consecutive node.
(3) Once spatial interference is detected between x c u r and a specific distant node x s t o p , the waypoint immediately preceding the collision point (denoted as x l a s t ) is verified as the furthest reachable safe node. This node is then appended to the optimized array and becomes the new anchor:
P a t h n e w P a t h n e w { x l a s t }
x c u r = x l a s t
(4) This forward-scanning loop persists until a clear LOS is established between the current anchor and the global destination x g o a l . The final step appends x g o a l to finalize the simplified route:
P a t h n e w = { x i n i t , , x g o a l }
The geometric mechanics of this greedy pruning are visualized in Figure 8. The original trajectory (black sequence) is evaluated via virtual LOS rays (red dashed lines). Initiating at x i n i t , direct connections to nodes x 1 and x 2 are safe, but the ray to x 4 intersects obstacle 1. Consequently, the boundary node x 3 is retained as a permanent waypoint. Resuming from x 3 , the rays safely bypass x 4 and x 5 , but a collision occurs at x 7 due to obstacle 2. Hence, x 6 is registered. Finally, an unobstructed path connects x 6 directly to x g o a l . The newly established minimal-node trajectory (red solid line) reduces to:
P a t h n e w = { x i n i t , x 3 , x 6 , x g o a l }
While greedy pruning effectively removes macroscopic detours, the residual trajectory retains abrupt angular transitions at the remaining waypoints (e.g., x 3 and x 6 ). To guarantee C 2 continuity for the 6-DOF manipulator’s joints, a cubic B-spline function is mapped over the pruned vertices. The parametric curve C ( u ) is expressed mathematically as follows:
C ( u ) = i = 0 n N i , 3 ( u ) · P i , u [ 0 , 1 ]
where P i denotes the set of spatial control points corresponding to the elements in P a t h n e w , and N i , 3 ( u ) represents the third-degree B-spline basis function regulating the curve’s local support. Figure 9 showcases the resulting smooth curvature.
Synthesizing all the aforementioned optimization modules, the holistic architectural flowchart of the proposed TAD-IRRT* algorithm pipeline is summarized in Figure 10.
This flowchart illustrates the proposed target-biased, APF-enhanced, and dynamic step-size integrated Informed-RRT* (TAD-IRRT*) path-planning algorithm tailored for an apple-harvesting robotic manipulator. Initialized with the start configuration x start , target destination x goal , and environmental obstacle models, the algorithm performs the spatial path search by iteratively expanding a random tree. Specifically, a target-biased heuristic sampling strategy is employed to determine optimal sample points, while an improved artificial potential field (APF) method calculates the guiding force vector. Concurrently, a dynamic step-size mechanism regulated by the obstacle distance is introduced to generate the new candidate node x new . Once verified through collision detection, valid nodes undergo the standard rewiring process, and the informed-ellipse sampling domain is adaptively updated to enhance path optimization efficiency. Upon discovering an initial feasible path, a greedy pruning criterion is executed to eliminate redundant nodes, followed by cubic B-spline smoothing to generate a continuous, executable, and high-quality trajectory that drives the manipulator to accomplish the apple-harvesting task. If the maximum iteration limit is reached without identifying a valid path, planning terminates as a failure.

3. Results

3.1. Simulation Results of the TAD-IRRT* Algorithm

To verify the effectiveness of the TAD-IRRT* algorithm, 2D and 3D simulation environments with dimensions of 500 × 500 cm and 500 × 500 × 500 cm were constructed in MATLAB 2023a, respectively. The simulation results, which compare the path-searching performance of the RRT, RRT*, standard Informed-RRT*, and TAD-IRRT* algorithms in both 2D and 3D spaces, are illustrated in Figure 11 and Figure 12. In the 2D configuration (Figure 11), the starting and target points are defined at coordinates (1, 490) and (490, 1), with black rectangles and circles representing obstacles. Similarly, the 3D environment (Figure 12) initializes the starting point at (1, 1, 1) and the target at (490, 490, 490), where spheres denote obstacles. In these figures, the blue solid lines indicate the final trajectories planned by the respective algorithms.
As illustrated in Figure 11 and Figure 12, in both 2D and 3D environments, the RRT algorithm exhibits distinct characteristics of global random expansion; the extensive and unstructured gray search trees spread throughout the free space, leading to numerous invalid detours in the generated paths. The RRT* algorithm improves the overall path quality to a certain extent, but the dense distribution of gray branches indicates that it still generates a large number of redundant, invalid sampling branches in the vicinity of obstacles. The standard Informed-RRT* algorithm effectively constrains the diffusion range of the sampling tree through an elliptical boundary, which reduces the overall path length; however, due to the lack of directional guidance during its internal expansion, unnecessary local path deviations still occur in regions with unevenly distributed obstacles. In contrast, under the guidance of the target bias and the improved artificial potential field (APF) method, the gray search branches of the TAD-IRRT* algorithm are highly compressed and concentrated within the effective obstacle-avoidance channels, significantly eliminating invalid expansions. Simultaneously, the blue solid line of TAD-IRRT* algorithm in the figures intuitively demonstrate that, after path post-processing, this algorithm generates smoother and more direct collision-free trajectories in both 2D and 3D environments. The number of path turning points is greatly reduced, which better satisfies the actual kinematic and dynamic requirements of the 6-DOF apple-harvesting robotic arm in complicated orchard environments.
To mitigate the influence of inherent algorithmic randomness on the generated paths, every method was independently tested 30 times, with an upper limit of 1500 iterations per run. The mean success rate is calculated as the frequency of successfully navigating from the initial state to the target destination across these 30 attempts. Detailed quantitative outcomes are summarized in Table 2.
As shown in Table 2, in the 2D environment, the average path length of the TAD-IRRT* algorithm is 7.08 m, which is approximately 16.3%, 5.2%, and 5.1% shorter than that of RRT, RRT*, and standard Informed-RRT*, respectively. In the 3D environment, its average path length is 8.51 m, representing reductions of approximately 20.8%, 7.1%, and 8.0% compared to the aforementioned three algorithms, respectively. Although the overall path lengths for all algorithms increase as the spatial dimensionality expands from 2D to 3D, the TAD-IRRT* algorithm maintains the shortest path length in both environments, indicating its strong adaptability to spatial dimensionality changes.
Regarding planning time, similar trends are observed in both 2D and 3D environments: RRT requires less planning time but yields limited path quality due to the lack of heuristic guidance; RRT* experiences a surge in sampling nodes and significantly prolonged computation time owing to its global blind search and rewiring mechanism; the standard Informed-RRT* requires relatively more planning time because of the calculation of the elliptical sampling domain. In comparison, the average planning times of the TAD-IRRT* in 2D and 3D environments are 0.46 s and 0.28 s, respectively, both of which are lower than those of the standard Informed-RRT*. It is worth noting that in this experiment, the average planning time of the TAD-IRRT* algorithm in the 3D environment is lower than that in the 2D environment. This phenomenon indicates that when facing obstacle layouts in a 2D plane that easily form local minima, the proposed algorithm can fully utilize the increased degrees of freedom in 3D space. Combined with the improved APF guidance and dynamic step size mechanism, it leverages the height dimension (Z-axis) to bypass obstacles, effectively mitigating invalid sampling and iteration stagnation in constrained, lower-dimensional areas.
Based on the comprehensive 2D and 3D experimental results, it can be concluded that the TAD-IRRT* algorithm demonstrates consistent superiority in key performance metrics, such as path length and computation time, across different spatial dimensions corresponding to orchard operations. Under conditions of rising dimensionality and dense obstacles, the proposed algorithm can still efficiently generate stable, high-quality collision-free paths, providing a reliable foundation for subsequent robotic arm path-planning experiments in complicated orchard harvesting scenarios.

3.2. Simulation Obstacle Avoidance Path-Planning Experiment

To evaluate the obstacle avoidance performance of the algorithm in realistic unstructured orchard environments, a complicated harvesting scenario accurately replicating the spatial constraints of an actual orchard was constructed in the RViz visual simulation platform and MoveIt motion planning framework under ROS (Robot Operating System). The scenario focuses on simulating the main trunk and multi-layered crossing branches of fruit trees, which are characterized by irregular distributions and overlapping occlusions. Such a highly constrained motion space imposes stringent requirements on the computational efficiency and heuristic directional guidance of the planning algorithm. In this simulation, the initial joint angles of the robotic arm were configured as [ 1.36 , 1.88 , 0.04 , 0.76 , 1.31 , 1.05 ] radians, and the target joint angles were set to [ 0.43 , 1.88 , 0.13 , 0.64 , 0.49 , 1.28 ] radians. Figure 13 shows the initial position of the robotic arm in the harvesting scenario.
Under the same initial conditions, this study compared the planning effects of four algorithms: RRT, RRT*, standard Informed-RRT*, and the proposed TAD-IRRT*. To ensure the comparability of the experimental results and meet the real-time requirements of actual agricultural harvesting, a maximum time constraint (5 s) was set for a single planning attempt in the path-planning experiment. When the time limit is reached, if the algorithm fails to generate a feasible path, it is forced to terminate and judged as a failure. The intuitive trajectory performance of the simulation results is shown in Figure 14.
As illustrated in Figure 14, due to its global random sampling characteristic, the standard RRT algorithm generates a highly tortuous and rigid path, characterized by numerous inefficient detours, backtracks, and irregular sharp angles. The RRT* algorithm exhibits noticeable improvement over RRT; its overall trajectory is more logical, and non-target-directed explorations are significantly reduced. However, local segments of the path still display distinct sharp bends, indicating insufficient smoothness. By introducing an elliptical sampling heuristic, the standard Informed-RRT* algorithm successfully restricts the search space, effectively bounding the path between the start and goal configurations to produce a more compact trajectory than RRT*. Nevertheless, when navigating through densely obstructed regions, local detours persist, leading to trajectory redundancy and extraneous folds. In stark contrast, empowered by target biasing, improved artificial potential field (APF) guidance, and a dynamic step-size mechanism, the proposed Canopy-Adaptive TAD-IRRT* algorithm generates the shortest path among the four algorithms. It achieves the lowest path curvature—yielding the highest visual smoothness—and demonstrates the capability to proactively and cleanly circumvent fine branches and foliage, ultimately presenting an optimal geometric morphology.
An evaluation of the four algorithms in challenging scenarios demonstrates that the TAD-IRRT* method substantially outperforms the alternatives regarding both trajectory length and computational speed. To ensure a robust quantitative assessment, each approach underwent 30 distinct motion planning trials within this complicated environment. Here, the success rate denotes the frequency with which a planner successfully navigates from the origin to the destination under a strict 5 s limit across these iterations. The corresponding statistical outcomes are detailed in Table 3.
As can be seen from Table 3, the average joint space path length of the TAD-IRRT* algorithm is only 5.58 rad, which is about 15.6% lower than that of the standard Informed-RRT* and 43.4% lower than that of the traditional RRT. The significant reduction in the joint space path length directly reflects the reduction in invalid detours and redundant pose switches of the robotic arm in the complicated 3D space, which is mainly attributed to the deep simplification of the trajectory by the greedy pruning strategy and the effective guidance of the search direction by the APF.
In terms of planning time and success rate, the experimental data reveals a highly typical calculation bottleneck phenomenon in complicated restricted spaces: since standard RRT does not require node rewiring optimization, it can quickly find a sub-optimal path through random walks within 5 s, thus achieving a 100% success rate. However, to optimize path quality, RRT* and standard Informed-RRT* frequently perform nearest-neighbor searches and collision detection in the dense fruit tree point cloud/mesh environment, leading to a surge in computational load, with average times reaching 5.01 s and 3.36 s, respectively. This massive computational overhead frequently triggers the 5 s timeout mechanism, causing their planning success rates to drop to 90% and 70%, respectively.
Addressing this pain point, the TAD-IRRT* demonstrates an overwhelming advantage. Its average planning time is only 1.34 s, which is significantly shortened by about 60.1% compared to the standard Informed-RRT*, and the success rate is firmly stabilized at 100%. This fully proves that the dynamic step size mechanism (utilizing larger expansion steps in obstacle-free regions and finer resolution near obstacles) and the potential field guidance strategy introduced in this paper effectively eliminate the massive invalid collision detection calculations caused by blind sampling in traditional algorithms. When facing high-difficulty, high-density orchard obstacle avoidance tasks, the TAD-IRRT* algorithm exhibits extremely strong environmental adaptability and robustness.

3.3. Continuity Analysis of Joint Space Trajectories

Based on the simulation results in Section 3.1 and Section 3.2, the proposed TAD-IRRT* algorithm demonstrates superior performance across all evaluated spatial planning metrics. However, deploying the algorithm in the physical workspace of the manipulator necessitates strict operational safety and stability, particularly during continuous motion execution. To verify that the TAD-IRRT* algorithm can ensure the stable operation of the harvesting manipulator, real-time kinematic monitoring was conducted on the obstacle-avoidance trajectory generated within the complicated scenario from Section 3.2. In the MoveIt and RViz co-simulation environment, the motion state of the manipulator was continuously published to the joint_states topic. A custom ROS node was developed to subscribe to this topic and record the temporal angular displacements of the six joints, yielding the position-time curves plotted in Figure 15a.
To rigorously extract the underlying kinematic characteristics from the recorded data, a Fourier curve-fitting method was employed to model the mathematical relationship between joint displacement and time. Figure 15b illustrates the fitted curves for each joint. The position-time fitting functions for the six joints are shown in Equations (29)–(34).
p o s 1 ( t ) = 0.1318 0.6668 cos ( 0.3026 t ) 0.5415 sin ( 0.3026 t ) 0.3332 cos ( 0.6052 t ) 0.1574 sin ( 0.6052 t ) 0.2260 cos ( 0.9078 t ) 0.0141 sin ( 0.9078 t )
p o s 2 ( t ) = 0.1010 1.2173 cos ( 0.3957 t ) 1.4320 sin ( 0.3957 t ) 0.4327 cos ( 0.7914 t ) + 0.0194 sin ( 0.7914 t ) 0.1209 cos ( 1.1871 t ) + 0.1381 sin ( 1.1871 t )
p o s 3 ( t ) = 0.0130 0.0758 cos ( 0.4637 t ) + 0.1235 sin ( 0.4637 t )
p o s 4 ( t ) = 0.0727 + 0.6033 cos ( 0.3377 t ) + 0.3603 sin ( 0.3377 t ) + 0.0781 cos ( 0.6754 t ) 0.0476 sin ( 0.6754 t )
p o s 5 ( t ) = 0.4491 + 0.8182 cos ( 0.3147 t ) + 0.5446 sin ( 0.3147 t )
p o s 6 ( t ) = 0.1847 0.9301 cos ( 0.3634 t ) 0.5353 sin ( 0.3634 t ) 0.3331 cos ( 0.7268 t ) + 0.0854 sin ( 0.7268 t )
To quantitatively evaluate the precision of the Fourier fitting, the coefficient of determination ( R 2 ) and the Root Mean Square Error (RMSE) were calculated for each joint’s fitted curve, with the results summarized in Table 4.
As shown in Table 4, the average R 2 value reaches 0.9849, and the RMSE remains at an extremely low level, indicating that the Fourier mathematical model can reconstruct the actual motion trajectory of the manipulator with exceptionally high fidelity. To quantitatively evaluate the trajectory-tracking fidelity, the final Cartesian positioning error of the end-effector was analyzed. Specifically, by substituting the terminal joint angles derived from the fitted functions at t = 12 s into the forward kinematics model of the manipulator, the actual coordinates reached by the end-effector were determined as [ 342.21 , 40.53 , 710.22 ] mm . Compared with the ideally planned target coordinates of [ 348.95 , 39.27 , 709.35 ] mm , the final absolute error in the 3D operational space is merely 6.911 mm . This sub-centimeter level deviation thoroughly demonstrates that the proposed curve-fitting strategy preserves high terminal accuracy while smoothing the joint motions. Furthermore, observing Figure 15a, it is evident that the manipulator initiates movement at approximately t = 2 s, gradually decelerating to a stop around t = 10 s. To accurately evaluate the smoothness of this motion, this study isolated the core execution interval (2–10 s). The first and second derivatives of the fitted joint displacement functions were computed to derive the time-varying curves for angular velocity and angular acceleration, respectively, as presented in Figure 16.
An analysis of Figure 16 clearly reveals that both the angular velocity and angular acceleration of the manipulator maintain smooth and continuous trends throughout the entire execution period, without any pronounced abrupt changes or chattering phenomena. This indicates that the manipulator moves at a coordinated and stable pace when executing the planned path. These results verify that the TAD-IRRT* algorithm effectively guarantees the kinematic feasibility and operational stability of the manipulator, which is crucial for reducing mechanical wear and extending the service life of agricultural robotic systems.

3.4. Physical Obstacle Avoidance Verification Experiment

To further verify the practical obstacle avoidance efficiency and operational robustness of the proposed TAD-IRRT* algorithm in complicated unstructured environments, verification experiments were conducted in a real physical space utilizing the apple-harvesting robot prototype. Three operating scenarios with distinct obstacle densities—sparse, medium, and dense—were manually constructed. In these three scenarios, the initial pose of the manipulator and the spatial position of the target fruit remained completely identical, with the sole control variable being the occlusion degree of obstacles (such as branches) in front of the target fruit. This experimental design aims to highly replicate the variable and severely restricted 3D spatial constraints within the orchard canopy.
Since the paths generated by the baseline RRT and RRT* algorithms are highly unsmooth, direct execution on the hardware platform would lead to severe mechanical jitter and hardware wear. Therefore, the real-world experiments in this section only compare the standard Informed-RRT*, which inherently possesses path-smoothing characteristics, with the proposed TAD-IRRT* algorithm. For each density scenario, both algorithms initiated 30 independent planning and execution tests from the same initial pose toward the target fruit to comprehensively evaluate their performance in terms of key metrics, including the path-planning success rate, average real execution time, and average path length. It is worth noting that the low-level servo control system of the 6-DOF harvesting manipulator used in this experiment integrates an overload protection mechanism based on current-loop feedback and a soft collision detection mechanism. In an unstructured orchard environment, if the manipulator makes unexpected contact with branches during motion and generates external resistance exceeding the safety threshold, the system immediately triggers an emergency stop strategy to prevent physical damage. Such cases are explicitly determined as path-planning failures. The specific experimental comparison data are summarized in Table 5.
As shown in Table 5, the physical experimental results indicate that in the dense-obstacle scenario (Task 3), where the spatial restriction is most severe, the standard Informed-RRT* algorithm easily causes physical scratching and triggers emergency stops when traversing narrow gaps between branches and leaves. This is primarily because its generated paths are excessively tortuous and lack fine local potential field guidance, resulting in a path-planning success rate of only 53.3% and a high average real execution time of 18.32 s. In contrast, the TAD-IRRT* algorithm proposed in this study demonstrates a significant competitive advantage in robustness. In the identical dense occlusion scenario, the path-planning success rate of the proposed algorithm is substantially increased to 90.0%. Benefiting from the deep integration of the greedy pruning strategy and the cubic B-spline smoothing technology, TAD-IRRT* effectively eliminates redundant via-points and high-frequency mechanical jitter during physical execution. This feature not only renders the manipulator’s motion more coherent but also significantly shortens the average real execution time in the dense scenario to 10.79 s.
This fully proves that the proposed algorithm not only improves searching and convergence efficiency at the theoretical level but also effectively guarantees the smoothness of the manipulator trajectory at the physical engineering level, thereby greatly enhancing its reliability and safety during practical deployment. To intuitively demonstrate this process, the sequential obstacle avoidance workflow of the TAD-IRRT* algorithm in a dense scenario is illustrated in Figure 17.

4. Discussion

To address the aforementioned shortcomings of existing algorithms in complicated, unstructured orchard environments, this paper proposes the TAD-IRRT* algorithm, a 3D obstacle avoidance path-planning method for a 6-DOF apple-harvesting manipulator that incorporates multi-strategy optimization into the Informed-RRT* framework. In recent years, although cutting-edge algorithms such as heuristic goal biasing or bidirectional tree growth have demonstrated certain potential in narrow space planning [35], they remain prone to expansion stagnation when confronted with the extremely dense and unstructured canopies of orchards. To address this, this paper integrates an improved artificial potential field (APF) deeply within the standard Informed-RRT* framework. This strategy not only endows the random tree with more acute obstacle penetration and directional perception capabilities at the micro-level, but also effectively resolves the persistent issue wherein current mainstream adaptive exploration mechanisms [36] easily fall into local optimal deadlocks among intersecting 3D branches by combining goal biasing with dynamic anti-collision repulsive forces. Meanwhile, whereas most existing variable step-size planning algorithms are often restricted to a single distance threshold or macroscopic environmental complexity [37], the dynamic expansion mechanism based on obstacle distance perception constructed in this study achieves a seamless transition between large-stride efficient exploration in sparse spaces and small-stride precise obstacle avoidance in crowded regions. Finally, addressing the problem that many current efficient sampling algorithms tend to overlook physical feasibility, thereby causing high-frequency chattering during robotic arm execution [38], this paper introduces greedy criterion-based path-pruning and cubic B-spline curve techniques for deep post-processing. This series of optimization strategies successfully transforms the theoretical geometric path into a high-quality, smooth, and continuous trajectory that strictly adheres to the underlying kinematic and dynamic constraints of the 6-DOF apple-harvesting robotic arm.
The experimental results comprehensively demonstrate the superiority of the proposed algorithm in both simulated and physical environments. The simulation results in complicated ROS-based scenarios demonstrate that the proposed algorithm achieves a 100% planning success rate. Compared to the standard Informed-RRT* algorithm, its average computational time and joint-space path length are reduced by approximately 60.1% and 15.6%, respectively. Concurrently, kinematic analysis via Fourier curve fitting ( R 2 = 0.9849 ) confirms that the angular velocity and acceleration of each joint remain smooth and continuous, successfully eliminating high-frequency chattering. Crucially, these theoretical advantages successfully translated to real-world engineering applications. Physical verification experiments revealed that in the dense-obstacle scenarios, the TAD-IRRT* algorithm reduces the average execution time by 41% and increases the path execution success rate by 36.7% compared to the standard Informed-RRT*. This demonstrates that the TAD-IRRT* algorithm not only enhances spatial search efficiency but also ensures trajectory smoothness at the physical control level, thereby greatly improving operational reliability and safety in complicated orchards.
Despite this excellent performance, certain limitations remain regarding the transition to real-world agricultural applications. The current collision detection approach utilizes a rigid geometric bounding volume method (sphere and capsule models), which may overestimate or underestimate collision risks when encountering highly irregular physical boundaries. Future research will focus on exploring flexible collision detection mechanisms integrated with real-time 3D visual perception to adapt to highly irregular branch and leaf boundaries. Furthermore, regarding the physical deployment, this study currently assumes a decoupled ‘stop-and-pick’ operational paradigm. Specifically, the mobile base is responsible for macroscopic navigation between tree rows and remains strictly stationary during the harvesting execution. Consequently, the proposed TAD-IRRT* algorithm focuses exclusively on the high-dimensional, fine-grained obstacle avoidance of the 6-DOF manipulator within the canopy, excluding the motion planning of the mobile base. Although this static-base assumption ensures operational stability and effectively reduces the planning dimensionality, integrating the mobile base and the manipulator into a coupled whole-body motion planning framework remains a promising direction for future research to further enhance continuous harvesting efficiency.

5. Conclusions

To address the collision-free path-planning problem for a 6-DOF apple-harvesting robotic arm in complicated working environments, this study proposes a canopy-adaptive TAD-IRRT* algorithm. Based on the standard Informed-RRT* framework, this method deeply integrates target-biased sampling, improved artificial potential field (APF) guidance, and a dynamic step-size mechanism, further incorporating cubic B-spline techniques for trajectory smoothing. The simulation results in complicated ROS-based scenarios demonstrate that the proposed algorithm achieves a 100% planning success rate. Compared to the standard Informed-RRT* algorithm, its average computational time and joint-space path length are reduced by approximately 60.1% and 15.6%, respectively. Concurrently, kinematic analysis via Fourier curve fitting ( R 2 = 0.9849 ) confirms that the angular velocity and acceleration of each joint remain smooth and continuous, successfully eliminating high-frequency chattering. Furthermore, physical prototype experiments in the dense-obstacle scenarios demonstrate that the proposed method reduces the average execution time by 41% and increases the path execution success rate by 36.7% compared to the standard Informed-RRT*. In conclusion, this study effectively resolves the contradiction between generating high-quality paths and high computational overhead in high-dimensional spaces, providing a reliable solution that significantly reduces mechanical wear.

Author Contributions

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

Funding

This research was funded by the Industrial Foresight and Common Key Technology Project of Zhenjiang City grant number GY2025013 and the Key and General Project of Modern Agriculture of Jiangsu Province grant number BE2020406.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The datasets presented in this article are not readily available because the data are part of an ongoing study. Requests to access the datasets should be directed to 241110302101@stu.just.edu.cn.

Conflicts of Interest

Author Yunpeng Sun was employed by the company Jiangsu Ruidong Intelligent Technology Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Cao, D.; Luo, W.; Tang, R.; Liu, Y.; Zhao, J.; Li, X.; Yuan, L. Research on Apple Detection and Tracking Count in Complex Scenes Based on the Improved YOLOv7-Tiny-PDE. Agriculture 2025, 15, 483. [Google Scholar] [CrossRef]
  2. 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]
  3. Fang, T.; Chen, W.; Han, L. Apple-Picking Robot Based on Improved Mask R-CNN and Binocular Vision. Horticulturae 2025, 11, 801. [Google Scholar] [CrossRef]
  4. Kok, E.; Chen, C. Occluded apples orientation estimator based on deep learning model for robotic harvesting. Comput. Electron. Agric. 2024, 220, 108860. [Google Scholar] [CrossRef]
  5. Dai, Y.; Xiang, C.; Zhang, Y.; Jiang, Y.; Qu, W.; Zhang, Q. A review of spatial robotic arm trajectory planning. Aerospace 2022, 9, 361. [Google Scholar] [CrossRef]
  6. Thakur, A.; Venu, S.; Gurusamy, M. An extensive review on agricultural robots with a focus on their perception systems. Comput. Electron. Agric. 2023, 212, 108146. [Google Scholar] [CrossRef]
  7. Etikan, I.; Bala, K. Sampling and sampling methods. Biom. Biostat. Int. J. 2017, 5, 00149. [Google Scholar] [CrossRef]
  8. Khatib, O. Real-time obstacle avoidance for manipulators and mobile robots. Int. J. Rob. Res. 1986, 5, 90–98. [Google Scholar] [CrossRef]
  9. Wang, Y.; Zhou, H.; Xu, Z.K.; Xu, J.W. Path planning research based on improved artificial potential field method. Aeronaut. Comput. Tech. 2024, 54, 74–78. [Google Scholar]
  10. Zhuang, M.; Li, G.; Ding, K. Obstacle Avoidance Path Planning for Apple Picking Robotic Arm Incorporating Artificial Potential Field and A* Algorithm. IEEE Access 2023, 11, 100070–100082. [Google Scholar] [CrossRef]
  11. Wang, Z.G.; Tang, J.Y.; Yi, F.X.; Ren, X.; Wang, K. Research on path planning of robotic arms based on DAPF-RRT algorithm. PLoS ONE 2025, 20, e0323734. [Google Scholar] [CrossRef]
  12. Magzhan, K.; Jani, M.H. A review and evaluations of shortest path algorithms. Int. J. Sci. Technol. Res. 2013, 2, 99–104. [Google Scholar]
  13. Gu, X.; Liu, L.; Wang, L.; Yu, Z.; Guo, Y. Energy-optimal adaptive artificial potential field method for path planning of free-flying space robots. J. Frankl. Inst. 2024, 361, 978–993. [Google Scholar] [CrossRef]
  14. Ji, W.; Li, J.L.; Zhao, D.A.; Jun, Y. Obstacle avoidance path planning for harvesting robot manipulator based on MAKLINK graph and improved ant colony algorithm. Appl. Mech. Mater. 2014, 530, 1063–1067. [Google Scholar] [CrossRef]
  15. Jiang, Q.; Shen, Y.; Liu, H.; Khan, Z.; Sun, H.; Huang, Y. A Hybrid Path Planning Algorithm for Orchard Robots Based on an Improved D* Lite Algorithm. Agriculture 2025, 15, 1698. [Google Scholar] [CrossRef]
  16. Zhong, J.; Wang, T.; Cheng, L. Collision-free path planning for welding manipulator via hybrid algorithm of deep reinforcement learning and inverse kinematics. Complex Intell. Syst. 2022, 8, 1899–1912. [Google Scholar] [CrossRef]
  17. Lembono, T.S.; Pignat, E.; Jankowski, J.; Calinon, S. Learning constrained distributions of robot configurations with generative adversarial network. IEEE Robot. Autom. Lett. 2021, 6, 4233–4240. [Google Scholar] [CrossRef]
  18. Veras, L.G.D.O.; Medeiros, F.L.L.; Guimaraes, L.N.F. Systematic literature review of sampling process in rapidly-exploring random trees. IEEE Access 2019, 7, 50933–50953. [Google Scholar] [CrossRef]
  19. Ye, L.; Duan, J.; Yang, Z.; Zou, X.; Chen, M.; Zhang, S. Collision-free motion planning for the litchi-picking robot. Comput. Electron. Agric. 2021, 185, 106151. [Google Scholar] [CrossRef]
  20. Kiani, F.; Seyyedabbasi, A.; Aliyev, R.; Gulle, M.U.; Basyildiz, H.; Shah, M.A. Adapted-RRT: Novel hybrid method to solve three-dimensional path planning problem using sampling and metaheuristic-based algorithms. Neural Comput. Appl. 2021, 33, 15569–15599. [Google Scholar] [CrossRef]
  21. Yi, J.; Yuan, Q.; Sun, R.; Bai, H. Path planning of a manipulator based on an improved P_RRT* algorithm. Complex Intell. Syst. 2022, 8, 2227–2245. [Google Scholar] [CrossRef]
  22. LaValle, S.M. Rapidly-Exploring Random Trees: A New Tool for Path Planning; Technical Report; Department of Computer Science, Iowa State University: Ames, IA, USA, 1998. [Google Scholar]
  23. Karaman, S.; Frazzoli, E. Sampling-based algorithms for optimal motion planning. Int. J. Rob. Res. 2011, 30, 846–894. [Google Scholar] [CrossRef]
  24. Gammell, J.D.; Srinivasa, S.S.; Barfoot, T.D. Informed RRT*: Optimal sampling-based path planning focused via direct sampling of an admissible ellipsoidal heuristic. In Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Chicago, IL, USA, 14–18 September 2014; pp. 2997–3004. [Google Scholar]
  25. Ding, J.; Zhou, Y.; Huang, X.; Song, K.; Lu, S.; Wang, L. An improved RRT* algorithm for robot path planning based on path expansion heuristic sampling. J. Comput. Sci. 2023, 67, 101937. [Google Scholar] [CrossRef]
  26. Li, J.; Huang, C.; Pan, M. Path-planning algorithms for self-driving vehicles based on improved RRT-connect. Transp. Saf. Environ. 2023, 5, tdac061. [Google Scholar] [CrossRef]
  27. Chen, J.; Zhao, Y.; Xu, X. Improved RRT-connect-based path planning algorithm for mobile robots. IEEE Access 2021, 9, 145988–145999. [Google Scholar] [CrossRef]
  28. Liu, Y.; Tao, W.; Li, S.; Li, Y.; Wang, Q. A path planning method with a bidirectional potential field probabilistic step-size RRT for a dual manipulator. Sensors 2023, 23, 5172. [Google Scholar] [CrossRef] [PubMed]
  29. Kang, M.; Chen, Q.; Fan, Z.; Yu, C.; Wang, Y.; Yu, X. A RRT based path planning scheme for multi-DOF robots in unstructured environments. Comput. Electron. Agric. 2024, 218, 108707. [Google Scholar] [CrossRef]
  30. Shao, Y.; Tao, F.; Si, P.; Ji, B.; Li, M. Global feasible path planning for pest monitoring robots in unstructured agricultural environments. Front. Plant Sci. 2026, 17, 1784030. [Google Scholar] [CrossRef] [PubMed]
  31. Zhang, J.H.; Ren, B.Z.; Zhao, Y. Collision Detection and Obstacle Avoidance of Planar Redundant Manipulator based on Dichotomous Heuristic. J. Mech. Eng. 2023, 59, 113–122. [Google Scholar]
  32. Strub, M.P.; Gammell, J.D. Adaptively Informed Trees (AIT*): Fast asymptotically optimal path planning through adaptive heuristics. In Proceedings of the 2020 IEEE International Conference on Robotics and Automation (ICRA), Paris, France, 31 May–31 August 2020; IEEE: Piscataway, NJ, USA, 2020; pp. 3191–3198. [Google Scholar]
  33. Behera, L.; Rybak, L.; Malyshev, D.; Gaponenko, E. Determination of workspaces and intersections of robot links in a multi-robotic system for trajectory planning. Appl. Sci. 2021, 11, 4961. [Google Scholar] [CrossRef]
  34. Cheng, H.; Yang, S.; Qi, X. Dynamic trajectory planning of quadrotors UAV based on improved RRT algorithm. Comput. Eng. Des. 2018, 39, 3705–3711. [Google Scholar]
  35. He, X.; Zhou, Y.; Liu, H.; Shang, W. Improved RRT*-connect manipulator path planning in a multi-obstacle narrow environment. Sensors 2025, 25, 2364. [Google Scholar] [CrossRef]
  36. Huang, Y.; Li, H.; Dai, Y.; Lu, G.; Duan, M. A 3D path planning algorithm for UAVs based on an improved artificial potential field and bidirectional RRT. Drones 2024, 8, 760. [Google Scholar] [CrossRef]
  37. Su, Y.; Xin, J.; Sun, C. Dynamic path planning for mobile robots based on improved RRT* and DWA algorithms. IEEE Trans. Ind. Electron. 2025, 72, 10595–10604. [Google Scholar] [CrossRef]
  38. Zhuang, H.; Jiang, C. RRT* path planning method for mobile robot based on particle swarm optimization and rotation angle constraint. In Proceedings of the International Conference Optoelectronic Information and Optical Engineering (OIOE2024); SPIE: Bellingham, WA, USA, 2025; pp. 593–602. [Google Scholar]
Figure 1. Apple-harvesting robot. (a) Overall panoramic view of the apple-harvesting robot. (b) Detailed illustration of the 6-DOF robotic arm.
Figure 1. Apple-harvesting robot. (a) Overall panoramic view of the apple-harvesting robot. (b) Detailed illustration of the 6-DOF robotic arm.
Actuators 15 00336 g001
Figure 2. Simplified collision detection model.
Figure 2. Simplified collision detection model.
Actuators 15 00336 g002
Figure 3. The relationship between the minimum spatial distance d m i n and the projection parameter t.
Figure 3. The relationship between the minimum spatial distance d m i n and the projection parameter t.
Actuators 15 00336 g003
Figure 4. Elliptical modeling of the Informed-RRT* algorithm.
Figure 4. Elliptical modeling of the Informed-RRT* algorithm.
Actuators 15 00336 g004
Figure 5. Schematic diagram of target-biased sampling and expansion principle.
Figure 5. Schematic diagram of target-biased sampling and expansion principle.
Actuators 15 00336 g005
Figure 6. Schematic diagram of the improved artificial potential field guided sampling.
Figure 6. Schematic diagram of the improved artificial potential field guided sampling.
Actuators 15 00336 g006
Figure 7. Schematic diagram of dynamic step size expansion.
Figure 7. Schematic diagram of dynamic step size expansion.
Actuators 15 00336 g007
Figure 8. Schematic diagram of the greedy algorithm eliminating redundant nodes.
Figure 8. Schematic diagram of the greedy algorithm eliminating redundant nodes.
Actuators 15 00336 g008
Figure 9. Schematic diagram of path optimized by cubic B-spline curve.
Figure 9. Schematic diagram of path optimized by cubic B-spline curve.
Actuators 15 00336 g009
Figure 10. Flowchart of the TAD-IRRT* algorithm.
Figure 10. Flowchart of the TAD-IRRT* algorithm.
Actuators 15 00336 g010
Figure 11. Path-planning results of the compared algorithms in a 2D environment.
Figure 11. Path-planning results of the compared algorithms in a 2D environment.
Actuators 15 00336 g011
Figure 12. Path-planning results of the compared algorithms in a 3D environment.
Figure 12. Path-planning results of the compared algorithms in a 3D environment.
Actuators 15 00336 g012
Figure 13. Initial position of the robotic arm in the harvesting scenario.
Figure 13. Initial position of the robotic arm in the harvesting scenario.
Actuators 15 00336 g013
Figure 14. Manipulator motion planning trajectories based on different algorithms. (a) RRT. (b) RRT*. (c) Informed-RRT*. (d) TAD-IRRT*.
Figure 14. Manipulator motion planning trajectories based on different algorithms. (a) RRT. (b) RRT*. (c) Informed-RRT*. (d) TAD-IRRT*.
Actuators 15 00336 g014
Figure 15. Joint position variation curves. (a) Position change curve of each joint over time. (b) Fitted curve of each joint position over time.
Figure 15. Joint position variation curves. (a) Position change curve of each joint over time. (b) Fitted curve of each joint position over time.
Actuators 15 00336 g015
Figure 16. Joint angular velocity and acceleration curves. (a) Angular velocity curve of each joint over time. (b) Angular acceleration curve of each joint over time.
Figure 16. Joint angular velocity and acceleration curves. (a) Angular velocity curve of each joint over time. (b) Angular acceleration curve of each joint over time.
Actuators 15 00336 g016
Figure 17. The continuous obstacle avoidance workflow of the TAD-IRRT algorithm in a dense scenario. (a) Determination of initial pose. (b) Trajectory detour. (c) Traversing narrow gaps. (d) Target reaching.
Figure 17. The continuous obstacle avoidance workflow of the TAD-IRRT algorithm in a dense scenario. (a) Determination of initial pose. (b) Trajectory detour. (c) Traversing narrow gaps. (d) Target reaching.
Actuators 15 00336 g017
Table 1. D-H parameters of the six-DOF apple-harvesting robotic arm.
Table 1. D-H parameters of the six-DOF apple-harvesting robotic arm.
Joint No (i) a i (m) α i (Rad) d i (m) θ i (Rad)
10 π / 2 0.08916 θ 1
2−0.4250000 θ 2
3−0.3922500 θ 3
40 π / 2 0.10915 θ 4
50 π / 2 0.09465 θ 5
6000.08230 θ 6
Table 2. Quantitative performance comparison of the evaluated algorithms across 2D and 3D simulation environments.
Table 2. Quantitative performance comparison of the evaluated algorithms across 2D and 3D simulation environments.
Simulation EnvironmentAlgorithmAverage Path-Planning Time (s)Average Path Length (m)Success Rate (%)
2D spaceRRT [22]0.048.46100
RRT* [23]0.517.47100
Informed-RRT* [24]0.547.46100
TAD-IRRT*0.467.08100
3D spaceRRT [22]0.0310.74100
RRT* [23]0.429.16100
Informed-RRT* [24]0.439.25100
TAD-IRR*0.288.51100
Note: The robot is abstracted as a spatial point mass. Therefore, the average path length is evaluated as the pure Cartesian Euclidean distance (m).
Table 3. Quantitative performance evaluation of the tested algorithms in a cluttered-obstacle scenario.
Table 3. Quantitative performance evaluation of the tested algorithms in a cluttered-obstacle scenario.
AlgorithmAverage Path Planning Time (s)Average Path Length (Rad)Success Rate (%)
RRT [22]1.709.86100.00
RRT* [23]5.016.8690.00
Informed-RRT* [24]3.366.6170.00
TAD-IRRT*1.345.58100.00
Note: The average planning time and average path length are calculated only for the successful trials. And the average path length here is quantified as the cumulative joint-space displacement (rad).
Table 4. Evaluation indexes of fitted curves for each joint position over time.
Table 4. Evaluation indexes of fitted curves for each joint position over time.
Joint NameR-Square ( R 2 )RMSE
Joint 10.99950.03161
Joint 20.99990.02004
Joint 30.91990.03994
Joint 40.99870.02429
Joint 50.99620.05550
Joint 60.99570.07426
Average0.98490.04094
Table 5. Comparison of physical experimental results under different obstacle densities.
Table 5. Comparison of physical experimental results under different obstacle densities.
Task ScenarioAlgorithmAverage Real Execution Time (s)Average Path Length (Rad)Success Rate (%)
Task 1 (Sparse)Informed-RRT*8.455.73100.0
TAD-IRRT*7.124.86100.0
Task 2 (Medium)Informed-RRT*15.656.4776.7
TAD-IRRT*8.555.3893.3
Task 3 (Dense)Informed-RRT*18.327.6953.3
TAD-IRRT*10.795.9190.0
Note: Average real execution time and average path length are calculated only using test samples that were successfully executed without physical collisions. And the average path length here is quantified as the cumulative joint-space displacement (rad).
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

Han, L.; Chen, W.; Fang, T.; Sun, Y. Canopy-Adaptive TAD-IRRT* Algorithm for 3D Path Planning of 6-DOF Apple-Harvesting Robots in Dense Orchards. Actuators 2026, 15, 336. https://doi.org/10.3390/act15060336

AMA Style

Han L, Chen W, Fang T, Sun Y. Canopy-Adaptive TAD-IRRT* Algorithm for 3D Path Planning of 6-DOF Apple-Harvesting Robots in Dense Orchards. Actuators. 2026; 15(6):336. https://doi.org/10.3390/act15060336

Chicago/Turabian Style

Han, Lu, Wei Chen, Tianzhong Fang, and Yunpeng Sun. 2026. "Canopy-Adaptive TAD-IRRT* Algorithm for 3D Path Planning of 6-DOF Apple-Harvesting Robots in Dense Orchards" Actuators 15, no. 6: 336. https://doi.org/10.3390/act15060336

APA Style

Han, L., Chen, W., Fang, T., & Sun, Y. (2026). Canopy-Adaptive TAD-IRRT* Algorithm for 3D Path Planning of 6-DOF Apple-Harvesting Robots in Dense Orchards. Actuators, 15(6), 336. https://doi.org/10.3390/act15060336

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

Article Metrics

Article metric data becomes available approximately 24 hours after publication online.
Back to TopTop