An occupancy grid map construction method, system and storage medium

CN122360428BActive Publication Date: 2026-08-21NANKAI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610807402.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-05
Publication Date
2026-08-21
Estimated Expiration
2046-06-05

AI Technical Summary

Technical Problem

[0006]本申请的目的在于提供一种占用栅格地图的构建方法、系统及存储介质,通过块状数据动态读写策略,将内存使用量维持在一个较低且恒定的水平,并利用创新的关键网格扩展算法替代传统光线投射,在显著提升地图更新效率的同时,无缝集成了前沿网格的检测功能,旨在解决现有技术解决现有建图方法建图效率低、占用内存大以及前沿检测效率低的问题

Benefits of technology

[0017]由上可知,本申请提供的一种占用栅格地图的构建方法、系统及存储介质,通过将全局地图空间划分为多个网格块并根据传感器实时位置对局部空间内的网格块进行动态读写以维持内存使用量恒定,以及基于关键网格通过广度优先搜索扩展更新空闲网格并将前沿网格检测无缝集成于地图更新流程之中,解决了现有建图方法内存占用随探索范围扩大而不断增长以及光线投射算法计算开销高昂且前沿检测需独立运行导致实时性不足的问题,具有能够实现内存使用量恒定可控与地图更新及前沿检测高效协同的优点,提高了大规模场景下的建图实时性和自主探索系统的可扩展性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122360428B_ABST
    Figure CN122360428B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of mobile robot autonomous navigation and environment perception, and provides a construction method and system of an occupancy grid map and a storage medium. A global map space is divided into multiple grid blocks, each grid block stores log-odds values, occupancy and front index, and the grid blocks in a local space are dynamically read and written according to the sensor position; a depth map is created by traversing point clouds and the grid blocks to be updated are determined, key grid blocks are identified based on grid state transition and beam path; based on the key grid blocks, an idle grid block is expanded and updated by breadth-first search, and a beam boundary is recorded in an expansion boundary list; a front grid list is updated according to the expansion boundary list and front grid information, and the occupancy grid map is constructed. The application maintains constant memory by block dynamic reading and writing, replaces ray casting with key grid expansion, and seamlessly integrates front detection, thereby solving the problems of large memory occupation, low updating efficiency and lagging front detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of autonomous navigation and environmental perception technology for mobile robots, and more specifically, to a method, system, and storage medium for constructing an occupied grid map. Background Technology

[0002] Occupied grid maps are fundamental for motion planning and autonomous navigation in mobile robots. In recent years, the widespread application of sensors such as LiDAR in robotics, especially in autonomous exploration tasks across large areas, has posed significant challenges to the memory consumption and computational efficiency of mapping modules. While LiDAR boasts long detection range and high measurement accuracy, the large-scale, high-density point cloud data it generates also leads to substantial memory consumption and high computational overhead for updating existing mapping methods.

[0003] Existing methods for constructing grid-based occupancy maps can be broadly categorized into three types: The first type is traditional maps based on fixed-size grids, which have the advantage of O(1) time complexity for query operations. However, maintaining a full-size grid map in a large-scale environment leads to a surge in memory consumption. The second type is maps based on tree structures (such as octrees), which reduce memory usage by compressing spatial information. However, the time complexity of their query operations is proportional to the depth of the tree, making it difficult to meet the needs of real-time planning. The third type is maps based on hash tables, which, while possessing an average query complexity of O(1), inevitably encounter hash collisions as the number of grids increases, leading to a decrease in query efficiency. Furthermore, the memory consumption of all the above methods increases continuously as the exploration range expands.

[0004] For map updates, existing methods generally employ ray casting algorithms. This algorithm projects rays from the sensor center to each measurement point and updates the state of all grids the rays pass through. For lidar with long detection ranges and dense point clouds, the ray casting process generates a massive number of repetitive grid queries and update operations, becoming a major bottleneck restricting real-time mapping. Although some improved algorithms (such as super rays and region culling) have reduced redundant computation to some extent, the problem of repeated queries remains because all rays originate from the sensor origin. Furthermore, for frontier grid detection, which is crucial for autonomous exploration tasks, existing methods require running a separate detection algorithm after map updates are complete, further increasing the computational burden.

[0005] Therefore, designing a mapping method that can maintain low memory usage while achieving high-efficiency map updates and frontier detection in large-scale environments has become an urgent technical problem to be solved. Summary of the Invention

