Abstract:In response to the issue that existing trajectory obstacle avoidance algorithms based on dynamic movement primitives (DMPs) cannot simultaneously preserve trajectory characteristics and ensure smoothness, this paper proposes a trajectory smoothing and obstacle avoidance method based on piecewise dynamic movement primitives. The method segments the trajectory in the obstacle regions, constructs dynamic movement primitive models for each segment, and then finds a fusion point outside the obstacle to perform piecewise generalization, thereby obtaining an obstacle-free trajectory that preserves the characteristics of the original trajectory. On this basis, a real-time trajectory smoothing method based on virtual target points is employed to handle sharp corners at critical points, resulting in a smooth obstacle avoidance trajectory. To validate the effectiveness of the proposed method, both simulation experiments and real-world six-axis robot trajectory avoidance experiments are designed and compared with existing improved dynamic movement primitive algorithms. Experimental results demonstrate that the obstacle avoidance trajectory generated by the proposed method not only better preserves the features of the original trajectory but also has advantages in terms of trajectory smoothness, thereby confirming the effectiveness of the method.