Robot pose planning control method based on imitation learning and diffusion model
Patent Information
- Application Number
- CN202610086405.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-22
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]这种方式下,在规划过程中最优解的选择依赖人工规则的设定,部分约束条件很难准确建模,又或者泛化性差,而且遇见概率性问题会取中间值
[0011]本公开第五方面实施例提出了一种计算机程序产品,当所述计算机程序产品中的指令由处理器执行时,执行如本公开第一方面实施例提出的基于模仿学习与扩散模型的机器人姿态规划控制方法。
Smart Images

Figure CN122913743A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of robotic arm control technology, specifically to a robot posture planning and control method based on imitation learning and diffusion models. Background Technology
[0002] The constraints in the robot arm posture planning process are divided into two categories. One category is hard constraints, which must be met, such as: (1) the weld bead point is within the reachable space of the robot arm; (2) the welding gun posture meets the process requirements; (3) during the welding process, the robot arm posture meets the continuity constraint and cannot change abruptly, such as avoiding posture near singular points; (4) the welding process needs to avoid obstacles and avoid collisions with the workpiece; (5) avoid the excessive entanglement of flexible objects such as cables, which would cause the robot arm to stop moving. The other category is soft constraints, which try to find the optimal solution, such as: (1) ensure the wire feeding tube is stretched out as much as possible to reduce wire feeding resistance; (2) ensure the robot arm posture is reasonable as much as possible to avoid excessive twisting or redundant movements and maintain the consistency and smoothness of the working posture; (3) weld as long a distance as possible (a long weld bead; if welding is required multiple times, it should be completed in as few times as possible); (4) ensure that the force on each joint of the robot arm is small as much as possible to ensure better control accuracy.
[0003] In related technologies, when solving the problem of end-effector position planning and robotic arm posture selection under multi-objective constraints, brute-force search, particle swarm optimization or its variants, deep reinforcement learning, and imitation learning are commonly used solutions.
[0004] In this approach, the selection of the optimal solution during the planning process depends on the setting of manual rules. Some constraints are difficult to model accurately, or the generalization is poor. Moreover, when encountering probabilistic problems, the intermediate value will be taken. Summary of the Invention
[0005] This disclosure aims to at least partially address one of the technical problems in the related art.
[0006] Therefore, the purpose of this disclosure is to propose a robot posture planning and control method, device, electronic device, and storage medium based on imitation learning and diffusion models. By constructing a structured welding scene classification system and training a conditional denoising diffusion probability model based on paired welding scene and action datasets, intelligent planning and control of the robotic arm's welding posture is achieved. The core of this method is to encode complex welding task scenarios into conditional information and utilize the powerful generative capability of the diffusion model to iteratively denoise from random noise to generate a smooth and feasible target pose sequence. Finally, the sequence is converted into joint commands to drive the robotic arm through inverse kinematics. This scheme effectively integrates the data-driven advantages of imitation learning with the robust generative capability of the diffusion model, improving the adaptability and generalization ability of the planning system to different welding scenarios and reducing the reliance on precise manual programming.
[0007] To achieve the above objectives, the robot posture planning and control method based on imitation learning and diffusion model proposed in the first aspect of this disclosure includes: Based on multiple factors that influence the welding posture planning of the robotic arm, a structured welding scenario classification system is constructed. Under the welding scenarios covered by the welding scenario classification system, a paired dataset is collected, wherein the paired dataset includes welding scenario data and welding action data; Based on the paired dataset, a denoising neural network with a conditional denoising diffusion probability model as its core is trained; For a new welding task, its scene information is obtained and encoded as scene context condition information; The scene context information is input into the trained denoising neural network, and multi-step iterative denoising is performed starting from a random noise trajectory to generate the target pose sequence. Based on the target pose sequence, the joint angle sequence of the robotic arm is obtained by inverse kinematics solution to control the robotic arm to complete the welding.
[0008] To achieve the above objectives, the robot posture planning and control device based on an imitation learning and diffusion model proposed in the second aspect of this disclosure includes: The module is used to build a structured welding scenario classification system based on multiple factors that affect the welding posture planning of the robotic arm; The acquisition module is used to acquire paired datasets under the welding scenarios covered by the welding scenario classification system, wherein the paired datasets include welding scenario data and welding action data; The training module is used to train a denoising neural network based on the paired dataset, with a conditional denoising diffusion probability model as its core. The acquisition module is used to acquire scene information for new welding tasks and encode it into scene context condition information; The generation module is used to input the scene context information into the trained denoising neural network and perform multi-step iterative denoising starting from a random noise trajectory to generate a target pose sequence. The control module is used to obtain the joint angle sequence of the robotic arm through inverse kinematics based on the target pose sequence in order to control the robotic arm to complete the welding.
[0009] The electronic device proposed in the third aspect of this disclosure includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the robot posture planning and control method based on the imitation learning and diffusion model proposed in the first aspect of this disclosure.
[0010] The fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing a computer program that, when executed by a processor, implements a robot posture planning and control method based on an imitation learning and diffusion model as proposed in the first aspect of this disclosure.
[0011] A fifth aspect of this disclosure provides a computer program product in which, when instructions are executed by a processor, a robot posture planning and control method based on an imitation learning and diffusion model as proposed in a first aspect of this disclosure is performed.
[0012] The robot posture planning and control method, device, electronic device, and storage medium disclosed herein, based on imitation learning and diffusion models, construct a structured welding scene classification system according to multiple factors influencing the welding posture planning of the robotic arm. Within the welding scenes covered by the classification system, paired datasets are collected, including welding scene data and welding motion data. Based on the paired datasets, a denoising neural network with a conditional denoising diffusion probability model as its core is trained. For new welding tasks, scene information is acquired and encoded as scene context condition information. The scene context condition information is input into the trained denoising neural network, and multi-step iterative denoising is performed starting from a random noise trajectory to generate a target pose sequence. Based on the target pose sequence, the robotic arm joint angle sequence is obtained through inverse kinematics to control the robotic arm to complete the welding. Therefore, by constructing a structured welding scene classification system and training a conditional denoising diffusion probability model based on paired welding scene and action datasets, intelligent planning and control of the robotic arm's welding posture is achieved. The core of this approach is to encode complex welding task scenarios into conditional information and utilize the powerful generative capabilities of the diffusion model to iteratively denoise from random noise, generating a smooth and feasible target pose sequence. Finally, this sequence is transformed into joint commands to drive the robotic arm through inverse kinematics. This scheme effectively integrates the data-driven advantages of imitation learning with the robust generative capabilities of the diffusion model, improving the adaptability and generalization ability of the planning system to different welding scenarios and reducing the reliance on precise manual programming.
[0013] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0014] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which: Figure 1 This is a flowchart illustrating a robot posture planning and control method based on an imitation learning and diffusion model proposed in one embodiment of this disclosure. Figure 2 This is a schematic diagram of the construction and training process of the neural network model proposed in this disclosure; Figure 3 This is a schematic diagram of the structure of a robot posture planning and control device based on an imitation learning and diffusion model proposed in an embodiment of this disclosure; Figure 4 This is a block diagram of an electronic device according to an embodiment of the present application. Detailed Implementation
[0015] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are used only to explain this disclosure, and should not be construed as limiting this disclosure. Rather, embodiments of this disclosure include all variations, modifications, and equivalents falling within the spirit and scope of the appended claims.
[0016] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this disclosure are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0017] Figure 1 This is a flowchart illustrating a robot posture planning and control method based on an imitation learning and diffusion model proposed in one embodiment of this disclosure.
[0018] It should be noted that the execution subject of the robot posture planning and control method based on the imitation learning and diffusion model in this embodiment is a robot posture planning and control device based on the imitation learning and diffusion model. This device can be implemented by software and / or hardware. The device can be configured in an electronic device, which may include, but is not limited to, a terminal, a server, etc. For example, the terminal may be a mobile phone, a PDA, etc.
[0019] like Figure 1 As shown, the robot posture planning and control method based on imitation learning and diffusion model includes: S101: Based on multiple factors that influence the welding posture planning of the robotic arm, a structured welding scenario classification system is constructed.
[0020] Imitation learning, a machine learning paradigm, aims to enable intelligent agents (such as robots) to learn strategies or skills to perform specific tasks by observing and imitating behavioral data demonstrated by experts (such as human operators). In this method, a strategy for welding posture planning is learned from a collected paired dataset.
[0021] Among them, the diffusion model refers to a class of advanced generative artificial intelligence models. Its core idea is to gradually add noise to data (such as images or trajectories) through a "forward diffusion process" until the data becomes pure random noise; then, a neural network is trained to learn a "reverse denoising process" to gradually recover the original data structure from the noise. In this method, it is used to generate optimal pose trajectories that meet scene conditions from random noise.
[0022] Robot posture planning / control refers to planning a continuous, smooth, collision-free motion trajectory (posture sequence) from the starting point to the target point in joint space or Cartesian space, and controlling it to execute according to this trajectory.
[0023] In this embodiment of the disclosure, when constructing a structured welding scene classification system, the infinitely diverse welding scenes can be systematically summarized, classified and coded according to clear logic, hierarchy and dimensions, forming an organized knowledge framework, which facilitates the systematic collection of data and the conditional learning of models.
[0024] Optionally, in some embodiments, multiple factors influencing the robotic arm's welding posture planning include weld type, weld geometry, workpiece geometry, workpiece orientation in space, and obstacle distribution. Therefore, by clearly defining the key factors affecting posture planning (such as weld type, geometry, workpiece shape and orientation, and obstacle distribution), specific and operable dimensional basis is provided for constructing a comprehensive and structured welding scenario classification system. This allows subsequent data acquisition, scenario coding, and conditional generation model training to more systematically and completely cover the diversity and complexity of real welding tasks, thereby ensuring that the trained planning model can fully understand and respond to these core influencing factors, generating safer, more efficient, and collision-free robotic arm motion postures.
[0025] In this embodiment, when a structured welding scenario classification system is constructed based on multiple factors influencing the robotic arm's welding posture planning, the infinitely diverse, complex, and fragmented welding task environments can be systematically summarized into finite and clear classification dimensions (such as weld type, workpiece shape, etc.), thus constructing a logically clear knowledge framework. This provides a unified and structured foundation for the subsequent systematic collection, storage, and retrieval of data, as well as the conditional learning of the model, avoiding data chaos and bias, and is a prerequisite for achieving the method's universality and scalability.
[0026] S102: Under the welding scenarios covered by the welding scenario classification system, collect and obtain paired datasets, where the paired datasets include welding scenario data and welding action data.
[0027] The welding scenario refers to the entire physical and task environment in which a specific welding task is performed, including the workpiece (geometry, shape, orientation), weld (type, geometric features, spatial path), obstacles, and process requirements, as well as all related factors.
[0028] In this context, a paired dataset refers to a dataset where each data sample contains a pair of corresponding pieces of information during the data acquisition process: input (welding scenario data) and expected output (welding action data demonstrated by an expert in that scenario). This pairing relationship forms the basis for supervised learning and imitation learning.
[0029] Optionally, in some embodiments, the welding scene data includes a 3D model or point cloud of the workpiece, a 3D coordinate sequence of the weld, and the welding torch's process requirements. This specifically defines the content of the welding scene data (workpiece 3D model / point cloud, weld coordinate sequence, welding torch process requirements), enabling the collected data to accurately and digitally represent the core physical constraints and process requirements of the welding task. Using this type of structured information as conditional input to the model can effectively guide the diffusion model to strictly adhere to the workpiece's geometry, the precise path of the weld, and welding process specifications (such as welding torch angle, speed, etc.) when generating posture sequences, thereby generating motion trajectories that are not only executable but also meet welding quality requirements.
[0030] In this embodiment of the disclosure, when a paired dataset is collected within the welding scenarios covered by the welding scenario classification system, wherein the paired dataset includes welding scenario data and welding action data, "scenario-action" paired data demonstrated by experts can be collected based on the aforementioned classification system in comprehensively representative scenarios. This data constitutes the "teaching material" for imitation learning, not only capturing the optimal postures and implicit experiences of human operators in various scenarios, but also ensuring a strong correlation between the data and scenario categories. This provides high-quality, highly relevant supervisory signals for training intelligent models capable of understanding and responding to specific scenario conditions.
[0031] S103: Based on the paired dataset, train a denoising neural network with a conditional denoising diffusion probability model as its core.
[0032] The conditional denoising diffusion probability model is a variant of the diffusion model. The "condition" refers to the additional guidance information (in this method, "scene context condition information") the model receives during the reverse denoising data generation process, thereby controlling the generated data content to conform to specific conditions. This is crucial for achieving on-demand planning.
[0033] Among them, the denoising neural network is a neural network (such as U-Net) that specifically performs the function of "predicting and removing noise from noisy data" in the diffusion model. It is a core component of the model, and its performance directly determines the quality of the generated trajectory.
[0034] Optionally, in some embodiments, the denoising neural network is trained to predict noise in a noisy trajectory based on the noisy trajectory, noise level indication information, and scene context information. The denoising neural network adopts a U-Net architecture, and scene context information and noise level indication information are injected into each level of the U-Net network through a cross-attention mechanism and / or adaptive layer normalization technology. Thus, by adopting the U-Net architecture and utilizing the cross-attention mechanism and / or adaptive layer normalization technology to inject scene conditions and noise level information, a deep and effective fusion of conditional information and noise data at multiple levels of the neural network is achieved. This design ensures that the denoising neural network can fully perceive the current denoising progress (noise level) and specific task requirements (scene context) at each step of noise prediction, thereby generating more accurate trajectory predictions that better meet the conditional constraints, improving the model's conditional generation quality, training stability, and planning accuracy.
[0035] Cross-attention is a mechanism that enables neural networks to correlate and focus on information from different modalities or sources (such as "noise trajectories" and "scene conditions"). It allows the model to dynamically focus on the most relevant parts of the scene conditions at each step of trajectory generation, achieving deep information fusion.
[0036] Adaptive layer normalization is a technique that injects conditional information (such as scene context and noise level) into the neural network. It dynamically adjusts the scaling and translation parameters in the layer normalization operation by using conditional information, thereby controlling the activation distribution of each layer of the network and making the network behavior adapt to specific generation conditions.
[0037] Optionally, in some embodiments, the training process of the denoising neural network includes a forward noise diffusion process and a backward denoising process. The forward noise diffusion process involves progressively adding Gaussian noise to an optimal trajectory during the training phase, transforming it into pure Gaussian noise after T steps to construct paired training data with noisy input and a denoising target. The backward denoising process, used as the core planning algorithm of the denoising neural network during the online planning phase, iteratively performs denoising operations starting from a random noisy trajectory, ultimately generating the optimal trajectory. This clearly illustrates the dual-process training and application mechanism of the diffusion model: "adding noise first, then denoising." The forward diffusion process systematically constructs complete data pairs from clear trajectories to noisy ones during the training phase, providing sufficient supervision signals for the neural network to learn complex denoising mappings. The backward denoising process, in the application phase, uses the trained model as an iterative optimizer, starting from random initialization and progressively "deriving" the optimal trajectory. This mechanism enables the method to possess both powerful data fitting capabilities and creative planning capabilities from scratch, enabling it to handle complex multimodal task distributions.
[0038] The forward noise diffusion process is the training data construction stage of the diffusion model. It is a fixed Markov chain with progressively increasing Gaussian noise, which gradually destroys a clean real trajectory into pure Gaussian noise within a preset number of steps (T steps).
[0039] The reverse denoising process is the core generation / inference stage of the diffusion model. It is a learned Markov chain that gradually removes noise. Starting with random noise, the trained denoising neural network predicts and subtracts noise step by step, and after T steps, a clean and optimal trajectory that meets the conditions is recovered.
[0040] Optionally, in some embodiments, in each iteration of the inverse denoising process, the input to the denoising neural network also includes virtual physical feedback information, which includes at least one of collision detection, singularity proximity, and current joint torques. Thus, the introduction of virtual physical feedback information (such as collision detection, singularity proximity, and joint torques) in each iteration of the inverse denoising process adds a crucial physical constraint and safety verification layer to the purely data-based generation process. This design enables the planning process to consider and avoid physical limitations in the robot arm's motion (such as collisions, singular configurations, and torque overruns) early in the trajectory generation process, thereby achieving online, closed-loop optimization, significantly improving the physical feasibility and execution safety of the generated posture sequence, and reducing the risk of failure in simulation or actual execution.
[0041] Virtual physics feedback information refers to the physical constraint evaluation results calculated in real time through a virtual robot simulation environment in each iteration of the reverse denoising process. It is not pre-given data, but generated online to instantly correct physically infeasible results that may arise from purely data-driven planning, such as collisions, singularities, and excessive torques, forming a closed loop of "planning-simulation verification-correction".
[0042] In this embodiment of the disclosure, when training a denoising neural network based on a conditional denoising diffusion probability model using a paired dataset, a general diffusion model can be trained into a "conditional generator" specifically for welding posture planning. Through training, the neural network learns complex mapping relationships: how to accurately predict the noise to be removed based on a given noise trajectory, noise level, and the most critical scene conditions, thereby ultimately obtaining the optimal trajectory that meets the requirements of the scene. This is the core process of transforming data value into planning capability.
[0043] S104: For a new welding task, obtain its scene information and encode it as scene context condition information.
[0044] The scene context information refers to the encoded scene information of a new welding task (such as a 3D model, weld coordinates, etc.) and transformed into a fixed-format vector or tensor representation that can be understood and processed by a neural network. It serves as a "condition" or "instruction" for the generation process, guiding the model to generate actions suitable for the specific scene.
[0045] In this embodiment of the disclosure, when a new welding task is acquired and encoded as scene context condition information, the original information (3D model, weld, etc.) of a new, specific welding task (such as a workpiece to be welded) can be transformed into a standardized, digital "task specification" (scene context condition information). This encoding enables the specific constraints and requirements of the task to be accurately understood and received by the trained neural network, and is a key interface for realizing "one-to-many" planning (one model handling multiple tasks).
[0046] S105: Input the scene context information into the trained denoising neural network, and perform multi-step iterative denoising starting from a random noise trajectory to generate the target pose sequence.
[0047] The random noise trajectory is a meaningless sequence of trajectories composed entirely of random numbers, which is the starting point of the reverse denoising process. The magic of the diffusion model lies in its ability to "evolve" a structured and meaningful optimal trajectory from such a random starting point through iterative denoising.
[0048] The target pose sequence refers to a series of continuous, discrete pose points of the robotic arm's end effector (welding torch) in Cartesian space (three-dimensional position and three-dimensional orientation), from the starting point to the ending point. This is the direct output of the planning.
[0049] In this embodiment, after receiving the task conditions, the model starts from a completely random, noisy starting point and executes a series of iterative optimization steps (denoising) guided by a neural network. Each step corrects the trajectory in a direction that better conforms to the physical scene and process requirements, ultimately "emerging" a smooth, feasible, and optimal target pose sequence that is specifically adapted to the current new task. This process combines creative search (starting from random) with strong constraints, enabling it to handle complex, multimodal planning problems.
[0050] S106: Based on the target pose sequence, the joint angle sequence of the robotic arm is obtained by solving inverse kinematics to control the robotic arm to complete the welding.
[0051] Inverse kinematics is a fundamental problem in robotics. Given the desired pose (target pose) of the end effector of a robotic arm, the goal is to solve for a set of angle values for each joint of the robotic arm that can achieve that pose. This is a necessary step in transforming high-level pose planning into low-level joint drive commands.
[0052] The joint angle sequence, corresponding to the "target pose sequence," is the sequence of target angles for each joint of the robotic arm at the corresponding time step, obtained after inverse kinematics solving. This sequence can be directly sent to the joint controller of the robotic arm for execution.
[0053] In this embodiment of the disclosure, when the joint angle sequence of the robotic arm is obtained by inverse kinematics based on the target pose sequence to control the robotic arm to complete welding, the abstract "target pose sequence" planned in Cartesian space (three-dimensional spatial position and posture) can be transformed into a "joint angle sequence" in joint space that can be specifically executed by the robotic arm itself through inverse kinematics calculation. This is a bridge connecting high-level intelligent planning and low-level physical execution, transforming the generated digital trajectory into precise control commands that drive the movement of each joint of the real robotic arm, thereby completing a closed loop from intelligent decision-making to physical action.
[0054] In this embodiment, a structured welding scene classification system is constructed based on multiple factors affecting the welding posture planning of the robotic arm. Paired datasets are collected within the welding scenes covered by this classification system. These datasets include welding scene data and welding action data. Based on the paired datasets, a denoising neural network with a conditional denoising diffusion probability model as its core is trained. For new welding tasks, scene information is acquired and encoded as scene context condition information. This scene context condition information is input into the trained denoising neural network, and multi-step iterative denoising is performed starting from a random noise trajectory to generate a target pose sequence. Based on the target pose sequence, the robotic arm joint angle sequence is obtained through inverse kinematics to control the robotic arm to complete the welding. Therefore, by constructing a structured welding scene classification system and training a conditional denoising diffusion probability model based on paired welding scene and action datasets, intelligent planning and control of the robotic arm's welding posture is achieved. The core of this approach is to encode complex welding task scenarios into conditional information and utilize the powerful generative capabilities of the diffusion model to iteratively denoise from random noise, generating a smooth and feasible target pose sequence. Finally, this sequence is transformed into joint commands to drive the robotic arm through inverse kinematics. This scheme effectively integrates the data-driven advantages of imitation learning with the robust generative capabilities of the diffusion model, improving the adaptability and generalization ability of the planning system to different welding scenarios and reducing the reliance on precise manual programming.
[0055] In summary, this disclosure addresses the problems of relying on manual rule setting, difficulty in modeling complex constraints, and difficulty in adjusting weights in the prior art. It proposes a robot end-effector position and body posture planning and control method based on a combination of imitation learning and diffusion model. Furthermore, it innovatively introduces physical constraint semaphores, which can guide the iteration towards the optimal solution based on physical feedback during the iteration process, effectively reducing the number of algorithm iterations and improving the algorithm performance.
[0056] The core lies in building a welding planning intelligent agent capable of "perception-reasoning-decision-making" like a human expert. The fundamental difference from existing technologies is that we do not treat individual constraints as independent optimization objectives or weighted integration into a single objective. Instead, we learn an end-to-end decision-making model that maps complex scenarios to optimal poses through a data-driven approach.
[0057] However, traditional imitation learning uses a "one-step" regression prediction, which has poor generalization and tends to take the middle value when encountering probabilistic problems. For example, when there are two very similar inputs, both poses A and B meet the requirements. Traditional imitation learning tends to give a solution between A and B, rather than A or B. The actual effect is completely different from expectations. Therefore, we combined the latest diffusion model with imitation learning to improve the algorithm performance.
[0058] Under the condition of introducing a diffusion model, a virtual physical feedback mechanism is innovatively proposed and introduced. Each iteration calculates physical feedback based on the results of the previous iteration, such as the distance between the robotic arm and the workpiece, the torque of each joint, and other signal quantities. These signal quantities are then input into the model to guide the algorithm iteration.
[0059] The complete technical implementation of this invention mainly includes the following four stages: Phase 1: Construction of Welding Scenario System Technical approach: First, systematically analyze and summarize various factors affecting the welding posture planning of the robotic arm, and construct a structured welding scenario classification system. These factors include, but are not limited to: weld type (e.g., flat welding, vertical welding, horizontal welding, overhead welding), weld geometry (e.g., straight line, curve, spatial curve), workpiece geometry, workpiece orientation in space, and obstacle distribution. Based on this system, design and cover as many typical welding scenarios as possible.
[0060] Function: This system provides scientific guidance for subsequent data collection, ensuring the diversity, representativeness, and balance of training data. This is the foundation for the subsequent neural network model to generalize to various new scenarios, avoiding model decision errors caused by data bias.
[0061] Phase Two: Expert Demonstration of Data Collection Technical approach: In the various welding scenarios defined above, experienced operators provide manual teaching. During the teaching process, based on their experience, the operators plan the welding torch end-effector trajectory and robotic arm posture sequence for each weld pass, satisfying all hard constraints while achieving optimal soft constraint effects. Simultaneously, the robot system's high-precision sensors collect and record the following data: a. Scene input data: including the 3D model (or point cloud) of the workpiece, the 3D coordinate sequence of the weld, and the process requirements of the welding torch (such as the standard attitude angle range).
[0062] b. Expert motion data: that is, the optimal welding torch end pose (position and attitude) sequence ultimately executed by the operator, and the corresponding joint angle sequence of the robotic arm.
[0063] What it does: This process generates a high-quality "state-action" pairing dataset, where the "state" is a welding scenario and the "action" is the expert's optimal plan in that scenario. This dataset serves as a "textbook" for imitation learning, allowing the neural network to learn and replicate the expert's decision-making behavior.
[0064] Phase 3: Building and Training the Neural Network Model like Figure 2 As shown, Figure 2 This is a schematic diagram of the construction and training process of the neural network model proposed in this disclosure.
[0065] Technical approach 1: Design a multi-tower model neural network structure that combines "position encoding", "scene recognition" and "physical feedback". Finally, through the transformer architecture, the outputs of the above three modules are fused and decoded to calculate the end pose and the joint angle of the robotic arm.
[0066] Technical means 2: Abandoning the "one-step" regression prediction in traditional imitation learning, it innovatively introduces a conditional denoising diffusion probability model to perform trajectory planning tasks. At the same time, during the diffusion process, it innovatively introduces virtual physical feedback (whether there is a collision, whether it is close to a singularity, the current torque of each joint, etc.) to guide the model to iterate the optimal solution. This process simulates the human way of thinking of "stepwise refinement".
[0067] a. Forward noise diffusion process (constructing training data): During the training phase, for an expert-demonstrated optimal trajectory τ_optimal (i.e., a sequence containing N solder joint poses), we progressively add Gaussian noise to it using a Markov process. After T steps, the trajectory eventually becomes a pure Gaussian noise τ_T.
[0068] This process is fixed and does not require learning; its purpose is to provide paired data of "noisy input" and "denoised target" for training.
[0069] b. Reverse denoising process (core planning algorithm): During the online planning phase, the model begins with a random, noisy trajectory τ_T. This is a fundamental change: instead of seeking a single "initial solution," we start with a random distribution full of possibilities.
[0070] A denoising neural network ε_θ is trained to perform iterative denoising. At each step t, the network takes the following three as inputs: Current noisy trajectory τ_t; Time step t (used to indicate noise level); Conditional information c (i.e., the scene context vector generated by the "scene feature coding tower", which encodes all environmental constraints such as workpiece, weld, obstacles, etc.).
[0071] The network's task is to predict the noise ε to be added to the trajectory. Then, based on the predicted noise, we compute a more denoised and clearer trajectory τ_{t-1} from τ_t.
[0072] After multiple iterations (e.g., 50-100 times), a pure noise trajectory τ_T is gradually "shaped" into a smooth, reasonable, and optimal trajectory τ_0 that satisfies all complex constraints.
[0073] c. Structural design of the denoising network: This network typically employs the U-Net architecture, which excels at processing sequential data. Its input and output are sequences of trajectories of the same dimension.
[0074] Conditional injection: The scene context vector c and time step t are injected into each layer of U-Net through cross-attention mechanism and adaptive layer normalization to ensure that the denoising process always adheres to the physical constraints of the current welding task.
[0075] Functions: a. Escape local optima: Iterating from random noise gives the planning process a strong exploratory capability, enabling it to escape local optima and find those counterintuitive but globally better trajectories that are ignored by traditional methods.
[0076] b. Implicit Modeling of Multimodal Distributions: A weld seam may have multiple equally good welding postures. Diffusion models are naturally suited for learning this "multimodal" distribution. During sampling, due to different initial noise levels, it can generate multiple diverse and feasible optimal trajectories for the operator to ultimately choose from. This is something that behavior cloning and traditional optimization cannot achieve.
[0077] c. View the planning process as iterative optimization: The entire denoising process is essentially a gradient-based optimization process. Each iteration corrects unreasonable parts of the trajectory (such as collisions, singularities, and overly tight wire feed tubes), eventually converging to a high-quality solution. It does not require manual design of the optimization objective function because the goal of "approaching the expert demonstration" is implicitly included in the model through training.
[0078] d. Enhanced robustness: Since the model is trained on data with varying noise levels, it exhibits stronger robustness to noisy inputs or slightly changing scenarios.
[0079] Phase 4: Online Planning and Execution Technical approach: During actual welding, for new workpieces and weld beads, their scene information is first acquired (e.g., through 3D scanning) and input into a pre-trained dual-tower model. The model then predicts the optimal "reference" welding torch end pose sequence for the entire weld bead point by point.
[0080] Its function: The neural network predicts extremely fast speed, and can complete the initial pose planning of a long weld bead in milliseconds, which solves the problem of long time consumption of traditional search and optimization algorithms.
[0081] Subsequent refinement: The pose output by the neural network is used as a high-quality initial solution and input into the inverse kinematics solver of the robotic arm to calculate the specific joint angles. Since the pose predicted by the neural network is already very close to the optimum, the inverse kinematics process can be set with strict tolerance and iteration limits to quickly obtain a final robotic arm posture sequence that satisfies all hard constraints (reachability, obstacle avoidance, and no singularities). For continuous constraints, interpolation and smoothing filtering can be performed at the trajectory level.
[0082] Based on the above embodiments, the technical effects that the method proposed in this disclosure can achieve include at least the following: 1. Fast planning speed: The forward inference time of neural networks is extremely short (milliseconds). Compared with search-based or swarm optimization methods (minutes or even longer), it realizes real-time or near real-time online planning, which greatly improves the response efficiency of welding automation systems.
[0083] 2. High planning quality: By mimicking the decision-making of top welding experts, the generated planning results are better in soft constraint dimensions (such as posture rationality, wire feed tube extension, and motion smoothness) while satisfying all hard constraints, and are closer to the "expert level", thereby improving welding quality and robot motion performance.
[0084] 3. No complex modeling required: It successfully avoids the challenge of building complex physical models for constraints that are difficult to quantify precisely, such as the state of the wire feed tube and the forces on the joints. The model learns the implicit representation of these constraints directly from the data, reducing the reliance on precise modeling knowledge in the domain.
[0085] 4. Avoids manual parameter tuning: It avoids the predicament of traditional optimization methods that require repeated manual adjustment of multi-objective weight coefficients. The model's "trade-off" strategy is learned from expert data, making it more scientific and stable.
[0086] 5. Strong generalization ability: By constructing a wide range of welding scenarios and collecting data, the trained model can handle new welds that are not seen before but belong to the defined scenario system, and has good generalization performance.
[0087] 6. High precision and interpretability.
[0088] Figure 3 This is a schematic diagram of the structure of a robot posture planning and control device based on an imitation learning and diffusion model proposed in one embodiment of this disclosure.
[0089] like Figure 3 As shown, the robot posture planning and control device 30 based on imitation learning and diffusion model includes: Module 301 is used to construct a structured welding scenario classification system based on multiple factors that affect the welding posture planning of the robotic arm. The acquisition module 302 is used to acquire paired datasets in the welding scenarios covered by the welding scenario classification system. The paired datasets include welding scenario data and welding action data. Training module 303 is used to train a denoising neural network based on a conditional denoising diffusion probability model on a paired dataset. The acquisition module 304 is used to acquire scene information for a new welding task and encode it into scene context condition information. The generation module 305 is used to input scene context information into the trained denoising neural network and perform multi-step iterative denoising starting from a random noise trajectory to generate the target pose sequence. The control module 306 is used to obtain the joint angle sequence of the robotic arm by inverse kinematics based on the target pose sequence in order to control the robotic arm to complete the welding.
[0090] It should be noted that the foregoing explanation of the robot posture planning and control method based on imitation learning and diffusion model also applies to the robot posture planning and control device based on imitation learning and diffusion model in this embodiment, and will not be repeated here.
[0091] In this embodiment, a structured welding scene classification system is constructed based on multiple factors affecting the welding posture planning of the robotic arm. Paired datasets are collected within the welding scenes covered by this classification system. These datasets include welding scene data and welding action data. Based on the paired datasets, a denoising neural network with a conditional denoising diffusion probability model as its core is trained. For new welding tasks, scene information is acquired and encoded as scene context condition information. This scene context condition information is input into the trained denoising neural network, and multi-step iterative denoising is performed starting from a random noise trajectory to generate a target pose sequence. Based on the target pose sequence, the robotic arm joint angle sequence is obtained through inverse kinematics to control the robotic arm to complete the welding. Therefore, by constructing a structured welding scene classification system and training a conditional denoising diffusion probability model based on paired welding scene and action datasets, intelligent planning and control of the robotic arm's welding posture is achieved. The core of this approach is to encode complex welding task scenarios into conditional information and utilize the powerful generative capabilities of the diffusion model to iteratively denoise from random noise, generating a smooth and feasible target pose sequence. Finally, this sequence is transformed into joint commands to drive the robotic arm through inverse kinematics. This scheme effectively integrates the data-driven advantages of imitation learning with the robust generative capabilities of the diffusion model, improving the adaptability and generalization ability of the planning system to different welding scenarios and reducing the reliance on precise manual programming.
[0092] According to embodiments of this application, this application also provides an electronic device and a readable storage medium.
[0093] Figure 4 This is a block diagram of an electronic device according to an embodiment of the present application.
[0094] like Figure 4 As shown, the electronic device includes: The memory 401, the processor 402, and the computer instructions stored in the memory 401 and executable on the processor 402.
[0095] When the processor 402 executes instructions, it implements the robot posture planning and control method based on the imitation learning and diffusion model provided in the above embodiments.
[0096] Furthermore, electronic devices also include: Communication interface 403 is used for communication between memory 401 and processor 402.
[0097] The memory 401 is used to store computer instructions that can be executed on the processor 402.
[0098] Memory 401 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0099] The processor 402 is used to implement the robot posture planning and control method based on the imitation learning and diffusion model of the above embodiments when executing the program.
[0100] If the memory 401, processor 402, and communication interface 403 are implemented independently, then the communication interface 403, memory 401, and processor 402 can be interconnected via a bus to complete communication between them. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0101] Optionally, in a specific implementation, if the memory 401, processor 402, and communication interface 403 are integrated on a single chip, then the memory 401, processor 402, and communication interface 403 can communicate with each other through an internal interface.
[0102] Processor 402 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0103] This application also proposes a computer program product that, when executed by an instruction processor, implements the robot posture planning and control method based on the imitation learning and diffusion model of the embodiments of this application.
[0104] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0105] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0106] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0107] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0108] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0109] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0110] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0111] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of this application.
Claims
1. A robot posture planning and control method based on imitation learning and diffusion model, characterized in that, include: Based on multiple factors that influence the welding posture planning of the robotic arm, a structured welding scenario classification system is constructed. Under the welding scenarios covered by the welding scenario classification system, a paired dataset is collected, wherein the paired dataset includes welding scenario data and welding action data; Based on the paired dataset, a denoising neural network with a conditional denoising diffusion probability model as its core is trained; For a new welding task, its scene information is obtained and encoded as scene context condition information; The scene context information is input into the trained denoising neural network, and multi-step iterative denoising is performed starting from a random noise trajectory to generate the target pose sequence. Based on the target pose sequence, the joint angle sequence of the robotic arm is obtained by inverse kinematics solution to control the robotic arm to complete the welding.
2. The method as described in claim 1, characterized in that, The factors that influence the robotic arm's welding posture planning include weld type, weld geometry, workpiece geometry, workpiece orientation in space, and obstacle distribution.
3. The method as described in claim 1, characterized in that, The welding scene data includes the three-dimensional model or point cloud of the workpiece, the three-dimensional coordinate sequence of the weld, and the process requirements of the welding torch.
4. The method as described in claim 1, characterized in that, in, The denoising neural network is trained to predict noise in the noisy trajectory based on the noisy trajectory, noise level indication information, and scene context information. The denoising neural network adopts a U-Net architecture, and the scene context information and the noise level indication information are injected into each level of the U-Net network through a cross-attention mechanism and / or adaptive layer normalization technology.
5. The method as described in claim 1, characterized in that, The process of training the denoising neural network includes a forward noise diffusion process and a backward denoising process, wherein, The forward noise diffusion process involves gradually adding Gaussian noise to an optimal trajectory during the training phase, and after T steps, transforming it into pure Gaussian noise to construct paired training data for noisy input and denoised target. The reverse denoising process is the core planning algorithm of the denoising neural network during the online planning stage. It iteratively executes denoising operations starting from a random noise trajectory and finally generates the optimal trajectory.
6. The method as described in claim 5, characterized in that, In each iteration of the reverse denoising process, the input of the denoising neural network also includes virtual physical feedback information, which includes at least one of whether there is a collision, whether it is close to a singularity, and the current joint torque.
7. A robot posture planning and control device based on imitation learning and diffusion model, characterized in that, include: The module is used to build a structured welding scenario classification system based on multiple factors that affect the welding posture planning of the robotic arm; The acquisition module is used to acquire paired datasets under the welding scenarios covered by the welding scenario classification system, wherein the paired datasets include welding scenario data and welding action data; The training module is used to train a denoising neural network based on the paired dataset, with a conditional denoising diffusion probability model as its core. The acquisition module is used to acquire scene information for new welding tasks and encode it into scene context condition information; The generation module is used to input the scene context information into the trained denoising neural network and perform multi-step iterative denoising starting from a random noise trajectory to generate a target pose sequence. The control module is used to obtain the joint angle sequence of the robotic arm through inverse kinematics based on the target pose sequence in order to control the robotic arm to complete the welding.
8. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, in, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-6.