CN113739798B - Path planning method and device - Google Patents

Path planning method and device Download PDF

Info

Publication number
CN113739798B
CN113739798B CN202011225980.7A CN202011225980A CN113739798B CN 113739798 B CN113739798 B CN 113739798B CN 202011225980 A CN202011225980 A CN 202011225980A CN 113739798 B CN113739798 B CN 113739798B
Authority
CN
China
Prior art keywords
node
path
starting
candidate
destination
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011225980.7A
Other languages
Chinese (zh)
Other versions
CN113739798A (en
Inventor
万昭良
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Qianshi Technology Co Ltd
Original Assignee
Beijing Jingdong Qianshi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Qianshi Technology Co Ltd filed Critical Beijing Jingdong Qianshi Technology Co Ltd
Priority to CN202011225980.7A priority Critical patent/CN113739798B/en
Publication of CN113739798A publication Critical patent/CN113739798A/en
Application granted granted Critical
Publication of CN113739798B publication Critical patent/CN113739798B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/20Instruments for performing navigational calculations

Landscapes

  • Engineering & Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Navigation (AREA)

Abstract

The invention discloses a path planning method and device, and relates to the technical field of computers. One embodiment of the path planning method comprises the following steps: receiving a path planning request, wherein the path planning request indicates an initial node and a destination node; determining a path node between the starting node and the destination node according to the path planning request and a preset map; the partial nodes of the preset map at least comprise: the viaduct attribute is used for representing the position of the viaduct and selecting the preference degree of the viaduct when planning a path; and planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum. The implementation mode can take the overpass attribute of the node as basic data to carry out path planning, and can solve the problem that the existing planning mode can not realize path planning at the overpass.

Description

Path planning method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a path planning method and apparatus.
Background
In general, in the process of transporting goods by a transporting device (e.g., an automatically guided mobile robot), a main road is congested to some extent because most of the transporting devices pass through the main road. To relieve traffic pressure on the thoroughfares, a fast path may be established on the thoroughfares, such as: viaducts. However, most of the path planning process of the transportation device is completed based on a two-dimensional map, the existing planning mode cannot realize the path planning at the viaduct, the path planning requirement cannot be met, and improvement on the existing planning mode is needed.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a path planning method and a path planning device, which can solve the problem that the existing planning mode can not realize path planning at a viaduct.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a path planning method.
The path planning method of the embodiment of the invention comprises the following steps:
receiving a path planning request, wherein the path planning request indicates an initial node and a destination node;
determining a path node between the starting node and the destination node according to the path planning request and a preset map; the partial nodes of the preset map at least comprise: the viaduct attribute is used for representing the position of the viaduct and selecting the preference degree of the viaduct when planning a path;
And planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum.
Optionally, the determining a path node between the starting node and the destination node according to the path planning request and a preset map includes:
determining a path node between the starting node and the destination node based on a path finding algorithm according to the path planning request and a preset map;
the step of planning the path from the initial node to the destination node according to the path node comprises the following steps:
forming a path sequence according to the starting node, the path node and the destination node;
and reversing the order of the path sequence to generate a path from the starting node to the destination node.
Optionally, the determining, according to the path planning request and a preset map, a path node between the starting node and the destination node based on a path finding algorithm includes:
determining adjacent nodes in the feasible direction of the current node from the initial node according to the path planning request and a preset map, and taking the adjacent nodes in the feasible direction of the current node as candidate nodes;
If the candidate node is not the destination node, calculating the distance from the starting node to the destination node through the candidate node;
taking the candidate node with the minimum distance as a first path node, wherein the first path node is the next path node of the current node; repeating the steps to determine the next path node of the first path node until the candidate node is the destination node.
Optionally, the calculating the distance between the starting node and the destination node through the candidate node includes:
determining a first distance from the starting node to the candidate node and a second distance from the candidate node to the destination node;
and determining the sum of the first distance and the second distance as the distance from the starting node to the destination node through the candidate node.
Optionally, if the current node has a overpass attribute, the candidate node at least includes: and the coordinates of the communicated end points of the father node and the viaduct.
Optionally, the overpass attribute includes at least: and a node set, configured to form a path sequence according to the start node, the path node, and the destination node, including:
Determining a father node of a current node, starting from the current node as the target node until the father node is the starting node;
judging whether a parent node of the current node has a viaduct attribute or not;
if yes, adding the node set corresponding to the father node into a path sequence;
if not, the father node is added into the path sequence.
Optionally, the overpass attribute further includes: the method comprises the following steps of preference degree and a node initial G value, wherein the node initial G value is used for representing the moving overhead of an overhead bridge starting point;
the determining a first distance from the starting node to the candidate node includes:
and when the candidate node has the overpass attribute, determining a first distance from the starting node to the candidate node according to the preference degree in the overpass attribute and the node initial G value.
To achieve the above object, according to another aspect of an embodiment of the present invention, there is provided a path planning apparatus.
The path planning device of the embodiment of the invention comprises:
a receiving module, configured to receive a path planning request, where the path planning request indicates an originating node and a destination node;
the determining module is used for determining a path node between the starting node and the destination node according to the path planning request and a preset map; the partial nodes of the preset map at least comprise: overpass properties;
And the planning module is used for planning the path from the starting node to the destination node according to the path node so that the distance from the starting node to the destination node through the path node is minimum.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus.
The electronic equipment of the embodiment of the invention comprises:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the methods described above.
To achieve the above object, according to still another aspect of an embodiment of the present invention, a computer-readable medium is provided.
The computer readable medium of an embodiment of the present invention has stored thereon a computer program which, when executed by a processor, implements a method as described above.
One embodiment of the above invention has the following advantages or benefits:
in the embodiment of the invention, firstly, a path node between an initial node and a destination node is determined according to a received path planning request and a preset map; and then planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum. The part of nodes of the preset map have viaduct attributes, the viaduct attributes of the nodes can be used as basic data for path planning, and the problem that the path planning at the viaduct can not be realized in the existing planning mode can be solved.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a flow chart of a path planning method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of a two-dimensional code map;
FIG. 3 is a schematic diagram of path planning according to an embodiment of the present invention;
FIG. 4 is a flow chart of a path planning method according to a second embodiment of the present invention;
FIG. 5 is a schematic diagram of a path planning process according to an embodiment of the present invention;
FIG. 6 is a flow chart of a path planning method according to a third embodiment of the present invention;
FIG. 7 is a block diagram of a path planning apparatus according to an embodiment of the present invention;
FIG. 8 is an exemplary system architecture diagram in which embodiments of the present invention may be applied;
fig. 9 is a schematic diagram of a computer system suitable for use in implementing an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a flow chart of a path planning method according to a first embodiment of the present invention, and as shown in fig. 1, the path planning method may include the following steps S101 to S103.
Step S101: a path planning request is received, the path planning request indicating an originating node and a destination node.
In step S101, the path planning request may be understood as a planning request for a path from the originating node to the destination node. The originating node may be understood as the origin of the path plan and the destination node may be understood as the destination of the path plan.
Step S102: and determining a path node between the starting node and the destination node according to the path planning request and a preset map.
In step S102, path planning may be performed on a preset map according to the path planning request. The preset map may be a map network in the form of a code point map, for example: two-dimensional code maps, grid maps or other representations, wherein the two-dimensional code maps can also be represented by grid maps. The preset map is provided with a plurality of nodes, and the attributes of the nodes at least comprise: coordinates x, coordinates y, feasible directions, overhead endpoint coordinates, and overhead G values. The feasible direction is understood to be the direction in which the vehicle is allowed to travel, and can be an up, down, left, right and/or overhead direction based on a two-dimensional map. Taking the two-dimensional code map shown in fig. 2 as an example, 0 represents a road, 1 represents a shelf position, and the attribute of a node can be set as a parameter in path planning.
To facilitate the completion of the path planning process, map base data may be constructed, and a representation of the overpass may be constructed in the database by defining the attributes of the nodes, prior to step S102. The partial nodes of the preset map at least comprise: overpass properties, which refer to properties related to overpasses. It is understood that the position of the overpass and the preference degree of selecting the overpass when planning a path can be known by the overpass attribute. For example: the overpass properties include at least: preference, node set, node initial G value. In addition, the overpass may include one or more of the following: overpass identity (id), overpass start point and overpass end point. The viaduct ids are used for distinguishing different viaducts, and the preference is used for indicating the preference degree of selecting the viaduct in path planning, and it should be noted that the preference degree can be predefined according to experience of an operator or other definition rules, for example: the preference in the overpass attribute can be set larger in the crowded road section (e.g. main road section) to solve the traffic jam problem. Meanwhile, a preset threshold value of the preference degree can be set, and an overhead bridge to be passed through is selected according to the preset threshold value so as to facilitate path planning.
For example: when the preference degree is larger than a preset threshold value, the probability that the viaduct is selected in the path planning process is large; when the preference degree is smaller than a preset threshold value, the probability that the viaduct is selected in the path planning process is small. The preset threshold value may be determined according to actual requirements, for example: the preset threshold may be defined as 100, and it should be noted that the above description about the specific value of the preset threshold is only an example and not limited to the specific value of the preset threshold. The node set is used for representing a set formed by corresponding nodes of the overpass. The node initial G value is used for representing the mobile overhead of the starting point of the overhead bridge. Wherein, table 1 is used for illustrating an example of the overpass attribute, the overpass attribute may be predefined in MySQL database, which is a relational database management system.
Table 1 exemplary illustration of overpass properties
Field value Description of the invention Example
bridge_id Viaduct id 001
preference Preference degree 120
point_set Node set (‘1011,1012,1013,1014,1015’)
bridge_g_init Node initial G value 5
from_p Starting point 1011
end_p Endpoint (endpoint) 1015
Further, a path node between the start node and the destination node may be determined based on a routing algorithm according to the path planning request and a preset map. It should be noted that, the path node refers to a node that is routed from the start node to the destination node in a preset map. When the preset map is a two-dimensional code map, the starting node, the path node and the destination node can be understood as two-dimensional codes corresponding to the preset map. For example: referring to fig. 2,0 represents a road, 1 represents a shelf position, wherein two-dimensional codes of a node a and a node D may be respectively used as the start node and the destination node.
In order to determine a path node between the start node and the destination node, starting from the start node, determining a neighboring node of the current node in the feasible direction, and taking the neighboring node of the current node in the feasible direction as a candidate node. Then judging whether the candidate node is the destination node or not; if the candidate node is not the destination node, calculating a distance from the start node to the destination node through the candidate node, wherein the distance can be Manhattan distance or Euclidean distance. And taking the candidate node with the minimum distance as a first path node, wherein the first path node is the next path node of the current node, and repeating the above processes to determine other path nodes until the candidate node is the destination node.
In order to facilitate understanding of the meaning of the neighboring node, an exemplary description will be given below taking a two-dimensional code map shown in fig. 2 as an example. The starting node and the destination node are respectively a node A and a node D. Taking node B as an example, the feasible direction of node B is the arrow direction shown in the figure. As can be seen from the two-dimensional code map shown in fig. 2, the neighboring nodes of the node B include: node a and node C may be considered as candidate nodes.
In the embodiment of the present invention, the calculation process of the distance from the starting node to the destination node is approximately: first a first distance of the starting node to the candidate node and a second distance of the candidate node to the destination node are determined. And then determining the sum of the first distance and the second distance as the distance from the starting node to the destination node through the candidate node.
Further, the distance from the originating node to the destination node may be determined according to the following function
F=G+H
Where G represents the distance from the starting node to a candidate node along the generated path (otherwise referred to as mobile overhead), and H represents the distance from the candidate node to the destination node, for example: h may be the estimated manhattan distance. Note that, the attributes of the node further include: f value, G value, and H value. And the efficiency and accuracy of finding the optimal path can be different by adopting different cost functions.
When the candidate node has the overpass attribute, a first distance from the starting node to the candidate node, or referred to as an overhead G value, may be determined according to the preference in the overpass attribute and the node initial G value. The overhead G value is understood to be the distance from the starting point of the overpass, which is an attribute unique to the starting point of the overpass.
Further, when the candidate node has the overpass attribute, the following formula may be adopted to determine the overpass G value or the first distance
Overhead G value = node initial G value (100/preference degree)
If the current Node has a overpass attribute, the labeling instance of the Node may be node=node (father, x, y). If the current node has the overpass attribute, the attribute of the candidate node at least comprises: and the coordinates of the connecting end points of the father node and the viaduct are communicated. For example: if the current Node has a overpass attribute, the labeling example of the candidate Node may be adjacent=node (parent Node, overhead communication endpoint x coordinate Node. B_x, overhead communication endpoint y coordinate Node. B_y). When determining the path sequence, a parent node of the current node may be determined first, starting from the current node as the destination node until the parent node of the current node is the start node. Then judging whether the father node of the current node has a viaduct attribute or not; if yes, adding the node set corresponding to the father node into a path sequence; if not, the father node is added into the path sequence.
Step S103: and planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum.
In step S103, a path sequence is first formed according to the start node, the path node, and the destination node. And then reversing the order of the path sequence to generate a path from the starting node to the destination node. For example: referring to fig. 2, the starting node and the destination node are node a and node D, the formed path sequence is node d→node c→node b→node a, and the path sequence obtained after the path sequence is inverted is node a→node b→node c→node D, which is the path from the starting node to the destination node.
After step S103, the method further comprises: and storing the path from the starting node to the destination node into a memory. Therefore, when the path from the starting node to the destination node needs to be planned again, the path stored in the memory can be directly called, and the path planning process is simplified. Correspondingly, before step S103, the method further comprises: judging whether a path from the initial node to the target node is stored in a memory or not; if yes, adopting the path stored in the memory; otherwise, step S103 is performed.
For example: fig. 3 shows that the path planning process is completed on a two-dimensional code map according to the path planning request, and referring to fig. 3, a overpass-like path is built in the two-dimensional code map, so that a rapid path from node to node or from node to region is realized. In fig. 3 there are two scenarios:
scene one: AGVs finish charging at the charging pile C2 and then go to the left working area carrying goods shelves, and the AGVs can travel the path A to enter the main road according to the normal path planning, so that the traffic pressure of the main road can be increased, and the main road is further caused to be congested. In order to solve the problem of road congestion, viaducts can be erected between C2 and R1. Thus, the AGVs from the start point C2 can be guided to travel under the shelves of the row R1 to split the main road.
Scene II: the AGV of zone A picks up or delivers material from S to queue location Q, and normally the distance from the start point S to both path 1 and path 2 of queue location Q is the same. Because the passage pressure of the path 2 is minimum, in order to achieve the drainage purpose, the AGVs passing through the S point and having the destination point near the queuing position Q can be all drained to the passage where the path 2 is located, and a viaduct passage can be established between the S point and the D point.
In the embodiment of the invention, firstly, the path node between the starting node and the destination node is determined according to the received path planning request and the preset map. And then planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum. The part of nodes of the preset map have viaduct attributes, the viaduct attributes of the nodes can be used as basic data for path planning, and the problem that the path planning at the viaduct can not be realized in the existing planning mode can be solved.
Fig. 4 is a flow chart of a path planning method according to a second embodiment of the present invention, and as shown in fig. 4, the path planning method may include the following steps S401 to S406.
Step S401: receiving a path planning request, the path planning request comprising: an originating node and a destination node.
In step S401, the path planning request may be understood as a planning request for a path from the originating node to the destination node. The originating node may be understood as the origin of the path plan and the destination node may be understood as the destination of the path plan.
Step S402: judging whether a path from the initial node to the target node is stored in a memory or not; if yes, go to step S403; otherwise, step S404 is performed.
Step S403: and adopting the paths stored in the memory.
Step S404: determining a path node between the starting node and the destination node based on a path finding algorithm according to the path planning request and a preset map; the partial nodes of the preset map at least comprise: overpass properties.
In step S404, path planning may be performed on a preset map according to the path planning request. The preset map may be a map network in the form of a code point map, for example: two-dimensional code maps, grid maps or other representations, wherein the two-dimensional code maps can also be represented by grid maps. The preset map is provided with a plurality of nodes, and the attributes of the nodes at least comprise: coordinates x, coordinates y, feasible directions, overhead endpoint coordinates, and overhead G values. The feasible direction is understood to be a permissible driving direction, which can be an up, down, left, right and/or overhead direction, based on a two-dimensional map. Taking the two-dimensional code map shown in fig. 2 as an example, 0 represents a road, 1 represents a shelf position, and the attribute of a node can be set as a parameter in path planning.
To facilitate completion of the path planning process, map base data may be constructed, and a representation of the overpass may be constructed in the database by defining the attributes of the nodes, prior to step S402. The partial nodes of the preset map at least comprise: overpass properties. For example: the overpass properties include at least: overpass identity (id), preference, node set, node initial G value, overpass start point and overpass end point. Wherein the overpass id is used to distinguish between different overpasses, and the preference is used to indicate a preference degree of selecting the overpass in path planning, for example: when the preference is greater than 100, the viaduct is indicated to have a high probability of being selected in the path planning process. When the preference is less than 100, the probability that the viaduct is selected in the path planning process is small. The node set is used for representing a set formed by corresponding nodes of the overpass. The node initial G value is used for representing the mobile overhead of the starting point of the overhead bridge. Wherein, table 1 is used for illustrating an example of the overpass attribute, the overpass attribute may be predefined in MySQL database, which is a relational database management system.
Further, a path node between the start node and the destination node may be determined based on a routing algorithm according to the path planning request and a preset map. It should be noted that, the path node refers to a node that is routed from the start node to the destination node in a preset map. When the preset map is a two-dimensional code map, the starting node, the path node and the destination node can be understood as two-dimensional codes corresponding to the preset map.
In order to determine a path node between the start node and the destination node, starting from the start node, determining a neighboring node of the current node in the feasible direction, and taking the neighboring node of the current node in the feasible direction as a candidate node. Then judging whether the candidate node is the destination node or not; if yes, ending the flow; otherwise, a distance from the start node to the destination node through the candidate node is calculated, wherein the distance can be Manhattan distance or Euclidean distance. And taking the candidate node with the minimum distance as a first path node, wherein the first path node is the next path node of the current node, and repeating the above processes to determine other path nodes until the candidate node is the destination node.
In the embodiment of the present invention, the calculation process of the distance from the starting node to the destination node is approximately: first a first distance of the starting node to the candidate node and a second distance of the candidate node to the destination node are determined. And then determining the sum of the first distance and the second distance as the distance from the starting node to the destination node through the candidate node.
Further, the distance from the originating node to the destination node may be determined according to the following function
F=G+H
Where G represents the distance from the starting node to a candidate node along the generated path (otherwise referred to as mobile overhead), and H represents the distance from the candidate node to the destination node, for example: h may be the estimated manhattan distance. Note that, the attributes of the node further include: f value, G value, and H value. And the efficiency and accuracy of finding the optimal path can be different by adopting different cost functions.
When the candidate node has the overpass attribute, a first distance from the starting node to the candidate node, or referred to as an overhead G value, may be determined according to the preference in the overpass attribute and the node initial G value. The overhead G value is understood to be the distance from the starting point of the overpass, which is an attribute unique to the starting point of the overpass.
Further, when the overpass attribute of the candidate node has a value, the following formula may be adopted to determine the overpass G value or the first distance
Overhead G value = node initial G value (100/preference degree)
If the current Node has a overpass attribute, the labeling instance of the Node may be node=node (father, x, y). If the current node has the overpass attribute, the attribute of the candidate node at least comprises: and the coordinates of the connecting end points of the father node and the viaduct are communicated. For example: if the current Node has a overpass attribute, the labeling example of the candidate Node may be adjacent=node (parent Node, overhead communication endpoint x coordinate Node. B_x, overhead communication endpoint y coordinate Node. B_y). In determining the path sequence, a parent node of a current node may be first determined, starting from the parent node of the current node being the destination node, until the parent node is the start node. Then judging whether the father node of the current node has a viaduct attribute or not; if the father node of the current node has the overpass attribute, adding the node set corresponding to the father node of the current node into the path sequence; and if the father node of the current node does not have the overpass attribute, adding the father node of the current node into the path sequence.
Step S405: and planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum.
In step S405, a path sequence is first formed according to the start node, the path node, and the destination node. And then reversing the order of the path sequence to generate a path from the starting node to the destination node.
After step S405, the method further includes: and storing the path from the starting node to the destination node into a memory. Therefore, when the path from the starting node to the destination node needs to be planned again, the path stored in the memory can be directly called, and the path planning process is simplified. Correspondingly, before step S405, the method further comprises: judging whether a path from the initial node to the target node is stored in a memory or not; if yes, adopting the path stored in the memory; otherwise, step S405 is performed.
Step S406: and storing the path from the starting node to the destination node into a memory.
Referring to fig. 5, in order to provide a path planning service, viaduct attributes of nodes are constructed on a preset map as basic data of path planning. After the path planning is completed, the path obtained by each planning can be stored in the memory cache, and the path in the cache is preferentially used. If the obtained path is not planned in the cache, the real-time path planning is requested, so that the planning process can be simplified.
In the embodiment of the invention, firstly, the path node between the starting node and the destination node is determined according to the received path planning request and the preset map. And then planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum. And part of nodes of the preset map have viaduct attributes, so that the viaduct attributes of the nodes can be used as basic data for path planning, and the problem that the path planning at the viaduct can not be realized in the existing planning mode can be solved. Meanwhile, after the path planning is completed, the path obtained by planning is stored so as to be convenient for later use, and the path planning process can be simplified.
Fig. 6 is a flow chart of a path planning method according to a third embodiment of the present invention, and as shown in fig. 6, the path planning method may include the following steps S601 to S614.
Step S601: receiving a path planning request, the path planning request comprising: an originating node and a destination node.
In step S601, the path planning request may be understood as a planning request for a path from the originating node to the destination node. The originating node may be understood as the origin of the path plan and the destination node may be understood as the destination of the path plan.
Step S602: judging whether a path from the initial node to the target node is stored in a memory or not; if yes, go to step S603; otherwise, step S604 is performed.
Step S603: and adopting the paths stored in the memory.
Step S604: and determining adjacent nodes in the feasible direction of the starting node according to the path planning request and a preset map, and taking the adjacent nodes in the feasible direction of the starting node as candidate nodes.
In the embodiment of the invention, the path planning can be performed on the preset map according to the path planning request. The preset map may be a map network in the form of a code point map, for example: two-dimensional code maps, grid maps or other representations, wherein the two-dimensional code maps can also be represented by grid maps. The preset map is provided with a plurality of nodes, and the attributes of the nodes at least comprise: coordinates x, coordinates y, feasible directions, overhead endpoint coordinates, and overhead G values. The feasible direction is understood to be the direction in which the vehicle is allowed to travel, and can be an up, down, left, right and/or overhead direction based on a two-dimensional map. Taking the two-dimensional code map shown in fig. 2 as an example, 0 represents a road, 1 represents a shelf position, and the attribute of a node can be set as a parameter in path planning.
To facilitate completion of the path planning process, map base data may be constructed, and a representation of the overpass may be constructed in the database by defining the attributes of the nodes, prior to step S604. The partial nodes of the preset map at least comprise: overpass properties. For example: the overpass properties include at least: overpass identity (id), preference, node set, node initial G value, overpass start point and overpass end point. Wherein the overpass id is used to distinguish between different overpasses, and the preference is used to indicate a preference degree of selecting the overpass in path planning, for example: when the preference is greater than 100, the probability that the viaduct is selected in the path planning process is high; when the preference is less than 100, the probability that the viaduct is selected in the path planning process is small. The node set is used for representing a set formed by corresponding nodes of the overpass. The node initial G value is used for representing the mobile overhead of the starting point of the overhead bridge.
It can be understood that, in steps S604 to S608, a path node is determined by using a path-finding algorithm, which may be an a-point path-finding algorithm or Dijkstra algorithm, and compared with the Dijkstra algorithm, the a-point algorithm has a fast calculation speed and is suitable for a grid map of a two-dimensional code, and a path planning process based on the a-point algorithm is described below.
Step S605: judging whether the candidate node is the destination node or not; if the candidate node is the destination node, executing step S609; otherwise, step S606 is performed.
Step S606: and if the candidate node is not the destination node, determining a first distance from the current node to the candidate node and a second distance from the candidate node to the destination node.
In step S606, when calculating the distance from the start node to the candidate node, a first distance from the start node to the candidate node and a second distance from the candidate node to the destination node are first determined. And then determining the sum of the first distance and the second distance as the distance from the starting node to the candidate node.
Step S607: and determining the sum of the first distance and the second distance as the distance from the current node to the candidate node.
Step S608: and taking the candidate node with the smallest distance as a next path node, repeatedly executing 605 to step S607, and determining the next path node of the path node until the candidate node is the destination node.
It may be understood that after determining a path node, taking the path node as a current node, repeatedly executing step 605 to step 607, determining neighboring nodes in the feasible direction of the path node, and taking the neighboring nodes in the feasible direction of the path node as first candidate nodes; and if the first candidate node is not the destination node, calculating the distance from the path node to the first candidate node, and taking the candidate node with the minimum distance as the next path node.
After step S608, the start node, the path node, and the destination node are added to a first list (or referred to as a closed list), and the candidate nodes are added to a second list (or referred to as an open list). It will be appreciated that verified nodes are added to the first list and unverified nodes are added to the second list. And searching a candidate node with the smallest distance from the starting node to the destination node through the candidate node from the second list, taking the candidate node as a path node, repeating the above process until the destination node or the second list is found to be empty, and then executing step S609.
Taking the current node as the starting node as an example, the next path node process of the starting node is determined approximately as follows: first, determining adjacent nodes in the feasible direction of the starting node, and taking the adjacent nodes in the feasible direction of the starting node as candidate nodes. Judging whether the candidate node is the destination node or not; and if the candidate node is the destination node, ending the flow. And if the candidate node is not the destination node, calculating the distance from the starting node to the candidate node, and taking the candidate node with the minimum distance as a path node until the candidate node is the destination node.
Step S609: and determining a parent node of the current node, and starting from the current node as the target node until the parent node is the starting node.
Step S610: judging whether a parent node of the current node has a viaduct attribute or not; if yes, go to step S611; if not, step S612 is performed.
Step S611: and adding the overpass path set of the parent node of the current node into a path sequence, and then executing step S613.
Step S612: the parent node of the current node is added to the path sequence, and then step S613 is performed.
Step S613: and reversing the order of the path sequence, and planning the path from the starting node to the destination node.
Step S614: and storing the path from the starting node to the destination node into a memory.
In the embodiment of the invention, firstly, the path node between the starting node and the destination node is determined according to the received path planning request and the preset map. And then planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum. And part of nodes of the preset map have viaduct attributes, so that the viaduct attributes of the nodes can be used as basic data for path planning, and the problem that the path planning at the viaduct can not be realized in the existing planning mode can be solved. Meanwhile, after the path planning is completed, the path obtained by planning is stored so as to be convenient for later use, and the path planning process can be simplified.
Fig. 7 is a schematic block diagram of a path planning apparatus according to an embodiment of the present invention, and referring to fig. 7, the path planning apparatus 700 may include the following blocks:
a receiving module 701, configured to receive a path planning request, where the path planning request indicates an originating node and a destination node;
a determining module 702, configured to determine a path node between the start node and the destination node according to the path planning request and a preset map; the partial nodes of the preset map at least comprise: overpass properties;
and a planning module 703, configured to plan, according to the path node, a path from the start node to the destination node, so that a distance from the start node to the destination node through the path node is minimized.
Optionally, the determining module 702 is further configured to:
determining a path node between the starting node and the destination node based on a path finding algorithm according to the path planning request and a preset map;
the planning module 703 is further configured to:
forming a path sequence according to the starting node, the path node and the destination node;
and reversing the order of the path sequence to generate a path from the starting node to the destination node.
Optionally, the determining module 702 is further configured to:
A. determining adjacent nodes in the feasible direction of the current node from the initial node according to the path planning request and a preset map, and taking the adjacent nodes in the feasible direction of the current node as candidate nodes;
B. if the candidate node is not the destination node, calculating the distance from the starting node to the destination node through the candidate node;
C. taking the candidate node with the minimum distance as a first path node, wherein the first path node is the next path node of the current node;
and (3) repeatedly executing the steps A to C to determine the next path node of the first path node until the candidate node is the destination node.
Optionally, the determining module 702 is further configured to:
determining a first distance from the starting node to the candidate node and a second distance from the candidate node to the destination node;
and determining the sum of the first distance and the second distance as the distance from the starting node to the destination node through the candidate node.
Optionally, if the current node has a overpass attribute, the candidate node at least includes: and the coordinates of the communicated end points of the father node and the viaduct.
Optionally, the planning module 703 is further configured to:
determining a father node of a current node, starting from the current node as the target node until the father node is the starting node;
judging whether a parent node of the current node has a viaduct attribute or not;
if yes, adding the node set corresponding to the father node into a path sequence;
if not, the father node is added into the path sequence.
Optionally, the determining module 702 is further configured to:
and when the candidate node has the overpass attribute, determining a first distance from the starting node to the candidate node according to the preference degree in the overpass attribute and the node initial G value.
In the embodiment of the invention, firstly, the path node between the starting node and the destination node is determined according to the received path planning request and the preset map. And then planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum. And part of nodes of the preset map have viaduct attributes, so that the viaduct attributes of the nodes can be used as basic data for path planning, and the problem that the path planning at the viaduct can not be realized in the existing planning mode can be solved. Meanwhile, after the path planning is completed, the path obtained by planning is stored so as to be convenient for later use, and the path planning process can be simplified.
Fig. 8 illustrates an exemplary system architecture 800 to which a path planning method or path planning apparatus of embodiments of the present invention may be applied.
As shown in fig. 8, a system architecture 800 may include terminal devices 801, 802, 803, a network 804, and a server 805. The network 804 serves as a medium for providing communication links between the terminal devices 801, 802, 803 and the server 805. The network 804 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 805 through the network 804 using the terminal devices 801, 802, 803 to receive or send messages or the like. The terminal devices 801, 802, 803 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
It should be noted that, the path planning method provided in the embodiment of the present invention is generally executed by the server 805, and accordingly, the path planning apparatus is generally disposed in the server 805.
It should be understood that the number of terminal devices, networks and servers in fig. 8 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 9, there is illustrated a schematic diagram of a computer system 900 suitable for use in implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not impose any limitation on the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU) 901, which can execute various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
The following components are connected to the I/O interface 905: an input section 906 including a keyboard, a mouse, and the like; an output portion 907 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 908 including a hard disk or the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed as needed on the drive 910 so that a computer program read out therefrom is installed into the storage section 908 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 909 and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 901.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: receiving a path planning request, wherein the path planning request indicates an initial node and a destination node; determining a path node between the starting node and the destination node according to the path planning request and a preset map; the partial nodes of the preset map at least comprise: overpass properties; and planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum.
In the embodiment of the invention, firstly, the path node between the starting node and the destination node is determined according to the received path planning request and the preset map. And then planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum. And part of nodes of the preset map have viaduct attributes, so that the viaduct attributes of the nodes can be used as basic data for path planning, and the problem that the path planning at the viaduct can not be realized in the existing planning mode can be solved. Meanwhile, after the path planning is completed, the path obtained by planning is stored so as to be convenient for later use, and the path planning process can be simplified.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. A method of path planning, comprising:
Receiving a path planning request, wherein the path planning request indicates an initial node and a destination node;
determining a path node between the starting node and the destination node based on a path finding algorithm according to the path planning request and a preset map; the method specifically comprises the following steps: determining adjacent nodes in the feasible direction of the current node from the initial node according to the path planning request and a preset map, and taking the adjacent nodes in the feasible direction of the current node as candidate nodes; if the candidate node is not the destination node, calculating the distance from the starting node to the destination node through the candidate node; taking the candidate node with the minimum distance as a first path node, wherein the first path node is the next path node of the current node; repeating the steps to determine the next path node of the first path node until the candidate node is the destination node; wherein, the partial nodes of the preset map at least comprise: the viaduct attribute is used for representing the position of the viaduct and selecting the preference degree of the viaduct when planning a path; if the current node has the overpass attribute, the candidate node at least comprises: the coordinates of the communication end point of the father node and the viaduct;
And planning a path from the starting node to the destination node according to the path node, so that the distance from the starting node to the destination node through the path node is minimum.
2. The method of claim 1, wherein planning a path from the originating node to the destination node based on the path node comprises:
forming a path sequence according to the starting node, the path node and the destination node;
and reversing the order of the path sequence to generate a path from the starting node to the destination node.
3. The method of claim 2, wherein said calculating the distance of the originating node from the destination node through the candidate node comprises:
determining a first distance from the starting node to the candidate node and a second distance from the candidate node to the destination node;
and determining the sum of the first distance and the second distance as the distance from the starting node to the destination node through the candidate node.
4. A method according to claim 3, wherein the overpass properties comprise at least: and a node set, configured to form a path sequence according to the start node, the path node, and the destination node, including:
Determining a father node of a current node, starting from the current node as the target node until the father node is the starting node;
judging whether a parent node of the current node has a viaduct attribute or not;
if yes, adding the node set corresponding to the father node into a path sequence;
if not, the father node is added into the path sequence.
5. The method of claim 4, wherein the overpass attribute further comprises: the method comprises the following steps of preference degree and a node initial G value, wherein the node initial G value is used for representing the moving overhead of an overhead bridge starting point;
the determining a first distance from the starting node to the candidate node includes:
and when the candidate node has the overpass attribute, determining a first distance from the starting node to the candidate node according to the preference degree in the overpass attribute and the node initial G value.
6. A path planning apparatus, comprising:
a receiving module, configured to receive a path planning request, where the path planning request indicates an originating node and a destination node;
the determining module is used for determining a path node between the starting node and the destination node based on a path finding algorithm according to the path planning request and a preset map; the method is particularly used for: determining adjacent nodes in the feasible direction of the current node from the initial node according to the path planning request and a preset map, and taking the adjacent nodes in the feasible direction of the current node as candidate nodes; if the candidate node is not the destination node, calculating the distance from the starting node to the destination node through the candidate node; taking the candidate node with the minimum distance as a first path node, wherein the first path node is the next path node of the current node; repeating the steps to determine the next path node of the first path node until the candidate node is the destination node; wherein, the partial nodes of the preset map at least comprise: the viaduct attribute is used for representing the position of the viaduct and selecting the preference degree of the viaduct when planning a path; if the current node has the overpass attribute, the candidate node at least comprises: the coordinates of the communication end point of the father node and the viaduct;
And the planning module is used for planning the path from the starting node to the destination node according to the path node so that the distance from the starting node to the destination node through the path node is minimum.
7. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the method of any of claims 1-5.
8. A computer readable medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
CN202011225980.7A 2020-11-05 2020-11-05 Path planning method and device Active CN113739798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011225980.7A CN113739798B (en) 2020-11-05 2020-11-05 Path planning method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011225980.7A CN113739798B (en) 2020-11-05 2020-11-05 Path planning method and device

