A robot skill learning method based on local imitation of global attraction characteristics
Patent Information
- Application Number
- CN202611186150.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-30
AI Technical Summary
[0017]有鉴于现有技术的上述缺陷,本发明所要解决的技术问题是现有DS示教学习方法无法兼顾全局稳定性、局部高精度复现和示教区域外可控吸引,这三个目标存在内在冲突
1、提出LIGA-DS框架,将速度场分解为全局吸引场和局部模仿场,通过激活函数自适应融合,在三目标间建立统一桥梁,在LASA/HST数据集上复现精度(RMSE/SEA/DTWD)达最优或次优;HST上SEA和DTWD分别比DF-based DS降低13.9%和16.4%;从远域初始化的轨迹均可靠拉回演示区域,NEUM/E-Flow则明显偏离,证明全局吸引与局部模仿兼顾的唯一性。
Smart Images

Figure CN123000811A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and more particularly to a robot skill learning method based on the property of local imitation of global attraction. Background Technology
[0002] Acquiring robotic operational skills is one of the core issues in the field of robotics. Traditional methods rely on manual programming, requiring specialized motion planning and controller design for each task, which is inefficient and struggles to adapt to task changes. Teaching-based learning, as an efficient skill acquisition method, allows robots to learn motion skills directly from human teaching examples. Among various teaching-based learning methods, those based on first-order autonomous dynamic systems (DS) have attracted widespread attention due to their unique advantages: DS represents learned skills as a mapping from state to velocity, generates continuous motion without explicit time or phase variables, and supports online replanning after perturbations without recalculating the trajectory.
[0003] Existing DS-based instructional learning methods can be mainly classified into the following categories: (1) DS learning method based on global stability constraints SEDS (Stable Estimator of Dynamical Systems) is a classic method in this field, using a Gaussian Mixture Module (GMM) to fit demonstration data and guaranteeing the global asymptotic stability of the system through a quadratic Lyapunov function. However, the stability constraint of SEDS severely limits the nonlinear expressive power of the model, making it difficult to reproduce complex motion trajectories. Subsequent researchers have proposed several improved schemes: CLF-DM (ControlLyapunov Function-based Dynamics Movements) guarantees stability by learning a control Lyapunov function; LPV-DS (Linear Parameter Varying DS) uses a Bayesian nonparametric mixture model, improving expressive power while maintaining physical consistency; NEUM (Neural Energy Function with Unique Minimum) achieves global stability and accurate demonstration learning by learning a neural energy function with a unique minimum; and E-Flow (Euclideanizing Flow) transforms complex dynamics into a stable latent system through differential homeomorphism.
[0004] (2) DS learning method based on trajectory attraction
[0005] To regulate behavior outside the demonstration region, LAGS-DS (Locally Active Globally Stable DS) introduces symmetric attraction around the reference trajectory, enabling the perturbed state to return to the reference trajectory. Variable stiffness DS methods regulate the return motion through local attractors and the desired stiffness matrix. CDS (Conservative Dynamical Systems) generates conservative dynamics based on passive constraints. Additionally, there are methods based on contraction theory, which learn a contraction metric to guarantee trajectory convergence.
[0006] (3) DS learning method based on geometric distance field
[0007] Geometric distance field methods directly construct attractive dynamics by building a distance field to a reference trajectory, making the attractive behavior controllable. These methods represent the reference trajectory as a spline curve, calculate the distance to the reference trajectory and the nearest point from any state, and then construct an attractive velocity field.
[0008] (4) Periodic skills and multi-subtask DS learning method
[0009] For periodic operational skills (such as reciprocating motions like grinding and polishing), researchers have proposed learning methods based on limit cycle dynamics. For example, I-Flow maps simple limit cycles to task trajectories using neural differential homeomorphisms, while polar coordinates NEUM learns Lyapunov functions to ensure the minimum value lies on the periodic trajectory. For complex skills involving multiple subtasks, existing methods typically require separate modeling for each subtask or rely on additional switching mechanisms.
[0010] A comprehensive analysis of the existing technologies reveals the following main shortcomings: (1) Lack of a unified global stability and behavior control mechanism outside the demonstration area. The first type of methods (SEDS, LPV-DS, NEUM, E-Flow, etc.) mainly focus on the fitting accuracy and global stability on the demonstration data, but lack effective constraints on states far from the demonstration area. When the robot is subjected to a large disturbance during execution and deviates from the demonstration trajectory, the learned DS may not be able to guide the robot back to the task-related area, resulting in task failure. Although these methods mathematically guarantee global convergence to the target point, the convergence path may be far from the demonstration area and cannot reflect the motion pattern expected by the task.
[0011] (2) The trajectory attraction method lacks flexibility. Although the second type of method (LAGS-DS, CDS, etc.) can attract the disturbed state back to the reference trajectory, it usually forces all trajectories to converge to the same reference trajectory, and lacks the ability to reproduce the diversity of motion in the demonstration area. In addition, this type of method has limited ability to adjust the return behavior, and it is difficult to customize the attraction dynamics according to the specific task requirements.
[0012] (3) The local reproduction accuracy of the geometric distance field method is limited. Although the third type of method can provide controllable global attraction behavior, its motion generation depends entirely on the geometric information of the reference trajectory, and it is not capable of reproducing the complex local motion patterns in the demonstration.
[0013] (4) Poor adaptability to periodic and multi-subtask skills. Most existing methods are designed for single non-periodic tasks. For periodic skills (such as reciprocating motion) or multi-subtask skills (such as complex assembly with multiple different operation stages), additional task-specific design or switching mechanism is often required, and a unified processing framework is lacking.
[0014] (5) The definition of the demonstration area lacks data-driven basis. Existing methods usually rely on simple geometric thresholds or density estimates when distinguishing between "within the demonstration area" and "outside the demonstration area", which makes it difficult to accurately characterize the complex high-dimensional demonstration data distribution, resulting in an uneven transition between local imitation and global attraction.
[0015] In summary, existing technologies have not yet been able to simultaneously achieve: (a) global stability; (b) accurate motion reproduction within the demonstration area; (c) controllable attraction behavior outside the demonstration area; and (d) adaptability to periodic and multi-subtask skills within a unified framework.
[0016] Therefore, those skilled in the art are dedicated to developing a robot skill learning method based on the local imitation of global attraction properties. Summary of the Invention
[0017] In view of the above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is that the existing DS teaching and learning method cannot simultaneously achieve global stability, high-precision local reproduction, and controllable attraction outside the teaching area. These three objectives are inherently conflicting.
[0018] To achieve the above objectives, this invention provides a robot skill learning method based on local imitation of global attraction characteristics, the method comprising the following steps: S101: Collect data and preprocess the data, and construct a demonstration dataset based on the preprocessed data. The collected data includes periodic and non-periodic handwritten datasets and handwritten symbol trajectory datasets. S103: Reference trajectory construction: The average trajectory of all demonstration trajectories is fitted using a composite quadratic spline to obtain a parameterized reference trajectory, and the tangential velocity at each point on the reference trajectory is calculated. S105: Construct a global attraction field, which is constructed analytically from the geometric information of the reference trajectory without training; S107: Learn a local imitation field, which consists of a nominal field and a correction field; S109: Training state-related activation function, the activation function is used to determine whether a state is located within the demonstration area and to determine the fusion weight of the local imitation field and the global attraction field; S111: Using the trained state-related activation function, the final local-mimicking-global-attraction dynamic system is generated from the global attraction field and the local mimicry field.
[0019] Furthermore, in step S101, the preprocessing of the data includes: time normalization, spatial normalization, shifting the endpoint to the origin, low-pass filtering, and numerical differentiation.
[0020] Further, in step S105, the global attraction field includes a contraction term and a forward term. The contraction term pulls any state toward the nearest point on the reference trajectory, and the forward term drives the state to move along the tangent direction of the reference trajectory. The global attraction field is:
[0021] in, For global attraction field, and These are the positive weights of the attraction term towards the reference trajectory and the motion term along the reference trajectory, respectively. For the generalized state of the robot, Indicates the reference trajectory. Indicates the progress of the normalization task. Distance on the reference trajectory The nearest point, This is the reference velocity of the reference trajectory at that point.
[0022] Further, in step S107, the local simulation field is:
[0023] in, For local imitation field, Let be the nominal velocity field, parameterized by any function approximator with sufficient fitting capability. The correction field is constructed based on the reference trajectory and the corresponding distance field to ensure the stability of the entire local system that mimics the global attraction dynamics. For the trainable parameters of the nominal field network, the subscripts are... It represents the nominal field.
[0024] Further, step S107 includes the following sub-steps: S1071: Construct a nominal field neural network, which adopts a multilayer perceptron, with state coordinates as input and velocity as output, and two hidden layers with 32 neurons in each layer; S1072: Generate augmented training data, add a small-amplitude Gaussian perturbation to each demonstration sample, construct an enhanced target velocity, wherein the enhanced target velocity retains the tangential component of the original demonstration velocity and adds a normal pullback component pointing to the demonstration trajectory; S1073: Training the nominal field, using the Adam optimizer to train the network during training, so that the predicted speed approximates the enhanced target speed; S1073: Construct a correction field, which monitors the output of the nominal field: when the velocity component of the nominal field along the direction of the reference trajectory is insufficient, the correction field supplements the missing amount to ensure that the state necessarily advances along the reference trajectory; when the state is close to the end point, the correction field forcibly supplements the velocity component pointing to the end point to ensure that the velocity of the nominal field is zero at the end point.
[0025] Further, step S109 includes the following sub-steps: S1091: Add Gaussian noise centered on the demonstration state to form the source distribution; and use a Gaussian tubular distribution of predetermined width centered on the reference trajectory to form the target distribution. S1092: The velocity field is trained by matching the optimal transmission condition flow. The velocity field continuously transports any state from the source distribution space to the target distribution space. During the training process, each sample in the source distribution space is paired with a sample in the target distribution space through optimal transmission to ensure the geometric semantic consistency between the samples before and after the mapping. S1093: After training is completed, for any state, its mapping position in the target distribution space is obtained by integrating the velocity field, the distance from the mapping position to the reference trajectory is calculated, and the activation value is determined based on the distance value.
[0026] Further, in step S111, the local mimicking global attraction dynamic system is:
[0027] in, Let be the derivative of the robot's state with respect to time, i.e., the generalized velocity. For the velocity field of LIGA-DS, For global attraction field, For local imitation field, This is a state-dependent activation function.
[0028] Furthermore, in step S101, when the collected data is periodic handwritten trajectory data, the reference trajectory adopts a closed curve, the closed curve is connected end to end and the speed is continuous.
[0029] Furthermore, in step S101, when the collected data is periodic handwritten trajectory data, the correction field adds a radial attraction term, which, while ensuring the advancement along the trajectory, adds an additional attraction pointing to the reference trajectory, ensuring that the state converges to the closed trajectory rather than a single point.
[0030] Furthermore, the robot skill learning method also includes multi-subtask combination learning, which constructs four test scenarios and independently constructs a reference trajectory, distance field, and single-task LIGA-DS for each subtask. During online execution, the distance from the current state to the reference trajectory of all subtasks is calculated, the subtask with the closest distance is selected, and the DS corresponding to the subtask is applied. The test scenarios include: two aperiodic tasks sharing an endpoint, two aperiodic tasks with different endpoints, a combination of aperiodic and periodic tasks, and a combination of two periodic tasks.
[0031] In a preferred embodiment of the present invention, compared with the prior art, the present invention has the following beneficial technical effects: 1. The LIGA-DS framework is proposed, which decomposes the velocity field into a global attraction field and a local imitation field. Through adaptive fusion of activation functions, a unified bridge is established between the three targets. The accuracy (RMSE / SEA / DTWD) on the LASA / HST dataset is optimal or suboptimal. On HST, SEA and DTWD are reduced by 13.9% and 16.4% respectively compared with DF-based DS. Trajectories initialized from the far domain can be reliably pulled back to the demonstration area, while NEUM / E-Flow deviates significantly, proving the uniqueness of taking into account both global attraction and local imitation.
[0032] 2. This invention proposes an activation function construction method based on OT-CFM (Optimal Transport Conditional Flow Matching), which transfers complex demonstration distributions to geometrically simple tubular target distribution spaces to complete activation determination. The activation boundaries are data-driven and accurately characterize complex distributions. OT-CFM optimal transport ensures that adjacent states in the original space remain adjacent in the target space, and the activation boundaries are smooth without jumps. The threshold parameters and tube width have clear geometric interpretations and are intuitive to adjust.
[0033] The following will further explain the concept, specific structure, and technical effects of the present invention in conjunction with the accompanying drawings, so as to fully understand the purpose, features, and effects of the present invention. Attached Figure Description
[0034] Figure 1 This is a preferred embodiment of the robot skill learning method steps of the present invention; Figure 2This is a schematic diagram comparing the motion reproduction accuracy of LASA and HST datasets according to a preferred embodiment of the present invention; Figure 3 This is a schematic diagram comparing the dynamic system learning results of typical shapes in the LASA and HST datasets according to a preferred embodiment of the present invention. Figure 4 This is a schematic diagram comparing the motion reproduction accuracy of the PHL dataset (periodic task) according to a preferred embodiment of the present invention; Figure 5 This is a schematic diagram comparing the dynamic system learning results of typical shapes in the PHL dataset according to a preferred embodiment of the present invention. Figure 6 This is a schematic diagram illustrating the learning results of multiple sub-tasks according to a preferred embodiment of the present invention; Figure 7 This is a schematic diagram of a preferred embodiment of the shaft hole assembly experimental device and the manual dragging teaching process of the present invention; Figure 8 This is a schematic diagram showing the results of a shaft-hole assembly simulation experiment according to a preferred embodiment of the present invention. Detailed Implementation
[0035] The following description, with reference to the accompanying drawings, illustrates several preferred embodiments of the present invention to make its technical content clearer and easier to understand. The present invention can be embodied in many different forms, and the scope of protection of the present invention is not limited to the embodiments mentioned herein.
[0036] In the accompanying drawings, components with the same structure are indicated by the same numerical designation, and components with similar structures or functions are indicated by similar numerical designations. The dimensions and thicknesses of each component shown in the drawings are arbitrary, and the present invention does not limit the dimensions and thicknesses of each component. To make the illustrations clearer, the thickness of some components has been appropriately exaggerated in the drawings.
[0037] like Figure 1 As shown, to address the problem that existing DS teaching-learning methods cannot simultaneously achieve global stability, high-precision local reproduction, and controllable attraction outside the teaching area, this invention proposes a robot skill learning method based on local imitation of global attraction characteristics. This method constructs an Autonomous Dynamical System (ADS) to encode the demonstration trajectory as a state-to-velocity mapping, enabling the robot to learn operational skills from human instruction and autonomously reproduce them. It can be applied to robot operation tasks requiring precise trajectory tracking and disturbance recovery, such as industrial assembly, gluing, polishing, and handling. The robot skill learning method based on local imitation of global attraction characteristics provided by this invention includes the following steps: S101: Collect data and preprocess the data, and build a demonstration dataset based on the preprocessed data.
[0038] In this embodiment, the collected data includes periodic and non-periodic handwritten datasets and handwritten symbol trajectory datasets.
[0039] When the collected data is periodic handwritten trajectory data, the reference trajectory is a closed curve with the beginning and end connected and the velocity continuous. At the same time, when the collected data is periodic handwritten trajectory data, a radial attraction term is added to the correction field. While ensuring the movement along the trajectory, an additional attraction term is added pointing towards the reference trajectory, ensuring that the state converges to the closed trajectory rather than a single point.
[0040] In this embodiment, the preprocessing of the collected data includes: time normalization, spatial normalization, shifting the endpoint to the origin, low-pass filtering, and numerical differentiation.
[0041] S103: Reference trajectory construction. The average trajectory of all demonstration trajectories is fitted using a composite quadratic spline to obtain a parameterized reference trajectory, and the tangential velocity at each point on the reference trajectory is calculated.
[0042] S105: Constructing the global attraction field: This global attraction field does not require training and is constructed analytically from the geometric information of the reference trajectory.
[0043] In this embodiment, the global attraction field includes a contraction term and a forward term. The contraction term pulls any state toward the nearest point on the reference trajectory, and the forward term drives the state to move along the tangent direction of the reference trajectory. The global attraction field is:
[0044] in, For global attraction field, and These are the positive weights of the attraction term towards the reference trajectory and the motion term along the reference trajectory, respectively. For the generalized state of the robot; Indicates the reference trajectory. Indicates the progress of the normalization task; Distance on the reference trajectory The nearest point, This is the reference velocity of the reference trajectory at that point.
[0045] S107: Learn a local imitation field, which consists of a nominal field and a correction field.
[0046] In this embodiment, the local imitation field is:
[0047] in, For local imitation field, The nominal velocity field can be parameterized by any function approximator with sufficient fitting capability. The correction field is constructed based on the reference trajectory and the corresponding distance field to ensure the stability of the entire local system that mimics the global attraction dynamics. For the trainable parameters of the nominal field network, the superscript... This indicates the robot's state. Dimensions, subscripts It represents the nominal field.
[0048] In this embodiment, the learning of a local imitation field includes the following sub-steps: S1071: Constructing the nominal field neural network: The nominal field neural network adopts a multilayer perceptron, with state coordinates as input and velocity as output. The hidden layers are two layers with 32 neurons in each layer. S1072: Generate augmented training data: Add a small-amplitude Gaussian perturbation to each demonstration sample to construct an enhanced target velocity. The enhanced target velocity retains the tangential component of the original demonstration velocity and adds a normal pullback component pointing to the demonstration trajectory. S1073: Training nominal field: The Adam optimizer is used to train the network during training to make the predicted speed approximate the enhanced target speed; S1073: Construct a correction field, which monitors the output of the nominal field: When the velocity component of the nominal field along the direction of the reference trajectory is insufficient, the correction field supplements the missing amount to ensure that the state necessarily advances along the reference trajectory; when the state is close to the end point, the correction field forcibly supplements the velocity component pointing to the end point to ensure that the velocity of the nominal field is zero at the end point.
[0049] S109: Training state-related activation function. The activation function is used to determine whether a state is located within the demonstration region and to determine the fusion weights of the local imitation field and the global attraction field.
[0050] In this embodiment, the training state-related activation function includes the following sub-steps: S1091: Add Gaussian noise centered on the demonstration state to form the source distribution; and use a Gaussian tubular distribution of predetermined width centered on the reference trajectory to form the target distribution. S1092: The velocity field is trained by matching the optimal transmission condition flow. The velocity field continuously transports any state from the source distribution space to the target distribution space. During the training process, each sample in the source distribution space is paired with a sample in the target distribution space through optimal transmission to ensure the geometric semantic consistency between the samples before and after the mapping. S1093: After training, for any state, obtain its mapping position in the target distribution space through the integral velocity field, calculate the distance from the mapping position to the reference trajectory, and determine the activation value based on the distance value.
[0051] S111: Using a trained state-dependent activation function, the final local-mimicking-global-attraction dynamic system is generated from the global attraction field and the local mimicry field.
[0052] In this embodiment, the local mimicking global attraction dynamic system is as follows:
[0053] in, Let be the derivative of the robot's state with respect to time, i.e., the generalized velocity. For the velocity field of LIGA-DS, For global attraction field, For local imitation field, This is a state-dependent activation function.
[0054] In this embodiment, the robot skill learning method provided by the present invention also includes multi-subtask combination learning. This multi-subtask combination learning constructs four test scenarios and independently constructs a reference trajectory, distance field, and single-task LIGA-DS for each subtask. During online execution, the distance from the current state to the reference trajectories of all subtasks is calculated, the subtask with the closest distance is selected, and the DS corresponding to the subtask is applied. The test scenarios include: two aperiodic tasks sharing a common endpoint, two aperiodic tasks with different endpoints, a combination of aperiodic and periodic tasks, and a combination of two periodic tasks.
[0055] Compared with existing technologies, the robot skill learning method based on local imitation of global attraction characteristics provided by this invention has the following technical effects: 1. Existing DS teaching and learning methods cannot simultaneously achieve global stability, high-precision local reproduction, and controllable attraction outside the teaching area. These three objectives inherently conflict: stable DS methods (such as SEDS) exhibit uncontrollable behavior outside the domain; trajectory attraction methods (such as LAGS-DS) force the merging of a single trajectory, resulting in a loss of diversity and unadjustable return behavior; and geometric distance field methods (DF-based DS) suffer from insufficient local reproduction accuracy. This invention proposes the LIGA-DS framework, decomposing the velocity field into a global attraction field and a local imitation field. Through adaptive fusion of activation functions, a unified bridge is established between the three objectives. The conflict between the three objectives is resolved by independently designing the global field (responsible for external attraction) and the local field (responsible for intra-domain reproduction); the global attraction field is analytically constructed using the reference trajectory distance field, ensuring controllable behavior without training; a two-layer local field design—nominal field + calibration field—guarantees high-precision intra-domain reproduction; and a distribution-aware fusion mechanism, OT-CFM (Optimal Transport Conditional Flow Matching), learns the activation function to ensure precise alignment between local / global switching and data distribution. The present invention achieves optimal or near-optimal reproduction accuracy (RMSE / SEA / DTWD) on the LASA / HST dataset; on HST, SEA and DTWD are reduced by 13.9% and 16.4% respectively compared to DF-based DS; trajectories initialized from the distant domain are reliably pulled back to the demonstration area, while NEUM / E-Flow deviates significantly, proving the uniqueness of balancing global attraction and local imitation.
[0056] 2. Existing methods, when distinguishing between the inside and outside of the demonstration area, rely on simple geometric thresholds or density estimations, which cannot accurately characterize complex / high-dimensional / non-convex demonstration data distributions, leading to an uneven transition between local imitation and global attraction, or even misjudgment. This invention proposes an activation function construction method based on OT-CFM, which transfers the complex demonstration distribution to a geometrically simple tubular target distribution space to complete activation determination. The demonstration state with added noise is used as the source distribution, and the reference trajectory tubular Gaussian is used as the target distribution. OT-CFM learns the optimal transport mapping Φ between the two distributions; any state x is mapped to the target space y=Φ(x), and the activation value α(x) is calculated in the target space according to the relationship between the distance to the reference trajectory d(y) and the inside and outside thresholds (l0,l1), achieving a smooth activation boundary under complex distributions. The activation boundary of this invention has a data-driven basis, accurately characterizing complex distributions; the optimal transport of OT-CFM ensures that adjacent states in the original space remain adjacent in the target space, resulting in a smooth activation boundary without jumps; the threshold parameters (l0,l1) and the tube width σ1 have clear geometric interpretations, making adjustment intuitive.
[0057] 3. Traditional nominal field (MLP) methods directly minimize the MSE between the predicted velocity and the demonstration velocity. However, velocity errors accumulate during integration, causing the generated trajectory to drift away from the demonstration trajectory (integral drift problem), affecting the reproduction accuracy of complex tasks in the long time domain. This invention proposes training the nominal field with attraction-enhanced target velocity, combined with an analytical correction field to ensure the regularity of local field behavior. By adding Gaussian perturbations to the demonstration samples, the target velocity = demonstration velocity + normal attraction component (pointing to the demonstration trajectory), enabling the nominal field to learn to automatically pull back when deviating. The correction field forcibly compensates for insufficient projection of the nominal field along the tangent of the reference trajectory or the endpoint direction, ensuring the inevitability of advancement and convergence. The correction field only actively compensates for insufficient components, without affecting the good fit of the nominal field. Compared to direct MSE training, the integral trajectory significantly approximates the demonstration (e.g., Figure 3 (Comparison results in the middle); correction field guarantees fI(x) ) = 0 and advance along the reference trajectory; SEA in the HST dataset decreased by 13.9% and DTWD decreased by 16.4%, verifying the effect of suppressing integral drift.
[0058] 4. Existing methods are mostly designed for single non-periodic tasks. Periodic skills (reciprocating polishing) require redesigning the network structure, and multi-subtasks (multi-process assembly) require additional switching logic, lacking a unified framework. This invention integrates periodic tasks and multi-subtasks into the LIGA-DS framework, requiring no additional modules. Periodicity: The reference trajectory is closed, and the correction field provides both tangential propulsion and radial attraction, converging to the limit cycle instead of converging to the endpoint; Multi-subtask: LIGA-DS is constructed independently for each subtask, and the nearest subtask is selected online (based on the distance to each reference trajectory); Non-periodic / periodic subtasks coexist, sharing a unified mathematical description. This invention uses a single method to handle non-periodic, periodic, and multi-subtask tasks (such as...). Figure 7 As shown), no additional switching logic is required; in multi-subtask scenarios, trajectories from different initial areas are correctly attracted to the corresponding demonstration area and reproduce the behavior, with no error switching or divergence.
[0059] The present invention will now be described in detail with reference to preferred embodiments.
[0060] The acquisition of robot operation skills is one of the core issues in the field of robotics. Existing technologies have not yet been able to simultaneously achieve the following within a unified framework: (a) global stability; (b) accurate motion reproduction within the demonstration area; (c) controllable attraction behavior outside the demonstration area; and (d) adaptability to periodic and multi-sub-task skills. This invention is a solution to the above problems, and it is illustrated through several embodiments.
[0061] Example 1: Learning Non-periodic Handwriting Trajectories
[0062] (I) Task Description
[0063] This embodiment uses the LASA handwritten trajectories dataset and the HST handwritten symbol trajectory dataset (both are two-dimensional planar trajectories) to verify the learning effect of this invention on non-periodic manipulation skills. Each symbol contains 7 demonstration trajectories, all converging at the origin. The learned DS is required to accurately reproduce the demonstration shape and converge to the endpoint from any initial position.
[0064] (II) Implementation Steps
[0065] Step 1: Data Acquisition and Preprocessing
[0066] The operator draws the target symbol 7 times with the mouse and records the state sequence at a sampling rate of 100Hz. For each trajectory, the following steps are performed: ① Time normalization to 8 seconds; ② Spatial normalization to the [0,1] interval; ③ End point translation to the origin; ④ 5Hz low-pass filtering; ⑤ Numerical differentiation to obtain the velocity, and finally constructing a demonstration dataset.
[0067] Step 2: Reference Trajectory Construction
[0068] The average trajectory of all demonstration trajectories is fitted using a composite quadratic spline to obtain a parameterized reference trajectory (represented by the progress parameter s, which ranges from 0 to 1). The tangential velocity at each point on the reference trajectory is calculated, with the velocity at the endpoint being zero.
[0069] Step 3: Construct a global attraction field
[0070] in, For global attraction field, and These are the positive weights of the attraction term towards the reference trajectory and the motion term along the reference trajectory, respectively. For the generalized state of the robot; Indicates the reference trajectory. Indicates the progress of the normalization task; Distance on the reference trajectory The nearest point, This is the reference velocity of the reference trajectory at that point.
[0071] Global attraction field It consists of two superimposed terms: the first term The "contraction term" pulls any state towards the nearest point on the reference trajectory, with the contraction intensity adaptively adjusting with distance (saturation at close range, moderate at long range); the second term... The "forward term" drives the state forward along the tangent to the reference trajectory. The weights of the two terms can be adjusted independently. This global attraction field requires no training and is constructed analytically entirely from the geometric information of the reference trajectory.
[0072] Step 4: Learning Local Imitation Fields
[0073] Sub-step 4.1: Construct the nominal field neural network.
[0074] The nominal field neural network uses a multilayer perceptron, with state coordinates as input and velocity as output. It has two hidden layers, each with 32 neurons.
[0075] Sub-step 4.2: Generate augmented training data.
[0076] A small Gaussian perturbation is added to each demonstration sample to construct an "enhanced target velocity": the tangential component of the original demonstration velocity is retained, while a normal pullback component pointing towards the demonstration trajectory is added. The network trained in this way has a "self-correcting" ability during integration, and will automatically pull back even if a small deviation occurs.
[0077] Sub-step 4.3: Train the nominal field.
[0078] When training the nominal field, the Adam optimizer is used to train the network so that the prediction speed approaches the aforementioned enhanced target speed.
[0079] Sub-step 4.4: Construct the correction field.
[0080] The calibration field monitors the output of the nominal field: when the velocity component of the nominal field along the direction of the reference trajectory is insufficient, the calibration field supplements the missing amount, ensuring that the state necessarily progresses along the reference trajectory; when the state is close to the endpoint, the calibration field forcibly supplements the velocity component pointing towards the endpoint, ensuring that the velocity of the nominal field is zero at the endpoint. The calibration field is only activated when the monitored component is insufficient, and does not affect the original good fitting result of the nominal field.
[0081] Sub-step 4.5: The local imitation field equals the nominal field Add correction field ,Right now
[0082] in, For local imitation field, The nominal velocity field can be parameterized by any function approximator with sufficient fitting capability. The correction field is constructed based on the reference trajectory and the corresponding distance field to ensure the stability of the entire local system that mimics the global attraction dynamics. The trainable parameters of the nominal field network (superscript) This indicates the robot's state. Dimensions, subscripts This refers to the nominal field.
[0083] Step 5: Train the activation function
[0084] The activation function determines whether a state lies within the demonstration region, thus determining the fusion weights of the local imitation field and the global attraction field. It includes the following sub-steps: Sub-step 5.1: Add Gaussian noise centered on the demonstration state to form the "source distribution"; add a Gaussian tubular distribution of a certain width centered on the reference trajectory to form the "target distribution". The tubular shape of the target distribution naturally has the geometric characteristic that "the area near the reference trajectory is a high-density region".
[0085] Sub-step 5.2: Train a velocity field using optimal transmission condition flow matching. This velocity field can continuously "transfer" any state from the source distribution space to the target distribution space.
[0086] During training, each sample in the source distribution is paired with a sample in the target distribution through optimal transmission, ensuring the geometric semantic consistency between samples before and after mapping (i.e., states that are adjacent in the original space remain adjacent after mapping).
[0087] Sub-step 5.3: After training, for any state, obtain its mapped position in the target space by integrating the velocity field. Calculate the distance from the mapped position to the reference trajectory, and determine the activation value based on the distance: if the distance is less than the inner threshold, the activation value is 1 (completely using local imitation); if the distance is greater than the outer threshold, the activation value is 0 (completely using global attraction); if the distance is between the inner and outer thresholds, the activation value transitions linearly.
[0088] Step 6: Generate the final Locally Imitating and Globally Attracting Dynamical System (LIGA-DS)
[0089] in, The velocity field of LIGA-DS is the derivative of the robot's state with respect to time, i.e., the generalized velocity. Expressed as a global attraction field With local imitation field convex combination; This is the state-related activation function obtained in step 5.
[0090] State-dependent activation function The value can be: When the robot is in the teaching area LIGA-DS degenerates into a localized mimicry field; When the robot's state moves away from the teaching area LIGA-DS degenerates into a global attractive field; When the robot's state is between the two... LIGA-DS is a convex combination of a global attraction field and a local imitation field.
[0091] (III) Implementation Results
[0092] like Figure 2 As shown, on the LASA dataset, the RMSE, SEA, and DTWD of the LIGA-DS method of this invention are 0.085±0.035, 0.058±0.025, and 27.5±10.6, respectively. Among them, DTWD is the lowest among all methods, while RMSE and SEA reach the second-best level. On the HST dataset with more complex geometry, the three indicators are 0.093±0.007, 0.088±0.048, and 27.6±16.0, respectively. Among them, SEA and DTWD are the lowest. Compared with DF-based DS, which also has trajectory attraction ability, the values are reduced from 0.101 and 33.0 to 0.088 and 27.6, respectively.
[0093] Figure 3 Qualitative results and Figure 2 Consistency: Trajectories initialized from the demonstration starting point can accurately reproduce the demonstration shape, and trajectories initialized outside the demonstration area can be smoothly attracted back to the demonstration area and eventually converge to the endpoint; in contrast, NEUM and E-Flow cannot continuously attract trajectories from outside the domain back to the demonstration area in the HST task. These results demonstrate that this invention, while ensuring global convergence and controllable attraction from outside the domain, still maintains local motion reproduction accuracy comparable to or better than existing state-of-the-art stable DS methods, achieving a balance between local imitation and global attraction.
[0094] Example 2: Periodic Handwriting Trajectory Learning
[0095] (I) Task Description
[0096] This embodiment uses the PHL dataset (10 types of periodic handwritten letters) to verify the ability of the present invention to process periodic tasks.
[0097] (II) Implementation Steps
[0098] Overall, it is the same as Example 1, with the key differences as follows: 1) The reference trajectory is changed to a closed curve with the beginning and end connected, and the velocity is continuous.
[0099] 2) The correction field adds a "radial attraction term", which, while ensuring the advancement along the trajectory, adds an additional attraction pointing to the reference trajectory, ensuring that the state converges to the closed trajectory rather than a single point.
[0100] 3) The tubular width parameter of the activation function is appropriately increased to accommodate a wider distribution range of periodic trajectories.
[0101] (III) Implementation Results
[0102] like Figure 4 As shown, on the PHL periodic handwritten trajectory dataset, the RMSE, SEA, and DTWD of the LIGA-DS model of this invention are 0.172±0.023, 0.250±0.037, and 31.8±3.6, respectively, all of which are the lowest values among all comparison methods. Among them, the corresponding indices for I-Flow are 0.560±0.184, 0.286±0.049, and 36.7±4.7, and the corresponding indices for polar coordinate NEUM are 0.191±0.023, 0.262±0.044, and 33.6±5.6.
[0103] Figure 5 Qualitative results and Figure 4 Consistency: Both polar coordinate NEUM and the present invention can reproduce representative periodic trajectories well, while I-Flow exhibits significant shape deviation in the GShape task. Furthermore, when initialized from a position far from the demonstration area, the trajectory generated by the present invention can be smoothly attracted to a closed reference trajectory, forming a stable and continuous periodic motion along that trajectory. These results demonstrate that the present invention, without altering the unified LIGA-DS framework, can simultaneously achieve high local motion reproduction accuracy, global attraction to closed trajectories, and stable periodic motion generation in periodic subtasks.
[0104] Example 3: Multi-subtask combined learning
[0105] (I) Task Description
[0106] This embodiment verifies the invention's ability to handle complex skills that include multiple subtasks.
[0107] (II) Implementation Steps
[0108] Four test scenarios were constructed: two aperiodic tasks sharing a common endpoint; two aperiodic tasks with different endpoints; a combination of aperiodic and periodic tasks; and a combination of two periodic tasks. For each subtask, its reference trajectory, distance field, and single-task LIGA-DS were independently constructed.
[0109] When running online, calculate the distance from the current state to the reference trajectory of all subtasks, select the subtask with the closest distance, and then apply the DS corresponding to that subtask.
[0110] (III) Implementation Results
[0111] like Figure 6 As shown, the present invention forms an overall velocity field consistent with the task structure in all four types of multi-sub-task combination scenarios.
[0112] In scenarios where two aperiodic subtasks share a common endpoint, trajectories from different initial regions are first attracted to their respective nearest teaching regions, advance along their corresponding local motion patterns, and converge to a common equilibrium point. In scenarios where two aperiodic subtasks have different endpoints, trajectories can enter the correct subtask based on their location and converge to their respective equilibrium points. In scenarios involving a mixture of aperiodic and spatially separated periodic subtasks, the aperiodic branch converges stably to the endpoint, while the periodic branch is attracted to a closed trajectory and forms a continuous cyclical motion. In scenarios involving a combination of two periodic subtasks, the two sets of trajectories converge to their respective closed trajectories, without any cross-subtask misattraction or divergence. These results demonstrate that online subtask selection based on distances to each reference trajectory can coordinate aperiodic and periodic skills without additional model switching, and LIGA-DS maintains its local imitation, global attraction, and stable convergence characteristics in combined tasks.
[0113] Example 4: Six-DOF insert shaft insertion hole assembly (physical experiment)
[0114] (I) Experimental Equipment and Tasks
[0115] Robot: Chinrobo CRB7 collaborative robot (6 degrees of freedom), equipped with joint torque sensors.
[0116] Control platform: Beckhoff CX2030 industrial controller, EtherCAT communication, control cycle 4kHz.
[0117] Force sensor: An ATI Gamma IP65 six-dimensional force / torque sensor is installed at the end.
[0118] State space: six-dimensional, including three-dimensional position and three-dimensional orientation (orientation is represented by exponential coordinates).
[0119] Experimental task: Insert a 10mm diameter cylindrical pin into a 10.1mm diameter pin hole (with a gap of only 0.1mm). Figure 7 As shown.
[0120] (II) Implementation Steps
[0121] Step 1: Teaching and Data Collection
[0122] The operator physically dragged the robot's end effector to collect the trajectory data from seven successful insertions at a sampling rate of 100Hz. The trajectory was then normalized to a uniform duration (8 seconds), low-pass filtered (5Hz), and the velocity was obtained by numerical differentiation. Position and orientation were normalized to the [0,1] interval.
[0123] Step 2: Constructing a six-dimensional LIGA-DS
[0124] A complete LIGA-DS network was constructed in six-dimensional space using the method described in Example 1. The network structure was correspondingly expanded: the nominal field was 6-32-32-6, and the activation function network was 7-32-32-6. The parameter values were basically the same as in Example 1.
[0125] Step 3: Compliance Control Execution
[0126] An impedance control law is used to convert the desired velocity output by the DS (Dynamic Stress Diagnostics) into robot joint commands. The Jacobian matrix of the DS (partial derivatives of the velocity field with respect to the state) is used to encode the local stiffness characteristics of the task space. The damping coefficient is set to 20 Nm / s per radian in the rotational direction and 400 Nm / s per meter in the translational direction. Force sensors monitor the contact force in real time, and the robot automatically decelerates when the force exceeds a safety threshold.
[0127] (III) Implementation Results
[0128] like Figure 7 and Figure 8 As shown, the shaft-hole assembly experiment was completed on a six-DOF collaborative robot platform. The operator collected seven successfully inserted teaching trajectories through physical guidance. The trained LIGA-DS was then used as the desired motion strategy in the six-dimensional pose space to drive the robot to perform shaft-hole assembly. The direction and position trajectory results show that, when initialized from the teaching starting point, the integral trajectory generated by the system can accurately reproduce the taught motion; when initialized from a state far from the teaching area, both the direction and position trajectories can be attracted back to the teaching area and eventually converge to the insertion terminal pose. In the six-dimensional state space, this invention achieved a velocity fitting RMSE of 0.064, with SEA and DTWD of 0.108±0.045 and 34.5±11.5, respectively, which are comparable to the results of the two-dimensional handwritten benchmark task, indicating that the accuracy of local motion reproduction did not significantly decrease with the increase in state dimension. In actual execution, despite robot tracking errors, unmodeled joint friction, and contact friction during insertion, all trials successfully completed the assembly. The above results demonstrate that the present invention can extend from two-dimensional trajectory learning to six-dimensional robot pose skills, while maintaining engineering robustness under high-dimensional motion reproduction, extra-domain attraction, terminal convergence, and contact conditions.
[0129] Compared with existing technologies, the robot skill learning method based on local imitation of global attraction characteristics provided by the embodiments of the present invention has broad industrial application prospects and practical value, specifically reflected in the following aspects: 1. Applicable to various industrial robot operation tasks: This method can be directly applied to various industrial scenarios that require learning motion skills from teaching, including but not limited to: 1) Precision assembly (such as inserting shafts into holes, threaded connections) requires high-precision trajectory reproduction and contact disturbance recovery; 2) Surface treatment (such as grinding, polishing, and applying adhesive) involves periodic reciprocating motion; 3) Multi-process composite operations (such as handling before assembly) involve complex tasks with multiple different motion stages.
[0130] 2. Compatibility with existing robot control systems: The output of this invention is a state-velocity mapping, which can be seamlessly integrated with mainstream robot control architectures (position / velocity / torque control modes). The embodiments use a standard industrial robot (6-DOF collaborative robot) and a general industrial control platform (EtherCAT communication) to demonstrate that this method requires no special hardware support.
[0131] 3. Reduced programming and debugging costs: Operators only need to provide a few demonstration trajectories through drag-and-drop teaching or remote operation, and the system can automatically learn and generate stable motion strategies, greatly reducing the time cost of traditional manual programming and repeated debugging.
[0132] 4. Improved operational robustness and safety: The unique global attraction mechanism of this invention can autonomously return to the correct trajectory after the robot is disturbed by accidental collisions, workpiece position deviations, etc., avoiding task failure or workpiece damage, which is especially suitable for scenarios with high environmental uncertainty.
[0133] 5. Easy to integrate into existing LfD software framework: The core algorithm combines neural networks with geometric calculations, with moderate computational complexity. It can be deployed on industrial control computers or embedded controllers and has good real-time performance (control cycle 4kHz in the example).
[0134] In summary, this invention has clear technical feasibility and good market transformation potential, and can effectively promote the large-scale application of robot teaching and learning technology in actual production.
[0135] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A robot skill learning method based on local imitation of global attraction characteristics, characterized in that, The method includes the following steps: S101: Collect data and preprocess the data, and construct a demonstration dataset based on the preprocessed data. The collected data includes periodic and non-periodic handwritten datasets and handwritten symbol trajectory datasets. S103: Reference trajectory construction: The average trajectory of all demonstration trajectories is fitted using a composite quadratic spline to obtain a parameterized reference trajectory, and the tangential velocity at each point on the reference trajectory is calculated. S105: Construct a global attraction field, which is constructed analytically from the geometric information of the reference trajectory without training; S107: Learn a local imitation field, which consists of a nominal field and a correction field; S109: Training state-related activation function, the activation function is used to determine whether a state is located within the demonstration area and to determine the fusion weight of the local imitation field and the global attraction field; S111: Using the trained state-related activation function, the final local-mimicking-global-attraction dynamic system is generated from the global attraction field and the local mimicry field.
2. The robot skill learning method based on local imitation of global attraction characteristics as described in claim 1, wherein in step S101, the preprocessing of the data includes: Time normalization, spatial normalization, endpoint shift to origin, low-pass filtering, and numerical differentiation.
3. The robot skill learning method based on local imitation of global attraction characteristics as described in claim 2, wherein in step S105, the global attraction field includes a contraction term and a forward term, the contraction term pulls any state toward the nearest point on the reference trajectory, and the forward term drives the state to move along the tangent direction of the reference trajectory; the global attraction field is: in, For global attraction field, and These are the positive weights of the attraction term towards the reference trajectory and the motion term along the reference trajectory, respectively. For the generalized state of the robot, Indicates the reference trajectory. Indicates the progress of the normalization task. Distance on the reference trajectory The nearest point, This is the reference velocity of the reference trajectory at that point.
4. The robot skill learning method based on local imitation of global attraction characteristics as described in claim 3, wherein in step S107, the local imitation field is: in, For local imitation field, Let be the nominal velocity field, parameterized by any function approximator with sufficient fitting capability. The correction field is constructed based on the reference trajectory and the corresponding distance field to ensure the stability of the entire local system that mimics the global attraction dynamics. For the trainable parameters of the nominal field network, the subscripts are... It represents the nominal field.
5. The robot skill learning method based on local imitation of global attraction characteristics as described in claim 4, wherein step S107 includes the following sub-steps: S1071: Construct a nominal field neural network, which adopts a multilayer perceptron, with state coordinates as input and velocity as output, and two hidden layers with 32 neurons in each layer; S1072: Generate augmented training data, add a small-amplitude Gaussian perturbation to each demonstration sample, construct an enhanced target velocity, wherein the enhanced target velocity retains the tangential component of the original demonstration velocity and adds a normal pullback component pointing to the demonstration trajectory; S1073: Training the nominal field, using the Adam optimizer to train the network during training, so that the predicted speed approximates the enhanced target speed; S1073: Construct a correction field, which monitors the output of the nominal field: when the velocity component of the nominal field along the direction of the reference trajectory is insufficient, the correction field supplements the missing amount to ensure that the state necessarily advances along the reference trajectory; when the state is close to the end point, the correction field forcibly supplements the velocity component pointing to the end point to ensure that the velocity of the nominal field is zero at the end point.
6. The robot skill learning method based on local imitation of global attraction characteristics as described in claim 5, wherein step S109 includes the following sub-steps: S1091: Add Gaussian noise centered on the demonstration state to form the source distribution; and use a Gaussian tubular distribution of predetermined width centered on the reference trajectory to form the target distribution. S1092: The velocity field is trained by matching the optimal transmission condition flow. The velocity field continuously transports any state from the source distribution space to the target distribution space. During the training process, each sample in the source distribution space is paired with a sample in the target distribution space through optimal transmission to ensure the geometric semantic consistency between the samples before and after the mapping. S1093: After training is completed, for any state, its mapping position in the target distribution space is obtained by integrating the velocity field, the distance from the mapping position to the reference trajectory is calculated, and the activation value is determined based on the distance value.
7. The robot skill learning method based on local imitation of global attraction characteristics as described in claim 6, wherein in step S111, the local imitation of global attraction dynamic system is: in, Let be the derivative of the robot's state with respect to time, i.e., the generalized velocity. For the velocity field of LIGA-DS, For global attraction field, For local imitation field, This is a state-dependent activation function.
8. The robot skill learning method based on local imitation of global attraction characteristics as described in claim 7, in step S101, when the collected data is periodic handwritten trajectory data, the reference trajectory adopts a closed curve, the closed curve is connected end to end and the velocity is continuous.
9. In the robot skill learning method based on local imitation of global attraction characteristics as described in claim 8, in step S101, when the collected data is periodic handwritten trajectory data, the correction field adds a radial attraction term, which, while ensuring the advancement along the trajectory, adds an additional attraction force pointing to the reference trajectory, ensuring that the state converges to the closed trajectory rather than a single point.
10. The robot skill learning method based on local imitation of global attraction characteristics as described in claim 9, further comprising multi-subtask combination learning, wherein the multi-subtask combination learning constructs four test scenarios, and independently constructs a reference trajectory, distance field, and single-task LIGA-DS for each subtask; during online execution, the distance from the current state to the reference trajectories of all subtasks is calculated, the subtask with the closest distance is selected, and the DS corresponding to the subtask is applied; the test scenarios include: Two aperiodic tasks sharing an endpoint, two aperiodic tasks with different endpoints, a combination of aperiodic and periodic tasks, and a combination of two periodic tasks.
