DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training

By defining abstract encoding variables and establishing a pose transfer model, human knowledge-guided pre-training is performed on the pin-hole assembly task, which solves the problem of low efficiency of pin-hole assembly reinforcement learning in the existing technology and achieves more efficient strategy learning.

CN115598975BActive Publication Date: 2024-08-27HARBIN INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211159452.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-22
Publication Date
2024-08-27
Estimated Expiration
2042-09-22

AI Technical Summary

Technical Problem

Existing reinforcement learning methods based on pin-hole assembly have poor task pertinence, resulting in low efficiency of reinforcement learning for assembly tasks and difficulty in learning useful strategies in a short time.

Method used

The pin-hole assembly DDPG reinforcement learning method based on parameter pre-training is used to obtain the geometric constraints of the contact state of the pin-hole assembly by defining abstract encoding variables x, z, α and β, establish a pose transfer model, and use human simple assembly strategies to Actor network and Critic network are pre-trained to realize reinforcement learning guided by human knowledge.

Benefits of technology

It improves task pertinence and significantly accelerates the efficiency of pin-hole assembly DDPG reinforcement learning, allowing the agent to learn useful strategies in a short time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115598975B
    Figure CN115598975B
Patent Text Reader

Abstract

The pin hole assembly DDPG reinforcement learning acceleration method based on parameter pre-training relates to the technical field of robot pin hole assembly task reinforcement learning. The present invention is to solve the problem that the existing pin hole assembly-based reinforcement learning method still has poor task pertinence and low efficiency of assembly task reinforcement learning, which makes it difficult to learn useful strategies in a short time. The present invention includes: defining abstract coding variables x, z, α and β for pin hole assembly; classifying the contact states of pin hole assembly, and obtaining the geometric constraints of each type of pin hole assembly contact state, and establishing a pin hole assembly pose transfer model; using the pin hole assembly strategy model to pre-train the Actor network in the DDPG reinforcement learning network to obtain the Actor network parameters; using the pin hole assembly pose transfer model to obtain the pose action value function Q pose (s,a), using Q pose (s, a) Pre-training the Critic network to obtain the Critic network parameters; based on the Actor network parameters and the Critic network parameters, the pin-hole assembly reinforcement acceleration learning is performed. The present invention is used for the reinforcement learning acceleration of the pin-hole assembly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of reinforcement learning for robot pin hole assembly tasks, and in particular to a DDPG reinforcement learning acceleration method for pin hole assembly based on parameter pre-training. Background Art

[0002] Using reinforcement learning methods to learn robot assembly task strategies is the only way to achieve intelligent control of assembly tasks. Among them, guiding and optimizing reinforcement learning in combination with human knowledge operations is an effective way to improve reinforcement learning performance.

[0003] Hefei University of Technology (Ru Qi. Research and Application of Deep Q Neural Network Algorithm Combined with Prior Knowledge in Indoor Path Planning [D]. Hefei University of Technology, 2018.) In the indoor robot path planning task, the expert decision is directly used as the exploration action instead of randomly selecting the exploration action under the state of empirical knowledge design, so as to reduce the erroneous exploration of indoor robots when dealing with complex obstacles. In the work of the University of California (Nair A, McGrew B, Andrychowicz M, et al. DMP-based trajectory tracking for a nonholonomic mobile robot with automatic goal adaptation and obstacle avoidance [C]. Proceeding of International Conference on Robotics and Automation (ICRA), 2018: 6292-6299.), a method of resetting from the demonstration state is proposed. When the agent does not receive rewards for a long time, it restarts a new round of exploration by using the demonstration action, avoiding the problem of low learning efficiency caused by unreasonable random exploration for a long time. The National Institute of Informatics of Japan (Nicolas Bougie, Li Kai Cheng, Ryutaro Ichise. Combining deep reinforcement learning with prior knowledge and reasoning [J]. Applied Computing Review, 2018, 18 (2): 33-45.) proposed a reinforcement learning guidance framework with a Q-learning-based action selection module. By training the Q network to select more advantageous actions among the exploration actions based on the knowledge model and the random exploration actions of reinforcement learning, the knowledge model is used to guide reinforcement learning.In the work of Georgia Institute of Technology (Subramanian K, Isbell CL, Thomaz AL. Exploration from Demonstration for Interactive Reinforcement Learning [C]. International Conference on Autonomous Agents and Multiagent Systems (AAMAS), 2016, 447-456.), excellent exploration actions are learned through human expert demonstrations. In addition, "Leverage" is used to measure the degree of coverage of the state operation space. Finally, a trade-off is made between the use of excellent actions and the degree of coverage of the state operation space, and appropriate exploration actions are selected to achieve reinforcement learning guided by experience knowledge. The improvement of exploration behavior selects reasonable exploration actions based on experience knowledge, so that reinforcement learning can quickly learn effective strategies and accelerate the process of reinforcement learning.