[0006] The purpose of this application is to provide a method, system, and storage medium for constructing a grid map. By using a block data dynamic read / write strategy, the memory usage is maintained at a low and constant level. Furthermore, by using an innovative key grid expansion algorithm to replace traditional ray projection, the map update efficiency is significantly improved while seamlessly integrating the front edge grid detection function. This aims to solve the problems of low mapping efficiency, large memory usage, and low front edge detection efficiency in existing mapping methods.

[0007] Firstly, this application provides a method for constructing an occupied raster map, the technical solution of which is as follows: The global map space is divided into multiple grid blocks. Each grid block stores the log-odds value, occupied grid index, and leading grid index of each grid. The grid blocks in the local space are dynamically read and written according to the real-time position of the sensor. A depth map is created by traversing sensor point cloud data and the grid blocks to be updated are determined. Key grids are identified within the grid blocks to be updated based on grid state transitions and laser beam path information. Based on the key grid, the free grid is expanded and updated through a breadth-first search, and the beam boundaries reached by the expansion are recorded in the expansion boundary list. Based on the extended boundary list and the maintained front edge grid information, update the front edge grid list of the corresponding grid block to construct or update the corresponding occupied grid map.

[0008] Furthermore, the dynamic reading and writing of grid blocks within the local space based on the real-time position of the sensor includes: The grid blocks that leave the local space are written to the storage medium, the grid blocks that newly enter the local space are read from the storage medium or initialized, and the block index is updated.

[0009] Furthermore, the step of traversing the sensor point cloud data to create a depth map and determining the mesh blocks to be updated includes: Initialize the distance of all pixels in the depth map to zero; Traverse each 3D point in the point cloud, calculate its azimuth and distance relative to the sensor, and determine the corresponding pixel in the depth map based on the azimuth. If the distance is less than or equal to the preset update range, then the corresponding pixel distance is set to the distance, and the corresponding grid is updated to the occupied state; If the distance is greater than the preset update range, the corresponding pixel distance is set to the preset update range, and the corresponding grid is updated to an idle state when its previous state was unknown. If multiple 3D points are projected onto the same pixel, only the smallest distance value is retained; A 3D updated bounding box is constructed based on the minimum and maximum values ​​of all point cloud coordinates, and local mesh blocks that intersect with the updated bounding box are selected as the mesh blocks to be updated.

[0010] Furthermore, the identification of key grids within the grid block to be updated based on grid state transitions and laser beam path information includes: During the point cloud traversal, grids whose state changes from unknown to occupied are identified as occupied key grids, and grids whose state changes from unknown to idle are identified as idle key grids and added to the key grid list.

[0011] Furthermore, the step of identifying key grids within the grid block to be updated also includes: Traverse the list of occupied grids maintained within the grid block to be updated, and use the depth image to determine whether each occupied grid has been passed through by the laser beam; For occupied grids that have been traversed, their occupation probability is reduced. If the occupation probability drops below a threshold and the grid becomes idle, it is identified as an occupied-to-idle key grid and added to the key grid list. At the same time, it is removed from the occupied grid list of the grid block in which it is located.

[0012] Furthermore, the step of identifying key grids within the grid block to be updated also includes: Traverse the list of leading edge grids maintained within the grid block to be updated, and use the depth image to determine whether each leading edge grid has been passed through by the laser beam; The front edge mesh that will be crossed is identified as a front edge critical mesh and added to the critical mesh list; For leading edge meshes that have not been crossed but are located inside or connected to the updated bounding box, add them to the checklist; For the remaining leading edge meshes located outside the updated bounding box, add them to the maintenance list; Clear the leading edge grid list in the grid block to be updated, and refill it after the expansion is complete.

[0013] Furthermore, the step of expanding and updating the free grid based on the key grid using a breadth-first search includes: The grids in the key grid list are used as initial nodes and added to the search queue; When the search queue is not empty, pop the head grid, find its neighbor grids in the six connected directions in three-dimensional space, and only process the neighbor grids whose current state is unknown. The depth image is used to determine whether the neighboring unknown grid has been passed through by the laser beam; If it is traversed, its status is updated to free and it is added to the tail of the search queue; If it is not crossed, it is recorded in the extended boundary list.

[0014] Furthermore, updating the front edge grid list of the corresponding grid block based on the extended boundary list and the maintained front edge grid information includes: The leading edge meshes in the maintenance list are directly loaded back into the leading edge mesh list of the corresponding mesh block; For each leading grid in the check list, check whether there is an unknown grid among its six connected neighbors. If there is, keep it and load it back into the leading grid list. If there is no unknown grid, it is no longer considered a leading grid. For each grid in the extended boundary list, check if there are any unknown grids among its six connected neighbors. If so, identify them as new frontier grids and load them into the frontier grid list of the corresponding grid block. Based on the updated frontier grid list, occupied grid index, and log-odds value of each grid block, the occupied grid map is constructed or updated.

