A Robot Trajectory Learning Method and System Based on Surface Dynamic Motion Primitives

By using a method based on surface dynamic motion primitives, the obstacle avoidance problem of traditional DMPs in scenarios with dynamic surface changes is solved, realizing adaptive planning and safe obstacle avoidance of robot trajectories, and improving the robustness and adaptability of trajectory planning.

CN122125683APending Publication Date: 2026-06-02WUXI XIGANGHU LINGQIAO ROBOT CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUXI XIGANGHU LINGQIAO ROBOT CO LTD
Filing Date
2026-01-30
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In the field of intelligent manufacturing, existing technologies in robot trajectory planning methods and systems struggle to handle semi-structured uncertainties in industrial scenarios, especially interference from moving obstacles and vibrations. Traditional DMPs cannot adapt to dynamic changes in curved surfaces, resulting in unstable trajectory planning and poor obstacle avoidance performance.

Method used

By directly learning the characteristics of variable surfaces using a method based on surface dynamic motion primitives, the spatial information of the demonstration trajectory and the dynamic obstacle avoidance requirements are integrated into the surface DMPs framework to generate dynamic obstacle avoidance surfaces, thereby achieving adaptive trajectory planning and safe obstacle avoidance.

Benefits of technology

It achieves high-fidelity, adaptive planning of robot trajectories, can respond to changes in obstacles in real time, improves the robustness and safety of trajectory planning, and adapts to the dynamic obstacle avoidance requirements of complex industrial scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122125683A_ABST
    Figure CN122125683A_ABST
Patent Text Reader

Abstract

This invention discloses a robot trajectory learning method and system based on surface dynamic motion primitives. The method includes: acquiring multiple teaching trajectories, parameterizing and rotating the trajectory sampling points to construct a reference coordinate system; learning trajectory features in the u and v directions based on the DMPs framework, and generating a static surface through Gaussian smoothing and weighted averaging; modeling obstacles using ellipsoids, designing dynamic obstacle avoidance coupling terms embedded in the DMPs formula to enable real-time bending of the surface for obstacle avoidance; learning velocity and acceleration information through classical DMPs, and combining it with parameter mapping of the starting / target position of the new task to generate an obstacle avoidance trajectory and control the robot's motion. This invention solves the problems of traditional DMPs being unable to directly learn surfaces, having lag in obstacle avoidance response, and losing spatial information, improving the robot's trajectory adaptability and real-time obstacle avoidance capability in semi-structured environments, and ensuring assembly accuracy and safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing technology, and more specifically, to a robot trajectory learning method and system based on surface dynamic motion primitives. Background Technology

[0002] In the field of intelligent manufacturing, robotic assembly technology has gradually become a core carrier for improving production flexibility and precision, and generating the robot's motion trajectory is a key step in the robotic assembly process. Traditional motion planning methods based on analytical models (such as spline interpolation and optimal control), while exhibiting stable performance in structured environments, struggle to handle semi-structured uncertainties common in industrial scenarios, such as interference from moving obstacles and vibration. To overcome this technical bottleneck, the skill learning paradigm has emerged. This paradigm replaces hard-coded rules with data-driven methods to generate motion strategies, significantly improving the system's environmental adaptability. Among these, learning from demonstrations (LfD) technology, due to its ability to efficiently transfer the operational experience of human experts, has become the preferred technical solution for solving complex assembly tasks.

[0003] The core of LfD technology lies in transforming demonstration data into generalizable motion representations. Currently, several technical paths have emerged: First, behavior cloning technology, which enables end-to-end skill replication; second, inverse reinforcement learning technology, which can infer optimization goals from demonstration data; third, Gaussian mixture models (GMM) and their extended task parameterized GMM (TP-GMM), which can process multimodal demonstration data with the help of probabilistic modeling; and fourth, the motion primitive (MP) framework, which is widely used due to its structured representation and modular combination features. It includes technologies such as probabilistic motion primitives (ProMP), kernel motion primitives (KMP), and dynamic motion primitives (DMPs), and DMPs have spawned improved versions such as RDMP, TDMP, MeshDMP, and Geo-DMP. Meanwhile, in the field of robot trajectory obstacle avoidance technology, related research has proposed a variety of solutions, including using Gaussian surface model (GSM) to extract environmental surface features as obstacle avoidance reference, and obstacle avoidance strategies based on DMPs, such as introducing impedance factor to transform target points, adding hard geometric constraints to restrict the position of trajectory points, embedding obstacle avoidance constraints by combining control barrier function (CBF), and adding coupling terms to the formula to act as obstacle avoidance forces.