[0004] In reinforcement learning based on pin-hole assembly, the traditional state representation method usually uses sensory information or the estimated value of sensory information as the state of the agent, which has poor task specificity. In addition, since the task model is unknown, model-free reinforcement learning methods are usually used for assembly task reinforcement learning. However, the model-free reinforcement learning method uses random exploration to learn strategies, which leads to low learning efficiency and makes it difficult to learn useful strategies in a short time. Summary of the invention

[0005] The purpose of the present invention is to solve the problems that the existing reinforcement learning methods based on pin-hole assembly still have poor task pertinence and low efficiency of reinforcement learning for assembly tasks, which makes it difficult to learn useful strategies in a short time. A DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training is proposed.

[0006] The specific process of the DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training is as follows:

[0007] Step 1: Define the pin hole assembly abstract coding variables x, z, α and β, and obtain the coding values ​​of x, z, α and β and the decoding method of the relative posture of the shaft hole parts;

[0008] Where x is the ground center of the hole part O ho Distance from shaft part axis l ax-axis The distance; z is O ho The distance from the bottom surface of the cylindrical part of the shaft part; β is the axis l of the hole part ho-axis With shaft part axis l ax-axisα is the angle between l1 and l2, l1 is the straight line parallel to the bottom surface of the cylindrical part of the shaft part in the contact surface between the hole part and the shaft part, l2 is the straight line perpendicular to the axis l of the shaft part ax-axis and O ho The straight lines that make up the plane;

[0009] Step 2: classify the pin hole assembly contact states, use the x, z, α and β obtained in step 1 to obtain the geometric constraints of each type of pin hole assembly contact state, and use the geometric constraints of each type of pin hole assembly contact state to establish a pin hole assembly pose transfer model;

[0010] Step 3: Model the pin-hole assembly strategy of "align first and then insert", and use the pin-hole assembly strategy model of "align first and then insert" to perform supervised learning pre-training on the Actor network in the DDPG reinforcement learning network to obtain the network parameters of the pre-trained Actor network;

[0011] Step 4: Use the pin-hole assembly posture transfer model obtained in step 2 to obtain the posture action value function Q pose (s,a), and use Q pose (s,a) Pre-train the Critic network to obtain the network parameters of the pre-trained Critic network;

[0012] Step 5: Perform pin-hole assembly reinforcement acceleration learning based on the network parameters of the pre-trained Actor network obtained in step 3 and the network parameters of the pre-trained Critic network obtained in step 4.

[0013] The beneficial effects of the present invention are:

[0014] The present invention fully analyzes the pin hole assembly task, and manually encodes an abstract representation of the relative postures of parts in the pin hole assembly task, thereby realizing a concise and task-specific representation of the pin hole assembly state. In addition, based on the abstract coding obtained from the abstract representation, the geometric constraints of different contact states of the pin hole assembly are obtained, and a posture transfer model for the pin hole assembly is established. In the DDPG reinforcement learning process, we use humans' simple assembly strategy (the "first insert it then insert" pin hole assembly strategy) to pre-train the Actor network, and pre-train the Critic network according to the posture transfer model and the manually defined state value function only for the posture, realizing human knowledge-guided pin hole assembly reinforcement learning, improving task specificity, and effectively accelerating the efficiency of pin hole assembly DDPG reinforcement learning, so that useful strategies can be learned in a short time. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 It is a simulation environment diagram of the present invention;

[0016] 1-robot, 2-axis part, 3-hole part, 4-hole part matching part, 5-axis part matching part, 6-schematic hole part, 7-inner wall of hole part;

[0017] Figure 2 is a schematic diagram of a reference coordinate system in the present invention;

[0018] Figure 3 Schematic diagram of contact types for different pin-hole assembly;

[0019] Figure 4(a) is a schematic diagram of the geometric constraint analysis of the pin-hole three-point contact state;

