Abstract
As the operation mode of construction machinery is being transformed from traditional manual operation to unmanned autonomous operation, a trajectory planning scheme for obstacle avoidance is proposed in this paper to meet the requirements of unmanned autonomous operation of excavators in complex environments and confined spaces. First, a simulation model is established to represent the working mechanism of the excavator and its surrounding obstacle environment. Next, considering the spatial constraints and environmental obstacles present during excavation and swing-loading operations, an optimal trajectory planning strategy is developed for autonomous excavator operation under restricted conditions. The proposed approach enhances the conventional RRT* algorithm through the incorporation of an environmental parameter-based heuristic search and an adaptive goal-biased strategy featuring dynamic step size adjustment. These improvements collectively augment path search efficiency and trajectory quality. For trajectory optimization, a quintic Non-Uniform Rational B-Spline (NURBS) curve is employed to plan the motion path of the bucket tip. The method concurrently optimizes operation duration and motion smoothness, producing a multi-objective optimal trajectory. Results show the enhanced RRT* reduces path length, iteration count, and computation time by 3.65%, 64.15%, and 67.9%, while improving trajectory smoothness by 33.4%. The approach reliably generates collision-free, smooth, and energy-efficient trajectories, ensuring high efficiency and mechanical reliability for autonomous excavator operations.
Similar content being viewed by others
Introduction
The rapid urbanization in recent years has driven growing demand for construction machinery, particularly hydraulic excavators. Despite this demand, most current excavator systems remain predominantly manual, requiring direct human operation for task execution. This reliance on human operators presents three key challenges documented in recent studies1,2,3: First, hazardous or extreme working environments often prevent safe operator access, limiting task completion in high-risk scenarios. Second, excavation operations typically involve prolonged, physically demanding work that necessitates highly trained personnel. Third, the variability in operator techniques for identical tasks frequently leads to inconsistent performance and suboptimal energy efficiency. To overcome these limitations, significant research efforts have been directed toward autonomous excavation system development. Modern autonomous excavators incorporate multi-sensor systems - including LiDAR and stereo vision cameras to acquire environmental data for operational decision-making and task execution4. Within excavator intelligentization frameworks, trajectory planning represents a critical foundational component that directly influences three key performance metrics: operational efficiency, energy consumption, and positioning accuracy5.While optimized trajectory generation is essential, effective operation in complex construction sites requires additional capabilities. Successful implementation demands the synergistic integration of advanced sensor technologies with intelligent algorithms to ensure reliable obstacle avoidance during excavation tasks. This integrated approach enables excavators to navigate dynamically constrained workspaces while maintaining operational precision.
The development of intelligent trajectory planning methods for excavators has attracted considerable research attention, with scholars employing various methodological approaches. Notably, Gasparetto et al.6 established a novel dynamics-based framework that optimizes both energy consumption and cycle time. Ding et al.7 advanced this direction through tilt-angle-displacement mapping, achieving smooth trajectories with high tracking precision, though their method showed limitations in excavation efficiency. For complete work cycles, Wang et al.8 demonstrated that 6th-order polynomials optimally satisfy practical requirements for shovel trajectories, while Fan et al.9 developed a hybrid evolutionary algorithm that simultaneously optimizes energy use, execution time, and excavation volume. Machine learning techniques have shown particular promise, as evidenced by Yao et al.10 Physics-Informed Neural Network (PINN) framework, which achieved superior efficiency across diverse operational scenarios. Bio-inspired approaches have also emerged, such as Tan et al.11 imitation learning method that adapts mole digging patterns through piecewise polynomial fitting. Despite these theoretical advancements, a critical implementation gap remains. The majority of existing methods inadequately address practical constraints, such as the complexity of real-world workspaces, performance limitations of hydraulic systems, and variability in operational scenarios. This disconnect between theoretical development and engineering application substantially hinders the practical adoption of autonomous excavation technologies.
Recent advances in obstacle avoidance research demonstrate diverse algorithmic approaches across various robotic applications. In excavation systems, Huh et al.12 implemented an AI-based solution combining LSTM networks with pressure-monitoring algorithms to generate collision-free bucket-tip trajectories while maintaining operational stability. Agricultural robotics has seen innovations such as Zhuang et al.‘s13 hybrid method integrating artificial potential fields with the A* algorithm, which simultaneously optimizes path length and computational efficiency in apple harvesting operations. Other domains have contributed valuable methodologies: Zhu et al.14 developed neural network-based time-optimal path planning that significantly improves computational efficiency. Zhang et al.15 demonstrated superior dynamic obstacle avoidance using enhanced Bézier curves. Zhou et al.16 achieved reliable collision avoidance in arc welding through an optimized lazy-PRM algorithm with safety-constrained cost functions. Yang et al.17 successfully combined environmental adaptability of RRT with ant colony optimization’s convergence properties. While these studies provide valuable insights, their specialized implementations limit direct applicability to excavator operations due to the unique challenges posed by heavy-duty excavation machinery, which requires dedicated solutions that simultaneously maintain load-bearing capacity during avoidance maneuvers, ensure operational stability under dynamic loads, guarantee safety in confined workspaces, and accommodate substantial inertial effects - revealing a critical research gap in developing obstacle avoidance algorithms specifically designed for excavator operational requirements and physical constraints.
This research specifically addresses level-ground excavation scenarios, incorporating typical environmental elements and potential obstacles. Using the XG808 electric excavator from XGMA as our experimental platform, we establish a MATLAB-based collision model of the working environment and perform comprehensive kinematic analysis. Our methodological approach integrates two key technical innovations: (1) an enhanced RRT* algorithm for obstacle-aware path planning and (2) quintic NURBS curve optimization for joint-space trajectory generation, while incorporating critical physical constraints including hydraulic system performance limitations, environmental obstacle boundaries, and kinematic operational thresholds. Through multi-objective optimization targeting both time minimization and mechanical shock reduction, our MATLAB simulations demonstrate the method’s effectiveness in generating optimal excavation trajectories. The results confirm the solution’s ability to maintain operational efficiency and stability while satisfying all practical constraints.
Modeling of excavator working mechanism and obstacle environment
Analysis of excavator operational tasks
Excavator operations on level ground consist of four fundamental motion phases that form a complete work cycle, as illustrated in Fig. 1. The cycle begins with digging for material engagement, followed by boom hoisting for vertical displacement, slewing for horizontal transfer, and concludes with dumping for material deposition. The kinematic coordination between these sequential motions plays a pivotal role in determining both operational stability and overall efficiency, as proper synchronization ensures smooth energy transfer while minimizing dynamic disturbances throughout the work cycle.
The kinematic modeling of excavator
This study utilizes the 8-ton electric excavator as the modeling platform. Figure 2 illustrates the D-H parameter coordinate system, where θ0 to θ3 denote the joint angles corresponding to the slewing, boom, arm, and bucket mechanisms respectively. The system geometry is defined by parameter a0 representing the distance from slewing center to boom hinge point, along with parameters a1, a2, and a3 which specify the inter-hinge distances for boom, arm, and bucket linkages. The complete set of derived D-H parameters for this excavator configuration is presented in Table 1.
Obstacle environment modeling
Obstacle-avoidance path planning for excavation and slewing operations requires thorough modeling of the operational environment. Given that excavators typically operate in relatively fixed environments, this study focuses on obstacle trajectory planning within static workspaces and develops two obstacle models for excavation and truck-loading scenarios, focusing on 8-ton class excavators. By analyzing standard dump truck configurations and typical soil conditions, three digging phases are identified: initial penetration, horizontal dragging, and combined lifting and rotation. Figure 3 shows the bucket tip trajectory.
The complexity and unpredictability of soil environments often result in bucket collisions with large obstacles during excavation, causing operational disruptions, vibrations, and potential hydraulic component damage. To address this, a minimum-area enveloping approach is employed to simplify modeling, particularly for irregular geometries, maintaining operational safety through expanded exclusion zones. As shown in Fig. 4, peak excavation resistance is correlated with obstacles along the bucket tip trajectory, posing risks of mechanical failure and structural damage.
During slewing-loading operations, obstacle avoidance must be effectively achieved by considering both excavated terrain surfaces and dump truck configurations. This necessitates the development of ground obstacle and loading environment models. The process is dependent on the coordinated execution of boom lifting and slewing motions to navigate environmental constraints. Success is contingent upon the integration of three key factors: the spatial positioning and geometry of the dump truck, as well as the topography of the soil pile. Then, modeling parameters are derived from the operational specifications of the excavator and typical small-scale construction scenarios: the dump truck model measures 5.8 m in length, 2.2 m in width, and 2.1 m in height, while the excavation environment is modeled as a volume of 3 m × 1.66 m × 0.2 m, scaled proportionally to match the excavator’s working dimensions and should be slightly larger than the actual size. To simulate subsurface conditions, spherical obstacles with a diameter of 0.3 m are incorporated within the soil matrix. Figure 5 illustrates the integrated obstacle model, which combines both excavation and loading environment components.
Optimal trajectory planning for excavators in confined spaces
As depicted in Fig. 6, an integrated trajectory planning framework is developed, which combines an enhanced RRT* algorithm with quintic NURBS curve optimization for complete work cycle planning in confined excavation environments.
The methodology is initiated by analyzing the workspace and excavator envelope to identify critical path points and slewing positions. Continuous evaluation for potential obstacles triggers automatic path replanning, generating updated collision-free key points while maintaining return-to-origin capability. Optimized trajectory synthesis is achieved by integrating these points with slewing data through quintic NURBS curve fitting, incorporating hydraulic constraints, kinematic limitations, and objectives. This dual-stage approach ensures smooth, accurate motion profiles that comply with industry standards and maintain safety and efficiency in constrained workspaces by addressing spatial restrictions and equipment performance. The framework effectively considers obstacle avoidance, equipment constraints, and operational objectives, overcoming the fragmentation between geometric feasibility and dynamic executability typical of conventional approaches in confined space excavation.
Obstacle-avoidance path planning for excavator operations
Accurate obstacle-avoidance path planning is essential for the safe and efficient operation of autonomous excavators. It primarily relies on global path planning techniques to determine optimal collision-free trajectories within known environments. As shown in Fig. 7, existing algorithms, such as swarm optimization, graph search, artificial potential field, and probabilistic roadmap methods. Among these, the RRT (Rapidly-exploring Random Tree) algorithm is chosen for its minimal parameter requirements and broad applicability, especially in high-dimensional, complex environments. Its adaptability is particularly valuable in autonomous excavation systems where environmental complexity and dynamic constraints are significant18. For practical implementation, the standard RRT algorithm is modified to address the unique challenges of heavy equipment manipulation. These modifications enhance operational safety and path planning efficiency while maintaining the algorithm advantages in complex obstacle environments. The improvements also address the dynamic constraints and precision requirements of actual excavator working conditions, as detailed in Chap. 4.
Quintic NURBS trajectory planning
Based on the obstacle-avoidance algorithm proposed in Sect. 3.1, the key path points for excavator operation are determined. Through workspace path discretization, the position sequence Ti of the bucket tip and its corresponding time sequence ti are obtained. Inverse kinematics analysis yields the joint space angle values pi for each pose Ti, ultimately generating the joint angle-time sequence {pi,ti}.
This study employs quintic NURBS curves to interpolate these path points, constructing the bucket tip trajectory. The functional expression of a k-degree NURBS curve is mathematically represented by Eq. (1):
where c(u) is the parametric curve, ωi weight of the control point, Pi control points, p degree of the curve, Ni, p(u) p-degree B-spline basis function corresponding to the i control point. The B-spline basis function is computed using the de Boor recursive method. The calculation process is outlined as
From this, it can be understood that to obtain a quintic NURBS curve, the path control points Pi and the knot vector u are required. The path control points are selected based on the trajectory points collected from the actual trajectory data. The knot vector u is determined using the cumulative chord length parameterization method and is expressed as:
Particle swarm trajectory optimization in confined spaces
The trajectory generated by the key-point interpolation method requires refinement for optimal performance. Current optimization methods often focus on kinematic constraints while neglecting the hydraulic system, potentially leading to overload and component damage if the trajectory is impractical. Accurate safety distance calculations for obstacle avoidance are also essential. To address these issues, a comprehensive optimization framework is proposed, integrating multiple constraints to ensure practical feasibility. This framework, which incorporates kinematic and environmental constraints along with well-designed objective functions, develops a trajectory optimization algorithm tailored for confined-space operations. The approach optimizes trajectory planning and ensures effective obstacle avoidance, making it particularly suitable for excavators in complex, spatially constrained environments.
Constrained workspace considerations
The operational efficiency and motion accuracy of autonomous excavators depend on the performance of hydraulic cylinders and swing motors. Hydraulic cylinder forces are determined by geometry and relief valve pressure, while total flow must not exceed pump capacity. Proper flow regulation minimizes heat and hydraulic shocks, extending component life. Operational trajectories must be constrained within permissible pressure ranges to optimize excavator performance and hydraulic component durability. The boom, arm, and bucket of the electric excavator are actuated by hydraulic cylinders, while the swing platform is driven by a swing motor. The main pump delivers a maximum working flow rate of 192 L/min. Table 2 presents the relevant hydraulic cylinder parameters. The maximum velocities of the cylinders can be calculated using Eq. (4).
where v represents velocity, Q denotes the maximum flow rate, and A corresponds to the effective working area of the hydraulic cylinder. The operational characteristics are as follows: the boom cylinder achieves maximum extension and retraction speeds of 0.225 m/s and 0.305 m/s, respectively; the arm cylinder operates at 0.297 m/s for extension and 0.217 m/s for retraction; and the bucket cylinder exhibits the highest performance, with extension and retraction speeds of 0.365 m/s and 0.322 m/s, respectively. These values reflect an optimized hydraulic circuit design for efficient digging and loading cycles.
The swing motor has a theoretical displacement of 2.73 L/rev and a maximum flow capacity of 64 L/min, with a gear reduction ratio of 19.464. Based on Eq. (5), the maximum swing speed is calculated to be 1.204 rpm.
where n represents rotational speed, Q denotes the maximum flow rate, q signifies the swing motor’s theoretical displacement, and i indicates the gear reduction ratio.
Due to potential hydraulic oil leakage and other uncertainties in the hydraulic system, which may cause flow rate losses, the actual output velocity will not reach the maximum theoretical value. As a result, 80% of the calculated maximum cylinder velocity and swing motor speed are used as operational limits. Trajectory planning is performed in joint space with time as the optimization variable. Kinematic analysis of the excavator is required to calculate the hydraulic cylinder displacement and swing angle between adjacent trajectory key points. This analysis helps determine the maximum velocities for both the cylinders and the swing motor. By adjusting the motion time between obstacle-avoidance points, it ensures that no actuator exceeds its maximum driving force, thereby keeping the main pump’s output flow within an optimal range during excavation operations.
To ensure the safe completion of both digging and slewing-loading operations, the automated workflow of the excavator must incorporate real-time hydraulic flow calculations along with two critical constraints: (1) all joint angles must remain within predefined safety limits, and (2) the distance between the working mechanism and environmental obstacles must always be non-negative.
In a single operational cycle with stationary confined-space obstacles, collision-avoidance conditions depend solely on the kinematic configuration of the working mechanism. By performing forward kinematics analysis, the three-dimensional coordinates of the working assembly can be calculated, enabling accurate computation of the distance to obstacles:
where the 3D coordinates of the working mechanism endpoints are denoted as (x, y, z), while the obstacle center coordinates are represented by (x₀, y₀, z₀). The parameter h corresponds to the sum of the obstacle effective radius and the maximum radial dimension of the working mechanism of the excavator.
The working mechanism of the excavator must operate within predefined joint angle constraints, with the electric excavator’s specific angular limits detailed in Table 3.
Objective function
In excavator trajectory planning, ensuring the safety of the working mechanism must be balanced with operational efficiency and motion smoothness. To this end, this study introduces two performance metrics, f1 and f2, to evaluate the overall performance of the optimized trajectory. The specific formulations are as follows:
where f1 represents the total cycle time for a single excavation operation, serving as a metric for excavator productivity, while n denotes the number of Cartesian space interpolation points with j being the point index. The metric f2 quantifies the total averaged jerk across all motions, where N = 4 specifies the number of kinematic joints, and jerki(t) defines the jerk function for the i-th joint.
To reduce computational complexity and enhance algorithmic efficiency, this study consolidates the two objective functions given in Eqs. (7) and (8) into a single normalized objective function, as presented in Eq. (9), where λ₁ + λ₂ = 1.
Particle swarm trajectory optimization algorithm
The Particle Swarm Optimization (PSO) algorithm is an efficient swarm intelligence method with notable advantages for solving complex trajectory planning problems19. Building on the constraints and objective functions outlined in Sect. 3.3.1 and 3.3.2, this study applies the PSO algorithm to optimize excavator trajectories. The goal is to achieve multi-objective improvements in safety, operational efficiency, and motion smoothness.
In the algorithmic implementation, each particle represents a potential trajectory solution. Its position and velocity are updated based on both its historical best position and the swarm’s global best position. Through iterative updates, the PSO algorithm enhances obstacle avoidance and effectively improves trajectory smoothness and operational efficiency. This approach rigorously satisfies the kinematic constraints and safety requirements of the working mechanism in complex, confined spaces, providing a reliable and computationally efficient solution for trajectory optimization.
Improved RRT* algorithm with adaptive goal-biased strategy
The RRT algorithm is widely used for path planning in complex environments due to its adaptability, particularly in robotic arm applications. However, excavators, as heavy-duty machinery, prioritize path stability and safety over the precision and flexibility of robotic arms. Conventional RRT and its variants struggle in excavation scenarios, especially in confined spaces with complex obstacles, due to slow convergence rates and inconsistent path quality. These limitations highlight the need for a dedicated path planning algorithm for autonomous excavators. An enhanced RRT* algorithm with an environment-aware adaptive goal-biased strategy is proposed in this chapter to improve path planning performance.
Brief introduction of RRT* algorithm
The RRT algorithm, originally proposed by LaValle et al.20 at the University of Illinois, is a sampling-based path planning method. It constructs a search tree by iteratively expanding from an initial root node through random sampling. Once a leaf node reaches the target position, a feasible path connecting the start and goal configurations is extracted. The RRT* algorithm, an enhanced variant, improves upon the classical RRT by incorporating two key modifications: parent node rewiring and random tree optimization. The pseudocode implementation is presented below:

Algorithm1. RRT* algorithm pseudo-code
InsertNode: Inserts a new node into the exploration tree.
RandomSample: Generates a random configuration sample within the free workspace.
NearestNode: Locates the tree node closest to a given sample point.
CollisionFree: Checks whether the path between two configurations intersects with obstacles.
Steer: Extends from the nearest tree node toward the sample point by a specified step size to create a new node.
NearNeighbors: Identifies all nodes within a defined radius of a target node.
ChooseParent: Selects the optimal parent node for a new node by evaluating the minimal cost path within the local neighborhood.
Goal-biased strategy
The conventional RRT* algorithm, while widely adopted in robotic path planning for its asymptotic optimality and probabilistic completeness, has several practical limitations. These include random dispersion of sampling points, inconsistent path quality, and slow convergence rates. These issues are especially prominent in complex autonomous excavation scenarios. To improve sampling efficiency, many researchers have integrated goal-biased strategies into path planning algorithms. These strategies direct the search process to focus on target regions, significantly accelerating convergence and enhancing algorithmic performance. This approach is particularly effective in complex and dynamic environments, as it systematically reduces redundant exploration of the search space21.
The conventional goal-biased strategy, as formulated in Eq. (10), employs a probability threshold P during random sampling to guide exploration toward the target region. Specifically, the algorithm generates a random probability value via the rand function, then selects either the goal point or a random configuration based on whether this value exceeds threshold P.
The fixed probability threshold strategy has significant limitations when applied to complex, dynamic excavation environments. Its dependence on static parameters restricts adaptive goal bias adjustments in real time, often resulting in local optima and reduced planning efficiency.
Adaptive goal-biased strategy
Through comprehensive analysis of complex excavator operational scenarios, this paper integrates environmental constraints with task-specific excavator characteristics to propose an adaptive goal-biased strategy incorporating obstacle-awareness. Compared to conventional fixed-threshold approaches, this enhanced methodology features a twofold innovation:
(1) Considering the complex obstacle distribution in excavation environments, an environment-adaptive steering mechanism is introduced. This approach constructs an obstacle density model of the workspace and incorporates dynamic weighting parameters α and β to dynamically adjust node expansion directions, with the new node calculation shown in Eq. (11).
where qnew, qnear, qrand and qgoal are all 3D vectors representing the coordinates of the new node, nearest node, random sample, and goal point, respectively. Drand-near and Dgoal-near denote the Euclidean distances from the random sample and goal point to the nearest node, while α and β are weighting factors calculated as follows:
where Astart-goal represents the Euclidean distance between the start and goal points, Aspace denotes the area of the current search space, n indicates the current iteration count, N is the average total iterations, and ρ signifies the environmental obstacle density. The parameter ω, defined as the goal-biasing probability threshold, varies linearly within its bounds as iterations progress. Notably, ωmax decreases with higher obstacle densities, while the lower ωmin bound remains fixed at 0.
(2) For bucket trajectory dynamics during excavator slewing operations, this study introduces a dynamic offset parameter γ. The parameter adjusts the node expansion range according to real-time obstacle density calculations, improving path planning accuracy and computational efficiency while adapting to working conditions. In level-ground loading scenarios, the bucket tip trajectory typically follows a slewing-lifting motion along the positive z-axis. To account for this operational specificity, a dynamic offset is incorporated into the bias function znew as shown in Eqs. (14–15), where ε denotes the maximum offset which set to 0.1 in this study and φ represents the obstacle density at the current node. Here, A is the amplitude coefficient which set to 0.7, indicating the maximum density value, and (xC, yC, zC) corresponds to the centroid of the highest obstacle density in the current workspace.
To address the inherent path roughness in RRT* outputs and enhance trajectory planning efficiency, this study implements a greedy algorithm-based pruning and smoothing process. The algorithm initiates by attempting a direct connection between the start and end points while verifying collision-free conditions. When obstacles are detected, the endpoint is progressively replaced with adjacent nodes until a viable straight-line trajectory is identified, at which point the original path segment is substituted with this optimized connection. This optimized node then serves as the new starting point for recursive continuation of the process, ultimately yielding a completely optimized path between the initial start and end configurations, as illustrated in Fig. 8.
The pseudocode for the improved RRT* algorithm is presented below:

Algorithm2. Improved RRT* algorithm pseudo-code
Compared to the standard RRT*, the improved version incorporates three key modifications: environmental parameters, including obstacle dimensions and density, are added as input variables. Environment-aware probabilistic sampling is implemented to bias toward the goal point, while redundant nodes are eliminated through greedy pruning (GreedyPruning) to prevent path over-segmentation.
Simulation results analysis
This section validates the effectiveness and superiority of the proposed trajectory planning method. The test computer hardware was equipped with a 2.60 GHz Intel Core i5-13500 H CPU and 16 GB of RAM. A MATLAB R2021b-based excavator operation simulation environment was developed to conduct comparative analysis between the proposed method and existing approaches, evaluating performance metrics to demonstrate its efficacy in obstacle avoidance tasks for excavation operations. Within this study, the RRT algorithm and its variants were configured with a maximum iteration count of 2000, a step size of 0.5 m, and a neighborhood radius of 0.6 m. The pathfinding process terminates successfully when the distance between a newly generated node and the target point falls below 0.2 m, indicating feasible path acquisition.
Comparative analysis of excavation obstacle avoidance performance
This study investigates the motion trajectory of an excavator’s bucket tip during level-ground operations, with particular focus on three critical parameters: the digging start point, excavation depth, and endpoint. Through systematic analysis of expert operator techniques and field excavation scenarios, we derived the complete bucket motion trajectory and associated digging attitude angles throughout the operational cycle. The excavation environment’s obstacle model, as described in Sect. 2.3, was specifically designed to simulate subsurface soil obstacles.
Within this framework, we performed a comprehensive comparative evaluation of three path planning algorithms under identical excavation conditions: RRT algorithm, Conventional goal-biased RRT* algorithm and Proposed adaptive goal-biased RRT* algorithm. Each algorithm was run 20 times, and the obstacle avoidance results are shown in Fig. 9. As evidenced by the results, the adaptive goal-biased RRT* algorithm demonstrates superior performance compared to the two baseline methods, generating significantly fewer redundant nodes during the search process while producing more optimal obstacle-avoidance paths that better satisfy practical operational requirements.
As demonstrated by the algorithm performance data in Table 4, the proposed adaptive goal-biased RRT* algorithm achieves 3.7% reduction in path length under identical conditions, 48% faster computation time, 51.5% fewer iterations and 35.7% improved smoothness. All evaluated metrics show significant improvement compared to baseline methods.
Comparative analysis of swing motion obstacle avoidance in standard environments
In truck-loading operations, the excavator’s swing motion is defined by two critical waypoints: the swing initiation point P₁ and termination point P₂. These waypoints are geometrically constrained by the dump truck’s physical dimensions, with P₂ specifically positioned at the horizontal center of the container and vertically offset by 0.5 times the bucket length above the container floor.
The excavator slewing operation simulation model, outlined in Sect. 2.3, integrates obstacle models for soil terrain and dump truck environments. The excavator swing operation simulation model, detailed in Sect. 2.3, incorporates obstacle models for both soil and dump truck within the operational environment. With the coordinate origin defined at the excavator’s center point, the respective centroid coordinates for the soil and dump truck models are positioned at (0, 3.5, 0.1) and (3.5, 0, 0.6) meters within the global reference frame. Each algorithm was executed 20 times and the obstacle avoidance performance is illustrated in Fig. 10. Comparative analysis shows that the adaptive goal-biased RRT* algorithm produces markedly smoother slewing paths and demonstrates enhanced obstacle avoidance in typical excavator operating conditions.
As quantified in Table 5, the proposed adaptive goal-biased RRT* algorithm demonstrates superior performance with a 3.6% shorter average path length, 87.8% faster computation time, 76.8% fewer iterations, and 31.09% improved smoothness compared to conventional methods. These statistically significant improvements collectively generate smoother, more efficient trajectories that better satisfy practical excavator operation requirements for material handling tasks in constrained workspaces.
Obstacle avoidance performance in complex environments
Although initially developed for level-ground excavation scenarios involving soil and dump truck obstacles, the performance of the proposed algorithm was further evaluated in more challenging environments typical of quarries, tunnels, and stockyards. The simulation environment incorporated four large, irregularly arranged obstacles to replicate complex material yard conditions. The four obstacles feature dimensions of (0.5, 1, 2) m, (1.3, 1, 0.5) m, (0.5, 1, 1) m, and (0.5, 1, 2) m respectively, with their centroid coordinates defined at (2.5, −1, 1) m, (2.3, 1.5, 1) m, (1.5, 3, 0.5) m, and (3.5, −2, 1.5) m in the global coordinate system.
As demonstrated in Fig. 11, through 20 independent algorithm executions, the conventional algorithms produce bucket trajectories that pass beneath obstacles, violating fundamental excavator operational constraints. In contrast, the improved adaptive RRT* algorithm successfully generates collision-free paths by navigating above all obstacles. As quantitatively compared in Table 6, the RRT algorithm with adaptive biased sampling demonstrates empirically reasonable trajectory generation despite exhibiting marginally inferior computational performance metrics relative to the two benchmark algorithms in complex scenarios. This empirical observation indicates that the adaptively biased RRT yields kinematically more executable and operationally safer paths—a critical determinant for practical excavator operations. Consequently, the proposed algorithm is recommended as the preferred path planner for real-world implementation.
Validation of trajectory planning method
This study evaluates the obstacle avoidance capability of the proposed method under standard excavator operating conditions. The avoidance algorithm generates key path points for both digging and slewing motions, from which the Cartesian coordinates (x, y, z) of bucket tip are derived. Figure 12 illustrates these critical avoidance waypoints in the operational workspace. Through inverse kinematics transformation, the corresponding joint space angles are calculated and summarized in Table 7.
This study employs quintic NURBS functions for excavator trajectory planning and utilizes a particle swarm optimization algorithm to simultaneously optimize time and jerk, with parameter configurations including a population size of 50, particle position bounds of [0.1, 10], velocity limits of [−1, 1], maximum iterations of 100, and an inertia weight ω = 0.8. The jerk profile, quantified by mean snap, serves as the primary shock indicator, with the algorithm ultimately generating time-optimized trajectories through refined interpolation of the optimized control points.
To reconcile particle swarm optimization’s inherent single-objective formulation with our dual objectives of minimizing operation time and joint jerk, weighting factors λ₁ and λ₂ scalarize this multi-objective problem. Systematic quantification in Table 8 reveals that progressively reducing the temporal weighting coefficient λ₁ from 1.0 to 0.0 increases joint motion time from 15 s to 53 s while decreasing mean jerk from 1.727°/s³ to 0.106°/s³, establishing a fundamental productivity-equipment preservation trade-off where reduced cycle times enhance operational efficiency at the expense of accelerated mechanical degradation from jerk elevation. Consequently, field implementations may deliberately select λ₁ values between 0.3 and 0.7 according to specific operational requirements, while this study adopts the balanced λ₁ = λ₂ = 0.5 configuration as the benchmark for subsequent comparative trajectory analyses. The quintic NURBS-planned trajectories demonstrate superior smoothness, as illustrated in Figs. 13 and 14, with all joint velocities, accelerations, and jerk profiles meeting kinematic boundary conditions.
Comparative results reveal that the optimized trajectories reduce average jerk by 76.9% while increasing operation time from 25 s to 35s—a deliberate trade-off to accommodate hydraulic system constraints and minimize mechanical shock. The velocity, acceleration, and jerk profiles demonstrate significantly reduced fluctuations while remaining within prescribed limits, confirming the method’s effectiveness in achieving smoother motion without violating system performance boundaries.
Figure 15–16 present the optimized velocity and rotational speed profiles for all hydraulic actuators in the working mechanisms. The results demonstrate that each cylinder and motor operates within prescribed speed limits while maintaining stable motion characteristics. Analysis of the aggregated theoretical flow demand, derived from these actuator velocity profiles, indicates a peak requirement of 117.37 L/min. This value remains well within the hydraulic capacity of the system, utilizing only 61.1% of the main pump’s 192 L/min maximum output. The 38.8% flow margin provides substantial allowance for dynamic operational adjustments, confirming that the optimized trajectories successfully achieve both actuator stability and full hydraulic system compatibility.
To validate the obstacle avoidance capability of the proposed trajectory planning method under practical working conditions, we developed a MATLAB-based obstacle environment model. Using balanced weighting coefficients to equally prioritize operational time and mechanical shock minimization, we generated optimized joint trajectories. Forward kinematics analysis of these trajectories produced the final bucket tip path shown in Fig. 17. The results confirm that the proposed method generates kinematically feasible trajectories that smoothly navigate around obstacles while maintaining operational safety. The bucket tip’s motion profile demonstrates precise obstacle avoidance, verifying the method’s effectiveness for real-world excavation applications.
Conclusion
-
(1)
This study proposes a trajectory planning scheme for excavator operations in confined spaces, addressing the challenges posed by complex unstructured environments and the physical constraints of hydraulic actuators. The required flow rates of excavator components during operation are calculated and compared with the maximum output flow rate of the main pump. The maximum speeds of hydraulic cylinders and motors are then used as constraints. Additionally, kinematic constraints and environmental obstacles are incorporated into the planning process. A weighted-sum objective function, combining operation time and joint shock, is employed for trajectory optimization. In practice, the weighting coefficients can be adjusted to balance operation time and joint impact. Simulation results validate the effectiveness of the proposed scheme. The planned trajectories are smooth and collision-free, fully complying with spatial constraints. The joint shock is reduced by 76.92%, and the maximum output flow rate of the main pump is maintained at 117.37 L/min. All hydraulic actuators operate within their prescribed speed limits.
-
(2)
Unlike conventional robotic arms, excavators are heavy-duty machinery that often handle substantial loads, demanding higher stability and safety in path planning. This study proposes an improved goal-biased RRT* obstacle avoidance algorithm incorporating environmental parameters specifically for this unique application. The algorithm utilizes obstacle information as input and introduces dynamic weighting parameters of α and β to establish an adaptive goal-biasing function. Furthermore, accounting for the excavator’s distinctive swing operations, we incorporate a dynamic offset γ calculated from local obstacle density at each node, enabling environment-aware expansion range adjustment. Comparative experiments demonstrate the enhanced algorithm’s superior performance in standard working conditions: 3.65% shorter path length, 64.15% fewer iterations, 67.9% reduced computation time, and 33.4% improved path smoothness. While performance metrics in complex environments show no quantitative improvement, the modified algorithm generates more operationally feasible paths that better satisfy practical excavation requirements. The developed solution offers a technically sound framework for autonomous excavator operations, ensuring both high efficiency and mechanical reliability during task execution.
-
(3)
Although simulation verifications confirm the proposed trajectory planning scheme generates smooth collision-free paths with pre-incorporated safety margins, practical deployment remains subject to three critical implementation challenges: obstacle localization inaccuracies arising from sensory data acquisition errors, uncompensated resistance forces from excavated soil impacting drive systems, and trajectory tracking deviations induced by hydraulic actuation delays - all of which constitute primary focuses for subsequent research.
Data availability
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.
References
Zhang, T. et al. Data-driven excavation trajectory planning for unmanned mining excavator. Autom. Constr. 162, 105395 (2024).
Tan, X. et al. Reinforcement learning-based Trajectory Planning for Continuous Digging of Excavator Working Devices in Trenching Tasks (Computer‐Aided Civil and Infrastructure Engineering, 2025).
Chen, J., Xu, K., Kong, X., Guo, Y. & Ai, C. Research on High-Precision Control of Hydraulic Excavator Based on Optimal Trajectory Planning (IEEE Access, 2024).
Zhang, B., Ye, M., Lian, G., Li, Y. & Xia, B. Comprehensive performance evaluation of an unmanned excavator based on signal stability extraction. Machines 12 (3), 173 (2024).
Feng, H. et al. Multi-objective time-energy-impact optimization for robotic excavator trajectory planning. Autom. Constr. 156, 105094 (2023).
Cupo, A., Cecchin, L., Demir, O. & Fagiano, L. Energy-Optimal trajectory planning for Semi-Autonomous hydraulic excavators. IFAC-PapersOnLine 58 (28), 450–455 (2024).
Ding, H. et al. Trajectory planning and control of large robotic excavators based on inclination-displacement mapping. Autom. Constr. 158, 105209 (2024).
Wang, X., Sun, W., Li, E. & Song, X. Energy-minimum optimization of the intelligent excavating process for large cable shovel through trajectory planning. Struct. Multidisciplinary Optim. 58, 2219–2237 (2018).
Fan, R., Li, Y. & Yang, L. Multiobjective trajectory optimization of intelligent electro-hydraulic shovel. Front. Mech. Eng. 17 (4), 50 (2022).
Yao, Z., Zhao, S., Tan, X., Wei, W. & Wang, Y. Real-time task-oriented continuous digging trajectory planning for excavator arms. Autom. Constr. 152, 104916 (2023).
Tan X, Chen C, Yao Z, et al. Bio-inspired Excavator Digging Trajectory Planning: Insights from Mole Digging Patterns[J]. Journal of Bionic Engineering, 22(3), 1287–1303 (2025).
Huh, J. et al. Deep learning-based autonomous excavation: a bucket-trajectory planning algorithm. IEEE Access. 11, 38047–38060 (2023).
Zhuang, M., Li, G. & Ding, K. Obstacle avoidance path planning for Apple picking robotic arm incorporating artificial potential field and A* algorithm. IEEE Access. 11, 100070–100082 (2023).
Zhu, H., Ouyang, H. & Xi, H. Neural network-based time optimal trajectory planning method for rotary cranes with obstacle avoidance. Mech. Syst. Signal Process. 185, 109777 (2023).
Zhang, Z., Liu, X. & Feng, B. Research on obstacle avoidance path planning of UAV in complex environments based on improved Bézier curve. Sci. Rep. 13 (1), 16453 (2023).
Zhou, X., Wang, X., Xie, Z., Li, F. & Gu, X. Online obstacle avoidance path planning and application for Arc welding robot. Robot. Comput. Integr. Manuf. 78, 102413 (2022).
Yang, F. et al. Obstacle avoidance path planning for UAV based on improved RRT algorithm. Discrete Dynamics Nat. Soc. 2022(1), 4544499 (2022).
Rafai, A. N. A., Adzhar, N. & Jaini, N. I. A review on path planning and obstacle avoidance algorithms for autonomous mobile robots. J. Rob. 2022 (1), 2538220 (2022).
Wu, N., Jia, D., Li, Z. & He, Z. Trajectory planning of robotic arm based on particle swarm optimization algorithm. Appl. Sci. 14 (18), 8234 (2024).
LaValle, S. M. & Kuffner, J. J. Rapidly-exploring random trees: Progress and prospects: Steven m. lavalle, iowa state university, a james j. kuffner, jr., university of tokyo, tokyo, japan. Algorithmic and computational robotics, 303–307. (2001).
Wang, X., Ma, X., Li, X., Ma, X. & Li, C. Target-biased informed trees: Sampling-based method for optimal motion planning in complex environments. J. Comput. Des. Eng. 9 (2), 755–771 (2022).
Funding
This work was supported by the National Key Research and Development Program of China (2023YFB3406601), National Natural Science Foundation of China (U24A20110 & 52375054 & 52475058) and Excellent Outstanding Youth Foundation of Fujian Province of China (2024J010029).
Author information
Authors and Affiliations
Contributions
S. F., C. L., Z.Y., Q.C., and T.L. wrote the main manuscript text and S.F. prepared all figures. All authors reviewed the manuscript.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Fu, S., Lin, C., Yao, Z. et al. Obstacle-avoidance trajectory planning method for excavators in confined spaces based on improved RRT* algorithm. Sci Rep 16, 2206 (2026). https://doi.org/10.1038/s41598-025-17788-3
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41598-025-17788-3



