[0004] Existing LfD-related technologies and derivative solutions still have many shortcomings, making it difficult to meet the needs of precision assembly scenarios: First, behavior cloning technology is affected by the distribution transfer effect, resulting in poor performance stability on physical platforms; the computational complexity of inverse reinforcement learning technology is high, limiting the real-time response performance of the system; the trajectories generated by GMM and TP-GMM have dynamic response lag issues, failing to meet the millisecond-level force feedback requirements in shaft-hole assembly tasks. Second, various technologies under the motion primitive framework have significant shortcomings. ProMP, due to the global clock constraint of phase variables, cannot achieve real-time replanning when the assembly process is interrupted; KMP has too high a computational load, making it difficult to embed into a real-time controller; the trajectories generated by traditional DMPs and their improved versions RDMP and TDMP cannot effectively retain the learned spatial information when the robot's initial and target positions change, making it prone to collisions with obstacles in the scene; although MeshDMP and Geo-DMP can achieve surface trajectory generation, both first fit the surface and then map the trajectory to the surface. DMPs do not participate in the surface generation process and cannot adjust in real time when the surface dynamically changes, making it difficult to respond to scene changes. Thirdly, in terms of obstacle avoidance technology, existing obstacle avoidance methods based on DMP coupling terms can only achieve obstacle avoidance control of the trajectory of 3D DMPs, and have not yet involved the adjustment of the surface shape of DMPs, which cannot adapt to the obstacle avoidance requirements in scenarios with dynamic surface changes. Summary of the Invention

[0005] To address the aforementioned shortcomings or improvement needs of existing technologies, this invention provides a robot trajectory learning method and system based on surface dynamic motion primitives (DMPs). Leveraging the characteristics of DMPs for directly learning variable surfaces, it integrates the spatial information of the demonstration trajectory and dynamic obstacle avoidance requirements into a unified surface DMP framework description, achieving coordinated representation of spatial features and obstacle avoidance functions, and ensuring high-fidelity retention of the trajectory based on demonstration experience. Simultaneously, utilizing the real-time adjustment capability of dynamic obstacle avoidance coupling terms, it transforms static surface learning into dynamic obstacle avoidance surface generation, expanding the applicability of traditional DMPs from curves to dynamic surfaces, adapting to the needs of dynamically changing obstacles in semi-structured environments, and achieving adaptive planning and safe obstacle avoidance of the robot's motion trajectory.

[0006] To achieve the above objectives, this invention provides a robot trajectory learning method based on surface dynamic motion primitives, comprising the following steps: S100: First, the robot is taught multiple trajectories by a human. The coordinates of each trajectory are parametrically processed and rotated sequentially to establish a regular and symmetrical reference coordinate system. Then, the target area is divided by a grid, and trajectory projections are extracted from different sections as demonstration data. The DMPs method is used to learn and calculate the surface point set. After smoothing and optimization, the surfaces corresponding to multiple trajectories are spliced ​​and weighted to form a static surface containing the spatial information of the demonstration trajectory. S200: Based on the above static surface, first use an ellipsoid to surround and represent the obstacle to be avoided, and determine the positional relationship between the trajectory corresponding to the static surface and the obstacle; if a collision risk is determined, calculate the obstacle avoidance coupling term and embed it into the DMPs formula, and then substitute the formula into the aforementioned static surface learning framework to recalculate iteratively, so that the surface undergoes adaptive bending at the obstacle position, generating a dynamic surface that can actively avoid obstacles; S300: Based on the generated dynamic obstacle avoidance surface, the robot first learns velocity and acceleration information from the demonstration trajectory using classic DMPs. Then, it maps the robot's new starting point and target point to the parameter space and generates an initial obstacle avoidance trajectory on the dynamic surface. If the starting point and target point are not on the surface and are close to each other, the robot connects the trajectory by finding the nearest point on the surface. If the distance is too far, the surface learning process is restarted. Finally, by combining the learned velocity and acceleration information, the robot is precisely controlled to complete the movement along the obstacle avoidance trajectory, thus achieving a closed loop of trajectory planning and motion control.