[0020] Figure 4(b) is a schematic diagram of the geometric constraint analysis of the pin-hole two-point contact state;

[0021] Figure 4(c) is a schematic diagram of the geometric constraint analysis of the pin-hole single-point contact state;

[0022] Figure 4(d) is a schematic diagram of the geometric constraint analysis of the pin-hole single-point inclined contact state;

[0023] Figure 5 Flowchart of DDPG reinforcement learning for pin-hole assembly in simulation or on a real robot. DETAILED DESCRIPTION

[0024] Specific implementation method 1: Figure 5 As shown, the specific process of the pin hole assembly DDPG reinforcement learning acceleration method based on parameter pre-training in this embodiment is as follows: Step 1, define the pin hole assembly abstract coding variables x, z, α and β, and obtain the coding values ​​of x, z, α and β and the relative posture decoding method of the shaft hole parts, including the following steps:

[0025] Step 1. Define the pin-hole assembly abstract coding variables x, z, α and β:

[0026] Considering that the pin hole features in the pin hole assembly are all cylindrical features, the rotation of the pin part and the hole part around themselves will not affect the actual pin hole assembly form. Therefore, we simplify the representation of the rotation of the pin hole part around itself and encode the position and posture of the pin hole assembly into four variables: x, z, α and β. Among them, x represents the ground center of the hole part O ho Distance from shaft part axis l ax-axis The distance; z represents O ho The distance from the bottom surface of the cylindrical part of the shaft part; β represents the axis l of the hole part ho-axis With shaft part axis l ax-axis The angle between l1 and l2; α represents the angle between l1 and l2;

[0027] l1 is a straight line parallel to the bottom surface of the cylindrical part of the shaft part in the contact surface between the hole part and the shaft part, and l2 is a straight line perpendicular to the axis l of the shaft part. ax-axisand O ho The straight lines that make up the plane;

[0028] Step 1 and 2: Figure 2 As shown, obtaining the encoded values ​​of x, z, α and β specifically includes the following steps:

[0029] Step 121. Establish the hole part reference coordinate system and shaft part reference coordinate system of the pin assembly:

[0030] The reference coordinate system of the shaft part is based on the center of the bottom surface of the cylindrical part of the shaft part. ax As the coordinate origin, the axis of the shaft part is l ax-axis The direction of the shaft part is the z-axis, and the axis of the shaft part is l ax-axis and O ho The direction of the plane pointing to the hole part is the x-axis, and the direction of the y-axis is determined according to the right-hand rule.

[0031] The reference coordinate system of the hole part is O ho As the coordinate origin, with the hole part axis l ho-axis The direction of the pointing shaft part is the z-axis, the direction of the straight line l1 pointing shaft part (if l1 / / l2 at the beginning, any direction can be taken) is the x-axis, and the direction of the y-axis is determined according to the right-hand rule.

[0032] Step 122: Set the real coordinate transformation matrix from the shaft part to the hole part ax T ho ,according to ax T ho Get the encoded values ​​of x and z:

[0033] First, set the real coordinate transformation matrix from the shaft part to the hole part ax T ho :

[0034]

[0035] R ho =[n x ,n y ,n z ]

[0036] p ho =[p x ,p y ,p z ] T

[0037] Among them, R ho is the rotation matrix, p ho is the position vector, n x 、n y 、n z are vectors in the x, y, and z directions respectively, and px 、p y 、p z are the coordinate values ​​of the x, y, and z axes respectively;

[0038] Then, according to ax T ho Get the encoded values ​​of x and z:

[0039]

[0040] z=p z

[0041] Step 123: Use the shaft part reference coordinate system and hole part reference coordinate system established in step 121 to obtain redundant variables θ and

[0042] First, establish the actual coordinate system of the hole part and the actual coordinate system of the shaft part:

[0043] The actual coordinate system of the hole part coincides with the origin and the z-axis of the reference coordinate system of the hole part, the x-axis direction is determined based on experience, and the y-axis direction is determined based on the right-hand rule;

[0044] The actual coordinate system of the shaft part coincides with the origin and the z-axis of the reference coordinate system of the shaft part, the x-axis direction is determined based on experience, and the y-axis direction is determined based on the right-hand rule;

[0045] Then, obtain the phase angle between the reference coordinate system of the shaft part and the actual coordinate system of the shaft part

[0046]

[0047] Finally, obtain the phase angle θ between the reference coordinate system of the hole part and the actual coordinate system of the hole part:

[0048] θ=arctan(n x (3) / n y (3))

[0049] Among them, n x (3) is n x The third element in n y (3) is n y The third element in

[0050] Step 124: redundant variable θ obtained according to step 123, Get the encoded values ​​of α and β:

[0051] First, use the R obtained in step 122 ho and θ to obtain the mark rotation coordinate system R′ of the hole part ho :

[0052] R′ ho =R ho Rot(z,θ)

[0053] Then, let R′ ho =[n′ x ,n′ y ,n′ z ], according to R′ ho =[n x ′,n′ y ,n′ z ]and Get the encoded values ​​of α and β:

[0054]

[0055] β= <n z ,[0,0,-1]>

[0056] Among them, n' x 、n' y 、n' z R′ ho The vectors in the x, y, and z directions;

[0057] Step 13: According to x, z, α, β, θ and Obtain the relative posture decoding method of the shaft and hole parts:

[0058]

[0059]

[0060] p z =z

[0061]

[0062] R ho =R′ ho Rot(z,-θ).

[0063] Step 2: Classify the pin hole assembly contact states, use the x, z, α and β obtained in step 1 to obtain the geometric constraints of each type of pin hole assembly contact state, and use the geometric constraints of each type of pin hole assembly contact state to establish a pin hole assembly pose transfer model, including the following steps:

[0064] Step 21: Figure 3 As shown in the figure, the pin-hole assembly contact state is divided into 7 types:

[0065] (1) No contact (a); (2) Symmetrical single-point contact (b); (3) Inclined single-point contact (c); (4) Two-point contact (d); (5) Three-point contact (e); (6) Surface contact (f); (7) Insertion (g);

[0066] Step 2: As shown in Figure 4(a)-(d), use x, z, α and β obtained in step 1 to obtain the geometric constraints of each type of pin-hole assembly contact state:

[0067] (1) No contact: There is no geometric constraint when there is no contact;

[0068] (2) The geometric constraints of symmetrical single-point contact are:

[0069]

[0070] Where R is the radius of the shaft and hole;

[0071] (3) The geometric constraints of inclined single point contact are:

[0072] t 3 +(Asin 2 β-2X)t 2 +[(X 2 -A 2 )+2A(XA)cos 2 β]t+[A(3A-X)(A+X)cos 2 β-A(AX) 2 ]=0

[0073] m 2 =t

[0074] x 2 =X

[0075] R 2 =A

[0076] Among them, t, X, A are intermediate variables, m is the contact point projection point in the top view above the cylindrical bottom surface of the shaft part and O ho The distance of the projection point;

[0077] (4) The geometric constraints of two-point contact are:

[0078]

[0079] Among them, B is the length of the matching part of the shaft and the hole;

[0080] (5) The geometric constraints of three-point contact are:

[0081]

[0082] (6) The geometric constraints for surface contact are:

[0083] z = B and β = 0, x > 0

[0084] (7) The geometric constraints for the inserted state are:

[0085] x = 0 and β = 0, 0 ≤ z ≤ B

[0086] In Figure 4, C ax is the center of the top circle of the shaft part, F is the intersection point of the axis of the shaft part and the hole part, and I n (n = 1, 2, 3) are the contact points between the shaft part and the hole part.

[0087] Step 23: Establish a pin-hole assembly pose transfer model based on the geometric constraint states of different contact states obtained in Step 22;

[0088] The pin-hole assembly pose transfer model includes: an assembly state recognizer and a validity discriminator;

[0089] The assembly state recognizer is trained using the geometric constraints of different basic states;

[0090] The validity discriminator is obtained in the following way: Use the visualization method to divide the valid part and the invalid part of the pin-hole assembly abstract code, and then train the validity discriminator using the divided valid pin-hole assembly abstract code and invalid pin-hole assembly abstract code.

[0091] Step 3: Model the "align first then insert" pin-hole assembly strategy, and use the "align first then insert" pin-hole assembly strategy model to perform supervised learning pre-training on the Actor network in the DDPG reinforcement learning network to obtain the pre-trained Actor network parameters, including the following steps:

[0092] Step 31: Mathematically model the human simple pin-hole assembly strategy "align first then insert" as follows:

[0093]

[0094]

[0095]

[0096]

[0097] Among them, δ is the action threshold in different coding dimension directions, and Δx, Δz, Δα, Δβ are the changes in the coding space for each executed action;

[0098] Step 32: Use the model obtained in step 31 to perform supervised learning pre-training on the Actor network of the pin-hole assembly DDPG reinforcement learning algorithm to obtain the pre-trained Actor network parameters.

[0099] Step 4: Use the pin-hole assembly posture transfer model obtained in step 2 to obtain the posture action value function Q pose (s,a), and use Q pose (s,a) Pre-training the Critic network to obtain pre-trained Critic network parameters includes the following steps:

[0100] Step 41: For the state s = {x, z, α, β, n} and the randomly sampled four-dimensional action a = {Δx, Δz, Δα, Δβ}, use the pin-hole assembly posture transfer model to predict the state s′ after the action;

[0101] Where n is the contact type number identified by the pin-hole assembly state identifier;

[0102] Step 42: Use state s and s′ to obtain the pose action value function Q pose (s,a):

[0103] Step 421: Obtain the value function of the pin-hole assembly:

[0104] V(s)=V pose +V force

[0105] Among them, V pose is the value related only to the pose, V force is the value related to the sum of the forces during the entire assembly process, so it is related to the time step of the training process;

[0106] Step 422: Use V in the pin hole assembly value function obtained in step 421 pose Get the pose action value function Q pose (s,a):

[0107] First, set the pose state value function:

[0108] V pose =f1(x)+f2(z)+f3(α,β)

[0109] Among them, f1(), f2(), and f3() are all monotonic functions, and when the target state is reached, f1(), f2(), and f3() reach their maximum values;

[0110] Then, set the pose action value function Q pose (s,a)=r pose (s,a)

[0111] To simplify the calculation, we use r pose (s,a) is set to:

[0112] r pose (s,a)=V pose (s′)-V pose (s)

[0113] Among them, r pose (s,a) is the difference in posture state value before and after the action;

[0114] Finally, Q pose (s,a) can be rewritten as follows:

[0115] Q pose (s,a)=V pose (s′)-V pose (s)

[0116] Among them, s is the state before the action, and s' is the state after the action;

[0117] Step 43: Use Q pose (s, a) Pre-train the Critic network to obtain the pre-trained Critic network.

[0118] In this step, force is not considered during pre-training, so a part of V(s), V pose (s) replaces V(s) for pre-training;

[0119] Step 5: Based on the pre-trained Actor network obtained in step 3 and the pre-trained Critic network parameters obtained in step 4, the pin-hole assembly reinforcement acceleration learning is performed, which includes:

[0120] Step 51: Set the reward function r(s,a) for reinforcement learning:

[0121] r(s,a)=r pose (s,a)+r force (s,a)+r done

[0122] r force (s,a)=-k force ·F contact

[0123] Among them, r done is the task completion parameter, r force (s,a) is the contact force reward, k force is the artificially set decision optimization learning importance parameter, F contact is the contact force, r pose(s,a) is the difference in posture state value before and after the action;

[0124] When the agent completes the task done is a fixed value greater than zero, selected according to specific training requirements. When the agent fails to complete the task, r done is 0;

[0125] Step 52: Obtain the real coordinate transformation matrix from the shaft part to the hole part in the simulation environment or real robot and related sensors ax T ho ;

[0126] Step 53: Obtain the abstract code x, z, α, β, the pin-hole assembly contact type number n, and then obtain the state s = {x, z, α, β, n} of DDPG reinforcement learning;

[0127] Step 54: Use the pin hole assembly posture transfer model to obtain the predicted next state s' according to s = {x, z, α, β, n} obtained in step 53;

[0128] Step 55: Use the pin hole to assemble the abstract code validity judgement to determine whether s' is valid. If it is valid, a=a raw If it is invalid, the contact state s′ that the action can reach is determined according to the state constraint, and the corrected action a is obtained according to s′ rec =s′-s, and a=a rec ;

[0129] Among them, a raw ={Δx,Δz,Δα,Δβ} is the original action a corresponding to s={x,z,α,β,n} raw ={Δx, Δz, Δα, Δβ};

[0130] Step 56: Use redundant variables θ and s′ obtained in step 55, s′ obtained in step 52 ax T ho Obtain the inverse kinematics solution of the robot and implement the robot position control in a simulation environment or on a real robot to obtain the actual s' and contact force of the pin hole parts;

