Robot interference detection method, electronic device, and storage medium
Patent Information
- Application Number
- CN202511458941.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2026-08-28
- Estimated Expiration
- 2045-10-13
AI Technical Summary
[0003]鉴于以上内容,有必要提供一种机器人干涉检测方法、电子设备及存储介质,解决上述人工在机器人程序中插入进入与释放干涉区的信号指令,并在调试过程中人工检查干涉区设置的合理性,导致检查效率低,且容易出错的问题
[0014]本申请实施例提供的机器人干涉检测方法、电子设备及存储介质可以对控制机器人工作的主程序进行分段,并建立程序段落与干涉区编号之间的映射关系,基于映射关系自动检测机器人在执行程序段落进行工作时是否会产生干涉,无需人工检测,有效提高了干涉检测效率和检测精度。
Smart Images

Figure CN120941412B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a robot interference detection method, electronic device, and storage medium. Background Technology
[0002] In industrial manufacturing production lines, multiple industrial robots often need to work collaboratively in adjacent or overlapping spatial areas. To avoid spatial conflicts and collisions during robot movement, the production space is typically divided into multiple interference zones, and signal control is used to ensure that only one robot enters a particular interference zone at a time. Current interference zone management methods mainly rely on manual programming and verification. Humans insert entry and exit signals into the robot program and manually check the rationality of the interference zone settings during debugging. However, manual verification is inefficient and prone to errors. Summary of the Invention
[0003] In view of the above, it is necessary to provide a robot interference detection method, electronic device and storage medium to solve the problem that the above-mentioned manual insertion of signal commands for entering and releasing the interference zone into the robot program, and manual checking of the rationality of the interference zone setting during the debugging process, leads to low inspection efficiency and easy errors.
[0004] In a first aspect, embodiments of this application provide a robot interference detection method, the method comprising: The main programs of multiple robots are analyzed, and each robot's main program is divided into multiple program segments based on interference instructions. Based on the instruction type of the interference instruction, establish a mapping relationship between multiple interference zone numbers and multiple program segments; If the interference zone numbers corresponding to the program segments of the multiple robots are detected to be the same based on the mapping relationship, it is determined that the multiple robots will not interfere with each other during operation.
[0005] In one possible implementation, the main program of multiple robots is parsed, and each robot's main program is divided into multiple program segments based on interference instructions, including: The main program of each robot is parsed to obtain the position data in the main program; Read the offline programming call instruction corresponding to the location data, and divide the main program into the multiple program segments based on whether the offline programming call instruction includes an interference instruction call.
[0006] In one possible implementation, the step of reading the offline programming call instruction corresponding to the location data, and dividing the main program into multiple program segments based on whether the offline programming call instruction includes an interference instruction call, includes: Offline programming call command to read a line of position data; If the offline programming call instruction for the row of location data includes the interference command call, construct the target program based on the row of location data; Add the interference instruction call corresponding to the target program and the call to the target program to the offline programming call instruction of the main program.
[0007] In one possible implementation, establishing a mapping relationship between multiple interference zone numbers and multiple program segments based on the instruction type of the interference instruction includes: The main program is scanned line by line to identify the instruction types related to the interference region; If the instruction type is "enter the interference zone", record the interference zone number entered; If the instruction type is "Release Interference Zone", record the number of the released interference zone; Based on the entered interference zone number and the released interference zone number, a mapping relationship is established between the multiple interference zone numbers and the multiple program segments.
[0008] In one possible implementation, the method further includes: If, based on the mapping relationship, it is detected that the interference zone numbers corresponding to the program segments of the multiple robots are different, it is detected whether the workspaces corresponding to the program segments overlap. If the workspaces corresponding to the program segments do not overlap, it is determined that the multiple robots will not interfere with each other during operation.
[0009] In one possible implementation, detecting whether the workspaces corresponding to the program segments overlap includes: Construct a spatial model of the workspace based on the positional data in the program segment; If the spatial models corresponding to the program segments overlap, it is determined that the workspaces corresponding to the program segments overlap. If the spatial models corresponding to the program segments do not overlap, it is determined that the workspaces corresponding to the program segments do not overlap.
[0010] In one possible implementation, constructing the spatial model of the workspace based on the positional data in the program segment includes: A three-dimensional bounding box or convex hull model of the workspace is constructed based on the position data in the program segment.
[0011] In one possible implementation, the method further includes: If it is determined that the workspaces corresponding to the program segments overlap, it is determined that the multiple robots will interfere with each other during operation, and interference prompt information is output. The interference prompt information includes the position data of the overlapping area and the interference area number.
[0012] Secondly, embodiments of this application provide an electronic device, the electronic device including a memory and a processor: wherein the memory is used to store program instructions; the processor is used to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device performs the above-described robot interference detection method.
[0013] Thirdly, embodiments of this application provide a computer storage medium storing program instructions that, when executed on an electronic device, cause the processor of the electronic device to perform the aforementioned robot interference detection method.
[0014] The robot interference detection method, electronic device, and storage medium provided in this application embodiment can segment the main program controlling the robot's operation and establish a mapping relationship between program segments and interference zone numbers. Based on the mapping relationship, it can automatically detect whether interference will occur when the robot is executing program segments, without the need for manual detection, thus effectively improving the efficiency and accuracy of interference detection. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application 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 only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0016] Figure 1 This is a flowchart of a robot interference detection method provided in an embodiment of this application.
[0017] Figure 2 This is a flowchart of segmenting the main program according to an embodiment of this application.
[0018] Figure 3 This is a flowchart illustrating the mapping relationship between interference zone numbers and program segments provided in one embodiment of this application.
[0019] Figure 4 This is a mapping table between interference zone numbers and program segments provided in one embodiment of this application.
[0020] Figure 5 This is an execution sequence table of interference instructions and ordinary process instructions provided in one embodiment of this application.
[0021] Figure 6 This is a flowchart of interference detection based on mapping relationship provided in an embodiment of this application.
[0022] Figure 7 This is a schematic diagram of the structure of a robot interference detection device provided in an embodiment of this application.
[0023] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0024] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0025] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to limit the application. It should be understood that, unless otherwise stated, " / " in this application means "or". For example, A / B can mean A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. "At least one" refers to one or more. "More than one" refers to two or more. For example, at least one of a, b, or c can represent: a, b, c, a and b, a and c, b and c, and a, b, and c. Where there is no conflict, the following embodiments and features described herein can be combined with each other.
[0026] In industrial manufacturing production lines, multiple industrial robots often need to work collaboratively in adjacent or overlapping spatial areas. To avoid spatial conflicts and collisions during robot movement, the production space is typically divided into multiple interference zones, and signal control is used to ensure that only one robot enters a particular interference zone at a time. Interference refers to the phenomenon where robots experience unexpected spatial overlap or collisions during operation, leading to malfunctions. Current interference zone management methods primarily rely on manual programming and verification. Humans insert entry and release signal commands into the robot program and manually check the rationality of the interference zone settings during debugging. However, manual verification is inefficient and prone to errors. For example, manually analyzing the robot program line by line and judging the pairing and rationality of the interference zone entry / release commands is time-consuming; multiple interference zones may be involved in the same workspace, and manual verification is prone to confusion or omissions; there is a lack of signal protection during the release of one interference zone and entry into the next, posing safety risks; furthermore, different manufacturers use different interference zone signal standards, requiring manual verification to understand each manufacturer's specifications, making it difficult to apply universally.
[0027] To address the issues of low efficiency and high error rate caused by manually inserting signal commands for entering and releasing interference zones into the robot program and manually checking the rationality of the interference zone settings during debugging, this application provides a robot interference detection method. This method can segment the main program that controls the robot's operation and establish a mapping relationship between program segments and interference zone numbers. Based on the mapping relationship, it can automatically detect whether interference will occur when the robot is executing program segments, eliminating the need for manual detection and effectively improving the efficiency and accuracy of interference detection.
[0028] See Figure 1 The diagram shown is a flowchart of a robot interference detection method provided in an embodiment of this application. The robot interference detection method is applied in an electronic device and includes: S101 parses the main programs of multiple robots and divides the main program of each robot into multiple program segments based on interference instructions.
[0029] In one embodiment of this application, under the PDPS (Process Designer & Process Simulator) platform, the robot program is a control program used to control the robot to perform tasks, including a main program and multiple subroutines. The main program is the overall control program for the robot to perform tasks, containing robot motion instructions and OLP (Offline Programming) call instructions. Subroutines are used to implement specific process steps or motion path control, and may contain motion instructions, I / O control instructions, process action instructions, etc. The calling relationship between the main program and subroutines is described by OLP instructions. The main program calls different subroutines based on the task flow to complete processes such as welding, handling, and grinding. After the subroutines are completed, the program returns to the main program to continue executing the next process.
[0030] In one embodiment of this application, the main program of each robot is parsed to obtain position data, such as the coordinates of the robot's motion trajectory points. The offline programming call instructions corresponding to the position data are read, and the main program is divided into multiple program segments based on whether the offline programming call instructions include interference command calls.
[0031] Specifically, the acquired position data is arranged row by row, and the offline programming call instructions for each row are read line by line. For example, when reading the offline programming call instructions for a row of position data, if the offline programming call instructions for that row contain interference command calls, a target program is constructed based on that row of position data. The interference command call corresponding to the target program and the call to the target program are added to the offline programming call instructions of each main program. Then, the next row of position data is parsed. If the offline programming call instructions for that row of position data do not contain interference command calls, the next row of position data is parsed. Each target program is a segmented program, thus allowing the main program of each robot to be divided into multiple program segments.
[0032] See Figure 2 The diagram shown is a flowchart of segmenting the main program according to an embodiment of this application.
[0033] S1011, Read robot program.
[0034] In one embodiment of this application, the robot program is read through the PDPS platform interface or a graphical interface.
[0035] S1012, create a new main program Main, initialize the counter Index=0.
[0036] In one embodiment of this application, the read robot program is copied into a newly created main program, that is, the read robot program is used as the main program, and then the program segment counter Index is initialized to 0.
[0037] S1013, parse the main program, obtain all position data in the main program, record the total number of rows of position data N, and initialize the row counter i=0.
[0038] In one embodiment of this application, all acquired location data are arranged in rows to obtain the total number of rows N of location data.
[0039] S1014, read the OLP instruction information of the i-th row position data.
[0040] S1015, determine whether the OLP instruction information of the i-th row of position data contains an interference instruction call. If the OLP instruction information of the i-th row of position data does not contain an interference instruction call, proceed to S1016; if the OLP instruction information of the i-th row of position data contains an interference instruction call, proceed to S1017.
[0041] In one embodiment of this application, the interference command includes, but is not limited to, an entry into the interference zone command and a release from the interference zone command. It is determined whether the OLP command information of the i-th row of position data contains an entry into the interference zone command and / or a release from the interference zone command. If the OLP command information of the i-th row of position data contains an entry into the interference zone command and / or a release from the interference zone command, it is determined that the OLP command information of the i-th row of position data contains an interference command call. If the OLP command information of the i-th row of position data does not contain either an entry into the interference zone command or a release from the interference zone command, it is determined that the OLP command information of the i-th row of position data does not contain an interference command call.
[0042] S1016, i=i+1, continue parsing the position data of the next row.
[0043] In one embodiment of this application, i is incremented to continue parsing the (i+1)th row position data.
[0044] S1017, Index = Index + 1.
[0045] In one embodiment of this application, if the OLP instruction information of the i-th row position data contains an interference instruction call, the program segment counter is incremented by 1.
[0046] S1018, Name the new program based on the original program name and the current program segment counter.
[0047] In one embodiment of this application, the new program name is <original program name>. <index>For example, if the original program name is "Vehicle Assembly Program" and the current program segment counter is 1, then the new program name is "Vehicle Assembly Program_1".
[0048] S1019, Build a new program based on the position data of the i-th row.
[0049] In one embodiment of this application, the position data of the i-th row and the position data between the previous row containing the interference command call and the i-th row are cut and pasted into a new program to obtain a program segment. For example, if the main program contains the position data of the i-th row and the interference command call of the i-3 row, but does not contain the interference command call of the position data of the i-2 to i-1 rows, then the position data of the i-2 to i-1 rows are cut and pasted into the new program.
[0050] In S1020, an interference instruction call is added to the OLP instructions of the main program, and a new program call is added. Then the flow proceeds to S1016. When i≥N, it is determined that the program segmentation is complete, thus dividing the main program into multiple program segments.
[0051] In one embodiment of this application, when the main program is detected to have called a non-existent subroutine, a prompt message is output to remind the inspector to complete the missing program, thereby ensuring program integrity.
[0052] S102, establish a mapping relationship between multiple interference zone numbers and multiple program segments based on the instruction type of the interference instruction.
[0053] In one embodiment of this application, the main program of each robot is scanned line by line to identify the instruction types related to the interference zone. Instructions related to the interference zone are interference instructions, such as "enter interference zone 1" and "release interference zone 1". If the instruction type is "enter interference zone", the number of the entered interference zone is recorded; if the instruction type is "release interference zone", the number of the released interference zone is recorded; if the instruction is a process action instruction, the corresponding program segment is recorded. Based on the entered interference zone number and the released interference zone number, a mapping relationship is established between multiple interference zone numbers and multiple program segments.
[0054] See Figure 3 The diagram shown is a flowchart illustrating the mapping relationship between interference zone numbers and program segments provided in an embodiment of this application.
[0055] S1021, line-by-line scanning main program.
[0056] S1022 identifies the instruction type of each instruction in the main program.
[0057] S1023, if the instruction type is "Enter Interference Zone Instruction", then record the number of the interference zone entered.
[0058] S1024, if the instruction type is a release interference zone instruction, then record the number of the released interference zone.
[0059] S1025, if the instruction type is a process action instruction, then record the program segment.
[0060] S1026, Based on the number of the entered interference zone, the number of the released interference zone, and the program segment corresponding to the process action instruction, establish a mapping relationship between multiple interference zone numbers and multiple program segments.
[0061] In one embodiment of this application, the interference zone number is a pre-set positive integer, such as 1, 2, 3, etc. The formula for marking the address of the interference zone entry is Addr_enter(N) = 2N – 1, and the formula for marking the address of the interference zone release is Addr_release(N) = 2N. The program addresses for entering and releasing the interference zone are marked using these formulas. For example, if the interference zone number is 1 and the interference zone number is 1, then the address mark for entering the interference zone is 1, and the address mark for releasing the interference zone is 2. Then, based on the interference zone number, the address mark for entering the interference zone, and the address mark for releasing the interference zone, the program segment corresponding to the interference zone number is determined. For example, the program segment corresponding to interference zone 1 is the program between address mark 1 and address mark 2. Then, the same method is used to determine the program segments corresponding to all interference zone numbers in the main program, thereby establishing a mapping relationship between multiple interference zone numbers and multiple program segments. The program segment corresponding to interference zone 1 is determined as the first segment, and so on, to obtain the program segment number corresponding to each interference zone number. A mapping relationship table between multiple interference zone numbers and multiple program segments can be referenced. Figure 4 The mapping table shown.
[0062] In one embodiment of this application, the function corresponding to a program segment can be determined based on the process action instructions. For example, the function corresponding to a program segment may be welding, handling, grinding, etc.
[0063] In one embodiment of this application, interference zone instructions and process action segments appear alternately in the main program execution sequence (e.g., Figure 5 (As shown).
[0064] S103: Based on the mapping relationship, detect whether the interference zone numbers corresponding to the program segments of multiple robots are the same. If the interference zone numbers corresponding to the program segments of multiple robots are the same based on the mapping relationship, the process proceeds to S105; if the interference zone numbers corresponding to the program segments of multiple robots are different based on the mapping relationship, the process proceeds to S104.
[0065] In one embodiment of this application, the interference zone numbers corresponding to each program segment of each robot are compared to determine whether the interference zone numbers are the same.
[0066] S104: Detect whether the workspaces corresponding to the program segments overlap. If the workspaces corresponding to the program segments do not overlap, proceed to S105. If the workspaces corresponding to the program segments overlap, proceed to S105.
[0067] In one embodiment of this application, a spatial model of the corresponding workspace is constructed based on the position data in program segments of multiple robots. If the spatial models corresponding to the program segments overlap, it is determined that the workspaces corresponding to the program segments overlap; if the spatial models corresponding to the program segments do not overlap, it is determined that the workspaces corresponding to the program segments do not overlap. The spatial model of the workspace can be a three-dimensional bounding box or a convex hull model.
[0068] In one embodiment of this application, the position data (i.e., trajectory point coordinates) in the program segment are traversed to determine the minimum and maximum coordinate values in the X, Y, and Z coordinate axes of the spatial coordinate system. The cube formed by the minimum and maximum coordinate values in the X, Y, and Z coordinate axes is the three-dimensional bounding box of the workspace corresponding to the program segment.
[0069] S105, ensuring that multiple robots do not interfere with each other while working.
[0070] In one embodiment of this application, if the workspaces corresponding to program segments do not overlap, it is determined that multiple robots will not interfere with each other when executing the corresponding program segments, i.e., no collision will occur. If the interference zone numbers corresponding to the program segments of multiple robots are the same, the PLC (Programmable Controllers) can be programmed to prevent multiple robots from working simultaneously in the interference zone corresponding to that interference zone number. In this way, multiple robots will not interfere with each other when executing the corresponding program segments. For example, by setting interlock signals and interference zone monitoring, it can be ensured that at most one robot is allowed to enter one interference zone at the same time.
[0071] S106, It is determined that multiple robots will interfere with each other when they are working.
[0072] In one embodiment of this application, if the workspaces corresponding to program segments overlap, it is determined that multiple robots will interfere with each other when executing the corresponding program segments, that is, a collision will occur.
[0073] In one embodiment of this application, if it is determined that multiple robots will interfere during operation, interference warning information is output. The interference warning information includes the position data of the overlapping area and the interference area number, and is used to indicate that the interference area is set incorrectly. By comparing each program segment of each robot in a loop, multiple interference detection results can be obtained.
[0074] See Figure 6 The diagram shown is a flowchart illustrating interference detection based on mapping relationships according to an embodiment of this application. The explanation uses multiple robot programs, including robot program A and robot program B, as an example.
[0075] S201, Obtain all segment information for robot program A and robot program B. Segment information refers to the information of program segments, including, but not limited to: program segment number, trajectory point coordinates, and interference zone number.
[0076] S202, traverse each segment of robot program A and each segment of robot program B.
[0077] S203, obtain program segment i of robot program A and program segment j of robot program B.
[0078] S204, based on the mapping relationship, detect whether the interference zone numbers of program segment i and program segment j are the same. If the interference zone numbers of program segment i and program segment j are the same, the process proceeds to S205; if the interference zone numbers of program segment i and program segment j are different, the process proceeds to S206.
[0079] S205, indicating no risk of interference, meaning that the two robots will not interfere with each other when working based on program segments.
[0080] S206, Entering spatial range detection.
[0081] S207, constructs a 3D bounding box or convex hull model of the workspace based on the coordinates of trajectory points in the program segment.
[0082] S208: Determine whether the workspaces overlap based on the 3D bounding box or convex hull model. If the workspaces do not overlap, proceed to S209; if the workspaces overlap, proceed to S210.
[0083] S209, it is determined that there is no risk of interference, and the interference region corresponding to program segment i and the interference region corresponding to program segment j are compatible.
[0084] S210, output interference warning information, which includes the location data of the overlapping area and the interference zone number. Repeat the above process until all program segments of robot A and robot B are compared pairwise.
[0085] The above embodiments of this application utilize OLP call relationships to automatically distinguish between the main program and subroutines without manual intervention. Based on interference zone mapping and spatial range calculation, efficient interference detection is achieved, thereby enabling rapid and safe verification of multi-robot operations.
[0086] In one embodiment of this application, the program file of the selected robot, including the main program and the subroutines called by the main program, can be read automatically. By traversing the program, information such as motion commands, interference zone entry commands, and interference zone release commands can be extracted.
[0087] In one embodiment of this application, the method further includes: parsing the signal segments of the interference zone according to the manufacturer's communication standard, determining the pairing relationship between the entry and release of the interference zone according to rules (e.g., odd numbers are entry markers and even numbers are release markers), and indicating incomplete settings if a pairing is missing.
[0088] In one embodiment of this application, the method further includes: taking the last motion trajectory point after the interference zone is released as the first motion trajectory point, taking the first motion trajectory point entering the interference zone next as the second motion trajectory point, and calculating the distance between the first motion trajectory point and the second motion trajectory point, which is the Cartesian distance. If the distance between the first motion trajectory point and the second motion trajectory point is greater than a preset safety threshold, inserting a protective motion trajectory point after the release point (i.e., the first motion trajectory point) to ensure that the robot's motion trajectory has no hollow areas.
[0089] In one embodiment of this application, the method further includes: determining whether there is spatial intersection between interference zones based on the robot trajectory range; when a non-intersecting repeated interference zone is detected, outputting a prompt message indicating that the interference zone setting is incorrect, so as to optimize resource allocation.
[0090] This application's embodiments support simultaneous detection of multiple robot programs, identification of conflict relationships in interference zones, and compatibility with signal standards from different manufacturers.
[0091] Based on the above solution, this application embodiment achieves automatic interference zone inspection by integrating a robot interference zone inspection method on the PDPS platform, reducing the need for manual expertise, significantly improving interference detection efficiency and quality, and shortening project cycles. Since different robots use inconsistent standard signals, the backend communication address can be obtained by identifying signal commands, satisfying the standard signal recognition requirements of different manufacturers. When one interference zone number corresponds to two or more robots, these two or more robots can use this interference zone number, while it has no effect on other robots.
[0092] See Figure 7 The diagram shown is a structural schematic of a robot interference detection device according to an embodiment of this application. In one embodiment of this application, the robot interference detection device 200 may include multiple functional modules composed of computer program segments. The computer program segments in the robot interference detection device 200 may be stored in the memory of an electronic device and executed by at least one processor to perform robot interference detection functions.
[0093] In one embodiment of this application, the robot interference detection device 200 can be divided into multiple functional modules according to the functions it performs. The functional modules of the robot interference detection device 200 may include: a partitioning module 201, an establishment module 202, a detection module 203, and a determination module 204. In this embodiment, a module refers to a series of computer program segments that can be executed by at least one processor and perform a fixed function, and are stored in memory.
[0094] The partitioning module 201 is used to parse the main programs of multiple robots and divide the main program of each robot into multiple program segments based on interference instructions.
[0095] The module 202 is used to establish a mapping relationship between multiple interference zone numbers and multiple program segments based on the instruction type of the interference instruction.
[0096] The detection module 203 is used to determine whether the interference zone numbers corresponding to multiple robot program segments are the same based on the mapping relationship.
[0097] The determination module 204 is used to determine that multiple robots will not interfere with each other when they are working, based on the detection of the same interference zone number corresponding to the program segments of multiple robots based on the mapping relationship.
[0098] This application embodiment also provides an electronic device 10, which may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) device, virtual reality (VR) device, artificial intelligence (AI) device, wearable device, in-vehicle device, smart home device and / or smart city device. This application embodiment does not impose any special restrictions on the specific type of electronic device 10.
[0099] See Figure 8 The diagram shown is a hardware structure schematic of an electronic device provided in an embodiment of this application. The robot interference detection method provided in this embodiment is applied to an electronic device 10, which includes, but is not limited to, a processor 110 and a memory 120 connected via a communication bus 130. Figure 8 This is merely an example of an electronic device and does not constitute a limitation thereof. In other embodiments, the electronic device may include more components than those shown in the figure.
[0100] The memory 120 may include one or more random access memory (RAM) and one or more non-volatile memory (NVM). The RAM can be directly read and written by the processor 110 and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, as well as user and application data. The RAM may include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0101] Non-volatile memory can also store executable programs and user and application data, and can be pre-loaded into random access memory for direct reading and writing by the processor 110. Non-volatile memory can include disk storage devices and flash memory.
[0102] The memory 120 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 110. The one or more computer programs include multiple instructions that, when executed by the processor 110, enable a robotic interference detection method to be executed on the electronic device 10.
[0103] In other embodiments, the electronic device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10.
[0104] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0105] The processor 110 provides computing and control capabilities. For example, the processor 110 is used to execute computer programs stored in the memory 120 to implement the robot interference detection method described above.
[0106] The communication bus 130 is used to provide a channel for communication between the memory 120 and the processor 110 in the electronic device 10.
[0107] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 10. In other embodiments of this application, the electronic device 10 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0108] This application also provides a computer storage medium storing computer instructions. When the computer instructions are executed on the electronic device 10, the electronic device 10 performs the above-mentioned related method steps to implement the robot interference detection method in the above embodiments.
[0109] This application also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the robot interference detection method described in the above embodiments.
[0110] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein, the memory is used to store computer execution instructions, and when the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the robot interference detection method in the above method embodiments.
[0111] In this application, the electronic devices, computer storage media, computer program products or chips provided in the embodiments are all used to execute the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual 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.
[0113] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0114] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0115] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0116] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts or all or part of the technical solutions that contribute to the prior art, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.< / index>
Claims
1. A robot interference detection method, characterized in that, The method includes: The main programs of multiple robots are analyzed, and each robot's main program is divided into multiple program segments based on interference instructions; Based on the instruction type of the interference instruction, establish a mapping relationship between multiple interference zone numbers and multiple program segments; If the interference zone numbers corresponding to the program segments of the multiple robots are detected to be the same based on the mapping relationship, the multiple robots will not interfere with each other when they are working by PLC programming. If, based on the mapping relationship, it is detected that the interference zone numbers corresponding to the program segments of the multiple robots are different, it is detected whether the workspaces corresponding to the program segments overlap. If the workspaces corresponding to the program segments do not overlap, it is determined that the multiple robots will not interfere with each other during operation.
2. The robot interference detection method as described in claim 1, characterized in that, The process involves parsing the main programs of multiple robots and dividing each robot's main program into multiple program segments based on interference instructions, including: The main program of each robot is parsed to obtain the position data in the main program; Read the offline programming call instruction corresponding to the location data, and divide the main program into the multiple program segments based on whether the offline programming call instruction includes an interference instruction call.
3. The robot interference detection method as described in claim 2, characterized in that, The offline programming call instruction corresponding to the location data is read, and the main program is divided into multiple program segments based on whether the offline programming call instruction includes an interference instruction call, including: Offline programming call command to read a line of position data; If the offline programming call instruction for the row of location data includes the interference command call, construct the target program based on the row of location data; Add the interference instruction call corresponding to the target program and the call to the target program to the offline programming call instruction of the main program.
4. The robot interference detection method as described in claim 1, characterized in that, The process of establishing a mapping relationship between multiple interference zone numbers and multiple program segments based on the instruction type of the interference instruction includes: The main program is scanned line by line to identify the instruction types related to the interference region; If the instruction type is "enter the interference zone", record the interference zone number entered; If the instruction type is "Release Interference Zone", record the number of the released interference zone; Based on the entered interference zone number and the released interference zone number, a mapping relationship is established between the multiple interference zone numbers and the multiple program segments.
5. The robot interference detection method as described in claim 1, characterized in that, The detection of whether the workspaces corresponding to the program segments overlap includes: Construct a spatial model of the workspace based on the positional data in the program segment; If the spatial models corresponding to the program segments overlap, it is determined that the workspaces corresponding to the program segments overlap. If the spatial models corresponding to the program segments do not overlap, it is determined that the workspaces corresponding to the program segments do not overlap.
6. The robot interference detection method as described in claim 5, characterized in that, The construction of the spatial model of the workspace based on the position data in the program segment includes: A three-dimensional bounding box or convex hull model of the workspace is constructed based on the position data in the program segment.
7. The robot interference detection method as described in claim 5, characterized in that, The method further includes: If it is determined that the workspaces corresponding to the program segments overlap, it is determined that the multiple robots will interfere with each other during operation, and interference prompt information is output. The interference prompt information includes the position data of the overlapping area and the interference area number.
8. An electronic device, characterized in that, The electronic device includes a memory and a processor: The memory is used to store program instructions; The processor is configured to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device performs the robot interference detection method as described in any one of claims 1 to 7.
9. A computer storage medium, characterized in that, The computer storage medium stores program instructions that, when executed on the electronic device, cause the processor of the electronic device to perform the robot interference detection method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for avoiding robot collision
CN110370270A
Robot path interference detecting method, device and equipment and medium
CN111168683A