Collision detection method and simulation system for industrial robot

By combining particle swarm optimization algorithm and hierarchical bounding box tree, the problems of high computational load and slow speed in collision detection of industrial robots are solved, realizing efficient and fast collision detection, which is suitable for complex simulation scenarios with high real-time requirements.

CN118578394BActive Publication Date: 2026-07-24EAST CHINA UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
EAST CHINA UNIV OF SCI & TECH
Filing Date
2024-06-24
Publication Date
2026-07-24

Smart Images

  • Figure CN118578394B_ABST
    Figure CN118578394B_ABST
Patent Text Reader

Abstract

The application discloses a collision detection method and simulation system of an industrial robot, and belongs to the technical field of robot simulation. The method comprises the following steps: determining a robot simulation model of the industrial robot and a workpiece simulation model of a target workpiece; the robot simulation model comprises a plurality of joints; performing edge point sampling on the target joint and the target workpiece to obtain 2N sampling points; determining M feature points located in a working space according to the 2N sampling points, and taking the positions of the M feature points as initial positions of particles in a particle swarm; each particle is used for representing a potential collision position; taking the sum of distances between each particle and each sampling point as a fitness function, and iteratively updating the particle positions by using a particle swarm optimization algorithm to search for a target point with minimized fitness function; and determining whether a collision occurs according to the fitness value of the target point. The application has smaller calculation data and faster detection speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot simulation technology, and in particular to a collision detection method and simulation system for industrial robots. Background Technology

[0002] During the operation of an industrial robot, path planning is required to ensure that the robot does not collide with obstacles (such as workpieces) in the workspace. Therefore, collision detection is necessary during path planning.

[0003] Collision detection methods in related technologies use triangular facets, line segments, etc., for intersection detection, which is not only computationally intensive but also slow. As robot simulation environments become increasingly complex and the real-time requirements of dynamic simulations become more demanding, existing collision detection methods are no longer sufficient. Therefore, there is an urgent need to provide a more efficient and computationally efficient collision detection method. Summary of the Invention

[0004] This invention provides a collision detection method and simulation system for industrial robots. The technical solution is as follows:

[0005] On the one hand, a collision detection method for an industrial robot is provided, the method comprising:

[0006] Determine the robot simulation model of the industrial robot and the workpiece simulation model of the target workpiece; the robot simulation model includes multiple joints;

[0007] Edge point sampling is performed on the target joint and the target workpiece using robot simulation model and workpiece simulation model to obtain 2N sampling points; N is the number of sampling points in a single simulation model;

[0008] Based on the 2N sampling points, M feature points are determined in the workspace, and the positions of these M feature points are used as the initial positions of the particles in the particle swarm; M is an integer less than N; each particle is used to characterize a potential collision position.

[0009] The sum of the distances of each particle to each sampling point is used as the fitness function, and the particle swarm optimization algorithm is used to iteratively update the particle positions in order to search for the target point that minimizes the fitness function.

[0010] Whether the target joint collides with the target workpiece is determined based on the fitness value corresponding to the target point.

[0011] On the other hand, a simulation system for industrial robots is provided, including:

[0012] A 3D display and interaction module is used to provide a visualized 3D workspace;

[0013] The robot model import module is used to import robot simulation models and workpiece simulation models, and processes them based on the STEP neutral file corresponding to the workpiece simulation model to obtain work task data.

[0014] The path planning module is used to perform collision detection using any of the collision detection methods for industrial robots described above, so as to plan a collision-free path that can meet the work task based on the collision detection results.

[0015] The robot kinematics solving module is used to assemble the robot simulation model and calculate the motion parameters of the industrial robot based on the collision-free path.

[0016] The communication module is used for data exchange with the physical robot.

[0017] On the other hand, a collision detection device for an industrial robot is provided, the device comprising:

[0018] The model determination unit is used to determine the robot simulation model of the industrial robot and the workpiece simulation model of the target workpiece; the robot simulation model includes multiple joints;

[0019] The sampling unit is used to sample the edge points of the target joint and the target workpiece using the robot simulation model and the workpiece simulation model to obtain 2N sampling points; N is the number of sampling points of a single simulation model;

