Laser mapping method, device and computer-readable storage medium
By using the integration and optimization of the first map and the second map in robot control technology, the problem of high hardware performance requirements for detailed map establishment is solved, low-cost and efficient laser mapping is achieved, and hardware resource consumption is reduced.
Patent Information
- Application Number
- CN202010585733.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-24
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-06-24
AI Technical Summary
In existing robot control technology, detailed map building requires high hardware performance and high cost, and the map building efficiency is low, especially when building a large-scale map, it is difficult to meet the hardware performance requirements.
By determining the initial position in the first map, a second map is established, and by selecting nodes to form relationship nodes, splicing laser point clouds to obtain the pose change matrix, and fusing the two maps to optimize the map construction process.
A low-cost laser mapping solution is realized, which reduces the requirements of hardware processing performance, improves mapping efficiency, and avoids the large consumption of processing resources.
Smart Images

Figure CN113838162B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a laser mapping method, device and computer-readable storage medium. Background Art
[0002] In the existing field of robot control technology, SLAM (simultaneous localization and mapping) is often used. This technology is also called CML (Concurrent Mapping and Localization), which can also be called real-time positioning and mapping, or concurrent mapping and positioning. This technology allows mobile robots to collect information about the operating environment through various sensors, so as to autonomously build a map of the site, and further, calculate their own posture information based on the map, so as to complete the required safe movement function.
[0003] It is understandable that a map is a robot's understanding of the environment. Through the map, the robot will know its own location and generate the most suitable path to reach the desired target location faster and more accurately. It can be seen that a very detailed map needs to be established in order for the robot to move freely and accurately and efficiently.
[0004] However, the more detailed the map to be built is, and the larger the scope of the map to be built is, the higher the hardware performance requirements of the map-building robot are. As we all know, under the technical background of a certain period, the performance of a single hardware cannot fully meet the current task requirements. Therefore, in the existing technology, when faced with building a map of a larger scope, it is usually necessary to pay a higher hardware cost. At the same time, due to the limitation of hardware performance, the efficiency of the map-building operation is also low. Summary of the invention
[0005] In order to solve the above technical defects in the prior art, the present invention proposes a laser mapping method, which includes:
[0006] Determining a first initial position in a first map, and establishing a second map based on the first initial position;
[0007] Selecting a plurality of first nodes in the first map, and selecting a plurality of second nodes corresponding to the first nodes in the second map, wherein each of the first nodes and the second node corresponding to the first node form a relationship node;
[0008] Splicing two laser point clouds corresponding to two nodes in each pair of the relationship nodes to obtain a posture change matrix between each pair of the relationship nodes;
[0009] The first map and the second map are fused according to the pose transformation matrix.
[0010] Optionally, before determining the first initial position in the first map and establishing the second map with the first initial position, the method further includes:
[0011] The map created from the first moment to the second moment is used as the first map, or the stored map is read at the second moment as the first map.
[0012] Optionally, determining the first initial position in the first map and establishing the second map based on the first initial position includes:
[0013] The map created from the second moment to the third moment is referred to as the second map.
[0014] Optionally, the selecting of a plurality of first nodes in the first map and the selecting of a plurality of second nodes corresponding to the first nodes in the second map, wherein each of the first nodes and the second node corresponding to the first node form a relationship node, comprises:
[0015] In the first map, selecting the first nodes one by one;
[0016] In the second map, obtaining a distance value between each node and the first node;
[0017] The node with the smallest distance value is used as the second node corresponding to the first node.
[0018] Optionally, the selecting of a plurality of first nodes in the first map and the selecting of a plurality of second nodes corresponding to the first nodes in the second map, wherein each of the first nodes and the second node corresponding to the first node form a relationship node, further comprises:
[0019] Preset the distance threshold between two nodes as a pairwise relationship;
[0020] If the distance value between the first node and the second node corresponding to it is less than the distance threshold, the first node and the second node corresponding to it are combined into the relationship node.
[0021] Optionally, the step of splicing two laser point clouds corresponding to two nodes in each pair of the relationship nodes to obtain a posture change matrix between each pair of the relationship nodes includes:
[0022] Acquire a first laser point cloud corresponding to the first node, and at the same time, acquire a second laser point cloud corresponding to the second node;
[0023] The first laser point cloud and the second laser point cloud are spliced to obtain a posture conversion matrix between the first node and the second node.
[0024] Optionally, fusing the first map and the second map according to the posture conversion matrix includes:
[0025] A covariance matrix between each pair of the relationship nodes is obtained according to the posture transformation matrix between each pair of the relationship nodes, and the first map and the second map are fused and optimized according to the covariance matrix to obtain a new first map composed of the first map and the second map.
[0026] Optionally, the method further comprises:
[0027] The fusion and optimization of the first map and the second map are executed in a loop until the mapping operation is completed.
[0028] Optionally, the present invention also proposes a laser mapping device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the laser mapping method described above when executed by the processor.
[0029] Optionally, the present invention further proposes a computer-readable storage medium, on which a laser mapping program is stored, and when the laser mapping program is executed by a processor, the steps of the laser mapping method described above are implemented.
[0030] The laser mapping method, device and computer-readable storage medium of the present invention are implemented by determining a first initial position in a first map and establishing a second map with the first initial position; selecting multiple first nodes in the first map and selecting multiple second nodes corresponding to the first nodes in the second map, and forming a relationship node by each first node and its corresponding second node; splicing two laser point clouds corresponding to each of the two nodes in each pair of the relationship nodes to obtain a posture change matrix between each pair of the relationship nodes; and fusing the first map and the second map according to the posture conversion matrix. A low-cost laser mapping solution is realized, which avoids the large consumption of processing resources, reduces the requirements for hardware processing performance, and improves mapping efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0032] Figure 1 This is a first flow chart of the laser mapping method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0034] In the subsequent description, the suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings. Therefore, "module", "component" or "unit" can be used in a mixed manner.
[0035] Embodiment 1
[0036] Figure 1 is a first flow chart of the laser mapping method provided by an embodiment of the present invention. This embodiment proposes a laser mapping method, which includes:
[0037] S1. Determine a first initial position in a first map, and establish a second map based on the first initial position;
[0038] S2. Select multiple first nodes in the first map, and select multiple second nodes corresponding to the first nodes in the second map, so that each of the first nodes and its corresponding second node form a relationship node;
[0039] S3, splicing two laser point clouds corresponding to the two nodes in each pair of the relationship nodes, to obtain a posture change matrix between each pair of the relationship nodes;
[0040] S4. Fusing the first map and the second map according to the posture transformation matrix.
[0041] In this embodiment, first, an initial block map is determined as the first map of this embodiment, and then an initial position is selected in the first map as the first initial position of this embodiment, wherein the first initial position may be the last position when the block map is newly created, or a position obtained by repositioning on this block map. In this embodiment, after determining the first initial position in the first map, the second map is established with the first initial position as the starting point. Similarly, the second map can be regarded as another block map after the first map is built.
[0042] In this embodiment, after the establishment of the above-mentioned first map and second map is completed one by one, multiple first nodes are selected in a traversal manner in the node index of the first map. At the same time, multiple second nodes corresponding to the first nodes are selected in a traversal manner in the node index of the second map. The first nodes and the second nodes have a certain association relationship. Therefore, each first node and its corresponding second node form a pair of relationship nodes.
[0043] In this embodiment, after all pairs of relationship nodes between the first map and the second map are extracted, the two laser point clouds corresponding to the two nodes in each pair of the relationship nodes are spliced to obtain the pose change matrix between each pair of the relationship nodes. It should be noted that in the first map and the second map obtained by laser mapping, each first node or second node corresponds to a laser point cloud, which is a collection of points returned by a laser sensor scanning the environment. Each pair of relationship nodes obtained in this embodiment includes two nodes, each of which corresponds to a laser point cloud. By performing iterative closest point (ICP) splicing on the two laser point clouds, the pose transformation matrix between the above relationship nodes can be obtained.
[0044] In this embodiment, after obtaining the posture transformation matrix of each pair of relationship nodes, the first map and the second map are fused according to the posture transformation matrix. Further, the fused map is optimized to obtain a complete map consisting of the first map and the second map.
[0045] The beneficial effect of this embodiment is that by determining the first initial position in the first map and establishing the second map with the first initial position; selecting multiple first nodes in the first map, and selecting multiple second nodes corresponding to the first nodes in the second map, each of the first nodes and its corresponding second node form a relationship node; splicing two laser point clouds corresponding to the two nodes in each pair of the relationship nodes, respectively, to obtain the posture change matrix between each pair of the relationship nodes; and fusing the first map and the second map according to the posture conversion matrix. A low-cost laser mapping solution is realized, which avoids the large consumption of processing resources, reduces the requirements for hardware processing performance, and improves mapping efficiency.
[0046] Embodiment 2
[0047] Based on the above embodiment, in order to further determine each map block, in this embodiment, the first map and the second map are determined continuously or sequentially. Specifically:
[0048] The map created from the first moment to the second moment is used as the first map, or the stored map is read at the second moment as the first map.
[0049] Optionally, in a map creation task, if the creation of the first map has not been completed, the map created from the first moment to the second moment is used as the first map;
[0050] Optionally, in a map creation task, if the creation of the first map has been completed, the stored map is read at the second moment as the first map.
[0051] The beneficial effect of this embodiment is that by using the map created from the first moment to the second moment as the first map, or reading the stored map at the second moment as the first map, the method of determining each map block is made more flexible, so that when the robot is mapping in blocks, it can adjust the required fusion of each map block in time in combination with the current mapping environment and mapping progress.
[0052] Embodiment 3
[0053] Based on the above embodiment, in order to further determine each map block, in this embodiment, the first map and the second map are determined continuously or sequentially. Specifically:
[0054] The map created from the second moment to the third moment is referred to as the second map.
[0055] It should be noted that the map building process is continuous. In a map building task, after the first map is built, the subsequently built block map is used as the second map.
[0056] Optionally, in a map creation task, if the creation of the second map has not been completed, one or more maps created from the second moment to the third moment are used as the second map;
[0057] Optionally, in a map creation task, if the creation of the second map has been completed, one or more map blocks that are stored and different from the first map are read at the third moment as the second map;
[0058] Optionally, the block creation scheme of the first map and the second map is determined according to a mapping strategy such as a moving distance, a duration, a position, a location, a mapping instruction, etc. during the mapping process.
[0059] The beneficial effect of this embodiment is that by using the map created from the second moment to the third moment as the second map, the method of determining each map block is made more flexible, so that when the robot is mapping in blocks, it can adjust the required fusion of each map block in time in combination with the current mapping environment and mapping progress.
[0060] Embodiment 4
[0061] Based on the above embodiment, in order to further determine the fusion method of the first map and the second map, in this embodiment, the associated points of the first map and the second map are extracted, specifically including:
[0062] First, in the first map, the first nodes are selected one by one;
[0063] Then, in the second map, obtaining the distance value between each node and the first node;
[0064] Finally, the node with the smallest distance value is used as the second node corresponding to the first node.
[0065] Among them, each node is stored in the first map and the second map in the form of an array or a linked list. Therefore, first, in the first map, each node is selected one by one as the first node in a traversal manner. Then, every time a node is selected as the first node in the first map, in the second map, the distance value between each node in the second map and the above-mentioned first node is obtained in a traversal manner; finally, the size relationship between the distance value of each node in the second map and the above-mentioned first node is determined, and the node with the smallest distance value to the above-mentioned first node is used as the second node to be extracted, and this node is used as the second node corresponding to the first node.
[0066] Optionally, the first nodes are selected one by one, and the second nodes corresponding to the first nodes are selected one by one;
[0067] Optionally, the distance values between all the first nodes and all the nodes in the second map are calculated, and the node with the smallest distance value corresponding to each first node is extracted as the corresponding second node.
[0068] The beneficial effect of this embodiment is that, by selecting the first nodes one by one in the first map, then obtaining the distance value between each node and the first node in the second map, and finally taking the node with the smallest distance value as the second node corresponding to the first node, a correlation basis is provided for the subsequent fusion of the first map and the second map.
[0069] Embodiment 5
[0070] Based on the above embodiment, in order to further determine the association relationship between the association points of the first map and the second map, in this embodiment:
[0071] First, the distance threshold between two nodes in a pairwise relationship is preset;
[0072] Then, the relationship between the distance value between the first node and the second node corresponding to it and the above-mentioned distance threshold is determined. If the distance value between the first node and the second node corresponding to it is less than the distance threshold, the first node and the second node corresponding to it are combined into the relationship node.
[0073] Optionally, the distance threshold is determined based on an experimental value or an empirical value;
[0074] Optionally, if the distance value between a first node and a plurality of second nodes is less than the distance threshold, the second nodes less than the distance threshold will first be determined to form a relationship node with the first node;
[0075] Optionally, if the distance value between a first node and multiple second nodes is less than the distance threshold, the second node with the smallest distance value and the first node form a relationship node.
[0076] The beneficial effect of this embodiment is that by presetting the distance threshold for the pair relationship between two nodes, the relationship between the distance value between the first node and the second node corresponding to it and the above distance threshold is determined, and if the distance value between the first node and the second node corresponding to it is less than the distance threshold, the first node and the second node corresponding to it are combined into the relationship node, thereby providing a clearer and more accurate relationship node for the subsequent fusion of the first map and the second map.
[0077] Embodiment 6
[0078] Based on the above embodiment, after each pair of relationship nodes is determined, two laser point clouds corresponding to two nodes in each pair of the relationship nodes are spliced to obtain a posture change matrix between each pair of the relationship nodes, specifically including:
[0079] First, a first laser point cloud corresponding to the first node is obtained, and at the same time, a second laser point cloud corresponding to the second node is obtained;
[0080] Then, the first laser point cloud and the second laser point cloud are spliced to obtain a posture conversion matrix between the first node and the second node.
[0081] Optionally, all the relationship nodes are first determined, and then two laser point clouds corresponding to the two nodes in each pair of the relationship nodes are spliced.
[0082] The beneficial effect of this embodiment is that by obtaining the first laser point cloud corresponding to the first node and the second laser point cloud corresponding to the second node at the same time, and then splicing the first laser point cloud and the second laser point cloud to obtain the pose conversion matrix between the first node and the second node, the first map and the second map are associated and spliced, thereby avoiding excessive consumption of processing resources and hardware resources by establishing a large map at a single time.
[0083] Embodiment 7
[0084] Based on the above embodiment, after the first map and the second map are fused according to the posture conversion matrix, the fused map is optimized, specifically:
[0085] A covariance matrix between each pair of the relationship nodes is obtained according to the posture transformation matrix between each pair of the relationship nodes, and the first map and the second map are fused and optimized according to the covariance matrix to obtain a new first map composed of the first map and the second map.
[0086] Optionally, the fused map is optimized using bundle adjustment;
[0087] Optionally, if in a mapping task, the second map is the last map block within the area, then a final map of the mapping task is generated;
[0088] Optionally, if in a mapping task, the second map is not the last map block within the area, the map composed of the first map and the second map is used as a new first map, so as to continue to execute subsequent block map building and fusion steps.
[0089] The beneficial effect of this embodiment is that the covariance matrix between each pair of the relationship nodes is obtained through the pose conversion matrix between each pair of the relationship nodes, and the first map and the second map are fused and optimized according to the covariance matrix to obtain a new first map composed of the first map and the second map. Thus, the association and splicing of each block map in the mapping task is realized, thereby avoiding excessive consumption of processing resources and hardware resources for a single large map.
[0090] Embodiment 8
[0091] Based on the above embodiment, a mapping robot cyclically performs the fusion and optimization of the first map and the second map in a mapping task until the mapping operation is completed;
[0092] Optionally, in the same mapping task, multiple mapping robots cyclically perform the fusion and optimization of the first map and the second map corresponding to each other until the mapping task is completed;
[0093] Optionally, in a mapping task, for the area where mapping has been completed, a map block is selected and read as the first map, then the initial position is obtained after relocation, and a new second map is established on this basis. Finally, the second map is merged with the first map to achieve the removal or change operation of the completed map area.
[0094] The beneficial effect of this embodiment is that by cyclically executing the fusion and optimization of the first map and the second map until the mapping operation is completed, the association and splicing of the various block maps in the mapping task are gradually realized, and the flexibility of map creation or map modification is higher, avoiding excessive consumption of processing resources and hardware resources for a single large-scale map creation or map modification of a specific area, and improving the operational efficiency and accuracy of map creation or map modification.
[0095] Embodiment 9
[0096] Based on the above embodiments, the present invention also proposes a laser mapping device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the laser mapping method described above when executed by the processor.
[0097] It should be noted that the above-mentioned device embodiment and method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the device embodiment, which will not be repeated here.
[0098] Embodiment 10
[0099] Based on the above embodiments, the present invention further proposes a computer-readable storage medium, on which a laser mapping program is stored. When the laser mapping program is executed by a processor, the steps of the laser mapping method described above are implemented.
[0100] It should be noted that the above-mentioned medium embodiment and method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the medium embodiment, which will not be repeated here.
[0101] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0102] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0104] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A laser mapping method, characterized in that: The method comprises: Determining a first initial position in a first map, and establishing a second map based on the first initial position; Selecting a plurality of first nodes in the first map, and selecting a plurality of second nodes corresponding to the first nodes in the second map, wherein each of the first nodes and the second node corresponding to the first node form a relationship node; Splicing two laser point clouds corresponding to two nodes in each pair of the relationship nodes to obtain a posture change matrix between each pair of the relationship nodes; fusing the first map and the second map according to the posture transformation matrix; The selecting of a plurality of first nodes in the first map and the selecting of a plurality of second nodes corresponding to the first nodes in the second map, wherein each of the first nodes and the second node corresponding to the first node form a relationship node, comprises: In the first map, selecting the first nodes one by one; In the second map, obtaining a distance value between each node and the first node; Using the node with the smallest distance value as the second node corresponding to the first node; Preset the distance threshold between two nodes as a pairwise relationship; If the distance value between the first node and the second node corresponding to it is less than the distance threshold, the first node and the second node corresponding to it are combined into the relationship node.
2. The laser mapping method according to claim 1, characterized in that: Before determining the first initial position in the first map and establishing the second map with the first initial position, the method further includes: The map created from the first moment to the second moment is used as the first map, or the stored map is read at the second moment as the first map.
3. The laser mapping method according to claim 2, characterized in that: The step of determining a first initial position in the first map and establishing a second map based on the first initial position includes: The map created from the second moment to the third moment is referred to as the second map.
4. The laser mapping method according to claim 1, characterized in that: The step of splicing two laser point clouds corresponding to two nodes in each pair of the relationship nodes to obtain a posture change matrix between each pair of the relationship nodes includes: Acquire a first laser point cloud corresponding to the first node, and at the same time, acquire a second laser point cloud corresponding to the second node; The first laser point cloud and the second laser point cloud are spliced to obtain a posture conversion matrix between the first node and the second node.
5. The laser mapping method according to claim 4, characterized in that: The fusing the first map and the second map according to the posture conversion matrix includes: A covariance matrix between each pair of the relationship nodes is obtained according to the posture transformation matrix between each pair of the relationship nodes, and the first map and the second map are fused and optimized according to the covariance matrix to obtain a new first map composed of the first map and the second map.
6. The laser mapping method according to claim 5, characterized in that: The method further comprises: The fusion and optimization of the first map and the second map are executed in a loop until the mapping operation is completed.
7. A laser mapping device, characterized in that: The device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the laser mapping method according to any one of claims 1 to 6 when executed by the processor.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a laser mapping program, and when the laser mapping program is executed by a processor, the steps of the laser mapping method according to any one of claims 1 to 6 are implemented.
