Map processing method, path planning method, device and equipment

By dividing the map into multiple grids and generating KD trees only for occupied grids, the problem of long KD tree generation time in existing technologies is solved, thus improving the efficiency of robot localization and path planning.

CN119293130APending Publication Date: 2025-01-10ZHEJIANG ZHIDING ROBOT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411268345.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

In existing technologies, the process of generating a KD tree based on the entire map is time-consuming, resulting in slow response speed of robot localization programs and low efficiency of ICP algorithm in querying nearest neighbor points.

Method used

The target map is divided into multiple second grids, and KD trees are generated only for the occupied grids. The division is based on the robot's ranging range and the nearest neighbor distance, and KD trees are generated only for these grids to improve query efficiency.

Benefits of technology

It shortens the KD-tree generation time, improves the efficiency of querying nearest neighbors, and ensures the rapid response of the robot localization program and the accuracy of path planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119293130A_ABST
    Figure CN119293130A_ABST
Patent Text Reader

Abstract

The invention provides a map processing method, a path planning method, devices and equipment. The map processing method comprises the following steps: acquiring a target map, wherein the target map comprises a plurality of first grids; dividing the target map into a plurality of second grids, wherein each second grid is determined according to the distance between the nearest neighbor points; respectively determining the state of each second grid according to the states of a plurality of first grids included in each second grid; and for each second grid of which the state is occupied, generating a K-D tree of the second grid according to the second grid and all the first grids included in the plurality of adjacent grids corresponding to the second grid. According to the method, the time for generating the K-D tree can be further shortened, when the nearest neighbor point is queried based on the K-D tree, the nearest neighbor point can be quickly queried, and the query efficiency is improved; and after the K-D tree is generated, the positioning program of the robot can quickly perform normal positioning work, so that the response speed of the positioning program is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot visual navigation technology, and in particular to a map processing method, a path planning method, a device and equipment. Background Art

[0002] Before planning a path for the robot, the ICP (Iterative Closest Point) algorithm is generally used to query the nearest neighbor point. In the implementation of this algorithm, the black point in the current map (i.e., the point where there is an obstacle or an impassable area) is used as the target point to generate a KD tree (k-dimensional). Due to the large size of the above map, it takes a long time to generate a KD tree based on the entire map, and the generated KD tree is also very large. When searching for the nearest neighbor point, the efficiency is very low; and in the process of generating the KD tree, the robot's positioning program cannot perform normal positioning work, and thus the response speed of the positioning program cannot be guaranteed. Summary of the invention

[0003] In view of this, the embodiments of the present application are committed to providing a map processing method, a path planning method, an apparatus and a device to improve processing efficiency.

[0004] In a first aspect, a map processing method is provided, the method comprising: obtaining a target map; wherein the target map comprises a plurality of first grids; dividing the target map into a plurality of second grids; wherein each second grid comprises a plurality of first grids, and each second grid is determined according to the distance of the nearest neighbor point; determining the state of each second grid respectively according to the state of the plurality of first grids included in each second grid; for each second grid whose state is occupied, generating a KD tree of the second grid according to all the first grids included in the second grid and a plurality of adjacent grids corresponding to the second grid; wherein the plurality of adjacent grids are second grids centered on the second grid and all adjacent to the second grid.

[0005] In a second aspect, a path planning method is provided, the method comprising: obtaining a second target position of the robot on a target map; wherein the target map comprises a plurality of second grids; determining the state of the second grid corresponding to the second target position; if the state is determined to be occupied, querying the nearest neighbor point of the laser point received by the robot at the second target position according to the KD tree of the second grid; wherein the KD tree of the second grid is generated according to the method described in the first aspect; and planning a moving path for the robot according to the nearest neighbor point.

[0006] In a third aspect, a map processing device is provided, the device comprising: a map acquisition module, for acquiring a target map; wherein the target map comprises a plurality of first grids; a grid division module, for dividing the target map into a plurality of second grids; wherein each second grid comprises a plurality of first grids, and each second grid is determined according to the distance of the nearest neighbor point; a first determination module, for determining the state of each second grid respectively according to the states of the plurality of first grids included in each second grid; a first generation module, for generating a KD tree of each second grid whose state is occupied, according to all the first grids included in the second grid and a plurality of adjacent grids corresponding to the second grid; wherein the plurality of adjacent grids are second grids centered on the second grid and all adjacent to the second grid.

[0007] In a fourth aspect, a path planning device is provided, which includes: an acquisition module for acquiring a second target position of the robot on a target map; wherein the target map includes multiple second grids; a determination module for determining the state of the second grid corresponding to the second target position; a query module for querying the nearest neighbor point of the laser point received by the robot at the second target position according to the KD tree of the second grid if the state is determined to be occupied; wherein the KD tree of the second grid is generated according to the method described in the first aspect; and a planning module for planning a moving path for the robot according to the nearest neighbor point.