[0020] An iterative search unit is used to determine M feature points in the workspace based on the 2N sampling points, and to use the positions of the M feature points as the initial positions of the particles in the particle swarm; M is an integer less than N; each particle is used to represent a potential collision position; the sum of the distances of each particle to each sampling point is used as the fitness function, and the particle swarm optimization algorithm is used to iteratively update the particle positions to search for the target point that minimizes the fitness function.

[0021] The collision determination unit is used to determine whether the target joint and the target workpiece collide based on the fitness value corresponding to the target point.

[0022] On the other hand, a computer device is provided, the computer device including a memory and a processor, the memory for storing computer programs, and the processor for executing the computer programs stored in the memory to implement the steps of the collision detection method for industrial robots described above.

[0023] On the other hand, a computer-readable storage medium is provided, wherein a computer program is stored therein, and when the computer program is executed by a processor, it implements the steps of the collision detection method for the industrial robot described above.

[0024] On the other hand, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the collision detection method for industrial robots described above.

[0025] The technical solution provided by this invention can bring at least the following beneficial effects: By sampling edge points of the target joint and the target workpiece, and determining M feature points using 2N sampling points, the positions of the M feature points are used as the initial positions of particles in the particle swarm. Each particle is used to represent a potential collision position. The target point, which is the shortest distance to the target joint and the target workpiece, is minimized using the fitness function of the particle swarm optimization algorithm. This allows for the detection of whether a collision has occurred. This technical solution requires less computational data and has a faster detection speed. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart of a collision detection method for an industrial robot according to an embodiment of the present invention;

[0028] Figure 2 This is a structural diagram of a simulation system for an industrial robot provided in one embodiment of the present invention;

[0029] Figure 3 This is a schematic diagram of points extracted from a workpiece simulation model according to an embodiment of the present invention;

[0030] Figure 4 This is a structural diagram of a collision detection device for an industrial robot provided in an embodiment of the present invention;

[0031] Figure 5 This is a hardware architecture diagram of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0033] Please refer to Figure 1 The present invention provides a collision detection method for an industrial robot, the method comprising:

[0034] Step 100: Determine the robot simulation model of the industrial robot and the workpiece simulation model of the target workpiece; the robot simulation model includes multiple joints;

[0035] Step 102: Use the robot simulation model and the workpiece simulation model to sample the edge points of the target joint and the target workpiece to obtain 2N sampling points; N is the number of sampling points in a single simulation model;

[0036] Step 104: Determine M feature points in the workspace based on the 2N sampling points, and use the positions of these M feature points as the initial positions of the particles in the particle swarm; M is an integer less than N; each particle is used to characterize a potential collision position.

[0037] Step 106: The sum of the distances of each particle to each sampling point is used as the fitness function, and the particle swarm optimization algorithm is used to iteratively update the particle positions in order to search for the target point that minimizes the fitness function.

[0038] Step 108: Determine whether the target joint collides with the target workpiece based on the fitness value corresponding to the target point.

[0039] In this embodiment of the invention, edge point sampling is performed on the target joint and the target workpiece, and M feature points are determined using 2N sampling points. The positions of the M feature points are used as the initial positions of particles in the particle swarm. Each particle represents a potential collision location. The target point, which is the shortest distance to the target joint and the target workpiece, is minimized using the fitness function of the particle swarm optimization algorithm. This allows for the detection of whether a collision has occurred. This technical solution requires less computational data and has a faster detection speed.

[0040] The following description Figure 1 The execution method of each step is shown.

[0041] First, steps 100 and 102 will be explained.

[0042] In this embodiment of the invention, the robot simulation model and the workpiece simulation model can be implemented using STL models, point cloud models, etc. Since point cloud models can retain more boundary detail information than STL models, to ensure that the calibration error between the simulation environment and the real environment is reduced to a controllable range, preferably, point cloud models can be used to model the industrial robot and the target workpiece to obtain the robot simulation model and the workpiece simulation model.

[0043] Industrial robots consist of multiple joints, and different joints move differently during operation. Therefore, detecting collisions between the industrial robot and a target workpiece requires individual detection for each joint. Specifically, determining whether a collision has occurred only requires verifying whether their surfaces intersect. This can be achieved by using robot and workpiece simulation models to sample edge points on both the target joint and the workpiece. Each simulation model has N sampling points, resulting in 2N sampling points. N is a positive integer not less than 1.

[0044] It should be noted that when sampling edge points, the sampling interval can be set to ensure that the sampling points can cover the entire edge of the target joint and the target workpiece as much as possible.

