Abstract:
To address the challenges of low picking efficiency, slow path planning, and poor path smoothness of robotic arms for safflower harvesting in unstructured environments, this study introduced a picking area clustering method and a Target redirecting rapidly-exploring random tree (TR-RRT*) path planning algorithm. First, based on the spatial distribution characteristics of safflower seed balls under natural conditions and a spatial analysis of roller-based picking operations, a roller-based end-effector with an effective picking area of 5 cm × 20 cm was designed. A picking point clustering algorithm was also developed to divide the working range of the robotic arm into multiple sub-areas. Each cluster was designed to cover 1~3 picking points, enabling the end-effector to harvest 1~3 safflowers in a single operation. Building on this, a goal redirecting strategy, a goal-direct and deflection expansion strategy, and an artificial potential field tangential escape force strategy were integrated into the bidirectional RRT* framework to improve path search efficiency and obstacle avoidance. The goal redirecting strategy continuously updated target points during expansion to quickly connect paths within opportunity windows. The goal-direct and deflection expansion strategy allowed both search trees to extend from the nodes closest to the goal, maximizing progress toward the target while deflecting to avoid obstacles. The tangential escape force strategy introduced a tangential component into the traditional artificial potential field, enabling smooth sliding along obstacle boundaries when approaching them, effectively avoiding the issues of path oscillation and target unreachability inherent in traditional APF. For path optimization, a combined approach using a greedy jump-point strategy, interpolated curvature optimization, and B-spline curve fitting was applied to smoothly adjust the curvature of path nodes and generate high-order continuous trajectories. An obstacle avoidance reconstruction mechanism was also introduced to prevent trajectory penetration through obstacles, ensuring continuous, collision-free, and smooth motion of the robotic arm. Simulation experiments compared the TR-RRT* algorithm with seven other algorithms in dense, small-obstacle environments. The results demonstrated its superior performance in complex obstacle environments: path lengths(3 892.05 mm) were shortened by 9.16% and 8.22% compared to IBI-P-RRT*(4 284.44 mm) and BI-RRT*(4 240.45 mm), respectively; average planning time(0.3 s) was only 7.94% of that of RRT*(3.78 s) and 69.77% of BI-RRT*(0.43 s). Additionally, the steering angles of BI-RRT*(37.51°) and BI-APF-RRT*(39.61°) were 1.22 and 1.29 times larger than those of the proposed algorithm(30.63°), indicating significantly improved path smoothness. Additionally, statistical quantitative experiments were conducted for the algorithm in different obstacle environments. The proposed algorithm achieved optimal performance in both path length and time consumption across various environments. Moreover, in narrow passage obstacle environments, the TR-RRT* algorithm successfully planned paths, overcoming the tendency of traditional artificial potential field (APF) methods to fall into local oscillations and fail to plan paths in such scenarios. Physical harvesting tests further validated the effectiveness of the proposed clustering method and TR-RRT* algorithm. The robotic arm took an average of 3.64 s to move from the initial position to the first target point, with an average transfer time of 3.12 s between tasks. The average positional error relative to the robotic arm's workspace was less than 0.9%, confirming stable and efficient safflower harvesting performance.