A robot arm collision detection method, system, storage medium and robot arm

By constructing an overall tree structure and using bounding boxes and triangular meshes for collision detection, the problem of dynamic collision detection under the complex geometric shape of the robotic arm is solved, and efficient and accurate collision detection effects are achieved.

CN113211495BActive Publication Date: 2024-09-06BEIJING AEROSPACE CONTROL CENT
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110387380.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-12
Publication Date
2024-09-06
Estimated Expiration
2041-04-12

AI Technical Summary

Technical Problem

Collision detection of robotic arms is difficult to achieve efficient and accurate dynamic collision detection in the case of complex multiple degrees of freedom and irregular geometric shapes. Existing methods such as basic shape fitting and static mesh cannot flexibly meet the requirements of dynamic collision detection.

Method used

Physical modeling is used to build the overall tree structure, and collision detection is performed through bounding boxes and triangular meshes. Dynamic collision detection of the robotic arm is realized by using the bounding box projection overlap judgment of leaf nodes and non-leaf nodes and the separation axis method.

Benefits of technology

It improves the accuracy and efficiency of collision detection of the robotic arm, can flexibly meet the dynamic collision detection needs during the movement of the robotic arm, and provides more accurate collision detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113211495B
    Figure CN113211495B
Patent Text Reader

Abstract

The present invention relates to a robot arm collision detection method, system, storage medium and robot arm. First, physical modeling is performed on the robot arm and the collision scene around the robot arm. Then, an overall tree structure including multiple leaf nodes and non-leaf nodes is constructed according to the model file, and the bounding box of each leaf node of the overall tree structure is calculated, and the bounding box of each non-leaf node is calculated. When at least one joint of the robot arm rotates, it is determined whether the robot arm collides by judging whether there are two bounding boxes with overlapping projections. On the one hand, compared with simple shapes such as rectangles and cylinders, the bounding box can more accurately characterize the geometric shape of the robot arm and improve the precision and accuracy of collision detection. On the other hand, as the angles of the joints of the robot arm change, when the robot arm presents different appearance states, it can flexibly meet the requirements of dynamic collision detection of the movement process of the robot arm.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] The robot arm is a complex system with high precision, multiple inputs and multiple outputs, high nonlinearity and strong coupling. The robot arm can be regarded as a multi-rigid body structure, which consists of multiple joints, rotation axes and front-end loads. Each joint has one degree of freedom and can rotate around the rotation axis under this degree of freedom. Through the rotation of the joints, the robot arm forms different configurations, so that the front-end load reaches the specified position and meets a certain angle orientation requirement to operate the target object. Due to its unique operational flexibility, it has been widely used in industrial assembly, safety and explosion-proof and other fields.

[0003] A multi-degree-of-freedom space manipulator is a special type of manipulator used in space activities. It is generally composed of a spacecraft body and a manipulator fixed to the spacecraft body. The manipulator generally has multiple degrees of freedom. Through the planning and control of each joint, the end of the manipulator reaches the predetermined position to complete space tasks such as assembly of large spacecraft, maintenance of space facilities or equipment, and capture of space targets on orbit.

[0004] After planning, the robot arm needs to perform collision detection on the planning results and simulate the collision between it and the surrounding environment entities to ensure the safety of the robot arm control. The difficulty of collision detection of the robot arm lies in:

[0005] 1) Due to the large size of the robot arm, the large number of joints, the irregular shapes of the joints, and the presence of monitoring cameras, shaft motors and other components, its geometric shape is extremely irregular and difficult to characterize with simple shapes such as rectangles and cylinders;

[0006] 2) The planning of the robotic arm is a motion process. As the angles of the joints of the robotic arm change, the robotic arm presents different appearance states, and it is necessary to continuously perform collision detection on each state. The robotic arm has many joints and a complex appearance. Accurate collision detection is an operation with high computational complexity. It is necessary to adopt a fast detection strategy to improve the detection speed while ensuring accuracy. The current methods generally use basic shape fitting, static grids, spatial octrees, etc., which cannot flexibly meet the requirements of dynamic collision detection and accurate collision detection in the robotic arm's motion process. Summary of the invention

[0007] The technical problem to be solved by the present invention is to provide a robot arm collision detection method, system, storage medium and robot arm in view of the deficiencies in the prior art.

[0008] The technical solution of a robot arm collision detection method of the present invention is as follows:

[0009] Performing physical modeling on the collision scene between the robot arm and the surroundings of the robot arm to obtain a model file;

[0010] Constructing an overall tree structure including a plurality of leaf nodes and non-leaf nodes according to the model file, wherein the leaf nodes represent the geometric shapes of the joints of the manipulator, the geometric shapes of the rotation axes and / or the geometric shapes of the collision obstacles in the collision scene obtained from the model file, and the non-leaf nodes represent labels;

[0011] Calculate the bounding box of each leaf node of the overall tree structure, and calculate the bounding box of each non-leaf node, where the bounding box of any non-leaf node refers to the union of the bounding boxes of all child nodes of the non-leaf node;

[0012] When at least one joint of the robotic arm rotates, when it is determined that any two bounding boxes have overlapping projections, it is determined that the robotic arms have collided; when no two bounding boxes have overlapping projections, it is determined that the robotic arms have not collided.

[0013] The beneficial effects of a robot arm collision detection method of the present invention are as follows:

[0014] First, a collision scene between a robot arm and its surroundings is physically modeled, and then an overall tree structure including a plurality of leaf nodes and non-leaf nodes is constructed according to the model file, and a bounding box of each leaf node of the overall tree structure is calculated, as well as a bounding box of each non-leaf node. When at least one joint of the robot arm rotates, whether a collision occurs between the robot arms is determined by judging whether there are two bounding boxes with overlapping projections. On the one hand, compared with simple shapes such as rectangles and cylinders, bounding boxes can more accurately characterize the geometric shape of the robot arm and improve the precision and accuracy of collision detection. On the other hand, as the angles of the joints of the robot arm change and the robot arm presents different appearance states, the requirements for dynamic collision detection of the movement process of the robot arm can be flexibly met.

[0015] On the basis of the above scheme, a robot arm collision detection method of the present invention can also be improved as follows.

[0016] Furthermore, before determining that the robot arm collides, the method further includes:

[0017] Obtaining a triangular mesh according to the geometric shape of each joint of the robot arm, the geometric shape of each rotation axis, and the geometric shape of the collision obstacle;

[0018] Acquire multiple triangular facets respectively corresponding to each leaf node from the triangular mesh, and determine whether there are any two leaf nodes having an intersection relationship according to the multiple triangular facets respectively corresponding to each leaf node, and obtain a determination result;