Publications (2)

Publication Number Publication Date
CN113739798A CN113739798A (en) 2021-12-03
CN113739798B true CN113739798B (en) 2024-04-12

Family

ID=78728140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011225980.7A Active CN113739798B (en) 2020-11-05 2020-11-05 Path planning method and device

Country Status (1)

Country Link
CN (1) CN113739798B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114580796B (en) * 2022-05-09 2022-07-15 北京建筑大学 Tour attribute path planning method and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108510095A (en) * 2017-02-23 2018-09-07 北京京东尚科信息技术有限公司 A kind of determination method and device in picking path
CN110986942A (en) * 2019-10-17 2020-04-10 浙江科技学院 Three-dimensional warehouse three-dimensional space path optimization method based on ant colony algorithm
CN110989570A (en) * 2019-10-15 2020-04-10 浙江工业大学 Multi-AGV anti-collision collaborative path planning method
CN111596658A (en) * 2020-05-11 2020-08-28 东莞理工学院 Multi-AGV collision-free operation path planning method and scheduling system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9482542B2 (en) * 2014-03-24 2016-11-01 International Business Machines Corporation Stochastic route planning in public transport
EP3171133B1 (en) * 2015-11-19 2020-03-11 Sikorsky Aircraft Corporation Kinematic motion planning with regional planning constraints
US10222215B2 (en) * 2017-04-21 2019-03-05 X Development Llc Methods and systems for map generation and alignment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108510095A (en) * 2017-02-23 2018-09-07 北京京东尚科信息技术有限公司 A kind of determination method and device in picking path
CN110989570A (en) * 2019-10-15 2020-04-10 浙江工业大学 Multi-AGV anti-collision collaborative path planning method
CN110986942A (en) * 2019-10-17 2020-04-10 浙江科技学院 Three-dimensional warehouse three-dimensional space path optimization method based on ant colony algorithm
CN111596658A (en) * 2020-05-11 2020-08-28 东莞理工学院 Multi-AGV collision-free operation path planning method and scheduling system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于分层路网的路径规划算法;罗亚男;付永庆;;计算机应用(06);全文 *

