A welding robot path planning method based on GD-RRT

Through the path planning method based on GD-RRT, the D-H representation and the grid method are used to model the welding robot and environment, and the gravity guidance and gradient descent methods are introduced to solve the problem of low efficiency of the RRT algorithm and achieve fast and real-time welding. Robot path planning.

CN114859920BActive Publication Date: 2024-08-27JIANGSU AUTOMATION RESEARCH INSTITUTE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210509889.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-11
Publication Date
2024-08-27
Estimated Expiration
2042-05-11

AI Technical Summary

Technical Problem

Existing welding robot path planning algorithms, such as the RRT algorithm, are inefficient and generate a large number of redundant nodes, resulting in long planning times and inability to meet real-time requirements.

Method used

The path planning method based on GD-RRT is used to model the welding robot through D-H representation, the welding environment model is established using the grid method, the gravity component is introduced to guide the growth direction of the random tree, and the collision point is moved to the free configuration space through the gradient descent method. , Reduce redundant node generation and collision detection time.

Benefits of technology

It greatly reduces planning time, reduces algorithm complexity, improves operating efficiency, enables path planning to be completed in real time, and is suitable for complex small and medium-sized stand-alone welding tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114859920B
    Figure CN114859920B
Patent Text Reader

Abstract

The present invention discloses a welding robot path planning method based on GD-RRT, including: modeling the welding robot using D-H representation; establishing a welding environment model using a grid modeling method, and determining obstacle objects and configuration spaces in the welding environment; judging whether the terminal posture of the welding robot meets the constraint conditions, and adjusting the terminal posture if the constraint conditions are not met; and searching for collision-free transfer trajectories through GD-RRT based on the obstacle objects and configuration spaces in the welding environment. The path planning method of the present invention increases the gravitational component to guide the growth direction of the random tree, does not require accurate modeling of the global environment, greatly reduces the planning time, and simultaneously moves the collision point from the obstacle configuration space to the free configuration space through the gradient descent method, reduces the generation of a large number of redundant nodes, saves the time of collision detection, and improves the operation efficiency of the algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of welding robot path planning, and in particular relates to a welding robot path planning method based on GD-RRT. Background Art

[0002] The small-scale structural parts in ships are relatively complex, with different forms and sizes. Due to the characteristics of non-batch processing, path planning is required for each part during the small-scale welding process using welding equipment. Common path planning algorithms include: A* algorithm, Dijkstra algorithm, genetic algorithm (GA), rapid-exploring random tree algorithm (RRT), etc. The introduction of heuristic function in the A* algorithm avoids a large number of invalid search paths that are often generated in path planning problems; the main feature of the Dijkstra algorithm is that it spreads outward from the center until it reaches the end point, but it traverses and calculates many nodes, and the efficiency is low; the path obtained by the genetic algorithm is more in line with the path selection method of intelligent agents in reality, but the amount of calculation is large and time-consuming, and it cannot meet the real-time requirements. LaValle first proposed a fast random search tree algorithm based on node sampling in 1998. The RRT algorithm starts from an initial point in the configuration space, adds new nodes through random sampling and expansion, and generates a random expansion tree. When the new node in the random tree contains the target point or enters the target area, at least one path composed of new nodes of the random tree is formed between the initial point and the target point. Compared with other path planning algorithms, this algorithm is widely used because of its advantages such as few parameters, simple structure, strong search ability, and ability to solve complex constraints. However, the RRT algorithm has the problems of low operating efficiency and high complexity. Random sampling and expansion add new nodes aimlessly. Although it can ensure effective exploration of the entire configuration space, the random tree often expands to some places far away from the target before obtaining the path solution. Summary of the invention

[0003] The purpose of the present invention is to propose a welding robot path planning method based on GD-RRT, which reduces the generation of a large number of redundant nodes, greatly reduces the planning time, reduces the algorithm complexity and improves the algorithm efficiency.

[0004] The technical solution to achieve the purpose of the present invention is: a welding robot path planning method based on GD-RRT, comprising:

[0005] The welding robot is modeled using DH representation;

