With the development and maturity of the automated robotics industry, more and more apple plantations are introducing automated picking robotic arms for fruit picking. However, the complex environment in which apple fruit is picked has made it an urgent problem to optimise the robot's picking performance through obstacle avoidance path planning. The experiment selects the Six degrees of freedom manipulator as the research object, and on the basis of its Kinematics analysis, introduces the introduction of artificial potential field (APF) to carry out the path planning of the manipulator. At the same time, it integrates it with A * algorithm to jointly achieve the optimization of the parameters of the obstacle avoidance path of the manipulator. In addition, in order to avoid parameter optimization falling into local extremum during the path planning process, the IRRT algorithm is incorporated to re plan the path, improve the smoothness of the path, and finally verify its obstacle avoidance effect through simulation experiments. The results showed that in the convergence comparison, the research method had the minimum loss function value and the stable fitness value as soon as the iteration proceeded to the 50th and 20th generation, respectively. A On the dataset, the research method had the minimum MAPE value when the iteration proceeded to the 45th generation, with a value close to 0. At the same moment, the MAPE values of the IAPF algorithm, the IRRT algorithm and the literature were 0.052%, 0.108% and 0.218%, respectively. In the practical application analysis, when the robot arm starts running in three different starting positions a, b and c, the IRRT algorithm's obstacle avoidance path has a larger arc and tends to reach the target location through a longer path, while the research method tends to find a relatively closer obstacle avoidance path that can be passed smoothly. The above results show that the research method is highly adaptable to robotic arm path avoidance planning and can complete obstacle avoidance path planning faster and more reasonably, providing new technical support for optimising the path planning system of apple picking robots.INDEX TERMS Robotic arm, obstacle avoidance path planning, APF, A * algorithm.