[0007] Furthermore, the parameterization processing of the trajectory coordinates in step S100 parameterizes the x and y coordinates of the sampling points on the trajectory using u and v, satisfying: , in These represent the x and y coordinates of the starting and ending points of the trajectory, respectively. and This represents the x and y coordinates of the i-th sampling point on the demonstration trajectory. It is a rotation matrix used to rotate the original trajectory so that the line connecting the start and end points forms a 45º angle with the x-axis.

[0008] Furthermore, the rotation matrix for: , in This represents a vector from its starting point to its ending point. Projection on a plane and The angle formed by the axis.

[0009] Furthermore, the formula for surface smoothing optimization in step S100 is: , in W is the window size selected by Gaussian smoothing. It is a two-dimensional Gaussian kernel.

[0010] Furthermore, the two-dimensional Gaussian kernel Defined as: , in This represents the standard deviation, which is usually related to the window size W and is approximately W / 5.

[0011] Furthermore, the DMPs formula mentioned in step S200 is: , in This represents a cross-section taken in space. It is an auxiliary variable related to velocity, and u is a position variable. It is the target location. It is a gain parameter that controls the convergence rate and damping, and is usually set as the critical resistance. , Indicates phase.

[0012] Further, the ellipsoid described in step S200 is represented as: , in It is the center of the ellipsoid. It is A symmetric positive definite matrix that contains all the information about the size, shape, and orientation of the ellipsoid.

[0013] Further, the obstacle avoidance coupling term in step S200 is: , in It is the obstacle avoidance strength factor. It is the vertical penetration factor.

[0014] Furthermore, the vertical penetration factor Represented as: , in ; ,for Characteristic quantities relating to the positional relationship with the ellipsoid; .

[0015] A robot trajectory learning system based on surface dynamic motion primitives, applying the aforementioned robot trajectory learning method based on surface dynamic motion primitives, is characterized by comprising: The static surface learning module receives multiple trajectories from manual instruction, establishes a regular symmetrical reference coordinate system through coordinate parameterization and rotation transformation, extracts the cross-sectional trajectory projection as demonstration data through meshing, calculates the surface point set using the DMPs method and performs Gaussian smoothing, and finally splices and weights the surfaces corresponding to multiple trajectories to output a static surface containing the spatial characteristics of the demonstration trajectory, laying the foundation for subsequent dynamic adjustments.

[0016] Dynamic obstacle avoidance surface learning module: Based on the static surface generated in the previous step, the module uses an ellipsoid to represent the obstacle to be avoided and judges the collision risk between the trajectory and the obstacle. If a collision occurs, the module calculates the obstacle avoidance coupling term and embeds the DMPs formula. The module is then substituted back into the static surface learning framework for iterative calculation, so that the surface is adaptively bent at the obstacle position, and the output is an obstacle avoidance surface that can respond to the dynamic changes of the obstacle in real time.

[0017] Robot motion control module: Learns velocity and acceleration information from the demonstration trajectory using classic DMPs, maps the robot's new starting point and target point to the parameter space, and generates an initial trajectory on the dynamic obstacle avoidance surface; based on the distance between the starting point, target point and the surface, the trajectory is adjusted by connecting the nearest point on the surface or by relearning, and finally outputs control commands by combining velocity and acceleration information to drive the robot to move precisely along the obstacle avoidance trajectory.