[0045] Then, steps 104 to 108 will be explained.

[0046] Traditional methods for accurate collision detection using basic surface elements (such as triangular facets and line segments) require a large number of intersection traversal calculations. In this embodiment of the invention, to reduce the computational load, the collision detection problem is transformed into an optimal solution problem, and the particle swarm optimization algorithm is used to search for the optimal solution, which is the shortest distance between the target joint and the target workpiece.

[0047] When using particle swarm optimization algorithm to implement collision detection, in order to better obtain the surface feature information of the simulation model edge, the initial position of the particles in the particle swarm can be calculated by randomly selecting points from two simulation model sampling points.

[0048] Specifically, when determining M feature points located in the workspace based on 2N sampling points, the process may include: randomly selecting M sampling points from the N sampling points sampled from the target joint, and randomly pairing them one-to-one with the M sampling points randomly selected from the N sampling points sampled from the target workpiece, resulting in M ​​pairs; determining the midpoint between the two sampling points in each pair, and using the resulting M midpoints as feature points. The positions of these M feature points are used as the initial positions of particles in the particle swarm, thus each particle is used to characterize a potential collision location; M is a positive integer less than N.

[0049] For example, if N is 100 and M is 10, then 10 sampling points are randomly selected from the 100 sampling points of the target joint, and paired one-to-one with 10 sampling points randomly selected from the 100 sampling points of the target workpiece. This pairing method is also random, resulting in 10 pairs. The midpoint of the two sampling points in each pair is calculated to obtain the feature point. In other words, the particle swarm includes 10 particles, and the initial position of each particle is the position of the 10 feature points.

[0050] When using the particle swarm optimization algorithm to search for the shortest distance between the target joint and the target workpiece, the sum of the distances from each particle to each sampling point is used as the fitness function, which is shown in the following formula:

[0051]

[0052] Where (x,y,z) represents the coordinate position of a three-dimensional point in the workspace, (x... i ,y i ,z i ) represents the coordinate position of the i-th sampling point among 2N sampling points.

[0053] The particle swarm optimization algorithm is used to iteratively update the particle positions in order to search for the target point that minimizes the fitness function. The optimization objective of the particle swarm optimization algorithm is: Minmized(x,y,z).

[0054] The implementation process of the particle swarm optimization algorithm is briefly explained below.

[0055] S1. After initialization, the position of the feature point is used as the initial position of the particles in the particle swarm, and the velocity of the particles is randomly initialized.

[0056] S2. Calculate the fitness value of each particle according to the fitness function, and record the global optimal position as the current position of each particle.

[0057] S3. Update the velocity and position of each particle;

[0058] S4. Calculate the individual optimal position and the global optimal position based on the updated position;

[0059] S5. If the number of iterations has not reached the set number of iterations T, then return to execute S3 to enter the next iteration. If the number of iterations has reached the set number of iterations T, then the global optimal position is taken as the target point.

[0060] In this embodiment of the invention, step 108 specifically includes: dividing the fitness value corresponding to the target point by N to obtain the shortest distance between the target joint and the target workpiece; determining whether the shortest distance is greater than a collision threshold; if it is greater, determining that the target joint and the target workpiece have not collided; otherwise, determining that the target joint and the target workpiece have collided.

[0061] The shortest distance is: D = d min / N.

[0062] The collision threshold is a set safe distance. If the shortest distance is less than the safe distance, it indicates that a collision has occurred.

[0063] Collision detection using the particle swarm optimization algorithm is faster than collision detection based on triangular facets and point-to-point traversal. The comparison results of detection times are shown in the table below:

[0064] Table 1:

[0065]

[0066] Based on the above comparative analysis, the collision detection method based on particle swarm optimization algorithm in this scheme requires fewer units to be detected, resulting in less computation and a shorter detection time. Furthermore, compared to triangular facet and point-to-point traversal methods, this scheme more easily obtains the actual distance between the target joint and the target workpiece, facilitating manual control of the collision threshold during practical simulations and thus improving flexibility.

[0067] Collision detection based on particle swarm optimization is a precise collision detection method. In one embodiment of this invention, to improve detection speed, a coarse collision detection can be performed before precise collision detection. This coarse collision detection method can perform intersection detection using a hierarchical bounding box tree. While hierarchical bounding box trees composed of single bounding boxes can perform collision detection in collision detection algorithms, they all have their own drawbacks, and their performance is not ideal for complex virtual simulations and scenarios with high real-time requirements. Therefore, in complex applications such as robot simulation with high real-time requirements, a hybrid bounding box structure that better suits complex dynamic simulations needs to be adopted on top of hierarchical bounding box technology to improve performance.