[0015] Secondly, this application also proposes a system for constructing an occupied raster map, comprising: The grid partitioning module divides the global map space into multiple grid blocks. Each grid block stores the log-odds value, occupied grid index, and leading-edge grid index of each grid, and dynamically reads and writes the grid blocks in the local space according to the real-time position of the sensor. The update module traverses the sensor point cloud data to create a depth map and determines the grid blocks to be updated. Based on the grid state transition and laser beam path information, it identifies key grids within the grid blocks to be updated. The extension module, based on the key grid, expands and updates the free grid through a breadth-first search, and records the beam boundaries reached by the expansion to the expansion boundary list; The construction module updates the front edge grid list of the corresponding grid block based on the extended boundary list and the maintained front edge grid information, so as to construct or update the corresponding occupied grid map.

[0016] Secondly, this application also proposes a computer-readable storage medium having the computer program stored thereon, which, when executed by a processor, implements the method for constructing an occupied grid map as described in the first aspect.

[0017] As can be seen from the above, the method, system, and storage medium for constructing a grid map provided in this application solve the problems of memory usage increasing with the expansion of the exploration range and high computational cost of ray casting algorithms, as well as insufficient real-time performance caused by the need for independent operation of frontier detection. These problems are solved by dividing the global map space into multiple grid blocks and dynamically reading and writing grid blocks in the local space according to the real-time position of the sensor to maintain constant memory usage, expanding and updating free grids based on key grids through breadth-first search, and seamlessly integrating frontier detection into the map update process. The method solves the problems of memory usage increasing with the expansion of the exploration range and high computational cost of ray casting algorithms, as well as insufficient real-time performance caused by the need for independent operation of frontier detection. It has the advantages of achieving constant and controllable memory usage and efficient collaboration between map update and frontier detection, and improves the real-time performance of mapping in large-scale scenarios and the scalability of autonomous exploration systems. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating the steps of the method for constructing an occupied grid map as disclosed in an embodiment of the present invention; Figure 2 This is a schematic diagram of local map updates and block read / write disclosed in an embodiment of the present invention. Detailed Implementation

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which these embodiments belong; the terminology used herein and in the specification of the application is for the purpose of describing particular embodiments only and is not intended to limit these embodiments; the terms "comprising" and "having," and any variations thereof, in the specification of these embodiments and the foregoing description of the accompanying drawings, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification of these embodiments and the foregoing description of the accompanying drawings are used to distinguish different objects, not to describe a particular order.

[0021] The implementation details of the technical solution in this embodiment are described in detail below: This embodiment provides a method for constructing an occupied grid map, which can be applied to a multi-robot collaborative autonomous exploration system. For example... Figure 1 As shown, the method includes: S101 divides the global map space into multiple grid blocks. Each grid block stores the log-odds value, occupied grid index, and leading grid index of each grid, and dynamically reads and writes the grid blocks in the local space according to the real-time position of the sensor.

[0022] Furthermore, the dynamic reading and writing of grid blocks in the local space based on the real-time position of the sensor includes: writing grid blocks that leave the local space to the storage medium, reading or initializing newly entered grid blocks from the storage medium, and updating the block index.

[0023] In practical implementation, to achieve the goals of memory efficiency and computational efficiency, this embodiment uses grid blocks as the basic data structure to organize the global map space. The entire 3D environment space is divided into multiple grid blocks of the same size, with each grid block serving as a data container for a local region, independently managing the state information of its internal grids. Compared to maintaining a full-size global grid map, this block-based organization significantly reduces memory usage, especially in large-scale autonomous exploration scenarios. Only the grid blocks involved in the current local space need to reside in memory, while the remaining grid blocks can be persisted to external storage media, thereby keeping memory usage at a low and constant level.

[0024] Each grid cell stores three core types of data: first, the log-odds value of each grid cell, used to quantify the probability of the cell being occupied or vacant; second, the index of all occupied grid cells within the grid cell area, facilitating quick location of grid cells currently occupied by obstacles; and third, the index of all leading-edge grid cells within the grid cell area, used to record the boundary positions between known and unknown areas, providing crucial environmental boundary information for subsequent autonomous exploration tasks. By maintaining the indices of occupied and leading-edge grid cells independently within the grid cell, a full-map scan query is avoided, significantly improving the computational efficiency of map querying and updating.

