Method for constructing grid map, path planning method, processor and device
By using an octagonal mesh matrix to construct a raster map in the automatic navigation device, the problem of high computational volume in the existing technology is solved, and more efficient path planning and walking efficiency are achieved.
Patent Information
- Application Number
- CN202210563862.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-23
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-05-23
AI Technical Summary
In the prior art, automatic navigation devices have a large amount of calculation when building raster maps, especially when processing curve routes and rotating sections, they require a lot of algorithm optimization.
The raster map is constructed using an octagonal mesh matrix. Two adjacent octagonal mesh are in the same edge. Four adjacent octagonal mesh are enclosed into a quadrangle mesh. By obtaining relevant information of the automatic navigation device such as track accuracy, obstacle size and device size, the target mesh size is determined, and the mesh nodes in the raster map are assigned values to establish a map coordinate system to improve the path planning accuracy.
It reduces the amount of algorithm optimization calculation, improves the walking efficiency of automatic navigation equipment and the accuracy of path planning, and shortens the running time.
Smart Images

Figure CN115235483B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of map construction, and in particular to a method for constructing a grid map, a path planning method, a processor, and a device. Background Art
[0002] In the prior art, automatic navigation equipment with navigation functions (for example, automatic guided vehicles) usually need to build a map of the environment and a preset walking route in the system. The way the map is built has an important impact on the working efficiency of the automatic navigation equipment. Existing map construction methods include grid method, feature representation method, object representation method, pose graph method, topology graph method and hybrid expression method, among which the grid method is the most widely used. In the prior art, automatic navigation equipment usually uses the grid method to build an environmental map. The traditional grid method is usually based on a quadrilateral. The automatic navigation equipment can only make 90-degree turns between grids. Non-straight sections such as curved routes and rotating sections need to rely on algorithms for optimization, which increases the amount of calculation. Summary of the Invention
[0003] The purpose of the embodiments of the present invention is to provide a method for constructing a grid map, a path planning method, a processor, an apparatus for constructing a grid map, a path planning apparatus, an electronic device, and a storage medium to solve the problem of large computational complexity in the prior art.
[0004] To achieve the above-mentioned object, a first aspect of an embodiment of the present invention provides a method for constructing a grid map, the method comprising:
[0005] Get the target area;
[0006] A grid map is constructed for the target area, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid.
[0007] In an embodiment of the present invention, constructing a grid map for a target area includes: obtaining relevant information of an automatic navigation device, wherein the relevant information includes trajectory accuracy; obtaining obstacle information of obstacles in the target area, wherein the obstacle information includes obstacle size; determining a target grid size based on the trajectory accuracy and the obstacle size; and constructing a grid map for the target area based on the target grid size.
[0008] In an embodiment of the present invention, determining a target grid size according to trajectory accuracy and obstacle size includes: determining a first grid size according to the trajectory accuracy; determining a second grid size according to the obstacle size; and determining the target grid size according to the smaller of the first grid size and the second grid size.
[0009] In an embodiment of the present invention, the relevant information also includes the device size of the automatic navigation device and the turning radius of the automatic navigation device; determining the target grid size based on the smaller of the first grid size and the second grid size, and also includes: determining the third grid size based on the device size and the turning radius; determining the target grid size based on the smallest of the first grid size, the second grid size and the third grid size.
[0010] In an embodiment of the present invention, determining a first grid size based on trajectory accuracy includes: determining a ratio of the trajectory accuracy to a first preset value to obtain the first grid size, wherein the first preset value is greater than 1; determining a second grid size based on an obstacle size includes: determining a ratio of the obstacle size to a second preset value to obtain the second grid size, wherein the second preset value is greater than 1; determining a third grid size based on a device size and a turning radius includes: determining a ratio of the smaller of the device size and the turning radius to a third preset value to obtain the third grid size, wherein the third preset value is greater than 1.
[0011] In an embodiment of the present invention, after constructing a grid map based on the target area, the method further includes: assigning a first numerical value to the nodes of the grid in the grid map, wherein the first numerical value of the nodes of the grid occupied by obstacles is different from the first numerical value of the nodes of the grid not occupied by obstacles, the nodes include vertices and center points, and the nodes of the grid in the grid map include P nodes of the grid occupied by the automatic navigation device; assigning a second numerical value to the P nodes of the grid occupied by the automatic navigation device; determining P first product values corresponding to the P nodes, the first product value being the product of the first numerical value of the node and the second numerical value; and determining the drivable area and non-drivable area of the automatic navigation device on the grid map based on the P first product values.
[0012] In an embodiment of the present invention, a drivable area and a non-drivable area of an automatic navigation device on a grid map are determined based on P first product values, including: when the P first product values are all preset values, determining that the nodes on the grid map corresponding to the P nodes are drivable areas; when there is a first product value that is not a preset value among the P first product values, determining that the nodes on the grid map corresponding to the P nodes are non-drivable areas.
[0013] In an embodiment of the present invention, after determining the drivable area and non-drivable area of the automatic navigation device on the grid map based on P first product values, the method further includes: assigning a third numerical value to the grids located in the drivable area and within a preset distance range of the non-drivable area, the third numerical value corresponding to the grid being related to the distance between the grid and the non-drivable area; and dividing the drivable area into safety levels according to the size of the third numerical value to obtain drivable areas of different safety levels.
[0014] In an embodiment of the present invention, the method also includes: establishing a map coordinate system on a grid map, the map coordinate system including a horizontal axis and a vertical axis; determining the initial coordinates of the device center in the map coordinate system based on the target grid size, the first number of octagonal grids from the device center of the automatic navigation device to the vertical axis in the horizontal direction, and the second number of octagonal grids from the device center to the horizontal axis in the vertical direction; determining a compensation value based on the grid node position where the device center is located; and correcting the initial coordinates based on the compensation value and the tangent value of a preset angle to obtain the target coordinates of the device center in the map coordinate system.
[0015] In an embodiment of the present invention, determining the initial coordinates of the device center in the map coordinate system based on the target grid size, the first number of octagonal grids that the device center of the automatic navigation device is away from the vertical axis in the horizontal direction, and the second number of octagonal grids that the device center is away from the horizontal axis in the vertical direction includes: determining the product value of the target grid size and the first number as the horizontal coordinate of the initial coordinate; and determining the product value of the target grid size and the second number as the vertical coordinate of the initial coordinate.
[0016] In an embodiment of the present invention, the initial coordinates are corrected according to the compensation value and the tangent value of the preset angle to obtain the target coordinates of the device center on the map coordinate system, including: determining the ratio of the initial coordinates to the tangent value of the preset angle; and determining the sum of the ratio and the compensation value as the target coordinates.
[0017] In an embodiment of the present invention, a compensation value is determined based on the position of the grid node where the center of the device is located, including at least one of the following situations: when the grid node position is the center point of an octagonal grid, the compensation value is determined to be a first compensation value, wherein the first compensation value is positively correlated with the target grid size and negatively correlated with the tangent value of a preset angle; when the grid node position is the center point of a quadrilateral grid or the vertex of an octagonal grid closest to the vertical axis in the horizontal direction or the vertex of an octagonal grid closest to the horizontal axis in the vertical direction, the compensation value is determined to be a second compensation value, wherein the second compensation value is 0; when the grid node position is the vertex of an octagonal grid second closest to the vertical axis in the horizontal direction or the vertex of an octagonal grid closest to the vertical axis in the vertical direction In the case where the grid node position is the second vertex closest to the horizontal axis in the horizontal direction of the octagonal grid or the third vertex closest to the horizontal axis in the vertical direction of the octagonal grid, the compensation value is determined to be a third compensation value, wherein the third compensation value is positively correlated with the target grid size; in the case where the grid node position is the third vertex closest to the vertical axis in the horizontal direction of the octagonal grid or the third vertex closest to the horizontal axis in the vertical direction of the octagonal grid, the compensation value is determined to be a fourth compensation value, wherein the fourth compensation value is positively correlated with the target grid size; in the case where the grid node position is the fourth vertex closest to the vertical axis in the horizontal direction of the octagonal grid or the fourth vertex closest to the horizontal axis in the vertical direction of the octagonal grid, the compensation value is determined to be a fifth compensation value, wherein the fifth compensation value is positively correlated with the target grid size and negatively correlated with the tangent value of the preset angle.
[0018] A second aspect of an embodiment of the present invention provides a path planning method, which includes: obtaining a grid map, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid; and performing path planning according to the grid map.
[0019] A third aspect of an embodiment of the present invention provides a processor configured to execute the above-mentioned method for constructing a grid map or the above-mentioned path planning method.
[0020] A fourth aspect of an embodiment of the present invention provides a device for constructing a grid map, the device comprising: a first acquisition module for acquiring a target area; and a map construction module for constructing a grid map based on the target area, wherein the grid map comprises an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid.
[0021] A fifth aspect of an embodiment of the present invention provides a path planning device, which includes: a second acquisition module for acquiring a grid map, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid; and a path planning module for performing path planning based on the grid map.
[0022] A sixth aspect of an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the method for constructing a grid map or the path planning method described above is implemented.
[0023] A seventh aspect of an embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the method for constructing a grid map or the path planning method described above is implemented.
[0024] The above technical solution obtains the target area and constructs a grid map including an octagonal grid matrix for the target area. Two adjacent octagonal grids in the grid map share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid. The grid map constructed by the above method includes an octagonal matrix. The minimum turning angle between the grids of the map for the automatic navigation device can reach 22.5 degrees, and the ratio of its avoidance path to the original path is smaller, thereby shortening the operating time of the automatic navigation device and improving its walking efficiency. Since the minimum turning angle between the grids is smaller than that of the existing technology, the amount of calculation relying on the algorithm for optimization can be greatly reduced, thereby reducing the workload for path planning.
[0025] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:
[0027] Figure 1 The following schematically shows a flow chart of a method for constructing a map in one embodiment of the present invention;
[0028] Figure 2 A schematic diagram schematically illustrates the walking direction of an automatic navigation device in a grid map according to an embodiment of the present invention;
[0029] Figure 3 A schematic diagram of a path of a grid map in the prior art according to an embodiment of the present invention is shown;
[0030] Figure 4 A schematic diagram of a path of a grid map in the prior art according to another embodiment of the present invention is shown schematically;
[0031] Figure 5 Schematically shows a path diagram of a grid map in one embodiment of the present invention;
[0032] Figure 6 The following is a schematic diagram showing a process of constructing a grid map of a target area in one embodiment of the present invention;
[0033] Figure 7 A schematic diagram of a grid map in one embodiment of the present invention is schematically shown;
[0034] Figure 8 A schematic diagram schematically illustrates the walking direction of an AGV in a grid map according to an embodiment of the present invention;
[0035] Figure 9 A schematic diagram schematically illustrates the walking direction of an AGV in a grid map in another embodiment of the present invention;
[0036] Figure 10 A schematic diagram of obstacle point processing in one embodiment of the present invention is schematically shown;
[0037] Figure 11 A schematic diagram of obstacle point assignment in one embodiment of the present invention is shown schematically;
[0038] Figure 12 A schematic diagram of optimizing assignment in an embodiment of the present invention is shown schematically;
[0039] Figure 13 The following schematically shows a structural block diagram of an apparatus for constructing a grid map according to an embodiment of the present invention;
[0040] Figure 14 The following schematically shows a structural block diagram of a path planning device in an embodiment of the present invention. DETAILED DESCRIPTION
[0041] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.
[0042] Figure 1 The following schematically shows a flow chart of a method for constructing a grid map in one embodiment of the present invention. Figure 1 As shown, in an embodiment of the present invention, a method for constructing a grid map is provided. Taking the method applied to a processor as an example, the method may include the following steps:
[0043] Step S102: Acquire the target area.
[0044] It can be understood that the target area is the area where a grid map needs to be constructed.
[0045] Specifically, the processor may obtain a target area for which a map needs to be constructed. Specifically, the processor may obtain the target area through an acquisition device such as an image acquisition device, or may directly obtain the target area input by a user.
[0046] Step S104 : constructing a grid map for the target area, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid.
[0047] Specifically, the processor can construct a grid map corresponding to the target area for the target area. It can be understood that the grid map can be used for precise positioning and trajectory planning. Specifically, the grid map includes an octagonal grid matrix, two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid, that is, four adjacent octagonal grids in two adjacent rows can enclose or define a quadrilateral grid, or, four adjacent octagonal grids in two adjacent columns can enclose or define a quadrilateral grid, and the side length of the quadrilateral grid is equal to the side length of the octagonal grid.
[0048] In some application scenarios, the turning angle between grids of the map for an automatic navigation device may refer to the angle between the lines connecting the nodes of different grids, where the nodes include the vertices and the center points of the grids. The minimum turning angle is the minimum angle between the lines connecting the nodes of different grids. Figure 2 As shown, Figure 2 The diagram schematically shows 16 possible walking directions of an automatic navigation device in a grid map. When the octagonal grid is a regular octagonal grid, the quadrilateral grid is also a regular quadrilateral grid. The automatic navigation device starts from a node F of one of the regular octagonal grids (such as the vertex of the regular octagonal grid) to another node G of the regular octagonal grid (such as the center point of the regular octagonal grid), and then walks from the node G to a node H of one of the regular quadrilateral grids adjacent to the regular octagonal grid (such as the center point of the regular quadrilateral grid). The resulting turning angle is 22.5°, while the minimum turning angle of the existing quadrilateral grid is 45°, and the minimum turning angle of the existing hexagonal grid is 30°. It can be seen that based on the construction method of the grid map in the embodiment of the present application, the automatic navigation device can generate a smaller minimum turning angle in the grid of the map.
[0049] also, Figure 3 The following schematically shows a path diagram of a grid map (including a quadrilateral grid) in the prior art according to an embodiment of the present invention. Figure 4 Schematically shows a path diagram of a grid map (including a hexagonal grid) in the prior art according to another embodiment of the present invention. Figure 5 The schematic diagram of the path of the grid map (including octagonal grid and quadrilateral grid) in one embodiment of the present invention is shown schematically. Figures 3 to 5 As shown, the automatic navigation device needs to go from point A to point B. The line between point A and point B is the original path. If the original path (i.e., AB path) is blocked, the automatic navigation device needs to take an avoidance path (i.e., a detour). The avoidance path is, for example, the line between points A and O and the line between points O and B. The avoidance path is AO-OB. If the side length of the grid is 1, Figure 3 In , the ratio of the length of the escape path to the length of the original path is: Figure 4 In , the ratio of the length of the escape path to the length of the original path is: Figure 5, the ratio of the length of the avoidance path to the length of the original path is: (OA+OB) / AB=(0.5 / sin22.5°+0.5 / sin22.5°) / (0.5 / tan22.5°+0.5 / tan22.5°)=tan22.5° / sin22.5°=1.08. It can be seen that in the grid map provided in the embodiment of the present invention, the ratio of the avoidance path to the original path is smaller than that in the prior art, that is, the avoidance path is shorter, which can shorten the operating time of the automatic navigation device and increase the walking efficiency. Therefore, the grid map provided in the embodiment of the present invention is more efficient.
[0050] Automatic navigation devices usually move in straight lines or diagonally between the nodes of a grid. Arc movement and right-angle turns (for example, curved routes and rotating sections) usually need to be solved by algorithms. However, the grid map provided by the embodiment of the present invention has smaller turning angles between different grids, thereby reducing the workload of algorithm optimization and improving the movement efficiency of the automatic navigation device.
[0051] The above-mentioned method for constructing a grid map obtains a target area and constructs a grid map including an octagonal grid matrix for the target area. Two adjacent octagonal grids in the grid map share a common edge, and four adjacent octagonal grids located in two adjacent rows or columns enclose a quadrilateral grid. The grid map constructed by the above-mentioned method includes an octagonal matrix. The minimum turning angle between the grids of the map for an automatic navigation device can reach 22.5 degrees, and the ratio of its avoidance path to the original path is smaller, thereby shortening the operating time of the automatic navigation device and improving its travel efficiency. Since the minimum turning angle between grids is smaller than that of the existing technology, the amount of calculation required for optimization by the algorithm can be greatly reduced, thereby reducing the workload for path planning.
[0052] Figure 6 The following schematically shows a flow chart of the steps of constructing a grid map of a target area in one embodiment of the present invention. Figure 6 As shown, in one embodiment, constructing a grid map for a target area may include the following steps:
[0053] Step S602: Obtain relevant information of the automatic navigation device, wherein the relevant information includes trajectory accuracy.
[0054] It can be understood that an automatic navigation device (also called an automatic guided device) is a device that can travel along a pre-set or planned path, such as a robot or an engineering machinery vehicle. The robot can perform tasks such as operation or movement through programming and automatic control. It usually has a navigation function and can work semi-autonomously or fully autonomously. In some embodiments, the automatic navigation device may also have a transportation function for carrying objects. In one embodiment, the robot may include an automated guided vehicle (AGV). An AGV refers to a vehicle equipped with an automatic navigation device such as an electromagnetic or optical device, which can travel along a specified navigation path and has safety protection and various transfer functions. The relevant information of the automatic navigation device includes the relevant technical parameters of the automatic navigation device, and may specifically include the trajectory accuracy of the automatic navigation device. The range of the trajectory accuracy may be, for example, 0.1-100 mm. In one example, the trajectory accuracy may be 10 mm.
[0055] Specifically, the processor may obtain relevant information (including trajectory accuracy) of the automatic navigation device.
[0056] Step S604: Obtain obstacle information of obstacles in the target area, wherein the obstacle information includes obstacle size.
[0057] Specifically, the processor may obtain obstacle information of obstacles in the target area perceived by the automatic navigation device, or may obtain obstacle information of obstacles in the target area input by the user. The obstacle information includes obstacle size, i.e., the size of the obstacle. In one embodiment, when there are multiple obstacles, the processor may obtain the obstacle size of the smallest obstacle or the average obstacle size in the target area where the automatic navigation device is located as the obstacle size used to determine the grid size.
[0058] Step S606: Determine the target grid size according to the trajectory accuracy and the obstacle size.
[0059] It can be understood that the target grid size is the size of the octagonal grid and the quadrilateral grid in the ideal grid map.
[0060] Specifically, the processor may determine a target grid size of grids constituting the grid map according to the trajectory accuracy and the obstacle size.
[0061] In one embodiment, determining a target grid size according to trajectory accuracy and obstacle size includes: determining a first grid size according to trajectory accuracy; determining a second grid size according to obstacle size; and determining the target grid size according to the smaller of the first grid size and the second grid size.
[0062] Specifically, the processor may use the order of magnitude of the trajectory accuracy, or one order of magnitude smaller, or multiple orders of magnitude smaller as the first grid size. For example, if the trajectory accuracy is 10 decimeters, 1 decimeter or 1 centimeter may be taken as the first grid size. Similarly, the processor may use the order of magnitude of the obstacle size, or one order of magnitude smaller, as the second grid size. For example, if the obstacle size is 200 decimeters, 100 decimeters or 200 centimeters may be taken as the second grid size, thereby determining the smaller one of the first grid size and the second grid size as the target grid size. For example, the smaller one of 1 decimeter and 100 decimeters is 1 decimeter, and 1 decimeter may be determined as the target grid size.
[0063] Furthermore, in one embodiment, the relevant information of the automatic navigation device may also include the device size of the automatic navigation device and the turning radius of the automatic navigation device; determining the target grid size based on the smaller of the first grid size and the second grid size, and also including: determining the third grid size based on the device size and the turning radius; determining the target grid size based on the smallest of the first grid size, the second grid size and the third grid size.
[0064] Specifically, the processor may use the smaller of the device size and the turning radius as the third grid size, and determine the smallest of the first grid size, the second grid size, and the third grid size, with the smallest being the target grid size. It is understood that when the autonomous navigation device is circular, the device size may include the diameter of the autonomous navigation device; when the autonomous navigation device is rectangular, the device size may include the length and width of the autonomous navigation device, such as the length and width of a robot.
[0065] In one embodiment, determining the first grid size according to the trajectory accuracy includes: determining a ratio of the trajectory accuracy to a first preset value to obtain the first grid size, wherein the first preset value is greater than 1.
[0066] It can be understood that the first preset value is a preset value related to the size of the trajectory accuracy, which is greater than 1, for example 5, and can be set according to actual conditions.
[0067] Specifically, the processor may determine the ratio of the preset track of the automatic navigation device to the first preset value as the first grid size, and thus may reduce the preset track size according to the size of the first preset value to obtain the first grid size.
[0068] In one embodiment, determining the second grid size according to the obstacle size includes: determining a ratio of the obstacle size to a second preset value to obtain the second grid size, wherein the second preset value is greater than 1.
[0069] It can be understood that the second preset value is a pre-set value related to the size of the obstacle, and the value is greater than 1, for example, 100, and can be set according to actual conditions.
[0070] Specifically, the processor may determine the ratio of the obstacle size to the second preset value as the second grid size, and thus may reduce the obstacle size according to the second preset value to obtain the second grid size.
[0071] In one embodiment, determining the third grid size based on the device size and the turning radius includes: determining a ratio of the smaller of the device size and the turning radius to a third preset value to obtain the third grid size, wherein the third preset value is greater than 1.
[0072] It can be understood that the third preset value is a pre-set value related to the device size and turning radius of the automatic navigation device. The value is greater than 1, for example, 200, and can be set according to actual conditions.
[0073] Specifically, the processor can first determine the smaller of the device size and the turning radius, and determine the ratio of the smaller one to the third preset value as the third grid size, so that the smaller one of the device size and the turning radius can be reduced according to the size of the third preset value to obtain the third grid size.
[0074] Step S608: constructing a grid map for the target area according to the target grid size.
[0075] Specifically, after determining the target grid size, the processor may construct a grid map including an octagonal grid matrix for the target area according to the target grid size.
[0076] In an embodiment of the present invention, if the target grid size is too large, the accuracy of path planning will be reduced, and if it is too small, the amount of calculation will be increased. By obtaining relevant information (including trajectory accuracy) of the automatic navigation device and obstacle information of obstacles in the target area, and determining the target grid size based on the relevant information and obstacle information, the accuracy of the target grid size can be improved while avoiding an excessive increase in the amount of calculation, further improving the accuracy of the grid map, and facilitating path planning by the automatic navigation device.
[0077] In one embodiment, after constructing a grid map according to the target area, the method for constructing the grid map further includes: assigning first values to the nodes of the grid in the grid map, wherein the first values of the nodes of the grid occupied by obstacles are different from the first values of the nodes of the grid not occupied by obstacles, the nodes include vertices and center points, and the nodes of the grid in the grid map include P nodes of the grid occupied by the automatic navigation device; assigning second values to the P nodes of the grid occupied by the automatic navigation device; determining P first product values corresponding to the P nodes, the first product value being the product of the first value of the node and the second value; and determining the drivable area and non-drivable area of the automatic navigation device on the grid map based on the P first product values.
[0078] It can be understood that the P nodes of the grid occupied by the automatic navigation device can be considered as a sliding window that matches the device size of the automatic navigation device (which may not refer to the nodes of the grid actually occupied by the automatic navigation device). That is, the P nodes correspond to the device size of the automatic navigation device. Each node in the sliding window has a corresponding second value, which can be multiplied with the first value of the node of the grid that overlaps with the sliding window in the grid map to obtain P first product values. When the sliding window slides N times, (N+1)×P product operations can be performed, and a corresponding number of product values can be obtained. The first value is the preset value assigned to each node in the grid map (for example, 0 or 1), and the second value is the preset value assigned to the P nodes corresponding to the device size of the automatic navigation device. When the automatic navigation device moves in the target area, that is, when the sliding window slides on the grid map, each time it moves, the corresponding values assigned to the P nodes in the sliding window and the grid nodes that overlap with the sliding window in the grid map (i.e., the second value and the first value) can be multiplied once, thereby obtaining P first product values. Furthermore, the first value and the second value may be the same or different in magnitude.
[0079] Specifically, after constructing a grid map of the target area, the processor can assign a first numerical value to the nodes of the grid in the grid map, and the assigned values of the nodes of the grid occupied by obstacles and the nodes of the grid not occupied by obstacles are different. For example, the nodes of the grid occupied by obstacles are assigned a value of 0, and the nodes of the grid not occupied by obstacles are assigned a value of 1. The second numerical value is assigned to P nodes (i.e., a sliding window) of the grid in the grid map occupied by the automatic navigation device, for example, a value of 2, and a first product value of the assigned values of the P nodes (i.e., the second numerical value) and the assigned values of the grid nodes in the grid map (i.e., the first numerical value) is determined, and the drivable area and the non-drivable area of the automatic navigation device on the grid map are determined based on the first product value.
[0080] In an embodiment of the present invention, by assigning values to the grid nodes on the grid map and the P nodes of the grid occupied by the automatic navigation device, and determining the product value of the assigned values corresponding to the P nodes and the nodes on the grid map, the drivable area and non-drivable area of the automatic navigation device on the grid map can be determined according to the product value, so that the automatic navigation device can plan the path to the target area more efficiently, thereby walking more smoothly in the target area.
[0081] In one embodiment, the drivable area and non-drivable area of the automatic navigation device on the grid map are determined based on P first product values, including: when the P first product values are all preset values, determining that the nodes on the grid map corresponding to the P nodes are drivable areas; when there is a first product value that is not the preset value among the P first product values, determining that the nodes on the grid map corresponding to the P nodes are non-drivable areas.
[0082] It can be understood that the preset value is a value set in advance based on the product of the first value and the second value. For example, when the assignment value of the node of the grid occupied by the obstacle is 0, the load of the node of the grid not occupied by the obstacle is 1, and the assignment value of P nodes is 2, the preset value can be set to 1×2=2.
[0083] Specifically, if all P first product values are preset values, the processor may determine that the nodes on the grid map corresponding to the P nodes are drivable areas, i.e., the grid nodes on the grid map that overlap with the P nodes are drivable areas for the automatic navigation device. If any of the P first product values is not a preset value, the processor may determine that the nodes on the grid map corresponding to the P nodes are non-drivable areas, i.e., the grid nodes on the grid map that overlap with the P nodes are non-drivable areas for the automatic navigation device.
[0084] In an embodiment of the present invention, only when the first product values corresponding to the P nodes and the grid nodes that overlap on the grid map are all preset values, are the P nodes and the grid nodes that overlap on the grid map determined to be the drivable area of the automatic navigation device. As long as there is at least one first product value that is not a preset value among the P first product values, the P nodes and the grid nodes that overlap on the grid map are determined to be the non-drivable area of the automatic navigation device, which can improve the accuracy and efficiency of the operation of the automatic navigation device.
[0085] In another embodiment, when it is determined that the first product values greater than or equal to a preset ratio among the P first product values are preset values, the processor may determine that the nodes on the grid map corresponding to the P nodes are drivable areas; when it is determined that the first product values less than the preset ratio among the P first product values are preset values, the processor may determine that the nodes on the grid map corresponding to the P nodes are drivable areas. Specifically, for example, the preset ratio is 90%, that is, if 90% or more of the P first product values have the preset value, the processor may determine that the nodes on the grid map corresponding to the P nodes are drivable areas for the automatic navigation device; otherwise, that is, if the first product values less than 90% of the P first product values have the preset value, the processor may determine that the nodes on the grid map corresponding to the P nodes are non-drivable areas for the automatic navigation device.
[0086] In one embodiment, after determining the drivable area and non-drivable area of the automatic navigation device on the grid map based on P first product values, the method for constructing the grid map further includes: assigning a third numerical value to grids located in the drivable area and within a preset distance range of the non-drivable area, where the third numerical value corresponding to the grid is related to the distance between the grid and the non-drivable area; and dividing the drivable area into safety levels according to the size of the third numerical value to obtain drivable areas of different safety levels.
[0087] Specifically, after determining the drivable area and non-drivable area of the automatic navigation device on the grid map, the drivable area can also be divided into safety levels. Specifically, the processor can assign a third value to the grids that are located in the drivable area and within a preset distance range of the non-drivable area. For example, the third value can be assigned to the grids whose distance from the boundary between the drivable area and the non-drivable area is within the preset distance range, wherein the third value corresponding to each grid is related to the distance between the grid and the non-drivable area, and the assignment can be increased from near to far or Reduce the assigned value and increase the assigned value from near to far, for example: [1 / n, 2 / n, 3 / n, ..., (n-1) / n, 1], where n can be related to the trajectory accuracy of the automatic navigation device. A preset multiple of the trajectory accuracy can be selected, such as 40 times or 50 times, or the same assignment can be made for each adjacent preset number (such as 3) of grids, so that the drivable area can be divided into different safety levels according to the size of the third value, and the drivable areas with different assigned values can be divided into multiple levels (such as 3 or 4 levels) according to the size of the assigned value, so that drivable areas with different safety levels can be obtained. Furthermore, the grid corresponding to the level with the smallest assigned value can be set as a risk area, that is, an area where there is a risk of collision between the automatic navigation device and an obstacle, and the grids corresponding to other levels can allow the automatic navigation device to travel.
[0088] In an embodiment of the present invention, by classifying the drivable area according to the distance between the drivable area and the non-drivable area, different driving safety levels can be set, thereby further improving the driving safety of the automatic navigation device and achieving early safety warning.
[0089] In one embodiment, after determining the drivable and non-drivable areas of the automatic navigation device on a grid map based on the P first product values, the method for constructing the grid map may further include: assigning a third numerical value to grid nodes located in the drivable area and within a preset distance range of the non-drivable area, wherein the third numerical value corresponding to the grid node is related to the distance between the grid node and the non-drivable area; and dividing the drivable area into safety levels according to the magnitude of the third numerical value to obtain drivable areas of different safety levels. It is understood that in this embodiment of the present invention, the third numerical value is assigned to the grid nodes, where the grid nodes may include grid vertices, grid center points, or both.
[0090] In one embodiment, the method for constructing a grid map further includes: establishing a map coordinate system on the grid map, the map coordinate system including a horizontal axis and a vertical axis; determining the initial coordinates of the device center in the map coordinate system based on a target grid size, a first number of octagonal grids from the device center of the automatic navigation device to the vertical axis in the horizontal direction, and a second number of octagonal grids from the device center to the horizontal axis in the vertical direction; determining a compensation value based on the grid node position where the device center is located; and correcting the initial coordinates based on the compensation value and a tangent value of a preset angle to obtain the target coordinates of the device center in the map coordinate system.
[0091] It is understood that the first number is the number of octagonal grids that the center of the automatic navigation device is spaced from the longitudinal axis in the horizontal direction, and the second number is the number of octagonal grids that the center of the automatic navigation device is spaced from the transverse axis in the longitudinal direction. It is worth noting that the octagonal grid here refers to a complete octagonal grid. In one embodiment, the preset angle is 22.5°.
[0092] Specifically, the processor can establish a map coordinate system for the raster map, and preliminarily determine the initial coordinates of the device center on the map coordinate system based on the first number, the second number and the target grid size of the device center of the automatic navigation device on the map coordinate system, and then determine the compensation value based on the grid node position where the device center is located. For example, based on the correspondence between the preset grid node position and the compensation value, the corresponding compensation value can be determined according to the grid node position corresponding to the device center, and then the initial coordinates can be corrected according to the compensation value and the tangent value of the preset angle. For example, the product value of the compensation value and the tangent value of the preset angle and the sum of the initial coordinates can be determined as the target coordinates of the device center, that is, the coordinates of the device center finally determined.
[0093] In one embodiment, determining the initial coordinates of the device center in the map coordinate system based on the target grid size, a first number of octagonal grids that the device center of the automatic navigation device is away from the vertical axis in the horizontal direction, and a second number of octagonal grids that the device center is away from the horizontal axis in the vertical direction includes: determining the product value of the target grid size and the first number as the horizontal coordinate of the initial coordinate; and determining the product value of the target grid size and the second number as the vertical coordinate of the initial coordinate.
[0094] In one embodiment, the initial coordinates are corrected according to the compensation value and the tangent value of the preset angle to obtain the target coordinates of the device center on the map coordinate system, including: determining the ratio of the initial coordinates to the tangent value of the preset angle; and determining the sum of the ratio and the compensation value as the target coordinates.
[0095] Specifically, the processor may first determine the ratio of the initial coordinate to the tangent value of the preset angle, and then determine the sum of the ratio and the compensation value as the target coordinate of the center of the device.
[0096] In one embodiment, the compensation value is determined based on the grid node position where the center of the device is located, including: when the grid node position is the center point of the octagonal grid, determining the compensation value to be a first compensation value, wherein the first compensation value is positively correlated with the target grid size and negatively correlated with the tangent value of the preset angle.
[0097] In one embodiment, the compensation value is determined based on the grid node position where the center of the device is located, including: when the grid node position is the center point of a quadrilateral grid or the vertex of an octagonal grid closest to the longitudinal axis in the horizontal direction, or the vertex of an octagonal grid closest to the horizontal axis in the longitudinal direction, determining the compensation value to be a second compensation value, wherein the second compensation value is 0.
[0098] In one embodiment, determining a compensation value based on a grid node position at which a center of a device is located includes: when the grid node position is a vertex of an octagonal grid second closest to a longitudinal axis in a transverse direction or a vertex of an octagonal grid second closest to a transverse axis in a longitudinal direction, determining the compensation value to be a third compensation value, wherein the third compensation value is positively correlated with a target grid size.
[0099] In one embodiment, determining a compensation value based on a grid node position at which a center of a device is located includes: when the grid node position is a vertex of an octagonal grid that is third closest to a vertical axis in a horizontal direction or a vertex of an octagonal grid that is third closest to a horizontal axis in a vertical direction, determining the compensation value to be a fourth compensation value, wherein the fourth compensation value is positively correlated with a target grid size.
[0100] In one embodiment, the compensation value is determined based on the grid node position where the center of the device is located, including: when the grid node position is the fourth vertex of the octagonal grid closest to the vertical axis in the horizontal direction or the fourth vertex of the octagonal grid closest to the horizontal axis in the vertical direction, determining the compensation value to be a fifth compensation value, wherein the fifth compensation value is positively correlated with the target grid size and negatively correlated with the tangent value of the preset angle.
[0101] Figure 7 The following schematically shows a schematic diagram of a grid map in one embodiment of the present invention. Figure 7 As shown, the grid map includes an octagonal grid matrix. Two adjacent octagonal grids share a common edge. Four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid. The side length of the octagonal grid is the same as the side length of the quadrilateral grid. In other words, the octagonal grid and the quadrilateral grid together form a grid map. The grid node position where the center of the automatic navigation device is located can include the center point of the octagonal grid (such as Figure 7 1 in the figure), the center point of the quadrilateral mesh (as shown in Figure 7 2 in the figure) and the vertices of the octagonal grid. Specifically, the positions of the vertices of the octagonal grid may include the following situations: the vertex of the octagonal grid closest to the vertical axis in the horizontal direction (as shown in FIG. Figure 7 31) or the vertex of the octagonal grid closest to the horizontal axis in the vertical direction (not shown in the figure), the vertex of the octagonal grid second closest to the vertical axis in the horizontal direction (such as Figure 7 32) or the second vertex of the octagonal grid closest to the horizontal axis in the vertical direction (not shown in the figure), the third vertex of the octagonal grid closest to the vertical axis in the horizontal direction (such as Figure 7 33) or the third vertex of the octagonal grid closest to the horizontal axis in the vertical direction (not shown in the figure), the fourth vertex of the octagonal grid closest to the vertical axis in the horizontal direction (such as Figure 7 34) or the fourth vertex of the octagonal grid closest to the horizontal axis in the vertical direction (not shown in the figure). The compensation value will also change depending on the grid node position of the device center of the automatic navigation device. Therefore, the compensation value (C) can correspond to the following situations depending on the grid node position of the device center of the automatic navigation device (a is the target grid size, 22.5 degrees is the preset angle):
[0102]
[0103] In a specific embodiment, when the preset angle is 22.5 degrees, the tangent function of the preset angle is tan22.5°, the product value of the target grid size and the first number is determined as the abscissa of the initial coordinate, the product value of the target grid size and the second number is determined as the ordinate of the initial coordinate, and the initial coordinate is corrected according to the compensation value and the tangent value of the preset angle to obtain the target coordinate of the device center in the map coordinate system, which may include determining according to the following formula:
[0104]
[0105] Where a is the target grid size, N X is the first number, N Y is the second quantity, C is the compensation value, X is the horizontal coordinate of the target coordinate, and Y is the vertical coordinate of the target coordinate. Figure 3 Take the case 1 in the example as an example, the first number N X is 3, the second number N Y is 2, the compensation value C is
[0106] An embodiment of the present invention also provides a path planning method, which includes: obtaining a grid map, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid; and performing path planning according to the grid map.
[0107] The path planning method provided by an embodiment of the present invention obtains a grid map, which includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids located in two adjacent rows or columns enclose a quadrilateral grid, so that path planning is performed according to the grid map. Since the grid map includes an octagonal matrix, the minimum turning angle of the automatic navigation device between the grids of the map can reach 22.5 degrees, and the ratio of its risk avoidance path to the original path is smaller, thereby shortening the operating time of the automatic navigation device and improving its walking efficiency. Since the minimum turning angle between grids is smaller than that of the existing technology, the amount of calculation required for optimization by the algorithm can be greatly reduced, thereby reducing the workload for path planning. It is worth noting that the construction method or acquisition method of the grid map is not excessively restricted here. Specifically, it can be obtained by the method of constructing the grid map in the above embodiment, or it can be obtained by other methods.
[0108] An embodiment of the present invention further provides a processor configured to execute the method for constructing a grid map according to the above embodiment.
[0109] An embodiment of the present invention further provides a processor, which is configured to execute the path planning method according to the above embodiment.
[0110] An embodiment of the present invention further provides an automatic navigation device, comprising the processor according to the above embodiment.
[0111] It can be understood that the automatic navigation device may include a robot, and further, the robot may include an AGV (Automated Guided Vehicle).
[0112] Figure 8 The figure schematically shows the walking direction of an AGV in a grid map according to an embodiment of the present invention. Figure 9 A schematic diagram schematically shows the walking direction of an AGV in a grid map in another embodiment of the present invention. Figure 10 The following schematically shows a schematic diagram of obstacle point processing in one embodiment of the present invention. Figure 11 The following is a schematic diagram showing the assignment of obstacle points in an embodiment of the present invention. Figure 12 The diagram schematically shows the optimization assignment in one embodiment of the present invention.
[0113] In a preferred embodiment, the method for constructing a grid map may include the following steps:
[0114] (1) Grid division
[0115] a. Use octagonal grid combined with quadrilateral grid to map and mesh the environment of AGV walking path (such as Figure 7 shown).
[0116] b. The size of the grid (the side length L of the octagon) is related to the size of the vehicle (length d, width b), the size of the smallest obstacle (e), the AGV's turning radius (r), and the AGV's trajectory accuracy (σ). For details, refer to the following formula, which can be used to determine an optimal grid size.
[0117] L=min(min(d,b,r) / A,σ / B,e / E)
[0118] Among them, A, B, and E are the third preset value, the first preset value, and the second preset value respectively, and the above values can be empirical values. The third preset value A is related to the size of the vehicle body and the turning radius. The physical meaning is to divide the size of the vehicle body into A equal parts so that the positioning of the vehicle body in the map has better consistency. The first preset value B is related to the trajectory accuracy σ and is less than the trajectory accuracy σ. The physical meaning is to divide the trajectory accuracy into B equal parts to avoid the situation where the grid size is greater than the trajectory accuracy σ and causes inaccurate operation. The second preset value e is related to the size E of the minimum obstacle. The physical meaning is to divide the size of the minimum obstacle into e equal parts to better handle the edge transition between the drivable path and the non-drivable path of the map.
[0119] For example, if d = 1200, b = 800, r = 1500, e = 200, σ = 10, and the empirical parameters A = 500, B = 5, and E = 100, then the optimal target grid size L = min(1.6, 2, 2) = 1.6 can be determined. If a smaller grid is selected, the amount of calculation may increase.
[0120] (2) Confirmation of available points
[0121] a. Walking direction: It is specified that you can walk in the center and vertex of the grid. There are 16, 8 and 6 directions to choose from in the three scenarios respectively (e.g. Figure 2 、 Figure 8 as well as Figure 9 shown).
[0122] b. Grid division: Obstacles in the map are processed by grid occupation (such as Figure 11 As shown in the figure, the AGV (including the objects being transported, such as shelves, etc., the same below) is processed into grid occupation, and the method is the same as the obstacle grid division.
[0123] c. Assignment: The vertices and center points occupied by obstacles are assigned a value of 0 (e.g. Figure 12 As shown in the figure, the vertices and center points of the channel are assigned a value of 1, and the vertices and center points of the grid where the AGV is located are assigned a value of 1.
[0124] Calculation of the AGV drivable area: Place the AGV on the map, multiply the AGV's value by the map node's value, and the result M is either 0 or 1. The position where the result is 1 is the edge position where the AGV can drivable.
[0125] e. Optimize the assignment (i.e., reassign the value): Starting from the boundary between 0 and 1, gradually transition to 1. The number of transition grids is n, and the values are assigned respectively [1 / n, 2 / n, ... (n-2) / n, (n-1) / n, 1]. n is related to the trajectory accuracy σ in the direction perpendicular to the AGV's travel route. It is preferred to select a trajectory accuracy greater than 40 times to set a more reasonable driving safety level. For example, if σ = 10, then n = 400.
[0126] f. Optimize the AGV's drivable area. Place the AGV on the map. Multiply the AGV's value with the map node's value, 0≤G≤1. Set the driving safety level (for example, level 4) based on the multiplication result G. AGVs are only allowed to drive in level 1, 2, and 3 areas. In level 4 areas, there is a risk of collision between the AGV and obstacles, so they are not allowed to drive.
[0127] Level 1: 0.75<G≤1;
[0128] Level 2: 0.5<G≤0.75;
[0129] Level 3: 0.25<G≤0.5;
[0130] Level 4: G≤0.25.
[0131] (3) Coordinate transformation: There are three cases for the centroid coordinates of AGV, such as Figure 7 As shown, case 1 is at the center of the octagon, case 2 is at the center of the quadrilateral, and case 3 is at the endpoint of the octagon. In case 3, there are four more cases, namely 31, 32, 33, and 34, depending on the different directions of the endpoints at the center of the octagon. Figure 2 The X direction is taken as an example.
[0132]
[0133] Where a is the target grid size, N X is the first number, N Y is the second quantity, C is the compensation value, X is the horizontal axis coordinate in the center coordinate, and Y is the vertical axis coordinate in the center coordinate. The compensation value C can include the following situations:
[0134]
[0135] In summary, the above technical solution proposes a new method for constructing maps, which uses a combination of octagons and quadrilaterals and proposes a method for determining the grid size. It has the following advantages:
[0136] (1) In many cases, the ratio of the avoidance path to the original path is tan22.5° / sin22.5°≈1.08, which is better than 1.414 for the quadrilateral and 1.155 for the hexagon.
[0137] (2) There are 16, 8, or 6 walking directions in different situations, and the minimum turning angle is 22.5°, which reduces the workload for path planning.
[0138] (3) The grid size combines multiple factors such as the environment, AGV kinematics, and the size of the smallest obstacle, taking into account comprehensive issues such as decision-making speed and the ability to find paths in dense obstacle environments.
[0139] (4) The collision between AGV and obstacles is avoided, and different safety factors are selected for the overall operation of AGV according to the scenario. The concepts of map assignment gradient and map driving area safety level are proposed.
[0140] Figure 13 The following schematically shows a structural block diagram of an apparatus for constructing a grid map in one embodiment of the present invention. Figure 13As shown, in one embodiment, a device 1300 for constructing a grid map is provided. The device 1300 for constructing a grid map may include a first acquisition module 1301 and a map construction module 1302, wherein:
[0141] The first acquisition module 1301 is used to acquire a target area.
[0142] The map construction module 1302 is used to construct a grid map according to the target area, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid.
[0143] The above-mentioned device 1300 for constructing a grid map obtains a target area through a first acquisition module 1301 and constructs a grid map of the target area including an octagonal grid matrix through a map construction module 1302. Two adjacent octagonal grids in the grid map share a common edge, and four adjacent octagonal grids located in two adjacent rows or columns enclose a quadrilateral grid. The grid map constructed by the above method includes an octagonal matrix. The minimum turning angle between grids of the map for an automatic navigation device can reach 22.5 degrees, and the ratio of its avoidance path to the original path is smaller, thereby shortening the operating time of the automatic navigation device and improving its travel efficiency. Since the minimum turning angle between grids is smaller than that of the existing technology, the amount of calculation required for optimization by the algorithm can be greatly reduced, thereby reducing the workload for path planning.
[0144] In one embodiment, the map construction module 1302 is further used to: obtain relevant information of the automatic navigation device, wherein the relevant information includes trajectory accuracy; obtain obstacle information of obstacles in the target area, wherein the obstacle information includes obstacle size; determine the target grid size based on the trajectory accuracy and the obstacle size; and construct the grid map of the target area based on the target grid size.
[0145] In one embodiment, the map construction module 1302 is further configured to: determine a first grid size according to the trajectory accuracy; determine a second grid size according to the obstacle size; and determine the target grid size according to the smaller of the first grid size and the second grid size.
[0146] In one embodiment, the relevant information also includes the device size of the automatic navigation device and the turning radius of the automatic navigation device; the map construction module 1302 is also used to: determine a third grid size based on the device size and the turning radius; determine the target grid size based on the smallest of the first grid size, the second grid size and the third grid size.
[0147] In one embodiment, the map construction module 1302 is further configured to determine a ratio of the trajectory accuracy to a first preset value to obtain the first grid size, wherein the first preset value is greater than 1.
[0148] In one embodiment, the map construction module 1302 is further configured to: determine the second grid size according to the obstacle size, including: determining a ratio of the obstacle size to a second preset value to obtain the second grid size, wherein the second preset value is greater than 1.
[0149] In one embodiment, the map construction module 1302 is further used to: determine the third grid size based on the device size and the turning radius, including: determine the ratio of the smaller of the device size and the turning radius to a third preset value to obtain the third grid size, wherein the third preset value is greater than 1.
[0150] In one embodiment, the device for constructing a grid map may further include an area division module, which is used to: assign a first numerical value to the nodes of the grid in the grid map, wherein the first numerical value of the nodes of the grid occupied by obstacles is different from the first numerical value of the nodes of the grid not occupied by obstacles, the nodes include vertices and center points, and the nodes of the grid in the grid map include P nodes of the grid occupied by the automatic navigation device; assign a second numerical value to the P nodes of the grid occupied by the automatic navigation device; determine P first product values corresponding to the P nodes, the first product value being the product of the first numerical value of the node and the second numerical value; and determine the drivable area and non-drivable area of the automatic navigation device on the grid map based on the P first product values.
[0151] In one embodiment, the area division module is further used to: when the P first product values are all preset values, determine that the nodes on the grid map corresponding to the P nodes are the drivable areas; when there is a first product value that is not the preset value among the P first product values, determine that the nodes on the grid map corresponding to the P nodes are the non-drivable areas.
[0152] In one embodiment, the area division module is also used to: assign a third numerical value to a grid located in the drivable area and within a preset distance range of the non-drivable area, the third numerical value corresponding to the grid and the distance between the grid and the non-drivable area are related; and divide the drivable area into safety levels according to the size of the third numerical value to obtain drivable areas with different safety levels.
[0153] In one embodiment, the apparatus for constructing a grid map may further include a coordinate determination module, configured to: establish a map coordinate system on the grid map, the map coordinate system including a horizontal axis and a vertical axis; determine the initial coordinates of the device center in the map coordinate system based on the target grid size, a first number of octagonal grids from the device center of the automatic navigation device in the horizontal direction to the vertical axis, and a second number of octagonal grids from the device center in the vertical direction to the horizontal axis; determine a compensation value based on the grid node position of the device center; and correct the initial coordinates based on the compensation value and a tangent value of a preset angle to obtain the target coordinates of the device center in the map coordinate system.
[0154] In one embodiment, the coordinate determination module is further configured to: determine the product value of the target grid size and the first number as the abscissa of the initial coordinate; and determine the product value of the target grid size and the second number as the ordinate of the initial coordinate.
[0155] In one embodiment, the coordinate determination module is further configured to: determine a ratio of the initial coordinate to a tangent value of the preset angle; and determine a sum of the ratio and the compensation value as the target coordinate.
[0156] In one embodiment, the coordinate determination module is further used to: when the grid node position is the center point of the octagonal grid, determine that the compensation value is a first compensation value, wherein the first compensation value is positively correlated with the target grid size and negatively correlated with the tangent value of the preset angle.
[0157] In one embodiment, the coordinate determination module is further used to: when the grid node position is the center point of a quadrilateral grid or the vertex of an octagonal grid closest to the longitudinal axis in the transverse direction, or the vertex of an octagonal grid closest to the transverse axis in the longitudinal direction, determine that the compensation value is a second compensation value, wherein the second compensation value is 0.
[0158] In one embodiment, the coordinate determination module is further used to: when the grid node position is the second vertex closest to the longitudinal axis in the horizontal direction of the octagonal grid or the second vertex closest to the transverse axis in the longitudinal direction of the octagonal grid, determine that the compensation value is a third compensation value, wherein the third compensation value is positively correlated with the target grid size.
[0159] In one embodiment, the coordinate determination module is further used to: when the grid node position is the third vertex of the octagonal grid closest to the longitudinal axis in the horizontal direction or the third vertex of the octagonal grid closest to the transverse axis in the longitudinal direction, determine that the compensation value is a fourth compensation value, wherein the fourth compensation value is positively correlated with the target grid size.
[0160] In one embodiment, the coordinate determination module is further used to: when the grid node position is the fourth vertex of the octagonal grid closest to the longitudinal axis in the horizontal direction or the fourth vertex of the octagonal grid closest to the horizontal axis in the vertical direction, determine that the compensation value is a fifth compensation value, wherein the fifth compensation value is positively correlated with the target grid size and negatively correlated with the tangent value of the preset angle.
[0161] Figure 14 The following schematically shows a structural block diagram of a path planning device according to an embodiment of the present invention. Figure 14 As shown, in one embodiment, a path planning device 1400 is provided, and the path planning device 1400 may include:
[0162] The second acquisition module 1401 is used to acquire a grid map, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid.
[0163] The path planning module 1402 is used to perform path planning based on the grid map.
[0164] The above-mentioned path planning device 1400 obtains a grid map through the second acquisition module 1401. The grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, and four adjacent octagonal grids located in two adjacent rows or columns enclose a quadrilateral grid, so that the path planning module 1402 performs path planning based on the grid map. Since the grid map includes an octagonal matrix, the minimum turning angle of the automatic navigation device between the grids of the map can reach 22.5 degrees, and the ratio of its risk avoidance path to the original path is smaller, thereby shortening the operating time of the automatic navigation device and improving its walking efficiency. Since the minimum turning angle between grids is smaller than that of the existing technology, the amount of calculation relying on the algorithm for optimization can be greatly reduced, thereby reducing the workload for path planning. It is worth noting that the construction method or acquisition method of the grid map is not excessively restricted here. Specifically, it can be obtained by the method of constructing the grid map in the above-mentioned embodiment, or it can be obtained by other methods.
[0165] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor. When the program or instruction is executed by the processor, the method for constructing a grid map according to the above-mentioned embodiment or the path planning method according to the above-mentioned embodiment is implemented.
[0166] An embodiment of the present invention provides a readable storage medium storing a program or instruction. When the program or instruction is executed by a processor, the method for constructing a grid map or the path planning method in the above embodiment is implemented.
[0167] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0168] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0169] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0171] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0172] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0173] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0174] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0175] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for constructing a grid map, characterized in that: The method comprises: Get the target area; A grid map is constructed for the target area to perform path planning based on the grid map, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid, the side length of the quadrilateral grid is equal to the side length of the octagonal grid, the octagonal grid is a regular octagonal grid, and the quadrilateral grid is a regular quadrilateral grid.
2. The method according to claim 1, characterized in that The step of constructing a grid map for the target area includes: Obtaining relevant information of the automatic navigation device, wherein the relevant information includes trajectory accuracy; Obtaining obstacle information of obstacles in the target area, wherein the obstacle information includes obstacle size; determining a target grid size according to the trajectory accuracy and the obstacle size; The grid map is constructed for the target area according to the target grid size.
3. The method according to claim 2, characterized in that The determining of the target grid size according to the trajectory accuracy and the obstacle size includes: determining a first grid size according to the trajectory accuracy; determining a second grid size according to the obstacle size; The target grid size is determined according to the smaller one of the first grid size and the second grid size.
4. The method according to claim 3, characterized in that The relevant information further includes a device size of the automatic navigation device and a turning radius of the automatic navigation device; and determining the target grid size based on the smaller of the first grid size and the second grid size further includes: determining a third grid size according to the device size and the turning radius; The target grid size is determined according to the smallest one of the first grid size, the second grid size, and the third grid size.
5. The method according to claim 4, characterized in that Determining the first grid size according to the trajectory accuracy includes: determining a ratio of the trajectory accuracy to a first preset value to obtain the first grid size, wherein the first preset value is greater than 1; Determining the second grid size according to the obstacle size includes: determining a ratio of the obstacle size to a second preset value to obtain the second grid size, wherein the second preset value is greater than 1; Determining the third grid size according to the device size and the turning radius includes: determining a ratio of the smaller of the device size and the turning radius to a third preset value to obtain the third grid size, wherein the third preset value is greater than 1.
6. The method according to claim 1, characterized in that After constructing the grid map according to the target area, the method further includes: Assigning first values to nodes of a grid in the grid map, wherein the first values of nodes of a grid occupied by an obstacle are different from the first values of nodes of a grid not occupied by an obstacle, the nodes including vertices and center points, and the nodes of the grid in the grid map including P nodes of a grid occupied by an automatic navigation device; Assigning a second numerical value to P nodes of the grid occupied by the automatic navigation device; Determine P first product values corresponding to the P nodes, where the first product value is a product of a first value and a second value of the node; The drivable area and the non-drivable area of the automatic navigation device on the grid map are determined according to the P first product values.
7. The method according to claim 6, characterized in that The determining, based on the P first product values, a drivable area and a non-drivable area of the automatic navigation device on the grid map includes: When the P first product values are all preset values, determining the nodes on the grid map corresponding to the P nodes as the drivable areas; When there is a first product value that is not the preset value among the P first product values, it is determined that the nodes on the grid map corresponding to the P nodes are the non-drivable areas.
8. The method according to claim 6, characterized in that After determining the drivable area and the non-drivable area of the automatic navigation device on the grid map according to the P first product values, the method further includes: Assigning a third value to a grid located in the drivable area and within a preset distance range of the non-drivable area, wherein the third value corresponding to the grid is related to the distance between the grid and the non-drivable area; The drivable area is divided into safety levels according to the size of the third value to obtain drivable areas of different safety levels.
9. The method according to claim 2, characterized in that The method further comprises: Establishing a map coordinate system on the grid map, wherein the map coordinate system includes a horizontal axis and a vertical axis; determining the initial coordinates of the center of the device in the map coordinate system according to the target grid size, a first number of octagonal grids from the center of the automatic navigation device to the longitudinal axis in the transverse direction, and a second number of octagonal grids from the center of the device to the transverse axis in the longitudinal direction; Determining a compensation value based on a grid node position where the center of the device is located; The initial coordinates are corrected according to the compensation value and the tangent value of the preset angle to obtain the target coordinates of the device center in the map coordinate system.
10. The method according to claim 9, characterized in that Determining the initial coordinates of the center of the device in the map coordinate system according to the target grid size, a first number of octagonal grids from the center of the automatic navigation device in the horizontal direction to the vertical axis, and a second number of octagonal grids from the center of the device in the vertical direction to the horizontal axis includes: determining a product value of the target grid size and the first number as the abscissa of the initial coordinate; A product value of the target grid size and the second number is determined as the ordinate of the initial coordinate.
11. The method according to claim 9, characterized in that The correcting the initial coordinates according to the compensation value and the tangent value of the preset angle to obtain the target coordinates of the device center in the map coordinate system includes: Determining a ratio of the initial coordinate to the tangent value of the preset angle; The sum of the ratio and the compensation value is determined as the target coordinate.
12. The method according to claim 9, characterized in that The determining of the compensation value according to the grid node position where the center of the device is located includes at least one of the following situations: When the grid node position is a center point of an octagonal grid, determining the compensation value to be a first compensation value, wherein the first compensation value is positively correlated with the target grid size and negatively correlated with the tangent value of the preset angle; When the grid node position is the center point of a quadrilateral grid, the vertex of an octagonal grid closest to the longitudinal axis in the transverse direction, or the vertex of an octagonal grid closest to the transverse axis in the longitudinal direction, determining the compensation value to be a second compensation value, wherein the second compensation value is 0; When the grid node position is the second vertex closest to the longitudinal axis in the horizontal direction of the octagonal grid or the second vertex closest to the transverse axis in the longitudinal direction of the octagonal grid, determining the compensation value to be a third compensation value, wherein the third compensation value is positively correlated with the target grid size; When the grid node position is the third vertex of the octagonal grid closest to the longitudinal axis in the transverse direction or the third vertex of the octagonal grid closest to the transverse axis in the longitudinal direction, determining the compensation value to be a fourth compensation value, wherein the fourth compensation value is positively correlated with the target grid size; When the grid node position is the fourth vertex of the octagonal grid closest to the longitudinal axis in the horizontal direction or the fourth vertex of the octagonal grid closest to the horizontal axis in the vertical direction, the compensation value is determined to be a fifth compensation value, wherein the fifth compensation value is positively correlated with the target grid size and negatively correlated with the tangent value of the preset angle.
13. A path planning method, characterized in that: The path planning method comprises: Obtaining a grid map, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid, the side lengths of the quadrilateral grids are equal to the side lengths of the octagonal grids, the octagonal grids are regular octagonal grids, and the quadrilateral grids are regular quadrilateral grids; Path planning is performed according to the grid map.
14. A processor, characterized in that: The method is configured to execute the method for constructing a grid map according to any one of claims 1 to 12 or the path planning method according to claim 13.
15. A device for constructing a grid map, characterized in that: The device comprises: A first acquisition module is used to acquire a target area; A map construction module is used to construct a grid map according to the target area to perform path planning according to the grid map, wherein the grid map includes an octagonal grid matrix, wherein two adjacent octagonal grids share a side, and four adjacent octagonal grids located in two adjacent rows or columns enclose a quadrilateral grid, the side length of the quadrilateral grid is equal to the side length of the octagonal grid, the octagonal grid is a regular octagonal grid, and the quadrilateral grid is a regular quadrilateral grid.
16. A path planning device, characterized in that: The path planning device comprises: A second acquisition module is configured to acquire a grid map, wherein the grid map comprises an octagonal grid matrix, wherein two adjacent octagonal grids share a common edge, four adjacent octagonal grids in two adjacent rows or columns enclose a quadrilateral grid, the side lengths of the quadrilateral grids are equal to the side lengths of the octagonal grids, the octagonal grids are regular octagonal grids, and the quadrilateral grids are regular quadrilateral grids; A path planning module is used to perform path planning according to the grid map.
17. An electronic device, characterized in that: The invention comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the method for constructing a grid map according to any one of claims 1 to 12 or the path planning method according to claim 13 is implemented.
18. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, it implements the method for constructing a grid map according to any one of claims 1 to 12 or the path planning method according to claim 13.
Citation Information
Patent Citations
Order processing method and device, equipment and storage medium
CN110020925A