[0068] Specifically, a coarse collision detection can be performed before step 102 as follows:

[0069] Step A1: Construct a hierarchical bounding box tree for the target joint and the target workpiece; the hierarchical bounding box tree includes at least bounding spheres and directional bounding boxes;

[0070] Step A2: Determine whether the bounding sphere of the target joint intersects with the bounding sphere of the target workpiece; if the bounding spheres intersect, proceed to step A3; if the bounding spheres do not intersect, determine that the target joint and the target workpiece have not collided.

[0071] Step A3: Further determine whether the orientation bounding box of the target joint intersects with the orientation bounding box of the target workpiece; if the orientation bounding boxes intersect, then perform edge point sampling of the target joint and the target workpiece using the robot simulation model and the workpiece simulation model (step 102); if the orientation bounding boxes do not intersect, then determine that the target joint and the target workpiece have not collided.

[0072] The bounding sphere is constructed with the midpoint of the simulation model (either the simulation model of the target joint or the simulation model of the target workpiece) as its center and the distance from the farthest point in the simulation model to the center as its radius. Therefore, the bounding sphere is a large sphere that completely surrounds the simulation model, encompassing a wide sensing area. If the bounding spheres of the target joint and the target workpiece do not intersect, then the target joint and the target workpiece definitely do not intersect. If the bounding spheres intersect, due to the large coverage area of ​​the bounding spheres, the target joint and the target workpiece may or may not intersect, requiring further confirmation.

[0073] The Oriented Bounding Box (OBB) is constructed using the mean of the simulation model as its center, the solved mutually perpendicular intersecting feature vectors as its coordinate system, and the projection of the simulation model onto the coordinate system to determine its size. The OBB's sensing range covers the simulation model, but is smaller than that of the bounding sphere. By performing intersection detection on the OBBs, the accuracy of collision detection results can be further improved. Assuming the bounding spheres intersect, if the OBBs of the target joint and the target workpiece do not intersect, then the target joint and the target workpiece definitely do not intersect. If the OBBs intersect, it is still impossible to accurately determine whether the target joint and the target workpiece intersect; further confirmation is required. This further confirmation can be achieved through collision detection based on the particle swarm optimization algorithm in this embodiment of the invention.

[0074] If no collision occurs during operation, collisions can be quickly detected using bounding spheres or directional bounding boxes without the need for detailed collision detection, thus improving collision detection speed.

[0075] Furthermore, if the directional bounding boxes intersect, the calculation accuracy can be further improved before proceeding to fine collision detection (step 102) by the following methods:

[0076] The hierarchical bounding box tree also includes axis-aligned bounding boxes;

[0077] Further, it is determined whether the axis-aligned bounding box of the target joint intersects with the axis-aligned bounding box of the target workpiece. If the axis-aligned bounding boxes intersect, then when performing edge point sampling of the target joint and the target workpiece using the robot simulation model and the workpiece simulation model, edge point sampling is performed on the intersection area of ​​the axis-aligned bounding boxes of the target joint and the target workpiece. It can be understood that if the axis-aligned bounding boxes do not intersect, it is determined that the target joint and the target workpiece have not collided.

[0078] Axis-aligned bounding boxes (AABBs) are more refined bounding boxes than bounding spheres and orientation bounding boxes. Axis-aligned bounding boxes can divide the simulation model into four regions. By detecting the intersection of axis-aligned bounding boxes, if they intersect, the intersection region can be determined, thereby narrowing down the area for fine collision detection.

[0079] In this embodiment of the invention, by employing a hierarchical bounding box tree (SOA-BVH) of bounding sphere-directed bounding box-axis aligned bounding box, the order of magnitude of point cloud data in the original simulation model can be reduced by 10. 5 The point cloud model is reconstructed into a tree traversal structure combining three types of bounding boxes, which not only saves collision detection time but also reduces the complexity of the model data used for collision detection in the simulation environment.