[0006] The grid modeling method is used to establish the welding environment model and determine the obstacle objects and configuration space in the welding environment;

[0007] Determine whether the end posture of the welding robot meets the constraint conditions, and adjust the end posture if it does not meet the constraint conditions;

[0008] Based on the obstacle objects and configuration space in the welding environment, the collision-free transfer trajectory is found through GD-RRT.

[0009] Compared with the prior art, the beneficial effects of the present invention are as follows: the path planning method of the present invention increases the gravitational component to guide the growth direction of the random tree, does not require accurate modeling of the global environment, reduces the generation of a large number of redundant nodes, and greatly reduces the planning time; the present invention abandons the idea of ​​discarding all collision points in the traditional RRT algorithm, and moves the collision points from the obstacle configuration space to the free configuration space through the gradient descent method, which saves the time of collision detection and improves the operation efficiency of the algorithm; the present method can also be used for other algorithms derived from RRT, such as RRT-Connect, RRT*, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the implementation of the present invention and do not constitute a limitation of the present invention.

[0011] Figure 1 Schematic diagram of the GD-RRT welding robot path planning method of the present invention.

[0012] Figure 2 It is a specific flow chart of the GD-RRT path planning algorithm in the embodiment. DETAILED DESCRIPTION

[0013] The present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that the described embodiments are only intended to facilitate the explanation of the present invention and do not constitute a limitation to the present invention.

[0014] Aiming at the shortcomings of the RRT algorithm, which is completely random and generates a large number of redundant points, resulting in low algorithm efficiency, the present invention proposes a welding robot path planning method based on GD-RRT, such as Figure 1 As shown, the following steps are included:

[0015] S1. Welding robot modeling

[0016] The modeling of the welding robot in the present invention is based on the Mitsubishi RV-13F robot. The robot body has six degrees of freedom, and all joints are revolute joints. In order to facilitate the kinematic solution, the robot is modeled using the DH representation method. The base is recorded as link 0, then the link directly connected to the base is recorded as joint 1, and so on, and joint i represents the joint between links i-1 and i; first, the corresponding coordinate system is established at each joint, starting from the base to the last joint, all transformations are combined, and finally the total transformation matrix is ​​obtained.

[0017] Establish the joint coordinate system based on the DH parameter method:

[0018] (1) z i Axis determination: If the joint axis is sliding, z i The axis is the direction of linear motion, and the joint variable is x i-1 With x i The distance between i If the joint axis is rotational, z i The axis follows the right-hand rule and is perpendicular to the direction of rotation. The joint variable at this time is the rotation angle θ i .

[0019] (2)x i Axis determination: If two adjacent axes intersect, x i The direction of and the cross product of the two vectors z i-1 × i Coaxial. If two adjacent axes are parallel, there are countless common perpendicular lines. Pick a line that is collinear with the previous common perpendicular line. If two adjacent axes are neither intersecting nor parallel, you must be able to find a common perpendicular line with the shortest distance between the two lines. In this case, x i Along the direction of the common perpendicular.

[0020] (3)y i Determination of axis: follow the right-hand rule.

[0021] (4) Special case: For the base coordinate system 0, only z can be determined i The direction of the axis, the x0 axis can be chosen arbitrarily.

[0022] After establishing the coordinate system according to the above principles, the DH parameters of the robot arm can be listed as follows:

[0023] (1)θ i : Around z i The rotation angle of the axis, x i-1 With x i The angle between them, when the i-1 Counterclockwise rotation is positive direction.

[0024] (2)di : Along z i Axis direction, the length is the distance between the common perpendicular lines on both sides of the axis, that is, x i-1 With x i The distance between.

[0025] (3)a i : Along x i-1 Axis, called joint offset, is the length from z i-1 to z i The distance between the common perpendicular lines.

[0026] (4)α i : called joint rotation, z i-1 Axis and z i The angle between the axes, when moving clockwise around the axis z i-1 Set to negative direction when rotating.