[0025] Based on the real-time location of the sensors, the system dynamically determines a local spatial range and maintains only the set of grid blocks within this local space in memory. As the sensors move, when a grid block leaves the local space, the system writes the complete data of that grid block to a storage medium for persistent storage. The storage medium can be a local solid-state drive, non-volatile memory, or other external storage device. The write operation includes exporting the log-odds values, occupied grid indices, and leading-edge grid indices of all grids within the grid block to ensure the continuity and integrity of the global map information.

[0026] Accordingly, when sensor movement causes a new grid block to enter the local space, the system first checks whether the grid block already exists in the storage medium. If it exists, the system reads the historical data of the grid block from the storage medium and loads it into memory; if the grid block has not been explored before and there is no corresponding record in the storage medium, it is initialized by assigning an initial log-odds value (usually set to an initial value representing an unknown state), and an empty list of occupied grid indices and a list of leading grid indices are established. Through the above dynamic read / write strategy, the system retains only the grid blocks required for the current local space in memory, while the complete information of the global map is extended through the storage medium, thus keeping memory usage within a limited range at any given time, unaffected by the expansion of the exploration range.

[0027] After completing the write, read, or initialization operation of a grid block, the system updates the block index to reflect the current positional status and storage location mapping relationship of each grid block. The block index records the spatial location of each grid block in the global coordinate system, its resident status in memory, and its storage address or identification information in the storage medium. By maintaining this block index, the system can quickly determine whether any grid block is located in the current local space, whether it already exists in the storage medium, and whether a read or initialization operation should be performed during continuous sensor movement, thereby ensuring the efficiency and accuracy of the dynamic read / write process.

[0028] like Figure 2 The diagram shown illustrates the local map update and block read / write operations in this embodiment. As the sensor moves in real time, grid blocks that leave the local space are written back to the storage medium, and grid blocks that newly enter the local space are read from or initialized from the storage medium. Only the set of grid blocks in the current local space is retained in the memory, thereby achieving constant memory usage.

[0029] S102, traverse the sensor point cloud data to create a depth map and determine the grid block to be updated, and identify key grids within the grid block to be updated based on grid state transitions and laser beam path information.

[0030] Furthermore, the step of traversing the sensor point cloud data to create a depth map and determining the mesh blocks to be updated includes: Initialize all pixel distances in the depth map to zero; traverse each 3D point in the point cloud, calculate its azimuth and distance relative to the sensor, and determine the corresponding pixel in the depth map based on the azimuth; if the distance is less than or equal to a preset update range, set the corresponding pixel distance to the preset update range and update the corresponding grid to an occupied state; if the distance is greater than the preset update range, set the corresponding pixel distance to the preset update range and update the corresponding grid to an idle state if its previous state was unknown; if multiple 3D points are projected onto the same pixel, only the smallest distance value is retained; construct a 3D update bounding box based on the minimum and maximum values ​​of all point cloud coordinates, and select the local grid blocks that intersect with the update bounding box as the grid blocks to be updated.

[0031] Furthermore, the identification of key grids within the grid block to be updated based on grid state transitions and laser beam path information includes: during the traversal of the point cloud, identifying grids whose state changes from unknown to occupied as occupied key grids, and identifying grids whose state changes from unknown to idle as idle key grids, and pushing them into the key grid list.

[0032] Furthermore, the step of identifying key grids within the grid block to be updated further includes: traversing the list of occupied grids maintained within the grid block to be updated, and using the depth image to determine whether each occupied grid has been traversed by the laser beam; for occupied grids that have been traversed, reducing their occupation probability; if the occupation probability drops below a threshold and becomes idle, then identifying them as occupied-to-idle key grids and adding them to the list of key grids, while removing them from the list of occupied grids of the grid block.

[0033] Furthermore, the step of identifying key grids within the grid block to be updated further includes: traversing the maintained list of leading-edge grids within the grid block to be updated, and using the depth image to determine whether each leading-edge grid has been traversed by the laser beam; identifying traversed leading-edge grids as key leading-edge grids and adding them to the list of key grids; adding leading-edge grids that have not been traversed but are located inside or connected to the update bounding box to a check list; adding the remaining leading-edge grids located outside the update bounding box to a maintenance list; clearing the list of leading-edge grids in the grid block to be updated, and refilling it after expansion is complete.

