Path Planning Method, Device, Computer Equipment and Storage Medium
Through the minimum queue algorithm and time dimension calculation, the paths without collision are screened out, which solves the problem of mechanical interference collision in AGV path planning in the prior art, and realizes efficient and safe logistics route planning.
Patent Information
- Application Number
- CN202411113956.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-08-14
AI Technical Summary
The existing automatic guide vehicle path planning method has mechanical interference collision problems in industrial scenarios, and cannot effectively avoid collisions between AGVs, resulting in low production efficiency and equipment damage.
By obtaining map node data, AGV size and collision time points, the minimum queue algorithm and time dimension calculation are used to filter out adjacent points that do not collide, and the path of AGV is generated to ensure the safety and reliability of the path.
In the case of narrow roads and large AGVs in the factory environment, complex scene path planning for AGVs of different sizes is realized, time dimension is added, and safe logistics routes with high time efficiency, low cost and no mechanical interference are provided, which improves the safety of the AGV handling process.
Smart Images

Figure CN118896613B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path planning, and in particular to a path planning method, device, computer device and storage medium. Background Art
[0002] At present, logistics is an indispensable part of the production process. Whether it is raw materials before production, products after production, or even semi-finished products during production, timely supply and transfer are required to avoid production interruption or delay and improve production efficiency. Therefore, reasonably arranging the transfer path of materials plays a crucial role in the entire production process. Then, as the most core path planning in the entire logistics link, it has become an urgent issue to be solved currently.
[0003] In the related art, for the most common path planning in industrial scenarios, only common path planning algorithms are used to find the corresponding shortest path according to the point connection relationship. However, due to the size of the logistics AGV (Automated Guided Vehicle) and the narrowness of the workshop layout, the rotation or backward movement of the logistics AGV during the execution of the path will cause mechanical interference and collision with the surrounding AGVs. Just a simple A - B path cannot ensure that the logistics AGV has no mechanical interference and collision. If the path cannot be reasonably planned, it will not only lead to a series of problems such as unqualified production rhythm and delivery delay, but also cause damage to the material AGVs due to mutual collision. Summary of the Invention
[0004] In view of this, the present invention provides a path planning method, device, computer device and storage medium to solve the problem of unreasonable path planning of existing automated guided vehicles.
[0005] In a first aspect, the present invention provides a path planning method, and the method includes:
[0006] Obtain the node data of the map, the size of the target automated guided vehicle, the time points when the target automated guided vehicle collides with other automated guided vehicles, the starting point and the ending point of the target automated guided vehicle;
[0007] Take the starting point as the initial node, generate the initial node state corresponding to the initial node, and put the initial node state into the minimum queue;
[0008] Calculate the total weight of all node states in the minimum queue, and dequeue the first node state with the minimum total weight in the minimum queue;
[0009] According to the first node state, screen all adjacent nodes corresponding to the first node state from the node data, and generate the second node state corresponding to the adjacent nodes;
[0010] Based on the map-based node data, the size of the target automated guided vehicle (AGV), the time point when the target AGV collides with other AGVs, and the second node state, determine whether the target AGV has a collision risk;
[0011] When the target AGV has no collision risk, use the first node state as the parent node of the second node state, put the second node state into the minimum queue, and return to the step of calculating the total weight of all node states in the minimum queue. Until the first node state dequeued from the minimum queue contains the end point, obtain the relationship between the node state and the parent node state;
[0012] Based on the relationship between the node state and the parent node state, search backward from the end point to the parent node state of the end point until the start point, and after reversing the order, obtain the path of the target AGV.
[0013] In the present invention, in the industrial scenario, according to the size of the automated guided vehicle (AGV) and the remaining path time of other AGVs in the whole field, introduce the time dimension, calculate the weight of each node, screen the adjacent nodes of the node with the smallest weight in the minimum queue, judge whether the AGV collides at each adjacent node, traverse and add all non-colliding adjacent nodes in the map to the minimum queue to generate the path of the AGV, realizing the path planning of AGVs with different sizes in complex scenarios for the scenarios of narrow roads in the factory environment and large AGV individuals. An additional time dimension is added to provide a reliable operation path. According to the overall situation of the whole field, plan a high-efficiency, low-cost and safe logistics route without mechanical interference to meet the corresponding logistics operation requirements. Dynamically plan the path according to the size of the AGV body and the time point, which can improve the safety of the AGV during the handling process.
[0014] In an alternative embodiment, generating the second node state corresponding to the adjacent node includes:
[0015] Judge whether the target AGV passes through the adjacent node;
[0016] When the target AGV does not pass through the adjacent node, use the sum of the total weight of the first node state and the distance between the landmark point corresponding to the first node state and the adjacent node as the total weight of the second node state, and add 1 to the time point of the first node state to obtain the time point of the second node state;
[0017] When the target AGV passes through the adjacent node, use the sum of the total weight of the first node state and the product of the distance between the landmark point corresponding to the first node state and the adjacent node and the waiting time of the first node state plus 1 as the total weight of the second node state, and add 1 to the time point of the first node state to obtain the time point of the second node state.
[0018] In this method, since the planned path tends to move forward rather than backward and get as close to the end point as possible, the weights of the points that have already been passed are increased. The total weight of the second node state is the sum of the total weight of the first node state and the product of the distance between the landmark point corresponding to the first node state and the adjacent point and the waiting time of the first node state plus 1. Calculate the total weight of the node and increase the time point.
[0019] In an alternative implementation, based on the node data of the map, the size of the target automated guided vehicle (AGV), the time point when the target AGV collides with other AGVs, and the second node state, determining that the target AGV has a collision risk includes:
[0020] Based on the node data of the map, the time point when the target AGV collides with other AGVs, and the second node state, use a KD - tree to calculate the obstacle coordinates of the second node state;
[0021] Calculate the first distance between the obstacle coordinates and the point coordinates of the second node state, and determine whether the first distance is greater than the size of the target AGV;
[0022] When the first distance is greater than the size of the target AGV, it is determined that the target AGV has no collision risk;
[0023] When the first distance is not greater than the size of the target AGV, it is determined that the target AGV has a collision risk.
[0024] In this method, the KD - tree is used for searching key data in multi - dimensional space, such as range search and nearest - neighbor search. Use the KD - tree to output the coordinates of a nearby obstacle, calculate the Euclidean distance between this obstacle and the point coordinates. If the distance is greater than the size of the AGV, there is no collision risk; if it is less than the size of the AGV, there is a collision risk, that is, there will be interference in space at this time point, realizing collision detection in both space and time dimensions.
[0025] In an alternative implementation, determining that the target AGV has a collision risk further includes:
[0026] Obtain the remaining time for all other AGVs to reach the end point;
[0027] Determine whether the time point of the second node state is greater than the remaining time for other AGVs to reach the end point;
[0028] When the time point of the second node state is greater than the remaining time for other AGVs to reach the end point, calculate the second distance between the point coordinates of other AGVs and the point coordinates of the second node state, and determine whether the second distance is less than the first preset safety distance;
[0029] When the second distance is less than the first preset safety distance, it is determined that there is a collision risk for the target automated guided vehicle.
[0030] In this method, when other AGVs have routes, after other AGVs reach the end point, other AGVs can also be regarded as fixed obstacles. Therefore, by judging whether the second distance between the point coordinates of other automated guided vehicles and the point coordinates of the second node state is less than the first preset safety distance, the collision risk detection in time and space is realized when other AGVs reach the end point.
[0031] In an alternative embodiment, determining that the target automated guided vehicle has a collision risk further includes:
[0032] Obtain the remaining time for all running dynamic automated guided vehicles to reach the end point;
[0033] Judge whether the remaining time is the same as the time point of the second node state;
[0034] When the remaining time is the same as the time point of the second node state, calculate the third distance between the point coordinates of other automated guided vehicles and the point coordinates of the second node state, and judge whether the third distance is greater than the second preset safety distance;
[0035] When the third distance is greater than the second preset safety distance, it is determined that the target automated guided vehicle has a collision risk.
[0036] In this method, by judging whether the remaining time for the running dynamic AGV to reach the end point is the same as the remaining time of the adjacent point of the target AGV, and when they are the same, judging whether the distance between the point coordinates of other AGVs and the target AGV is greater than the safety distance, it is determined that the target AGV has a space collision with other AGVs at the specified time point, realizing the collision detection with dynamic AGVs, that is, AGVs with routes in operation.
[0037] In an alternative embodiment, the method further includes:
[0038] When the target automated guided vehicle does not reach the specified position at the preset time point, judge whether the second automated guided vehicle whose route intersects with the target automated guided vehicle reaches the specified position;
[0039] When the second automated guided vehicle reaches the specified position, control the second automated guided vehicle to stop and give way, and control the target automated guided vehicle to run to the specified position.
[0040] In this method, since the industrial scenario of empty-full exchange in a single channel is very common, for ordinary path planning, sequential planning needs to be carried out on the task scheduling side. When the target automatic guided vehicle does not reach the specified position at the preset time point, the second automatic guided vehicle is controlled to stop and avoid. By adding an avoidance function on the basis of the shortest path, the avoidance point in the single channel can be calculated, and one of the AGVs is controlled to go to the avoidance point. After waiting for one side of the AGV to pass, it goes from the avoidance point to the end point again, effectively shortening the running time and improving the transfer efficiency.
[0041] In a second aspect, the present invention provides a path planning device, the device comprising:
[0042] A data acquisition module, configured to acquire node data of a map, the size of a target automatic guided vehicle, the time point when the target automatic guided vehicle collides with other automatic guided vehicles, the starting point and the end point of the target automatic guided vehicle;
[0043] A node state generation module, configured to use the starting point as an initial node, generate an initial node state corresponding to the initial node, and put the initial node state into a minimum queue;
[0044] A node state dequeue module, configured to calculate the total weight of all node states in the minimum queue, and dequeue the first node state with the smallest total weight in the minimum queue;
[0045] An adjacent node screening module, configured to screen all adjacent nodes corresponding to the first node state from the node data according to the first node state, and generate a second node state corresponding to the adjacent nodes;
[0046] A collision detection module, configured to determine whether there is a collision risk for the target automatic guided vehicle based on the node data of the map, the size of the target automatic guided vehicle, the time point when the target automatic guided vehicle collides with other automatic guided vehicles, and the second node state;
[0047] A node traversal module, configured to when there is no collision risk for the target automatic guided vehicle, use the first node state as the parent node of the second node state, put the second node state into the minimum queue, and return to the step of calculating the total weight of all node states in the minimum queue, until the first node state dequeued from the minimum queue contains the end point, to obtain the relationship between the node state and the parent node state;
[0048] A path generation module, configured to reverse-search the parent node state of the end point from the end point to the starting point based on the relationship between the node state and the parent node state, and obtain the path of the target automatic guided vehicle after reversing the order.
[0049] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the path planning method according to the first aspect or any corresponding embodiment thereof.
[0050] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the path planning method according to the first aspect or any corresponding embodiment thereof.
[0051] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, and the computer instructions are used to cause a computer to execute the path planning method according to the first aspect or any corresponding embodiment thereof. Description of the Drawings
[0052] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0053] Figure 1 It is a flowchart of the path planning method according to an embodiment of the present invention.
[0054] Figure 2 It is the structure and input / output of a path planning algorithm based on space-time in an industrial scenario according to an embodiment of the present invention.
[0055] Figure 3 It is a schematic structural diagram of a node state according to an embodiment of the present invention.
[0056] Figure 4 It is a flowchart of a path planning algorithm based on space-time in an industrial scenario according to an embodiment of the present invention.
[0057] Figure 5 It is a flowchart of another path planning method according to an embodiment of the present invention.
[0058] Figure 6 It is a schematic diagram of the necessary logic control after path planning based on space-time in an industrial scenario according to an embodiment of the present invention.
[0059] Figure 7 It is a flowchart of yet another path planning method according to an embodiment of the present invention.
[0060] Figure 8It is a schematic diagram for detecting whether there is a collision risk between the detection state State and a fixed obstacle at timeStep according to an embodiment of the present invention.
[0061] Figure 9 It is a schematic diagram for collision detection of detecting a fixed obstacle when other AGVs reach the end point according to an embodiment of the present invention.
[0062] Figure 10 It is a schematic diagram for detecting the collision risk of a dynamic AGV according to an embodiment of the present invention.
[0063] Figure 11 It is a structural block diagram of a path planning device according to an embodiment of the present invention.
[0064] Figure 12 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Specific embodiments
[0065] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0066] In related technologies, for the most common path planning in industrial scenarios, only common path planning algorithms are used to find the corresponding shortest path according to the point connection relationship. However, due to the size of the logistics AGV (Automated Guided Vehicle) and the narrowness of the workshop layout, the rotation or backward movement of the logistics AGV during the path execution will cause mechanical interference and collision with the surrounding AGVs. Just a simple A-B path cannot ensure that the material AGV has no mechanical interference and collision. If the path cannot be reasonably planned, it will not only lead to a series of problems such as unqualified production rhythm and delivery delay, but also cause damage to the material AGVs due to mutual collision.
[0067] To solve the above problems, an embodiment of the present invention provides a path planning method for use in a computer device. It should be noted that the execution subject can be a path planning device, which can be implemented as part or all of the computer device through software, hardware, or a combination of software and hardware. Among them, the computer device can be a terminal, a client, or a server. The server can be a single server or a server cluster composed of multiple servers. The terminal in the embodiments of the present application can be other intelligent hardware devices such as a smart phone, a personal computer, or a tablet computer. In the following method embodiments, the execution subject is taken as the computer device as an example for description.
[0068] The computer device in this embodiment is applicable to the usage scenario of path planning for AGVs of different sizes in a complex industrial scenario. Through the path planning method provided by the present invention, in the industrial scenario, according to the size of the automatic guided vehicle (AGV) and the remaining path time of other AGVs in the whole field, a time dimension is introduced to calculate the weights of each node, and the adjacent nodes with the smallest weight in the smallest queue are selected. It is judged whether the AGV collides at each adjacent node, and all non-colliding adjacent nodes in the map are traversed and added to the smallest queue to generate the path of the AGV. It realizes the path planning of AGVs of different sizes in a complex scenario for the scenario where the factory environment roads are narrow and the AGV itself is large, adds an additional time dimension, and thus provides a reliable operation path. According to the overall situation of the whole field, a high-efficiency, low-cost, and mechanically interference-free and safe logistics route is planned to meet the corresponding logistics operation requirements. According to the size of the AGV body and the time point, the path is dynamically planned, which can further improve the safety during the AGV handling process.
[0069] According to an embodiment of the present invention, an embodiment of a path planning method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0070] In this embodiment, a path planning method is provided, which can be used for the above computer device. Figure 1 It is a flowchart of the path planning method according to an embodiment of the present invention, as Figure 1 shown, and the process includes the following steps:
[0071] Step S101, obtain the node data of the map, the size of the target automatic guided vehicle, the time point when the target automatic guided vehicle collides with other automatic guided vehicles, the starting point and the ending point of the target automatic guided vehicle.
[0072] In an example, Figure 2The structure, input, and output of a spatio-temporal path planning algorithm in an industrial scenario according to an embodiment of the present invention are as follows. As Figure 2 shown, the parameters obtained by the algorithm include the following four categories:
[0073] 1. All adjacent node relationships in the map: All node information in the map, including the adjacency relationships between nodes and their surrounding nodes, distance, and other information. Since the information data of the map is usually not very large, the latest map data can be input each time, and based on this map data, the adjacency relationships inside the algorithm are re-established.
[0074] Specifically, the adjacency relationship consists of three dictionaries. Each dictionary contains a key and a value, where the key is unique. The key of the first dictionary is the ID of the node, and the value is a data structure that contains the adjacent nodes around the node and their corresponding distances. The key of the second dictionary is the ID of the node, and the value is the x-y coordinates corresponding to the node. The key of the third dictionary is the x-y coordinates of the node, and the value is the node ID. In the following algorithm process, information such as adjacency relationships or coordinates corresponding to nodes can be searched at a speed of O(1).
[0075] 2. The size of the automatic guided vehicle (AGV): Since the individual sizes of logistics handling AGVs vary, when planning a path for each AGV, the actual size of the AGV is re-input.
[0076] 3. The time points of collisions with other AGVs: When other AGVs stop at a point without a route, these AGVs without a route and parked at a point can be regarded as static obstacles. When an AGV is executing a route, the time point of the current point is 0, the time point of the next point is 1, and so on. The time points of collisions with other AGVs are implemented by other algorithms, and the specific calculation method is not limited in the present invention.
[0077] 4. Start and end points: The start point is the current point where the target AGV is located, and the end point is the point where the target AGV is going.
[0078] Step S102: Use the start point as the initial node, generate the initial node state corresponding to the initial node, and put the initial node state into the minimum queue.
[0079] In an example, since a data object needs to be defined for the algorithm to store data, when the algorithm operates through each node, the node state corresponding to the node is generated. Figure 3 It is a schematic structural diagram of a node state according to an embodiment of the present invention. As Figure 3As shown, the structure of the node state consists of six parts, including: 1. Point ID / Point Coordinates: Used to record the node ID passed by the target AGV and the point coordinates of the node. 2. Time Point: Used to record the time point when the target AGV passes by, and the time point increases according to the number of nodes passed. 3. Distance from Start Weight: Used to record the distance weight from the current node where the target AGV is located to the start point. 4. Distance to End Weight: Used to record the distance (straight-line distance) from the current node where the target AGV is located to the end point. 5. Total Weight: The sum of the distance from start weight and the distance to end weight, calculated by the formula fscore = gscore + hscore, where fscore is the total weight, gscore is the distance from start weight, and hscore is the distance to end weight. 6. Waiting Time: Used to record the time the target AGV waits at the current node. Exemplarily, the initial node state with the start ID initialized can be State(timestep = 0, gscore = 0, hscore = Manhattan distance from start to end, fscore = gscore + hscore, waitTime = 0).
[0080] Step S103, calculate the total weights of all node states in the minimum queue, and dequeue the first node state with the minimum total weight in the minimum queue.
[0081] In one example, the minimum queue will pop the State with the minimum fscore.
[0082] Step S104, based on the first node state, filter all adjacent nodes corresponding to the first node state from the node data to generate second node states corresponding to the adjacent nodes.
[0083] In one example, according to the landmark id information included in the state of the first node state, look up the node data with the landmark id as the key in the internal dictionary saved by the algorithm, and obtain the value corresponding to the node data with the landmark id as the key, where the value includes information about all adjacent nodes, and traverse all adjacent nodes included in the value object obtained from the dictionary.
[0084] Step S105, based on the node data of the map, the size of the target automatic guided vehicle, the time point when the target automatic guided vehicle collides with other automatic guided vehicles, and the second node state, determine whether the target automatic guided vehicle has a collision risk.
[0085] In one example, according to the point coordinates of the second node state neighbourState, the time point, the fixed obstacles, and the time point of collision with other AGVs input externally, it is calculated whether there is a collision risk at a specific timeStep. If there is a collision risk, the neighbourState is skipped and the next round is continued.
[0086] Step S106, when there is no collision risk for the target automated guided vehicle, take the first node state as the parent node of the second node state, put the second node state into the minimum queue, and return to the step of calculating the total weight of all node states in the minimum queue until the first node state dequeued from the minimum queue contains the end point, then obtain the relationship between the node state and the parent node state.
[0087] In one example, if there is no collision risk for the target automated guided vehicle at the adjacent point, record the parent node of neighbourState as currentState, and add neighbourState to the minimum priority queue. Loop like this until the CurrentState dequeued from the minimum queue contains the end point ID, and then end the query.
[0088] Step S107, based on the relationship between the node state and the parent node state, search backward from the end point to the parent node state of the end point until the start point, and after reversing the order, obtain the path of the target automated guided vehicle.
[0089] In one example, the relationship of the parent nodes of the nodes traversed in the above steps has been saved. Search backward from the end point to the parent node of the end point until the start point is queried, and then reverse the order to obtain an ordered path from the start point to the end point.
[0090] In one implementation scenario Figure 4 is a flowchart of a path planning algorithm based on space-time in an industrial scenario according to an embodiment of the present invention, as Figure 4As shown, the spatio-temporal based path planning algorithm in an industrial scenario may include: First, initialize a state State (timestep = 0, gscore = 0, hscore = Manhattan distance from the starting point to the ending point, fscore = gscore + hscore, waitTime = 0) according to the starting point ID, and add the State object to the minimum priority queue. Next, enter the loop phase. The minimum queue will pop out the State with the minimum fscore. According to the landmark ID information contained in this state, look up in the internal dictionary saved by the algorithm with the landmark ID as the key to obtain its corresponding value, which contains information about all adjacent points. When moving from this landmark point to its adjacent points, the timeStep is incremented by 1 from the current State's timeStep, indicating that time advances one step. Traverse all adjacent points contained in the value object obtained from the dictionary. If the adjacent point has not been passed through before, create a new NeighBourState (gscore = currentState.gscore + neighbourDistance). If the adjacent point has been passed through before, create a new neighbourStahte (gscore = currentState.gscore + neighbourDistace * (currentWaitTime + 1)). Since when planning the path, it is biased towards moving forward and not going back, and trying to get closer to the ending point, the weights of the points that have been passed through before must be increased. According to the point coordinates, time point, fixed obstacles, and the time point of collision with other AGVs input externally of the neighbourState, calculate whether there is a collision risk at a specific timeStep. If there is a collision risk, this neighbourState is skipped and the next round continues; if there is no risk, record the parent node of the neighbourState as the currentState and add the neighbourState to the minimum priority queue. Loop like this until the CurrentState dequeued from the minimum queue contains the ending point ID, and the query ends. At this time, the parent-child relationships of all traversed nodes have been saved. Start backward searching for the parent node from the ending point until the starting point is found and the order is reversed, then an ordered path from the starting point to the ending point is obtained.
[0091] The path planning method provided in this embodiment introduces a time dimension for industrial scenarios, calculates the weights of each node based on the size of the automatic guided vehicle (AGV) and the remaining path time of other AGVs in the whole field, screens the adjacent nodes with the smallest weight in the minimum queue, determines whether the AGV collides at each adjacent node, traverses all non-colliding adjacent nodes in the map and adds them to the minimum queue to generate the path of the AGV. It realizes path planning for AGVs of different sizes in complex scenarios in the case of narrow roads in the factory environment and large AGV individuals, adds an additional time dimension, and thus provides a reliable operation path. According to the overall situation of the whole field, it plans a high-efficiency, low-cost and mechanically interference-free safe logistics route to meet the corresponding logistics operation requirements. It dynamically plans the path according to the size of the AGV body and the time point, and can further improve the safety during the AGV handling process.
[0092] In this embodiment, a path planning method is provided, which can be used in the above computer device. Figure 5 It is a flowchart of another path planning method according to an embodiment of the present invention, as Figure 5 shown, and this process includes the following steps:
[0093] Step S501, obtain the node data of the map, the size of the target automatic guided vehicle, the time point when the target automatic guided vehicle collides with other automatic guided vehicles, the starting point and the ending point of the target automatic guided vehicle. For details, please refer to Figure 1 Step S101 of the embodiment shown, which will not be elaborated here.
[0094] Step S502, use the starting point as the initial node, generate the initial node state corresponding to the initial node, and put the initial node state into the minimum queue.
[0095] Specifically, the above step S502 includes:
[0096] Step S5021, determine whether the target automatic guided vehicle passes through the adjacent node.
[0097] Step S5022, when the target automatic guided vehicle does not pass through the adjacent node, use the sum of the total weight of the first node state and the distance between the landmark point corresponding to the first node state and the adjacent node as the total weight of the second node state, and add 1 to the time point of the first node state to obtain the time point of the second node state.
[0098] Step S5023, when the target automatic guided vehicle passes through the adjacent node, use the sum of the total weight of the first node state and the product of the distance between the landmark point corresponding to the first node state and the adjacent node and the waiting time of the first node state plus 1 as the total weight of the second node state, and add 1 to the time point of the first node state to obtain the time point of the second node state.
[0099] In one example, after entering the loop phase, the minimum queue pops the first node state State with the minimum fscore. According to the landmark id information contained in the first node state state, look up in the internal dictionary saved by the algorithm with the landmark id as the key to obtain its corresponding value, which contains the information of all adjacent nodes. When moving from this landmark point to its adjacent nodes, the timeStep time is the timeStep of the current State of the first node state plus 1, indicating that the time advances one step. Traverse all the adjacent nodes contained in the value object obtained from the dictionary. If the adjacent node has not been passed before, create a new NeighBourState (gscore = currentState.gscore + neighbourDistance). If the adjacent node has been passed before, create a new neighbourStahte (gscore = currentState.gscore + neighbourDistace *
[0100] (currentWaitTime + 1)).
[0101] In this method, since when planning the path, it is biased towards moving forward and not going back, and tries to get closer to the end point, the weight of the points that have been passed is increased. The sum of the total weight of the first node state and the product of the distance between the landmark point corresponding to the first node state and the adjacent node and the current wait time of the first node state plus 1 is used as the total weight of the second node state. Calculate the total weight of the node and increase the time point.
[0102] Step S503, calculate the total weight of all node states in the minimum queue, and dequeue the first node state with the minimum total weight in the minimum queue. For details, please refer to Figure 1 Step S103 of the illustrated embodiment, which will not be elaborated here.
[0103] Step S504, according to the first node state, screen all adjacent nodes corresponding to the first node state from the node data, and generate a second node state corresponding to the adjacent node. For details, please refer to Figure 1 Step S104 of the illustrated embodiment, which will not be elaborated here.
[0104] Step S505, based on the node data of the map, the size of the target automated guided vehicle, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the second node state, determine whether the target automated guided vehicle has a collision risk. For details, please refer to Figure 1 Step S105 of the illustrated embodiment, which will not be elaborated here.
[0105] Step S506, when there is no collision risk for the target automatic guided vehicle, use the first node state as the parent node of the second node state, put the second node state into the minimum queue, and return to the step of calculating the total weight of all node states in the minimum queue. Until the first node state dequeued from the minimum queue contains the end point, the relationship between the node state and the parent node state can be obtained. For details, please refer to Figure 1 Step S106 of the embodiment shown, which will not be elaborated here.
[0106] Step S507, based on the relationship between the node state and the parent node state, search backward from the end point to the parent node state of the end point until the start point, and obtain the path of the target automatic guided vehicle after reversing the order. For details, please refer to Figure 1 Step S107 of the embodiment shown, which will not be elaborated here.
[0107] Step S508, when the target automatic guided vehicle does not reach the specified position at the preset time point, determine whether the second automatic guided vehicle whose route intersects with the target automatic guided vehicle reaches the specified position.
[0108] Step S509, when the second automatic guided vehicle reaches the specified position, control the second automatic guided vehicle to stop and give way, and control the target automatic guided vehicle to run to the specified position.
[0109] In one example, Figure 6 is a schematic diagram of the necessary logic control based on spatio-temporal path planning in an industrial scenario according to an embodiment of the present invention. As Figure 6 shown, when a suitable path is obtained from the above path planning algorithm, the path will be sent to the AGV. However, in some scenarios, the AGV may not reach the specified point at the specified time point timeStep due to uncontrollable factors such as speed. An additional logic for controlling the AGV is required. In an ideal situation, all AGVs will move according to the specified time timeStep. However, when the AGV does not reach the specified point at the specified time point, judge the AGV route that intersects with its route. If the specified point of the target AGV is exceeded at the specified time point, a stop command will be issued. If the target AGV does not reach the specified point within the specified time, and another AGV has reached, stop the other AGV and wait for the target AGV to run to the specified point.
[0110] In this method, since the industrial scenario of empty / full exchange in a single channel is very common, for ordinary path planning, sequential planning needs to be carried out on the task scheduling side. When the target automated guided vehicle fails to reach the specified position at the preset time point, the second automated guided vehicle is controlled to stop and give way. By adding a avoidance function on the basis of the shortest path, the avoidance points in the single channel can be calculated, and one of the AGVs is controlled to go to the avoidance point. After waiting for one side of the AGV to pass, it goes towards the end point again from the avoidance point, effectively shortening the running time and improving the transfer efficiency.
[0111] In the path planning method provided in this embodiment, since when planning the path, it tends to move forward and not go back, and tries to get closer to the end point, the weights of the points that have been passed are increased. The total weight of the second node state is the sum of the total weight of the first node state and the product of the distance between the landmark point corresponding to the first node state and the adjacent point and the waiting time of the first node state plus 1. Calculate the total weight of the node and add a time point. Since the industrial scenario of empty / full exchange in a single channel is very common, for ordinary path planning, sequential planning needs to be carried out on the task scheduling side. When the target automated guided vehicle fails to reach the specified position at the preset time point, the second automated guided vehicle is controlled to stop and give way. By adding a avoidance function on the basis of the shortest path, the avoidance points in the single channel can be calculated, and one of the AGVs is controlled to go to the avoidance point. After waiting for one side of the AGV to pass, it goes towards the end point again from the avoidance point, effectively shortening the running time and improving the transfer efficiency.
[0112] In this embodiment, a path planning method is provided, which can be used for the above computer device. Figure 7 It is a flowchart of another path planning method according to an embodiment of the present invention, as Figure 7 shown, and this process includes the following steps:
[0113] Step S701, obtain the node data of the map, the size of the target automated guided vehicle, the time point when the target automated guided vehicle collides with other automated guided vehicles, the starting point and the end point of the target automated guided vehicle. For details, please refer to Figure 5 Step S501 of the shown embodiment, which will not be elaborated here.
[0114] Step S702, use the starting point as the initial node, generate the initial node state corresponding to the initial node, and put the initial node state into the minimum queue. For details, please refer to Figure 5 Step S502 of the shown embodiment, which will not be elaborated here.
[0115] Step S703, calculate the total weight of all node states in the minimum queue, and dequeue the first node state with the minimum total weight in the minimum queue. For details, please refer to Figure 5 Step S503 of the shown embodiment, which will not be elaborated here.
[0116] Step S704: Based on the first node status, screen out all adjacent nodes corresponding to the first node status from the node data, and generate the second node status corresponding to the adjacent nodes. For details, please refer to Figure 5 Step S504 of the embodiment shown, which will not be elaborated here.
[0117] Step S705: Based on the node data of the map, the size of the target automated guided vehicle, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the second node status, determine whether the target automated guided vehicle has a collision risk.
[0118] Specifically, the above Step S705 includes:
[0119] Step S7051: Based on the node data of the map, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the second node status, use the KD tree to calculate the obstacle coordinates of the second node status.
[0120] Step S7052: Calculate the first distance between the obstacle coordinates and the point coordinates of the second node status, and determine whether the first distance is greater than the size of the target automated guided vehicle.
[0121] Step S7053: When the first distance is greater than the size of the target automated guided vehicle, determine that the target automated guided vehicle has no collision risk.
[0122] Step S7054: When the first distance is not greater than the size of the target automated guided vehicle, determine that the target automated guided vehicle has a collision risk.
[0123] In an example, Figure 8 is a schematic diagram of detecting whether there is a collision risk between a detection state State and a fixed obstacle at timeStep according to an embodiment of the present invention, as Figure 8As shown, after creating the second node state neighbourState at the corresponding time point, it is detected whether there is a collision with a fixed obstacle or a dynamic obstacle at the corresponding time point. Among them, the obstacle can be another AGV. When an AGV has no route and stops in place, in the perspective of other AGVs, the AGV that stops in place without a route is regarded as a fixed obstacle, and there is a risk of collision at any time step. After inputting the point coordinates of the current neighbourState into the KD tree, the KD tree outputs the coordinates of the fixed obstacles adjacent to the point coordinates of neighbourState. The KD tree is used for searching key data in multi-dimensional space, such as range search and nearest neighbour search. Using the characteristics of the KD tree, the coordinates of the obstacles adjacent to the point coordinates of neighbourState are output. Calculate the first distance (Euclidean distance) between the obstacle coordinates and the point coordinates of neighbourState. If the first distance is greater than the size of the AGV, the target automated guided vehicle has no collision risk at the adjacent point; if it is less than the size of the AGV, the target automated guided vehicle has a collision risk at the adjacent point, that is, there will be interference in space at this time point, and this neighbourState will not be added to the minimum priority queue for calculation.
[0124] In this method, the KD tree is used for searching key data in multi-dimensional space, such as range search and nearest neighbour search. Using the KD tree to output the coordinates of a nearby obstacle, calculate the Euclidean distance between the obstacle and the point coordinates. If the distance is greater than the size of the AGV, there is no collision risk; if it is less than the size of the AGV, there is a collision risk, that is, there will be interference in space at this time point, realizing collision detection in the space and time dimensions.
[0125] In an alternative embodiment, determining that the target automated guided vehicle has a collision risk further includes:
[0126] Step a1, obtain the remaining time for all other automated guided vehicles to reach the end point.
[0127] Step a2, determine whether the time point of the second node state is greater than the remaining time for other automated guided vehicles to reach the end point.
[0128] Step a3, when the time point of the second node state is greater than the remaining time for other automated guided vehicles to reach the end point, calculate the second distance between the point coordinates of the other automated guided vehicles and the point coordinates of the second node state, and determine whether the second distance is less than the first preset safety distance.
[0129] Step a4, when the second distance is less than the first preset safety distance, determine that the target automated guided vehicle has a collision risk.
[0130] In one example, when other AGVs reach the end point along a route, they can also be regarded as fixed obstacles. Figure 9 It is a schematic diagram of collision detection for detecting that other AGVs are regarded as fixed obstacles after reaching the end point according to an embodiment of the present invention. As Figure 9 shown, obtain all AGVs with routes and the remaining time for the AGVs with routes to reach the end point. Traverse the data of the remaining time for other AGVs with routes to reach the end point, and compare whether the timeStep of NeighbourState is greater than the time point after other AGVs with routes reach the end point: that the timeStep of NeighbourState is greater than the time point after other AGVs with routes reach the end point indicates that the target AGV reaches the end point after the timeStep time point and there may be a collision. Therefore, when the timeStep time point of neighbourState is greater than the remaining time for other AGVs to reach the end point, calculate the second distance (Euclidean distance) between the position coordinates of other automatic guided vehicles and the position coordinates of the second node state, and compare whether this distance is less than twice the size of the AGV (the first safety distance). If it is less than the first safety distance, the target automatic guided vehicle has a collision risk; if it is greater than the first safety distance, the target automatic guided vehicle has no collision risk and the next detection can be carried out.
[0131] In this method, when other AGVs have routes, after other AGVs reach the end point, other AGVs can also be regarded as fixed obstacles. Therefore, by judging whether the second distance between the position coordinates of other automatic guided vehicles and the position coordinates of the second node state is less than the first preset safety distance, collision risk detection in terms of time and space in the case of other AGVs reaching the end point is realized.
[0132] In an alternative embodiment, determining that the target automatic guided vehicle has a collision risk further includes:
[0133] Step b1, obtain the remaining time for all running dynamic automatic guided vehicles to reach the end point.
[0134] Step b2, judge whether the remaining time is the same as the time point of the second node state.
[0135] Step b3, when the remaining time is the same as the time point of the second node state, calculate the third distance between the position coordinates of other automatic guided vehicles and the position coordinates of the second node state, and judge whether the third distance is greater than the second preset safety distance.
[0136] Step b4, when the third distance is greater than the second preset safety distance, determine that the target automatic guided vehicle has a collision risk.
[0137] In one example, Figure 10It is a schematic diagram for detecting the collision risk of a dynamic AGV according to an embodiment of the present invention. As Figure 10 shown, after the detections in the first two time and space dimensions, it is also necessary to perform a collision detection with the dynamic AGV, that is, the AGV running on a route. First, obtain the remaining route of other AGVs running on a route currently. The timeStep of the remaining route of other AGVs starts from 0. When the timeStep of the remaining route of other AGVs is the same as the timeStep of neighbourState, calculate the third distance (Euclidean distance) between the point coordinates of other automatic guided vehicles and the point coordinates of the second node state, and determine whether the third distance is greater than twice the size of the AGV: If the third distance is less than twice the size of the AGV, the target automatic guided vehicle has no collision risk; if the third distance is greater than twice the size of the AGV, the target automatic guided vehicle has a collision risk, and this neighbourState has a spatial collision with other AGVs at the specified time point and will not be added to the minimum priority queue to continue searching downwards.
[0138] In this method, by judging whether the remaining time for the running dynamic AGV to reach the end point is the same as the remaining time of the adjacent point of the target AGV, and when they are the same, judging whether the distance between the point coordinates of other AGVs and the target AGV is greater than the safety distance, it is determined that the target AGV has a spatial collision with other AGVs at the specified time point, thus realizing the collision detection with the dynamic AGV, that is, the AGV running on a route.
[0139] Step S706, when the target automatic guided vehicle has no collision risk, take the first node state as the parent node of the second node state, put the second node state into the minimum queue, and return to the step of calculating the total weight of all node states in the minimum queue until the first node state dequeued from the minimum queue contains the end point, then obtain the relationship between the node state and the parent node state. For details, please refer to Figure 5 step S506 of the embodiment shown here, which will not be elaborated further here.
[0140] Step S707, based on the relationship between the node state and the parent node state, search backwards from the end point to the parent node state of the end point until the start point, and after reversing the order, obtain the path of the target automatic guided vehicle. For details, please refer to Figure 5 step S507 of the embodiment shown here, which will not be elaborated further here.
[0141] The path planning method provided in this embodiment uses a KD tree for searching key data in a multi-dimensional space, such as range search and nearest neighbor search. The KD tree is used to output the coordinates of a nearby obstacle, and the Euclidean distance between the obstacle and the point coordinates is calculated. If the distance is greater than the size of the AGV, there is no collision risk; if it is less than the size of the AGV, there is a collision risk, that is, there will be interference in the space at this time point, realizing collision detection in the space and time dimensions. When other AGVs have routes, after other AGVs reach the end point, other AGVs can also be regarded as fixed obstacles. Therefore, by judging whether the second distance between the point coordinates of other automatic guided vehicles and the point coordinates of the second node state is less than the first preset safety distance, collision risk detection in time and space in the case of other AGVs reaching the end point is realized. By judging whether the remaining time for the running dynamic AGV to reach the end point is the same as the remaining time of the adjacent point of the target AGV, and when they are the same, judging whether the distance between the point coordinates of other AGVs and the target AGV is greater than the safety distance, it is determined that the target AGV has a space collision with other AGVs at a specified time point, realizing collision detection with dynamic AGVs, that is, AGVs with routes in operation.
[0142] In this embodiment, a path planning device is also provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0143] This embodiment provides a path planning device, as Figure 11 shown, including:
[0144] A data acquisition module 1101, configured to acquire node data of a map, the size of a target automatic guided vehicle, the time point when the target automatic guided vehicle collides with other automatic guided vehicles, the starting point and the end point of the target automatic guided vehicle. For details, please refer to Figure 1 step S101 of the embodiment shown, which will not be repeated here.
[0145] A node state generation module 1102, configured to use the starting point as an initial node, generate an initial node state corresponding to the initial node, and put the initial node state into a minimum queue. For details, please refer to Figure 1 step S102 of the embodiment shown, which will not be repeated here.
[0146] A node state dequeue module 1103, configured to calculate the total weight of all node states in the minimum queue, and dequeue the first node state with the minimum total weight in the minimum queue. For details, please refer to Figure 1Step S103 of the illustrated embodiment will not be elaborated here.
[0147] The adjacent node screening module 1104 is configured to screen, according to the first node state, all adjacent nodes corresponding to the first node state from the node data, and generate a second node state corresponding to the adjacent node. For details, please refer to Figure 1 Step S104 of the illustrated embodiment will not be elaborated here.
[0148] The collision detection module 1105 is configured to determine whether there is a collision risk for the target automated guided vehicle based on the node data of the map, the size of the target automated guided vehicle, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the second node state. For details, please refer to Figure 1 Step S105 of the illustrated embodiment will not be elaborated here.
[0149] The node traversal module 1106 is configured to, when there is no collision risk for the target automated guided vehicle, use the first node state as the parent node of the second node state, put the second node state into the minimum queue, and return the step of calculating the total weight of all node states in the minimum queue until the first node state dequeued from the minimum queue contains the end point, so as to obtain the relationship between the node state and the parent node state. For details, please refer to Figure 1 Step S106 of the illustrated embodiment will not be elaborated here.
[0150] The path generation module 1107 is configured to, based on the relationship between the node state and the parent node state, search backward from the end point for the parent node state of the end point until the start point, and obtain the path of the target automated guided vehicle after reversing the order. For details, please refer to Figure 1 Step S107 of the illustrated embodiment will not be elaborated here.
[0151] In some alternative embodiments, the node state generation module 1102 includes:
[0152] The adjacent node passing judgment unit is configured to judge whether the target automated guided vehicle passes through the adjacent node.
[0153] The first weight calculation unit is configured to, when the target automated guided vehicle does not pass through the adjacent node, use the sum of the total weight of the first node state and the distance between the landmark point corresponding to the first node state and the adjacent node as the total weight of the second node state, and add 1 to the time point of the first node state to obtain the time point of the second node state.
[0154] The second weight calculation unit is configured to, when the target automated guided vehicle passes through the adjacent node, use the sum of the total weight of the first node state and the product of the distance between the landmark point corresponding to the first node state and the adjacent node and the waiting time of the first node state plus 1 as the total weight of the second node state, and add 1 to the time point of the first node state to obtain the time point of the second node state.
[0155] In some alternative embodiments, the collision detection module 1105 includes:
[0156] An obstacle coordinate calculation unit, configured to calculate the obstacle coordinates of the second node state by using a KD tree based on the node data of the map, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the second node state.
[0157] A first distance calculation unit, configured to calculate a first distance between the obstacle coordinates and the point coordinates of the second node state, and determine whether the first distance is greater than the size of the target automated guided vehicle.
[0158] A non-collision risk determination unit, configured to determine that there is no collision risk for the target automated guided vehicle when the first distance is greater than the size of the target automated guided vehicle.
[0159] A first collision risk determination unit, configured to determine that there is a collision risk for the target automated guided vehicle when the first distance is not greater than the size of the target automated guided vehicle.
[0160] In some alternative embodiments, the collision detection module 1105 includes:
[0161] A first remaining time acquisition unit, configured to acquire the remaining time for all other automated guided vehicles to reach the end point.
[0162] A first remaining time judgment unit, configured to judge whether the time point of the second node state is greater than the remaining time for other automated guided vehicles to reach the end point.
[0163] A second distance calculation unit, configured to calculate a second distance between the point coordinates of other automated guided vehicles and the point coordinates of the second node state when the time point of the second node state is greater than the remaining time for other automated guided vehicles to reach the end point, and determine whether the second distance is less than a first preset safety distance.
[0164] A second collision risk determination unit, configured to determine that there is a collision risk for the target automated guided vehicle when the second distance is less than the first preset safety distance.
[0165] In some alternative embodiments, the collision detection module 1105 includes:
[0166] A second remaining time calculation unit, configured to acquire the remaining time for all running dynamic automated guided vehicles to reach the end point.
[0167] A second remaining time judgment unit, configured to judge whether the remaining time is the same as the time point of the second node state.
[0168] A third distance calculation unit, configured to calculate a third distance between the point coordinates of other automatic guided vehicles and the point coordinates of the second node state when the remaining time is the same as the time point of the second node state, and determine whether the third distance is greater than a second preset safety distance;
[0169] A third collision risk determination unit, configured to determine that there is a collision risk for the target automatic guided vehicle when the third distance is greater than the second preset safety distance.
[0170] In some optional embodiments, the path planning device further includes:
[0171] A designated position judgment unit, configured to judge whether a second automatic guided vehicle whose route intersects with that of the target automatic guided vehicle reaches a designated position when the target automatic guided vehicle does not reach the designated position at a preset time point.
[0172] A control avoidance unit, configured to control the second automatic guided vehicle to stop and avoid when the second automatic guided vehicle reaches the designated position, and control the target automatic guided vehicle to run to the designated position.
[0173] The further function descriptions of the above-mentioned various modules and units are the same as those in the corresponding embodiments above, and will not be repeated here.
[0174] The path planning device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0175] The embodiment of the present invention further provides a computer device having the above-mentioned Figure 11 shown path planning device.
[0176] Please refer to Figure 12 , Figure 12 which is a schematic structural diagram of a computer device provided by an optional embodiment of the present invention. As shown in Figure 12As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as a server array, a set of blade servers, or a multi-processor system). Figure 12 Take one processor 10 as an example in Figure 12 .
[0177] The processor 10 can be a central processing unit, a network processor, or a combination thereof. Among them, the processor 10 can further include a hardware chip. The above hardware chip can be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The above programmable logic device can be a complex programmable logic device, a field programmable gate array, a generic array logic, or any combination thereof.
[0178] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiments.
[0179] The memory 20 can include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 can optionally include a memory remotely set relative to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0180] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 can also include a combination of the above types of memories.
[0181] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected through a bus or other means. Figure 12 Take the connection through the bus as an example.
[0182] The input device 30 can receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a tactile feedback device (e.g., a vibration motor), etc. The above display device includes but is not limited to a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.
[0183] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0184] A part of the present invention can be applied as a computer program product, such as computer program instructions. When executed by a computer, through the operation of the computer, the methods and / or technical solutions according to the present invention can be called or provided. Those skilled in the art should be able to understand that the forms of existence of computer program instructions in a computer-readable medium include but are not limited to source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include but are not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible by the computer.
[0185] Although embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations fall within the scope defined by the appended claims.
Claims
1. A path planning method, characterized in that: The method comprises: Obtaining node data of the map, the size of the target automated guided vehicle, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the starting point and end point of the target automated guided vehicle; Taking the starting point as the initial node, generating an initial node state corresponding to the initial node, and placing the initial node state into a minimum queue; Calculate the total weight of all node states in the minimum queue, and remove the first node state with the smallest total weight from the minimum queue; According to the first node state, all adjacent points corresponding to the first node state are obtained by screening from the node data, and a second node state corresponding to the adjacent points is generated; Determining whether there is a collision risk for the target automated guided vehicle based on the node data of the map, the size of the target automated guided vehicle, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the second node state; When there is no collision risk with the target automated guided vehicle, taking the first node state as the parent node of the second node state, placing the second node state into the minimum queue, returning to the step of calculating the total weight of all node states in the minimum queue, until the first node state out of the minimum queue includes the end point, and obtaining the relationship between the node state and the parent node state; Based on the relationship between the node state and the parent node state, the parent node state of the end point is searched reversely from the end point to the starting point, and the path of the target automatic guided vehicle is obtained after reversing the order.
2. The method according to claim 1, characterized in that The generating the second node state corresponding to the adjacent point includes: Determining whether the target automated guided vehicle passes through the adjacent point; When the target automated guided vehicle has not passed the adjacent point, taking the sum of the total weight of the first node state and the distance between the landmark point corresponding to the first node state and the adjacent point as the total weight of the second node state, and adding 1 to the time point of the first node state to obtain the time point of the second node state; When the target automatic guided vehicle passes the adjacent point, the total weight of the first node state and the product of the distance between the landmark point corresponding to the first node state and the adjacent point and the waiting time of the first node state plus 1 are taken as the total weight of the second node state, and the time point of the first node state is added by 1 to obtain the time point of the second node state.
3. The method according to claim 1, characterized in that The determining whether there is a collision risk of the target automated guided vehicle based on the node data of the map, the size of the target automated guided vehicle, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the second node state includes: Obtaining the obstacle coordinates of the second node state by using a KD tree calculation based on the node data of the map, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the second node state; Calculating a first distance between the obstacle coordinates and the point coordinates of the second node state, and determining whether the first distance is greater than a size of the target automated guided vehicle; When the first distance is greater than the size of the target automated guided vehicle, determining that there is no collision risk with the target automated guided vehicle; When the first distance is not greater than the size of the target automated guided vehicle, it is determined that there is a collision risk with the target automated guided vehicle.
4. The method according to claim 1, characterized in that: The determining whether the target automated guided vehicle has a collision risk further includes: Obtain the remaining time for all other automated guided vehicles to reach the destination; Determine whether the time point of the second node state is greater than the remaining time for the other automated guided vehicle to reach the end point; When the time point of the second node state is greater than the remaining time for the other automated guided vehicle to reach the end point, calculating a second distance between the point coordinates of the other automated guided vehicle and the point coordinates of the second node state, and determining whether the second distance is less than a first preset safety distance; When the second distance is less than the first preset safety distance, it is determined that there is a collision risk with the target automatic guided vehicle.
5. The method according to claim 1, characterized in that: The determining whether the target automated guided vehicle has a collision risk further includes: Obtain the remaining time for all running dynamic automated guided vehicles to reach the destination; Determining whether the remaining time is the same as the time point of the second node state; When the remaining time is the same as the time point of the second node state, calculating a third distance between the point coordinates of the other automated guided vehicle and the point coordinates of the second node state, and determining whether the third distance is greater than a second preset safety distance; When the third distance is greater than the second preset safety distance, it is determined that there is a collision risk with the target automatic guided vehicle.
6. The method according to claim 1, characterized in that The method further comprises: When the target automated guided vehicle does not arrive at the designated location at a preset time point, determining whether a second automated guided vehicle that intersects the route of the target automated guided vehicle has arrived at the designated location; When the second automated guided vehicle reaches the designated position, the second automated guided vehicle is controlled to stop and avoid, and the target automated guided vehicle is controlled to run to the designated position.
7. A path planning device, characterized in that: The device comprises: A data acquisition module, used to acquire node data of the map, the size of the target automated guided vehicle, the time point when the target automated guided vehicle collides with other automated guided vehicles, and the starting point and end point of the target automated guided vehicle; A node state generation module, used to use the starting point as an initial node, generate an initial node state corresponding to the initial node, and put the initial node state into a minimum queue; A node state dequeue module, used for calculating the total weight of all node states in the minimum queue, and dequeueing the first node state with the smallest total weight in the minimum queue; an adjacent point screening module, configured to screen all adjacent points corresponding to the first node state from the node data according to the first node state, and generate a second node state corresponding to the adjacent points; a collision detection module, configured to determine whether there is a collision risk for the target automated guided vehicle based on the node data of the map, the size of the target automated guided vehicle, the time point at which the target automated guided vehicle collides with other automated guided vehicles, and the second node state; A node traversal module, for, when there is no collision risk with the target automated guided vehicle, using the first node state as the parent node of the second node state, placing the second node state into the minimum queue, returning to the step of calculating the total weight of all node states in the minimum queue, until the first node state out of the minimum queue contains the end point, and obtaining the relationship between the node state and the parent node state; The path generation module is used to reversely search the parent node state of the end point from the end point to the start point based on the relationship between the node state and the parent node state, and obtain the path of the target automatic guided vehicle after reversing the order.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the path planning method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the path planning method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the path planning method according to any one of claims 1 to 6.
Citation Information
Patent Citations
AGV online collision-free path planning method suitable for large-scale warehousing system
CN112161630A
Workshop logistics-oriented distributed dynamic path planning method for multiple automatic guided vehicles
CN114489062A