[0018] In summary, compared with the prior art, the above-described technical solutions conceived by this invention can achieve the following beneficial effects: 1. The method of this invention performs parametric modeling, cross-sectional trajectory learning, and Gaussian smoothing on multiple demonstration trajectories, extending traditional DMPs technology into a framework for autonomously learning dynamic surfaces. It accurately extracts the hidden three-dimensional spatial structure information of the trajectory, constructs a complete spatial surface model that fits the demonstration experience, and breaks through the limitation of traditional DMPs that can only generate a single spatial curve. This allows the robot to flexibly adapt to the dynamic changes of the starting / target points based on the global features of the surface, be compatible with the complex layout of semi-structured environments, and plan a more adaptive, accurate, and safe motion path, greatly improving the robustness of trajectory planning and its adaptability to actual operations.

[0019] 2. The method of this invention innovatively embeds a coupling term based on the dynamic characteristics of obstacles into the curved surface DMPs framework. By modeling with an ellipsoid, it accurately represents the position, shape, and size of obstacles. Combined with the vertical penetration factor, it calculates the spatial relationship between the trajectory and the obstacle in real time, dynamically outputs the obstacle avoidance adjustment force, and drives the curved surface to adaptively bend and deform in the obstacle area. This enables real-time avoidance of both static and moving obstacles, overcoming the bottleneck of traditional DMPs obstacle avoidance technology, which can only control three-dimensional trajectories and cannot make dynamic adjustments at the curved surface level. It effectively solves the dynamic obstacle avoidance problem in industrial scenarios such as precision assembly and grinding of robots, while taking into account both high fidelity of skill transfer and operational safety and continuity.

[0020] 3. The system of this invention, by constructing a novel DMPs learning framework, overcomes the limitations of traditional DMPs and improved solutions, which can only generate spatial curves and cannot directly learn variable surfaces. It achieves accurate learning of static surfaces containing spatial features of the demonstration trajectory. Furthermore, by embedding dynamic obstacle avoidance coupling terms into the surface DMPs framework, the generated surface can adaptively bend according to obstacle spatial information, actively avoiding obstacles while conforming to the core features of the demonstration trajectory. This effectively solves the collision problem caused by semi-structured uncertainties such as moving obstacles and vibration interference in scenarios such as industrial assembly. At the same time, the surface can be dynamically generated and adjusted in real time according to the changes in obstacles. Combined with the low computational load of the DMPs core framework and the collaborative learning of velocity and acceleration information, it not only ensures the real-time response capability of trajectory planning but also improves the accuracy and stability of the robot's motion trajectory, perfectly adapting to the needs of complex industrial scenarios such as precision assembly that have high requirements for trajectory accuracy and flexibility. Attached Figure Description

[0021] Figure 1 This is a flowchart of a robot trajectory learning method based on surface dynamic motion primitives according to an embodiment of the present invention; Figure 2 A flowchart for generating dynamic obstacle avoidance surfaces for embodiments of the present invention; Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0023] This invention proposes a novel DMPs learning framework that can learn spatial surface information from a demonstration trajectory and plan the robot's end effector trajectory on this surface. By adding a dynamic obstacle avoidance coupling term 'c' to the proposed surface DMPs framework, the learned surface can avoid obstacles while preserving the spatial characteristics of the demonstration trajectory. Since the robot's trajectory is planned on this surface, the robot's motion trajectory can thus achieve obstacle avoidance.

[0024] like Figure 1 As shown, the robot trajectory learning method based on surface dynamic motion primitives in this invention includes the following steps: S100: First, the robot is taught multiple trajectories by a human. The coordinates of each trajectory are parametrically processed and rotated in sequence to establish a regular and symmetrical reference coordinate system. Then, the target area is divided by a grid, and the trajectory projections are extracted from different sections as demonstration data. The DMPs method is used to learn and calculate the surface point set. After smoothing and optimization, the surfaces corresponding to multiple trajectories are spliced ​​and weighted to form a static surface containing the spatial information of the demonstration trajectory.

[0025] S200: Based on the above static surface, first use an ellipsoid to surround and characterize the obstacle to be avoided, and determine the positional relationship between the trajectory corresponding to the static surface and the obstacle; if it is determined that there is a collision risk, calculate the obstacle avoidance coupling term and embed it into the DMPs formula, and then substitute the formula into the aforementioned static surface learning framework to re-iterate and calculate, so that the surface undergoes adaptive bending at the obstacle position, generating a dynamic surface that can actively avoid obstacles.