[0034] In practical implementation, to efficiently process LiDAR point cloud data and define the map update range, this embodiment first performs depth map creation and grid block determination operations. The system creates a depth map data structure corresponding to the sensor's viewpoint and initializes the distance of all pixels in the depth map to zero, which serves as the basis for subsequent distance comparisons. Subsequently, the system traverses each 3D point p in the LiDAR point cloud, calculates its azimuth and distance d relative to the sensor, and finds the pixel position corresponding to point p in the depth image based on the azimuth. If the distance d is less than or equal to the preset update range ur, the distance value of the pixel is set to d, and the grid corresponding to point p is directly updated to the "occupied" state (i.e., its log-odds value is set to the upper limit lmax); if the distance d is greater than the update range ur, the distance value of the pixel is set to ur, and if the previous state of the corresponding grid was "unknown", its state is updated to "idle" (i.e., its log-odds value is set to lmin / 2). If multiple points are projected onto the same pixel, only the minimum distance value is retained, thereby ensuring that the depth map records the distance of the nearest obstacle in each azimuth direction. During the traversal, the system synchronously records the minimum and maximum values ​​(bmin and bmax) of all point cloud coordinates to form a 3D updated bounding box. After completing the point cloud traversal, all intersecting local mesh blocks are selected based on this updated bounding box. These mesh blocks are marked as "mesh blocks to be updated" and will participate in subsequent processing. This step compresses the point cloud information using a depth map and defines the scope for subsequent fine-grained updates, avoiding unnecessary calculations.

[0035] During point cloud traversal, the system simultaneously identifies key grids based on grid state transitions. Specifically, all grids whose state changes from "unknown" are recorded and added to a key grid list KL, serving as the starting point for subsequent extended searches. If a point's distance is less than or equal to the update range ur and its corresponding grid was previously unknown, it is identified as occupying a key grid gou and added to KL; if a point's distance is greater than the update range ur and its corresponding grid was previously unknown, it is identified as an idle key grid gfu and added to KL. Through this step, the system captures the grid locations where the sensor observation directly caused state changes; these grids constitute the initial seed nodes for subsequent breadth-first search expansion.

[0036] After initial screening, the system further identifies occupied-to-vacant key grids within the grid block to be updated to refine the key grid list (KL). Specifically, the system iterates through the "occupied grid list" maintained within the grid block to be updated; for each occupied grid in the list, it uses the generated depth image to determine whether it is located on the path of the laser beam (i.e., "passed through" by the beam). If it is passed through, its occupancy probability is reduced (i.e., the logarithmic probability value lmiss is decreased); if the occupancy probability of the grid drops below a threshold, its state changes to "vacant". At this point, the grid is identified as a new key grid gfo and added to the key grid list KL, while simultaneously being removed from the occupied grid list of its respective grid block. This process effectively handles areas previously marked as occupied but now confirmed to be free of obstacles in this observation, ensuring that the map can reflect dynamic environmental changes in a timely manner.

[0037] Furthermore, the system traverses the "frontline grid list" maintained within the grid block to be updated, using depth images to determine whether each frontline grid has been traversed by the beam. If traversed, it is identified as a frontline critical grid (gf) and added to the critical grid list (KL). For all frontline grids to be updated, for efficient subsequent updates, they are divided into three categories: if a frontline grid is detected as being traversed by the beam, it is added to the critical grid list (KL); if a frontline grid is not traversed by the beam but is located inside or connected to the update bounding box, it is added to a check list (CL); all other frontline grids located outside the update bounding box are added to a maintenance list (ML). After completing the above classification, the frontline grid list in the grid block to be updated is temporarily cleared and will be filled again after expansion is complete. At this point, the critical grid list (KL) contains all four types of expansion starting points: occupied critical grid (gou), idle critical grid (gfu), occupied-to-idle critical grid (gfo), and frontline critical grid (gf), providing a complete initial node set for subsequent breadth-first search expansion.

[0038] S103, based on the key grid, expand and update the free grid through breadth-first search, and record the beam boundaries reached by the expansion to the expansion boundary list.

[0039] Furthermore, the step of expanding and updating the idle grid based on the key grid using a breadth-first search includes: adding the grids in the key grid list as initial nodes to the search queue; when the search queue is not empty, popping the head grid, finding its neighboring grids in the six connected directions in three-dimensional space, and only processing neighboring grids whose current state is unknown; using the depth image to determine whether the unknown neighboring grid has been passed through by the laser beam; if it has been passed through, updating its state to idle and adding it to the tail of the search queue; if it has not been passed through, recording it in the expanded boundary list.

[0040] In practice, this step, as the core of the map update process, employs a breadth-first search mechanism instead of the traditional ray casting algorithm to efficiently update idle grids. The basic principle is that the idle grids covered by a laser beam are not isolated. By identifying a key grid on the beam as the starting point for expansion, all other unknown grids traversed by the beam can be searched based on spatial connectivity, thus avoiding the need to traverse all grids one by one from the sensor origin.

