Abstract:Objective To enhance sorting efficiency and motion stability and to address problems in robotic arm trajectory planning in food sorting scenarios, such as long operation time, large joint motion impact, and the tendency of algorithms to fall into local optima.Methods Taking the UR5 six-degree-of-freedom food sorting robotic arm as the research object, a time-optimal trajectory planning method based on an improved fruit fly optimization algorithm (IFOA) was proposed. First, a kinematic model of the robotic arm was established, and its forward and inverse kinematic equations were solved. On this basis, a 3-5-3 piecewise polynomial interpolation method was adopted to construct a smooth joint-space motion trajectory. With the objective of minimizing the total operation time of the robotic arm, and under the constraints of joint angles, velocities, and accelerations, the IFOA was used to optimize the operation time of each segment of the 3-5-3 polynomial.Results In algorithm performance tests, compared with the traditional fruit fly optimization algorithm (FOA), particle swarm optimization (PSO), and the improved whale optimization algorithm (IWOA), the IFOA improved the optimal solution accuracy by 1-2 orders of magnitude on unimodal test functions. On multimodal test functions, the optimization success rate of the IFOA increased by 35%. In the robotic arm sorting trajectory planning experiment, the average operation time of the robotic arm optimized by the IFOA was 7.12 s, which was reduced by 22.36%, 18.57%, and 9.82% compared with FOA, PSO, and IWOA, respectively. In addition, the smoothness of the joint angular velocity and angular acceleration curves improved by 40%.Conclusion The proposed IFOA algorithm can effectively shorten the operation time of food sorting robotic arms and improve their motion stability.