[0026] S300: Based on the generated dynamic obstacle avoidance surface, the robot first learns velocity and acceleration information from the demonstration trajectory using classic DMPs. Then, it maps the robot's new starting point and target point to the parameter space and generates an initial obstacle avoidance trajectory on the dynamic surface. If the starting point and target point are not on the surface and are close to each other, the robot connects the trajectory by finding the nearest point on the surface. If the distance is too far, the surface learning process is restarted. Finally, by combining the learned velocity and acceleration information, the robot is precisely controlled to complete the movement along the obstacle avoidance trajectory, thus achieving a closed loop of trajectory planning and motion control.

[0027] Figure 2 The workflow diagram for generating dynamic obstacle avoidance surfaces is as follows: The surface dynamic management platform (DMP) proposed in this patent can generate a surface by processing multiple demonstration trajectories and obstacle information, and obtain the obstacle avoidance trajectory on the generated surface. Furthermore, the proposed DMP can learn the temporal information in the demonstration trajectory to obtain velocity and acceleration, thereby controlling the motion of the obstacle avoidance trajectory. It includes the following components: (1) Static Surface Learning in DMPs. Assume there are M trajectories in the demonstration. For each trajectory, the x and y coordinates of the sampling points on that trajectory are parameterized by u and v as follows: (1), in These represent the x and y coordinates of the starting and ending points of the trajectory, respectively. and This represents the x and y coordinates of the i-th sampling point on the demonstration trajectory. It is a rotation matrix used to rotate the original trajectory so that the line connecting the start and end points forms a 45° angle with the x-axis. This alignment operation ensures that the subsequently generated surface lies precisely within a square region with the line connecting the start and end points as its diagonal, thus obtaining a regular symmetric reference coordinate system for surface construction. for: (2), in This represents a vector from its starting point to its ending point. Projection on a plane and The angle formed by the axis.

[0028] Let the surface be Establish The learned surface is represented by a mesh. N cross sections are taken along the u and v directions. For each cross section... The projection of the trajectory onto this cross section is taken as the demonstration trajectory for learning, and the DMPs learning formula is applied: (3), in This represents a cross-section taken in space. It is an auxiliary variable related to velocity, and u is a position variable. It is the target location. It is a gain parameter that controls the convergence rate and damping, and is usually set as the critical resistance. , Indicates phase.

[0029] The weight matrix is ​​calculated using traditional DMPs methods. Then gain what you've learned. Then, the value of z is solved using Euler's integral: (4), in The integration step size is, i.e. .

[0030] For the trajectory learned on each cross section, N points are selected as data points, thus a common trajectory can be obtained on these N cross sections. Each point is considered as a learning surface. .

[0031] Similarly, N cross-sections are selected in the u direction. The DMPs formula is then used to learn the shape of the cross-sectional trajectory. (5), This allows us to obtain the set of surface points learned in the u direction. This allows us to obtain two sets of surface points that correspond to the same grid points u and v, but have different z-coordinates. and By averaging the z-coordinates of points with the same u and v coordinates in the two groups, we can obtain: (6), Let Z be a point on the surface, and then perform Gaussian smoothing on the resulting surface z: (7), in W is the window size selected by Gaussian smoothing. It is a two-dimensional Gaussian kernel, defined as: (8), in This represents the standard deviation, which is usually related to the window size W and is approximately W / 5.

[0032] For each demonstration trajectory, a corresponding static surface can be obtained. If there are M demonstration trajectories that need to be learned, then M surfaces are learned separately, and these surfaces are combined by operations such as splicing and weighted averaging to form a larger surface for generating trajectories.