[0019] The step of determining that the robot arm collides comprises:

[0020] When the judgment result is yes, it is determined that the robot arm has collided.

[0021] The beneficial effect of adopting the above further scheme is: when it is determined that any two bounding boxes have overlapping projections, multiple triangular facets corresponding to each leaf node are obtained from the triangular mesh, and based on the multiple triangular facets corresponding to each leaf node, it is determined whether there are any two leaf nodes with an intersecting relationship. When the judgment result is yes, it is determined that the robotic arms have collided, further improving the precision and accuracy of collision detection.

[0022] Furthermore, the model file also includes a direction vector of each rotation axis and a three-dimensional coordinate of any point on each rotation axis. Before determining whether there are two bounding boxes with overlapping projections, the following is also included:

[0023] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the bounding box of each leaf node and the bounding box of each non-leaf node corresponding to all rotating joints are updated.

[0024] The beneficial effect of adopting the above further scheme is: based on the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the calculation process of "updating the bounding box of each leaf node and the bounding box of each non-leaf node corresponding to all rotating joints" is greatly simplified, thereby greatly improving the efficiency of collision detection.

[0025] Furthermore, before determining whether there are two leaf nodes having an intersection relationship, the following step is also included:

[0026] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the triangular face of each leaf node corresponding to all rotating joints is updated.

[0027] The beneficial effect of adopting the above further scheme is: based on the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the calculation process of "updating the triangle patch of each leaf node corresponding to all rotating joints" is greatly simplified, thereby greatly improving the efficiency of collision detection.

[0028] Furthermore, the model file also includes a hierarchical relationship corresponding to all joints of the robotic arm, and the overall tree structure including a plurality of leaf nodes and non-leaf nodes is constructed according to the model file, including:

[0029] According to the hierarchical relationship between the joints of the robotic arm, a first tree structure corresponding to the robotic arm is constructed, and according to the collision obstacle, a second tree structure is constructed, and the first tree structure and the second tree structure are combined to obtain an overall tree structure including multiple leaf nodes and non-leaf nodes.

[0030] Furthermore, the process of determining whether any two bounding boxes have overlapping projections includes:

[0031] It is determined whether the projections of any two bounding boxes in the three-dimensional direction have overlapping parts. If so, it is determined that the two bounding boxes have overlapping projections. If not, it is determined that the two bounding boxes do not have overlapping projections.

[0032] The beneficial effects of adopting the above further solution are: the calculation process is simple and the efficiency of collision detection is improved.

[0033] Furthermore, the process of determining whether any two leaf nodes have an intersection relationship includes:

[0034] Using the separating axis method, determine whether there is a separating surface between each triangular facet of any two leaf nodes and each triangular facet of the other leaf node. If so, the two leaf nodes do not have an intersecting relationship. If not, the two leaf nodes have an intersecting relationship.

[0035] The beneficial effects of adopting the above further solution are: the calculation process is simple and the efficiency of collision detection is improved.

[0036] The technical solution of a robot arm collision detection system of the present invention is as follows:

[0037] It includes a physical modeling module, a tree structure building module, a calculation module and a determination module;

[0038] The physical modeling module is used to perform physical modeling on the collision scene between the robot arm and the surroundings of the robot arm to obtain a model file;

[0039] The tree structure construction module is used to construct an overall tree structure including a plurality of leaf nodes and non-leaf nodes according to the model file, wherein the leaf nodes represent the geometric shapes of the joints of the manipulator, the geometric shapes of the rotation axes and / or the geometric shapes of the collision obstacles in the collision scene obtained from the model file, and the non-leaf nodes represent labels;

[0040] The calculation module is used to calculate the bounding box of each leaf node of the overall tree structure, and calculate the bounding box of each non-leaf node, and the bounding box of any non-leaf node refers to the union of the bounding boxes of all child nodes of the non-leaf node;

[0041] The determination module is used to: when at least one joint of the robotic arm rotates, when it is determined that any two bounding boxes have overlapping projections, determine that the robotic arms have collided; when no projection overlap exists between any two bounding boxes, determine that the robotic arms have not collided.

[0042] The beneficial effects of a robot arm collision detection system of the present invention are as follows:

[0043] First, a collision scene between a robot arm and its surroundings is physically modeled, and then an overall tree structure including a plurality of leaf nodes and non-leaf nodes is constructed according to the model file, and a bounding box of each leaf node of the overall tree structure is calculated, as well as a bounding box of each non-leaf node. When at least one joint of the robot arm rotates, whether a collision occurs between the robot arms is determined by judging whether there are two bounding boxes with overlapping projections. On the one hand, compared with simple shapes such as rectangles and cylinders, bounding boxes can more accurately characterize the geometric shape of the robot arm and improve the precision and accuracy of collision detection. On the other hand, as the angles of the joints of the robot arm change and the robot arm presents different appearance states, the requirements for dynamic collision detection of the movement process of the robot arm can be flexibly met.

[0044] A storage medium of the present invention stores instructions, and when a computer reads the instructions, the computer executes any one of the above-mentioned robot arm collision detection methods.

[0045] A robotic arm of the present invention comprises a processor and the above-mentioned storage medium, and the processor executes instructions in the storage medium. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of a process flow of a robot arm collision detection method according to an embodiment of the present invention;

[0047] Figure 2 It is a schematic diagram of the structure of the robotic arm;

[0048] Figure 3 It is a schematic diagram of the overall structure tree;

[0049] Figure 4 Schematic diagram of the separation surface between two triangular facets;

[0050] Figure 5 A schematic structural diagram of a robot arm collision detection system according to an embodiment of the present invention; DETAILED DESCRIPTION

[0051] like Figure 1 As shown, a robot arm collision detection method according to an embodiment of the present invention comprises the following steps:

[0052] S1. Physical modeling, specifically: performing physical modeling on a collision scene between a robot arm and its surroundings to obtain a model file;

[0053] S2. Constructing an overall tree structure, specifically: constructing an overall tree structure including a plurality of leaf nodes and non-leaf nodes according to the model file, wherein the leaf nodes represent the geometric shapes of the joints of the manipulator, the geometric shapes of the rotation axis and / or the geometric shapes of the collision obstacles in the collision scene obtained from the model file, and the non-leaf nodes represent labels;

[0054] S3, calculating the bounding box, specifically: calculating the bounding box of each leaf node of the overall tree structure, and calculating the bounding box of each non-leaf node, the bounding box of any non-leaf node refers to the union of the bounding boxes of all child nodes of the non-leaf node;