[0027] Based on the DH model, the motion equation of the welding robot is established to calculate the terminal posture; when the DH parameter method is used for modeling, there are four parameters, two of which depend on the state of the machine itself and are constants that do not change with the movement of the robot. i With α i , depends on the state of the robot joint when it is installed. The other two parameters are variable and belong to joint variables. i With θ i The change in value depends on the joint type. When translating a joint, d i is a variable, and θ i is a constant; when rotating the joint, θ i is a variable, and d i is a constant. The DH parameters are shown in Table 1.

[0028] Table 1 Mitsubishi RV-13F welding robot DH parameter table

[0029]

[0030]

[0031] Establish coordinate system T1 at joint i of the welding robot i-1 , the transformation matrix between adjacent coordinate systems can be represented by multiplying four motion matrices:

[0032]

[0033] In the above formula, the four matrices on the right represent the rotation matrix, translation matrix, translation matrix, and rotation matrix respectively. The detailed derivation results are as follows:

[0034]

[0035] The welding robot's welding gun terminal is in the base coordinates. According to the above homogeneous transformation matrix, the terminal position can be obtained

[0036] matrix:

[0037] in, are the transformation matrices of two adjacent rods in the six links.

[0038] S2. Use grid modeling to establish a welding environment model and determine the obstacle objects and configuration space in the welding environment.

[0039] The grid method divides the external working environment of the welding robot into squares with equal sides, which are called grids. The welding robot has the function of identifying grids and classifies the divided grids into obstacle grids and free grids.

[0040] The mathematical model of three-dimensional welding robot path planning is similar to that in two-dimensional environment, and has a relatively broad mathematical description: Assuming that the entire three-dimensional path planning area is A, B represents obstacles, and the configuration space C = A / B represents the feasible area in A. Three-dimensional path planning is to find a feasible shortest area L in C. Similarly, according to the constraints of the welding robot in three-dimensional space: displacement constraints, collision avoidance constraints, motion constraints, objective functions, etc., an accurate mathematical model of three-dimensional path planning (welding environment model) is obtained.

[0041] (1) Displacement constraint: Each step of the welding robot can only move in one direction, which can be forward and backward, left and right, or up and down.

[0042]

[0043]

[0044]

[0045]

[0046] (2) Collision avoidance constraint: When encountering an obstacle grid (r, c, w), collision must be avoided.

[0047]

[0048] (3) Motion constraint: During the movement of the welding robot, it must move to the target point before it can stop.

[0049] |(X t +Y t +Z t )-(X t-1 +Yt-1 +Z t-1 )|≤|(X t-1 +Y t-1 +Z t-1 )-(X t-2 +Y t-2 +Z t-2 )|

[0050] (4) Objective function: This includes lateral and longitudinal position movement. It is hoped that the welding robot can achieve the set goal with the least total displacement.

[0051]

[0052] S3. Constraint Check

[0053] The pose matrix T can also be obtained by rotating the end effector of the welding robot around the X axis by an angle of γ, then around the Y axis by an angle of β, and then around the Z axis by an angle of α, and finally offsetting the end effector by x, y, and z along the x, y, and z axes of the coordinate system, respectively. Therefore, T can be expressed using the following formula, where each element in the matrix is ​​represented by r in rows and columns. ij have to

[0054]

[0055]

[0056] According to the above formula, the values ​​of rotation angles α, β, and γ can be obtained as

[0057] α=arctan2(r 21 ,r 11 )

[0058]

[0059] γ=arctan2(r 32 ,r 33 )

[0060] Therefore, after transformation, we can get the state q s The state X in the workspace is

[0061] X=T(q s )=(xyz α β γ)

[0062] Usually, there are different constraints on the end posture of the welding robot in the welding path. The constraint detection function c is defined for the six components of the end posture. x 、c y 、c z 、c α 、c β 、c γ, if component i satisfies the constraint, then the detection function c i (i) Returns 0, otherwise returns the error value.

[0063] Calculate the error e:

[0064] e=c x (X)+c y (X)+c z (X)+c α (X)+c β (X)+c γ (X)

[0065] If e is less than or equal to the inspection accuracy ε, then state q s Satisfy the constraints.