[0008] According to a fifth aspect, a computing device is provided, comprising: one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, and when the program instructions are read and executed by the one or more processors, the method described in the first aspect or the second aspect is executed.

[0009] According to a sixth aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

[0010] According to a seventh aspect, a program product is provided, comprising computer program instructions, which, when executed by a processor, enable the processor to implement the method described in the first aspect or the second aspect.

[0011] In this embodiment, a target map is first obtained, which includes multiple first grids; then, the target map is divided into multiple second grids according to the distance of the nearest neighbor point; when generating a KD tree, only the second grid in the target map that is occupied is generated. The corresponding KD tree is generated, compared with the related art that only generates one KD tree for the entire map, the time for generating the KD tree can be further reduced, and when querying the nearest neighbor point based on the KD tree, the nearest neighbor point can be quickly queried, thereby improving the query efficiency; and after the KD tree is generated, the robot's positioning program can quickly perform normal positioning work, thereby ensuring the response speed of the positioning program. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a schematic diagram of the architecture of an application scenario of a map processing method or a path planning method provided in an embodiment of the present application;

[0013] Figure 2 is a flowchart of a map processing method provided in an embodiment of the present application;

[0014] Figure 3 is a schematic diagram of a second grid provided in an embodiment of the present application;

[0015] Figure 4 is a schematic diagram of a first grid and a second grid provided in an embodiment of the present application;

[0016] Figure 5 is a flow chart of a method for generating a gradient map provided in an embodiment of the present application;

[0017] Figure 6 is a flow chart of a path planning method provided in an embodiment of the present application;

[0018] Figure 7 is a schematic diagram of a map processing device provided in an embodiment of the present application;

[0019] Figure 8 is a schematic diagram of a path planning device provided in an embodiment of the present application;

[0020] Fig. 9 It is a schematic diagram of the structure of the computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] For ease of understanding, this article first introduces the application scenarios to which the map processing method or path planning method provided by this application is applicable. Figure 1 , the computing device 110 is electrically connected to the sensor group 120. After the target map is constructed using the sensor group 120, it is transmitted to the computing device 110, and the computing device 110 performs the following operations:

[0023] (1) obtaining a target map; wherein the target map includes a plurality of first grids;

[0024] (2) dividing the target map into a plurality of second grids; wherein each second grid includes a plurality of first grids, and each second grid is determined according to the distance between the nearest neighbor points;

[0025] (3) determining the state of each second grid according to the states of the plurality of first grids included in each second grid;

[0026] (4) For each second grid whose status is occupied, a KD tree of the second grid is generated based on the second grid and all first grids included in a plurality of adjacent grids corresponding to the second grid; wherein the plurality of adjacent grids are second grids centered on the second grid and all of which are adjacent to the second grid.

[0027] The computing device 110 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices. In the embodiment of the present application, it may be a computing unit in a robot.

[0028] Figure 2 A flowchart of a map processing method provided in an embodiment of the present application, wherein the scheme is applied to Figure 1 The computing device in is used as an example to illustrate. Figure 2 As shown in , the method may include the following steps:

[0029] Step S201: Acquire a target map; wherein the target map includes a plurality of first grids.

[0030] In this embodiment, the target map is divided into a plurality of first grids, and attribute information is set for each first grid, such as geographical features, object types, height, obstacles, etc. Among them, rasterization of the map can be used in the fields of autonomous driving, robot navigation, etc. For example, the target map is divided into a plurality of first grids based on the robot's ranging range (i.e., the robot's ranging range is used as the rasterization resolution); or the target map is divided into a plurality of first grids based on the display resolution of the computing device.

[0031] In one example, the target map may be a map generated by collecting and processing data through sensors deployed on the robot during its movement; the target map may be a map including a specified location, which may be a randomly specified location or any location of the robot during its movement.

[0032] Step S202: Divide the target map into a plurality of second grids; wherein each second grid includes a plurality of first grids, and each second grid is determined according to the distance between the nearest neighbor points.

[0033] In this embodiment, the distance of the nearest neighbor point corresponding to the KD tree is used as the rasterization resolution to divide the target map into a plurality of second grids, each of which includes a plurality of first grids.

[0034] Here, KD tree (KDimensional Tree) is a data structure for partitioning K-dimensional data space, which can be applied to searching for nearest neighbor points. In the process of searching for nearest neighbor points, ICP algorithm is generally used to query the nearest neighbor points with a distance less than r.

[0035] In one example, r=0.3, and 0.3 m is used as the distance of the nearest neighbor point corresponding to the KD tree to divide the target map into a plurality of second grids.