[0055] S4, collision detection, specifically: when at least one joint of the robotic arm rotates, when it is determined that any two bounding boxes have overlapping projections, it is determined that the robotic arm has collided; when no two bounding boxes have overlapping projections, it is determined that the robotic arm has not collided.

[0056] First, a collision scene between a robot arm and its surroundings is physically modeled, and then an overall tree structure including a plurality of leaf nodes and non-leaf nodes is constructed according to the model file, and a bounding box of each leaf node of the overall tree structure is calculated, as well as a bounding box of each non-leaf node. When at least one joint of the robot arm rotates, whether a collision occurs between the robot arms is determined by judging whether there are two bounding boxes with overlapping projections. On the one hand, compared with simple shapes such as rectangles and cylinders, bounding boxes can more accurately characterize the geometric shape of the robot arm and improve the precision and accuracy of collision detection. On the other hand, as the angles of the joints of the robot arm change and the robot arm presents different appearance states, the requirements for dynamic collision detection of the movement process of the robot arm can be flexibly met.

[0057] Among them, a three-dimensional modeling tool such as 3D MAX or Unity3D is used to physically model the collision scene of the robot arm and its surroundings, that is, to establish the precise geometric shape of the robot arm and the collision scene around it. In other words, the model file includes the geometric shape of the joints of the robot arm, the geometric shape of the rotation axis and / or the geometric shape of the collision obstacles (not shown) in the collision scene.

[0058] It can be understood that the size of the collision scene around the robotic arm can be determined according to actual conditions. Generally, the area enclosed by the farthest position that the robotic arm can reach in the 360° direction is selected as the surrounding collision scene. In this way, the robotic arm will not collide with collision obstacles outside the collision scene, that is, no collision will occur outside the collision scene, providing safety protection for the control of the robotic arm.

[0059] by Figure 2 The robot arm in is taken as an example to illustrate, specifically: the robot arm includes a base 1 and four joints, the joint on the base 1 is taken as the first joint 2, and the other joints are marked in sequence as the second joint 4, the third joint 6 and the fourth joint 8, there is a first rotation axis 3 between the first joint 2 and the second joint 4, there is a second rotation axis 5 directly between the second joint 4 and the third joint 6, there is a fourth joint 8 axis between the third joint 6 and the fourth joint 8, and the fourth joint 8 is also connected to a fourth rotation axis 9; then, the geometric shape of the robot arm specifically includes: the geometric shape of the four joints and the geometric shape of the four rotation axes. When there are collision obstacles in the surrounding collision scene, the model file includes the geometric shape of the joints of the robot arm, the geometric shape of the rotation axes and / or the geometric shape of the collision obstacles in the collision scene.

[0060] The model file also includes the hierarchical relationship corresponding to all joints of the robotic arm. In the three-dimensional modeling tool, each joint of the robotic arm is decomposed, and the hierarchical relationship between the joints is established using the Group method. The overall tree structure including multiple leaf nodes and non-leaf nodes is constructed according to the model file, including:

[0061] According to the hierarchical relationship between the joints of the robotic arm, a first tree structure corresponding to the robotic arm is constructed, and according to the collision obstacle, a second tree structure is constructed, and the first tree structure and the second tree structure are combined to obtain an overall tree structure including multiple leaf nodes and non-leaf nodes.

[0062] The parent-child relationship between nodes in the overall tree structure is constructed based on the joint hierarchy information in physical modeling. Figure 3 As shown in the figure, the collision scene tree structure includes two non-leaf nodes, "mechanical arm" and "collision barrier". The child nodes of the non-leaf node "mechanical arm" include 4 non-leaf nodes, corresponding to Figure 2 The four joints of the robot arm; the "collision obstacle" sub-node corresponds to the three-dimensional model of the obstacle scene that needs to be detected for collision with the robot arm. In physical modeling, it can be grouped according to the specific circumstances of the obstacle scene to form its own node hierarchy and obtain the second tree structure.

[0063] The hierarchical relationship of all joints can be understood as follows: each joint has one degree of freedom. When the fourth joint 8 rotates a certain angle, the fourth rotation axis 9 rotates a certain angle; when the third joint 6 rotates a certain angle, the third rotation axis 7 rotates a certain angle, and drives the fourth rotation axis 9 to rotate a certain angle. When the second joint 4 rotates a certain angle, the second rotation axis 5, the third rotation axis 7 and the fourth rotation axis 9 rotate a certain angle. When the first joint 2 rotates a certain angle, the first rotation axis 3, the second rotation axis 5, the third rotation axis 7 and the fourth rotation axis 9 rotate a certain angle. Thus, the first tree structure corresponding to the robot arm is constructed. Figure 3 As shown, specifically:

[0064] Figure 3 In the figure, the box represents a non-leaf node, the non-leaf node represents a label, and the label can be defined according to the actual situation. The circle represents a leaf node, wherein the first leaf node 15 represents the geometric shape of the base 1 of the robot arm, the second leaf node 16 represents the geometric shape of the first joint 2, the third leaf node 17 represents the geometric shape of the second joint 4, the fourth leaf node 18 represents the geometric shape of the third joint 6, the fifth leaf node 19 represents the geometric shape of the fourth joint 8, the first non-leaf node 10 connects the first leaf node 15, the second non-leaf node 11 connects the second leaf node 16, the third non-leaf node 12 connects the third leaf node 17, and the fourth non-leaf node 1 3 is connected to the fourth leaf node 18, and the fifth non-leaf node 14 is connected to the fifth leaf node 19, wherein the first non-leaf node 10 is defined as a "mechanical arm", the second non-leaf node 11 is defined as a "first joint", the third non-leaf node 12 is defined as a "second joint", the fourth non-leaf node 13 is defined as a "third joint", and the fifth non-leaf node 14 is defined as a "fourth joint". It can be understood that "mechanical arm", "first joint", "second joint", "third joint" and "fourth joint" act as labels, which are different from the real robotic arm, the first joint 2, the second joint 4, the third joint 6 and the fourth joint 8.

[0065] The bounding box of a leaf node and the bounding box of a non-leaf node are described using the following examples, specifically:

[0066] 1) The bounding box of the second leaf node 16 is the bounding box of the first joint 2. From the overall tree structure, it can be seen that all child nodes of the second non-leaf node 11 include the second leaf node 16, the third leaf node 17, the fourth leaf node 18, the fifth leaf node 19, and the geometric shape of each rotation axis. Then the bounding box of the second non-leaf node 11 is: the bounding box of the second leaf node 16, the bounding box of the third leaf node 17, the bounding box of the fourth leaf node 18, the bounding box of the fifth leaf node 19 and the union of the bounding boxes of the geometric shape of each rotation axis. It can also be understood that the bounding box of the second non-leaf node 11 is: the bounding box of the geometric shape of the first joint 2, the bounding box of the geometric shape of the first rotation axis 3, the bounding box of the geometric shape of the second joint 4, the bounding box of the geometric shape of the second rotation axis 5, the bounding box of the geometric shape of the third joint 6, the bounding box of the geometric shape of the third rotation axis 7, the bounding box of the geometric shape of the fourth joint 8 and the union of the bounding box of the geometric shape of the fourth rotation axis 9;

[0067] 2) The bounding box of the third leaf node 17 is the bounding box of the first joint 2. From the overall tree structure, it can be seen that all child nodes of the third non-leaf node 12 include the third leaf node 17, the fourth leaf node 18, the fifth leaf node 19, and the geometric shape of the second rotation axis 5, the geometric shape of the third rotation axis 7 and the geometric shape of the fourth rotation axis 9. Then the bounding box of the third non-leaf node 12 is: the bounding box of the third leaf node 17, the bounding box of the fourth leaf node 18, the bounding box of the fifth leaf node 19 and the union of the bounding box of the geometric shape of the second rotation axis 5, the bounding box of the geometric shape of the third rotation axis 7 and the bounding box of the geometric shape of the fourth rotation axis 9. It can also be understood that the bounding box of the second non-leaf node 11 is: the union of the bounding box of the geometric shape of the second joint 4, the bounding box of the geometric shape of the second rotation axis 5, the bounding box of the geometric shape of the third joint 6, the bounding box of the geometric shape of the third rotation axis 7, the bounding box of the geometric shape of the fourth joint 8 and the bounding box of the geometric shape of the fourth rotation axis 9;

[0068] Specifically, a bounding box algorithm such as AABB bounding box, bounding sphere, directional bounding box OBB and fixed-directional convex hull FDH is used to calculate the bounding box of each leaf node, that is, to calculate the bounding box of the geometric shape of the joint of the robot arm, the bounding box of the geometric shape of the rotation axis and / or the bounding box of the geometric shape of the collision obstacle in the collision scene.

[0069] The process of determining whether any two bounding boxes have overlapping projections includes:

[0070] Determine whether the projections of any two bounding boxes in the three-dimensional direction have overlapping parts. If so, it is determined that the two bounding boxes have overlapping projections. If not, it is determined that the two bounding boxes do not have overlapping projections. The calculation process is simple and improves the efficiency of collision detection. Take any two bounding boxes as an example for explanation:

[0071] The two bounding boxes are marked as the first bounding box and the second bounding box. The first bounding box is projected in three directions respectively. It can be understood that the projections are made in the x, y, and z directions respectively, and the x-direction projection, y-direction projection, and z-direction projection corresponding to the first bounding box are obtained respectively. Similarly, the second bounding box is projected in three directions respectively, and the x-direction projection, y-direction projection, and z-direction projection corresponding to the second bounding box are obtained respectively. Then:

[0072] 1) When the x-direction projection corresponding to the first bounding box and the x-direction projection corresponding to the second bounding box overlap, and when the y-direction projection corresponding to the first bounding box and the y-direction projection corresponding to the second bounding box overlap, and when the z-direction projection corresponding to the first bounding box and the z-direction projection corresponding to the second bounding box overlap, it is determined that the two bounding boxes have overlapping projections, and it is determined that the robot arms collide;

[0073] 2) When the projections of the first bounding box and the second bounding box in any direction do not overlap, it is determined that there is no projection overlap between the two bounding boxes, and it is determined that the robot arms do not collide.

[0074] Preferably, in the above technical solution, the model file further includes the direction vector of each rotation axis and the three-dimensional coordinates of any point on each rotation axis, and before determining whether there are two bounding boxes with overlapping projections, it also includes:

[0075] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, update the bounding box of each leaf node and the bounding box of each non-leaf node corresponding to all rotating joints, so that any point on any rotation axis, such as the three-dimensional coordinates of the center point (x 0 ,y 0 , z 0 ) is used as an example to illustrate, specifically:

[0076] In physical modeling, each rotation axis defines the movement of the corresponding joint, and the three-dimensional coordinates (x 0 ,y 0 , z 0 ) and the direction vector of the rotation axis (V x , V y , V z ) means, then, since the rotation vector of the rotation axis is (V x , V y, V z ) T , when at least one joint of the robot arm rotates, and drives the rotation axis to rotate, the rotation angle is α, then, let (V x , V y , V z ) T The rotation matrix of the rotation angle α is M, then the three-dimensional coordinates (x 0 ,y 0 , z 0 )The transformed coordinates are calculated as follows: In this way, the geometric shape of the robotic arm is updated. Since the change of the geometric shape of the robotic arm will cause the change of the bounding box, a point is selected on the bounding box to construct the above-mentioned change relationship. The constructed change relationship can simplify the calculation process of "updating the bounding box of each leaf node and the bounding box of each non-leaf node corresponding to all rotating joints" and improve the efficiency of collision detection.

[0077] Preferably, in the above technical solution, before determining that the robot arm collides, the method further includes:

[0078] Obtaining a triangular mesh according to the geometric shape of each joint of the robot arm, the geometric shape of each rotation axis, and the geometric shape of the collision obstacle;

[0079] Acquire multiple triangular facets respectively corresponding to each leaf node from the triangular mesh, and determine whether there are any two leaf nodes having an intersection relationship according to the multiple triangular facets respectively corresponding to each leaf node, and obtain a determination result;

[0080] The step of determining that the robot arm collides comprises:

[0081] When the judgment result is yes, it is determined that the robot arm has collided.

[0082] When it is determined that any two bounding boxes have overlapping projections, multiple triangular facets corresponding to each leaf node are obtained from the triangular mesh, and based on the multiple triangular facets corresponding to each leaf node, it is determined whether there are any two leaf nodes with an intersecting relationship. When the judgment result is yes, it is determined that the robotic arms have collided, further improving the precision and accuracy of collision detection.

[0083] The process of determining whether any two leaf nodes have an intersection relationship includes:

[0084] Using the separating axis method, it is determined whether there is a separating surface between each triangular facet of any two leaf nodes and each triangular facet of the other leaf node. If so, the two leaf nodes do not have an intersecting relationship. If not, the two leaf nodes have an intersecting relationship. Take any two leaf nodes as an example for explanation. Specifically:

[0085] The two leaf nodes are marked as leaf node A' and leaf node B' respectively. Since leaf node A' and leaf node B' are both geometric shapes, leaf node A' and leaf node B' both include multiple triangular facets, that is, multiple triangular facets corresponding to leaf node A' and leaf node B', respectively. Detecting whether leaf node A' and leaf node B' have an intersection relationship is to detect whether each triangular facet of leaf node A' intersects with each triangular facet of leaf node B'. The triangular facet P of leaf node A' and the triangular facet Q of leaf node B' are used as examples for explanation. Specifically:

[0086] The separation axis method is used to detect whether the triangle patch P and the triangle patch Q collide, that is, to detect whether there is a surface that can separate the triangle patch P and the triangle patch Q so that the triangle patch P and the triangle patch Q are located on both sides of the surface respectively. If there is such a surface, that is, the separation surface can separate the triangle patch P and the triangle patch Q, then it is determined that the triangle patch P and the triangle patch Q do not collide; otherwise, it is determined that a collision occurs, which is explained with the following example:

[0087] like Figure 4 As shown, the vertices of triangle patch P are vertex A, vertex B and vertex C, and the vertices of triangle patch Q are vertex D, vertex E and vertex F. Select a triangle, i.e., an edge of a triangle patch and a vertex of another triangle. The plane formed is a possible separation surface. There are 12 possible separation surfaces. Determine whether each possible separation surface separates triangle patch P and triangle patch Q, so as to determine whether the two triangle patches are separated. The algorithm steps for selecting the possible separation surface formed by edge AC and vertex E for determination are as follows:

[0088] 1) Based on the three-dimensional coordinates of edge AC and vertex E, calculate the equations of the faces where vertices A, C, and E are located;

[0089] 2) Substitute the three-dimensional coordinates of vertices B, D and F into the equation of the above surface to determine whether the three vertices are above or below the surface;

[0090] 3) If vertices D and F are located on the same side of the face, and vertex B is located on the other side of the face, then it is determined that the possible separation surface separates the two triangles, that is, the possible separation surface is a separation surface; otherwise, it is determined that the separation surface fails to separate the two triangles.

[0091] Preferably, in the above technical solution, before determining whether there are two leaf nodes having an intersection relationship, the process further includes:

[0092] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the triangular facets of each leaf node corresponding to all rotating joints are updated. The specific process refers to the process of updating the bounding box above, which will not be repeated here.

[0093] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the calculation process of "updating the triangle patch of each leaf node corresponding to all rotating joints" is greatly simplified, thereby greatly improving the efficiency of collision detection.

[0094] The present invention aims at the insufficiency of the existing collision detection between the robot arm and the surrounding environment, and provides a flexible dynamic and accurate collision detection method for the robot arm. By using the method of the present invention, the robot arm can be modeled and the motion state described in an all-round way, and the collision between the robot arm and the surrounding environment can be accurately analyzed, so as to provide safety guarantee for the control of the robot arm.

[0095] According to the structural characteristics of the robotic arm, the present invention uses triangular meshes to accurately represent the robotic arm, and uses a tree structure to establish a dynamic link relationship between the joints of the robotic arm, and forms a hierarchical structure according to the activity relationship between the joints; a coarse-to-fine strategy is adopted, and a bounding box analysis is used to exclude separation structures; after the bounding box is excluded, the remaining units are then accurately detected on the triangular mesh using a separation axis method.

[0096] Due to the adoption of the above technical scheme, the dynamic precise collision detection method for a robot arm of the present invention has strong scalability, high flexibility, and powerful functions, and can well adapt to the structural characteristics of the robot arm to achieve precise collision detection during the dynamic movement of the robot arm.

[0097] Next, another embodiment is used to illustrate a robot arm collision detection method of the present application. First, the robot arm and the surrounding environment are physically modeled to form a model file, which is loaded when the program is initialized later; then, the program reads the model file to form a geometric data structure of the robot arm and the scene, including the entire scene tree structure, component unit triangular mesh, node bounding box, and joint rotation transformation information; finally, a coarse-to-fine strategy is used for collision detection, and a depth-first traversal is performed according to the hierarchy, using node bounding boxes for coarse detection, quickly eliminating most nodes, and then using triangulated meshes for precise detection of the remaining nodes. The triangular meshes that are detected to have collisions are output to the detection results, specifically:

[0098] S20, forming a model file, using a 3D modeling tool to geometrically model the robot arm and the surrounding collision scene to obtain a model file. Specifically, it includes three aspects:

[0099] 1) Geometric shape. Use 3D modeling tools, such as 3D MAX, to perform geometric modeling on the robot arm and the surrounding collision scene, and establish the precise geometric shape of the robot arm and the surrounding collision scene.

[0100] 2) Joint level. The robot arm is composed of several joints, which are connected and fixed on the base 1 in sequence, and there is rotational freedom between the joints. Figure 2 As shown, the first joint 2 is connected to the base 1, and the second joint 4 is connected to the first joint 2. The rotation of the previous joint will drive the movement of the subsequent joint, and the subsequent joint can rotate around the rotation axis relative to the previous joint. Therefore, there is a hierarchical relationship between the joints of the robot arm, with the base 1 being the top layer, the first joint 2 being the next layer, the second joint 4 being the next layer, and the fourth joint 8 being the last layer. In the 3D modeling tool, each joint of the robot arm is decomposed and the hierarchical relationship between the joints is established using the Group method.

[0101] 3) Each rotation axis defines the movement of the corresponding joint. The rotation axis is represented by the three-dimensional coordinates (x 0 ,y 0 , z 0 ) and the direction vector of the rotation axis (V x , V y , V z )express;

[0102] S21. When the program is initialized, the model file is read and the internal data structure is established. This includes the following aspects, specifically:

[0103] 1) Triangular mesh: Get the geometric shape of the robot arm and the collision scene from the model file to get the triangular mesh. The triangular mesh consists of two parts: vertex coordinate array and triangle face array. The vertex coordinates are the three-dimensional coordinates of all vertices of the mesh and are stored in an array. The triangle face saves the serial numbers of the three vertices of the triangle in the vertex coordinate array, indicating which three vertices the triangle face consists of. The serial numbers of the vertices of all triangle face constitute the triangle face array.

[0104] 2) Overall tree structure: In order to represent the joint motion of the robot and to represent complex scenes in blocks for coarse-to-fine collision detection strategy, a tree structure is used to represent three-dimensional objects. Figure 3 The circle in is the most basic geometric unit, representing a specific entity with a triangular mesh; non-leaf nodes are Figure 3 The box in can be understood as a transformation node, corresponding to the transformation of the joint, indicating a rotational degree of freedom, and the child node will be affected by the rotational transformation;