[0066] S4, based on the welding environment model established by the grid method in S2, determine the obstacle objects and configuration space in the welding environment, and find the collision-free transfer trajectory through GD-RRT

[0067] The planning is performed based on the joint space of the Mitsubishi RV-13F robot arm. The starting point of the robot arm is used as the root node of the RRT tree. The nodes of the RRT tree are obtained by sampling. The sampling method is a mixed sampling of random sampling and random sampling in the guidance space.

[0068] Based on the configuration space C obtained by S2, the RRT algorithm is modified. First, the idea of ​​gravity in the artificial potential field method is introduced into the RRT algorithm to guide the random tree to grow towards the target direction. A target gravity function G(n) is introduced for each node n in the path, where x rand represents a random node, x goal represents the end point of the path, ρ represents the search step, and the node n here represents the node from the starting point x init The nth x that expands outward new Node, which can be represented as

[0069] F(n)=R(n)+G(n)

[0070] Among them, F(n) represents the growth guidance function from node n to the new node, R(n) represents the random growth function of node n, and G(n) is the target gravity function.

[0071] By gravitational potential energy

[0072]

[0073] Get the gravitational force between the target point and the nearest node:

[0074] G=k p ·||x goal -x near ||

[0075] Among them, ρ is the growth step of the random tree, k p is the gravitational coefficient, x goal is the robot target position vector, ||x goal -x near || represents the node vector x near With the target point vector x goal The absolute value of the geometric distance. According to the above formula, the target gravity function G(n) at node n is constructed as

[0076]

[0077] When adding new leaf nodes through the RRT algorithm, the target gravity function will affect the selection of new nodes by calculating the gravity from each node to the target and guide the random tree to grow in the target direction.

[0078] New node x in RRT algorithm new The construction formula is:

[0079]

[0080]

[0081] According to the above formula, the generation formula of new nodes after introducing the gravity idea is obtained:

[0082]

[0083] Then, by modifying the configuration space of the generated sample points, the generated path from the starting space to the target space is changed. The generated path should be in the free configuration space. Any point in the obstacle configuration space should be moved to the free configuration space by the gradient descent method, and the gradient descent of the sample point should satisfy the following equation:

[0084]

[0085]

[0086]

[0087] At the same time, the Gaussian function G(x,y,z) reaches its minimum value.

[0088] Example

[0089] A welding robot path planning method based on GD-RRT has the following specific execution steps: Figure 2 As shown:

[0090] (1) The robot’s starting point is taken as the root node of the RRT tree.

[0091] (2) Generate a random number between 0 and 1. If the random number is not less than the first threshold, the end point of the robot's manipulator is taken as the target point. If the random number is less than the first threshold but greater than or equal to the second threshold, random sampling is used as the target point. If the random number is less than the second threshold, random sampling in space is used as the target point.

[0092] (3) Select the point closest to the target point in the RRT tree as the starting point, and divide multiple detection points between the starting point and the target point. For more complex welding environments, in order to avoid the robot's "crossing phenomenon", that is, the detection point crosses the obstacle due to the sparse distribution of points, the density of the equal distribution can be increased according to actual needs.

[0093] (4) For each detection point, detect whether the robotic arm of the welding robot collides with the obstacle object. If the welding robot collides with the obstacle object at any detection point, the gradient descent method is used to move the detection point to the local minimum point of the free configuration space.

[0094] (5) Determine whether the target point is the end point of the path planning. If so, output the shortest trajectory obtained by the RRT method. Otherwise, add the target point to the RRT tree and return to step (2).

[0095] The pseudo code of the GD-RRT algorithm is as follows:

[0096]

[0097]

[0098]

[0099] The following table gives the running time comparison of GD-RRT and traditional RRT. In a given iteration, the same sample set is used for the traditional RRT and the gradient descent-based GD-RRT. From Table 1, it can be seen that the gradient-based GD-RRT method makes the solution converge faster. Because in the traditional RRT algorithm, each newly generated point q new Collision detection is performed. If q new If the point is in the obstacle configuration space, the new point q is generated by discarding the point new This will lead to redundant detection of extra points that are not part of the spanning tree. The gradient descent method checks q new Are they located in the obstacle configuration space and are they moved to avoid redundancy?