[0131] Step 57: Use the actual s' obtained in step 56 and the contact force of the pin hole part to obtain the reward r(s,a), and then store s, a, r(s,a), s' in the experience replay area for subsequent DDPG reinforcement learning.

[0132] Example: Figure 1 The positioning of the shaft parts and the hole parts shown in the figure is a specific embodiment, which is used to verify the beneficial effects of the present invention:

[0133] like Figure 1 As shown, the models of robot 1, shaft part 2 and hole part 3 are established in the Gym+Pybullet simulation environment. The robot 1 holds the shaft part 2 to perform the assembly task, and the hole part 3 is fixed in front of the robot. Then, the method described in the specific implementation method is used to realize the DDPG reinforcement learning acceleration of pin hole assembly.

Claims

1. DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training, characterized by The specific process of the method is as follows: Step 1: Define the abstract coding variables x, z, α, and β for pin-hole assembly, and obtain the coding values of x, z, α, and β and the decoding method of the relative pose of the shaft-hole parts. Where x is the ground center of the hole part O ho Distance from shaft part axis l ax-axis The distance; z is O ho The distance from the bottom surface of the cylindrical part of the shaft part; β is the axis l of the hole part ho-axis With shaft part axis l ax-axis α is the angle between l1 and l2, l1 is the straight line parallel to the bottom surface of the cylindrical part of the shaft part in the contact surface between the hole part and the shaft part, l2 is the straight line perpendicular to the axis l of the shaft part ax-axis and O ho The straight lines that make up the plane; Step 2: Classify the pin-hole assembly contact states, use the x, z, α, and β obtained in Step 1 to obtain the geometric constraints of each type of pin-hole assembly contact state, and establish a pin-hole assembly pose transfer model using the geometric constraints of each type of pin-hole assembly contact state. Step 3: Model the "align first and then insert" pin-hole assembly strategy, and use the "align first and then insert" pin-hole assembly strategy model to perform supervised learning pre-training on the Actor network in the DDPG reinforcement learning network to obtain the network parameters of the pre-trained Actor network. Step 4: Use the pin-hole assembly posture transfer model obtained in step 2 to obtain the posture action value function Q pose (s,a), and use Q pose (s,a) Pre-train the Critic network to obtain the network parameters of the pre-trained Critic network; Step 5: Perform pin-hole assembly reinforcement acceleration learning based on the network parameters of the pre-trained Actor network obtained in Step 3 and the network parameters of the pre-trained Critic network obtained in Step 4.

2. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 1 is characterized in that: The obtaining of the coding values of x, z, α, and β and the decoding method of the relative pose of the shaft-hole parts in Step 1 is specifically as follows: Step 11: Establish the reference coordinate system of the hole part and the reference coordinate system of the shaft part for pin assembly: The reference coordinate system of the shaft part is: the center of the bottom surface of the cylindrical part of the shaft part is O ax is the origin of coordinates, the axis of the shaft part is l ax-axis The direction of the shaft part is the z-axis, and the axis of the shaft part is l ax-axis and O ho The direction of the plane pointing to the hole part is the x-axis, and the coordinate system of the y-axis direction is determined by the right-hand rule; The hole part reference coordinate system is: ho is the coordinate origin, the hole part axis l ho-axis The direction of the pointing axis part is the z-axis, the direction of the l1 pointing axis part is the x-axis, and the coordinate system of the y-axis direction is determined by the right-hand rule; Step 1 and 2: Set the real coordinate transformation matrix from the shaft part to the hole part ax T ho ,according to ax T ho Get the encoded values ​​of x and z; Step 13: Use the shaft part reference coordinate system and hole part reference coordinate system established in step 11 to obtain redundant variables θ and Step 14: Based on the redundant variables θ obtained in step 13, Get the encoded values ​​of α and β; Step 15: According to x, z, α, β, θ and Obtain the relative posture decoding method of the shaft and hole parts.

3. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 2 is characterized in that: The real coordinate transformation matrix of setting the shaft part to the hole part in steps one and two ax T ho ,according to ax T ho Get the encoded values ​​of x and z, including the following steps: First, set the real coordinate transformation matrix from the shaft part to the hole part ax T ho : R ho =[n x ,n y ,n z ] p ho =[p x ,p y ,p z ] T Among them, R ho is the rotation matrix, p ho is the position vector, n x 、n y 、n z They are R ho The vector in the x, y, and z directions, p x 、p y 、p z are the coordinate values ​​of the x, y, and z axes respectively; Then, according to ax T ho Get the encoded values ​​of x and z: z=p z 。 4. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 3 is characterized in that: In the step 13, the redundant variables θ and θ are obtained by using the shaft part reference coordinate system and the hole part reference coordinate system established in step 11. The following steps are involved: First, establish the actual coordinate system of the hole part and the actual coordinate system of the shaft part: The origin and z-axis of the actual coordinate system of the hole part coincide with those of the reference coordinate system of the hole part, the x-axis direction is determined artificially, and the y-axis direction is determined according to the right-hand rule. The origin and z-axis of the actual coordinate system of the shaft part coincide with those of the reference coordinate system of the shaft part, the x-axis direction is determined artificially, and the y-axis direction is determined according to the right-hand rule. Then, obtain the phase angle between the reference coordinate system of the shaft part and the actual coordinate system of the shaft part Finally, obtain the phase angle θ between the reference coordinate system of the hole part and the actual coordinate system of the hole part. θ=arctan(n x (3) / n y (3)) Among them, n x (3) is n x The third element in n y (3) is n y The third element in .

5. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 4 is characterized in that: The redundant variables θ obtained in step 14 according to step 13, Obtaining the encoded values ​​of α and β includes the following steps: First, using R ho and θ to obtain the mark rotation coordinate system R′ of the hole part ho : R′ ho =R ho Rot(z,θ) Then, let R′ ho =[n′ x ,n′ y ,n′ z ], according to R′ ho =[n′ x ,n′ y ,n′ z ]and Get the encoded values ​​of α and β: β=<n z ,[0,0,-1]> Among them, n' x 、n' y 、n' z R′ ho The vector in the x, y, and z directions.

6. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 5 is characterized in that: The step 15 is based on x, z, α, β, θ and The decoding method for obtaining the relative posture of the shaft and hole parts is as follows: p z =z R ho =R′ ho Rot(z,-θ)。 7. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 6 is characterized in that: The classification of the pin-hole assembly contact states in Step 2, using the x, z, α, and β obtained in Step 1 to obtain the geometric constraints of each type of pin-hole assembly contact state, and establishing a pin-hole assembly pose transfer model using the geometric constraints of each type of pin-hole assembly contact state, includes the following steps: Step 21: Divide the pin-hole assembly contact states into 7 types, which are respectively: (1) No contact; (2) Symmetric single-point contact; (3) Inclined single-point contact; (4) Two-point contact; (5) Three-point contact; (6) Surface contact; (7) Insertion. Step 22: Use the x, z, α, and β obtained in Step 1 to obtain the geometric constraints of each type of pin-hole assembly contact state: (1) No contact: There are no geometric constraints when there is no contact. (2) The geometric constraints of symmetric single-point contact are: α=0, where R is the radius of the shaft and the hole. (3) The geometric constraints of inclined single-point contact are: t 3 +(Asin 2 β-2X)t 2 +[(X 2 -A 2 )+2A(X-A)cos 2 β]t+[A(3A-X)(A+X)cos 2 β-A(A-X) 2 ]=0 m 2 =t x 2 =X R 2 =A Among them, t, X, A are intermediate variables, m is the contact point projection point in the top view above the cylindrical bottom surface of the shaft part and O ho The distance of the projection point; (4) The geometric constraints of two-point contact are: where B is the length of the mating part of the shaft and the hole. (5) The geometric constraints of three-point contact are: α=0, (6) The geometric constraints of surface contact are: z = B and β = 0, x > 0 (7) The geometric constraints of the insertion state are: x = 0 and β = 0, 0 ≤ z ≤ B Step 23: Establish a pin-hole assembly pose transfer model according to the geometric constraint states of different contact states obtained in Step 22. The pin-hole assembly pose transfer model includes: an assembly state recognizer and a validity judge. The assembly state identifier is obtained by geometric constraint training using different basic states; The validity judge is obtained in the following manner: using a visualization method to separate the valid part and the invalid part of the pin hole assembly abstract code, and then using the divided valid pin hole assembly abstract code and the invalid pin hole assembly abstract code to train and obtain the validity judge.

8. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 7 is characterized in that: The step 3 of modeling the pin-hole assembly strategy of "alignment before insertion" and using the pin-hole assembly strategy model of "alignment before insertion" to perform supervised learning pre-training on the Actor network in the DDPG reinforcement learning network to obtain the network parameters of the pre-trained Actor network includes the following steps: Step 31: Model the pin hole assembly strategy "align first and then insert" as follows: Among them, δ is the action threshold in different encoding dimensions, Δx, Δz, Δα, Δβ are the changes in the encoding space for each execution of the action; Step 32: Use the model obtained in step 31 to perform supervised learning pre-training on the Actor network of the pin-hole assembly DDPG reinforcement learning network to obtain the network parameters of the pre-trained Actor network.

9. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 8 is characterized in that: In step 4, the pin hole assembly posture transfer model obtained in step 2 is used to obtain the posture action value function Q pose (s,a), and use Q pose (s,a) Pre-training the Critic network to obtain the network parameters of the pre-trained Critic network includes the following steps: Step 41: According to the state s = {x, z, α, β, n} and the randomly sampled four-dimensional action a = {Δx, Δz, Δα, Δβ}, the pin-hole assembly posture transfer model is used to predict the state s′ after the action; Where n is the contact type number identified by the pin-hole assembly state identifier; Step 42: Use state s and s′ to obtain the pose action value function Q pose (s,a): Step 421: Obtain the value function of the pin-hole assembly: V(s)=V pose +V force Among them, V pose is the value related only to the pose, V force It is the value related to the sum of forces during the entire assembly process; Step 422: Use V in the value function of the pin hole assembly obtained in step 421 pose Get the pose action value function Q pose (s,a): First, set the pose state value function: V pose =f1(x)+f2(z)+f3(α,β) Among them, f1(), f2(), and f3() are all monotonic functions; Then, set the pose action value function Q pose (s,a)=r pose (s,a); In order to simplify the calculation, r pose (s,a) is set to: r pose (s,a)=V pose (s′)-V pose (s) Among them, r pose (s,a) is the difference in posture state value before and after the action; Finally, Q pose (s,a) can be rewritten as follows: Q pose (s,a)=V pose (s′)-V pose (s) Among them, s is the state before the action, and s' is the state after the action; Step 43: Use Q pose (s, a) Pre-train the Critic network to obtain the pre-trained Critic network.

10. The DDPG reinforcement learning acceleration method for pin-hole assembly based on parameter pre-training according to claim 9 is characterized in that: The step 5 performs pin-hole assembly reinforcement acceleration learning based on the network parameters of the pre-trained Actor network obtained in step 3 and the network parameters of the pre-trained Critic network obtained in step 4, including the following steps: Step 51: Set the reward function r(s,a) for reinforcement learning: r(s,a)=r pose (s,a)+r force (s,a)+r done r force (s,a)=-k force ·F contact Among them, r done is the task completion parameter, r force (s,a) is the contact force reward, k force is the artificially set decision optimization learning importance parameter, F contact is the contact force, r pose (s,a) is the difference in posture state value before and after the action; Among them, the agent completes the task when r done is a constant greater than zero. When the agent fails to complete the task, r done is 0; Step 52: Obtain the real coordinate transformation matrix from the shaft part to the hole part in the simulation environment or real robot and related sensors ax T ho ; Step 53: Obtain the abstract code x, z, α, β, the pin-hole assembly contact type number n, and then obtain the state s = {x, z, α, β, n} of DDPG reinforcement learning; Step 54: Use the pin hole assembly posture transfer model to obtain the predicted next state s' according to s = {x, z, α, β, n} obtained in step 53; Step 55: Use the pin hole to assemble the abstract code validity judgement to determine whether s' is valid. If it is valid, a=a raw If it is invalid, the contact state s′ that can be reached by the action is obtained according to the state constraint, and the corrected action a is obtained according to s′ rec =s′-s, and a=a rec ; among them, a raw ={Δx,Δz,Δα,Δβ} is s={x,z,α,β,n} corresponding primitive actiona raw ={Δx,Δz,Δα,Δβ}; Step 56: Use redundant variables θ and s′ obtained in step 55, s′ obtained in step 52 ax T ho Obtain the inverse kinematics solution of the robot and implement the robot position control in a simulation environment or on a real robot to obtain the actual s' and contact force of the pin hole parts; Step 57. Use the actual s' obtained in step 56 and the contact force of the pin hole part to obtain the reward r(s,a), and then store s, a, r(s,a), s' in the experience replay area for subsequent DDPG reinforcement learning, thereby accelerating the pin hole assembly DDPG reinforcement learning.