**5. Conclusions**

A time-optimal RRT algorithm based on the characteristics of the complex environment of citrus trees was proposed in this paper. The constructed algorithm had an attractive potential field and a repulsive potential field for the target node and obstacle, respectively. In addition, dynamic adjustment of the probability threshold under the action of the superimposed potential field was achieved, and a node-first search strategy was used to solve the "falling into a trap" problem. In addition, an attractive step size and a "stepsize dichotomy" were introduced in this algorithm so that the random tree could expand the step size as much as possible on the premise of reducing the number of collisions. Finally, a regression superposition algorithm was used to improve the search efficiency of the random tree in the range of the obstacle repulsive potential field. The TO-RRT algorithm was simulated in complex environments, and the motion-planning of the Franka manipulator was carried out using Robotics Toolbox and MoveIt! It can be seen from the simulation results that the TO-RRT algorithm had fewer tree nodes, collision detection times, and failed growth times, so this algorithm had a shorter planning time than the RRT algorithm, the biased-RRT algorithm, the RRT-BCR algorithm, and the NC-RRT algorithm, especially when the random tree faced a large obstacle area. To obtain the performance of the algorithm in real work, we built a real picking environment indoors. Through the performance evaluation of various indicators of the different algorithms, it was proved that the TO-RRT algorithm still had a good performance in movement time.

**Author Contributions:** Conceptualization, C.L., L.X. and Q.F.; methodology, C.L., L.X. and Q.F.; software, C.L., Z.T. and X.W.; writing—original draft preparation, C.L. and L.X.; writing—review and editing, C.L., L.X. and Q.F.; visualization, C.L., Z.T., J.G. and X.W.; supervision, L.X. and Q.F.; funding acquisition, L.X. and Q.F. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Beijing Science and Technology Plan Project: Z201100008020009; Key R&D project of Science and Technology Department of Sichuan Province: 2020YFN0025; Key Projects of Innovation and Entrepreneurship of Sichuan Science and Technology Department: 2021JDRC0091; Chengdu Technology Innovation R&D Project: 2021-YF05-01744-SN.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data are contained within the article.

**Conflicts of Interest:** The authors declare no conflict of interest.