[0100]

[0101] Table 2 Comparison of running time between GD-RRT and RRT

[0102] The gravity coefficient plays a key role in the growth of random trees. When there are no obstacles, the gravity coefficient can be increased, so that the growth direction of the random tree is largely affected by the gravity function, reducing the randomness of the random tree growth; when the distance to the obstacle is close, the gravity coefficient is reduced so that the random tree can quickly bypass the obstacle and grow towards the obstacle-free area. When approaching the end point, a larger gravity coefficient will cause the random leaf nodes to grow around the end point, so that the generated trajectory will also oscillate near the end point. At this time, the growth step size is appropriately reduced to provide maximum support for the leaf nodes to approach the end point. The gradient-based method can quickly converge to the solution. When performing the same work, GD-RRT uses much less time and iterations than RRT, which greatly speeds up the algorithm. GD-RRT can perform path planning in real time during the task, with a planning time of less than 0.5s, which has great advantages over the traditional RRT method; this method can also be used for other algorithms derived from RRT, such as RRT-Connect, RRT*, etc.

[0103] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A welding robot path planning method based on GD-RRT, characterized in that: include: The welding robot is modeled using DH representation; The grid modeling method is used to establish the welding environment model and determine the obstacle objects and configuration space in the welding environment; Determine whether the end posture of the welding robot meets the constraint conditions, and adjust the end posture if it does not meet the constraint conditions; Based on the obstacle objects and configuration space in the welding environment, the collision-free transfer trajectory is found through GD-RRT; The step of judging whether the end posture of the welding robot satisfies the constraint conditions specifically includes: The pose matrix T is obtained by rotating the end effector of the welding robot around the X axis by an angle of γ, then around the Y axis by an angle of β, and then around the Z axis by an angle of α, and finally offsetting the end effector by x, y, and z along the x, y, and z axes of the coordinate system respectively; and the elements of the pose matrix T are recorded as r in rows and columns ij ,but: According to the above formula, the values ​​of rotation angles α, β, and γ are determined as follows: α=arctan2(r 21 ,r 11 ) γ=arctan2(r 32 ,r 33 ) Get the state q s The status X in the workspace is: X=T(q s )=(xyzαβγ) For the six components of the end posture, the constraint detection function c is defined separately x 、c y 、c z 、c α 、c β 、c γ , if component i satisfies the constraint, then the detection function c i (i) Returns 0, otherwise returns the error value; The error value e is: e=c x (X)+c y (X)+c z (X)+c α (X)+c β (X)+c γ (X) If e is less than or equal to the set inspection accuracy ε, then state q s The constraints are met, otherwise the constraints are not met; The method of searching for collision-free transfer trajectories by GD-RRT specifically includes: The artificial potential field method is introduced into the RRT algorithm to guide the random tree to grow towards the target direction; a target gravity function G(n) is introduced for each node n in the path, where x rand represents a random node, x goal represents the end point of the path, ρ represents the search step, and the node n here represents the node from the starting point x init The nth x that expands outward new Node, represented by: F(n)=R(n)+G(n) Among them, F(n) represents the growth guidance function from node n to the new node, R(n) represents the random growth function of node n, and G(n) is the target gravity function; By gravitational potential energy The gravitational force between the target point and the nearest node is: G=k p ·||x goal -x near || Among them, ρ is the growth step of the random tree, k p is the gravitational coefficient, x goal is the robot's target position vector, ||x goal -x near || represents the node vector x near With the target point vector x goal The absolute value of the geometric distance; the target gravity function G(n) at node n is constructed as: When adding new leaf nodes through the RRT algorithm, the target gravity function affects the selection of new nodes by calculating the gravity of each node to the target and guides the random tree to grow in the target direction; New node x in RRT algorithm new The construction formula is: Based on the target gravity function, the generation formula of the new node is: Then, by modifying the configuration space of the generated sample points, the generation path of the generated sample points from the starting space to the target space is changed; any point in the obstacle configuration space should be moved to the free configuration space by the gradient descent method, and the gradient descent of the sample points satisfies the following equation: At the same time, the Gaussian function G(x,y,z) reaches its minimum value.