[0080] Considering that industrial robots typically require a large number of movements such as movement and rotation, this embodiment of the invention, to better fit the robot simulation scenario, adopts a method combining robot kinematics to update the BVH tree of each joint of the overall robot. This saves a significant amount of time compared to rebuilding based on a dynamic model or using discrete collision detection algorithms. After the robot undergoes a pose change, the bounding box data can be updated with the bounding box position information of each node using homogeneous coordinate transformation, without the need to rebuild the bounding box.

[0081] This invention also provides a simulation system for an industrial robot; please refer to [link / reference]. Figure 2 The simulation system may include:

[0082] A 3D display and interaction module is used to provide a visualized 3D workspace;

[0083] The robot model import module is used to import robot simulation models and workpiece simulation models, and processes them based on the STEP neutral file corresponding to the workpiece simulation model to obtain work task data.

[0084] The path planning module is used to plan a collision-free path that can meet the work task using any of the industrial robot collision detection methods described in the above embodiments;

[0085] The robot kinematics solving module is used to assemble the robot simulation model and calculate the motion parameters of the industrial robot based on the collision-free path.

[0086] The communication module is used for data exchange with the physical robot.

[0087] The following is about Figure 2 Each module shown will be explained separately.

[0088] I. 3D display and interaction module.

[0089] In this embodiment of the invention, the three-dimensional display interaction module can be implemented based on OCCT (software development platform). This module is the visual foundation of the entire simulation system. It uses OCCT for geometric modeling and visual rendering to provide a visualized three-dimensional workspace for industrial robots. This module also provides interactive operations to perform operations such as scaling, rotating and translating the displayed scene, making it easy to observe the state of the workspace from different angles.

[0090] II. Robot Model Import Module.

[0091] In this embodiment of the invention, the robot model import module is responsible for importing externally designed robot simulation models and workpiece simulation models into the simulation system. It supports various simulation model formats, such as STL files and STEP neutral files. After importing the simulation model into the system, it is necessary to process the simulation model to obtain task data.

[0092] Specifically, when the robot model import module processes the STEP neutral file corresponding to the workpiece simulation model to obtain work task data, it includes the following steps B1-B2:

[0093] Step B1: Read the STEP neutral file corresponding to the workpiece simulation model to extract the point parameters in the workpiece simulation model.

[0094] In this embodiment of the invention, the STEP neutral file is generated according to a set format, so point parameters can be extracted from the STEP neutral file.

[0095] One approach is to extract point parameters from the workpiece simulation model as follows:

[0096] Step B11: Read the STEP neutral file line by line to extract the data segment content from the neutral file, and store each data segment content into a string; wherein, the data segment content stored in the string includes the entity name of the specified keyword;

[0097] The text content of the STEP neutral file can be read using standard C++ file streams, line by line. When "DATA;" is read, it marks the beginning of the neutral file data segment. This allows the data segment content of the neutral file to be extracted and saved into a string for subsequent entity structure processing.

[0098] Furthermore, it is necessary to check whether the extracted string contains entity names with specified keywords (such as "MANIFOLD_SOLID_BREP"). If so, it means that the neutral file uses boundary representation to construct a three-dimensional solid geometric model, which meets the requirements of parameter extraction. Therefore, the data segment content containing entity names with specified keywords is stored in the string for subsequent processing.

[0099] Step B12: Based on the preset splitting keywords, split each string into entity identifier, entity keyword, and entity attribute, and construct the entity structure from the split entity identifier, entity keyword, and entity attribute;

