A method for avoiding obstacles at the end of a robotic arm based on virtual force

The virtual force method is used to calculate pseudo-distances and corrected trajectories, which solves the problems of discontinuous motion and high error in traditional robotic arm trajectory planning in a multi-obstacle environment, and achieves smooth obstacle avoidance and accurate trajectory tracking of the robotic arm.

CN115026816BActive Publication Date: 2024-09-20ANHUI UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210643516.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-09
Publication Date
2024-09-20
Estimated Expiration
2042-06-09

AI Technical Summary

Technical Problem

Traditional robot arm trajectory planning methods are difficult to effectively avoid multiple obstacles in an unstructured environment, resulting in discontinuous motion and low error accuracy.

Method used

The robot arm end obstacle avoidance method based on virtual force is adopted. By establishing the robot arm kinematics model and obstacle model, the pseudo distance is calculated, the virtual repulsion function is minimized to correct the end trajectory, and smooth obstacle avoidance between the robot arm and the obstacle is achieved. .

Benefits of technology

It achieves smooth obstacle avoidance of the robotic arm in the presence of multiple obstacles, improves trajectory tracking accuracy and motion stability, and can quickly return to the desired trajectory, ensuring that the robotic arm accurately reaches the target position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115026816B
    Figure CN115026816B
Patent Text Reader

Abstract

The present invention discloses a method for avoiding obstacles at the end of a manipulator based on virtual force, and belongs to the technical field of manipulator motion planning. The method for avoiding obstacles at the end of a manipulator based on virtual force of the present invention uses the concept of pseudo-distance to construct a method for anti-collision constraints. Each obstacle contains an analytical expression of a super-quadratic surface, which more qualitatively expresses the constraint conditions between the obstacle and the manipulator, simplifies the tedious calculations in the simulation, and the formula based on the virtual force non-collision constraint is not only simple but also easy to update the obstacle avoidance motion of the manipulator in real time. In solving the problem of end obstacle avoidance, the disadvantage of the traditional method of only considering distance is changed. Through the different speeds, distances and moving directions between the obstacle and the end of the manipulator, the dynamic repulsive field can generate a smooth virtual force repulsion, which adds an obstacle avoidance speed to the end effector, and solves the problem of obstacles appearing on the desired trajectory of the end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot arm motion planning, and more specifically to a robot arm end obstacle avoidance method based on virtual force. Background Art

[0002] Nowadays, trajectory planning of robotic arms is a hot topic in the robotics industry and has been widely used in industrial production and manufacturing. The main task of trajectory planning is to find an optimal collision-free configuration between the initial position and the final position. If the robotic arm collides with surrounding objects while working in an unstructured environment, it will affect the quality of task completion and even cause some safety problems. Therefore, obstacle avoidance has become an important skill in robotic work. Decision force adaptation is introduced to filter the pre-planned trajectory in real time to ensure the smoothness and stability of the robot's motion. In practice, the complexity of the obstacle model is different, and it is more cumbersome to express it with Euclidean distance, and it cannot be expressed statistically, which will lead to poor accuracy of terminal trajectory tracking.

[0003] The main tasks of robot trajectory planning are terminal trajectory tracking and obstacle avoidance. Traditional obstacle avoidance methods achieve obstacle avoidance at the joints through self-motion. When an obstacle appears on the desired trajectory at the end, the trajectory tracking task and the obstacle avoidance task will conflict. The closed-loop control method of master-slave task conversion proposed by many scholars at home and abroad can effectively solve such problems. However, with the emergence of multiple obstacles, the minimum Euclidean distance between the robot and the obstacle is difficult to detect, and the calculation is cumbersome and complicated, resulting in discontinuous motion and low error accuracy of the robot. Summary of the invention

[0004] 1. Technical problems to be solved

[0005] The present application aims to provide a method for avoiding obstacles at the end of a robotic arm based on virtual force, which is advantageous over the prior art described in the background art in at least one aspect.

[0006] 2. Technical solution

[0007] The purpose of the present invention is achieved through the following technical solutions:

[0008] A method for avoiding obstacles at the end of a robotic arm based on virtual force, comprising the following steps:

[0009] S1. Establishing the kinematic model of the robot arm: The standard DH method is used to establish the kinematic model of the robot arm, and the coordinate transformation is performed through the homogeneous transformation matrix of the robot arm joint coordinate system relative to the base coordinate system:

[0010]

[0011] In formula (1), i (i = 1, 2, ..., n) is the joint number of the robot arm. In order to simplify the expression, cosθ i , sinθ i , cosα i-1 , sinα i-1 Abbreviated as cθ i , sθ i , cα i-1 , sα i-1 ;Rot(x i-1 ,α i-1 ) is around x i-1 Axis rotation α i-1 Angle transformation matrix, Trans(x i-1 ,a i-1 ) is along x i-1 Axis translation α i-1 The transformation matrix, Rot(z i ,θ i ) is the rotation around z i Axis rotation θ i Angle transformation matrix, Trans(z i ,d i ) is the rotation around z i Axis translation d i The transformation matrix of

[0012] The transformation matrix of the end of the robot arm relative to the base coordinate system is obtained by the transformation matrix of each rod in the above formula: get:

[0013] S2. Establishing the robot-obstacle model: This modeling method unifies various obstacles in a simple and original way, replaces the traditional Euclidean distance, and calculates the distance q at any point in the robot workspace. c (x,y,z) in the obstacle coordinate system o obs -x obs y obs z obs The position under the robot arm is used to determine the pseudo-distance between the robot arm link and the obstacle; the pseudo-distance is used to describe the position relationship between the robot arm and the spatial obstacle. The basic idea is to establish the distance between the robot arm and the obstacle through a nonlinear function equation.

[0014] S3. Calculate the minimum pseudo distance: Use the vector method to express the minimum pseudo distance between the robot and the obstacle to clearly express the constraint conditions between the obstacle and the robot;

[0015] S4, improving the virtual repulsion function: considering the speed and movement direction of the end effector, improving the virtual repulsion function and finding the negative gradient function; bringing the minimum pseudo distance value found in step S3 into the improved virtual repulsion function, finding the virtual repulsion between the end of the robot and the obstacle, and planning the trajectory of the end of the robot;

[0016] S5. Use the algorithm to achieve the end obstacle avoidance task: bring the virtual repulsive force obtained in step S4 into the end obstacle avoidance method of the robot arm to achieve the end obstacle avoidance of the robot arm.

[0017] Furthermore, in step S2, a manipulator-obstacle model is established, and the concept of pseudo-distance is used to construct a method for anti-collision constraints. Each obstacle contains an analytical expression of a hyperquadric surface, which more qualitatively expresses the constraint conditions between the obstacle and the manipulator. A coordinate system is established with the geometric center of the obstacle as the origin. The analytical equation of the hypersurface pseudo-distance from a spatial point to the obstacle sphere is:

[0018]

[0019] In the formula, S p (x, y, z) is the pseudo distance in the obstacle coordinate space, q c (x, y, z) is the coordinate position of any point in space, (x0, y0, z0) is the center point of the superquadratic surface. s =r obs +r i , is the preset obstacle safety distance, r obs is the radius of the obstacle envelope, r i is the thickness radius of the simulated robot arm.

[0020] Furthermore, in step S2, the pseudo distance between the robot arm link and the obstacle is determined by any point q in the task space. c (x, y, z), calculate the corresponding pseudo distance, in order to ensure the safety of the obstacle avoidance process, the minimum pseudo distance S in the obstacle avoidance process p,min (q c ) is always greater than the preset threshold d of the obstacle envelope pm , The robot is in a safe state.

[0021] Furthermore, the vector method in step S3 is expressed as: S p (x,y,z)=X T QX+B T X+C

[0022] Where X = [x, y, z] T , Q = diag[1 / R s 2 ,1 / R s2 ,1 / R s 2 ],B=[-2 x0 / R s 2 ,-2y0 / R s 2 ,-2z0 / R s 2 ] T , Q, B, and C are all constants.

[0023] Furthermore, in step S4, a virtual gravitational repulsion is used to plan the end trajectory of the robot arm, that is, a novel virtual repulsive force is generated between the obstacle envelope and the end effector to correct the end effector trajectory so that the obstacle appears on the desired trajectory.

[0024] Furthermore, the repulsion function in step S4 is:

[0025]