[0041] The system first uses all the grids in the critical grid list KL constructed in the preceding steps as initial nodes and places them into a breadth-first search queue. When the search queue is not empty, the system pops the grid p at the head of the queue and searches for the neighboring grids n in the six connected directions of grid p in three-dimensional space. For each neighboring grid n, the system only performs subsequent processing if its current state is "unknown". Grids that have already been marked as occupied or free are not processed again to reduce unnecessary computation.

[0042] For each unknown neighboring grid n to be processed, the system uses the depth image generated in the first step to determine whether the grid has been traversed by the laser beam. If the result is that it has been traversed, it indicates that the grid is within a safe, empty area between the sensor and the obstacle. The system updates its status to "empty" (setting the logarithmic probability value to lmin / 2) and adds it to the tail of the search queue so that it can continue to expand outward from the grid to cover more empty areas further away in the direction of the beam.

[0043] If the neighboring unknown grid n is not passed through by the laser beam, it indicates that the expansion has reached the beam boundary or behind an obstacle, and further expansion will exceed the current sensor observation range. In this case, the state of the neighboring grid n is not updated, but rather recorded in an expansion boundary list BL for subsequent leading-edge grid detection. Through this connectivity expansion method, the system only needs to update the state of the unknown grids that the beam actually passes through, completely avoiding the traversal of all grids on the same beam and the resulting repeated queries in traditional ray casting algorithms. This significantly improves computational efficiency while ensuring map update accuracy.

[0044] S104, based on the extended boundary list and the maintained front edge grid information, update the front edge grid list of the corresponding grid block to construct or update the corresponding occupied grid map.

[0045] Furthermore, updating the frontier grid list of the corresponding grid block based on the extended boundary list and the maintained frontier grid information includes: directly loading the frontier grids in the maintenance list back into the frontier grid list of the corresponding grid block; checking each frontier grid in the check list for unknown grids among its six connected neighbors, retaining and loading them back into the frontier grid list if they exist, and no longer considering them as frontier grids if they do not exist; checking each grid in the extended boundary list for unknown grids among its six connected neighbors, identifying them as new frontier grids and loading them into the frontier grid list of the corresponding grid block if they exist; and constructing or updating the occupied grid map based on the updated frontier grid list, occupied grid index, and log-odds value of each grid block.

[0046] In practice, after the breadth-first search expansion is completed, the system enters the efficient update phase of the frontier grid. This step reconstructs the frontier grid list for each grid block based on the maintenance list, check list, and expanded boundary list maintained in the previous steps, without needing to traverse the global map again for detection. This incremental update strategy seamlessly integrates frontier detection into the map update process, incurring almost no additional computational overhead, significantly improving overall mapping efficiency, while preserving real-time environmental boundary information for upper-level autonomous exploration and planning.

[0047] For the leading edge grids in the maintenance list, since they are located outside the currently updated bounding box and their areas are not affected by current sensor observations and map update operations, their leading edge state remains unchanged. Therefore, the system directly reloads these grids into the leading edge grid list of the corresponding grid blocks without performing any state verification or neighbor checks, thereby minimizing redundant computation.

[0048] For leading edge grids in the checklist, since they are located inside or connected to the updated bounding box, their neighboring regions may have changed due to this map update, and their original leading edge state may have become invalid. The system checks the neighboring grids of these grids in the six connected directions in 3D space one by one to determine whether there are still grids with an "unknown" state. If there are unknown neighbors, it means that the grid is still at the boundary between the known and unknown regions, its leading edge state is retained, and it is reloaded back into the leading edge grid list of the corresponding grid block; if all its connected neighbors have been marked as occupied or free, it is no longer considered a leading edge grid and is removed from subsequent processing.

[0049] For the grids in the expanded boundary list, these grids are beam boundaries reached during the breadth-first search expansion, i.e., the edges of unknown regions where the laser beam could not continue to penetrate. The system checks if there are any grids with a state of "unknown" among the six connected neighbors of these grids. If so, it means that the grid is located at the boundary between the known and unknown regions after this update, meeting the definition of a frontier grid. The system identifies it as a new frontier grid and loads it into the frontier grid list of the corresponding grid block to supplement the frontier boundaries added due to the environmental exploration expansion.

[0050] After updating the aforementioned frontier grid list, each grid block contains a complete frontier grid index, occupied grid index, and log-odds values ​​for each grid. Based on this grid block data, the system integrates the stored content of all local grid blocks in the global map space to form a complete occupied grid map containing occupied areas, free areas, and frontier boundaries. This map is stored in a distributed manner using a block-based data structure, supporting both rapid querying of any grid state and providing real-time and accurate environmental boundary information for the robot's autonomous exploration and planning, thereby constructing or updating the corresponding occupied grid map at the current moment.