[0100] In this embodiment of the invention, taking the entity representation "#282=VECTOR('NONE',#465,1000.000);" as an example, according to the format specifications of the data segment, "=", "(", ")", and "," are used as delimiters to split the data segment content in the string in step B11 into three parts: entity identifier (#282), entity keyword (VECTOR), and entity attributes (#465 and 1000.000). This information is then stored in "everyEntity" in C++ structure format to construct the entity structure. When a ";" is encountered, the reading continues until "ENDSEC;" is encountered, marking the end of the reading. The entity information of the obtained entity structure is then saved to a Vector container to obtain the entity information collection of the entity structure, which can be named, for example, "entityInformation".

[0101] Step B13: Read the hierarchical structure of each entity structure according to the boundary representation method to extract the point parameters in the workpiece simulation model.

[0102] In this embodiment of the invention, when reading the hierarchical structure sequentially according to the boundary representation method, the reading can be performed in the hierarchical order of SHELL, FACE, LOOP, EDGE, and VERTEX. For the entity information set obtained in step B12, starting with the entity with the entity keyword "CLOSED_SHELL", the high-level face (ADVANCED_FACE) feature in its attributes is read sequentially. Then, the loop attribute of each high-level face is read. For each edge loop (EDGE_LOOP), the directed edge (ORIENTED_EDGE) information that makes up the edge loop is read sequentially. The edge attributes are indexed downwards until the Cartesian point information of each edge is reached and saved, thus completing the extraction of point parameters in the workpiece simulation model. The extraction of point parameters facilitates the design of subsequent tasks and the implementation of path planning.

[0103] Please refer to Figure 3 This is a schematic diagram of the points extracted from the workpiece simulation model. P1-P9 in the diagram are the extracted points.

[0104] Step B2: Obtain the input task data based on the extracted point parameters, and store the task data in the STEP neutral file.

[0105] The task data includes geometric information, material information, process parameters, and management information. Taking welding as an example, the specific task data is as follows:

[0106] Geometric information includes the shape, size, location, and relative positions of the welded components. This information is crucial for determining the welding path and welding sequence. Geometric information is characterized at least through extracted point parameters. When inputting geometric information, the point parameters extracted in step B1 can be used to provide geometric information such as weld points and weld seams. For example, based on the extracted point parameters, the start point of the weld can be determined as P1, and the end point as P7.

[0107] Material information: This includes the type and properties of the workpiece and welding rod materials; material information directly affects the selection of welding methods and the determination of welding parameters such as welding speed, current, and voltage.

[0108] Process parameters include welding current, voltage, and welding speed. These parameters directly affect the quality and efficiency of the welding process. By adjusting these parameters, key factors such as weld pool formation, penetration, and weld quality can be controlled during the welding process.

[0109] Management information includes the creator, time, and identifier of the welding task. This information facilitates the subsequent retrieval, modification, and reuse of welding tasks.

[0110] Among them, management information can be generated by the system, while geometric information, material information, and process parameters can be added manually through interactive operations provided by the 3D display interaction module.

[0111] After obtaining the task data, the task data can be stored in a STEP neutral file so that the point parameters and task data can be obtained directly using the STEP neutral file.

[0112] III. Path Planning Module.

[0113] After determining the task data, the path planning module needs to plan the optimal path from the starting point to the end point of the task. At the same time, it needs to consider various factors such as obstacle avoidance, path length, and path feasibility. The path planning module can use the collision detection method of the industrial robot in the above embodiment to perform collision detection, and plan a collision-free path that can meet the task requirements based on the collision detection results.

[0114] IV. Robot Kinematics Solution Module.

[0115] In this embodiment of the invention, the robot kinematics solving module is responsible for assembling the imported robot simulation model. It can also calculate the motion parameters of each joint of the industrial robot based on the input collision-free path. It consists of a basic calculation module and forward and inverse kinematics solving functions.

[0116] V. Communication Module.

[0117] In this embodiment of the invention, the communication module can exchange data with the physical robot through an effective communication protocol, which facilitates comparison and verification with simulation results, and further verifies the integrity and practicality of the system platform.

[0118] Please refer to Figure 4 This invention provides a collision detection device for an industrial robot, the device comprising:

[0119] The model determination unit is used to determine the robot simulation model of the industrial robot and the workpiece simulation model of the target workpiece; the robot simulation model includes multiple joints;

[0120] The sampling unit is used to sample the edge points of the target joint and the target workpiece using the robot simulation model and the workpiece simulation model to obtain 2N sampling points; N is the number of sampling points of a single simulation model;

[0121] An iterative search unit is used to determine M feature points in the workspace based on the 2N sampling points, and to use the positions of the M feature points as the initial positions of the particles in the particle swarm; M is an integer less than N; each particle is used to represent a potential collision position; the sum of the distances of each particle to each sampling point is used as the fitness function, and the particle swarm optimization algorithm is used to iteratively update the particle positions to search for the target point that minimizes the fitness function.

[0122] The collision determination unit is used to determine whether the target joint and the target workpiece collide based on the fitness value corresponding to the target point.

[0123] In one embodiment of the present invention, when the iterative search unit performs the step of determining M feature points located in the workspace based on the 2N sampling points, it specifically includes:

[0124] M sampling points are randomly selected from the N sampling points obtained from the target joint and randomly paired one-to-one with the M sampling points randomly selected from the N sampling points obtained from the target workpiece to obtain M pairs; the midpoint of the two sampling points in each pair is determined and the M midpoints are used as feature points.

[0125] In one embodiment of the present invention, the collision determination unit is specifically used to: divide the fitness value corresponding to the target point by N to obtain the shortest distance between the target joint and the target workpiece; determine whether the shortest distance is greater than a collision threshold; if it is greater, determine that the target joint and the target workpiece have not collided; otherwise, determine that the target joint and the target workpiece have collided.

[0126] In one embodiment of the present invention, it further includes:

[0127] A bounding box construction unit is used to construct a hierarchical bounding box tree for the target joint and the target workpiece; the hierarchical bounding box tree includes at least a bounding sphere and a directional bounding box.

[0128] An intersection detection unit is used to determine whether the bounding sphere of the target joint intersects with the bounding sphere of the target workpiece; if the bounding spheres intersect, it further determines whether the directional bounding box of the target joint intersects with the directional bounding box of the target workpiece; if the directional bounding boxes intersect, it performs edge point sampling of the target joint and the target workpiece using the robot simulation model and the workpiece simulation model; if the bounding spheres or directional bounding boxes do not intersect, it is determined that the target joint and the target workpiece have not collided.

[0129] In one embodiment of the present invention, the hierarchical bounding box tree further includes axis-aligned bounding boxes;

[0130] If the directional bounding boxes intersect, before performing edge point sampling on the target joint and the target workpiece using the robot simulation model and the workpiece simulation model, the intersection detection unit is further configured to: determine whether the axis-aligned bounding box of the target joint intersects with the axis-aligned bounding box of the target workpiece; if the axis-aligned bounding boxes intersect, then when performing edge point sampling on the target joint and the target workpiece using the robot simulation model and the workpiece simulation model, edge point sampling is performed on the intersection area of ​​the axis-aligned bounding boxes of the target joint and the target workpiece.

[0131] It should be noted that the collision detection device for industrial robots provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the collision detection device for industrial robots provided in the above embodiments and the collision detection method embodiments for industrial robots belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0132] Embodiments of this application also provide a computer device, please refer to... Figure 5 The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, at least one program, code set or instruction set being loaded and executed by the processor to implement the collision detection method for industrial robots provided in the above-described method embodiments.

[0133] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the collision detection method for industrial robots provided in the above-described method embodiments.

[0134] Embodiments of this application also provide a computer program product, which includes a computer program. A processor of a computer device reads the computer program from a computer-readable storage medium and executes the computer program, causing the computer device to perform the collision detection method for an industrial robot as described in any of the above embodiments.

[0135] For ease of description, the above systems or devices are described separately as various modules or units based on their functions. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware components.

[0136] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0137] Finally, it should be noted that in this document, relational terms such as first, second, third, and fourth are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0138] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A collision detection method for an industrial robot, characterized in that, The method includes: Determine the robot simulation model of the industrial robot and the workpiece simulation model of the target workpiece; the robot simulation model includes multiple joints; Edge point sampling is performed on the target joint and the target workpiece using robot simulation model and workpiece simulation model to obtain 2N sampling points; N is the number of sampling points in a single simulation model; Based on the 2N sampling points, M feature points are determined in the workspace, and the positions of these M feature points are used as the initial positions of the particles in the particle swarm; M is an integer less than N; each particle is used to characterize a potential collision position. The sum of the distances of each particle to each sampling point is used as the fitness function, and the particle swarm optimization algorithm is used to iteratively update the particle positions in order to search for the target point that minimizes the fitness function. Whether the target joint collides with the target workpiece is determined based on the fitness value corresponding to the target point.

2. The method according to claim 1, characterized in that, The step of determining the M feature points located in the workspace based on the 2N sampling points includes: M sampling points are randomly selected from the N sampling points obtained from the target joint, and randomly paired one-to-one with the M sampling points randomly selected from the N sampling points obtained from the target workpiece to obtain M pairs; Determine the midpoint between the two sampling points in each pair, and use the resulting M midpoints as feature points.

3. The method according to claim 2, characterized in that, Determining whether the target joint collides with the target workpiece based on the fitness value corresponding to the target point includes: Divide the fitness value corresponding to the target point by N to obtain the shortest distance between the target joint and the target workpiece. Determine whether the shortest distance is greater than a collision threshold. If it is, determine that the target joint and the target workpiece have not collided; otherwise, determine that the target joint and the target workpiece have collided.

