Deadlock processing method based on robot, electronic equipment and readable storage medium
By predicting and detecting robot path conflicts and using breadth- or depth-first traversal methods, the robot path deadlock problem is solved, improving the efficiency and safety of robot task execution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-05
- Publication Date
- 2026-03-10
AI Technical Summary
In large-scale robot applications, multiple robot paths often conflict, easily leading to a circular deadlock state and affecting task execution efficiency.
By predicting whether the target robot will collide with other robots, potential deadlocks are detected using breadth-first search or depth-first search. The robot is then controlled to move to a safe node and wait until the deadlock is resolved, thus avoiding the occurrence of deadlocks.
It effectively prevents circular deadlocks, improves robot execution efficiency, and ensures safety and efficiency during operation.
Smart Images

Figure CN121636205A_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese invention patent application with the application number 2025112694577, the application date of September 5, 2025, and the invention creation name of "Robot-based deadlock processing method, electronic device, and readable storage medium". TECHNICAL FIELD
[0002] The present application relates to the technical field of robots, in particular to a robot-based deadlock processing method, an electronic device, and a computer-readable storage medium. BACKGROUND
[0003] With the improvement of industrial level, the number of robots and the daily operation volume in the automatic industrial scene have increased significantly, and the path conflict of robots has also become serious, so the multi-robot path planning method has become the main method to solve the scheduling and planning problems of warehouse robots.
[0004] In the large-scale application scene of robots, the multi-robot path conflict is more serious, and it is easy to fall into a ring deadlock state of mutual waiting in a local space, and it takes a lot of time to remove the ring deadlock state, which affects the efficiency of the robot in executing tasks. SUMMARY
[0005] The technical problem solved by the present application is to provide a robot-based deadlock processing method, an electronic device, and a computer-readable storage medium, which can prevent ring deadlock and improve the execution efficiency of the robot.
[0006] To solve the above technical problems, one technical solution adopted by the present application is to provide a robot-based deadlock processing method, which comprises: predicting whether a target robot collides with other robots during movement of a next segment path, to obtain a first collision prediction result, when the target robot moves along a first current segment path in a planned path, the first current segment path and the next segment path being adjacent segment paths in the planned path, and the target robot reaching the first current segment path being earlier than reaching the next segment path; in response to the first collision prediction result representing no collision, performing safety detection on a remaining segment path of the target robot and a second current segment path of other robots to obtain at least one to-be-tested robot that collides with the target robot, the target robot reaching the next segment path being earlier than reaching the remaining segment path; performing breadth-first traversal of collision detection on each to-be-tested robot according to a preset traversal order to obtain a first collision robot queue of each to-be-tested robot; determining a deadlock detection result of the target robot according to the first collision robot queue of each to-be-tested robot; and in response to the deadlock prediction result representing deadlock, controlling the target robot to move to a safety node for waiting until the deadlock is resolved, the safety node being a node in the first current segment path or the next segment path.
[0007] To solve the above technical problems, another technical solution adopted by the present application is to provide an electronic device comprising a memory and a processor, the memory storing program instructions, and the processor fetching the program instructions from the memory to execute the above robot-based deadlock processing method.
[0008] To solve the above technical problems, another technical solution adopted by the present application is to provide a computer-readable storage medium comprising stored program data, the program data being executed by a processor to implement the above robot-based deadlock processing method.
[0009] The robot-based deadlock processing method provided in the application predicts whether the target robot collides with other robots during movement of a next segment path, obtains a first collision prediction result, when the target robot moves along a first current segment path in a planned path, the first current segment path and the next segment path are adjacent segment paths in the planned path, and the target robot reaches the first current segment path earlier than the next segment path. In response to the first collision prediction result representing no collision, safety detection is performed on a remaining segment path of the target robot and a second current segment path of the other robots, at least one to-be-detected robot that collides with the target robot is obtained, the target robot reaches the next segment path earlier than the remaining segment path. The breadth traversal of the collision detection of each to-be-detected robot is performed according to a preset traversal order, and a first collision robot queue of each to-be-detected robot is obtained. The deadlock detection result of the target robot is determined according to the first collision robot queue of each to-be-detected robot. In this way, the breadth traversal is used to predict in advance whether the target robot will appear a deadlock problem when executing the next segment path, so as to ensure the accuracy of the traversal result and reduce the probability of appearing a deadlock. BRIEF DESCRIPTION OF DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained from these drawings without creative labor. Figure 1 is a flowchart of an exemplary embodiment of the deadlock processing method shown in the present application; Figure 2 is a flowchart of another exemplary embodiment of the deadlock processing method shown in the present application; Figure 3 is a flowchart of another exemplary embodiment of the deadlock processing method shown in the present application; Figure 4 is a flowchart of another exemplary embodiment of the deadlock processing method shown in the present application; Figure 5 is a structural schematic diagram of an exemplary embodiment of the deadlock processing device shown in the present application; Figure 6 is a structural schematic diagram of an embodiment of the electronic device provided in the present application; Figure 7 is a structural schematic diagram of an embodiment of the computer readable storage medium provided in the present application. DETAILED DESCRIPTION
[0011] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It can be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application. In addition, it should be noted that, for the convenience of description, only parts related to the present application are shown in the drawings, rather than all structures. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.
[0012] First of all, it should be noted that in the large-scale application scenario of robots, in order to ensure the safety and efficiency of the robot during driving, the multiple robots in the scene need to be controlled in real time to ensure that all robots can drive normally.
[0013] Based on this, the embodiments of the present application propose a robot-based deadlock handling method, an electronic device and a computer readable storage medium, which can predict the execution of the next path in advance to prevent deadlock problems. Among them, the robot-based deadlock handling method is referred to as deadlock handling method. For details, please refer to Figure 1 , Figure 1 is a flowchart of an exemplary embodiment of the deadlock handling method shown in the present application.
[0014] The execution subject of the deadlock handling method can be a terminal device or a server or other processing device, wherein the terminal device can be a user equipment (User Equipment, UE), a computer, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (Personal Digital Assistant, PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The execution subject of the deadlock handling method can also be a deadlock handling apparatus. In some possible implementation manners, the deadlock handling method can be realized by a processor calling computer readable instructions stored in a memory.
[0015] Specifically, the deadlock handling method of the present embodiment includes the following steps: S110: When the target robot moves along the first current segment path in the planned path, predicting whether the target robot collides with other robots during the movement of the next segment path, to obtain a first collision prediction result.
[0016] A robot is a semi-autonomous or fully autonomous automatic control machine. The robot in the embodiments can be an AMR (Autonomous Mobile Robot), an AGV (Automated Guided Vehicle), etc. In a large industrial scene, several robots need to work in the same work area at the same time, and any robot can be selected as a target robot from the several robots in the work area, and the robots in the work area except the target robot are determined as other robots. It should be noted that the robots in the same work area can jointly constitute a robot system.
[0017] The planned path refers to a global travel path of the target robot from a starting point to an ending point planned in the work area. Illustratively, after obtaining the task executed by the target robot, the deadlock processing apparatus obtains the starting point and the ending point of the target robot from the executed task, and searches for a planned path meeting the requirements for the target robot by using a path planning algorithm. The path planning algorithm can be an A* algorithm, a Dijkstra algorithm, an ant colony algorithm, etc. The planned path is usually an optimal solution or a path close to the optimal solution in the search process, such as a path with the shortest running time, the shortest travel distance, or the minimum travel cost, etc.
[0018] The segment path is a local path extracted from the planned path. Illustratively, after obtaining the planned path of the target robot, the deadlock processing apparatus determines a collision-free local path from the planned path according to the real-time state of the robot system. In some embodiments, the longest length and the shortest length of the segment path can be determined according to a distance threshold, and the segment path can be determined according to the longest length and the shortest length. In other embodiments, in order to ensure the safety of the segment path, the middle node of the segment path cannot include a rotating action node (which requires deceleration and parking before rotating in place), that is, the segment path is truncated when a rotating action node is encountered, and the last node of the segment path cannot be a node that does not allow parking and waiting, and if a node that does not allow parking and waiting is encountered, the segment path is continued to be appended forward until a node that allows parking and waiting is reached. The first current segment path is a local path that the target robot is currently executing in the planned path. The next segment path is a local path that the target robot is about to execute after traveling the current segment path. That is, the first current segment path and the next segment path are adjacent segment paths in the planned path, and the target robot reaches the first current segment path earlier than the next segment path.
[0019] After obtaining the segment path of the target robot, the lock information generated by the rectangle and rotation of the robot on the node and between the nodes can also be determined according to the action information of the robot in the segment path and the information such as the size of the robot, the running accuracy, and the following distance.
[0020] The first collision prediction result is a result of predicting whether the target robot will collide with other robots in the work area when executing the next segment of path. Exemplarily, the collision detection result can be determined by performing collision detection on the next segment of path of the target robot and the second current segment of path of the other robots through a conflict collision detection algorithm. In some other embodiments, the deadlock handling apparatus can also increase the detection range of each node in the next segment of path of the target robot, for example, expand outward by twice the length of the robot diagonal; and then perform collision detection in combination with the second current segment of path of the other robots to obtain the collision detection result. For example, the collision result can be determined according to the lock cell information of the target robot and the other robots, starting from the starting node of the next segment of path, and checking all nodes of the next segment of path in sequence, if there is an overlap between the lock cell of the other robots and the target robot, it is considered that the other robots collide with the target robot.
[0021] S120: In response to the first collision prediction result representing that there is no collision, performing deadlock prediction on the remaining segment of path of the target robot to obtain a deadlock prediction result.
[0022] When the first collision prediction result represents that there is a collision, the deadlock handling apparatus adjusts the termination node of the next segment of path, for example, the last collision-free node in the next segment of path can be taken as the termination node, and the nodes after the collision-free node are removed until the next segment of path without collision is obtained. When the first collision prediction result represents that there is no collision, the deadlock handling apparatus assumes that the target robot has arrived at the termination node of the next segment of path, and performs deadlock prediction on the remaining segment of path of the target robot to determine the deadlock prediction result of whether the remaining segment of path of the target robot will form a deadlock with the other robots.
[0023] The remaining segment of path is the path after the next segment of path in the planned path. Exemplarily, the starting node and the termination node of the planned path are denoted as AllbeginIdx and AllendIdx respectively, and the starting node and the termination node of the next segment of path are denoted as PartbeginIdx and PartendIdx respectively, then PartbeginIdx+1 to AllendIdx are taken as the remaining segment of path. Therefore, the target robot arrives at the next segment of path earlier than the remaining path.
[0024] S130: In response to the deadlock prediction result representing that there is a deadlock, controlling the target robot to move to a safety node for waiting until the deadlock is resolved, the safety node being a node in the first current segment of path or the next segment of path.
[0025] The deadlock handling apparatus determines the next segment path without collision risk, and since the remaining segment path is the path that must be passed after the next segment path, if the safety of the remaining segment path passes the detection, the target robot can normally execute the next segment path. If the deadlock prediction result represents that there is a deadlock, a safe node needs to be found from the nodes in the first current segment path or the next segment path, and the robot is controlled to move to the safe node to wait until the deadlock is resolved.
[0026] The safe node refers to a node at which the target robot does not have problems such as collision or deadlock, that is, the target robot stops at the safe node and does not collide with other robots, and other robots can normally execute their planned paths. For example, if a safe node can be found from the first current segment path, the target robot is controlled to continue to execute the next segment path after executing the first current segment path, and to wait at the safe node; if a safe node cannot be found from the first current segment path, the target robot is controlled to no longer continue to execute the next segment path after executing the first current segment path, but to wait at the termination node of the first current segment path.
[0027] In other embodiments, the deadlock handling apparatus can also obtain the safe node of the other robot and control the other robot to move to the safe node to wait until the deadlock is resolved. The safe node of the other robot is a node found in the planned path of the other robot, which makes the lock cells covered by the next segment path and the remaining segment path of the target robot not collide with the safe node, that is, the other dangerous robot stops at the safe node, and the target robot can normally execute the planned path.
[0028] It can be seen that the deadlock handling method based on the robot in the embodiments of the present application predicts whether the target robot collides with other robots in the process of moving along the next segment path when the target robot moves along the first current segment path in the planned path, obtains a first collision prediction result, the first current segment path and the next segment path are adjacent segment paths in the planned path, and the target robot reaches the first current segment path earlier than the next segment path; in response to the first collision prediction result representing that there is no collision, a deadlock prediction is performed on the remaining segment path of the target robot, and a deadlock prediction result is obtained, the target robot reaches the next segment path earlier than the remaining path; in response to the deadlock prediction result representing that there is a deadlock, the target robot is controlled to move to a safe node to wait until the deadlock is resolved, and the safe node is a node in the first current segment path or the next segment path. Thus, by predicting the collision of the target robot executing the next segment path, the deadlock problem can be prevented in advance, and the target robot can be prevented from being trapped in the deadlock.
[0029] In some embodiments, the process of the deadlock handling apparatus obtaining the deadlock prediction result of the remaining segment path of the target robot can include: performing safety detection on the remaining segment path of the target robot and the second current segment path of the other robots to obtain the to-be-tested robots that have a collision with the target robot; performing collision traversal detection on each to-be-tested robot to obtain the deadlock prediction result. In this way, it is determined whether the target robot will form a deadlock with the other robots in the second current segment path if the target robot executes the remaining segment path, and the safety of the remaining segment path is predicted in advance.
[0030] The planned path of the other robot is an optimal global path obtained by using a path planning algorithm to plan a path for the other robot to execute a task. Illustratively, the deadlock handling apparatus can determine the planned path of each robot according to the node attributes, node positions, and node connectivity information in the map network, as well as the states of each robot in the robot system, such as the task to be executed, the position, and the path. The node attributes include whether the node is a workbench, a shelf area, or a running area, etc. After obtaining the planned path of the other robot, the planned path of the other robot is divided in real time to obtain the segment path of the other robot. The second current segment path is the segment path being executed by the other robot, and the nodes after the second current segment path in the planned path of the other robot form the subsequent path of the other robot.
[0031] After obtaining the second current segment path of the other robot, the deadlock handling apparatus performs safety detection on the remaining segment path of the target robot and the second current segment path of the other robot by using a collision detection algorithm. If it is detected that any node cell in the remaining segment path of the target robot has a conflict with the cell of the second current segment path of the other robot, the other robot is determined as a to-be-tested robot. It can be understood that the to-be-tested robot is a robot that has a dangerous conflict with the target robot. In addition, the deadlock handling apparatus also needs to determine the node corresponding to the to-be-tested robot as a to-be-tested node.
[0032] After obtaining the to-be-tested robots of the target robot, the to-be-tested robots are expanded to determine whether the target robot will form a ring deadlock. In some embodiments, the to-be-tested robots can be subjected to collision traversal detection in a depth-first manner to obtain the deadlock prediction result. Specifically, the to-be-tested robots are subjected to depth-first collision detection in a preset traversal order to obtain a first collision robot queue of each to-be-tested robot; and the deadlock detection result of the target robot is determined according to the first collision robot queue of each to-be-tested robot.
[0033] The first collision robot queue refers to a robot queue obtained by deep expansion of the robot to be tested. Illustratively, a first to-be-expanded robot queue with the robot to be tested as the head can be first established, collision detection is performed on the tail robot of the first to-be-expanded robot queue, and the robot obtained by the collision detection is placed at the tail of the first to-be-expanded robot queue for collision detection, thereby realizing deep traversal of the robot to be tested, and obtaining the first collision robot queue of each robot to be tested.
[0034] The specific expansion process is as follows: the deadlock processing device performs collision detection on the subsequent segment path of the robot to be tested and the current segment path of the other robots except the robot to be tested according to the preset traversal order, obtains the first associated robot that exists collision with the robot to be tested, and selects the first target associated robot that does not belong to the robot to be tested from the first associated robots; in response to the first target associated robot being the target robot or a robot in the first collision robot queue of the other robot to be tested, the first collision robot queue of the robot to be tested is constructed according to the first target associated robot; in response to the first target associated robot not being the target robot or not being a robot in the first collision robot queue of the other robot to be tested, collision detection is performed on the first target associated robot, and the first collision robot queue of the robot to be tested is determined according to the collision detection result of the first target associated robot, and the other robot to be tested is a robot other than the first target associated robot.
[0035] The preset traversal order can be determined according to the size order of the node values. Illustratively, when detecting the target robot, the node value of the node closer to the target robot can be determined to be smaller, and the node value of the node farther from the target robot can be determined to be larger along the moving direction of the planned path of the target robot, so that the preset traversal order can be to traverse the robot to be tested located at a smaller node value first, and then traverse the robot to be tested located at a larger node value, thereby maintaining the robot to be tested of the minimum dangerous root node to be traversed preferentially, obtaining a more reasonable first collision robot queue, and ensuring that the safe node can be found from the minimum dangerous root node when searching for the safe node, and a safe node closer to the target robot is found.
[0036] The deadlock processing device first performs collision detection on the remaining segment path of the target robot and the second current segment path of the other robots, and obtains the robot to be tested; then performs collision detection on the subsequent segment path of the robot to be tested and the current segment path of the other robots except the robot to be tested, and obtains the first associated robot that exists collision with the robot to be tested. It should be noted that the other robots except the robot to be tested include the target robot. The current segment path of the other robots except the robot to be tested includes the first current segment path and the second current segment path.
[0037] After the first associated robot of the current traversal robot is obtained, a first target associated robot which does not belong to the current traversal robot is selected from the first associated robot. The reason is that the current traversal robot has been detected by the target robot, and will be traversed in depth in the subsequent process, so it is unnecessary to waste computing resources for traversal. The number of the first associated robot and the first target associated robot can be one or more. For the convenience of description, the robot which has been traversed is determined as a traversed robot in the embodiment.
[0038] After the first target associated robot is obtained, the deadlock processing device needs to determine whether the collision detection needs to be performed on the first target associated robot according to the association relationship between the first target associated robot and the target robot / traversed robot; if yes, the collision detection is continued to be performed on the first target associated robot to obtain a collision detection result; if no, a first collision robot queue of the current traversal robot is constructed according to the first target associated robot.
[0039] If the first target associated robot is the target robot, that is, the target robot is the starting robot and the target robot is the terminal robot, a loop queue is formed. In addition, the first target associated robot is the robot expanded by the current traversal robot, so the first collision robot queue can be formed by the current traversal robot, the first target associated robot and the target robot, and the first collision robot queue belongs to the loop queue.
[0040] If the first target associated robot is the robot in the first collision robot queue of the other current traversal robot, that is, the first target associated robot has been expanded in the expansion process of the other current traversal robot, the subsequent queue of the first target associated robot can be obtained from the first collision robot queue of the other current traversal robot, and the first collision robot queue of the current traversal robot is formed by the subsequent queue of the first target associated robot and the current traversal robot. In another embodiment, after the deadlock processing device determines that the first target associated robot is the robot in the first collision robot queue of the other current traversal robot, it is judged whether the first collision robot queue of the other current traversal robot is a loop queue, if yes, the subsequent queue of the first target associated robot is obtained from the first collision robot queue of the other current traversal robot, and the first collision robot queue of the current traversal robot is formed by the subsequent queue of the first target associated robot and the current traversal robot; if no, the next first target associated robot of the current traversal robot is processed.
[0041] If the first target-associated robot is not a robot in the first collision robot queue of the target robot or other robots under test, the characterization of the first target-associated robot can be further expanded. Collision detection is performed on the first target-associated robot, and the first collision robot queue of the robots under test is determined based on the collision detection results of the first target-associated robot. Other robots under test are robots other than the first target-associated robot.
[0042] To explain in detail the execution process of depth-first traversal, Figure 2 The flowchart shown below provides further explanation, as detailed below: Obtain the planned path of the target robot; determine the next segment path of the target robot according to preset rules; in response to the first collision prediction result of the next segment path of the target robot indicating that there is no collision, perform collision detection on the remaining segment path of the target robot and the second current segment path of other robots to obtain the test robots and test nodes that collide with the target robot. Assume the target robot is located at the end node of the next path segment; define a first set of robots to be expanded, which includes multiple first sets of robots to be expanded; define a set of traversed robots, a set of robots forming a loop, and a set of dangerous robots. The set of traversed robots stores robots that have undergone collision detection, the set of robots forming a loop stores robots in the loop queue, and the set of dangerous robots stores robots that have a collision risk with the target robot and their corresponding nodes. The target robot's robot to be tested is set as the head robot of the first set of robots to be expanded, and the robot to be tested and its corresponding node are added to the set of dangerous robots. The first set of robots to be expanded is traversed according to a preset traversal order to determine whether there is a first set of robots to be expanded that has not yet been traversed. If there is no first set of robots to be expanded that has not yet been traversed, it means that all first set of robots to be expanded has been traversed, and the position of the target robot is restored to its true position. If there is a first set of robots to be expanded that has not yet been traversed, the last robot in the first set of robots to be expanded is taken as the robot to be expanded. The determination of whether there is a first set of robots to be expanded that has not yet been traversed can be based on whether the first set of robots to be expanded is determined to be the first collision robot queue. When the first collision robot queue of the robot to be tested is completed, it means that the traversal is complete.
[0043] determining whether the to-be-expanded robot exists in the traversed robot set, if the to-be-expanded robot exists, it indicates that the to-be-expanded robot has been processed, and whether the next first to-be-expanded robot queue has not been traversed is determined; if the to-be-expanded robot does not exist, it indicates that the to-be-expanded robot has not been processed, collision detection is performed on the subsequent path of the to-be-expanded robot, at least one first associated robot of the to-be-expanded robot and each first associated node corresponding to each first associated robot are obtained, and the to-be-expanded robot is added to the traversed robot set; each first associated robot is sequentially determined whether to exist in the dangerous robot set; if the first associated robot exists in the dangerous robot set, it is determined whether the next first to-be-expanded robot queue has not been traversed; if the first associated robot does not exist in the dangerous robot set, it is determined whether the first associated robot is a target robot, wherein the first associated robot that does not exist in the dangerous robot set is also the first target associated robot; if the first associated robot is the target robot, it is determined whether the to-be-expanded robot exists in the dangerous robot set; if the to-be-expanded robot exists in the dangerous robot set, it is determined that the first to-be-expanded robot queue is a loop queue, and the robots in the first to-be-expanded robot queue are added to the loop robot set; if the to-be-expanded robot does not exist in the dangerous robot set, the to-be-measured node corresponding to the head robot (i.e. the to-be-measured robot) of the first to-be-expanded robot queue is taken as the corresponding node of the to-be-expanded robot to form a loop queue, and the robots in the first to-be-expanded robot queue are added to the loop robot set. This is because the depth traversal of the target robot is expanded to the to-be-expanded robot, the collision detection of the to-be-expanded robot is expanded to the target robot, although the to-be-expanded robot is not directly subordinate to the to-be-measured robot of the target robot, but it is still possible to form a ring-shaped deadlock, so the to-be-expanded robot still needs to be detected as a safe node of the target robot.
[0044] If the first associated robot is not the target robot, it is determined whether the first associated robot exists in the traversed robot set; if the first associated robot exists in the traversed robot set, it indicates that the first associated robot has already existed in other first to-be-expanded robot queues, it is determined whether the first associated robot exists in the looped robot set, if yes, it indicates that the robot in the already looped queue is traversed, a new looped queue can be formed based on the looped queue and the first to-be-expanded robot queue, and the new looped queue is added to the looped robot set, and each robot in the new looped queue and the node corresponding to each robot are added to the dangerous robot set; it should be noted that when the new looped queue is constructed, the node value of the head robot in the looped queue and the first to-be-expanded robot queue can be taken as the root node for construction. As an example, it is assumed that there is a looped queue AGV1 (node value 0), AGV2 (node value 2), AGV1 (node value 0), the first to-be-expanded robot queue is AGV1 (node value 0), AGV3 (node value 4), AGV2 (node value 2), AGV1 (node value 0), AGV1 is the target robot, when the first to-be-expanded robot queue is expanded to AGV2, it is found that AGV2 already exists in other looped queues, and the node value of AGV2 is less than the node value of AGV3, then AGV2 is taken as the root node to construct a new looped queue AGV1 (node value 0), AGV2 (node value 2), AGV3 (node value 4), AGV1 (node value 0), and the looped queue and the first to-be-expanded robot queue are deleted; If the first associated robot does not exist in the traversed robot set, it indicates that the first associated robot has not been processed by traversal, the first associated robot is added to the tail of the first to-be-expanded robot queue to obtain a new first to-be-expanded robot queue, and the first associated robot is taken as a to-be-expanded robot for collision detection, and the above steps are repeated until there is no first to-be-expanded robot queue that has not been traversed; The position of the target robot is restored to the real position; and collision detection is performed on the subsequent path in the dangerous robot set of the target robot and the termination node of the next path of the target robot to determine whether the target robot stops at the termination node of the next path will collide with other robots; When there is a target dangerous robot colliding with the target robot in the dangerous robots, it is determined whether there is a safety point in the next path segment of the target robot or in the subsequent path segment of the target dangerous robot, so that the target robot and the target dangerous robot do not collide; if there is a safety point, it is returned that the prediction detection is safe, and the target robot can be controlled to normally execute the next path segment; if there is no safety point, it is returned that the prediction detection is unsafe, and the target robot needs to be controlled to wait at the termination node of the first current path segment, and after other robots travel to other nodes, the deadlock detection is performed again to determine whether the next path segment can be executed.
[0045] In some other embodiments, the breadth traversal method can be used for collision traversal detection of the to-be-tested robots to obtain the deadlock prediction result. Specifically, the breadth traversal method is used for collision detection of the to-be-tested robots according to a preset traversal order to obtain a second collision robot queue of each to-be-tested robot; and a deadlock detection result of the target robot is determined according to the second collision robot queue of each to-be-tested robot.
[0046] The second collision robot queue refers to a robot queue obtained by breadth expansion of the to-be-tested robot. For example, a second to-be-expanded robot queue with each to-be-tested robot as the head robot can be first established, and the tail robots of the second to-be-expanded robot queues are sequentially subjected to collision detection, and the robots obtained by the collision detection are put into the second to-be-expanded robot queue; the robots obtained by the collision detection are subjected to collision detection as the tail robots of the second to-be-expanded robot queue, until the second collision robot queue of each to-be-tested robot is obtained, so as to realize the breadth traversal of the to-be-tested robots and obtain the second collision robot queue of each to-be-tested robot. Different from the depth traversal, the depth traversal is first performed on a first to-be-expanded robot queue, and the tail robot of the first to-be-expanded robot queue is constantly traversed until the first collision robot queue is obtained, and the breadth traversal is performed on the tail robots of all the second to-be-expanded robot queues, and then the tail robots of the next layer are sequentially traversed.
[0047] The specific expansion process is as follows: the deadlock processing device performs collision detection on the subsequent path segment of the to-be-tested robot and the current path segment of other robots except the to-be-tested robot according to a preset traversal order to obtain second associated robots colliding with the to-be-tested robot, and selects second target associated robots not belonging to the to-be-tested robot from the second associated robots; in response to the second target associated robot being a target robot, a second collision robot queue of the to-be-tested robot is constructed according to the second target associated robot; in response to the second target associated robot not being a target robot, the second collision robot queue of the to-be-tested robot is determined according to whether the second target associated robot has been subjected to collision detection.
[0048] Firstly, it needs to be pointed out that after obtaining the target robot, a plurality of second to-be-expanded robot queues are established with each to-be-tested robot as the first; after the second to-be-expanded robot queue is completed, the second collision robot queue is obtained.
[0049] The deadlock processing device first performs collision detection on the remaining segment path of the target robot and the second current segment path of other robots to obtain a to-be-tested robot; then, according to a preset traversal order, the subsequent segment path of the to-be-tested robot and the current segment path of other robots except the to-be-tested robot are sequentially subjected to collision detection to obtain second associated robots that exist collision with the to-be-tested robot. It needs to be pointed out that the other robots except the to-be-tested robot include the target robot. The current segment path of the other robots except the to-be-tested robot includes the first current segment path and the second current segment path.
[0050] After obtaining the second associated robots of the to-be-tested robot in the current traversal, a second target associated robot that does not belong to the to-be-tested robot is selected from the second associated robots. The number of the second associated robots and the second target associated robot can be one or more. In order to facilitate the description, the robot that has been subjected to collision detection is determined as an already-traversed robot in this embodiment.
[0051] After obtaining the second target associated robot, the deadlock processing device needs to determine whether it is necessary to construct the second collision robot queue of the to-be-tested robot in the current traversal according to the association relationship between the second target associated robot and the target robot / already-traversed robot.
[0052] If the second target associated robot is the target robot, that is, the target robot is obtained by expanding the target robot, a loop queue is formed, and at this time, the second collision robot queue of the to-be-tested robot can be constructed according to the second target associated robot.
[0053] If the second target-associated robot is not the target robot, it is necessary to further determine whether the second target-associated robot belongs to the already traversed robots. If it does not belong to the already traversed robots, the second target-associated robot is added to the tail of the second queue of robots to be expanded in the test robot and awaits traversal. If it belongs to the already traversed robots, the second collision robot queue of the test robot needs to be determined based on the node value of the robot at the head of the second queue of robots to be expanded. Specifically, in response to the second target-associated robot having undergone collision detection, the deadlock handling device determines whether the second target-associated robot exists among the robots traversed and detected by other test robots. If it exists, the second collision robot queue of the test robot is determined based on the relationship between the node value of the test robot corresponding to the second target-associated robot and the node values of other test robots. The node value is proportional to the distance between each node and the node of the target robot. This maintains a queue of the smallest root node to ensure that the subsequent search for safe nodes starts from the smallest root node.
[0054] Specifically, when the robot associated with the second target is already traversed in the second queue of robots to be expanded from other robots under test, the relationship between the node values of the other robots under test and the node value of the currently traversed robot under test is determined. If the node value of the other robots under test is less than the node value of the currently traversed robot under test, the robot under test currently traversed is deleted from the second queue of robots to be expanded; if the node value of the other robots under test is greater than the node value of the currently traversed robot under test, the robot under test of the other robots under test is deleted from the second queue of robots to be expanded. This is because breadth-first traversal does not maintain priority expansion for robots under test with the smallest root node. Therefore, during the traversal, if it is found that the currently traversed robot is already in the second queue of robots to be expanded from other robots under test, it is necessary to select the robot with the smallest root node from both the currently traversed second queue of robots to be expanded and keep it, while removing the robot under test with the larger root node from the second queue of robots to be expanded.
[0055] To explain in detail the execution process of breadth-first traversal, Figure 3 The flowchart shown below provides further explanation, as detailed below: Obtain the planned path of the target robot; determine the next segment path of the target robot according to preset rules; in response to the first collision prediction result of the next segment path of the target robot indicating that there is no collision, perform collision detection on the remaining segment path of the target robot and the second current segment path of other robots to obtain the test robots and test nodes that collide with the target robot. Assuming that the position of the target robot is located at the terminal node of the next path; defining a second to-be-expanded robot queue set and updating the to-be-expanded robot queue set, the second to-be-expanded robot queue set including a plurality of second to-be-expanded robot queues, and the updated to-be-expanded robot queue set including a plurality of updated to-be-expanded robot queues; defining a traversed robot set and a dangerous robot set, the traversed robot set storing robots that have undergone collision detection, and the dangerous robot set storing robots that have collision risks with the target robot and the nodes corresponding to the robots; According to the preset traversal order, the second to-be-expanded robot queue set is traversed in turn to determine whether there is a second to-be-expanded robot queue that has not been traversed in the current layer; if there is no second to-be-expanded robot queue that has not been traversed in the current layer, it indicates that all second to-be-expanded robot queues have been traversed, and the real position of the target robot is restored; if there is a second to-be-expanded robot queue that has not been traversed in the current layer, the tail robot in the second to-be-expanded robot queue is taken as the to-be-expanded robot. It can be understood that the breadth-first traversal is to traverse each layer in turn, first layer, second layer, and so on. For example, the first layer is composed of all the to-be-tested robots of the target robot, and the deadlock processing device performs collision detection processing on each to-be-tested robot in turn, and then performs collision detection processing on the next layer of robots of the to-be-tested robots. The next layer of robots of the to-be-tested robots is the first associated robot obtained by the to-be-tested robot through collision detection.
[0056] The subsequent path of the to-be-expanded robot is subjected to collision detection to obtain at least one second associated robot of the to-be-expanded robot and the nodes corresponding to the second associated robots, and the to-be-expanded robot is added to the traversed robot set; determining whether the second associated robot exists in the dangerous robot set; if the second associated robot exists in the dangerous robot set, determining whether the next second to-be-expanded robot queue has been traversed; if the second associated robot does not exist in the dangerous robot set, determining whether the second associated robot is a target robot, wherein the second associated robot that does not exist in the dangerous robot set is also referred to as a second target associated robot; if the second associated robot is a target robot, determining whether the to-be-expanded robot exists in the dangerous robot set; if the to-be-expanded robot exists in the dangerous robot set, determining that the second to-be-expanded robot queue is a loop queue, and obtaining a second collision robot queue; if the to-be-expanded robot does not exist in the dangerous robot set, constructing a loop queue by taking the to-be-tested node corresponding to the head robot of the second to-be-expanded robot queue, i.e., the to-be-tested robot, as the corresponding node of the to-be-expanded robot, and obtaining the second collision robot queue. This is because the breadth-first traversal based on the target robot is expanded to the to-be-expanded robot, the collision detection of the to-be-expanded robot is expanded to the target robot, although the to-be-expanded robot is not directly subordinate to the to-be-tested robot of the target robot, but it is still possible to form a ring-shaped deadlock, and therefore the to-be-expanded robot still needs to be detected as a safe node of the target robot.
[0057] If the second associated robot is not a target robot, determining whether the second associated robot exists in the traversed robot set; if the second associated robot exists in the traversed robot set, it indicates that the second associated robot already exists in another second to-be-expanded robot queue, and the other second to-be-expanded robot queue is taken as a to-be-confirmed expansion robot queue. At this time, it is necessary to compare the node value of the head robot of the to-be-confirmed expansion robot queue with the node value of the head robot of the second to-be-expanded robot queue currently being expanded. It is determined whether the node value of the head robot of the second to-be-expanded robot queue currently being expanded is less than the node value of the head robot of the to-be-confirmed expansion robot queue. If it is less, the to-be-confirmed expansion robot queue is deleted from the second to-be-expanded robot queue set or the updated to-be-expanded robot queue set, the second associated robot is added to the tail of the second to-be-expanded robot queue currently being expanded, the second to-be-expanded robot queue with the second associated robot added is taken as an updated to-be-expanded robot queue and added to the updated to-be-expanded robot queue set, and the next call is waited. After the to-be-confirmed expansion robot queue is deleted, it is determined whether the robot in the to-be-confirmed expansion robot queue exists in the other second to-be-expanded robot queue, and if not, the robot in the to-be-confirmed expansion robot queue is deleted from the traversed robot set. The above steps are repeated until there is no second robot queue to be expanded that has not been traversed completely; it is determined whether there is an updated robot queue to be expanded in the updated robot queue set to be expanded; if there is, the second robot queue set to be expanded of the next layer is changed to the updated robot queue set to be expanded, and the original updated robot queue to be expanded in the updated robot queue set to be expanded is emptied; if there is not, the position of the target robot is restored to the real position; and collision detection is performed on the subsequent path in the dangerous robot set of the target robot and the termination node of the next path of the target robot to determine whether the target robot stopping at the termination node of the next path will collide with other robots; When there is a target dangerous robot in the dangerous robots that collides with the target robot, it is determined whether there is a safety point in the next path / remaining path of the target robot or in the subsequent path of the target dangerous robot, so that the target robot and the target dangerous robot do not collide; if there is a safety point, the target robot can be controlled to normally execute the next path; if there is not a safety point, the target robot needs to be controlled to wait at the termination node of the first current path, and after other robots move forward to other nodes, deadlock detection is performed again to determine whether the next path can be executed.
[0058] Further, after determining whether the remaining path of the target robot will produce a deadlock by depth traversal or breadth traversal, it can be further determined whether the next path of the target robot collides with the subsequent path of other robots to ensure the normal travel of the target robot. Specifically, the deadlock processing device performs collision prediction on the subsequent path of the deadlock robot in the deadlock prediction result and the next path of the target robot to obtain a second collision prediction result; in response to the second collision prediction result representing that the prediction passes, the target robot is controlled to execute the next path; in response to the second collision prediction result representing that the prediction does not pass, a safety node is obtained from the first current path or the next path of the target robot, and the target robot is controlled to move to the safety node for waiting until the deadlock is resolved. Thus, through two-stage collision detection, it is ensured that the target robot travels along the issued path in a multi-vehicle environment without collision or being trapped in a deadlock state.
[0059] Wherein, the existence of a deadlock in this embodiment means that a loop queue is formed by the target robot and other robots through loop deadlock detection; the deadlock robot can be a robot in the dangerous robot set obtained by the above breadth traversal or depth traversal.
[0060] When the robot gets the deadlock prediction result, if the deadlock prediction result represents that there is no deadlock, the subsequent segment path of the robot to be tested and the next segment path of the target robot are subjected to collision prediction to obtain a second collision prediction result; if the second collision prediction result represents that the prediction passes, the target robot is controlled to execute the next segment path. It should be noted that controlling the target robot to execute the next segment path means controlling the target robot to normally execute the next segment path after executing the first current segment path.
[0061] To elaborate the execution process of the deadlock handling method, the flowchart shown in Figure 4 is further illustrated, and the details are as follows: A planning path from a start node to an end node is planned for the target robot, and the actions of the target robot at each node in the planning path are obtained; the lock cell information generated by the target robot in executing the corresponding actions at each node is determined according to the actions of the target robot, the robot size, the running accuracy, the following distance and other information; The next segment path of the target robot is determined according to a preset rule, for example, the longest and shortest lengths of the segment path are determined according to a distance threshold, the segment path is truncated if it includes a rotation action, and the last node in the segment path must not be a node that is not allowed to stop and wait; for example, the next segment path from the start node PartbeginIdx to the end node PartendIdx is determined, and PartbeginIdx+1 to AllendIdx is the remaining segment path; whether the lock cell information of the next segment path exists collision is determined according to the conflict collision algorithm, and if there is collision, the end node of the next segment path is adjusted until there is no collision; The remaining segment path of the target robot and the second current segment path of other robots are subjected to collision detection according to the conflict collision algorithm to obtain a robot to be tested of the target robot, and a dangerous robot set of the target robot is constructed, and the robot to be tested is added to the dangerous robot set; Then, whether the remaining segment path of the target robot constitutes a loop queue with other robots is determined by searching in a breadth-first search or depth-first search manner, and the loop queue constitutes a loop lock; If yes, the robots in the loop queue and the nodes corresponding to the robots are added to the dangerous robot set; if no, the dangerous robot set only includes the robot to be tested; The subsequent segment path of the robot in the dangerous robot set and the next segment path of the target robot are collided to obtain a second collision prediction result; if the second collision prediction result represents a prediction pass, the next segment path from the starting node PartbeginIdx to the ending node PartendIdx is issued to the target robot, the corresponding lock grid area is occupied, and the target robot is controlled to drive forward, and the lock grid occupation information that has been driven is cleared in the driving process; if the second collision prediction result represents a prediction failure, a safety node is obtained from the next segment path of the target robot; if the safety node exists, the next segment path from the starting node PartbeginIdx to the ending node PartendIdx is issued to the target robot, the corresponding lock grid area is occupied, and the target robot is controlled to drive forward, and the lock grid occupation information that has been driven is cleared in the driving process; if the safety node does not exist, the ending node of the first current segment path is taken as the safety node, the robot is controlled to wait at the ending node of the first current segment path after driving the first current segment path, and whether the next segment path can be issued is continuously judged in the waiting process; whether the distance between the target robot and the ending node of the next segment path is less than the distance threshold of the segment path can be used to determine whether the next segment path needs to be issued; if the distance is less than the distance threshold, the next segment path is issued; if the distance is greater than or equal to the distance threshold, the waiting continues; whether the target robot reaches the end point of the planned path is judged; if yes, the task is completed; if not, whether the target robot should execute the next segment path is continuously judged.
[0062] The above scheme first detects the dangerous robots that the remaining path of the target robot may encounter, and then detects whether other robots form a multi-robot circular deadlock with the next segment path of the target robot, so as to avoid the multi-robot circular deadlock problem caused by the next segment path in the driving process of the target robot, effectively guarantee the safety of the robot system, and improve the operation efficiency of the robot system.
[0063] Please refer to Figure 5 , Figure 5is a structural schematic diagram of an exemplary embodiment of a deadlock handling apparatus shown in the present application. The deadlock handling apparatus 500 comprises a collision prediction module 510, a deadlock prediction module 520 and a control module 530, the collision prediction module 510 is configured to predict whether the target robot will collide with other robots in the next segment path movement when the target robot moves along the first current segment path in the planned path, obtain a first collision prediction result, the first current segment path and the next segment path are adjacent segment paths in the planned path, and the target robot reaches the first current segment path earlier than the next segment path; the deadlock prediction module 520 is configured to, in response to the first collision prediction result representing no collision, perform deadlock prediction on the remaining segment path of the target robot, obtain a deadlock prediction result, and the target robot reaches the next segment path earlier than the remaining path; and the control module 530 is configured to, in response to the deadlock prediction result representing deadlock, control the target robot to move to a safety node for waiting until the deadlock is resolved, and the safety node is a node in the first current segment path or the next segment path.
[0064] The above scheme, the deadlock handling apparatus predicts whether the target robot will collide with other robots in the next segment path movement when the target robot moves along the first current segment path in the planned path, obtains a first collision prediction result, the first current segment path and the next segment path are adjacent segment paths in the planned path, and the target robot reaches the first current segment path earlier than the next segment path; in response to the first collision prediction result representing no collision, the remaining segment path of the target robot is predicted for deadlock, a deadlock prediction result is obtained, and the target robot reaches the next segment path earlier than the remaining path; and in response to the deadlock prediction result representing deadlock, the target robot is controlled to move to a safety node for waiting until the deadlock is resolved, and the safety node is a node in the first current segment path or the next segment path. Thus, by predicting the collision of the target robot executing the next segment path, the deadlock problem can be prevented in advance, the target robot can be prevented from being trapped in deadlock, and the execution efficiency is reduced.
[0065] The functions of each module can be referred to the deadlock handling method embodiments, which will not be described here.
[0066] To implement the deadlock handling method of the above embodiments, the present application provides another electronic device, please refer to Figure 6 , Figure 6 is a structural schematic diagram of an embodiment of the electronic device provided by the present application.
[0067] The electronic device 600 comprises a memory 610 and a processor 620, wherein the memory 610 and the processor 620 are coupled.
[0068] The memory 610 is configured to store program data, and the processor 620 is configured to execute the program data to implement the deadlock processing method in the above-described embodiments.
[0069] In this embodiment, the processor 620 can also be referred to as a CPU (Central Processing Unit). The processor 620 can be an integrated circuit chip having a processing capability of signals. The processor 620 can also be a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application-Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor 620 can also be any conventional processor.
[0070] The present application also provides a computer readable storage medium, such as Figure 7 As shown in the figure, the computer readable storage medium 700 is configured to store program data 710, and the program data 710 is used to implement the deadlock processing method in the embodiments of the present application when executed by a processor.
[0071] When the method involved in the deadlock processing method embodiments of the present application is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a device, such as a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the whole or part of the technical solutions that make essential contributions to the prior art can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a ROM (Read-Only Memory), a RAM (Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0072] The above description is only an embodiment of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation based on the content of the specification and drawings, or direct or indirect application in other related technical fields, is also included in the patent protection scope of the present application.
Claims
1. A method for handling deadlock in a robot-based system, characterized by, The deadlock processing method comprises: when a target robot moves along a first current segment path in a planned path, predicting whether the target robot collides with other robots during movement of a next segment path, to obtain a first collision prediction result, the first current segment path and the next segment path being adjacent segment paths in the planned path, and a time at which the target robot reaches the first current segment path being earlier than a time at which the target robot reaches the next segment path; in response to the first collision prediction result representing no collision, performing safety detection on a remaining segment path of the target robot and a second current segment path of other robots, to obtain at least one to-be-tested robot that collides with the target robot, a time at which the target robot reaches the next segment path being earlier than a time at which the target robot reaches the remaining segment path; performing breadth traversal collision detection on each to-be-tested robot in a preset traversal order, to obtain a first collision robot queue of each to-be-tested robot; determining a deadlock detection result of the target robot according to the first collision robot queue of each to-be-tested robot; in response to the deadlock prediction result representing deadlock, controlling the target robot to move to a safety node for waiting until the deadlock is resolved, the safety node being a node in the first current segment path or the next segment path.
2. The deadlock handling method according to claim 1, characterized by, The planned path of the other robots further comprises a subsequent segment path, a time at which the other robots reach the second current segment path being earlier than a time at which the other robots reach the subsequent path, and the step of performing breadth traversal collision detection on each to-be-tested robot in a preset traversal order, to obtain a second collision robot queue of each to-be-tested robot, comprising: performing collision detection on a subsequent segment path of the to-be-tested robot and a current segment path of other robots except the to-be-tested robot in the preset traversal order, to obtain a second associated robot that collides with the to-be-tested robot, and selecting a second target associated robot that does not belong to the to-be-tested robot from the second associated robots; in response to the second target associated robot being the target robot, constructing a second collision robot queue of the to-be-tested robot according to the second target associated robot; in response to the second target associated robot not being the target robot, determining the second collision robot queue of the to-be-tested robot according to whether the second target associated robot has performed collision detection.
3. The deadlock handling method according to claim 2, characterized by, The step of determining the second collision robot queue of the to-be-tested robot according to whether the second target associated robot has performed collision detection, comprising: in response to the second target associated robot having performed collision detection, determining whether the second target associated robot exists in robots subjected to traversal detection of other to-be-tested robots; if the second target associated robot exists in the robots subjected to traversal detection of other to-be-tested robots, determining the second collision robot queue of the to-be-tested robot according to a size relationship between a node value at which the to-be-tested robot corresponding to the second target associated robot is located and node values at which the other to-be-tested robots are located, the node value being directly proportional to a distance between each node and a node at which the target robot is located.
4. The deadlock handling method according to claim 3, characterized by, The step of determining the second collision robot queue of the to-be-tested robot according to the size relationship between the node value of the to-be-tested robot corresponding to the second target associated robot and the node value of the other to-be-tested robots comprises: If the node value of the other to-be-tested robot is smaller than the node value of the currently traversed to-be-tested robot, the second to-be-expanded robot queue of the currently traversed to-be-tested robot is deleted, and the second to-be-expanded robot queue of the other to-be-tested robot is retained; If the node value of the other to-be-tested robot is greater than the node value of the currently traversed to-be-tested robot, the second to-be-expanded robot queue of the other to-be-tested robot is deleted, and the second to-be-expanded robot queue of the currently traversed to-be-tested robot is retained.
5. The deadlock handling method according to claim 4, characterized by, After the step of deleting the second to-be-expanded robot queue of the other to-be-tested robot and retaining the second to-be-expanded robot queue of the currently traversed to-be-tested robot, the method further comprises: The second to-be-expanded robot queue of the other to-be-tested robot is taken as a to-be-confirmed expansion robot queue; It is judged whether the robot in the to-be-confirmed expansion robot queue exists in the other second to-be-expanded robot queue; If not, the robot in the to-be-confirmed expansion robot queue is deleted from the traversed robot set, and the traversed robot set stores robots that have undergone collision detection.
6. The deadlock handling method of claim 1, wherein, The step of breadth traversal for collision detection of each to-be-tested robot according to a preset traversal order to obtain a first collision robot queue of each to-be-tested robot comprises: A corresponding second to-be-expanded robot queue is established with each to-be-tested robot as a head robot; Collision detection is performed on the tail robot of each second to-be-expanded robot queue, and the robot obtained by collision detection is added to the second to-be-expanded robot queue; Collision detection is performed on the robot obtained by collision detection as the tail robot of the second to-be-expanded robot queue until the second collision robot queue of each to-be-tested robot is obtained.
7. The deadlock handling method according to claim 6, characterized by, The step of collision detection on the robot obtained by collision detection as the tail robot of the second to-be-expanded robot queue until the second collision robot queue of each to-be-tested robot is obtained comprises: The tail robot of the second to-be-expanded robot queue is taken as a to-be-expanded robot for collision detection to obtain a second associated robot; It is judged whether each second associated robot exists in a dangerous robot set, and the dangerous robot set stores robots that have a collision risk with the target robot; If the second associated robot does not exist in the dangerous robot set, it is judged whether the second associated robot is the target robot; If the second associated robot is the target robot, it is judged whether the to-be-expanded robot exists in the dangerous robot set; If the to-be-expanded robot exists in the dangerous robot set, it is determined that the second to-be-expanded robot queue is a loop queue, and the second collision robot queue is obtained.
8. The deadlock handling method according to claim 7, characterized by, Before the step of performing collision detection on the tail robot in the second to-be-expanded robot queue as a to-be-expanded robot to obtain a second associated robot, the method further comprises: traversing the second to-be-expanded robot queue set according to the preset traversal order to determine whether there is a second to-be-expanded robot queue that has not been traversed in the current layer; if there is a second to-be-expanded robot queue that has not been traversed in the current layer, taking the tail robot in the second to-be-expanded robot queue as the to-be-expanded robot.
9. An electronic device, comprising: comprise: a memory and a processor, wherein the memory stores program instructions, and the processor fetches the program instructions from the memory to execute the method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, comprise: program data stored in the memory, wherein the program data is executed by the processor to implement the method according to any one of claims 1-8.