[0036] It should be noted that 0.3 m is only an example; in the actual process of searching for the nearest neighbor point, it can be set according to the search range set by the KD tree and / or the accuracy of the robot positioning program.

[0037] In this embodiment, when the nearest neighbor point is queried through KD, it is sufficient to search through the KD tree covering the radius of 0.3m around the laser point, thereby improving the query efficiency.

[0038] Step S203: determining the status of each second grid respectively according to the status of the plurality of first grids included in each second grid.

[0039] In this embodiment, the state of each second grid is determined by the states of a plurality of first grids included in each second grid.

[0040] Here, the state of the grid may include being occupied or not occupied. Among them, a grid in the target map that is occupied generally indicates that there is an obstacle or an impassable area at the grid.

[0041] Step S204: For each second grid whose status is occupied, generate a KD tree of the second grid according to the second grid and all first grids included in a plurality of adjacent grids corresponding to the second grid; wherein the plurality of adjacent grids are second grids centered on the second grid and all adjacent to the second grid.

[0042] In this embodiment, for each second grid whose status is occupied in step S203, the following operations are performed respectively: the second grid (i.e., each second grid whose status is occupied in step S203) and all first grids included in the multiple adjacent grids corresponding to the second grid are used as target points of the KD tree to generate a KD tree corresponding to the second grid.

[0043] Here, the plurality of adjacent grids are second grids centered on the second grid and adjacent to the second grid. Figure 3 In the target map, all large grids are corresponding. Figure 4 In the figure, 9 large grids (i.e., the second grids) in the target map are taken as an example, each large grid includes multiple small grids (i.e., the first grid), the gray large grid corresponds to the occupied second grid, the white large grid corresponds to the unoccupied second grid, the black small grid corresponds to the occupied first grid, and the white small grid corresponds to the occupied first grid; wherein each large grid has multiple large grids surrounding it as adjacent grids, for example, the 8 large grids surrounding the gray large grid in the middle are the adjacent grids of the gray large grid in the middle.

[0044] It can be seen from the above process that the target map is first obtained, and the target map includes multiple first grids; then, according to the distance of the nearest neighbor point, the target map is divided into multiple second grids; when generating the KD tree, the corresponding KD tree is generated for the second grid in the target map that is occupied. Compared with the related art that generates a KD tree for the entire map, the time for generating the KD tree can be further reduced, and when querying the nearest neighbor point based on the KD tree, the nearest neighbor point can be quickly queried, thereby improving the query efficiency; and after the KD tree is generated, the robot's positioning program can quickly perform normal positioning work, thereby ensuring the response speed of the positioning program.

[0045] The following is a detailed description of each step in the above process. It should be noted that the "first" and "second" in the present disclosure do not have restrictions on order and quantity, but are only used to distinguish between the two grids. For example, "first grid" and "second grid" are used to distinguish between the two grids in name.

[0046] First, the above step S201, namely "obtaining the target map", is described in detail in conjunction with the embodiment.

[0047] According to the first target position of the robot and the ranging range of the robot, a corresponding target map is obtained; wherein the target map includes a plurality of first grids.

[0048] In this embodiment, in the process of generating KD, the grid for generating KD (i.e., all second grids in the target map that are occupied) is screened through the first target position of the robot and the ranging range of the robot. Compared with the related art of generating a KD tree for the entire map, the time for generating the KD tree is further shortened.

[0049] Here, the first target position may be the current position of the robot on the target map. The ranging range of the robot may refer to the farthest distance at which a sensor deployed on the robot can detect an obstacle. The sensor may include various laser radars.

[0050] In this embodiment, the target map is first determined according to the first target position of the robot and the ranging range of the robot; then, the target map is divided into multiple second grids according to the distance of the nearest neighbor point; when generating the KD tree, the KD tree corresponding to the second grid in the target map that is occupied is generated. Compared with the related art in which a KD tree is generated for the entire map, the time for generating the KD tree can be further reduced, and when querying the nearest neighbor point based on the KD tree, the nearest neighbor point can be quickly queried, thereby improving the query efficiency; and after the KD tree is generated, the positioning program of the robot can quickly perform normal positioning work, thereby ensuring the response speed of the positioning program.

[0051] The above step of "obtaining a corresponding target map according to the first target position of the robot and the ranging range of the robot" is described in detail below in conjunction with the embodiments.

[0052] In this embodiment, the corresponding original map is determined according to the positions of all laser points received by the robot at the first target position, and the original map may include the positions of all laser points; then, according to the ranging range of the robot, the original map is divided into multiple first grids to obtain the target map.