[0105] The parent-child relationship between nodes in the overall tree structure is constructed based on the joint hierarchy information in physical modeling. Figure 3 As shown in the figure, the collision scene tree structure includes two non-leaf nodes, "mechanical arm" and "collision barrier". The node of the non-leaf node "mechanical arm" includes 4 non-leaf nodes, corresponding to Figure 2 The four joints of the robot arm; the "collision obstacle" node corresponds to the three-dimensional model of the obstacle scene that needs to be detected for collision with the robot arm. In physical modeling, it can be grouped according to the specific circumstances of the obstacle scene to form its own hierarchical structure and obtain the second tree structure.

[0106] 3) Bounding box. A bounding box is constructed for each leaf node and non-leaf node in the overall tree structure. The bounding box of any leaf node represents the coordinate range of the leaf node in three directions of space, which is represented by the maximum value of the X axis, the minimum value of the X axis, the maximum value of the Y axis, the minimum value of the Y axis, the maximum value of the Z axis, and the minimum value of the Z axis.

[0107] The bounding box is constructed using a depth-first traversal method. First, the bounding box of the leaf node is calculated based on the 3D grid data of the leaf node; then the bounding box of the non-leaf node is calculated. The bounding box of the non-leaf node is the union of the bounding boxes of all child nodes of the node.

[0108] 4) Joint transformation: The transformation of joints corresponds to the degrees of freedom of the joints of the robot arm. The description of each joint includes the three-dimensional coordinates of the fixed point of the rotation axis and the direction of the rotation vector. The degrees of freedom of all joints are saved in an array.

[0109] S22. Update the joint information of the robot arm according to the angles of each joint of the robot arm, and use a coarse-to-fine strategy to detect the collision between the robot arm and the obstacle environment to obtain the triangular surface position where the two collide. Repeat S22 in a loop to achieve dynamic and accurate collision detection of a section of the robot arm movement process. Specifically:

[0110] 1) Joint angle drive: The joint angle is the rotation angle of the robot arm joint in the current state. Through the rotation of the joint, the robot arm presents different configurations, so that the end of the robot arm reaches the target position. An active joint with rotational freedom corresponds to a non-leaf node in the overall tree structure, and the rotation affects the position state of the child node;

[0111] Suppose the three-dimensional coordinates of any point on the rotation axis, such as the center point, are (x 0 ,y 0 , z 0 ), the direction vector of the rotation axis is (V x , V y , V z ), the rotation angle is α, then, let along (V x , V y , V z )T The rotation matrix of the rotation angle α is M, then the three-dimensional coordinates (x 0 ,y 0 , z 0 )The transformed coordinates are calculated as follows:

[0112] 2) Bounding box rough detection,According to the hierarchy of the overall tree structure, the collision detection between two nodes is performed recursively, as follows:

[0113] First, check whether the bounding boxes of the two nodes collide. If no collision occurs, stop the detection, determine that the two nodes do not collide, and return; if a collision occurs, continue with the following steps.

[0114] Then, if both nodes are leaf nodes, proceed to the triangulation fine detection of the two leaf nodes.

[0115] Recursively perform collision detection between the children of two nodes.

[0116] The process of determining whether any two bounding boxes have overlapping projections includes:

[0117] Determine whether the projections of any two bounding boxes in the three-dimensional direction have overlapping parts. If so, it is determined that the two bounding boxes have overlapping projections. If not, it is determined that the two bounding boxes do not have overlapping projections. For details, see above;

[0118] The process of determining whether any two leaf nodes have an intersection relationship includes:

[0119] Using the separating axis method, determine whether there is a separating surface between each triangular facet of any two leaf nodes and each triangular facet of the other leaf node. If so, the two leaf nodes do not have an intersecting relationship. If not, the two leaf nodes have an intersecting relationship. For details, see above.

[0120] The advantages of a robot arm collision detection method of the present invention are mainly manifested in:

[0121] 1) The setting is simple and flexible. The joints of the robot are defined and described in a text-format configuration file, which realizes the separation of the three-dimensional model and the motion information. The modification of the motion information is more flexible, and the initialization loading is simpler. No third-party software support is required, that is, the text-format configuration file associated with the model file is set for easy configuration; the three-dimensional model refers to the geometric shape of the robot arm and the geometric shape of the collision obstacle, and the motion information refers to: information when at least one joint of the robot arm rotates;

[0122] 2) Dynamic process detection: The robot arm configuration can be controlled through the external robot arm joint angle, and collision detection can be performed between the robot arm in different states and the surrounding environment.

[0123] 3) Accurate collision detection. A coarse-to-fine strategy is adopted to quickly exclude most structures through the bounding box strategy, and the remaining structures are accurately detected using triangular meshes. The bounding box strategy is to determine whether there are two bounding boxes with overlapping projections to determine whether the robot arms collide. It can be understood as: the bounding box strategy is a coarse detection, and the triangular mesh is used to accurately detect the remaining structures, that is, fine detection.

[0124] In the above embodiments, although the steps are numbered S1, S2, etc., these are only specific embodiments given in the present application. Those skilled in the art may adjust the execution order of S1, S2, etc. according to actual conditions, which is also within the scope of protection of the present invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.

[0125] like Figure 5 As shown, a robot arm collision detection system according to an embodiment of the present invention includes a physical modeling module, a tree structure building module, a calculation module and a determination module;

[0126] The physical modeling module is used to perform physical modeling on the collision scene between the robot arm and the surroundings of the robot arm to obtain a model file;

[0127] The tree structure construction module is used to construct an overall tree structure including a plurality of leaf nodes and non-leaf nodes according to the model file, wherein the leaf nodes represent the geometric shapes of the joints of the manipulator, the geometric shapes of the rotation axes and / or the geometric shapes of the collision obstacles in the collision scene obtained from the model file, and the non-leaf nodes represent labels;

[0128] The calculation module is used to calculate the bounding box of each leaf node of the overall tree structure, and calculate the bounding box of each non-leaf node, and the bounding box of any non-leaf node refers to the union of the bounding boxes of all child nodes of the non-leaf node;

[0129] The determination module is used to: when at least one joint of the robotic arm rotates, when it is determined that any two bounding boxes have overlapping projections, determine that the robotic arms have collided; when no projection overlap exists between any two bounding boxes, determine that the robotic arms have not collided.

[0130] Preferably, in the above technical solution, before the determination module determines that the robot arm collides, it is also used to:

[0131] Obtaining a triangular mesh according to the geometric shape of each joint of the robot arm, the geometric shape of each rotation axis, and the geometric shape of the collision obstacle;

[0132] Acquire multiple triangular facets respectively corresponding to each leaf node from the triangular mesh, and determine whether there are any two leaf nodes having an intersection relationship according to the multiple triangular facets respectively corresponding to each leaf node, and obtain a determination result;

[0133] The step of determining that the robot arm collides comprises:

[0134] When the judgment result is yes, it is determined that the robot arm has collided.

[0135] When it is determined that any two bounding boxes have overlapping projections, multiple triangular facets corresponding to each leaf node are obtained from the triangular mesh, and based on the multiple triangular facets corresponding to each leaf node, it is determined whether there are any two leaf nodes with an intersecting relationship. When the judgment result is yes, it is determined that the robotic arms have collided, further improving the precision and accuracy of collision detection.

[0136] Preferably, in the above technical solution, the model file further includes the direction vector of each rotation axis and the three-dimensional coordinates of any point on each rotation axis, and before determining whether there are two bounding boxes with overlapping projections, it also includes:

[0137] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the bounding box of each leaf node and the bounding box of each non-leaf node corresponding to all rotating joints are updated.

[0138] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the calculation process of "updating the bounding box of each leaf node and the bounding box of each non-leaf node corresponding to all rotating joints" is greatly simplified, thereby greatly improving the efficiency of collision detection.

[0139] Preferably, in the above technical solution, before determining whether there are two leaf nodes having an intersection relationship, the process further includes:

[0140] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the triangular face of each leaf node corresponding to all rotating joints is updated.

[0141] According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the calculation process of "updating the triangle patch of each leaf node corresponding to all rotating joints" is greatly simplified, thereby greatly improving the efficiency of collision detection.

[0142] Preferably, in the above technical solution, the model file also includes the hierarchical relationship corresponding to all joints of the robotic arm, and the tree structure building module is specifically used for:

[0143] According to the hierarchical relationship between the joints of the robotic arm, a first tree structure corresponding to the robotic arm is constructed, and according to the collision obstacle, a second tree structure is constructed, and the first tree structure and the second tree structure are combined to obtain an overall tree structure including multiple leaf nodes and non-leaf nodes.

[0144] Preferably, in the above technical solution, the process of determining whether any two bounding boxes have overlapping projections includes:

[0145] It is determined whether the projections of any two bounding boxes in the three-dimensional direction have overlapping parts. If so, it is determined that the two bounding boxes have overlapping projections. If not, it is determined that the two bounding boxes do not have overlapping projections.

[0146] Preferably, in the above technical solution, the process of determining whether any two leaf nodes have an intersection relationship includes:

[0147] Using the separating axis method, determine whether there is a separating surface between each triangular facet of any two leaf nodes and each triangular facet of the other leaf node. If so, the two leaf nodes do not have an intersecting relationship. If not, the two leaf nodes have an intersecting relationship.

[0148] The above-mentioned parameters in a robot arm collision detection system of the present invention and the steps for each unit module to implement the corresponding functions can refer to the parameters and steps in the embodiment of a robot arm collision detection method above, and will not be repeated here.

[0149] A storage medium according to an embodiment of the present invention stores instructions, and when a computer reads the instructions, the computer executes a robot arm collision detection method according to any one of the above embodiments.

[0150] A robotic arm according to an embodiment of the present invention comprises a processor and the above-mentioned storage medium, wherein the processor executes instructions in the storage medium.

[0151] Those skilled in the art will appreciate that the present invention may be implemented as a system, method or computer program product.

[0152] Therefore, the present disclosure may be specifically implemented in the following forms, namely: it may be completely hardware, it may be completely software (including firmware, resident software, microcode, etc.), or it may be a combination of hardware and software, generally referred to herein as a "circuit", "module" or "system". In addition, in some embodiments, the present invention may also be implemented in the form of a computer program product in one or more computer-readable media, and the computer-readable medium contains computer-readable program code.

[0153] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, device, or device.

[0154] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A robot arm collision detection method, characterized in that: include: Performing physical modeling on the collision scene between the robot arm and the surroundings of the robot arm to obtain a model file; Constructing an overall tree structure including a plurality of leaf nodes and non-leaf nodes according to the model file, wherein the leaf nodes represent the geometric shapes of the joints of the manipulator, the geometric shapes of the rotation axes and / or the geometric shapes of the collision obstacles in the collision scene obtained from the model file, and the non-leaf nodes represent labels; Calculate the bounding box of each leaf node of the overall tree structure, and calculate the bounding box of each non-leaf node, where the bounding box of any non-leaf node refers to the union of the bounding boxes of all child nodes of the non-leaf node; When at least one joint of the robotic arm rotates, when it is determined that any two bounding boxes have overlapping projections, it is determined that the robotic arm has collided, and when no two bounding boxes have overlapping projections, it is determined that the robotic arm has not collided; The model file also includes the direction vector of each rotation axis and the three-dimensional coordinates of any point on each rotation axis. Before determining whether there are two bounding boxes with overlapping projections, it also includes: According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, update the bounding box of each leaf node and the bounding box of each non-leaf node corresponding to all rotating joints; In physical modeling, each rotation axis defines the movement of the corresponding joint, using the three-dimensional coordinates (x0, y0, z0) of any point on the rotation axis and the direction vector (V x ,V y ,V z ) means, then, since the rotation vector of the rotation axis is (V x ,V y ,V z ) T , when at least one joint of the robot arm rotates, and drives the rotation axis to rotate, the rotation angle is α, then, let along (V x ,V y ,V z ) T The rotation matrix of the rotation angle α is M, and the coordinates of the three-dimensional coordinates (x0, y0, z0) after transformation are calculated as follows: Implementing an update of the geometric shape of the robotic arm; before determining that the robotic arm collides, the method further includes: Obtaining a triangular mesh according to the geometric shape of each joint of the robot arm, the geometric shape of each rotation axis, and the geometric shape of the collision obstacle; Acquire multiple triangular facets respectively corresponding to each leaf node from the triangular mesh, and determine whether there are any two leaf nodes having an intersection relationship according to the multiple triangular facets respectively corresponding to each leaf node, and obtain a determination result; The step of determining that the robot arm collides comprises: When the judgment result is yes, it is determined that the robot arm has collided; The process of determining whether any two leaf nodes have an intersection relationship includes: Using the separating axis method, determine whether there is a separating surface between each triangular facet of any two leaf nodes and each triangular facet of the other leaf node. If so, the two leaf nodes do not have an intersecting relationship. If not, the two leaf nodes have an intersecting relationship. The vertices of triangle patch P are vertex A, vertex B and vertex C, and the vertices of triangle patch Q are vertex D, vertex E and vertex F. Select a triangle, i.e. an edge of a triangle patch and a vertex of another triangle. The plane formed is a possible separation surface. There are 12 possible separation surfaces. Determine whether each possible separation surface separates triangle patch P and triangle patch Q, so as to determine whether the two triangle patches are separated. The algorithm steps for selecting the possible separation surface formed by edge AC and vertex E for judgment are as follows: 1) Based on the three-dimensional coordinates of edge AC and vertex E, calculate the equations of the faces where vertices A, C, and E are located; 2) Substitute the three-dimensional coordinates of vertices B, D and F into the equations of the faces where vertices A, C and E are located, and determine whether the three vertices are above or below the face; 3) If vertices D and F are located on the same side of the face, and vertex B is located on the other side of the face, then it is determined that the possible separation surface separates the two triangles, that is, the possible separation surface is a separation surface; otherwise, it is determined that the separation surface fails to separate the two triangles.

