A grid map fusion deviation compensation method and system based on template matching
The template matching method is used to calculate and compensate for the position deviation of the local map in the global map, which solves the global map error problem caused by the sensor pose estimation deviation and ensures the accuracy and authenticity of the map.
Patent Information
- Application Number
- CN202310132066.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-06
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-02-06
AI Technical Summary
The deviation of the sensor's pose estimation leads to global map error during the fusion process of multiple frames of local maps, resulting in map misalignment and object tearing.
Through the template matching method, the position deviation of the local map in the global map is calculated, and the horizontal position and elevation are synchronously compensated to reduce the error in the global map fusion process.
Effectively eliminate map layer dislocation and object tearing, ensuring the map's restoration and accuracy to the real world.
Smart Images

Figure CN116242346B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot autonomous positioning and navigation, and in particular to a map construction method and system. Background Art
[0002] Robots rely primarily on maps to describe, understand, and interact with their environments. Robots use maps to describe their current surroundings, employing different map description formats depending on the algorithms and sensors used. Commonly used maps in robotics include, but are not limited to, topological maps, landmark maps, raster maps, point cloud maps, and cognitive maps. A topological map is a metric-free map that uses keyframes as nodes and shared data between keyframes as edges. Raster maps, landmark maps, and point cloud maps are all metric maps. Among them, a landmark map is a sparse map, describing the environment using a series of discrete 3D landmarks; the map contains only a limited number of landmarks. Raster maps and point cloud maps are dense maps, describing the real world in detail using dense cubes and 3D points, respectively. Cognitive maps are a recently developed map description method that incorporates semantic information about objects in addition to geometric information, giving them a more abstract meaning. They are the foundation for high-level interaction between robots and their environments.
[0003] The current common approach to map construction is to estimate the robot's current position and pose, as well as a local map, and then fuse the local map into the global map according to certain rules. Therefore, the fidelity and accuracy of the global map depend heavily on the accuracy of the position and pose. Common methods for robot pose estimation can be divided into two categories: one based on external measurements (combined navigation systems using GNSS and inertial measurement units), and the other based on the robot's own sensors (laser positioning or visual positioning). Both approaches have their advantages and disadvantages, but pose estimation errors are inevitable. These errors can ultimately lead to map dislocations and object tearing during the global map fusion process, seriously impacting subsequent robot tasks such as path planning and environmental interaction. Summary of the Invention
[0004] The present invention aims to overcome the above-mentioned deficiencies in the prior art and provides a method and system for compensating for grid map fusion deviation based on template matching.
[0005] The technical problem to be solved by the present invention is that the global map error caused by the deviation of the sensor's pose estimation during the fusion process of multiple frames of local maps.
[0006] In order to solve the above technical problems, the present invention adopts a technical solution of a grid map fusion deviation compensation method based on template matching:
[0007] The template map selected from the local map is matched with the global map, and the position of the local map in the global map is calculated. The horizontal position deviation is compared with the local map position output by the system. At the same time, the average value of the elevation difference between the template map and the successfully matched area is calculated as the elevation deviation compensation of the local map, realizing the synchronous compensation of the horizontal position and elevation of the local map, and reducing the error in the global map fusion process. The specific steps are as follows:
[0008] Step 1: Use the laser radar on the robot platform to build a local map;
[0009] Step 2: Iterate each grid of the local map and determine whether each grid of the local map is in the global map according to the position of the grid, thereby obtaining a map of the overlapping area of the local map and the global map;
[0010] Step 3: Traverse each grid in the overlapping area, using the traversed grid as the top left corner to obtain a square map area, ensuring that each grid in this square area must be within the overlapping area map and the side length is as large as possible. After the traversal is completed, retain the square map area with the largest side length and use it as the template map. Record the horizontal position of the top left corner of this area as the position of the template map.
[0011] Step 4: Use the global map as the object to be matched. Traverse each grid in the global map, using the traversed grid as the upper left corner of the square. Select a map area of the same size as the template map, and calculate the correlation coefficient between this area and the template map as the similarity score between the two. After the traversal is completed, obtain the similarity scores corresponding to all grids in the global map, and set a threshold for the similarity score. If there is a grid with a score higher than the threshold, the match is considered successful. Among the grids with the highest score higher than the threshold, select the grid with the highest score as the successful match result, and record the horizontal position of the grid under the global map as the matching position. If all scores are lower than the threshold, the match is considered unsuccessful.
[0012] Step 5: Determine whether the match is successful. If the match fails, no fusion error correction is performed. If the match is successful, calculate the deviation of the template map position in step 3 relative to the matching position in step 4, and compensate for this position deviation for all cells in the local map in step 1. Simultaneously, calculate the average elevation deviation between the map area corresponding to the template map in step 3 and the cells that successfully matched in step 4, and compensate for this elevation deviation for all cells in the local map. After deviation compensation is completed, the local map is fused into the global map, and the next loop begins.
[0013] Preferably, the local map type described in step 1 is a grid elevation map, and all maps involved in subsequent steps are grid elevation maps.
[0014] Preferably, the template map in step 3 is selected from the map overlapping area in step 2. The template map is selected by traversing and selecting the largest square area in the overlapping area as the template map.
[0015] Preferably, the template matching in step 4 is to erroneously calculate the correlation coefficient between the template and the corresponding area in the global map as a similarity score, and select the grid corresponding to the maximum similarity score greater than a set threshold as the result of successful matching.
[0016] Preferably, the deviation compensation method described in step five compensates both the horizontal position and the elevation of the local map on the premise that the matching is successful.
[0017] The present invention also includes a grid map fusion deviation compensation system based on template matching, comprising:
[0018] The local map construction module uses the laser radar on the robot platform to build a local map;
[0019] The overlapping area map acquisition module is used to iterate each grid of the local map and determine whether each grid of the local map is in the global map according to the position of the grid, thereby obtaining the overlapping area map of the local map and the global map;
[0020] The template map module is used to traverse each grid in the overlapping area, and obtain a square map area with the traversed grid as the upper left corner, so that each grid in the square area must be within the overlapping area map and the side length is as large as possible; after the traversal is completed, the square map area with the largest side length is retained and used as the template map, and the horizontal position of the upper left corner grid of the area is recorded as the position of the template map;
[0021] The global map grid matching module is used to take the global map as the matching object, traverse each grid in the global map, use the traversed grid as the upper left corner of the square, select a map area of the same size as the template map, and calculate the correlation coefficient between the area and the template map as the similarity score between the two; after the traversal is completed, the similarity scores corresponding to all grids in the global map are obtained, and a threshold for the similarity score is set; if there is a grid corresponding to a score higher than the threshold, the match is considered successful, and the grid with the highest score above the threshold is selected as the successful match result, and the horizontal position of the grid under the global map is recorded as the matching position; if all scores are lower than the threshold, the match is considered unsuccessful;
[0022] The fusion module is used to determine whether the match is successful. If the match fails, no fusion error correction is performed. If the match is successful, the deviation of the position of the template map in step 3 relative to the matching position in step 4 is calculated, and the position deviation is compensated for all grids in the local map in step 1. At the same time, the average value of the elevation deviation between the map area corresponding to the template map in step 3 and the grid that successfully matched in step 4 is calculated, and the elevation deviation is compensated for all grids in the local map. After the deviation compensation is completed, the local map is fused into the global map, and then the next cycle is entered.
[0023] The present invention also includes a grid map fusion deviation compensation device based on template matching, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a grid map fusion deviation compensation method based on template matching of the present invention.
[0024] The present invention also includes a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the present invention implements a grid map fusion deviation compensation method based on template matching.
[0025] The present invention also includes a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, a grid map fusion deviation compensation method based on template matching of the present invention is implemented.
[0026] The beneficial technical effect of the present invention is that the fusion of multiple consecutive local maps typically requires the position and attitude of the sensor at the corresponding moment. Whether the position and attitude are estimated through GNSS measurement or sensor data, errors will exist, which can lead to problems such as map dislocation and object tearing in the global map, seriously affecting the subsequent use of the map. The present invention uses a template matching method based on cross-correlation coefficients to estimate the horizontal position and elevation deviation of the local map relative to the global map. After compensating for the deviation of the local map, the map is fused, which can effectively eliminate the phenomenon of map dislocation and object tearing, ensuring the map's fidelity and accuracy to the real world. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0028] Figure 1 The overall flow chart of the method of the present invention;
[0029] Figure 2 It is a relationship diagram of the local map, the global map and the overlapping area map of the present invention;
[0030] Figure 3 It is a schematic diagram of template map selection of the present invention;
[0031] Figure 4 is a flow chart of deviation correction based on template matching results of the present invention;
[0032] Figure 5 It is a system structure diagram of the present invention. DETAILED DESCRIPTION
[0033] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0034] Figure 1 The figure is a flow chart of the block map construction algorithm in the present invention. The present invention is a grid map fusion deviation compensation method based on template matching, which includes the following steps:
[0035] Step 1: Use the laser radar on the robot platform to build a local map;
[0036] Step 2: Iterate each grid of the local map and determine whether each grid of the local map is in the global map according to the position of the grid, thereby obtaining a map of the overlapping area of the local map and the global map;
[0037] Step 3: Traverse each grid in the overlapping area, using the traversed grid as the top left corner to obtain a square map area, ensuring that each grid in this square area must be within the overlapping area map and the side length is as large as possible. After the traversal is completed, retain the square map area with the largest side length and use it as the template map. Record the horizontal position of the top left corner of this area as the position of the template map.
[0038] Step 4: Use the global map as the object to be matched. Traverse each grid in the global map, using the traversed grid as the upper left corner of the square. Select a map area of the same size as the template map, and calculate the correlation coefficient between this area and the template map as the similarity score between the two. After the traversal is completed, obtain the similarity scores corresponding to all grids in the global map, and set a threshold for the similarity score. If there is a grid with a score higher than the threshold, the match is considered successful. Among the grids with the highest score higher than the threshold, select the grid with the highest score as the successful match result, and record the horizontal position of the grid under the global map as the matching position. If all scores are lower than the threshold, the match is considered unsuccessful.
[0039] Step 5: Determine whether the match is successful. If the match fails, no fusion error correction is performed. If the match is successful, calculate the deviation of the template map position in step 3 relative to the matching position in step 4, and compensate for this position deviation for all cells in the local map in step 1. Simultaneously, calculate the average elevation deviation between the map area corresponding to the template map in step 3 and the cells that successfully matched in step 4, and compensate for this elevation deviation for all cells in the local map. After deviation compensation is completed, the local map is fused into the global map, and the next loop begins.
[0040] In step 2, the relationship between the local map, the global map, and the overlapping area map is as follows: Figure 2 As shown, the specific implementation process of selecting the overlapping area is through traversing each grid of the local map, that is, if the traversed grid has a value and is within the range of the global map, it belongs to the overlapping area.
[0041] In step 3, the template map is selected as follows: Figure 3 The gray area in the figure is shown. The template map must be selected to maximize its size while ensuring that it is completely within the overlapping area. This method uses a traversal scheme to select the template. Given an initial template map size n = 3, a 3×3 area is determined with the traversed grid as the upper left corner of the template. The four corner points, the center point, and the midpoint of each edge are determined to be within the overlapping area. If they are all within the area, n = n + 1 and the above steps are repeated. If one or more points are not within the area, the traversal is stopped and the maximum template map is output.
[0042] In step 4, the template matching steps are as follows Figure 4 As shown in the figure, the template map is used to traverse the global map, and the correlation coefficient between the corresponding areas of the template map and the global map is calculated as the similarity, and finally a similarity score matrix is output.
[0043] In step 5, the deviation correction steps are the same as Figure 4When the matching result is obtained, the horizontal deviation and elevation deviation between the template map and the map of the area with the maximum similarity are calculated, the deviation is corrected for the original local map, and finally the corrected result is integrated into the global map.
[0044] Compared with existing technologies, this invention has the following advantages: 1. A template is selected within the overlapping area of the local map and the global map, and the largest possible template is selected, so that the template map contains as many texture features as possible, maximizing matching accuracy. 2. Compared with matching based on point features, the correlation coefficient between the two areas is calculated as the similarity score, which can effectively reduce mismatches. 3. The horizontal coordinates and elevation of the local map are corrected to minimize global map deviations caused by small pose errors.
[0045] The present invention also includes a grid map fusion deviation compensation system based on template matching, comprising:
[0046] The local map construction module uses the laser radar on the robot platform to build a local map;
[0047] The overlapping area map acquisition module is used to iterate each grid of the local map and determine whether each grid of the local map is in the global map according to the position of the grid, thereby obtaining the overlapping area map of the local map and the global map;
[0048] The template map module is used to traverse each grid in the overlapping area, and obtain a square map area with the traversed grid as the upper left corner, so that each grid in the square area must be within the overlapping area map and the side length is as large as possible; after the traversal is completed, the square map area with the largest side length is retained and used as the template map, and the horizontal position of the upper left corner grid of the area is recorded as the position of the template map;
[0049] The global map grid matching module is used to take the global map as the matching object, traverse each grid in the global map, use the traversed grid as the upper left corner of the square, select a map area of the same size as the template map, and calculate the correlation coefficient between the area and the template map as the similarity score between the two; after the traversal is completed, the similarity scores corresponding to all grids in the global map are obtained, and a threshold for the similarity score is set; if there is a grid corresponding to a score higher than the threshold, the match is considered successful, and the grid with the highest score above the threshold is selected as the successful match result, and the horizontal position of the grid under the global map is recorded as the matching position; if all scores are lower than the threshold, the match is considered unsuccessful;
[0050] The fusion module is used to determine whether the match is successful. If the match fails, no fusion error correction is performed. If the match is successful, the deviation of the position of the template map in step 3 relative to the matching position in step 4 is calculated, and the position deviation is compensated for all grids in the local map in step 1. At the same time, the average value of the elevation deviation between the map area corresponding to the template map in step 3 and the grid that successfully matched in step 4 is calculated, and the elevation deviation is compensated for all grids in the local map. After the deviation compensation is completed, the local map is fused into the global map, and then the next cycle is entered.
[0051] The present invention also includes a grid map fusion deviation compensation device based on template matching, including a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a grid map fusion deviation compensation method based on template matching of the present invention.
[0052] The present invention also includes a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the present invention implements a grid map fusion deviation compensation method based on template matching.
[0053] The present invention also includes a computing device, including a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, a grid map fusion deviation compensation method based on template matching of the present invention is implemented.
[0054] The present invention also provides Figure 5 The one shown corresponds to Figure 1 A schematic diagram of a grid map fusion deviation compensation system based on template matching. Figure 5 As mentioned above, at the hardware level, the template matching-based raster map fusion deviation compensation system includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to software implementation, the present invention does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0055] Improvements to a technology can be clearly distinguished as either hardware improvements (for example, improvements to circuit structures such as diodes, transistors, and switches) or software improvements (improvements to process flows). However, with technological advancements, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always program the improved process flow into the hardware circuit to obtain the corresponding hardware circuit structure. Therefore, it cannot be said that a process flow improvement cannot be implemented using a hardware module. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0056] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.
[0057] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0058] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0059] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0060] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0061] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0062] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0063] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0064] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0065] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0066] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0067] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0068] The present invention may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. The present invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.
[0069] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A grid map fusion deviation compensation method based on template matching, characterized in that: The following steps are involved: Step 1: Use the laser radar on the robot platform to build a local map; Step 2: Iterate each grid of the local map and determine whether each grid of the local map is in the global map according to the position of the grid, thereby obtaining a map of the overlapping area of the local map and the global map; Step 3: Traverse each grid in the overlapping area, and obtain a square map area with the traversed grid as the upper left corner, so that each grid in the square area must be within the overlapping area map and the side length is as large as possible; after the traversal is completed, retain the square map area with the largest side length and use it as the template map, and record the horizontal position of the upper left corner grid of the area as the position of the template map; Step 4: Use the global map as the matching object, traverse each grid in the global map, use the traversed grid as the upper left corner of the square, select a map area of the same size as the template map, and calculate the correlation coefficient between this area and the template map as the similarity score between the two; after the traversal is completed, obtain the similarity scores corresponding to all grids in the global map, and set a threshold for the similarity score; if there is a grid with a score higher than the threshold, the match is considered successful, and the grid with the highest score above the threshold is selected as the successful match result, and the horizontal position of the grid under the global map is recorded as the matching position; if all scores are lower than the threshold, the match is considered unsuccessful; Step 5: Determine whether the match is successful. If the match fails, no fusion error correction is performed. If the match is successful, calculate the deviation of the position of the template map in step 3 relative to the matching position in step 4, and compensate for the position deviation for all grids in the local map in step 1. At the same time, calculate the average value of the elevation deviation between the map area corresponding to the template map in step 3 and the grid that successfully matched in step 4, and compensate for the elevation deviation for all grids in the local map. After the deviation compensation is completed, the local map is fused into the global map, and then enter the next cycle.
2. The method for compensating for grid map fusion deviation based on template matching according to claim 1, characterized in that: The local map type described in step 1 is a raster elevation map.
3. The method for compensating for grid map fusion deviation based on template matching according to claim 1, characterized in that: The maps involved in steps 2 to 5 are all raster elevation maps.
4. The method for compensating for grid map fusion deviation based on template matching according to claim 1, characterized in that: The template map described in step 3 is selected on the map overlapping area described in step 2. The template map is selected by traversing and selecting the largest square area in the overlapping area as the template map.
5. The method for compensating for grid map fusion deviation based on template matching according to claim 1, characterized in that: The template matching in step 4 includes: traversally calculating the correlation coefficient between the template and the corresponding area in the global map as a similarity score, and selecting the grid corresponding to the maximum similarity score greater than a set threshold as a successful matching result.
6. The method for compensating for grid map fusion deviation based on template matching according to claim 1, characterized in that: The deviation compensation method described in step five is: compensating both the horizontal position and the elevation of the local map on the premise of successful matching.
7. A system for implementing the template matching-based grid map fusion deviation compensation method of claim 1, characterized in that: include: The local map construction module uses the laser radar on the robot platform to build a local map; The overlapping area map acquisition module is used to iterate each grid of the local map and determine whether each grid of the local map is in the global map according to the position of the grid, thereby obtaining the overlapping area map of the local map and the global map; The template map module is used to traverse each grid in the overlapping area, and obtain a square map area with the traversed grid as the upper left corner, so that each grid in the square area must be within the overlapping area map and the side length is as large as possible; after the traversal is completed, the square map area with the largest side length is retained and used as the template map, and the horizontal position of the upper left corner grid of the area is recorded as the position of the template map; The global map grid matching module is used to take the global map as the matching object, traverse each grid in the global map, use the traversed grid as the upper left corner of the square, select a map area of the same size as the template map, and calculate the correlation coefficient between the area and the template map as the similarity score between the two; after the traversal is completed, the similarity scores corresponding to all grids in the global map are obtained, and a threshold for the similarity score is set; if there is a grid corresponding to a score higher than the threshold, the match is considered successful, and the grid with the highest score above the threshold is selected as the successful match result, and the horizontal position of the grid under the global map is recorded as the matching position; if all scores are lower than the threshold, the match is considered unsuccessful; The fusion module is used to determine whether the match is successful. If the match fails, no fusion error correction is performed. If the match is successful, the deviation of the position of the template map in step 3 relative to the matching position in step 4 is calculated, and the position deviation is compensated for all grids in the local map in step 1. At the same time, the average value of the elevation deviation between the map area corresponding to the template map in step 3 and the grid that successfully matched in step 4 is calculated, and the elevation deviation is compensated for all grids in the local map. After the deviation compensation is completed, the local map is fused into the global map, and then the next cycle is entered.
8. A grid map fusion deviation compensation device based on template matching, characterized by: The invention comprises a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, they are used to implement a grid map fusion deviation compensation method based on template matching according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that A program is stored thereon, and when the program is executed by a processor, a grid map fusion deviation compensation method based on template matching according to any one of claims 1 to 6 is implemented.
10. A computing device comprising a memory and a processor, wherein: The memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Map fusion method and device, equipment and storage medium
CN110704563A
Robot positioning method, system and terminal
CN114296096A