[0053] Here, all the laser points received by the robot at the first target position can refer to the robot at the first target position, using the sensor deployed on it to scan the environment for a week, and the light signals returned when the light emitted by the sensor encounters an obstacle. After these reflected light signals are converted into electrical signals, the algorithm inside the robot will process them to determine the time difference or phase difference of the round trip of the laser pulse. Based on this information, the robot can calculate the distance and position of the obstacle, and then generate a series of laser points inside the robot.

[0054] In one example, the position of the laser point is a partial position or a full position in the original map.

[0055] In this embodiment, the target map is first determined according to the first target position of the robot and the ranging range of the robot; then, when generating the KD tree, the KD tree corresponding to the second grid in the target map that is occupied is generated. Compared with the related art in which a KD tree is generated for the entire map, the time for generating the KD tree can be further reduced. When querying the nearest neighbor point based on the KD tree, the nearest neighbor point can be quickly queried, thereby improving the query efficiency.

[0056] The above step 204, ie, "determining the status of each second grid respectively according to the status of the plurality of first grids included in each second grid" is described in detail below in conjunction with an embodiment.

[0057] In this embodiment, if there is a first grid whose status is occupied within the second grid (for example, the status of at least one first grid is occupied), the status of the second grid is confirmed as occupied; and / or, if there is an adjacent grid whose status is occupied among multiple adjacent grids corresponding to the second grid, the status of the second grid is determined to be occupied.

[0058] exist Figure 4 In the left figure of , the state of the large grid (ie, the second grid) including the small black grid (ie, the first grid whose state is occupied) is determined to be occupied.

[0059] exist Figure 4 In the right figure, each large grid is taken as the center, and the status of the 8 adjacent grids around the center is determined; for the convenience of explanation, the 9 large grids are numbered according to their arrangement, for example, the large grids in the first row are numbered as upper 1, upper 2 and upper 3, the large grids in the second row are numbered as middle 1, middle 2 and middle 3, and the large grids in the third row are numbered as lower 1, lower 2 and lower 3. With the large grid upper 2 as the center, the status of the adjacent grids around it is occupied, and at this time, the status of the upper 2 is confirmed to be occupied; with the large grid middle 3 as the center, the status of the adjacent grids around it is occupied, and at this time, the status of the middle 3 is confirmed to be occupied.

[0060] In this embodiment, the state of each second grid is determined by the state of at least one first grid included in each second grid and / or the state of multiple adjacent grids corresponding to each second grid, so that the second grids for which the KD tree needs to be generated (i.e., the second grids whose state is occupied) can be screened out from the target map. Compared with the related art of generating a KD tree for the entire map, the time for generating the KD tree can be further reduced, and when querying the nearest neighbor point based on the KD tree, the nearest neighbor point can be quickly queried, thereby improving the query efficiency.

[0061] The “first target position” in the above step 201 is described in detail below in conjunction with an embodiment.

[0062] In this embodiment, the first target position is any position of the robot during its movement.

[0063] In the embodiment, all KD trees of the entire map are gradually generated by positioning while the robot moves. When the entire map in the related art is a large map, positioning is started only after a KD tree is generated according to the entire map, which improves the response efficiency of the positioning program. When the entire map in the related art is a different map image in a large map, it is not conducive to planning a global path for the robot (i.e., a path on the large map) for different map images; and when planning a moving path for the robot, it is necessary to switch between different map images, which increases the complexity of the interaction and is not conducive to data visualization and management; in addition, when generating KD trees for different map images, it takes a long time, resulting in the robot's positioning program being unable to perform normal positioning work during this time, reducing the response efficiency of the positioning program.

[0064] The following is a detailed description of “generating all KD trees of the entire map by positioning the robot while moving” in conjunction with the embodiments.

[0065] In this embodiment, when the robot is in an idle state, each second grid whose state is occupied is traversed, and the step of generating a KD tree is performed for the second grid for which a KD tree is not generated (that is, the second grid whose state is occupied) (for example, corresponding to Figure 2 Step S204); if the time taken to generate the KD tree exceeds a preset time threshold, the traversal is stopped, and the step of generating the KD tree is stopped; until the robot is in an idle state again, the traversal step is continued, and the step of generating the KD tree is continued; wherein the idle state is the state when the robot is stationary at any position during its movement. The time taken can be the time taken to generate the KD.

[0066] In an example, taking the map processing process when the robot moves to position a and position b as an example, that is, position a and position b are respectively used as the first target position, all KD trees of the entire map are generated by positioning while the robot moves, which may include:

[0067] (1) Determine the occupied state of each second grid in the target map corresponding to position a, and generate a KD tree for the second grid; (2) Determine whether the robot is stationary at position a. If the robot is stationary at position a (i.e., confirm that the robot is in an idle state), traverse the second grids for which no KD tree is generated (the state of the second grid is occupied) and generate KD trees for these second grids. When generating the KD tree, a time timer is set; (3) When the time taken to generate the KD tree exceeds a preset time threshold (for example, the time timer exceeds 0.5s), it is necessary to wait until the robot is in an idle state again before continuing to execute the above traversal steps and the step of generating the KD tree.

[0068] In this embodiment, in the process of generating KD trees based on grids, when the robot moves to position a, the target map is obtained only based on position a and the range of distance measurement; then, for the second grid in the target map that is occupied, the corresponding KD tree is generated and saved. When the robot moves to position b, it is traversed to see whether the KD of the robot at position b has been generated. If not, the KD tree is generated again. In this way, all KD trees of the entire large map are gradually generated by positioning while moving. Compared with the related technology, positioning is started only after a KD tree is generated according to the entire map, which improves the response efficiency of the positioning program.

[0069] Figure 5 A flowchart of a method for generating a gradient map provided in an embodiment of the present application, wherein the scheme is applied to Figure 1 The computing device in is used as an example for explanation.

[0070] like Figure 5 As shown in , after obtaining the target map including a plurality of first grids, the method may include the following steps:

[0071] Step S501: taking each of the first grids in an occupied state among the plurality of first grids as a source grid.

[0072] In this embodiment, the source point grid may be used as a starting grid to expand surrounding grids around the source point grid.

[0073] In one example, each first grid whose status is occupied in step S501 may be put into a queue to be traversed, and each first grid may be used as a source grid.

[0074] It should be noted that the traversed grids are marked without repeating or traversing in reverse.

[0075] Step S502: respectively determining the distances between the source point grid and a plurality of surrounding grids; wherein the plurality of surrounding grids are a plurality of first grids centered on the source point grid and in an unoccupied state.

[0076] In this embodiment, each of the first grids in the occupied state in step S501 is used as a source grid, and then the distance between the source grid and each of the surrounding grids is determined.

[0077] Here, the surrounding grid is a first grid in an unoccupied state, and the multiple unoccupied first grids are centered on the source grid and surround the source grid. The surrounding grids may include: adjacent grids or grids within a certain range centered on the source grid. The first range may be the distance of the nearest neighbor in this embodiment.

[0078] Step S503: until the distance reaches the distance of the nearest neighbor point, within the distance of the nearest neighbor point, a gradient map is generated according to the distance between the source point grid and multiple surrounding grids.

[0079] In this embodiment, step S502 is executed multiple times according to the source point grid in step S501 to expand the surrounding grids starting from the source point grid in step S501, and the distance between the source point grid and each surrounding grid is determined respectively; until the distance reaches the distance of the nearest neighbor point, a gradient map is generated according to the distance between the source point grid and each surrounding grid within the distance of the nearest neighbor point.

[0080] In this embodiment, steps S501 to S502 are performed multiple times until the distance determined in step S502 reaches the distance of the nearest neighbor point, and then the expansion of the surrounding grids from the source point grid to the surrounding of the source point grid is stopped.

[0081] It should be noted that the grids for which the gradient map has been generated are marked and stored so that when the gradient map is needed later, the gradient map is not generated repeatedly.

[0082] In this embodiment, a plurality of surrounding grids in the target map and within the distance from the nearest neighbor point are first determined; then a gradient map is generated according to the distances between the plurality of surrounding grids and the source point grid respectively. Compared with the related art of generating a depth map for the entire map, the time for generating the gradient map can be further shortened, so that the robot can respond to the positioning work more quickly for path planning.

[0083] The above step S502, namely "respectively determining the distances between the source point grid and a plurality of surrounding grids", is described in detail below in conjunction with an embodiment.

[0084] In this embodiment, the distances between the source point grid and four adjacent grids are determined respectively; then, the four adjacent grids are taken as target grids respectively, and the distances between the source point grid and the four adjacent grids to the target grid are determined respectively.

[0085] In one example, the four grids may include a grid directly below, a grid directly above, a grid directly to the left, and a grid directly to the right.

[0086] In this embodiment, the surrounding grids are expanded from the source point grid until the distance between the surrounding grids and the source point grid reaches the distance of the nearest neighbor point; within the distance of the nearest neighbor point, a depth map is generated according to the distance between the surrounding grids and the source point grid. Compared with the related technology of generating a depth map for the entire map, the time for generating a gradient map can be further shortened, so that the robot can respond to positioning work more quickly to perform path planning.

[0087] Figure 6 A flow chart of a path planning method provided in an embodiment of the present application, in which the scheme is applied to Figure 1 The computing device in is used as an example to illustrate. Figure 6 As shown in , the method may include the following steps:

[0088] Step S601: Acquire a second target position of the robot on a target map; wherein the target map includes a plurality of second grids.

[0089] In this embodiment, when performing path planning for the robot, the second target position of the robot on the target map can be obtained through the robot's positioning program; wherein the robot's positioning program may refer to a program that uses positioning technologies such as SLAM (Simultaneous Localization and Mapping) and 3D (Dimension) SLAM.

[0090] Here, the target map may be a map generated according to step S201 and step S202, and the target map may include a plurality of second grids. For the corresponding description of the target map, please refer to Figure 2 The corresponding description of the target map will not be repeated here.

[0091] Step S602: Determine the state of the second grid corresponding to the second target position.

[0092] In this embodiment, after the second target position of the robot is acquired in step S601, it is queried on the target map whether the second target position occupies the second grid; if the second target position occupies the second grid, the state of the second grid is determined.

[0093] Here, the state of the second grid can be determined according to the following steps: if there is a first grid in the second grid whose state is occupied, the state of the second grid is confirmed as occupied; and / or, if there is an adjacent grid in the multiple adjacent grids corresponding to the second grid whose state is occupied, the state of the second grid is determined to be occupied.

[0094] Step S603: If the state is determined to be occupied, query the nearest neighbor point of the laser point received by the robot at the second target position according to the KD tree of the second grid.

[0095] In this embodiment, when the state of the second grid corresponding to the second target position is occupied in step S602, the nearest neighbor point of the laser point received by the robot at the second target position can be queried according to the KD tree of the second grid.

[0096] Here, the KD tree of the second grid may be a KD tree generated according to a map processing method, wherein the KD tree is used to query the nearest neighbor point of the laser point received by the robot at the second target position.

[0097] Step S604: Plan a moving path for the robot based on the nearest neighbor point.

[0098] In this embodiment, after the nearest neighbor point is determined, a moving path is planned for the robot according to the nearest neighbor point to avoid the robot from colliding with obstacles when moving.

[0099] In one example, the nearest neighbor point is used to perform collision detection and avoid obstacles to obtain a moving path.

[0100] In one example, a nearest neighbor point is used as the source point, and starting from the source point, the robot passes through the other nearest neighbor points mentioned above. The other nearest neighbor points can only be visited once, and finally the robot returns to the source point to obtain the path of the robot.

[0101] When selecting a path, the goal of path selection may be to require that the mileage of the path obtained is the minimum among all paths and that there is no collision with obstacles.

[0102] In this embodiment, when the state of the second grid corresponding to the second target position of the robot is occupied, the nearest neighbor point can be quickly queried through the KD tree corresponding to the second grid, thereby improving the query efficiency.

[0103] In combination with the embodiment below, after executing the above step S604, the path planning method further includes: scoring the laser points projected onto the target map according to the gradient map to obtain a scoring result; and optimizing the moving path according to the scoring result.

[0104] In this embodiment, the laser points projected onto the target map are scored by the gradient map, and the path quality and confidence of the moving path in step S604 are adjusted according to the scoring results to achieve the purpose of optimizing the moving path. The laser point refers to the laser radar that obtains the three-dimensional coordinate information of the target by emitting laser pulses to the target, receiving the reflected signals, and calculating the distance according to the time difference of the round trip of the laser pulse. The points of these three-dimensional coordinate information on the target map are discretely distributed laser points. The path quality is used to measure the quality of the moving path, and the confidence is used to indicate how likely the moving path is to be correct.

[0105] In an example, the scoring result may be a score, such as 40, and a corresponding optimization factor may be preset for the score to optimize the moving path.

[0106] In another example, the scoring result may include scores corresponding to the path quality and the confidence level; corresponding optimization factors may be pre-set for the scores corresponding to the path quality and the scores corresponding to the confidence level to optimize the path.

[0107] In one example, the gradient map can be based on Figure 5 Generated by the method for generating gradient map shown.

[0108] In this embodiment, the moving path can be optimized by using the scoring results of the laser points in the gradient map.

[0109] In combination with the embodiment below, after executing the above step S602, the path planning method further includes:

[0110] If the state is determined to be unoccupied, it is confirmed that the laser point received at the second target position has no nearest neighbor point within the distance of the nearest neighbor point.

[0111] In this embodiment, when it is determined that the state of the second grid corresponding to the second target position is occupied, it is confirmed that the laser point received by the robot at the second target position has no nearest neighbor point within the distance of the nearest neighbor point.

[0112] In one example, when it is determined that the state of the second grid corresponding to the second target position is occupied, it can be confirmed that the laser point received by the robot at the second target position has no nearest neighbor point within 0.3 m.

[0113] In this embodiment, the state of the second grid corresponding to the second target position of the robot is determined to confirm whether the nearest neighbor point can be queried within the distance of the nearest neighbor point. Compared with querying the nearest neighbor point from a KD tree generated based on the entire map in the related technology, the query efficiency is higher.

[0114] Combination of the above Figure 2 and Figure 5 , describes the method embodiment of the present application in detail, and the following is combined with Figure 7 , describes the device embodiment of the present application in detail. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so the parts not described in detail can refer to the previous method embodiment.

[0115] Figure 7 FIG. 1 is a schematic diagram of the structure of a map processing device provided by an embodiment of the present application. Figure 7 As shown, the map processing device provided by the embodiment of the present application includes a map acquisition module 701, a grid division module 702, a first determination module 703 and a first generation module 704. The map acquisition module 701 is used to acquire a target map; wherein the target map includes a plurality of first grids; the grid division module 702 is used to divide the target map into a plurality of second grids; wherein each second grid includes a plurality of first grids, and each second grid is determined according to the distance of the nearest neighbor point; the first determination module 703 is used to determine the state of each second grid according to the state of the plurality of first grids included in each second grid; the first generation module 704 is used to generate a KD tree of the second grid according to all the first grids included in the second grid and the plurality of adjacent grids corresponding to the second grid for each second grid whose state is occupied; wherein the plurality of adjacent grids are second grids centered on the second grid and adjacent to the second grid.

[0116] In one embodiment, the map acquisition module 701 is specifically used to acquire a corresponding target map according to the first target position of the robot and the ranging range of the robot.

[0117] In one embodiment, the first target position is any position of the robot during its movement.

[0118] In one embodiment, the map acquisition module 701 is specifically used to: determine the corresponding original map according to the positions of all laser points received by the robot at the first target position; and divide the original map into multiple first grids according to the ranging range of the robot to obtain the target map.

[0119] In one embodiment, the device also includes: a control module (not shown in the figure), which is used to, if the robot is in an idle state, traverse the second grids in which the KD tree is not generated among the occupied second grids, and trigger the first generation module 704 to execute the step of generating the KD tree; if the time consumed to generate the KD tree exceeds a preset time threshold, stop the traversal; until the robot is in an idle state again, continue to execute the traversal step, and continue to trigger the first generation module 704 to execute the step of generating the KD tree; wherein, the idle state is the state when the robot is stationary at any position during its movement.

[0120] In one embodiment, the device also includes: a gradient map generating module (not shown in the figure), which is used to use each first grid in a plurality of first grids that is occupied as a source point grid; determine the distance between the source point grid and a plurality of surrounding grids respectively; wherein the plurality of surrounding grids are a plurality of first grids centered on the source point grid and that are unoccupied; until the distance reaches the distance of the nearest neighbor point, within the distance of the nearest neighbor point, generate a gradient map according to the distance between the source point grid and the plurality of surrounding grids.

[0121] In one embodiment, the gradient map generation module is specifically used to: determine the distance between the source point grid and four adjacent grids respectively; use the four adjacent grids as target grids respectively, and determine the distance between the source point grid and the four grids adjacent to the target grid respectively.

[0122] In one embodiment, the first determination module 703 is specifically used to: if the state of at least one first grid included in each second grid is occupied, then the state of each second grid is determined to be occupied; if the state of multiple adjacent grids corresponding to each second grid is occupied, then the state of each second grid is determined to be occupied.

[0123] Combination of the above Figure 6 , describes the method embodiment of the present application in detail, and the following is combined with Figure 8 , describes the device embodiment of the present application in detail. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so the parts not described in detail can refer to the previous method embodiment.

[0124] Figure 8 FIG. 1 is a schematic diagram of the structure of a path planning device provided by an embodiment of the present application. Figure 8 As shown, the path planning device provided by the embodiment of the present application includes an acquisition module 801, a determination module 802, a query module 803 and a planning module 804. The acquisition module 801 is used to acquire the second target position of the robot on the target map; wherein the target map includes a plurality of second grids; the determination module 802 is used to determine the state of the second grid corresponding to the second target position; the query module 803 is used to query the nearest neighbor point of the laser point received by the robot at the second target position according to the KD tree of the second grid if the state is determined to be occupied; wherein the KD tree of the second grid is generated according to the map processing method; the planning module 804 is used to plan a moving path for the robot according to the nearest neighbor point.

[0125] In one embodiment, the device further includes: a scoring module (not shown in the figure), which is used to score the laser points projected onto the target map according to the gradient map to obtain a scoring result; and a path optimization module, which is used to optimize the moving path according to the scoring result.

[0126] In one embodiment, the device further includes: a confirmation module (not shown in the figure), which is used to confirm that the laser point received at the second target position has no nearest neighbor point within the distance of the nearest neighbor point if the state is determined to be unoccupied.

[0127] Below, reference Fig. 9 To describe a computing device according to an embodiment of the present application. Fig. 9 Shown is a schematic diagram of the structure of a computing device provided in one embodiment of the present application.

[0128] like Fig. 9 As shown, the computing device includes one or more processors 901 and memory 902 .

[0129] The processor 901 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in a computing device to perform desired functions.

[0130] The memory 902 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and the processor 901 may run the program instructions to implement functions such as the map processing method or path planning method of each embodiment of the present application mentioned above. Various contents such as registration information of the film reader and capability performance data may also be stored in the computer-readable storage medium.

[0131] In one example, the computing device may further include: an input device 903 and an output device 904 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0132] The input device 903 may include, for example, a keyboard, a mouse, etc.

[0133] The output device 904 can output various information to the outside, including the expert database corresponding to the film reading task to be assigned, etc. The output device 904 can include, for example, a display, a speaker, a printer, a communication network and its connected remote output device, etc.

[0134] Of course, to simplify, Fig. 9Only some of the components in the computing device related to the present application are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the computing device may further include any other appropriate components according to specific application scenarios.

[0135] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the map processing method or path planning method according to various embodiments of the present application described above in this specification.

[0136] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0137] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the map processing method or path planning method according to various embodiments of the present application described above in this specification.

[0138] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0139] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0140] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0141] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0142] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0143] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

[0144] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A map processing method, wherein: The method comprises: Acquire a target map; wherein the target map includes a plurality of first grids; Dividing the target map into a plurality of second grids; wherein each second grid includes a plurality of first grids, and each second grid is determined according to the distance of the nearest neighbor point; Determine the state of each second grid according to the states of the plurality of first grids included in each second grid; For each second grid whose status is occupied, a KD tree of the second grid is generated according to the second grid and all first grids included in a plurality of adjacent grids corresponding to the second grid; wherein the plurality of adjacent grids are second grids centered on the second grid and all adjacent to the second grid.

2. The method according to claim 1, wherein: The obtaining of the target map comprises: A corresponding target map is acquired according to the first target position of the robot and the ranging range of the robot.

3. The method according to claim 2, wherein: The step of obtaining a corresponding target map according to the first target position of the robot and the ranging range of the robot includes: Determine the corresponding original map according to the positions of all laser points received by the robot at the first target position; According to the ranging range of the robot, the original map is divided into a plurality of first grids to obtain the target map.

4. The method according to claim 2, wherein: The method further comprises: If the robot is in an idle state, traverse the second grids in each occupied second grid where the KD tree is not generated, and execute the step of generating the KD tree; If the time taken to generate the KD tree exceeds the preset time threshold, the traversal is stopped; Until the robot is in an idle state again, the traversal step is continued, and the step of generating the KD tree is continued; wherein the idle state is the state when the robot is stationary at any position during its movement.

5. The method according to any one of claims 1 to 4, wherein: The method further comprises: Taking each of the first grids in an occupied state among the plurality of first grids as a source grid; Determine the distances between the source point grid and a plurality of surrounding grids respectively; wherein the plurality of surrounding grids are a plurality of first grids centered on the source point grid and in an unoccupied state; Until the distance reaches the distance of the nearest neighbor point, within the distance of the nearest neighbor point, a gradient map is generated according to the distance between the source point grid and a plurality of surrounding grids.

6. The method according to any one of claims 1 to 4, wherein: The step of determining the state of each second grid according to the states of the plurality of first grids included in each second grid comprises at least one of the following: If the state of at least one first grid included in each second grid is occupied, determining the state of each second grid as occupied; If the states of a plurality of adjacent grids corresponding to each second grid are occupied, the state of each second grid is determined to be occupied.

7. A path planning method, the method comprising: Acquire a second target position of the robot on the target map; wherein the target map includes a plurality of second grids; determining a state of a second grid corresponding to the second target position; If it is determined that the state is occupied, query the nearest neighbor point of the laser point received by the robot at the second target position according to the KD tree of the second grid; wherein the KD tree of the second grid is generated according to the method according to any one of claims 1 to 6; A moving path is planned for the robot according to the nearest neighbor point.

8. The method according to claim 7, wherein: The method further comprises: Scoring the laser points projected onto the target map according to the gradient map to obtain a scoring result; wherein the gradient map is the gradient map as claimed in claim 5; The moving path is optimized according to the scoring result.

9. A computing device, wherein: including memory and processor; The memory is connected to the processor and is used to store programs; The processor is configured to implement the method according to any one of claims 1 to 8 by running the program in the memory.

10. A computer-readable storage medium, wherein: The storage medium stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 8 is implemented.

11. A computer program product, wherein: The method comprises computer program instructions, which, when executed by a processor, cause the processor to implement the method according to any one of claims 1 to 8.