2. A robot arm collision detection method according to claim 1, characterized in that: Before judging whether there are two leaf nodes with an intersection relationship, the following is also included: According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, the triangular face of each leaf node corresponding to all rotating joints is updated.

3. A robot arm collision detection method according to any one of claims 1 to 2, characterized in that: The model file also includes the hierarchical relationship corresponding to all joints of the robotic arm, and the overall tree structure including multiple leaf nodes and non-leaf nodes is constructed according to the model file, including: According to the hierarchical relationship between the joints of the robotic arm, a first tree structure corresponding to the robotic arm is constructed, and according to the collision obstacle, a second tree structure is constructed, and the first tree structure and the second tree structure are combined to obtain an overall tree structure including multiple leaf nodes and non-leaf nodes.

4. A robot arm collision detection method according to any one of claims 1 to 2, characterized in that: The process of determining whether any two bounding boxes have overlapping projections includes: It is determined whether the projections of any two bounding boxes in the three-dimensional direction have overlapping parts. If so, it is determined that the two bounding boxes have overlapping projections. If not, it is determined that the two bounding boxes do not have overlapping projections.

5. A robot arm collision detection system, characterized in that: It includes a physical modeling module, a tree structure building module, a calculation module and a determination module; The physical modeling module is used to perform physical modeling on the collision scene between the robot arm and the surroundings of the robot arm to obtain a model file; The tree structure construction module is used to construct an overall tree structure including a plurality of leaf nodes and non-leaf nodes according to the model file, wherein the leaf nodes represent the geometric shapes of the joints of the manipulator, the geometric shapes of the rotation axes and / or the geometric shapes of the collision obstacles in the collision scene obtained from the model file, and the non-leaf nodes represent labels; The calculation module is used to calculate the bounding box of each leaf node of the overall tree structure, and calculate the bounding box of each non-leaf node, and the bounding box of any non-leaf node refers to the union of the bounding boxes of all child nodes of the non-leaf node; The determination module is used to: when at least one joint of the robotic arm rotates, when it is determined that any two bounding boxes have overlapping projections, determine that the robotic arms have collided, and when no two bounding boxes have overlapping projections, determine that the robotic arms have not collided; Before the determining module determines that the mechanical arm collides, the determining module is further used to: Obtaining a triangular mesh according to the geometric shape of each joint of the robot arm, the geometric shape of each rotation axis, and the geometric shape of the collision obstacle; Acquire multiple triangular facets respectively corresponding to each leaf node from the triangular mesh, and determine whether there are any two leaf nodes having an intersection relationship according to the multiple triangular facets respectively corresponding to each leaf node, and obtain a determination result; The step of determining that the robot arm collides comprises: When the judgment result is yes, it is determined that the robot arm has collided; The model file also includes the direction vector of each rotation axis and the three-dimensional coordinates of any point on each rotation axis. Before determining whether there are two bounding boxes with overlapping projections, it also includes: According to the direction vector of each rotation axis corresponding to all rotating joints and the three-dimensional coordinates of any point on each rotation axis, update the bounding box of each leaf node and the bounding box of each non-leaf node corresponding to all rotating joints; In physical modeling, each rotation axis defines the movement of the corresponding joint, using the three-dimensional coordinates (x0, y0, z0) of any point on the rotation axis and the direction vector (V x ,V y ,V z ) means, then, since the rotation vector of the rotation axis is (V x ,V y ,V z ) T , when at least one joint of the robot arm rotates, and drives the rotation axis to rotate, the rotation angle is α, then, let (V x ,V y ,V z ) T The rotation matrix of the rotation angle α is M, and the coordinates of the three-dimensional coordinates (x0, y0, z0) after transformation are calculated as follows: Realize the update of the geometric shape of the robot arm; The process of determining whether any two leaf nodes have an intersection relationship includes: Using the separating axis method, determine whether there is a separating surface between each triangular facet of any two leaf nodes and each triangular facet of the other leaf node. If so, the two leaf nodes do not have an intersecting relationship. If not, the two leaf nodes have an intersecting relationship. The vertices of triangle patch P are vertex A, vertex B and vertex C, and the vertices of triangle patch Q are vertex D, vertex E and vertex F. Select a triangle, i.e. an edge of a triangle patch and a vertex of another triangle. The plane formed is a possible separation surface. There are 12 possible separation surfaces. Determine whether each possible separation surface separates triangle patch P and triangle patch Q, so as to determine whether the two triangle patches are separated. The algorithm steps for selecting the possible separation surface formed by edge AC and vertex E for judgment are as follows: 1) Based on the three-dimensional coordinates of edge AC and vertex E, calculate the equations of the faces where vertices A, C, and E are located; 2) Substitute the three-dimensional coordinates of vertices B, D and F into the equations of the faces where vertices A, C and E are located, and determine whether the three vertices are above or below the face; 3) If vertices D and F are located on the same side of the face, and vertex B is located on the other side of the face, then it is determined that the possible separation surface separates the two triangles, that is, the possible separation surface is a separation surface; otherwise, it is determined that the separation surface fails to separate the two triangles.

6. A storage medium, characterized in that: The storage medium stores instructions, and when a computer reads the instructions, the computer executes a robot arm collision detection method as described in any one of claims 1 to 4.

7. A robotic arm, characterized in that: The invention comprises a processor and the storage medium as claimed in claim 6, wherein the processor executes instructions in the storage medium.