2. A welding robot path planning method based on GD-RRT according to claim 1, characterized in that: The use of DH representation to model the welding robot specifically includes: The base is recorded as link 0, and then the link directly connected to the base is recorded as joint 1, and so on, and joint i represents the joint between links i-1 and i; then the corresponding coordinate system is established at each joint of the welding robot, starting from the base to the last joint, and all the transformations are combined to obtain the total transformation matrix; Establish the joint coordinate system based on the DH parameter method; Based on the DH model, the motion equation of the welding robot is established to calculate the end position.

3. A welding robot path planning method based on GD-RRT according to claim 2, characterized in that: The establishment of a corresponding coordinate system at each joint of the welding robot specifically includes: (1) z i Axis determination: If the joint axis is sliding, z i The axis is the direction of linear motion, and the joint variable is x i-1 With x i The distance between i ; If the joint axis is rotational, z i The axis follows the right-hand rule and is perpendicular to the direction of rotation. The joint variable at this time is the rotation angle θ i ; (2)x i Axis determination: If two adjacent axes intersect, x i The direction of and the cross product of the two vectors z i-1 × i Coaxial; if the two adjacent axes are parallel, there are countless common perpendicular lines, and a straight line that is collinear with the previous common perpendicular line is selected; if the two adjacent axes are neither intersecting nor parallel, a common perpendicular line with the shortest distance between the two straight lines is found, and at this time x i Along the direction of the common perpendicular; (3)y i Determination of axis: follow the right-hand rule; (4) For the base coordinate system 0, only z is determined i The direction of the axis, the x0 axis can be chosen arbitrarily.

4. A welding robot path planning method based on GD-RRT according to claim 3, characterized in that: The DH parameters of the robot arm include: (1) Joint angle offset θ i : Around z i The rotation angle of the axis, x i-1 With x i The angle between them, when the i-1 When rotating counterclockwise, take the positive direction; (2) Offset d i : Along z i Axis direction, the length is the distance between the common perpendicular lines on both sides of the axis, that is, x i-1 With x i The distance between (3) Rod length a i : Along x i-1 Axis, called joint offset, is the length from z i-1 to z i The distance between the common perpendicular lines; (4) Joint torsion angle α i :z i-1 Axis and z i The angle between the axes, when moving clockwise around the axis z i-1 Set to negative direction when rotating.

5. A welding robot path planning method based on GD-RRT according to claim 4, characterized in that: The welding robot has six connecting rods, and the transformation matrix of two adjacent rods is Among them, R(*) is the rotation matrix, T(*) is the translation matrix; The terminal posture of the welding robot is:

6. A welding robot path planning method based on GD-RRT according to claim 1, characterized in that: The grid method is used to establish the welding environment model, which specifically includes: The external working environment of the welding robot is divided into grids with equal side lengths, and the divided grids are classified into obstacle grids and free grids; Assume that the entire path planning area is A, use B to represent the obstacle, and the configuration space C = A / B represents the feasible area in A; path planning is to find a feasible shortest area L in C; establish a welding environment model based on the constraint conditions of the welding robot in three-dimensional space: displacement constraint, collision avoidance constraint, motion constraint and objective function.

7. A welding robot path planning method based on GD-RRT according to claim 6, characterized in that: The displacement constraint is that each step of the welding robot can only move in one direction, forward and backward, left and right, or up and down; the collision avoidance constraint is that when encountering an obstacle grid (r, c, w), collision must be avoided; the motion constraint is that during the movement of the welding robot, it must move to the target point before stopping; the objective function is: based on the constraints, the established goal is achieved with the least total displacement possible.

8. The welding robot path planning method based on GD-RRT according to claim 1, characterized in that: The starting point of the welding robot mechanical arm is the root node of the RRT tree, and the nodes of the RRT tree are obtained by sampling, and the sampling method is a mixed sampling including random sampling and random sampling in the guidance space.