4. The method according to claim 1, characterized in that, Before performing edge point sampling on the target joint and the target workpiece using robot simulation models and workpiece simulation models, the following steps are also included: A hierarchical bounding box tree is constructed for the target joint and the target workpiece; the hierarchical bounding box tree includes at least bounding spheres and directional bounding boxes. Determine whether the bounding sphere of the target joint intersects with the bounding sphere of the target workpiece; if the bounding spheres intersect, further determine whether the directional bounding box of the target joint intersects with the directional bounding box of the target workpiece; if the directional bounding boxes intersect, perform edge point sampling on the target joint and the target workpiece using the robot simulation model and the workpiece simulation model; if the bounding spheres or directional bounding boxes do not intersect, determine that the target joint and the target workpiece have not collided.

5. The method according to claim 4, characterized in that, The hierarchical bounding box tree also includes axis-aligned bounding boxes; If the directional bounding boxes intersect, before performing edge point sampling on the target joint and the target workpiece using the robot simulation model and the workpiece simulation model, the method further includes: determining whether the axis-aligned bounding box of the target joint intersects with the axis-aligned bounding box of the target workpiece; if the axis-aligned bounding boxes intersect, then when performing edge point sampling on the target joint and the target workpiece using the robot simulation model and the workpiece simulation model, edge point sampling is performed on the intersection area of ​​the axis-aligned bounding boxes of the target joint and the target workpiece.

6. A simulation system for an industrial robot, characterized in that, include: A 3D display and interaction module is used to provide a visualized 3D workspace; The robot model import module is used to import robot simulation models and workpiece simulation models, and processes them based on the STEP neutral file corresponding to the workpiece simulation model to obtain work task data. The path planning module is used to perform collision detection using the collision detection method of the industrial robot as described in any one of claims 1-5 above, so as to plan a collision-free path that can meet the work task using the collision detection results. The robot kinematics solving module is used to assemble the robot simulation model and calculate the motion parameters of the industrial robot based on the collision-free path. The communication module is used for data exchange with the physical robot.

7. The simulation system according to claim 6, characterized in that, When the robot model import module processes the STEP neutral file corresponding to the workpiece simulation model to obtain work task data, it specifically includes: Read the STEP neutral file corresponding to the workpiece simulation model to extract the point parameters in the workpiece simulation model; The extracted point parameters are used to obtain the input task data, and the task data is stored in a STEP neutral file; the task data includes geometric information, material information, process parameters and management information.

8. The simulation system according to claim 7, characterized in that, The step of reading the STEP neutral file corresponding to the workpiece simulation model and extracting the point parameters in the workpiece simulation model includes: The STEP neutral file is read line by line to extract the data segment content, and each data segment content is stored in a string; wherein the data segment content stored in the string includes the entity name of the specified keyword; Each string is split into entity identifier, entity key and entity attribute according to the preset splitting key, and the entity identifier, entity key and entity attribute obtained are used to construct the entity structure; For each entity structure, the hierarchical structure is read according to the boundary representation method to extract the point parameters in the workpiece simulation model.

9. A collision detection device for an industrial robot, characterized in that, The device includes: The model determination unit is used to determine the robot simulation model of the industrial robot and the workpiece simulation model of the target workpiece; the robot simulation model includes multiple joints; The sampling unit is used to sample the edge points of the target joint and the target workpiece using the robot simulation model and the workpiece simulation model to obtain 2N sampling points; N is the number of sampling points of a single simulation model; An iterative search unit is used to determine M feature points in the workspace based on the 2N sampling points, and to use the positions of the M feature points as the initial positions of the particles in the particle swarm; M is an integer less than N; each particle is used to represent a potential collision position; the sum of the distances of each particle to each sampling point is used as the fitness function, and the particle swarm optimization algorithm is used to iteratively update the particle positions to search for the target point that minimizes the fitness function. The collision determination unit is used to determine whether the target joint and the target workpiece collide based on the fitness value corresponding to the target point.

10. A computer device, characterized in that, The computer device includes a memory and a processor. The memory is used to store computer programs, and the processor is used to execute the computer programs stored in the memory to implement the steps of the method according to any one of claims 1-5.