Method, apparatus, and electronic device for establishing a positioning map
By chunking the laser positioning map and optimizing the nearest neighbor search operation, the problem of wasted map storage resources in autonomous driving is solved, and more efficient map storage and online operation efficiency is achieved.
Patent Information
- Application Number
- CN202210761470.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-06-29
AI Technical Summary
In autonomous driving applications, existing laser positioning maps often have duplicate areas, resulting in wasted map storage resources, especially in large parks or open road scenarios.
By chunking the global positioning map according to the set size, ensure that there are no duplicate areas between different chunking maps, and after the chunking map description file, point cloud and data structure are established offline, the required chunking map information is loaded online to optimize the nearest neighbor search operation.
It effectively reduces the demand for map storage and improves the online operation efficiency of autonomous driving systems, especially in large-scale scenarios.
Smart Images

Figure CN115080678B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving, and particularly to a method, device, and electronic device for establishing a positioning map. Background Art
[0002] In autonomous driving applications, operations such as perception and decision-making planning rely on the pose estimation of the vehicle. Vehicle pose estimation is a key technology in autonomous driving.
[0003] In vehicle pose estimation, a laser positioning map is often collected for the area required by the vehicle to register the current laser point cloud observation with the laser positioning map to obtain the relative pose between the current laser point cloud observation and the laser positioning map. However, the currently established laser positioning map often has duplicate areas, which will cause waste of a large amount of map storage resources when the map is large. Summary of the Invention
[0004] Embodiments of this application provide a method, device, and electronic device for establishing a positioning map to avoid duplicate areas in the positioning map.
[0005] An embodiment of this application provides a method for establishing a positioning map. The method is applied to an electronic device and includes:
[0006] Receiving input parameters input externally, where the input parameters at least include: the current position;
[0007] Loading a saved chunk map description file, and determining a target chunk map position for positioning the current position according to the positions of the respective chunk maps described in the chunk map description file; the chunk maps are obtained by dividing a global positioning map according to a set size, and there are no duplicate areas between different chunk maps;
[0008] Loading target map information corresponding to the target chunk map position, and determining a local positioning map according to the loaded target map information; the target map information at least includes: target chunk map point clouds corresponding to the respective saved target chunk map positions, and target chunk map data structures corresponding to the respective saved target chunk map positions; the local positioning map at least includes: a local positioning map point cloud formed by combining the target chunk map point clouds; and a local positioning map data structure formed by combining the target chunk map data structures; wherein, the local positioning map data structure is used to perform a nearest neighbor search operation on the local positioning map.
[0009] Optionally, the input parameters further include: the number of chunk maps N;
[0010] The determining a target chunk map position for positioning the current position according to the positions of the respective chunk maps described in the chunk map description file includes:
[0011] Determine N target sub-map positions based on the distances between the positions of each sub-map described in the sub-map description file and the current position; the distances between the N target sub-map positions and the current position are less than the distances between the non-target sub-map positions and the current position.
[0012] Optionally, when the target map information includes the target sub-map point cloud, loading the target sub-map point cloud includes:
[0013] If the target sub-map point cloud corresponding to at least one target sub-map position among all the determined target sub-map positions has been loaded, then load the target sub-map point clouds corresponding to the other target sub-map positions that have not been loaded currently; if the target sub-map point cloud corresponding to any target sub-map position has not been loaded, then load the target sub-map point clouds corresponding to each target sub-map position.
[0014] When the target map information includes the target sub-map data structure, loading the target sub-block data structure includes:
[0015] If the target sub-map data structure corresponding to at least one target sub-map position among all the determined target sub-map positions has been loaded, then load the target sub-map data structures corresponding to the other target sub-map positions that have not been loaded currently; if the target sub-map data structure corresponding to any target sub-map position has not been loaded, then load the target sub-map data structures corresponding to each target sub-map position.
[0016] Optionally, after loading the target sub-map point cloud, the method further includes: deleting the loaded non-target sub-maps.
[0017] After loading the target sub-map data structure, the method further includes: deleting the loaded non-target sub-map data structures.
[0018] Optionally, the local positioning map point cloud is determined through the following steps:
[0019] Determine the central position of the local positioning map point cloud; the central position is within the sub-map where the current position is located.
[0020] According to the positions of each target sub-map described in the sub-map description file and the relative position relationship between each target sub-map, splice the target sub-map point clouds corresponding to each target sub-map position into a local positioning map point cloud centered on the central position.
[0021] Optionally, the first position is the position of the vertex closest to the current position on the sub-map where the current position is located.
[0022] Optionally, the local positioning map data structure is determined through the following steps:
[0023] According to the positions of the target sub-map tiles described in the sub-map description file, M adjacent target sub-map data structures are spliced along the first direction to obtain K1 spliced maps, where K1 is the ratio of N to M; M is greater than 1 and less than N; if K1 is greater than 1, then K1 is taken as the current value;
[0024] Determine whether the current value is less than or equal to M. If so, splice the current number of spliced maps along the direction corresponding to the current value to obtain the local positioning map data structure, where the direction corresponding to the current value is different from the direction of the previous splicing, or the direction corresponding to the current value is different from any splicing direction, or the direction corresponding to the current value is the same as the direction of the previous splicing; if not, splice M adjacent spliced maps along the direction corresponding to the current value to obtain K2 spliced maps, where K2 is the ratio of K1 to M; if K2 is greater than 1, take K2 as the current value, and return to the operation of determining whether the current value is less than or equal to M.
[0025] Optionally, the target sub-map data structure is represented by a kdtree structure.
[0026] An embodiment of the present application further provides a positioning map establishment device, which is applied to an electronic device and includes:
[0027] A receiving unit, configured to receive input parameters input externally, where the input parameters at least include: the current position;
[0028] A map establishment unit, configured to load the saved sub-map description file, and determine the target sub-map positions for positioning the current position according to the positions of the sub-maps described in the sub-map description file; the sub-maps are obtained by dividing the global positioning map according to a set size, and there are no overlapping areas between different sub-maps; and,
[0029] Load the target map information corresponding to the target sub-map positions, and determine the local positioning map according to the loaded target map information; the target map information at least includes: the target sub-map point clouds corresponding to the saved target sub-map positions, and the target sub-map data structures corresponding to the saved target sub-map positions; the local positioning map at least includes: the local positioning map point cloud composed of the target sub-map point clouds; and, the local positioning map data structure composed of the target sub-map data structures; where the local positioning map data structure is used to perform a nearest neighbor search operation on the local positioning map.
[0030] An embodiment of the present application further provides an electronic device, which includes a processor and a memory.
[0031] Wherein, the memory is used to store machine-executable instructions;
[0032] The processor is used to read and execute the machine-executable instructions stored in the memory to implement the steps of the above method.
[0033] It can be seen from the above technical solutions that by dividing the global positioning map according to the set size in the embodiment of the present application, it can be ensured that there are no overlapping areas between different divided maps, reducing the storage space required for the map, and the advantages are more obvious for scenarios such as large-scale parks and open roads;
[0034] Furthermore, in this embodiment, by establishing the divided map description file, divided map point cloud, and divided map data structure offline, and loading the required divided map description file, target divided map point cloud, and target divided map data structure online, the nearest neighbor search operation of the map is optimized. The process of establishing the nearest neighbor search data structure online is changed to establishing the nearest neighbor search data structure offline and loading the nearest neighbor search data structure online, improving the online operation efficiency of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.
[0036] Figure 1 It is a flowchart of the method provided by the embodiment of the present application;
[0037] Figure 2 It is a schematic diagram of the divided map loading provided by the embodiment of the present application;
[0038] Figure 3 It is a flowchart of determining the local positioning map point cloud provided by the embodiment of the present application;
[0039] Figure 4 It is a flowchart of determining the local positioning map data structure provided by the embodiment of the present application;
[0040] Figure 5 It is a schematic diagram of the local positioning map data structure provided by the embodiment of the present application;
[0041] Figures 6a to 6e It is another schematic diagram of the local positioning map data structure provided by the embodiment of the present application;
[0042] Figure 7 It is a structure diagram of the device provided by the embodiment of the present application;
[0043] Figure 8Structural diagram of the electronic device provided by the embodiment of the present application. Detailed implementation manners
[0044] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0045] The terms used in the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. The singular forms "a", "the", and "said" used in the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0046] To enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present application and to make the above objects, features, and advantages of the embodiments of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.
[0047] See Figure 1 , Figure 1 Flowchart of the method provided by the embodiment of the present application. As an embodiment, the method is applied to an electronic device. As an embodiment, the electronic device here may be a device such as a PC, and the present embodiment does not specifically limit it.
[0048] As an embodiment, before executing the process shown in Figure 1 , the following step 100 may be first executed: divide the global positioning map according to a set size, and obtain and save the divided map information. Here, the global positioning map refers to the entire positioning map.
[0049] In this embodiment, by dividing the global positioning map according to a set size, it can be ensured that there are no overlapping areas between the finally divided different divided maps. As for the set size, it can be set according to actual needs, and the present embodiment does not specifically limit it. It should be noted that when dividing the global positioning map according to the set size, the size of the last remaining edge block may be smaller than the set size, and this situation is allowed in the present embodiment. In other words, in the present embodiment, the size of the finally obtained divided map only needs to be less than or equal to the set size, and it is not strictly limited that the size of all divided maps is the set size.
[0050] As an embodiment, the above divided map information at least includes: a divided map description file, a divided map point cloud, and a divided map data structure.
[0051] Here, the segmented map description file describes at least the positions of the segmented maps. In this embodiment, for each segmented map, any position in the segmented map, such as the center position of the segmented map, etc., can be specified to represent the position of the segmented map.
[0052] Here, the point cloud of each segmented map is used to describe the spatial position of each point in the segmented map.
[0053] Here, each segmented map has a corresponding segmented map data structure. The segmented map data structure can be a data structure required for nearest neighbor search, such as a data structure kdtree (k-dimensional tree) used in a nearest neighbor search index. Kdtree refers to a data structure that organizes points in a k-dimensional Euclidean space and is a special case of a spatial binary tree.
[0054] It should be noted that in this embodiment, if the segmented map data structure is a linked list or other non-array form, then in this embodiment, when saving the segmented map data structure, the segmented map data structure will be first converted from a linked list or other non-array form to an array form and then saved.
[0055] After that, the above segmented map information can be saved offline. When performing online positioning, as Figure 1 shown, the following steps are executed:
[0056] Step 101, receive input parameters input externally. The input parameters at least include: the current position.
[0057] Optionally, when performing online positioning, the above input parameters input externally will be received. As an embodiment, the input parameters at least include: the position to be located currently (denoted as the current position).
[0058] Step 102, load the saved segmented map description file, and determine the target segmented map position for positioning the current position according to the positions of the segmented maps described in the segmented map description file.
[0059] For the offline saving of the segmented map information described above, in this embodiment, the segmented map description file can be first read from the hard disk storing the segmented map information and stored in the memory, and then the segmented map description file stored in the memory is loaded.
[0060] After loading the chunk map description file, the chunk map description file described above is used to describe the positions of each chunk map. Then, based on the positions of each chunk map described in the chunk map description file, the target chunk map position for positioning the current position can be determined. The target chunk map position here is some positions near the current position. For example, the distance between each target chunk map position and the current position is less than the distance between other non-target chunk map positions and the current position.
[0061] As an embodiment, the above input parameter further includes: the number of chunk maps N. Based on this, in this embodiment, the number of finally determined target chunk map positions can be limited to N. That is, N target chunk map positions are finally determined.
[0062] Step 103: Load the target map information corresponding to the target chunk map position, and determine the local positioning map based on the loaded target map information. The target map information at least includes: the target chunk map point cloud corresponding to the target chunk map position, and the target chunk map data structure corresponding to the target chunk map position. The local positioning map at least includes: the local positioning map point cloud composed of each target chunk map point cloud; and the local positioning map data structure composed of each target chunk map data structure. Among them, the local positioning map data structure is used to perform the nearest neighbor search operation on the local positioning map.
[0063] It can be seen that in this embodiment, when performing online positioning, first, as in step 102, according to the current position, search for multiple required target chunk map positions. Then, when executing to this step 103, the target map information corresponding to the target chunk map position can be loaded, and the local positioning map can be determined based on the loaded target map information. The target map information at least includes: the target chunk map point cloud corresponding to the target chunk map position, and the target chunk map data structure corresponding to the target chunk map position. Correspondingly, the local positioning map at least includes: the local positioning map point cloud composed of each target chunk map point cloud; and the local positioning map data structure composed of each target chunk map data structure. Among them, the local positioning map data structure is used to perform the nearest neighbor search operation on the local positioning map.
[0064] Through Figure 1 As can be seen from the shown process, in the embodiment of the present application, by dividing the global positioning map according to the set size, it can be ensured that there are no overlapping areas between different chunk maps, reducing the storage space required for the map, and the advantages are more obvious for scenarios such as large-scale parks and open roads;
[0065] Further, in this embodiment, by establishing the tiled map description file, tiled map point cloud, and tiled map data structure offline, and loading the required tiled map description file, target tiled map point cloud, and target tiled map data structure online, the map nearest neighbor search operation is optimized. The process of establishing the nearest neighbor search data structure online is changed to the process of establishing it offline and loading it online, improving the online operation efficiency of the algorithm.
[0066] The following describes how to load the target tiled map point cloud and the target tiled map data structure:
[0067] Normally, due to the continuity of vehicle movement, there are a large number of repeated tiled map point clouds in the local positioning map point clouds formed based on different positioning positions. Similarly, there are also a large number of repeated tiled map data structures in the local positioning map data structures formed based on different positioning positions.
[0068] In view of this, this embodiment can use incremental search, that is: if the target tiled map point cloud corresponding to at least one target tiled map position among all the determined target tiled map positions has been loaded, then load the target tiled map point clouds corresponding to the other target tiled map positions that have not been loaded currently, while the target tiled map point clouds corresponding to the loaded target tiled map positions remain unchanged. This can avoid repeatedly loading the same tiled map point cloud and improve the system operation efficiency. Of course, if the target tiled map point cloud corresponding to any one target tiled map position has not been loaded, then load the target tiled map point clouds corresponding to each target tiled map position.
[0069] Similarly, in this embodiment, if the target tiled map data structure corresponding to at least one target tiled map position among all the determined target tiled map positions has been loaded, then load the target tiled map data structures corresponding to the other target tiled map positions that have not been loaded currently. The target tiled map data structures corresponding to the loaded target tiled map positions remain unchanged. This can avoid repeatedly loading the same tiled map data structure and improve the system operation efficiency. Of course, if the target tiled map data structure corresponding to any one target tiled map position has not been loaded, then load the target tiled map data structures corresponding to each target tiled map position.
[0070] As Figure 2 shown, when the positioning position to be located changes from b1 to b2, there will be mostly the same tiled maps. Based on this, when the positioning position to be located becomes b2, a part of the tiled maps loaded at the positioning position b1, such as tiled land Figure 1 to 9, can be continued to be used, so that there is no need to load the tiled land Figure 1From 0 to 9, it is possible to avoid the repeated loading of the same tiled map, improving the system operation efficiency. In view of this, in this embodiment, when the positioning position to be located becomes b2, only the tiled maps 17 to 23 need to be loaded.
[0071] Optionally, to avoid some unnecessary previously loaded tiled maps from affecting the current local positioning map, in this embodiment, after loading the point cloud of the target tiled map, the previously loaded non-target tiled maps can be further deleted, such as deleting the point cloud of the tiled maps 10 to 16; similarly, after loading the data structure of the target tiled map, the previously loaded non-target tiled map data structures can be further deleted, such as deleting the data structures of the tiled maps 10 to 16.
[0072] The following describes how to combine the point clouds of each target tiled map into the point cloud of the local positioning map:
[0073] In this embodiment, as Figure 3 shown, the process of determining the point cloud of the local positioning map may include the following steps:
[0074] Step 301, determine the central position of the point cloud of the local positioning map; the central position is in the tiled map where the current position is located.
[0075] As an embodiment, the central position here may be the position of the vertex closest to the current position on the tiled map where the current position is located.
[0076] Step 302, according to the positions of each target tiled map described in the tiled map description file, and in accordance with the relative position relationship between each target tiled map, splice the point clouds of the target tiled maps corresponding to the positions of each target tiled map into the point cloud of the local positioning map centered on the above central position.
[0077] Finally, through Figure 3 the process shown, the point cloud of the local positioning map can be formed.
[0078] The following describes how to combine the data structures of each target tiled map into the data structure of the local positioning map:
[0079] Refer to Figure 4 , Figure 4 which is the flowchart of the formation of the data structure of the local positioning map provided by the embodiment of the present application. As Figure 4 shown, the process may include the following steps:
[0080] Step 401, according to the positions of each target tiled map described in the tiled map description file, splice the adjacent M target tiled map data structures along the first direction to obtain K1 splicing diagrams, where K1 is the ratio of N to M; M is greater than 1 and less than N.
[0081] The segmented map data structure is represented by a kdtree structure. Since the kdtree structure limits that at most two nodes can be spliced, M here can be 2.
[0082] In this embodiment, the first direction can be set according to actual needs, such as the x direction, the y direction, etc., and this embodiment does not specifically limit it.
[0083] In this embodiment, M adjacent target segmented map data structures refer to the adjacent positions of the target segmented maps corresponding to these M target segmented map data structures.
[0084] As an embodiment, when splicing M adjacent target segmented map data structures along the first direction, it can be executed according to the positions of each target segmented map described in the segmented map description file. For example, for the target segmented map with a previous position, when splicing, its corresponding target segmented map data structure is also in the front. Conversely, for the target segmented map with a later position, when splicing, its corresponding target segmented map data structure is also in the back.
[0085] In addition, since in this embodiment, each target segmented map data structure is finally combined into a local positioning map data structure, that is, a data structure will be finally formed. Therefore, if K1 is equal to 1, the current process ends and this spliced map is determined as the local positioning map data structure. If K1 is greater than 1, continue to execute step 402 until finally forming a data structure as the local positioning map data structure.
[0086] Step 402: If K1 is greater than 1, use K1 as the current value and determine whether the current value is less than or equal to M. If so, execute step 403; if not, execute step 404.
[0087] Step 403: Splice the current number of spliced maps along the direction corresponding to the current value to obtain the local positioning map data structure.
[0088] Here, the direction corresponding to the current value is different from the direction of the previous splicing, or the direction corresponding to the current value is different from any splicing direction, or the direction corresponding to the current value is the same as the direction of the previous splicing, etc. This embodiment does not specifically limit it.
[0089] Through step 403, finally form a data structure as the local positioning map data structure.
[0090] Step 404: Splice M adjacent spliced maps along the direction corresponding to the current value to obtain K2 spliced maps, where K2 is the ratio of K1 to M; if K2 is greater than 1, use K2 as the current value and return to the step of determining whether the current value is less than or equal to M in step 402.
[0091] In this embodiment, M adjacent stitching maps refer to the M stitching maps with the closest positions. Here, the position of a stitching map can be determined according to the target block map positions corresponding to the target block map data structures in the stitching map, such as the average position between the target block map positions corresponding to the target block map data structures in the stitching map, etc. This embodiment does not specifically limit it.
[0092] Through step 404, a data structure will also be finally formed as the local positioning map data structure.
[0093] Through Figure 4 the process shown, a local positioning map data structure is finally formed.
[0094] Taking the target block map data structure represented by the kdtree structure, in this embodiment, based on Figure 4 the process shown, Figure 5 an example is given to show how each kdtree linked list structure is stitched to finally form the local positioning map data structure when the target block map data structure is represented by the kdtree structure. In Figure 5 , B0 to B15 represent the kdtree structures (also called kdtree nodes) that are the target block map data structures. Figure 5 Each kdtree node in it contains information such as the stitching dimension, the upper and lower bounds of this dimension, and its parent and child nodes.
[0095] Figure 5 It mainly expresses the local positioning map data structure formed by stitching the kdtree linked list structure. Correspondingly, this embodiment also provides Figures 6a to 6e how the kdtree space structure shown is stitched to form the local positioning map data structure. As Figure 6a shown, each black cube grid represents a kdtree space structure (also called a kdtree node) that is the target block map data structure. B0 to B15 represent the kdtree nodes that are the target block map data structures, corresponding to Figure 5 the B0 to B15 shown representing the bottom layer of the kdtree linked list. In this embodiment, first, two adjacent kdtree nodes are stitched in the x direction, then B0 and B1 nodes are stitched to form the U0 node, that is, the parent nodes of B0 and B1 are U0, and the child nodes of U0 are B0 and B1. Set the splitting dimension of the U0 node to x, and the splitting upper and lower bounds are respectively the maximum value of the upper bounds and the minimum value of the lower bounds of B0 and B1 in the x dimension. The same applies to other nodes. Finally, as Figure 6b shown. After that, for Figure 6bThe nodes shown are spliced in the y direction. U0 and U2 are spliced into the U8 node, that is, the parent nodes of U0 and U2 are U8, and the child nodes of U8 are U0 and U2. Set the splitting dimension of the U8 node to y, and the upper and lower splitting bounds are the maximum value of the upper bound and the minimum value of the lower bound of U0 and U2 in the y dimension respectively. The same applies to other nodes. Finally, as Figure 6c shown. Repeat the above process, and finally splice to form the entire kdtree, whose root node is U14, that is, the final local positioning map data structure. Finally, as Figure 6e shown. Through this local positioning map data structure, the nearest neighbor search operation for the local positioning map point cloud can be realized.
[0096] In the embodiments of the present application, an autonomous driving device (for example, an autonomous driving vehicle, a drone) determines the local positioning map based on the above embodiments, obtains the pose of the autonomous driving device, and thus performs subsequent autonomous driving, automatic parking, automatic navigation, etc.
[0097] The method provided by the embodiments of the present application has been described above. Next, the device provided by the embodiments of the present application will be described:
[0098] See Figure 7 , Figure 7 which is the structure diagram of the device provided by the embodiments of the present application. This device is applied to an electronic device. As Figure 7 shown, this device may include:
[0099] A receiving unit, configured to receive input parameters input externally, where the input parameters at least include: the current position;
[0100] A map building unit, configured to load a saved chunk map description file, and determine the target chunk map position for positioning the current position according to the positions of the respective chunk maps described in the chunk map description file; the chunk map is obtained by dividing the global positioning map according to a set size, and there is no overlapping area between different chunk maps; and,
[0101] Load the target map information corresponding to the target chunk map position, and determine the local positioning map according to the loaded target map information; the target map information at least includes: the target chunk map point cloud corresponding to each saved target chunk map position, the target chunk map data structure corresponding to each saved target chunk map position; the local positioning map at least includes: the local positioning map point cloud composed of the target chunk map point clouds of each target; and, the local positioning map data structure composed of the target chunk map data structures of each target; wherein, the local positioning map data structure is used to perform the nearest neighbor search operation on the local positioning map.
[0102] Optionally, the input parameters further include: the number of chunk maps N;
[0103] Determining the target tile map position for positioning the current position based on the positions of the respective tile maps described in the tile map description file includes:
[0104] Determining N target tile map positions based on the distances between the positions of the respective tile maps described in the tile map description file and the current position; the distances between the N target tile map positions and the current position are less than the distances between the non-target tile map positions and the current position.
[0105] Optionally, when the target map information includes the target tile map point cloud, loading the target tile map point cloud includes:
[0106] If the target tile map point cloud corresponding to at least one target tile map position among all the determined target tile map positions has been loaded, then loading the target tile map point clouds corresponding to the other target tile map positions that have not been loaded currently; if the target tile map point cloud corresponding to any target tile map position has not been loaded, then loading the target tile map point clouds corresponding to each target tile map position.
[0107] When the target map information includes the target tile map data structure, loading the target tile data structure includes:
[0108] If the target tile map data structure corresponding to at least one target tile map position among all the determined target tile map positions has been loaded, then loading the target tile map data structures corresponding to the other target tile map positions that have not been loaded currently; if the target tile map data structure corresponding to any target tile map position has not been loaded, then loading the target tile map data structures corresponding to each target tile map position.
[0109] Optionally, after loading the target tile map point cloud, the method further includes: deleting the loaded non-target tile maps.
[0110] After loading the target tile map data structure, the method further includes: deleting the loaded non-target tile map data structures.
[0111] Optionally, the local positioning map point cloud is determined through the following steps:
[0112] Determining the central position of the local positioning map point cloud; the central position is within the tile map where the current position is located.
[0113] According to the positions of the respective target tile maps described in the tile map description file and the relative position relationships between the respective target tile maps, splicing the target tile map point clouds corresponding to the respective target tile map positions into a local positioning map point cloud centered on the central position.
[0114] As an example, the first position is the position of the vertex closest to the current position on the tiled map where the current position is located.
[0115] Optionally, the local positioning map data structure is determined through the following steps:
[0116] According to the positions of the target tiled maps described in the tiled map description file, M adjacent target tiled map data structures are spliced along a first direction to obtain K1 spliced maps, where K1 is the ratio of N to M; M is greater than 1 and less than N; if K1 is greater than 1, then K1 is taken as the current value;
[0117] Determine whether the current value is less than or equal to M. If so, splice the current value of spliced maps along the direction corresponding to the current value to obtain the local positioning map data structure, where the direction corresponding to the current value is different from the direction of the previous splicing, or the direction corresponding to the current value is different from any splicing direction, or the direction corresponding to the current value is the same as the direction of the previous splicing; if not, splice M adjacent spliced maps along the direction corresponding to the current value to obtain K2 spliced maps, where K2 is the ratio of K1 to M; if K2 is greater than 1, take K2 as the current value, and return to the operation of determining whether the current value is less than or equal to M.
[0118] Optionally, in this embodiment, the target tiled map data structure is represented by a kdtree structure.
[0119] Thus, the device structure diagram provided by the embodiment of the present application is completed.
[0120] Correspondingly, the embodiment of the present application also provides Figure 7 the hardware structure of the device shown. Refer to Figure 8 , Figure 8 which is the electronic device structure diagram provided by the embodiment of the present application. As Figure 8 shown, the hardware structure may include: a processor and a machine-readable storage medium, and the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above examples of the present application.
[0121] Based on the same inventive concept as the above method, the embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored, and when the computer instructions are executed by a processor, the method disclosed in the above examples of the present application can be implemented.
[0122] Exemplarily, the above machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information, such as executable instructions, data, and so on. For example, the machine-readable storage medium can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or a combination thereof.
[0123] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by an entity or by a product with a certain function. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or a combination of any several of these devices.
[0124] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0125] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, system, or computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program codes.
[0126] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device generate a device for implementing the functions specified in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.
[0127] Moreover, these computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to work in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction device that implements the functions specified in one process Figure 1 or a plurality of processes and / or blocks Figure 1 or a plurality of blocks.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are executed on the computer or other programmable apparatus to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one process Figure 1 or a plurality of processes and / or blocks Figure 1 or a plurality of blocks.
[0129] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.
Claims
1. A method for establishing a positioning map, characterized in that, this method is applied to an electronic device and includes: receiving input parameters input externally, where the input parameters at least include: the current position and the number N of divided maps; loading a saved divided map description file, and determining the target divided map position for positioning the current position according to the positions of the divided maps described in the divided map description file; the divided maps are obtained by dividing a global positioning map according to a set size, and there are no overlapping areas between different divided maps; loading the target map information corresponding to the target divided map position, and determining a local positioning map according to the loaded target map information; the target map information at least includes: the target divided map point cloud corresponding to the target divided map position, the target divided map data structure corresponding to the target divided map position; the local positioning map at least includes: the local positioning map point cloud composed of the target divided map point clouds; and, the local positioning map data structure composed of the target divided map data structures; wherein, the local positioning map data structure is used to perform a nearest neighbor search operation on the local positioning map; the local positioning map data structure is determined through the following steps: According to the positions of the target divided maps described in the divided map description file, splicing the adjacent M target divided map data structures along a first direction to obtain K1 splicing diagrams, where K1 is the ratio of the number N of divided maps to M; M is greater than 1 and less than N; if K1 is greater than 1, take K1 as the current value; determine whether the current value is less than or equal to M, if so, splice the current value of splicing diagrams along the direction corresponding to the current value to obtain the local positioning map data structure, where the direction corresponding to the current value is different from the direction of the previous splicing, or the direction corresponding to the current value is different from any splicing direction, or the direction corresponding to the current value is the same as the direction of the previous splicing; if not, splice the adjacent M splicing diagrams along the direction corresponding to the current value to obtain K2 splicing diagrams, where K2 is the ratio of the current value to M; if K2 is greater than 1, take K2 as the current value, and return to the operation of determining whether the current value is less than or equal to M, where the target divided map data structure is represented by a kdtree structure, and the kdtree structure is a data structure for organizing points in a k-dimensional Euclidean space.
2. The method according to claim 1, characterized in that, the determining of the target divided map position for positioning the current position according to the positions of the divided maps described in the divided map description file includes: determining N target divided map positions according to the distances between the positions of the divided maps described in the divided map description file and the current position respectively; the distances between the N target divided map positions and the current position are less than the distances between the non-target divided map positions and the current position.
3. The method according to claim 1, characterized in that, when the target map information includes the target divided map point cloud, loading the target divided map point cloud includes: If at least one of the target patch map positions corresponding to all the determined target patch map positions has the corresponding target patch map point cloud loaded, then load the target patch map point clouds corresponding to the other target patch map positions that are not currently loaded; if the target patch map point cloud corresponding to any one of the target patch map positions is not loaded, then load the target patch map point clouds corresponding to each target patch map position; When the target map information includes the target patch map data structure, loading the target patch data structure includes: If at least one of the target patch map positions corresponding to all the determined target patch map positions has the corresponding target patch map data structure loaded, then load the target patch map data structures corresponding to the other target patch map positions that are not currently loaded; if the target patch map data structure corresponding to any one of the target patch map positions is not loaded, then load the target patch map data structures corresponding to each target patch map position.
4. The method according to claim 3, wherein, after loading the target patch map point cloud, the method further includes: deleting the non-target patch maps that have been loaded; after loading the target patch map data structure, the method further includes: deleting the non-target patch map data structures that have been loaded.
5. The method according to claim 1, wherein, the local positioning map point cloud is determined through the following steps: Determine the central position of the local positioning map point cloud; the central position is within the patch map where the current position is located; According to the positions of the respective target patch maps described in the patch map description file, and in accordance with the relative position relationship between the respective target patch maps, splice the target patch map point clouds corresponding to the respective target patch map positions into a local positioning map point cloud centered on the central position.
6. The method according to claim 5, wherein, the central position is the position of the vertex on the patch map where the current position is located that is closest to the current position.
7. A positioning map establishment device, wherein, the device is applied to an electronic device and includes: a receiving unit, configured to receive an input parameter input externally, the input parameter at least including: a current position and the number of patch maps N; a map establishment unit, configured to load the saved patch map description file, and determine the target patch map positions for positioning the current position according to the positions of the respective patch maps described in the patch map description file; the patch maps are obtained by partitioning the global positioning map according to a set size, and there are no overlapping regions between different patch maps; and, Load the target map information corresponding to the target chunk map location, and determine the local positioning map based on the loaded target map information; the target map information at least includes: the target chunk map point clouds corresponding to the saved target chunk map locations, and the target chunk map data structures corresponding to the saved target chunk map locations; the local positioning map at least includes: the local positioning map point cloud composed of the target chunk map point clouds; and, the local positioning map data structure composed of the target chunk map data structures; wherein, the local positioning map data structure is used to perform a nearest neighbor search operation on the local positioning map; the local positioning map data structure is determined through the following steps: According to the positions of the target chunk maps described in the chunk map description file, splice the adjacent M target chunk map data structures along the first direction to obtain K1 splicing graphs, where K1 is the ratio of the number of chunk maps N to M; M is greater than 1 and less than N; if K1 is greater than 1, use K1 as the current value; determine whether the current value is less than or equal to M, if so, splice the current value of splicing graphs along the direction corresponding to the current value to obtain the local positioning map data structure, wherein the direction corresponding to the current value is different from the direction of the previous splicing, or the direction corresponding to the current value is different from any splicing direction, or the direction corresponding to the current value is the same as the direction of the previous splicing; if not, splice the adjacent M splicing graphs along the direction corresponding to the current value to obtain K2 splicing graphs, where K2 is the ratio of the current value to M; if K2 is greater than 1, use K2 as the current value, and return to the operation of determining whether the current value is less than or equal to M, wherein the target chunk map data structure is represented by a kdtree structure, and the kdtree structure is a data structure for organizing points in a k-dimensional Euclidean space.
8. An electronic device, characterized in that the electronic device includes: a processor and a memory; wherein, the memory is used to store machine-executable instructions; the processor is used to read and execute the machine-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Map loading method and device based on visual navigation, equipment and storage medium
CN113295160A