[0033] (2) Learning the dynamic obstacle avoidance surface. To facilitate the analysis of the positional relationship between the trajectory and the obstacle, the obstacle to be avoided is first enclosed by an ellipsoid, and the ellipsoid is represented as: (9), in It is the center of the ellipsoid, M is a A symmetric positive definite matrix that contains all information about the size, shape, and orientation of the ellipsoid. Dividing M by... The ellipsoid can be magnified by a factor of k to allow space for obstacle avoidance. When using the Euler integral to generate the cross-sectional learning trajectory, let the coordinates of the current integration point be... From this, we can obtain the representation. Characteristic quantities of the positional relationship with the ellipsoid: (10), when When, it indicates that the current trajectory has not encountered any obstacles, and the vertical penetration factor of the coupling term c. ;when At that time, it indicates that the trajectory will collide with the obstacle and penetrate the cause. It can be obtained from the following formula: First set The perpendicular ray to the point is: (11), in Let the offset vector be... Then the points on the ray are: (12), Substituting (12) into the ellipsoidal expression (9) yields: (13), The results were: (14), make Ultimately, we can obtain: (15), From this, the vertical penetration factor can be obtained. The expression: (16), Therefore, the coupling term c used to generate the obstacle avoidance force can be obtained as follows: (17), in It is the obstacle avoidance strength factor.

[0034] Therefore, when using Euler integrals to generate the learning surface in the u direction, the DMPs formula becomes: (18), Similarly, in the v direction, the formula becomes: (19), By substituting the DMPs formula with added coupling term c into the surface DMPs learning framework described above for calculation, the surface that can bypass obstacles can eventually be learned.

[0035] (3) Controlling the robot's end effector movement through DMPs. The two DMP learning steps above only produce a spatial surface that does not contain velocity and acceleration. In addition, we need to learn velocity and acceleration information from the demonstration trajectory in order to control the robot to move along a trajectory that can avoid obstacles.

[0036] If there are M demonstration trajectories, select the y-coordinate of one of the trajectories for classic DMPs learning: (20), Given a new starting point and a target point for the robot, map the xy coordinates of the new starting and target positions to the parameter space. In the middle, and then A straight line connects the starting and target points on a plane. The z-value is then obtained on the learning surface based on the uv coordinates on the line, thus generating the obstacle avoidance trajectory. Since the obstacle moves in real time, the surface is also generated in real time, enabling real-time generation of the obstacle avoidance trajectory. The velocity, acceleration, and position information in the y-direction learned from classic DMPs are then combined with the generated curve to obtain the velocity and acceleration in the x and z directions, thereby achieving the control of the robot's motion.

[0037] If the starting point A and the target point B are not on the learning surface, and the starting point and the target point are not far from the surface, then find the points A' and B' on the surface that are closest to the starting point A and the target point B. Then, generate the trajectory of the line connecting these two points on the surface. Subsequently, the robot's end effector first moves along a straight line to point A', then along the surface to point B', and finally along a straight line to point B. If the learned DMPs surface between the starting point and the target point is too far away, it indicates a significant difference between the trajectory from A to B and the demonstrated trajectory. In this case, the learning process should be rebuilt.

[0038] The method of this invention performs parametric modeling, cross-sectional trajectory learning, and Gaussian smoothing on multiple demonstration trajectories, extending traditional DMPs technology into a framework that can autonomously learn dynamic surfaces. It accurately extracts the hidden three-dimensional spatial structure information of the trajectory, constructs a complete spatial surface model that fits the demonstration experience, and breaks through the limitation of traditional DMPs that can only generate a single spatial curve. This allows the robot to flexibly adapt to the dynamic changes of the starting / target points based on the global features of the surface, be compatible with the complex layout of semi-structured environments, and plan a more adaptive, accurate, and safe motion path, greatly improving the robustness of trajectory planning and its adaptability to actual operations. Meanwhile, the method of this invention innovatively embeds a coupling term based on the dynamic characteristics of obstacles into the curved surface DMPs framework. By modeling with an ellipsoid, it accurately represents the position, shape, and size of obstacles. Combined with the vertical penetration factor, it calculates the spatial relationship between the trajectory and the obstacle in real time, dynamically outputs the obstacle avoidance adjustment force, and drives the curved surface to adaptively bend and deform in the obstacle area. This enables real-time avoidance of both static and moving obstacles, overcoming the bottleneck of traditional DMPs obstacle avoidance technology, which can only control three-dimensional trajectories and cannot make dynamic adjustments at the curved surface level. It effectively solves the dynamic obstacle avoidance problem in industrial scenarios such as precision assembly and grinding of robots, while taking into account the high fidelity of skill transfer and the safety and continuity of operation.