[0051] Based on this, this embodiment organizes the global map space into independently persistent grid blocks through a block-based dynamic read / write strategy. Only grid blocks within the sensor's local space reside in memory, ensuring that memory usage remains constant regardless of the expansion of the exploration range, significantly reducing the memory overhead for mapping in large-scale scenarios. Instead of the traditional ray casting algorithm, a key grid identification and breadth-first search expansion mechanism is used. The connectivity of the laser beam is utilized to expand and update idle grids outward from the key grids, avoiding the need for traversing and repeatedly querying all grids on the same beam, greatly reducing the computational overhead of map updates. Simultaneously, the incremental reconstruction of the leading edge grid is seamlessly integrated into the map update process. The leading edge state determination and update are directly completed based on the maintenance list, check list, and extended boundary list, eliminating the need for independent detection across the entire map after map updates, further saving computational resources and ensuring the real-time nature of leading edge information. Therefore, this invention achieves synergistic optimization in three dimensions: memory usage, map update efficiency, and leading edge detection efficiency, meeting the stringent requirements of large-scale autonomous exploration tasks for low memory usage and high real-time performance in the mapping module.

[0052] Secondly, this embodiment also proposes a system for constructing a grid map, characterized by comprising: The grid partitioning module divides the global map space into multiple grid blocks. Each grid block stores the log-odds value, occupied grid index, and leading-edge grid index of each grid, and dynamically reads and writes the grid blocks in the local space according to the real-time position of the sensor. The update module traverses the sensor point cloud data to create a depth map and determines the grid blocks to be updated. Based on the grid state transition and laser beam path information, it identifies key grids within the grid blocks to be updated. The extension module, based on the key grid, expands and updates the free grid through a breadth-first search, and records the beam boundaries reached by the expansion to the expansion boundary list; The construction module updates the front edge grid list of the corresponding grid block based on the extended boundary list and the maintained front edge grid information, so as to construct or update the corresponding occupied grid map.

[0053] This system can be used to execute the method for constructing the occupancy raster map described in the first aspect.

[0054] Thirdly, this embodiment also proposes a computer-readable storage medium storing the computer program thereon. When executed by a processor, the computer program implements the method for constructing an occupancy grid map as described in the first aspect. The computer-readable storage medium can be any one or more combinations of read-only memory (ROM), flash memory, solid-state drive (SSD), or optical disk. The computer program can be stored in the medium in the form of source code, object code, or executable file for execution by a processor.

[0055] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for constructing an occupies a raster map, characterized in that, include: The global map space is divided into multiple grid blocks. Each grid block stores the log-odds value, occupied grid index, and leading grid index of each grid. The grid blocks in the local space are dynamically read and written according to the real-time position of the sensor. A depth map is created by traversing sensor point cloud data and the grid blocks to be updated are determined. Key grids are identified within the grid blocks to be updated based on grid state transitions and laser beam path information. Based on the key grid, the free grid is expanded and updated through a breadth-first search, and the beam boundaries reached by the expansion are recorded in the expansion boundary list. Based on the extended boundary list and the maintained front edge grid information, update the front edge grid list of the corresponding grid block to construct or update the corresponding occupied grid map; The process of traversing sensor point cloud data to create a depth map and determine the grid blocks to be updated includes: initializing the distance of all pixels in the depth map to zero; Traverse each 3D point in the point cloud, calculate its azimuth and distance relative to the sensor, and determine the corresponding pixel in the depth map based on the azimuth. If the distance is less than or equal to the preset update range, the corresponding pixel distance is set to the distance, and the corresponding grid is updated to the occupied state; If the distance is greater than the preset update range, the corresponding pixel distance is set to the preset update range, and the corresponding grid is updated to an idle state when the previous state of the grid is unknown; if multiple 3D points are projected onto the same pixel, only the smallest distance value is retained; a 3D update bounding box is constructed based on the minimum and maximum values ​​of all point cloud coordinates, and local grid blocks that intersect with the update bounding box are selected as the grid blocks to be updated.

2. The method for constructing an occupied raster map according to claim 1, characterized in that, The dynamic reading and writing of grid blocks in the local space based on the real-time position of the sensor includes: writing grid blocks that leave the local space to a storage medium, reading or initializing grid blocks that newly enter the local space from the storage medium, and updating the block index.

3. The method for constructing an occupied raster map according to claim 2, characterized in that, The identification of key grids within the grid block to be updated based on grid state transitions and laser beam path information includes: during the traversal of the point cloud, identifying grids whose state changes from unknown to occupied as occupied key grids, and identifying grids whose state changes from unknown to idle as idle key grids, and pushing them into the key grid list.

4. The method for constructing an occupied raster map according to claim 3, characterized in that, The step of identifying key grids within the grid block to be updated also includes: Traverse the list of occupied grids maintained within the grid block to be updated, and use the depth image to determine whether each occupied grid has been passed through by the laser beam; For occupied grids that have been traversed, their occupation probability is reduced. If the occupation probability drops below a threshold and the grid becomes idle, it is identified as an occupied-to-idle key grid and added to the key grid list. At the same time, it is removed from the occupied grid list of the grid block in which it is located.

5. The method for constructing an occupied raster map according to claim 4, characterized in that, The step of identifying key grids within the grid block to be updated also includes: Traverse the list of leading edge grids maintained within the grid block to be updated, and use the depth image to determine whether each leading edge grid has been passed through by the laser beam; The front edge mesh that will be crossed is identified as a front edge critical mesh and added to the critical mesh list; For front-end meshes that have not been crossed but are located inside or connected to the updated bounding box, add them to the checklist; For the remaining leading edge meshes located outside the updated bounding box, add them to the maintenance list; Clear the leading edge grid list in the grid block to be updated, and refill it after the expansion is complete.

6. The method for constructing an occupied raster map according to claim 5, characterized in that, The process of expanding and updating the free grid based on the key grid using a breadth-first search includes: The grids in the key grid list are used as initial nodes and added to the search queue; When the search queue is not empty, pop the head grid, find its neighbor grids in the six connected directions in three-dimensional space, and only process the neighbor grids whose current state is unknown. The depth image is used to determine whether the neighboring unknown grid has been passed through by the laser beam; If it is traversed, its status is updated to free and it is added to the tail of the search queue; If it is not crossed, it is recorded in the extended boundary list.

7. The method for constructing an occupied raster map according to claim 6, characterized in that, The step of updating the front edge grid list of the corresponding grid block based on the extended boundary list and the maintained front edge grid information includes: The leading edge meshes in the maintenance list are directly loaded back into the leading edge mesh list of the corresponding mesh block; For each leading grid in the check list, check whether there is an unknown grid among its six connected neighbors. If there is, keep it and load it back into the leading grid list. If there is no unknown grid, it is no longer considered a leading grid. For each grid in the extended boundary list, check if there are any unknown grids among its six connected neighbors. If so, identify them as new frontier grids and load them into the frontier grid list of the corresponding grid block. Based on the updated frontier grid list, occupied grid index, and log-odds value of each grid block, the occupied grid map is constructed or updated.

8. A system for constructing an occupies a raster map, for performing the method according to any one of claims 1-7, characterized in that, include: The grid partitioning module divides the global map space into multiple grid blocks. Each grid block stores the log-odds value, occupied grid index, and leading edge grid index of each grid, and dynamically reads and writes the grid blocks in the local space according to the real-time position of the sensor. The update module traverses sensor point cloud data to create a depth map and determines the grid blocks to be updated. Based on grid state transitions and laser beam path information, it identifies key grids within the grid blocks to be updated. Specifically, traversing sensor point cloud data to create a depth map and determine the grid blocks to be updated includes: initializing all pixel distances in the depth map to zero; traversing each 3D point in the point cloud, calculating its azimuth and distance relative to the sensor, and determining the corresponding pixel in the depth map based on the azimuth; if the distance is less than or equal to a preset update range, setting the corresponding pixel distance to the preset update range and updating the corresponding grid to an occupied state; if the distance is greater than the preset update range, setting the corresponding pixel distance to the preset update range and updating the corresponding grid to an idle state if its previous state was unknown; if multiple 3D points are projected onto the same pixel, only the smallest distance value is retained; constructing a 3D update bounding box based on the minimum and maximum values ​​of all point cloud coordinates, and selecting local grid blocks intersecting with the update bounding box as the grid blocks to be updated. The extension module, based on the key grid, expands and updates the free grid through a breadth-first search, and records the beam boundaries reached by the expansion to the expansion boundary list; The construction module updates the front edge grid list of the corresponding grid block based on the extended boundary list and the maintained front edge grid information, so as to construct or update the corresponding occupied grid map.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for constructing an occupied grid map as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Mobile robot rolling grid map construction method

    CN108709562A

  • Three-dimensional house type grid model reconstruction method based on house type planar graph

    CN117934763A