[0026] Among them, F dyn (x,v) is the virtual force generated by velocity and position, S p (x) is the pseudo distance between the end of the robot and the obstacle, β is a constant to adjust the effect of the velocity vector angle θ, θ represents the current velocity vector ν and the end effector position q c The angle between the positions of the obstacles.

[0027] Furthermore, in step S4, based on the formula Calculate, when θ is When the value of θ is between , it means that the robot is approaching the obstacle and the dynamic repulsive field starts to work; when the value of θ is between When the robot is within the range of 0.01, the robot is far away from the obstacle and the dynamic repulsion field does not work.

[0028] Furthermore, in step S5, the speed of the end of the robot arm is adjusted based on the virtual repulsive force generated in step S4. The kinematic equations after correction of the traditional obstacle avoidance algorithm are:

[0029] in, is the terminal velocity vector, and the Jacobian matrix J is the angular velocity vector of the robot joint exist The linear mapping ( n, m are the dimensions of the joint space and the operation space), J0 is the Jacobian matrix corresponding to the minimum Euclidean distance projection point of the obstacle on the connecting rod, N = IJ + J, I∈R n×n is the identity matrix, J+ Indicates the pseudo-inverse of the matrix, J + =J T (JJ T ) -1 ; is the virtual repulsive force F dyn The amount of velocity adjustment produced by (x,v).

[0030] Furthermore, in step S5, when the obstacle appears on the desired trajectory of the end effector, that is, the closest distance point is the position of the end effector of the robot arm, the end motion speed trajectory is changed, the end effector continues to approach the obstacle, the minimum pseudo distance decreases, and at the same time θ When the virtual repulsive force is continuously increasing, a larger speed is generated for correction, which acts on the end effector to make it avoid obstacles on the desired trajectory.

[0031] 3. Beneficial effects

[0032] Compared with the prior art, the advantages of the present invention are:

[0033] (1) The virtual force-based robot end obstacle avoidance method of the present invention obtains the point on the robot arm link closest to the obstacle and the minimum pseudo distance value through the vector method, and compares the distance value with the preset threshold value to solve the problem that the obstacle avoidance cannot be completed when the obstacle appears on the expected trajectory. At the same time, after the obstacle avoidance is completed, the robot quickly returns to the expected trajectory to achieve the trajectory tracking task, which has very important practical significance.

[0034] (2) The virtual force-based robot end obstacle avoidance method of the present invention utilizes the concept of pseudo-distance to construct an anti-collision constraint method. Each obstacle contains an analytical expression of a superquadratic surface, which more qualitatively expresses the constraint conditions between the obstacle and the robot, and simplifies the tedious calculations in the simulation. The formula based on the virtual force non-collision constraint is not only simple but also easy to update the robot arm's obstacle avoidance movement in real time.

[0035] (3) The virtual force-based obstacle avoidance method for the end effector of the robot arm changes the disadvantage of the traditional method of only considering the distance in solving the end effector obstacle avoidance problem. The dynamic repulsive field can generate a smooth virtual force repulsion through the different speeds, distances and moving directions between the obstacle and the end effector, which adds an obstacle avoidance speed to the end effector, solves the problem of obstacles appearing on the desired trajectory of the end effector, and ensures that the robot returns to its original motion state after passing the obstacle.

[0036] (4) The simulation results of the virtual force-based end-effector obstacle avoidance method of the present invention show that when an envelope obstacle suddenly appears on the desired task trajectory of the end effector and the closest distance between the end effector and the obstacle is about 0.02 m, the end effector can smoothly avoid the obstacle and quickly return to the desired trajectory, while ensuring that the robot arm can accurately reach the target position, verifying that the obstacle avoidance method can achieve end-effector obstacle avoidance. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a flow chart of the obstacle avoidance method of the present invention.

[0038] Figure 2 This is the kinematic model diagram of the 7-DOF robotic arm.

[0039] Figure 3 Schematic diagram of the closest point of the robotic arm and the spherical surface of the obstacle.

[0040] Figure 4 Schematic diagram of the end repulsion angle.

[0041] Figure 5 Schematic diagram of the obstacle avoidance process of the robot arm connecting rod of the method of the present invention.

[0042] Figure 6 Schematic diagram of the change of minimum pseudo-distance during obstacle avoidance.

[0043] Figure 7 Schematic diagram of the trajectory error of the robot end.