[0039] In another embodiment of the present invention, a robot trajectory learning system based on surface dynamic motion primitives is provided, which applies a robot trajectory learning method based on surface dynamic motion primitives, including: The static surface learning module receives multiple trajectories from manual instruction, establishes a regular symmetrical reference coordinate system through coordinate parameterization and rotation transformation, extracts the cross-sectional trajectory projection as demonstration data through meshing, calculates the surface point set using the DMPs method and performs Gaussian smoothing, and finally splices and weights the surfaces corresponding to multiple trajectories to output a static surface containing the spatial characteristics of the demonstration trajectory, laying the foundation for subsequent dynamic adjustments.

[0040] Dynamic obstacle avoidance surface learning module: Based on the static surface generated in the previous step, the module uses an ellipsoid to represent the obstacle to be avoided and judges the collision risk between the trajectory and the obstacle. If a collision occurs, the module calculates the obstacle avoidance coupling term and embeds the DMPs formula. The module is then substituted back into the static surface learning framework for iterative calculation, so that the surface is adaptively bent at the obstacle position, and the output is an obstacle avoidance surface that can respond to the dynamic changes of the obstacle in real time.

[0041] Robot motion control module: Learns velocity and acceleration information from the demonstration trajectory using classic DMPs, maps the robot's new starting point and target point to the parameter space, and generates an initial trajectory on the dynamic obstacle avoidance surface; based on the distance between the starting point, target point and the surface, the trajectory is adjusted by connecting the nearest point on the surface or by relearning, and finally outputs control commands by combining velocity and acceleration information to drive the robot to move precisely along the obstacle avoidance trajectory.

[0042] This invention relates to a robot trajectory learning system based on surface dynamic motion primitives (DMPs). By constructing a novel DMPs learning framework, it overcomes the limitations of traditional DMPs and improved solutions, which can only generate spatial curves and cannot directly learn variable surfaces. It achieves accurate learning of static surfaces containing the spatial characteristics of the demonstration trajectory. Furthermore, by embedding dynamic obstacle avoidance coupling terms into the surface DMPs framework, the generated surface can adaptively bend according to obstacle spatial information, actively avoiding obstacles while conforming to the core features of the demonstration trajectory. This effectively solves the collision problems caused by semi-structured uncertainties such as moving obstacles and vibration interference in industrial assembly and other scenarios. Simultaneously, the surface can be dynamically generated and adjusted in real time according to obstacle changes. Combined with the low computational load of the DMPs core framework and the collaborative learning of velocity and acceleration information, it ensures both the real-time response capability of trajectory planning and improves the accuracy and stability of the robot's motion trajectory, perfectly adapting to the needs of complex industrial scenarios such as precision assembly, which have high requirements for trajectory accuracy and flexibility.

[0043] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A robot trajectory learning method based on surface dynamic motion primitives, characterized in that, Includes the following steps: S100: First, a human teaches the robot multiple trajectories, sequentially parametrically processing and rotating the coordinates of each trajectory to establish a regular and symmetrical reference coordinate system. Then, the target region is divided into grids, and trajectory projections are extracted from different sections as demonstration data. The method learns and calculates the set of points on the surface. After smoothing and optimization, the surfaces corresponding to multiple trajectories are spliced ​​and weighted to form a static surface containing spatial information of the demonstration trajectory. S200: Based on the above static surface, an ellipsoid is first used to enclose and represent the obstacle to be avoided, and the positional relationship between the trajectory corresponding to the static surface and the obstacle is determined; if a collision risk is determined, the obstacle avoidance coupling term is calculated and embedded. The formula is then substituted into the aforementioned static surface learning framework for iterative calculation, causing the surface to adaptively bend at the obstacle position, generating a dynamic surface that can actively avoid obstacles. S300: Based on the generated dynamic obstacle avoidance surface, it first uses the demonstration trajectory through classic... The robot learns speed and acceleration information; then it maps the robot's new starting point and target point to the parameter space and generates an initial obstacle avoidance trajectory on the dynamic surface. If the starting point and ending point are not on the curved surface and are close to each other, the trajectory is connected by finding the nearest point on the curved surface; if the distance is too far, the curved surface learning process is restarted; finally, by combining the learned speed and acceleration information, the robot is precisely controlled to complete the movement along the obstacle avoidance trajectory, thus realizing a closed loop of trajectory planning and motion control.

