A block map construction and dynamic loading method
Through the construction of chunked maps and dynamic loading methods, combined with raster maps and semantic maps, the problems of low map loading efficiency and high computing resources in large-scale scenarios are solved, and the effects of high-precision positioning and lightweight calculations are achieved.
Patent Information
- Application Number
- CN202411983300.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-04
AI Technical Summary
In large-scale scenarios, the traditional global map loading method causes memory overflow and long loading time, affecting the robot's operating efficiency, and it is difficult to take into account the high-precision positioning requirements of point cloud maps and the high requirements of computing resources.
The block map construction and dynamic loading method are used to construct topological maps through raster maps, combined with semantic maps, divided into map tiles of preset specifications and sizes, and the map tiles are dynamically loaded and unloaded based on index storage to optimize memory usage.
It improves the real-time and resource utilization of robot navigation, ensures high-precision positioning and lightweight computing, and avoids memory overflow and performance bottlenecks.
Smart Images

Figure CN119756336A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a block map construction and dynamic loading method. Background Art
[0002] In the navigation system of mobile robots, maps are the core data structure for autonomous positioning and path planning. The traditional global map loading method usually adopts monolithic storage, that is, the data of the entire scene is loaded into the memory in the form of a single file or object. This method performs well in small-scale scenes, but in large-scale scenes, it will cause memory overflow and long loading time due to map data redundancy, which seriously affects the robot's operating efficiency. In order to solve the above problems, China's patent application "CN115512065A" provides a real-time map construction method for large-scale scenes based on block processing. Through map block processing, the robot navigation map is constructed in the form of raster map and point cloud map. Although the map block construction and storage are realized, the point cloud map needs to store a large number of disordered three-dimensional data points in the environment model, and the huge amount of data leads to huge storage and computing overhead, and the requirements for computing resources are high. Although the above problems can be solved by compressing the point cloud map, the greater the amount of compression, the lower the positioning accuracy, and it is impossible to effectively achieve high-precision positioning requirements and reduce the computing burden at the same time.
[0003] Therefore, providing a method that can ensure high computing efficiency and provide accurate navigation information for the robot is a technical problem that needs to be solved. Summary of the invention
[0004] The purpose of the present invention is to provide a block map construction and dynamic loading method in order to overcome the defects of the above-mentioned prior art. Constructing a topological map based on a raster map avoids the problem that the use of a point cloud map cannot simultaneously achieve high-precision positioning and reduce the computational burden; in the dynamic loading process, pre-loading is used to ensure the continuity of the robot's movements, and dynamic screening of inactive map blocks reduces the memory usage of large-scale maps.
[0005] The purpose of the present invention can be achieved by the following technical solutions:
[0006] The present invention provides a block map construction method, the method comprising:
[0007] Constructing a grid map of the robot's moving area, acquiring semantic information based on the actual environment, and constructing a semantic map based on the semantic information; the semantic information includes charging piles, virtual tracks, star points, and no-go areas;
[0008] Constructing a Voronoi diagram based on the grid map;
[0009] A topological map is constructed based on the Voronoi map, and a global path map is constructed based on the topological map and the semantic map. The global path map is divided into map blocks of preset sizes, and each map block is assigned an index and stored in the same file; the index is the coordinate point of any vertex in the map block.
[0010] As a preferred technical solution, the method for constructing the Voronoi diagram is:
[0011] Traversing the grid map, obtaining coordinate points of all free spaces as potential reference points, sampling the potential reference points, and obtaining reference points;
[0012] Constructing a Voronoi diagram based on the reference points includes:
[0013] For each reference point, calculate the perpendicular bisector of the adjacent reference point to generate the Voronoi region of the corresponding reference point;
[0014] Obtain the intersection of two adjacent perpendicular bisectors among all perpendicular bisectors corresponding to each reference point as the Voronoi vertex;
[0015] The edges are determined based on the Voronoi vertices, and each edge is checked to see if there is a crossing obstacle. If not, the edge is a Voronoi boundary; if crossed, the edge does not exist.
[0016] As a preferred technical solution, when acquiring potential reference points, downsampling or clustering algorithms are used to screen the potential reference points.
[0017] As a preferred technical solution, the sampling method is:
[0018] Collecting coordinate points from the free space at preset intervals; or,
[0019] Divide the free space into multiple connected regions and select the centroid or key point of each region; or,
[0020] Randomly collect a preset number of coordinate points.
[0021] As a preferred technical solution, the method for constructing a topological map is:
[0022] Obtaining the Voronoi region and Voronoi boundary of each reference point based on the Voronoi diagram;
[0023] Extract all connectivity relationships of each Voronoi region based on the Voronoi boundary, and use the Voronoi region as a topological graph node and the connectivity relationship as a topological graph edge;
[0024] Calculate the actual distance between two connected Voronoi regions and assign edge weights based on the actual distance.
[0025] As a preferred technical solution, the construction of the topological map also includes optimizing the topological map structure, including: fusing the two Voronoi regions whose actual distance is less than the preset distance into one node, and filtering out edges that the robot cannot access.
[0026] As a preferred technical solution, the method for dividing the global path map into map blocks of preset sizes is: using a quadtree data structure to divide the global path map into multiple areas.
[0027] According to a second aspect of the present invention, a method for dynamically loading a block map is provided, wherein the method dynamically loads a map block constructed by the above method during the movement of the robot, comprising:
[0028] Acquire the robot's demand information and location information in real time, and dynamically load the map blocks that meet the conditions within the first preset range and the grid map corresponding to the map blocks that meet the conditions within the first preset range based on the demand information, location information and index;
[0029] Based on the position information, it is determined whether the robot has reached the boundary of the map block. If the robot has reached the boundary, a map block within a second preset range of the map block is loaded in advance.
[0030] As a preferred technical solution, the method further comprises:
[0031] The frequency of loading map blocks by the robot is obtained. When the memory of the robot reaches the storage upper limit, the map blocks with a loading frequency lower than the first preset value are filtered out and stored in the buffer.
[0032] As a preferred technical solution, the method further includes: when the memory and buffer of the robot both reach the storage upper limit, the map blocks with a loading frequency lower than a second preset value in the buffer are removed or a secondary memory is added.
[0033] Compared with the prior art, the present invention has the following advantages:
[0034] 1) The present invention provides a block map construction method, which effectively combines the grid map, the topological map and the semantic map, and stores the map blocks of the global path map constructed by the grid map and the semantic map in the same file, so that when the robot loads the map, it can use a small amount of memory to load the target map block to realize the global path search, and then combine the corresponding local grid map to perform a more detailed local path search. Even when processing large-scale scene data, it can also ensure the accuracy of the generated map and lightweight calculation at the same time;
[0035] 2) The present invention also provides a method for dynamically loading block maps, which dynamically manages the map blocks in the robot's memory based on the activity of the map blocks (i.e. the frequency or number of times the map is loaded), removes the map blocks with low activity, and avoids problems such as memory overflow or performance bottlenecks; it also selects preloading based on the robot's position to ensure the continuity of the robot's tasks. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 The present invention is a method flow chart of an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0038] Unless otherwise defined, the technical terms or scientific terms involved in this application should be understood by people with ordinary skills in the technical field to which this application belongs. The words "one", "a", "a", "the" and the like involved in this application do not indicate a quantitative limitation, and may represent the singular or plural. The terms "include", "comprise", "have" and any of their variations involved in this application are intended to cover non-exclusive inclusions; for example, a process, method, system, product or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units that are not listed, or may also include other steps or units inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects before and after are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0039] In order to solve the problems of low loading efficiency and large memory overhead of large scene maps in the prior art, the present invention provides a block map construction and dynamic loading method, which significantly improves the real-time performance and resource utilization of robot navigation by extracting topological information of the map, storing it in blocks, and loading it on demand.
[0040] The present invention includes two aspects, one is the construction of block maps, the other is the dynamic loading of block maps, the process is as follows Figure 1 shown.
[0041] The detailed method of constructing a block map includes:
[0042] S1. Construction of grid map and semantic map:
[0043] S11. Use a laser radar to scan the robot's moving area, and generate a grid map based on the scanning results.
[0044] S12, based on the actual environment, semantic information including charging piles, virtual tracks, star points and no-go areas is obtained, and a semantic map is constructed based on the semantic information. Since the amount of data of the above semantic information is small and all data may need to be accessed when accessing, the semantic map is loaded in a one-time loading manner.
[0045] S2. Construct a Voronoi diagram based on the grid map.
[0046] S21. Traverse the grid map, obtain all the coordinate points of the free space as potential reference points, sample the potential reference points, and obtain reference points; and when obtaining the potential reference points, use downsampling or clustering algorithms to screen the potential reference points to reduce the number of free space points and avoid too many generated points affecting the calculation efficiency.
[0047] When obtaining reference points, there are three sampling methods: first, collecting coordinate points from free space at preset intervals; second, dividing the free space into multiple connected areas and selecting the centroid or key points of each area; third, randomly collecting a preset number of coordinate points. When sampling, potential reference points that are too close to obstacles need to be eliminated.
[0048] S22. Construct a Voronoi diagram based on the reference point. The reference code is as follows:
[0049] function GenerateVoronoi(Points):
[0050] #Step 1: Initialize an empty Voronoi diagram structure
[0051] VoronoiDiagram=new Voronoi()
[0052] #Step 2: Calculate the Voronoi area of each point for all generated points
[0053] for each point Piin Points:
[0054] VoronoiCell=new VoronoiCell(Pi)
[0055] #Step 3: Calculate the Voronoi region boundary of Pi
[0056] for each other point Pj in Points:
[0057] if Pi!=Pj:
[0058] #Calculate the perpendicular bisector (boundary) between two points
[0059] Midpoint=CalculateMidpoint(Pi,Pj)
[0060] PerpendicularBisector=CalculatePerpendicularBisector(Pi,Pj)
[0061] # Find the boundary between two points and add it to Pi's Voronoi region
[0062] VoronoiCell.AddBoundary(PerpendicularBisector)
[0063] #Add the Voronoi region of each generated point to the Voronoi map
[0064] VoronoiDiagram.AddCell(VoronoiCell)
[0065] #Step 4: Calculate intersection points (Vonoi diagram vertices) and connect boundaries
[0066] for each boundary in VoronoiDiagram.Boundaries:
[0067] #If the boundary is within the obstacle, ignore
[0068] if IsValidBoundary(boundary):
[0069] #Calculate the intersection points (vertices of the Voronoi diagram)
[0070] intersection=CalculateIntersection(boundary)
[0071] #Add the intersection point to the vertex list of the Voronoi diagram
[0072] VoronoiDiagram.AddVertex(intersection)
[0073] #Step 5: Return the final Voronoi diagram
[0074] return VoronoiDiagram
[0075] #Helper Function
[0076] #Calculate the midpoint between two points
[0077] function CalculateMidpoint(Pi,Pj):
[0078] return((Pi.x+Pj.x) / 2,(Pi.y+Pj.y) / 2)
[0079] #Calculate the perpendicular bisector between two points
[0080] function CalculatePerpendicularBisector(Pi,Pj):
[0081] #Calculate the slope of the line segment
[0082] slope=(Pj.y-Pi.y) / (Pj.x-Pi.x)
[0083] # Calculate the slope of the perpendicular bisector
[0084] perpendicular_slope=-1 / slope
[0085] # Calculate the equation of the perpendicular bisector
[0086] return PerpendicularLine(Pi,perpendicular_slope)
[0087] #Check if the boundary is valid (whether it crosses the obstacle)
[0088] function IsValidBoundary(boundary):
[0089] #Use a path checking algorithm (such as Bresenham algorithm) to verify whether the path crosses obstacles
[0090] if PathClear(boundary):
[0091] return true
[0092] else:
[0093] return false
[0094] #Calculate the intersection of two boundaries
[0095] function CalculateIntersection(boundary):
[0096] #Use geometric algorithm to calculate the intersection of two boundaries
[0097] return IntersectionPoint
[0098] The detailed steps are:
[0099] S221. For each reference point, calculate the perpendicular bisector of the reference point adjacent to it, and generate the Voronoi region of the corresponding reference point.
[0100] S222. Obtain the intersection of two adjacent perpendicular bisectors among all perpendicular bisectors corresponding to each reference point as a Voronoi vertex.
[0101] S223. Determine the edges based on the Voronoi vertices, and check whether each edge has any crossing obstacles. If not, the edge is a Voronoi boundary; if crossed, the edge does not exist, to ensure that the Voronoi diagram only reflects the division of free space.
[0102] S3. Global path map construction:
[0103] S31. Construct a topological graph based on the Voronoi graph.
[0104] In the Voronoi diagram, the Voronoi region is the area controlled by each reference point; the Voronoi boundary is the edge connecting different Voronoi regions; and a connected region means that if there is a common Voronoi boundary between two Voronoi regions, then the two Voronoi regions are connected.
[0105] S311. Obtain the Voronoi region and Voronoi boundary of each reference point based on the Voronoi diagram.
[0106] S312, extracting all connectivity relationships of each Voronoi region based on the Voronoi boundary, and using the Voronoi region as a topological graph node and the connectivity relationship as a topological graph edge.
[0107] S313, calculating the actual distance between two connected Voronoi regions, and assigning edge weights based on the actual distance.
[0108] The pseudo code of this process is:
[0109] function ExtractConnectedRegions(VoronoiDiagram):
[0110] # Initialize the topology
[0111] TopologyGraph = new Graph()
[0112] #Traverse all Weno areas
[0113] for each VoronoiCell in VoronoiDiagram.Cells:
[0114] #Add a node for each Voronoi region
[0115] TopologyGraph.AddNode(VoronoiCell.ID)
[0116] #Find adjacent areas
[0117] for each adjacentCell in VoronoiCell.AdjacentCells:
[0118] #If the Voronoi region is adjacent to other regions, add connecting edges
[0119] if not TopologyGraph.HasEdge(VoronoiCell.ID,adjacentCell.ID):
[0120] TopologyGraph.AddEdge(VoronoiCell.ID,adjacentCell.ID)
[0121] return TopologyGraph
[0122] S314, optimizing the topological graph structure: merging two Voronoi regions whose actual distance is less than the preset distance into one node, and filtering out edges that the robot cannot access.
[0123] The structure of the topological map simplifies the map representation, which can effectively improve the efficiency of path search and realize global path search without loading the entire raster map.
[0124] S32. Construct a global path map based on the topological map and the semantic map.
[0125] The global path map is divided into map blocks of preset sizes using a quadtree data structure, such as 20*20 meters. The x and y coordinates of the lower left corner of the map block are concatenated on the large screen as the index Block ID. Each leaf node represents a map block, and a map block collection that can be efficiently queried and updated is established.
[0126] Based on the above-constructed block map, the present invention provides a block map dynamic loading method, including:
[0127] A1. During the dynamic loading process, the loading and unloading of map blocks are triggered based on the current position and perception range of the robot. Therefore, it is necessary to obtain the robot's demand information and location information in real time, and then dynamically determine which map blocks need to be loaded based on the demand information, location information and index. The target map block and the map blocks that meet the conditions within the first preset range, as well as the grid maps corresponding to the map blocks that meet the conditions within the first preset range are loaded, and a global path search is performed based on the map blocks, and a local search is performed based on the corresponding grid maps.
[0128] A2. Determine whether the robot has reached the boundary of the map block based on the position information. If the robot has reached the boundary, load the map block within the second preset range of the map block in advance.
[0129] In order to avoid robot memory overflow and performance bottleneck, it is also necessary to manage the map blocks loaded into the memory. The LRU (Least Recently Used) cache algorithm is used to manage the map blocks based on their activity (i.e., the frequency or number of times they are loaded). This ensures that only active map blocks remain in the robot's memory and that unused map blocks are unloaded. Specifically, the robot's map block loading frequency is obtained. When the robot's memory reaches the storage limit, map blocks with a loading frequency lower than a first preset value are filtered out and stored in a buffer. When both the robot's memory and the buffer reach the storage limit, map blocks with a loading frequency lower than a second preset value in the buffer are removed or a secondary storage device is added.
[0130] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A block map construction method, characterized in that: The method includes: Constructing a grid map of the robot's moving area, acquiring semantic information based on the actual environment, and constructing a semantic map based on the semantic information; the semantic information includes charging piles, virtual tracks, star points, and no-go areas; Constructing a Voronoi diagram based on the grid map; A topological map is constructed based on the Voronoi map, and a global path map is constructed based on the topological map and the semantic map. The global path map is divided into map blocks of preset sizes, and each map block is assigned an index and stored in the same file; the index is the coordinate point of any vertex in the map block.
2. A block map construction method according to claim 1, characterized in that: The method of constructing the Voronoi diagram is: Traversing the grid map, obtaining coordinate points of all free spaces as potential reference points, sampling the potential reference points, and obtaining reference points; Constructing a Voronoi diagram based on the reference points includes: For each reference point, calculate the perpendicular bisector of the adjacent reference point to generate the Voronoi region of the corresponding reference point; Obtain the intersection of two adjacent perpendicular bisectors among all perpendicular bisectors corresponding to each reference point as the Voronoi vertex; The edges are determined based on the Voronoi vertices, and each edge is checked to see if there is a crossing obstacle. If not, the edge is a Voronoi boundary; if crossed, the edge does not exist.
3. A block map construction method according to claim 2, characterized in that: When obtaining potential reference points, downsampling or clustering algorithms are used to screen the potential reference points.
4. A block map construction method according to claim 2, characterized in that: The sampling method is: Collecting coordinate points from the free space at preset intervals; or, Divide the free space into a plurality of connected regions, and select the centroid or key point of each region; Or, randomly collect a preset number of coordinate points.
5. A block map construction method according to claim 1, characterized in that: The method for constructing a topological map is: Obtaining the Voronoi region and Voronoi boundary of each reference point based on the Voronoi diagram; Extract all connectivity relationships of each Voronoi region based on the Voronoi boundary, and use the Voronoi region as a topological graph node and the connectivity relationship as a topological graph edge; Calculate the actual distance between two connected Voronoi regions and assign edge weights based on the actual distance.
6. A block map construction method according to claim 5, characterized in that: The construction of the topological map also includes optimizing the topological map structure, including: fusing the two Voronoi regions whose actual distance is less than the preset distance into one node, and filtering out edges that the robot cannot access.
7. A block map construction method according to claim 1, characterized in that: The method for dividing the global path map into map blocks of preset sizes is: using a quadtree data structure to divide the global path map into multiple areas.
8. A method for dynamically loading a block map, characterized in that: The block map dynamic loading method dynamically loads the map blocks constructed in claims 1 to 7 during the movement of the robot, comprising: Acquire the robot's demand information and location information in real time, and dynamically load the map blocks that meet the conditions within the first preset range and the grid map corresponding to the map blocks that meet the conditions within the first preset range based on the demand information, location information and index; Based on the position information, it is determined whether the robot has reached the boundary of the map block. If the robot has reached the boundary, a map block within a second preset range of the map block is loaded in advance.
9. A method for dynamically loading a block map according to claim 8, characterized in that: The method further comprises: The frequency of loading map blocks by the robot is obtained. When the robot's memory reaches the storage upper limit, the map blocks with a loading frequency lower than the first preset value are filtered out and stored in the buffer.
10. A method for dynamically loading a block map according to claim 8, characterized in that: The method further includes: when both the memory and the buffer of the robot reach the storage upper limit, the map blocks with a loading frequency lower than a second preset value in the buffer are removed or a secondary memory is added.
Citation Information
Patent Citations
Real-time map construction method and device in large-scale scene based on partitioning
CN115512065A