Robot arm imitation learning method and device based on single teaching
By employing a one-shot imitation learning method for robotic arms, and utilizing video annotation and a one-shot imitation learning model, the problem of time-consuming and resource-intensive robotic arm assembly models was solved, enabling rapid adaptation and flexible execution of assembly tasks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2024-05-20
- Publication Date
- 2026-04-21
AI Technical Summary
The existing robotic arm assembly model construction is time-consuming and resource-intensive, lacks flexibility, requires specialized knowledge, and is difficult to adapt quickly to changes in tasks.
A one-shot imitation learning method for robotic arms is adopted. Assembly videos are collected, labeled, and the arm trajectory is analyzed to construct kinematic and object models. An autonomous assembly decision model is generated using the one-shot imitation learning model and integrated into the robotic arm control system.
It enables robotic arms to learn new tasks in a short time, improves learning efficiency, adapts to diverse environments, reduces reliance on labeled data, enhances human-machine interaction and flexibility, and is suitable for industrial assembly.
Smart Images

Figure CN118322214B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of imitation learning technology, and in particular to a method and apparatus for imitation learning of a robotic arm based on a single teaching demonstration. Background Technology
[0002] Imitation learning is a machine learning method whose core idea is to enable machine learning to complete specific tasks by observing and imitating the behavior of humans or other demonstrators. In this learning approach, the machine achieves similar task performance by analyzing and learning the actions, decisions, and strategies of the demonstrator. This method is often used for complex tasks where humans can provide effective demonstrations, while manual programming or traditional rule-based methods are relatively complex or infeasible.
[0003] In the field of robotic arm assembly, imitation learning is generally used to teach robotic arms to complete complex assembly tasks. Through demonstrations by human operators, the robotic arm can learn the correct movements and steps, thus enabling it to perform similar assembly tasks in the future. This method is of great significance in industrial automation, especially when the assembly process requires flexibility, adaptability, and human-machine collaboration. However, traditional methods usually require manually programming the robotic arm to perform specific tasks. This involves complex mathematical modeling and the design of control algorithms, requiring accurate kinematic and dynamic models. The establishment of these models can consume a lot of time and resources. Once the robotic arm is programmed to complete a specific task, changing the task may require redesign and reprogramming, which lacks flexibility. Moreover, it usually requires professionals with in-depth knowledge of mechanics, control theory, and other related fields, which limits the popularization of the technology. Summary of the Invention
[0004] This invention provides a robotic arm imitation learning method and apparatus based on single-teaching, to solve the problems that building a robotic arm assembly model may consume a lot of time and resources and lack flexibility.
[0005] A first aspect of this invention provides a one-shot imitation learning method for a robotic arm, comprising the following steps: acquiring an assembly video of an arm installing a target object, and annotating the assembly video to obtain an annotated assembly video; parsing the annotated assembly video to obtain an arm trajectory sequence; constructing a kinematic model of the target robotic arm and a motion model of the target object based on the arm trajectory sequence; inputting the annotated assembly video into an OpenPose keypoint detection model to extract the coordinates of key points of the arm and the target object; training a one-shot imitation learning model using the coordinates of the key points of the arm, the coordinates of the key points of the target object, the kinematic model of the target robotic arm, and the motion model of the target object to generate an autonomous assembly decision model; optimizing the autonomous assembly decision model to obtain an adaptive decision model; integrating the adaptive decision model into a target robotic arm control system to generate an actual assembly strategy for the target robotic arm, and controlling the target robotic arm to perform automated assembly according to the actual assembly strategy.
[0006] Optionally, parsing the annotated assembly video to obtain the arm trajectory sequence includes:
[0007] Multiple target object images are acquired from the annotated assembly video under different angles, lighting conditions, and occlusion conditions. A Faster R-CNN model is trained using these target object images to obtain a target detection model. The annotated assembly video is input into the target detection model to extract the position information of the target objects. The annotated assembly video is converted into a grayscale image or a color image to calculate pixel displacement and pixel difference between adjacent frames based on the grayscale image or the color image. The pixel displacement is converted into a motion field to determine the overall motion state of the target object. The pixel difference is thresholded to determine the partial motion state of the target object. The continuous arm movement state is determined based on the overall motion state and / or the partial motion state. The position information and the continuous arm movement state are combined using triangulation and a deep learning target tracking algorithm to generate the arm trajectory sequence.
[0008] Optionally, constructing the arm kinematic model and the target object motion model based on the arm trajectory sequence includes:
[0009] Construct a first rigid body kinematic model of the target robotic arm; construct a second rigid body dynamic model or elastic model of the target object; analyze the trajectory sequence of the arm to determine the motion law between the robotic arm and the target object; construct the kinematic model of the target robotic arm and the motion model of the target object respectively based on the motion law, the first rigid body kinematic model and the second rigid body dynamic model or the elastic model.
[0010] Optionally, the step of training a one-shot imitation learning model using the key point coordinates of the arm, the key point coordinates of the target object, the kinematic model of the target robotic arm, and the motion model of the target object to generate an autonomous assembly decision model includes:
[0011] The coordinates of the arm key points and the coordinates of the target object key points are converted into arm key point sequences and target object key point sequences, respectively. The arm key point sequences, the target object key point sequences, the kinematic model of the target robotic arm, and the motion model of the target object are used as training sets. By combining generative adversarial networks and reinforcement learning algorithms, the One-shot imitation learning model is trained using the training sets to generate an autonomous assembly decision model. The arm key point sequences and the target object key point sequences are used as input data for the training sets, and the target robotic arm kinematic model and the target object motion model are used as output data for the training sets.
[0012] Optionally, optimizing the autonomous assembly decision model to obtain an adaptive decision model includes:
[0013] The parameters of the autonomous assembly decision model are optimized using the gradient descent method to obtain a parameter-optimized autonomous assembly decision model; a fitness function is then introduced into the parameter-optimized autonomous assembly decision model to obtain the adaptive decision model.
[0014] Optionally, it also includes:
[0015] The generalization ability of the adaptive decision model is obtained by cross-validation. The generalization ability is compared with a preset threshold. If the generalization ability is greater than the preset threshold, the adaptive decision model is integrated into the target robotic arm control system. Otherwise, the assembly video of the arm installing the target object is re-acquired, and a new adaptive decision model is trained.
[0016] A second aspect of the present invention provides a robotic arm imitation learning device based on a single-teaching demonstration, comprising: an annotation module for acquiring an assembly video of an arm installing a target object and annotating the assembly video to obtain an annotated assembly video; a parsing module for parsing the annotated assembly video to obtain an arm trajectory sequence; a construction module for constructing a kinematic model of the target robotic arm and a motion model of the target object based on the arm trajectory sequence; an extraction module for inputting the annotated assembly video into an OpenPose keypoint detection model to extract the keypoint coordinates of the arm and the target object; a training module for training a One-shot imitation learning model using the keypoint coordinates of the arm, the keypoint coordinates of the target object, the kinematic model of the target robotic arm, and the motion model of the target object to generate an autonomous assembly decision model; an optimization module for optimizing the autonomous assembly decision model to obtain an adaptive decision model; and an integration module for integrating the adaptive decision model into a target robotic arm control system to generate an actual assembly strategy for the target robotic arm and controlling the target robotic arm to perform automated assembly according to the actual assembly strategy.
[0017] A third aspect of the present invention provides an electronic device, including: 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 single-teaching-based robotic arm imitation learning method as described in the above embodiments.
[0018] A fourth aspect of the present invention provides a computer program product, which, when executed by a processor, implements the above-described single-teaching-based robotic arm imitation learning method.
[0019] A fifth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described single-teaching-based robotic arm imitation learning method.
[0020] The single-teaching-based robotic arm imitation learning method and apparatus proposed in this invention can learn new tasks in a relatively short time, thereby improving overall learning efficiency. Imitation learning is based on prior knowledge, and transfer learning applies learned task experience to new tasks, making the robotic arm more adaptable to diverse working environments and tasks. Since only a single teaching is required, it facilitates human-machine collaboration, allowing operators to directly demonstrate the required tasks without spending a lot of time teaching the robotic arm. This allows the robotic arm to start executing tasks immediately after teaching, reducing waiting time and providing a significant advantage in real-time tasks requiring rapid response and execution. It can also adapt to different scenarios and target objects, making the robotic arm more flexible and capable of handling objects of different shapes, sizes, and positions. Compared to traditional machine learning methods that require a large amount of labeled data, it reduces the dependence on large amounts of labeled data and lowers labeling costs. Since the model learns by imitating human actions, the learned tasks are more natural and intuitive, helping to improve the interactivity between the robotic arm and humans. In summary, this invention allows the robotic arm to quickly adapt to new tasks and assembly environments, and is suitable for the industrial assembly field.
[0021] Additional aspects and advantages of the invention 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 the invention. Attached Figure Description
[0022] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0023] Figure 1 A flowchart illustrating a robotic arm imitation learning method based on a single teaching demonstration, provided as an embodiment of the present invention;
[0024] Figure 2 A block diagram illustrating a robotic arm imitation learning device based on a single teaching demonstration, provided in an embodiment of the present invention;
[0025] Figure 3 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0026] Embodiments of the present invention 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 intended to explain the present invention, and should not be construed as limiting the present invention.
[0027] The following description, with reference to the accompanying drawings, illustrates a robotic arm imitation learning method and apparatus based on a single-teaching demonstration according to embodiments of the present invention.
[0028] Figure 1 This is a flowchart illustrating a robotic arm imitation learning method based on a single teaching demonstration, provided in an embodiment of the present invention.
[0029] like Figure 1 As shown, this single-teacher-based robotic arm imitation learning method includes the following steps:
[0030] In step S101, an assembly video of the arm installing the target object is acquired and annotated to obtain an annotated assembly video.
[0031] In actual execution, it is necessary to pre-select assembly scenarios, determine different types of workpieces and diverse assembly scenarios, including parts of different shapes, sizes and materials, to ensure that the model can generalize in different situations; clear the work area to ensure that there are no obstructions affecting the camera's field of view, and ensure that the worktable and assembly area are sufficient to accommodate workpieces of different sizes and shapes; select a high-resolution camera, preferably supporting 1080p or higher resolution, to capture details, install the camera to obtain a field of view from multiple angles, ensure that the entire view of the arm and target object can be captured, and use a calibration board or computer vision tools to calibrate the camera to adjust the camera's intrinsic and extrinsic parameters to correct any distortion, ensuring that the camera image matches the actual scene; adjust the lighting conditions to ensure that the scene is bright and uniform to avoid the influence of shadows on target detection, avoid strong backlight or strong reflection, and use soft lighting equipment to provide a uniform light source.
[0032] After completing the above preparations, begin scene recording: record multi-angle videos of the assembly process of the workpiece and the arm. Each scene recording should include the complete process from start to finish, taking into account changes in workpiece placement and different workflows to ensure that the model can adapt to various situations. During the recording process, adjust the camera angle to ensure that key information of the arm and target object can be captured from different perspectives. The diversity of video sequences helps to improve the model's generalization ability, enabling it to adapt to assembly from different angles and directions.
[0033] After obtaining the assembly video of the arm installing the target object, the assembly video is annotated to indicate the position, key points and action status of the arm and the target object, resulting in an annotated assembly video. Marking tools or professional annotation services can be used to ensure the accuracy and consistency of the annotation.
[0034] It should be noted that, for easy retrieval and use later, the annotated assembly video can be stored in a safe location to ensure data integrity and reliability. Consider backing up the data regularly to prevent accidental loss or damage.
[0035] In step S102, the labeled assembly video is parsed to obtain the arm trajectory sequence.
[0036] In some embodiments, the annotated assembly video is parsed to obtain the arm trajectory sequence, including:
[0037] Multiple target object images are obtained from the labeled assembly video under different angles, lighting and occlusion conditions. The Faster R-CNN model is trained using multiple target object images to obtain the target detection model.
[0038] The labeled assembly video is input into the target detection model to extract the position information of the target object;
[0039] The labeled assembly video is converted into a grayscale image or a color image to calculate the pixel displacement and pixel difference between adjacent frames based on the grayscale image or the color image;
[0040] Pixel displacements are converted into motion fields to determine the overall motion state of the target object.
[0041] Thresholding is applied to pixel differences to determine the partial motion state of the target object;
[0042] Determine the continuous arm movement state based on the overall and / or partial movement states;
[0043] By combining positional information and continuous arm movement states using triangulation and deep learning target tracking algorithms, an arm trajectory sequence is generated.
[0044] In the actual execution process, image samples of target objects under different angles, lighting and occlusion conditions are obtained in the labeled assembly video. The Faster R-CNN model is trained using the image samples to obtain a target detection model that can adapt to specific assembly scenarios and accurately locate arms, tools and other target objects in different scenarios.
[0045] The annotated assembly video is input into the target detection model to extract the position information and bounding box of the target object, and the position information of the target object is converted into actual coordinates for subsequent modeling.
[0046] The annotated assembly video is converted into grayscale or color images to accommodate the application of optical flow and frame difference methods. The Lucas-Kanade optical flow algorithm is used to calculate the pixel displacement between adjacent frames, and then the pixel displacement vector is converted into a motion field to determine the overall motion of the target object. The frame difference method is used to calculate the pixel difference between adjacent frames to obtain the moving pixel region. Through thresholding, significant motion regions are determined to determine the partial motion state of the target object.
[0047] Information about the sports field or area is converted into changes in arm joint angles or arm posture. Interpolation or smoothing techniques are used to process these changes, obtaining a continuous arm movement state. The target object's 3D coordinates are pre-measured using the baseline between cameras, the projection of the target object onto different cameras, and the target object's position information. A target tracking algorithm then combines the 3D coordinates with the continuous arm movement state to generate an arm trajectory sequence. Smoothing filters are applied to the trajectory sequence to reduce noise and improve accuracy. Deep learning target tracking algorithms, such as Siamese networks or multi-target trackers, are used to track the target object, ensuring robust tracking even in complex scenes, including occlusion and target deformation.
[0048] In step S103, a kinematic model of the target robotic arm and a motion model of the target object are constructed based on the arm trajectory sequence.
[0049] In some embodiments, an arm kinematic model and a target object motion model are constructed based on the arm trajectory sequence, including:
[0050] Construct the first rigid body kinematic model of the target robotic arm;
[0051] Construct a second rigid body dynamics model or elastic model of the target object;
[0052] Analyze the arm trajectory sequence to determine the motion law between the robotic arm and the target object;
[0053] Based on the laws of motion, the first rigid body kinematic model, and the second rigid body dynamics model or elastic model, construct the kinematic model of the target robotic arm and the motion model of the target object, respectively.
[0054] In actual execution, based on the linkage structure and joint connection of the target robotic arm, for each robotic arm joint, the rotation axis is defined, and the linkage length, rotation angle and offset parameters are determined. The Denavit-Hartenberg (DH) parameters are used to establish the kinematic relationship between the joints of the robotic arm, describe the mapping relationship between the pose of the end effector and the joint angle, and obtain the first rigid body kinematic model of the target object.
[0055] For target objects involving complex dynamics, such as those considering inertia, force, and torque, the Newton-Euler equations dynamic theory is used to describe the motion of the object under external forces, and a second rigid body kinematic model of the target object is established to predict the motion state of the object under specific conditions. For soft or deformable objects, such as fabrics and hoses, the deformation and material properties of the object are considered, and the finite element analysis (FEA) method is used to simulate the deformation and motion of the object under force, and an elastic model of the target object is established.
[0056] Acquire motion data of the robotic arm and the target object, including joint angles, end effector position, and the motion trajectory of the target object, and analyze the motion data to determine the motion patterns and relationships between the robotic arm and the target object;
[0057] Based on ROS, and considering the characteristics of the robotic arm and the target object, appropriate modeling methods and tools are selected to establish the kinematic model of the target robotic arm. The DH parameters are used to establish the kinematic model of the robotic arm, and rigid body dynamics or soft object simulation is considered to establish the motion model of the target object. Furthermore, simulation tools or actual robot platforms are used to verify the accuracy and reliability of the established kinematic model, and the model is debugged and optimized to ensure that it can accurately describe the motion behavior of the robotic arm and the target object.
[0058] In step S104, the annotated assembly video is input into the OpenPose key point detection model to extract the coordinates of the arm key points and the key point coordinates of the target object.
[0059] In actual execution, the labeled assembly video is preprocessed, including noise reduction, cropping, and resizing, to ensure that the input of the key point detection model meets the requirements. Each frame of the preprocessed assembly video is run on the OpenPose key point detection model to accurately identify the position of human key points from images with different poses, lighting, and backgrounds, and extract the key points of the robotic arm and target objects. The extracted key point coordinates are then saved as a sequence for subsequent robotic arm learning and model training.
[0060] In some embodiments of the present invention, a transfer learning algorithm is also introduced into the target robotic arm. The previously learned kinematic model and control strategy are applied to the new task through transfer learning. Based on the existing robotic arm control model, the model parameters are fine-tuned or the last few layers are retrained to adapt to the new task requirements.
[0061] In step S105, a one-shot imitation learning model is trained using the key point coordinates of the arm, the key point coordinates of the target object, the kinematic model of the target robotic arm, and the motion model of the target object to generate an autonomous assembly decision model.
[0062] In some embodiments, a one-shot imitation learning model is trained using the key point coordinates of the arm, the key point coordinates of the target object, the kinematic model of the target robotic arm, and the motion model of the target object to generate an autonomous assembly decision model, including:
[0063] The coordinates of the arm's key points and the coordinates of the target object's key points are converted into arm key point sequences and target object key point sequences, respectively.
[0064] The arm keypoint sequence, the target object keypoint sequence, the target robotic arm kinematic model, and the target object motion model are used as training sets. Generative adversarial networks and reinforcement learning algorithms are combined to train a one-shot imitation learning model using the training set to generate an autonomous assembly decision model. The arm keypoint sequence and the target object keypoint sequence are used as input data for the training set, and the target robotic arm kinematic model and the target object motion model are used as output data for the training set.
[0065] In actual execution, the key point coordinates of the robotic arm and the target object are preprocessed, such as through normalization or standardization. The preprocessed key point coordinates of the robotic arm and the target object, along with the kinematic model of the robotic arm and the motion model of the target object, are used to train a one-shot imitation learning model. This minimizes the difference between predicted and actual values, generating an autonomous assembly decision model. Furthermore, during training, reinforcement learning is used to guide the one-shot imitation learning model in learning the motion patterns and assembly steps of the target object.
[0066] Furthermore, the performance of the autonomous assembly decision model is evaluated using a pre-built validation set and data from the real environment, yielding evaluation results including accuracy, generalization ability, and robustness. Based on the evaluation results, the autonomous assembly decision model is tuned by adjusting hyperparameters or improving the algorithm to enhance its performance and effectiveness.
[0067] In step S106, the autonomous assembly decision model is optimized to obtain an adaptive decision model.
[0068] In some embodiments, assembly optimization is performed on the autonomous assembly decision model to obtain an adaptive decision model, including:
[0069] The gradient descent method is used to optimize the parameters of the autonomous assembly decision model, resulting in a parameter-optimized autonomous assembly decision model.
[0070] By introducing a fitness function into the parameter-optimized autonomous assembly decision model, an adaptive decision model is obtained.
[0071] In actual execution, the gradient descent method is used to adjust the parameters of the autonomous assembly decision model, and a fitness function is introduced to measure the performance of the robotic arm in performing assembly tasks, which is used to guide the optimization process and obtain an adaptive decision model.
[0072] Furthermore, those skilled in the art can also install force sensors and vision sensors on the target robotic arm as a real-time feedback mechanism. Real-time assembly data can be obtained through the force sensors and vision sensors, and the autonomous assembly decision model can be adjusted in real time using the real-time assembly data to obtain a more reasonable control strategy for the robotic arm assembly.
[0073] Furthermore, those skilled in the art can also use cross-validation to obtain the generalization ability of the adaptive decision model, ensuring that the model is applicable to different assembly scenarios. Here, the generalization ability is the comparison result of the key points, trajectories and action states predicted by the model and actually executed. The generalization ability is compared with a preset threshold to identify potential room for improvement. If the generalization ability is greater than the preset threshold, the adaptive decision model is integrated into the target robotic arm control system. Otherwise, the assembly video of the arm installing the target object is re-acquired to train a new adaptive decision model.
[0074] In step S107, the adaptive decision model is integrated into the target robotic arm control system to generate the actual assembly strategy of the target robotic arm, and the target robotic arm is controlled to perform automated assembly according to the actual assembly strategy.
[0075] In actual implementation, the adaptive decision model is embedded into the control system of the robotic arm to ensure its compatibility with the actual robotic arm hardware and controller. Considering real-time requirements, an appropriate hardware platform and communication protocol are selected to ensure that the robotic arm can respond to the learned model in real time. The target robotic arm control system generates the actual assembly strategy for the target robotic arm through the adaptive decision model and controls the target robotic arm to perform automated assembly according to the actual assembly strategy.
[0076] In some embodiments, the present invention will also design a human-computer interaction interface that provides intuitive teaching and monitoring functions, including real-time feedback, task scheduling, and model status display. An online learning mechanism will also be introduced, enabling the system to collect real-time data, including the performance of the robotic arm performing tasks and feedback from human teaching, during actual use. This real-time data will be used to continuously learn and optimize, thereby guiding further optimization of the model.
[0077] The robotic arm imitation learning method based on a single teaching demonstration proposed in this invention has the following beneficial effects:
[0078] (1) It can learn new tasks in a relatively short time, thereby improving the overall learning efficiency. Imitation learning is based on previous knowledge, and transfer learning applies the learned task experience to new tasks, making the robotic arm more adaptable to diverse working environments and tasks.
[0079] (2) Only one teaching is required, which helps human-machine collaboration and allows operators to directly demonstrate the required tasks without spending a lot of time teaching the robotic arm. This allows the robotic arm to start performing tasks immediately after teaching, reducing waiting time and having a clear advantage in real-time tasks that require rapid response and execution.
[0080] (3) It can adapt to different scenarios and target objects, making the robotic arm more flexible and able to cope with objects of different shapes, sizes and positions. Compared with traditional machine learning methods that require a large amount of labeled data, it reduces the dependence on a large amount of labeled data and lowers the labeling cost.
[0081] (4) It learns by imitating human movements, so the tasks learned are more natural and in line with human intuition, which helps to improve the interaction between the robotic arm and humans;
[0082] (5) Allows the robotic arm to quickly adapt to new tasks and assembly environments, making it suitable for industrial assembly.
[0083] Next, referring to the accompanying drawings, a robotic arm imitation learning device based on a single teaching demonstration according to an embodiment of the present invention is described.
[0084] Figure 2 This is a block diagram of a robotic arm imitation learning device based on a single teaching demonstration according to an embodiment of the present invention.
[0085] like Figure 2 As shown, the robotic arm imitation learning device 20 based on single teaching includes: a labeling module 201, a parsing module 202, a construction module 203, an extraction module 204, a training module 205, an optimization module 206, and an integration module 207.
[0086] The system comprises the following modules: Annotation module 201, which acquires and annotates assembly videos of the robotic arm installing the target object; Parsing module 202, which parses the annotated assembly videos to obtain the arm trajectory sequence; Construction module 203, which constructs a kinematic model of the target robotic arm and a motion model of the target object based on the arm trajectory sequence; Extraction module 204, which inputs the annotated assembly videos into an OpenPose keypoint detection model to extract the keypoint coordinates of the arm and the target object; Training module 205, which trains a One-shot imitation learning model using the keypoint coordinates of the arm and the target object, the kinematic model of the target robotic arm, and the motion model of the target object, to generate an autonomous assembly decision model; Optimization module 206, which optimizes the autonomous assembly decision model to obtain an adaptive decision model; and Integration module 207, which integrates the adaptive decision model into the target robotic arm control system to generate the actual assembly strategy for the target robotic arm and controls the target robotic arm to perform automated assembly according to the actual assembly strategy.
[0087] It should be noted that the foregoing explanation of the embodiment of the robotic arm imitation learning method based on single teaching also applies to the robotic arm imitation learning device based on single teaching in this embodiment, and will not be repeated here.
[0088] The robotic arm imitation learning device based on a single teaching demonstration proposed in this invention has the following beneficial effects:
[0089] (1) It can learn new tasks in a relatively short time, thereby improving the overall learning efficiency. Imitation learning is based on previous knowledge, and transfer learning applies the learned task experience to new tasks, making the robotic arm more adaptable to diverse working environments and tasks.
[0090] (2) Only one teaching is required, which helps human-machine collaboration and allows operators to directly demonstrate the required tasks without spending a lot of time teaching the robotic arm. This allows the robotic arm to start performing tasks immediately after teaching, reducing waiting time and having a clear advantage in real-time tasks that require rapid response and execution.
[0091] (3) It can adapt to different scenarios and target objects, making the robotic arm more flexible and able to cope with objects of different shapes, sizes and positions. Compared with traditional machine learning methods that require a large amount of labeled data, it reduces the dependence on a large amount of labeled data and lowers the labeling cost.
[0092] (4) It learns by imitating human movements, so the tasks learned are more natural and in line with human intuition, which helps to improve the interaction between the robotic arm and humans;
[0093] (5) Allows the robotic arm to quickly adapt to new tasks and assembly environments, making it suitable for industrial assembly.
[0094] Figure 3 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. The electronic device may include:
[0095] The memory 301, the processor 302, and the computer program stored on the memory 301 and capable of running on the processor 302.
[0096] When the processor 302 executes the program, it implements the robotic arm imitation learning method based on single teaching provided in the above embodiments.
[0097] Furthermore, electronic devices also include:
[0098] Communication interface 303 is used for communication between memory 301 and processor 302.
[0099] The memory 301 is used to store computer programs that can run on the processor 302.
[0100] The memory 301 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0101] If the memory 301, processor 302, and communication interface 303 are implemented independently, then the communication interface 303, memory 301, and processor 302 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 3 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.
[0102] Optionally, in a specific implementation, if the memory 301, processor 302, and communication interface 303 are integrated on a single chip, then the memory 301, processor 302, and communication interface 303 can communicate with each other through an internal interface.
[0103] Processor 302 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0104] This invention also provides a computer program product, which, when executed by a processor, implements the above-described single-teaching-based robotic arm imitation learning method.
[0105] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described single-teaching-based robotic arm imitation learning method.
[0106] 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 the present invention. 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.
[0107] 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 indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this invention, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0108] 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 N executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of the invention 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 will be understood by those skilled in the art to which embodiments of the invention pertain.
[0109] 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). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0110] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. 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.
[0111] 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, it includes one or a combination of the steps of the method embodiments.
[0112] Furthermore, the functional units in the various embodiments of the present invention 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.
[0113] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.
Claims
1. A robotic arm imitation learning method based on single-teaching demonstration, characterized in that, Includes the following steps: The assembly video of the arm installing the target object is acquired and annotated to obtain the annotated assembly video. The annotated assembly video is analyzed to obtain the arm trajectory sequence; Based on the arm trajectory sequence, a kinematic model of the target robotic arm and a motion model of the target object are constructed, specifically including: Construct the first rigid body kinematic model of the target robotic arm; Construct a second rigid body dynamics model or elastic model of the target object; Analyzing the arm trajectory sequence determines the motion law between the robotic arm and the target object; Based on the motion laws, the first rigid body kinematic model and the second rigid body dynamics model or the elastic model, respectively construct the kinematic model of the target robotic arm and the motion model of the target object; The annotated assembly video is input into the OpenPose keypoint detection model to extract the coordinates of the arm keypoints and the keypoints of the target object. Using the key point coordinates of the robotic arm, the key point coordinates of the target object, the kinematic model of the target robotic arm, and the motion model of the target object, a one-shot imitation learning model is trained to generate an autonomous assembly decision model, specifically including: The coordinates of the arm key points and the coordinates of the target object key points are respectively converted into arm key point sequences and target object key point sequences. The arm keypoint sequence, the target object keypoint sequence, the target robotic arm kinematic model, and the target object motion model are used as a training set. Generative adversarial networks and reinforcement learning algorithms are combined to train the One-shot imitation learning model using the training set to generate an autonomous assembly decision model. The arm keypoint sequence and the target object keypoint sequence are used as input data of the training set, and the target robotic arm kinematic model and the target object motion model are used as output data of the training set. The autonomous assembly decision model is optimized to obtain an adaptive decision model, which specifically includes: The parameters of the autonomous assembly decision model are optimized using the gradient descent method to obtain a parameter-optimized autonomous assembly decision model. By introducing a fitness function into the parameter-optimized autonomous assembly decision model, the adaptive decision model is obtained. The adaptive decision model is integrated into the target robotic arm control system to generate the actual assembly strategy for the target robotic arm, and the target robotic arm is controlled to perform automated assembly according to the actual assembly strategy.
2. The robotic arm imitation learning method based on single-teaching as described in claim 1, characterized in that, The process of parsing the annotated assembly video to obtain the arm trajectory sequence includes: Multiple target object images under different angles, lighting and occlusion conditions are obtained in the annotated assembly video, and the Faster R-CNN model is trained using the multiple target object images to obtain the target detection model; The labeled assembly video is input into the target detection model to extract the position information of the target object; The labeled assembly video is converted into a grayscale image or a color image, and the pixel displacement and pixel difference between adjacent frames are calculated based on the grayscale image or the color image; The pixel displacement is converted into a motion field to determine the overall motion state of the target object based on the motion field; Thresholding is applied to the pixel differences to determine the partial motion state of the target object; The continuous arm movement state is determined based on the overall motion state and / or the partial motion state; The position information and the continuous arm movement state are combined using triangulation and deep learning target tracking algorithms to generate the arm trajectory sequence.
3. The robotic arm imitation learning method based on single-teaching as described in claim 1, characterized in that, Also includes: The generalization ability of the adaptive decision-making model is obtained by using cross-validation. The generalization ability is compared with a preset threshold. If the generalization ability is greater than the preset threshold, the adaptive decision model is integrated into the target robotic arm control system. Otherwise, the assembly video of the arm installing the target object is re-acquired, and a new adaptive decision model is trained.
4. A robotic arm imitation learning device based on a single teaching demonstration, characterized in that, include: The annotation module is used to acquire assembly videos of the arm installing the target object and to annotate the assembly videos to obtain an annotated assembly video. The parsing module is used to parse the annotated assembly video to obtain the arm trajectory sequence; A construction module is used to construct a kinematic model of the target robotic arm and a motion model of the target object based on the arm trajectory sequence, wherein the construction module specifically includes: Construct the first rigid body kinematic model of the target robotic arm; Construct a second rigid body dynamics model or elastic model of the target object; Analyzing the arm trajectory sequence determines the motion law between the robotic arm and the target object; Based on the motion laws, the first rigid body kinematic model and the second rigid body dynamics model or the elastic model, respectively construct the kinematic model of the target robotic arm and the motion model of the target object; The extraction module is used to input the annotated assembly video into the OpenPose key point detection model to extract the coordinates of the arm key points and the key point coordinates of the target object. The training module is used to train a one-shot imitation learning model using the key point coordinates of the arm, the key point coordinates of the target object, the kinematic model of the target robotic arm, and the motion model of the target object, to generate an autonomous assembly decision model. Specifically, the training module includes: The coordinates of the arm key points and the coordinates of the target object key points are respectively converted into arm key point sequences and target object key point sequences. The arm keypoint sequence, the target object keypoint sequence, the target robotic arm kinematic model, and the target object motion model are used as a training set. Generative adversarial networks and reinforcement learning algorithms are combined to train the One-shot imitation learning model using the training set to generate an autonomous assembly decision model. The arm keypoint sequence and the target object keypoint sequence are used as input data of the training set, and the target robotic arm kinematic model and the target object motion model are used as output data of the training set. An optimization module is used to optimize the autonomous assembly decision model to obtain an adaptive decision model. Specifically, the optimization module includes: The parameters of the autonomous assembly decision model are optimized using the gradient descent method to obtain a parameter-optimized autonomous assembly decision model. By introducing a fitness function into the parameter-optimized autonomous assembly decision model, the adaptive decision model is obtained. An integration module is used to integrate the adaptive decision model into the target robotic arm control system to generate the actual assembly strategy of the target robotic arm and control the target robotic arm to perform automated assembly according to the actual assembly strategy.
5. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the single-teaching-based robotic arm imitation learning method as described in any one of claims 1-3.
6. A computer program product, characterized in that, When the computer program / instruction is executed by the processor, it implements the single-teaching-based robotic arm imitation learning method as described in any one of claims 1-3.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the single-teaching-based robotic arm imitation learning method as described in any one of claims 1-3.
Citation Information
Patent Citations
Robot assembly trajectory optimization method and device for offline example learning
CN110561430A
Robot demonstration teaching method based on meta-imitation learning
CN111983922A