[0044] Figure 8 The virtual force changes during the obstacle avoidance process.

[0045] Fig. 9 Schematic diagram of the angle changes of each joint of the robotic arm. DETAILED DESCRIPTION

[0046] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings and embodiments.

[0047] Example

[0048] The robot end obstacle avoidance method based on virtual force in this embodiment is as follows: Figure 1 As shown,

[0049] S1. Establishing the kinematic model of the robot arm: The standard DH method is used to establish the kinematic model of the robot arm, and the coordinate transformation is performed through the homogeneous transformation matrix of the robot arm joint coordinate system relative to the base coordinate system:

[0050]

[0051] In formula (1), i (i = 1, 2, ..., n) is the joint number of the robot arm. In order to simplify the expression, cosθ i , sinθ i , cosα i-1 , sinα i-1 Abbreviated as cθ i , sθ i , cα i-1 , sα i-1 ;Rot(x i-1 ,α i-1 ) is around x i-1 Axis rotation α i-1 Angle transformation matrix, Trans(x i-1 ,a i-1 ) is along x i-1 Axis translation α i-1 The transformation matrix, Rot(z i ,θ i ) is the rotation around z i Axis rotation θ i Angle transformation matrix, Trans(z i ,d i ) is the rotation around z i Axis translation d i The transformation matrix of

[0052] The transformation matrix of the end of the robot arm relative to the base coordinate system is obtained by the transformation matrix of each rod in the above formula: get:

[0053] The specific parameters are shown in Table 1.

[0054]

[0055] Get the coordinates of each joint point in the base coordinate system.

[0056] The transformation matrix of the end of the robot arm relative to the base coordinate system is obtained by the transformation matrix of each rod in the above formula: get: The mapping relationship between the robot end effector velocity and the joint velocity, and the transformation matrix reflecting the relationship between the two is called the Jacobian matrix, which is expressed by formula (2): In the formula, Represents the speed of avoiding obstacles, J is the angular velocity vector of the robot joint At the terminal velocity vector The linear mapping ( n, m are the dimensions of the joint space and operation space).

[0057] S2. Establish a robot-obstacle model: In actual experiments, the obstacle avoidance control method does not require precise calculations. It only needs to calculate the envelope of the robot's operating space without colliding with the obstacle. This application introduces pseudo-distance as a collision-free distance judgment indicator to replace the Euclidean distance, uses analytical functions to represent multi-shaped obstacles, and establishes a coordinate system with the geometric center of the obstacle as the origin. The hypersurface pseudo-distance analytical equation from a spatial point to the obstacle sphere is

[0058]

[0059] An ideal geometric sphere is used to model irregular obstacles, that is, the superquadratic surface pseudo-distance expression from a spatial point to an obstacle is:

[0060]

[0061] In the formula, represents the pseudo distance in the obstacle coordinate space, represents the obstacle envelope shape function, s a =(h1,h2,h3,m,n,p) are the geometric parameters of the obstacle enveloping function, q c (x, y, z) is the coordinate position of any point in space, (x0, y0, z0) is the center point of the superquadratic surface. s =r obs +r i , is the preset obstacle safety distance, r obs is the radius of the given obstacle, r i is the maximum radius of the fitting connecting rod cylinder.

[0062] Figure 3 Shows any point q in the robot's task space c (x, y, z), based on formula (2), the corresponding pseudo distance is calculated. In order to ensure the safety of the obstacle avoidance process, the minimum pseudo distance S in the obstacle avoidance process is p,min (q c ) is always greater than the preset threshold d of the obstacle envelope pm , Determine whether the robot arm connecting rod is in contact with the obstacle surface and whether the robot arm is in a safe state. The concept of pseudo distance is used to construct the anti-collision constraint method. Each obstacle contains an analytical expression of a super quadratic surface, which more qualitatively expresses the constraint conditions between the obstacle and the robot arm, simplifies the tedious calculations in the simulation, and the formula based on the virtual force non-collision constraint is not only simple but also easy to update the robot arm's obstacle avoidance movement in real time.

[0063] S3. Calculate the minimum pseudo distance: Use the vector method to express the minimum pseudo distance between the manipulator and the obstacle; the vector method is expressed as: S p(x,y,z)=X T QX+B T X+C

[0064] Where X = [x, y, z] T , Q = diag[1 / R s 2 ,1 / R s 2 ,1 / R s 2 ],B=[-2 x0 / R s 2 ,-2y0 / R s 2 ,-2z0 / R s 2 ] T , Q, B, and C are all constants. The closest point to the obstacle and the minimum pseudo-distance value on the robot arm link are obtained by the vector method. The distance value is compared with the preset threshold to solve the problem that the obstacle avoidance cannot be completed when the obstacle appears on the expected trajectory. At the same time, after completing the obstacle avoidance, it quickly returns to the expected trajectory to achieve the trajectory tracking task, which has very important practical significance.

[0065] S4. Improved virtual repulsion function: Use virtual gravitational repulsion to plan the end trajectory of the robot arm, that is, a novel virtual repulsive force is generated between the obstacle envelope and the end effector to correct the end effector trajectory. The traditional potential field method only plans the distance between the end effector and the obstacle, while ignoring the influence of the end effector's speed and movement direction. It is not enough to only consider the distance in obstacle avoidance movement, which may cause the possibility of collision. In order to solve these problems, the above repulsive potential field function is improved as follows:

[0066]

[0067]

[0068] Among them, F dyn (x,v) is the virtual force generated by velocity and position, S p (x) is the pseudo distance between the end of the robot and the obstacle, β is a constant that can adjust the influence of the velocity vector angle θ, such as Figure 4 The θ shown here represents the current velocity vector ν and the end effector position q c (relative to the position of the obstacle). And can be calculated using the formula. When θ is When the value of θ is between , it means that the robot is approaching the obstacle and the dynamic repulsive field starts to work; when the value of θ is between When the robot is within the range of , the robot is far away from the obstacle and the dynamic repulsion field should not work.

[0069] S5. Use algorithms to achieve terminal obstacle avoidance tasks: Based on the terminal obstacle avoidance method based on virtual force, the repulsive force generated by the dynamic potential field takes into account the three factors of speed, position and direction, which can improve the robot's obstacle avoidance behavior. Repulsive force and distance to obstacles p Inversely proportional to the speed ν, when the speed ν is zero or s p When it is greater than the threshold, the repulsive force is also related to the angle between the velocity vector ν and the direction vector to the obstacle. If the angle θ is less than 90° (ie, the end effector is far away from the obstacle), the repulsive force is zero.

[0070] Based on the virtual repulsive force generated by the above formula, the speed of the end of the robot arm Make corrections, namely:

[0071]

[0072] Item 2 It is the avoidance speed related to obstacle avoidance, which is related to the point on the robot arm link closest to the obstacle. is the speed adjustment amount generated by the virtual repulsion. When the obstacle appears on the desired trajectory of the end effector, that is, the closest distance point is the position of the end effector of the robot arm, the end motion speed trajectory is changed, the end effector continues to approach the obstacle, the minimum pseudo distance decreases, and θ is in The virtual repulsive force increases continuously, generating a larger speed for correction, acting on the end effector to make it avoid obstacles on the desired trajectory. In solving the end obstacle avoidance problem, the traditional method of only considering the distance is changed. Through the different speeds, distances and moving directions between the obstacle and the end of the robot arm, the dynamic repulsive field can generate a smooth virtual repulsive force, adding an obstacle avoidance speed to the end effector, solving the problem of obstacles appearing on the desired trajectory at the end, and ensuring that the robot returns to its original motion state after passing the obstacle.

[0073] S6. Simulation Experiment and Analysis

[0074] In order to verify the effectiveness and feasibility of the obstacle avoidance method proposed in this invention, the method is applied to the LBRiiwa14R280 seven-degree-of-freedom robotic arm model. Figure 2 , simulation experiments are carried out in matlab2020a software.

[0075] The expected trajectory of the end: the starting point position and the end position are (0.3, 0.3, 0.6), with the center O rid (0.2, 0.3, 0.6), the expected trajectory is:

[0076]

[0077] Initial joint angle of the robot arm:

[0078] q=(-0.1639, 0.7263, 1.2678, 2.0117, -0.8201, -2.0944, -1.4991)

[0079] The equivalent cylindrical radius of the robot arm connecting rod is R = 0.03m

[0080] Preset obstacle environment: The experimental simulation is carried out in the presence of multiple obstacles to ensure the effectiveness of the obstacle avoidance method. The obstacles are preset with three spheres of the same size with a radius of r = 0.03m. The coordinates of the sphere center are based on the robot arm base as the reference system.

[0081] Obstacle sphere 1 (at zero space): O obs1 =(0.3,0,0.4);

[0082] Obstacle sphere 2 (at zero space): O obs2 =(0,0.1,0.6);

[0083] Obstacle ball 3 (at the end track): O obs3 =(0.1,0.3,0.6);

[0084] Therefore, obstacles appear at the null space and on the desired trajectory at the end;

[0085] Pseudorange threshold d pm =3, corresponding to the Euclidean distance of 0.06m;

[0086] So both in the null space and on the desired trajectory at the end are O obs1 An obstacle appears.

[0087] from Figure 5 It can be seen that the robot arm successfully avoids all obstacles according to the expected trajectory through the change of configuration. Figure 6 ,The minimum pseudo distance between the robot and the obstacle is much larger than the pseudo distance threshold within the simulation time of 0-0.9s. At this time, the obstacle has no effect on the tracking accuracy of the robot end trajectory, and it continues to move according to the expected trajectory. Figure 7 It can be seen that the trajectory error is within 0.02m, and the tracking accuracy is higher than the traditional obstacle avoidance method. The end effector can smoothly avoid obstacles and quickly return to the desired trajectory, while ensuring that the robotic arm can accurately reach the target position, verifying that the obstacle avoidance method can achieve end obstacle avoidance.

[0088] like Figure 5 As shown in the figure, when T = 0.9s, the end of the robot arm enters the danger zone of obstacle 3. Figure 8It can be seen that the virtual repulsion between the end of the robot arm and the obstacle increases rapidly, and the virtual repulsion generates a position increment for the end of the robot arm. The high-precision tracking of the end trajectory is sacrificed to start the obstacle avoidance measures quickly, and the minimum pseudo distance is kept at about 2. The small amplitude jitter is caused by the close distance between the preset positions of obstacles 2 and 3, and the robot arm is in urgent obstacle avoidance, which is in line with the actual situation. At the same time, it proves that the method proposed in the present invention has high sensitivity and effectiveness, and has better practicality than the traditional obstacle avoidance method. When the simulation time T = 2.3-3s, the minimum pseudo distance gradually increases, the robot arm leaves the obstacle danger zone, the obstacle avoidance movement begins to weaken, the end trajectory tracking error gradually decreases, and finally converges to the preset expected trajectory, returns to the starting point, and completes the simulation.

[0089] At the same time from Fig. 9 From the robot arm joint angle diagram, it can be seen that there is no vibration during the entire movement process, and the joint position is stable. Fig. 9 The phenomenon T=0-0.5s that appears at the beginning of the simulation of the robot arm joint velocity diagram may be due to some uncertain parameters of the robot arm model itself and the adaptability of the method. The joint velocity has a small linear change, resulting in a sudden increase in the actual trajectory error on the Y-axis. This problem needs to be further resolved in later scientific research. Subsequently, the robot arm quickly resumes the obstacle avoidance motion, and the motion speed is continuous, smooth and stable. The simulation verifies the effectiveness of the method.

[0090] The present invention and its embodiments are described schematically above, and the description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. Therefore, if a person skilled in the art is inspired by it and designs a structural method and an embodiment similar to the technical solution without creativity without departing from the purpose of the invention, they shall all fall within the protection scope of the present invention.

Claims

1. A method for avoiding obstacles at the end of a robotic arm based on virtual force, characterized in that: The steps are: S1. Establishing the kinematic model of the robot arm: The standard DH method is used to establish the kinematic model of the robot arm, and the coordinate transformation is performed through the homogeneous transformation matrix of the robot arm joint coordinate system relative to the base coordinate system: Where i = 1, 2, ..., n, is the joint number of the robot arm, cosθ i , sinθ i , cosα i-1 , sinα i-1 Abbreviated as cθ i , sθ i , cα i-1 , sα i-1 ;Rot(xi-1,α i-1 ) is around x i-1 Axis rotation α i-1 Angle transformation matrix, Trans(x i-1 ,a i-1 ) is along x i-1 Axis translation α i-1 The transformation matrix, Rot(zi,θ i ) is the rotation around z i Axis rotation θ i Angle transformation matrix, Trans(z i ,d i ) is the rotation around z i Axis translation d i The transformation matrix of The transformation matrix of the end of the robot arm relative to the base coordinate system is obtained by the transformation matrix of each rod in the above formula: get: S2. Establish a robot-obstacle model: Calculate the distance q at any point in the robot's workspace c (x,y,z) in the obstacle coordinate system o obs -x obs y obs z obs The position below is used to determine the pseudo distance between the robot arm link and the obstacle; S3. Calculate the minimum pseudo distance: Use a vector method to express the minimum pseudo distance between the robot and the obstacle; S4, improving the virtual repulsion function: considering the speed and movement direction of the end effector, improving the virtual repulsion function and finding the negative gradient function; bringing the minimum pseudo distance value found in step S3 into the improved virtual repulsion function, finding the virtual repulsion between the end of the robot and the obstacle, and planning the trajectory of the end of the robot; S5. Implement the end obstacle avoidance task using the algorithm: bring the virtual repulsive force obtained in step S4 into the end obstacle avoidance method of the robot arm to implement the end obstacle avoidance of the robot arm; In step S2, a manipulator-obstacle model is established, and the concept of pseudo-distance is used to construct a method for anti-collision constraints. Each obstacle contains an analytical expression of a hyperquadric surface, which more qualitatively expresses the constraint conditions between the obstacle and the manipulator. A coordinate system is established with the geometric center of the obstacle as the origin. The analytical equation of the hypersurface pseudo-distance from a spatial point to the obstacle sphere is: In the formula, S p (x, y, z) is the pseudo distance in the obstacle coordinate space, (x0, y0, z0) is the center point of the superquadratic surface; R s =r obs +r i , is the preset obstacle safety distance, r obs is the radius of the obstacle envelope, r i To simulate the thickness radius of the robot arm; The vector method in step S3 is expressed as: p (x, y, z) = X T QX+B T X+C; where X=[x, y, z] T , Q = diag[1 / R s 2 , 1 / R s 2 , 1 / R s 2 ],B=[-2x0 / R s 2 , -2y0 / R s 2 , -2z0 / R s 2 ] T , Q, B, and C are all constants; The repulsion function in step S4 is: Among them, F dyn (x, v) is the virtual force generated by velocity and position, S p (x) is the pseudo distance between the end of the robot and the obstacle, β is a constant to adjust the effect of the velocity vector angle θ, θ represents the current velocity vector v and the end effector position q c The angle between c is the position relative to the obstacle; is the gradient, It means to find the negative gradient of the gravitational field function; It means to find the gradient of pseudo distance; In step S4, based on the formula Calculate, when θ is When the value of θ is between , it means that the robot is approaching the obstacle and the dynamic repulsive field starts to work; when the value of θ is between When the robot is within the range of 0.01, the robot is far away from the obstacle and the dynamic repulsion field does not work; In step S5, the speed of the end of the robot arm is adjusted based on the virtual repulsive force generated in step S4. The kinematic equations after correction of the traditional obstacle avoidance algorithm are: in, is the terminal velocity vector; Jacobian matrix J is the angular velocity vector of the robot joint exist Linear mapping of ; J∈R n×m , n, m are the dimensions of the joint space and the operation space; J0 is the Jacobian matrix corresponding to the minimum Euclidean distance projection point of the obstacle on the connecting rod, N = IJ + J, I∈R n×n is the identity matrix, J + Indicates the pseudo-inverse of the matrix, J + =J T (JJ T ) -1 ; is the virtual repulsive force F dyn (x,v) The speed adjustment produced; x d is the expected trajectory.

2. The method for avoiding obstacles at the end of a robotic arm based on virtual force according to claim 1, characterized in that: In step S5, when an obstacle appears on the desired trajectory of the end effector, that is, the closest distance point is the position of the end effector of the robot arm, the end motion speed trajectory is changed, the end effector continues to approach the obstacle, the minimum pseudo distance decreases, and at the same time θ When the virtual repulsive force is continuously increasing, a larger speed is generated for correction, which acts on the end effector to make it avoid obstacles on the desired trajectory.