Also Published As

Publication number Publication date
CN113739798A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
US8681635B2 (en) Computer-implemented systems and methods for planning a route
CN109432777B (en) Path generation method and device, electronic equipment and storage medium
WO2020164319A1 (en) Goods pickup method and device
CN115410410B (en) Parking space recommendation method, device, equipment and storage medium
CN114998477B (en) Method, device, equipment and product for drawing center line of lane in U-turn area
CN111678527A (en) Path network graph generation method and device, electronic equipment and storage medium
CN113128743B (en) Goods picking path planning method and device
CN113739798B (en) Path planning method and device
CN115585816A (en) Lane-level map matching method and device
CN110657813B (en) Method and device for optimizing planned roads in map
CN110659752B (en) Method and device for determining movement path
CN109827584B (en) Path planning method and device, electronic equipment and storage medium
CN113222205A (en) Path planning method and device
CN110375735B (en) Path planning method and device
CN114623842A (en) Path planning method and device, storage medium and electronic equipment
CN113137972B (en) Path planning method and device
CN111830957A (en) Path planning method and device
CN110274593B (en) Path planning method and device
CN112559881B (en) Walking route determining method, walking route determining device, electronic equipment and storage medium
CN113804208B (en) Unmanned vehicle path optimization method and related equipment
CN114674340A (en) Map data processing method and device, electronic equipment and storage medium
CN115100231A (en) Method and device for determining region boundary
CN113008246B (en) Map matching method and device
US20220026227A1 (en) Navigation route determination method, device, and storage medium
CN111767351A (en) Method and device for determining parking spot of transfer robot

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant