Variable-Size Facet Map Construction Method, Apparatus, Storage Medium, and Robot

The variable-sized face element map construction method addresses inefficiencies in robot map construction by reducing memory usage and enhancing efficiency through the storage and processing of target face element data.

CN114519783BActive Publication Date: 2025-07-15SHEN ZHEN 3IROBOTICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210130265.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2025-07-15
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

In the prior art, the three-dimensional point cloud data occupies a large amount of memory due to environmental updates during the robot map construction process, resulting in inefficient map construction.

Method used

The variable-size surface element map construction method is adopted to obtain the three-dimensional point cloud map, traverse each three-dimensional point to build the initial surface element, and expand it to determine and store the representation point data of the target surface element to reduce the memory usage of the three-dimensional point cloud data.

Benefits of technology

Map construction is constructed by storing multiple target surface characterization point data with variable sizes, which reduces the memory usage of three-dimensional point cloud data and improves map construction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114519783B_ABST
    Figure CN114519783B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, storage medium and robot for constructing a variable-size voxel map. The method includes the following steps: obtaining a three-dimensional point cloud map; traversing each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial voxels; performing an expansion process on each initial voxel to obtain a target voxel corresponding to the three-dimensional point; determining and storing the representation point data of each target voxel, so as to construct a map according to the representation point data of each target voxel. Thus, by using the stored representation point data of a plurality of target voxels with variable sizes for map construction, the memory occupancy of the three-dimensional point cloud data is reduced, and the map construction efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robots, and in particular, to a method for constructing a variable-size voxel map, a computer-readable storage medium, a robot, and a variable-size voxel map construction device. Background Art

[0002] Currently, robots in related technologies usually rely on sensors to perceive the surrounding environment to describe the position of the robot itself and the environment. Furthermore, through the matching of the current observations of the robot and the historical mapping, the update and supplement of the map construction are realized.

[0003] However, the problem of related technologies is that as the surrounding environment of the robot is updated, the map storage data will gradually increase and occupy a large amount of memory space, resulting in the need to call a large amount of map storage data during map construction, and the map construction efficiency is low. Summary of the Invention

[0004] The present invention aims to at least partly solve one of the technical problems in related technologies. To this end, the first object of the present invention is to propose a method for constructing a variable-size voxel map, which can construct a map by storing the representative point data of a plurality of target voxels with variable sizes, thereby reducing the memory occupation of three-dimensional point cloud data and improving the map construction efficiency.

[0005] The second object of the present invention is to propose a computer-readable storage medium.

[0006] The third object of the present invention is to propose a robot.

[0007] The fourth object of the present invention is to propose a variable-size voxel map construction device.

[0008] To achieve the above object, the method for constructing a variable-size voxel map proposed in the first aspect of the present invention includes the following steps: obtaining a three-dimensional point cloud map; traversing each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial voxels; performing an expansion process on each of the initial voxels to obtain a target voxel corresponding to the three-dimensional point; determining and storing the representative point data of each of the target voxels, so as to construct a map according to the representative point data of each of the target voxels.

[0009] According to the variable-size face element map construction method of the embodiments of the present invention, a three-dimensional point cloud map is obtained, and each three-dimensional point in the three-dimensional point cloud map is traversed to construct a plurality of initial face elements. Furthermore, each initial face element is subjected to an expansion process to obtain a target face element corresponding to the three-dimensional point, and the representative point data of each target face element is determined and stored, so as to construct a map according to the representative point data of each target face element. Thus, the map is constructed by storing the representative point data of a plurality of target face elements with variable sizes, thereby reducing the memory occupancy of the three-dimensional point cloud data and improving the map construction efficiency.

[0010] In addition, the variable-size face element map construction method according to the above embodiments of the present invention may further have the following additional technical features:

[0011] According to an embodiment of the present invention, traversing each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial face elements includes: when traversing each three-dimensional point in the three-dimensional point cloud map, taking any one three-dimensional point as an initial starting point; determining a set of candidate points according to the initial starting point; wherein, a plurality of the remaining three-dimensional points in the three-dimensional point cloud map are used as candidate points in the set of candidate points; and constructing an initial face element corresponding to the initial starting point according to the initial starting point and the set of candidate points.

[0012] According to an embodiment of the present invention, performing an expansion process on the initial face element corresponding to the initial starting point to obtain a target face element corresponding to the initial starting point includes: S1, obtaining a plurality of three-dimensional points having feature consistency with the initial starting point, and expanding the plurality of three-dimensional points having feature consistency with the initial starting point into the initial face element to obtain a first face element; S2, taking each candidate point in the set of candidate points as a new starting point, and repeating step S1 to obtain a second face element; S3, determining the target face element corresponding to the three-dimensional point according to the first face element and the second face element.

[0013] According to an embodiment of the present invention, obtaining a plurality of three-dimensional points having feature consistency with the initial starting point includes: obtaining a set of candidate points that satisfy a preset coplanar condition with the initial face element, and screening out target points that satisfy a preset co-color condition with the initial starting point from the set of candidate points; and taking the target points as the three-dimensional points having feature consistency with the initial starting point.

[0014] According to an embodiment of the present invention, the preset co-color condition is to screen target points with the color of the initial starting point as a reference color.

[0015] According to an embodiment of the present invention, determining and storing the characterization point data of each of the target patches includes: calculating the center point coordinates and normal vector in the target patch; calculating the distances from all three-dimensional points in the target patch to the center point, and sorting each of the distances to obtain the three-dimensional point with the largest distance from the center point as the first diagonal point of the target patch; determining the first diagonal line of the target patch according to the first diagonal point and the center point; determining the three-dimensional points that meet the preset angle condition from the remaining three-dimensional points of the target patch as the second diagonal point of the target patch; determining the second diagonal line of the target patch according to the second diagonal point and the center point; taking the four endpoint data of the first diagonal line and the second diagonal line as the characterization point data of the target patch and storing them.

[0016] According to an embodiment of the present invention, the preset angle condition is that the included angle formed by the line connecting the second diagonal point to the center point and the line connecting the first diagonal point to the center point is an obtuse angle.

[0017] To achieve the above object, a computer-readable storage medium proposed in the second aspect embodiment of the present invention stores a variable-size patch map construction program, and when the variable-size patch map construction program is executed by a processor, it implements the variable-size patch map construction method as described in the first aspect embodiment.

[0018] According to the computer-readable storage medium of the embodiment of the present invention, by executing the variable-size patch map construction program, map construction can be performed through the stored characterization point data of a plurality of target patches with variable sizes, thereby reducing the memory occupation of the three-dimensional point cloud data and improving the map construction efficiency.

[0019] To achieve the above object, a robot proposed in the third aspect embodiment of the present invention includes a memory, a processor, and a variable-size patch map construction program stored in the memory and executable on the processor. When the processor executes the variable-size patch map construction program, it implements the variable-size patch map construction method as described in the first aspect embodiment.

[0020] According to the robot of the embodiment of the present invention, by executing the variable-size patch map construction program, map construction can be performed through the stored characterization point data of a plurality of target patches with variable sizes, thereby reducing the memory occupation of the three-dimensional point cloud data and improving the map construction efficiency.

[0021] To achieve the above object, the variable-size surface element map construction device according to the fourth aspect embodiment of the present invention includes: an acquisition module for acquiring a three-dimensional point cloud map; a traversal module for traversing each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial surface elements; an expansion module for performing expansion processing on each of the initial surface elements to obtain a target surface element corresponding to the three-dimensional point; and a construction module for determining and storing the characterization point data of each of the target surface elements for map construction according to the characterization point data of each of the target surface elements.

[0022] According to the variable-size surface element map construction device of the embodiment of the present invention, the three-dimensional point cloud map is acquired by the acquisition module, and each three-dimensional point in the three-dimensional point cloud map is traversed by the traversal module to construct a plurality of initial surface elements. Furthermore, the expansion module performs expansion processing on each initial surface element to obtain a target surface element corresponding to the three-dimensional point, and the construction module determines and stores the characterization point data of each target surface element for map construction according to the characterization point data of each target surface element. Thus, map construction is performed based on the stored characterization point data of a plurality of target surface elements with variable sizes, thereby reducing the memory occupancy of the three-dimensional point cloud data and improving the map construction efficiency.

[0023] Additional aspects and advantages of the present invention will be given in part in the following description, become apparent in part from the following description, or be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 is a flowchart of a variable-size surface element map construction method according to an embodiment of the present invention;

[0025] Figure 2 is a flowchart of a variable-size surface element map construction method according to an embodiment of the present invention;

[0026] Figure 3 is a flowchart of a variable-size surface element map construction method according to an embodiment of the present invention;

[0027] Figure 4 is a schematic diagram of a variable-size surface element according to a specific embodiment of the present invention;

[0028] Figure 5 is a flowchart of a variable-size surface element map construction method according to a specific embodiment of the present invention;

[0029] Figure 6 is a block diagram of a variable-size surface element map construction device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0030] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to explain the present invention, and should not be construed as limiting the present invention.

[0031] The method for constructing a variable-size voxel map, computer-readable storage medium, robot, and variable-size voxel map construction device according to embodiments of the present invention will be described below with reference to the accompanying drawings.

[0032] Figure 1 It is a schematic flowchart of a method for constructing a variable-size voxel map according to an embodiment of the present invention.

[0033] As Figure 1 shown, the method for constructing a variable-size voxel map according to an embodiment of the present invention includes the following steps:

[0034] S101, obtain a three-dimensional point cloud map.

[0035] Optionally, the three-dimensional point cloud map may be a global map of the current environment. Among them, the three-dimensional point cloud map may include three-dimensional coordinate information, RGB pixels, and normal vectors of each three-dimensional point.

[0036] S102, traverse each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial voxels.

[0037] It can be understood that replacing the original object surface with a plane or a curved surface is called a voxel. Among them, in the embodiments of the present invention, each voxel can be used to represent a plurality of three-dimensional points located on the same plane or curved surface.

[0038] Optionally, during the process of traversing each three-dimensional point in the three-dimensional point cloud map, the traversed three-dimensional points can be marked, so as to facilitate subsequent judgment of whether the current three-dimensional point has been traversed.

[0039] S103, perform an expansion process on each initial voxel to obtain the target voxel corresponding to the three-dimensional point.

[0040] Specifically, the expansion process can be performed on each initial voxel according to the feature consistency of the three-dimensional points, so as to obtain the target voxel corresponding to the three-dimensional point.

[0041] S104, determine and store the characterization point data of each target voxel, so as to perform map construction according to the characterization point data of each target voxel.

[0042] It should be understood that, compared with the prior art where map construction needs to be performed on all three-dimensional point cloud data of multiple patches, in the present application, map construction can be performed on a small amount of representative point data of each target patch, thereby reducing the memory occupancy of the three-dimensional point cloud data and helping to improve the map construction efficiency.

[0043] Specifically, each three-dimensional point in the three-dimensional point cloud map is traversed to construct multiple initial patches, including: when traversing each three-dimensional point in the three-dimensional point cloud map, any one three-dimensional point is used as the initial starting point, and an alternative point set is determined according to the initial starting point, where multiple three-dimensional points among the remaining three-dimensional points in the three-dimensional point cloud map are used as alternative points in the alternative point set, and an initial patch corresponding to the initial starting point is constructed according to the initial starting point and the alternative point set.

[0044] For example, in an embodiment of the present invention, during the process of traversing each three-dimensional point in the three-dimensional point cloud map, any one three-dimensional point can be first used as the initial starting point, and then, with this initial starting point as the center, multiple three-dimensional points among the remaining three-dimensional points in the three-dimensional point cloud map that are at a first preset distance threshold from the initial starting point are used as alternative points in the alternative point set. Furthermore, the initial patch corresponding to the initial starting point is constructed according to the initial starting point and the alternative point set by using the least squares method.

[0045] Optionally, the first preset distance threshold can preferably be any value in the range of 1 cm to 5 cm.

[0046] It should be understood that in the embodiment of the present invention, multiple three-dimensional points among the remaining three-dimensional points in the three-dimensional point cloud map are used as alternative points in the alternative point set, as long as it is ensured that the alternative points in the alternative point set can effectively represent a patch, thereby reducing the computational complexity and the amount of operations.

[0047] Furthermore, as Figure 2 shown, the initial patch corresponding to the initial starting point is expanded to obtain the target patch corresponding to the initial starting point, including:

[0048] S1, obtaining multiple three-dimensional points having feature consistency with the initial starting point, and expanding the multiple three-dimensional points having feature consistency with the initial starting point into the initial patch to obtain the first patch.

[0049] It can be understood that the three-dimensional points having feature consistency with the initial starting point refer to the points that are coplanar and of the same color as the initial starting point. Thus, the multiple three-dimensional points having feature consistency with the initial starting point are expanded into the initial patch to obtain the first patch, where the first patch includes the three-dimensional points that are coplanar and of the same color as the initial starting point.

[0050] S2. Take each alternative point in the set of alternative points as a new starting point, and repeat step S1 to obtain a second surface element.

[0051] It can be understood that taking each alternative point in the set of alternative points as a new starting point and repeating step S1 means obtaining three-dimensional points with feature consistency with the new starting point, and expanding the multiple three-dimensional points with feature consistency with the new starting point into the initial surface element to obtain a second surface element, where the second surface element includes three-dimensional points that are coplanar with the new starting point and have the same color as the initial starting point.

[0052] S3. Determine the target surface element of the corresponding three-dimensional points according to the first surface element and the second surface element.

[0053] Specifically, determine the target surface element of the corresponding three-dimensional points according to the first surface element and the second surface element, so as to represent the initial starting point, the set of alternative points, the points coplanar and of the same color as the initial starting point, the new starting point, and the points coplanar and of the same color as the new starting point with the corresponding target surface elements, where the target surface element of the corresponding three-dimensional points includes all the three-dimensional points in the aforementioned first surface element and all the three-dimensional points in the aforementioned second surface element.

[0054] Further, obtaining multiple three-dimensional points with feature consistency with the initial starting point includes: obtaining a set of candidate points that satisfy the preset coplanarity condition with the initial surface element; screening out target points that satisfy the preset same-color condition with the initial starting point from the set of candidate points; and taking the target points as three-dimensional points with feature consistency with the initial starting point.

[0055] The following describes how to obtain three-dimensional points with feature consistency with the initial starting point:

[0056] 1) Obtain candidates that satisfy the preset coplanarity condition with the initial surface element:

[0057] According to the three-dimensional coordinates of each of the aforementioned three-dimensional points, calculate the distance from each three-dimensional point to the first surface element, and determine the three-dimensional points corresponding to the second preset distance threshold as candidates that satisfy the preset coplanarity condition with the initial surface element.

[0058] Optionally, the second preset distance threshold can preferably be any value in the range of 1 - 5 cm.

[0059] 2) Screen out target points that satisfy the preset same-color condition with the initial starting point from the candidates:

[0060] Calculate the color-weighted Euclidean distance ΔC between each candidate point and the initial starting point through the following formula, and the formula is as follows:

[0061]

[0062] ΔR = C 1,R -C2,R

[0063] ΔG = C 1,G -C 2,G

[0064] ΔB = C 1,B -C 2,B

[0065]

[0066] Wherein, is the average value of R pixels of the initial starting point and the candidate point, C 1,R is the R pixel value of the initial starting point, C 2,R is the R pixel value of the candidate point, C 1,G is the G pixel value of the initial starting point, C 2,G is the G pixel value of the candidate point, C 1,B is the B pixel value of the initial starting point, C 2,B is the B pixel value of the candidate point, △R is the difference in R pixels between the initial starting point and the candidate point, △G is the difference in G pixels between the initial starting point and the candidate point, △B is the difference in B pixels between the initial starting point and the candidate point, and △C is the color-weighted Euclidean distance between the candidate point and the initial starting point.

[0067] Then, the candidate points with a color-weighted Euclidean distance less than or equal to the preset color-weighted Euclidean distance threshold are determined as the target points that meet the preset co-color condition with the initial starting point.

[0068] Optionally, the preset color-weighted Euclidean distance threshold can preferably be any value in the range of 0 to 20.

[0069] Furthermore, the preset co-color condition is to screen the target points with the color of the initial starting point as the reference color.

[0070] Specifically, assume the initial starting point A, and the set of alternative points includes alternative points B1 to B10. When each alternative point B1 to B10 in the set of alternative points is used as a new starting point and step S1 is repeatedly executed, the color of the initial starting point A is used as the reference color for the co-color screening of the target points.

[0071] It can be understood that the color of the initial starting point is used as the reference color for the co-color screening, so that three-dimensional points similar to the color of the initial starting point can be screened out, and then these three-dimensional points are determined as the target points.

[0072] Specifically, since the color of each three-dimensional point is saved as RGB pixel values, but the colors are not compared based on the differences of the RGB pixel values separately. Because when the value of a certain pixel channel changes slightly, the change in color may be large, and when the RGB three pixel channels change simultaneously, the change in color may be a change in brightness rather than a change in hue. Therefore, in the embodiments of the present invention, the color of the initial starting point is used as the reference color for screening target points, thereby avoiding the situation that each time a new starting point is used as the reference point for co-color screening, where colors with large numerical differences are closer, while colors with small numerical differences have a greater distinction.

[0073] Further, as Figure 3 shown, determine and store the representative point data of each target surface element, including:

[0074] S201, calculate the center point coordinates and normal vector in the target surface element.

[0075] Specifically, the center point coordinates in the target surface element can be calculated according to the three-dimensional coordinates of each three-dimensional point, where the center point coordinates are the weighted sum of the three-dimensional coordinates of all three-dimensional points in the target surface element divided by the total number of all three-dimensional points, and the normal vector of the center point is obtained by using the equation Ax + By + Cz + D = 0.

[0076] S202, calculate the distances from all three-dimensional points in the target surface element to the center point, and sort each distance to obtain the three-dimensional point with the largest distance from the center point as the first diagonal point of the target surface element.

[0077] Specifically, calculate the distances from all three-dimensional points in the target surface element to the center point according to the three-dimensional coordinates of each three-dimensional point and the center point coordinates, and sort each distance to obtain the three-dimensional point with the largest distance from the center point as the first diagonal point of the target surface element.

[0078] S203, determine the first diagonal of the target surface element according to the first diagonal point and the center point.

[0079] It can be understood that the connection line between the first diagonal point and the center point can be connected, and the line formed by extending the first diagonal point and the center point in the opposite direction by the same distance can be determined as the first diagonal of the target surface element.

[0080] S204, determine the three-dimensional points that meet the preset angle condition from the remaining three-dimensional points in the target surface element as the second diagonal point of the target surface element.

[0081] It should be noted that the preset angle condition is that the included angle formed by the connection line from the second diagonal point to the center point and the connection line from the first diagonal point to the center point is an obtuse angle.

[0082] S205, determine the second diagonal of the target surface element according to the second diagonal point and the center point.

[0083] It can be understood that the connection line from the second diagonal point to the center point, whose included angle with the connection line from the first diagonal point to the center point is an obtuse angle, can be extended in the reverse direction by the same distance from the second diagonal point to the center point, so as to determine this connection line as the second diagonal of the target surface element. Therefore, in the embodiments of the present invention, each three-dimensional point in the remaining three-dimensional points of the target surface element can be connected to the center point. If the included angle formed by the connection line from this three-dimensional point to the center point and the connection line from the first diagonal point to the center point is an obtuse angle, then this three-dimensional point is determined as the three-dimensional point that meets the preset angle condition. Taking this three-dimensional point as the second diagonal point, and determining the second diagonal according to the second diagonal point and the center point, wherein the connection line formed by connecting the second diagonal point and the center point and extending the second diagonal point in the reverse direction by the same distance to the center point is the second diagonal.

[0084] S206, use the four endpoint data of the first diagonal and the second diagonal as the representation point data of the target surface element, and store them.

[0085] It can be understood that the four endpoint data of the first diagonal and the second diagonal are corresponded to the representation point data of the target surface element, and the target surface element constructed with these four endpoint data can cover the initial starting point, the set of alternative points, the points coplanar and of the same color as the initial starting point, the new starting point, and the points coplanar and of the same color as the new starting point.

[0086] For example, as Figure 4 shown, assume that the target surface element includes three-dimensional points A, B, C, D, E and the center point O. According to the three-dimensional coordinates of each three-dimensional point, calculate the distances AO, BO, CO, DO, and EO from each three-dimensional point to the center point respectively, sort each distance. If BO > CO > AO = EO > DO, then the three-dimensional point B can be determined as the first diagonal point of the target surface element. At this time, connect the three-dimensional point B and the center point O, and extend the distance BO in the reverse direction, and determine the formed connection line BB' as the first diagonal of the target surface element.

[0087] Further, as Figure 4 shown, assume that the included angle formed by the connection line from the three-dimensional point C to the center point and the connection line from the first diagonal point to the center point is an obtuse angle, then the three-dimensional point E can be determined as the second diagonal point. At this time, connect the three-dimensional point C and the center point O, and extend the distance in the reverse direction, and determine the formed connection line CC' as the second diagonal of the target surface element.

[0088] It should be understood that, assuming that a set of target surface elements includes 1000 three-dimensional points, since the surface element covering these 1000 three-dimensional points can be constructed by the four endpoint data of the first diagonal and the second diagonal of the target surface element, therefore, in the embodiments of the present invention, only the characterization point data of each target surface element needs to be determined and stored, and multiple target surface elements with variable sizes can be obtained. Thus, map construction is performed based on the multiple target surface elements with variable sizes. Among them, the characterization point data of each target surface element may include the three-dimensional coordinate information corresponding to the point cloud, the normal vector, and the pixel value.

[0089] The following combines the attached Figure 5 With a specific embodiment of the present invention, the method for constructing a variable-size surface element map according to the embodiments of the present invention will be described.

[0090] S10. Obtain a three-dimensional point cloud map and traverse each three-dimensional point in the three-dimensional point cloud map.

[0091] S11. When traversing each three-dimensional point in the three-dimensional point cloud map, take any three-dimensional point as the initial starting point, determine an alternative point set according to the initial starting point, and construct an initial surface element corresponding to the initial starting point according to the initial starting point and the alternative point set.

[0092] Among them, in an embodiment of the present invention, multiple three-dimensional points among the remaining three-dimensional points in the three-dimensional point cloud map are used as the alternative points in the alternative point set.

[0093] S12. Obtain candidate points that satisfy the preset coplanarity condition with the initial surface element, screen out target points that satisfy the preset same-color condition with the initial starting point from the candidate points, and use the target points as three-dimensional points with feature consistency with the initial starting point.

[0094] S13. Expand the multiple three-dimensional points with feature consistency with the initial starting point into the initial surface element to obtain the first surface element.

[0095] S14. Take each alternative point in the alternative point set as a new starting point, and repeat step S12 to obtain the second surface element, where the preset same-color condition is to screen the target points based on the color of the initial starting point as the reference color.

[0096] S15. Determine the target surface element corresponding to the corresponding three-dimensional points according to the first surface element and the second surface element.

[0097] S16. Determine and store the characterization point data of each target surface element.

[0098] S17. Perform map construction according to the characterization point data of each target surface element.

[0099] In summary, according to the variable-size voxel map construction method of the embodiments of the present invention, a three-dimensional point cloud map is obtained, and each three-dimensional point in the three-dimensional point cloud map is traversed to construct a plurality of initial voxels. Furthermore, each initial voxel is expanded to obtain the target voxel corresponding to the three-dimensional point, and the representative point data of each target voxel is determined and stored to construct a map according to the representative point data of each target voxel. Thus, the map is constructed by using the stored representative point data of a plurality of target voxels with variable sizes, thereby reducing the memory occupation of the three-dimensional point cloud data and improving the map construction efficiency.

[0100] Based on the foregoing embodiments of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, on which a variable-size voxel map construction program is stored. When the variable-size voxel map construction program is executed by a processor, it implements the variable-size voxel map construction method of the foregoing embodiments of the present invention.

[0101] It should be noted that the specific implementation manners of the computer-readable storage medium of the embodiments of the present invention when executing the variable-size voxel map construction program correspond one by one to the specific implementation manners of the variable-size voxel map construction method of the foregoing embodiments of the present invention, and will not be elaborated herein.

[0102] In summary, according to the computer-readable storage medium of the embodiments of the present invention, by executing the variable-size voxel map construction program, the map can be constructed by using the stored representative point data of a plurality of target voxels with variable sizes, thereby reducing the memory occupation of the three-dimensional point cloud data and improving the map construction efficiency.

[0103] Based on the foregoing embodiments of the present invention, an embodiment of the present invention further provides a robot, which includes a memory, a processor, and a variable-size voxel map construction program stored on the memory and executable on the processor. When the processor executes the variable-size voxel map construction program, it implements the variable-size voxel map construction method of the foregoing embodiments of the present invention.

[0104] It should be noted that the specific implementation manners of the robot of the embodiments of the present invention when executing the variable-size voxel map construction program correspond one by one to the specific implementation manners of the variable-size voxel map construction method of the foregoing embodiments of the present invention, and will not be elaborated herein.

[0105] Optionally, the robot includes, but is not limited to: a sweeping robot, an unmanned delivery vehicle, a drone, a warehousing robot, a shopping mall service robot, a food delivery robot, and an intelligent driving vehicle, etc.

[0106] In summary, the robot according to the embodiment of the present invention can construct a map by executing a variable-size surface element map construction program, and can construct a map through the stored target surface element representation point data corresponding to multiple variable sizes, thereby reducing the memory occupancy of the three-dimensional point cloud data and improving the map construction efficiency.

[0107] Figure 6 It is a block diagram of a variable-size surface element map construction device according to an embodiment of the present invention.

[0108] As Figure 6 shown, the variable-size surface element map construction device 100 according to the embodiment of the present invention includes: an acquisition module 10, a traversal module 20, an expansion module 30, and a construction module 40.

[0109] Specifically, the acquisition module 10 is used to acquire a three-dimensional point cloud map; the traversal module 20 is used to traverse each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial surface elements; the expansion module 30 is used to perform an expansion process on each initial surface element to obtain a target surface element corresponding to the three-dimensional point; the construction module 40 is used to determine and store the representation point data of each target surface element, so as to construct a map according to the representation point data of each target surface element.

[0110] Further, when traversing each three-dimensional point in the three-dimensional point cloud map, the traversal module 20 is further used to use any one three-dimensional point as an initial starting point; determine an alternative point set according to the initial starting point; wherein, a plurality of three-dimensional points among the remaining three-dimensional points in the three-dimensional point cloud map are used as alternative points in the alternative point set; construct an initial surface element corresponding to the initial starting point according to the initial starting point and the alternative point set.

[0111] Further, the expansion module 30 is further used to acquire a plurality of three-dimensional points having feature consistency with the initial starting point, and expand the plurality of three-dimensional points having feature consistency with the initial starting point into the initial surface element to obtain a first surface element, and then, use each alternative point in the alternative point set as a new starting point, repeat the foregoing steps to obtain a second surface element, and determine the target surface element corresponding to the three-dimensional point according to the first surface element and the second surface element.

[0112] Further, the expansion module 30 is further used to acquire a candidate point set that satisfies a preset coplanar condition with the initial surface element; screen out target points that satisfy a preset co-color condition with the initial starting point from the candidate point set; use the target points as three-dimensional points having feature consistency with the initial starting point.

[0113] Further, the preset co-color condition is to screen out target points with the color of the initial starting point as the reference color.

[0114] Further, the construction module 40 is configured to calculate the central point coordinates and the normal vector in the target surface element; calculate the distances from all three-dimensional points in the target surface element to the central point, and sort each distance to obtain the three-dimensional point with the maximum distance from the central point as the first diagonal point of the target surface element; determine the first diagonal line of the target surface element according to the first diagonal point and the central point; determine the three-dimensional points that meet the preset angle condition from the remaining three-dimensional points of the target surface element as the second diagonal point of the target surface element; determine the second diagonal line of the target surface element according to the second diagonal point and the central point; store the four endpoint data of the first diagonal line and the second diagonal line as the representation point data of the target surface element.

[0115] Further, the preset angle condition is that the included angle formed by the line connecting the second diagonal point to the central point and the line connecting the first diagonal point to the central point is an obtuse angle.

[0116] It should be noted that the specific implementation of the variable-size surface element map construction device 100 in the embodiments of the present invention corresponds one-to-one to the specific implementation of the variable-size surface element map construction method in the foregoing embodiments of the present invention, and will not be elaborated herein.

[0117] In summary, according to the variable-size surface element map construction device of the embodiments of the present invention, the three-dimensional point cloud map is obtained through the acquisition module, and each three-dimensional point in the three-dimensional point cloud map is traversed through the traversal module to construct a plurality of initial surface elements. Further, each initial surface element is extended through the extension module to obtain the target surface element corresponding to the three-dimensional point, and the representation point data of each target surface element is determined and stored through the construction module, so as to construct a map according to the representation point data of each target surface element. Thus, the map is constructed through the stored representation point data of the target surface elements with variable sizes, thereby reducing the memory occupancy of the three-dimensional point cloud data and improving the map construction efficiency.

[0118] Note that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definite sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in combination with an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection part with one or more wirings (electronic device), a portable computer diskette case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.

[0119] It should be understood that various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well-known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0120] In the description of this specification, the description referring to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.

[0121] In the description of the present invention, it should be understood that the orientation or positional relationships indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential", etc. are based on the orientation or positional relationships shown in the drawings. These are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation on the present invention.

[0122] In addition, the terms "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present invention, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically and clearly defined. In the present invention, unless otherwise clearly specified and defined, terms such as "mounted", "connected", "connected to", "fixed" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal connection or the interaction relationship between two elements, unless otherwise clearly defined. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances. In the present invention, unless otherwise clearly specified and defined, the first feature being "above" or "below" the second feature may be that the first and second features are in direct contact, or the first and second features are indirectly in contact through an intermediate medium. Moreover, the first feature being "above", "over" and "on" the second feature may mean that the first feature is directly above or obliquely above the second feature, or merely indicates that the first feature has a higher horizontal height than the second feature. The first feature being "below", "beneath" and "under" the second feature may be that the first feature is directly below or obliquely below the second feature, or merely indicates that the first feature has a lower horizontal height than the second feature. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for constructing a variable-size cell map, characterized in that The method includes the following steps: Obtain a three-dimensional point cloud map; Traverse each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial patches; Perform an expansion process on each of the initial patches to obtain the target patch corresponding to the three-dimensional point; Determine and store the representative point data of each of the target patches for map construction based on the representative point data of each of the target patches; Determine and store the representative point data of each of the target patches, including: Calculate the center point coordinates and normal vector in the target patch; Calculate the distances from all three-dimensional points in the target patch to the center point, sort each of the distances, and obtain the three-dimensional point with the maximum distance from the center point as the first diagonal point of the target patch; Determine the first diagonal line of the target patch based on the first diagonal point and the center point; Determine the three-dimensional points that meet the preset angle condition from the remaining three-dimensional points of the target patch as the second diagonal point of the target patch; Determine the second diagonal line of the target patch based on the second diagonal point and the center point; Use the four endpoint data of the first diagonal line and the second diagonal line as the representative point data of the target patch and store them.

2. The variable-size surface element map construction method according to claim 1, characterized in that The traversing each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial patches includes: When traversing each three-dimensional point in the three-dimensional point cloud map, use any one three-dimensional point as the initial starting point; Determine a set of candidate points based on the initial starting point; wherein, use a plurality of three-dimensional points among the remaining three-dimensional points in the three-dimensional point cloud map as the candidate points in the set of candidate points; Construct the initial patch corresponding to the initial starting point based on the initial starting point and the set of candidate points.

3. The variable-size surface element map construction method according to claim 2, wherein Performing an expansion process on the initial patch corresponding to the initial starting point to obtain the target patch corresponding to the initial starting point includes: S1. Obtain a plurality of three-dimensional points with feature consistency with the initial starting point, and expand the plurality of three-dimensional points with feature consistency with the initial starting point into the initial patch to obtain a first patch; S2. Use each candidate point in the set of candidate points as a new starting point, and repeat step S1 to obtain a second patch; S3. Determine the target patch corresponding to the three-dimensional point based on the first patch and the second patch.

4. The variable-size surface element map construction method according to claim 3, wherein The obtaining a plurality of three-dimensional points with feature consistency with the initial starting point includes: Obtain a set of candidate points that meet the preset coplanarity condition with the initial patch; Filter out the target points that meet the preset co-color condition with the initial starting point from the set of candidate points; Use the target points as the three-dimensional points with feature consistency with the initial starting point.

5. The variable-size surface element map construction method according to claim 4, characterized in that The preset co-color condition is to screen the target points with the color of the initial starting point as the reference color.

6. The method for constructing a variable-size surface element map according to claim 1, characterized in that The preset angle condition is that the included angle formed by the line connecting the second diagonal point to the center point and the line connecting the first diagonal point to the center point is an obtuse angle.

7. A computer-readable storage medium, characterized in that, It stores a variable-size patch map construction program, and when the variable-size patch map construction program is executed by a processor, it implements the variable-size patch map construction method according to any one of claims 1-6.

8. A robot, characterized in that, It includes a memory, a processor, and a variable-size voxel map construction program stored in the memory and executable on the processor. When the processor executes the variable-size voxel map construction program, it implements the variable-size voxel map construction method according to any one of claims 1-6.

9. A variable-size surface element map construction device, characterized in that It includes: An acquisition module for acquiring a three-dimensional point cloud map; A traversal module for traversing each three-dimensional point in the three-dimensional point cloud map to construct a plurality of initial voxels; An expansion module for performing expansion processing on each of the initial voxels to obtain a target voxel corresponding to the three-dimensional point; A construction module for determining and storing the representative point data of each of the target voxels so as to perform map construction based on the representative point data of each of the target voxels; Specifically, the construction module is configured to: calculate the center point coordinates and normal vector in the target voxel; Calculate the distances from all three-dimensional points in the target voxel to the center point, and sort each of the distances to obtain the three-dimensional point with the largest distance from the center point as the first diagonal point of the target voxel; Determine the first diagonal line of the target voxel according to the first diagonal point and the center point; Determine the three-dimensional points that meet the preset angle condition from the remaining three-dimensional points of the target voxel as the second diagonal point of the target voxel; Determine the second diagonal line of the target voxel according to the second diagonal point and the center point; Use the four endpoint data of the first diagonal line and the second diagonal line as the representative point data of the target voxel and store it.