2. The robot trajectory learning method based on surface dynamic motion primitives according to claim 1, characterized in that, The parameterization of trajectory coordinates in step S100 parameterizes the x and y coordinates of the sampling points on the trajectory using u and v, satisfying: , in These represent the x and y coordinates of the starting and ending points of the trajectory, respectively. and This represents the x and y coordinates of the i-th sampling point on the demonstration trajectory. It is a rotation matrix used to rotate the original trajectory so that the line connecting the start and end points forms a 45º angle with the x-axis.

3. The robot trajectory learning method based on surface dynamic motion primitives according to claim 2, characterized in that, The rotation matrix for: , in This represents a vector from its starting point to its ending point. Projection on a plane and The angle formed by the axis.

4. The robot trajectory learning method based on surface dynamic motion primitives according to claim 3, characterized in that, The formula for surface smoothing optimization in step S100 is: , in W is the window size selected by Gaussian smoothing. It is a two-dimensional Gaussian kernel.

5. The robot trajectory learning method based on surface dynamic motion primitives according to claim 4, characterized in that, The two-dimensional Gaussian kernel Defined as: , in This represents the standard deviation, which is usually related to the window size W and is approximately W / 5.

6. The robot trajectory learning method based on surface dynamic motion primitives according to any one of claims 1-5, characterized in that, The steps described in step S200 The formula is: , in This represents a cross-section taken in space. It is an auxiliary variable related to velocity, and u is a position variable. It is the target location. It is a gain parameter that controls the convergence rate and damping, and is usually set as the critical resistance. , Indicates phase.

7. The robot trajectory learning method based on surface dynamic motion primitives according to claim 6, characterized in that, The ellipsoid mentioned in step S200 is represented as: , in It is the center of the ellipsoid. It is A symmetric positive definite matrix that contains all the information about the size, shape, and orientation of the ellipsoid.

8. The robot trajectory learning method based on surface dynamic motion primitives according to claim 7, characterized in that, The obstacle avoidance coupling term mentioned in step S200 is: , in It is the obstacle avoidance strength factor. It is the vertical penetration factor.

9. The robot trajectory learning method based on surface dynamic motion primitives according to claim 8, characterized in that, The vertical penetration factor Represented as: , in ,for Characteristic quantities relating to the positional relationship with the ellipsoid; .

10. A robot trajectory learning system based on surface dynamic motion primitives, applying the robot trajectory learning method based on surface dynamic motion primitives as described in claims 1-9, characterized in that, include: Static Surface Learning Module: Receives multiple trajectories from manual instruction, establishes a regular symmetrical reference coordinate system through coordinate parameterization and rotation transformation, extracts the cross-sectional trajectory projection as demonstration data through mesh generation, and applies... The method calculates the point set of the surface and performs Gaussian smoothing. Finally, the surfaces corresponding to multiple trajectories are spliced ​​together and weighted averaged to output a static surface containing the spatial characteristics of the demonstration trajectory, laying the foundation for subsequent dynamic adjustment. Dynamic obstacle avoidance surface learning module: Based on the static surface generated in the previous step, it represents the obstacles to be avoided through ellipsoids and judges the collision risk between the trajectory and the obstacles; if a collision occurs, it calculates the obstacle avoidance coupling term and embeds it. The formula is re-substituted into the static surface learning framework for iterative calculation, so that the surface adaptively bends at the obstacle position, and outputs an obstacle avoidance surface that can respond to the dynamic changes of the obstacle in real time. Robot motion control module: From the demonstration trajectory through classic... By learning speed and acceleration information, the robot's new starting point and target point are mapped to the parameter space, and an initial trajectory is generated on the dynamic obstacle avoidance surface. Based on the distances between the starting point, the target point, and the surface, the trajectory is adjusted by connecting the nearest point on the surface or by relearning. Finally, combined with speed and acceleration information, control commands are output to drive the robot to move precisely along the obstacle avoidance trajectory.