An indoor positioning method, an electronic device, and a readable storage medium.

By discretizing the solution space of the preset pose and matching candidate poses, the problem of indoor robot initialization localization is solved, achieving efficient and accurate initialization localization.

CN117906599BActive Publication Date: 2025-11-14GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211275937.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-18
Publication Date
2025-11-14
Estimated Expiration
2042-10-18

AI Technical Summary

Technical Problem

Existing technologies, especially grid-based methods, cannot be applied to point cloud maps when initializing robot indoor positioning, leading to difficulties in initial positioning, particularly when the robot first enters the environment and cannot obtain an accurate location.

Method used

By discretizing the solution space within the first threshold range of the preset pose, multiple candidate poses are formed. Sub-maps within the second threshold range of the candidate poses are obtained, and all sub-maps are stitched together to form an initialized laser point cloud map. The candidate poses are traversed for matching, the actual matching distance between the laser point cloud map and the laser point cloud of the current frame is calculated, and the candidate pose corresponding to the minimum value is selected as the initialized pose.

Benefits of technology

It enables accurate initial positioning of robots indoors, improves matching efficiency and accuracy, reduces the impact of environmental changes on positioning, and improves recall rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117906599B_ABST
    Figure CN117906599B_ABST
Patent Text Reader

Abstract

This application discloses an indoor positioning method, an electronic device, and a readable storage medium. The indoor positioning method includes: discretizing the solution space within a first threshold range of a preset pose to form multiple candidate poses; acquiring sub-maps within a second threshold range of the candidate poses and stitching all sub-maps together to form an initialized laser point cloud map; traversing all candidate poses and matching the laser point cloud map with the current frame laser point cloud using each candidate pose as an initial matching value; calculating the actual matching distance between the current frame laser point cloud and the laser point cloud map based on the matching result; and selecting the candidate pose corresponding to the minimum actual matching distance as the initialized pose based on relevant rules. This application obtains an initialized laser point cloud map by acquiring and stitching together sub-maps corresponding to multiple candidate poses, and achieves accurate initial positioning of a robot indoors based on this laser point cloud map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of positioning and navigation technology, and in particular to an indoor positioning method, electronic device, and readable storage medium. Background Technology

[0002] Autonomous navigation has wide applications in robotics and autonomous driving, and localization is the prerequisite and key to autonomous navigation. Currently, for commercial mobile robots, localization typically involves matching real-time LiDAR point clouds with a pre-built environmental map, while simultaneously integrating IMU (Integrated Device Unit) and wheeled odometry. During continuous robot operation, the previous matching result, along with the odometry prediction, is generally used as the initial value for accurate matching and localization. However, when the robot first enters the map, there is no initial value; its precise location on the map is required for subsequent accurate matching and localization. Therefore, initial localization is a crucial technology in robot navigation. Furthermore, most current localization methods for indoor commercial mobile robots are based on grid maps, which are not applicable to point cloud maps. Summary of the Invention

[0003] This application provides at least one indoor positioning method, electronic device, and readable storage medium to achieve accurate initial positioning of a robot indoors based on a laser point cloud map.

[0004] The first aspect of this application provides an indoor positioning method, which includes:

[0005] Discretize the solution space within the first threshold range of the preset pose to form multiple candidate poses;

[0006] Obtain sub-maps within the second threshold range of candidate poses and stitch all sub-maps together to form an initial laser point cloud map;

[0007] Iterate through all candidate poses, using each candidate pose as the initial matching value, and match the laser point cloud map with the laser point cloud of the current frame.

[0008] The actual matching distance between the current frame laser point cloud and the laser point cloud map is calculated based on the matching results between the laser point cloud map and the current frame laser point cloud.

[0009] Based on relevant rules, the candidate pose corresponding to the minimum actual matching distance is selected as the initial pose.

[0010] Optionally, the first threshold range includes a first sub-threshold and a second sub-threshold.

[0011] The step of discretizing the solution space within a first threshold range of a preset pose to form multiple candidate poses includes:

[0012] Obtain multiple first grids in the solution space with the preset pose as the center point in the translation dimension, and the radius of the first grid is the first sub-threshold;

[0013] Obtain multiple second grids in the solution space under the rotation dimension with the preset pose as the center point, and the radius of the second grid is the second sub-threshold;

[0014] Combine all the first and second grids to form multiple candidate poses.

[0015] Optionally, the step of iterating through all candidate poses and using each candidate pose as the initial matching value to match the laser point cloud map with the laser point cloud of the current frame includes:

[0016] The first mapping relationship between the lidar coordinate system and the global coordinate system is obtained based on the candidate pose.

[0017] Based on the first mapping relationship and the first current frame laser point cloud in the lidar coordinate system, obtain the second current frame laser point cloud in the global coordinate system;

[0018] The relative pose of the laser point cloud in the second current frame is obtained by matching the laser point cloud and the laser point cloud map after the transformation of the ICP algorithm.

[0019] The global pose is obtained based on the relative pose and candidate poses.

[0020] Optionally, the step of traversing all candidate poses and matching the laser point cloud map with the laser point cloud of the current frame using each candidate pose as the initial matching value also includes:

[0021] The second mapping relationship between the lidar coordinate system and the global coordinate system is obtained based on global pose.

[0022] Based on the second mapping relationship and the first current frame laser point cloud in the lidar coordinate system, obtain the third current frame laser point cloud in the global coordinate system;

[0023] Based on the laser point cloud map, search points within a preset matching distance for each laser point in the third current frame laser point cloud are obtained; where the preset matching distance is the first sub-threshold.

[0024] Optionally, the step of calculating the actual matching distance between the current frame laser point cloud and the laser point cloud map based on the matching result between the laser point cloud map and the current frame laser point cloud includes:

[0025] Obtain and sum the first distances between all search points and their corresponding laser points to obtain the sum of the first distances;

[0026] The average interior point distance is obtained based on the distance sum and the first sum of all search points;

[0027] Based on the first sum of the numbers and the second sum of the numbers of laser points in the global laser point cloud map, a matching overlap score is obtained;

[0028] The actual matching distance is obtained based on the average inlier distance and the matching overlap score.

[0029] Optionally, the step of selecting the candidate pose corresponding to the minimum actual matching distance as the initial pose based on relevant rules includes:

[0030] Determine whether the actual matching distance is less than the first receiving distance;

[0031] If so, the candidate pose corresponding to the actual matching distance is used as the initial pose.

[0032] Optionally, the step of selecting the candidate pose corresponding to the minimum actual matching distance as the initial pose based on relevant rules further includes:

[0033] In response to the actual matching distance being greater than the first receiving distance, determine whether the actual matching distance is less than the second receiving distance;

[0034] If so, cache the actual matching distance and define the actual matching distance as a valid actual match;

[0035] Sort all valid actual matching distances, obtain the minimum value among all valid actual matching distances, and use the candidate pose corresponding to the minimum value as the initial pose.

[0036] Alternatively, indoor positioning methods may also include:

[0037] Determine the initial pose of the robot to be localized in the global coordinate system;

[0038] The third mapping relationship between the map coordinate system and the lidar coordinate system is obtained based on the initial pose;

[0039] Based on the third mapping relationship and the initial pose, the preset pose in the lidar coordinate system is obtained.

[0040] A second aspect of this application provides an electronic device including a memory and a processor coupled to each other, the processor being used to execute program instructions stored in the memory to implement the above-described indoor positioning method.

[0041] A third aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the aforementioned indoor positioning method.

[0042] The beneficial effects of this application are as follows: Unlike the prior art, this application discretizes the solution space within a first threshold range of a preset pose to obtain multiple candidate poses to be matched; further, it obtains a sub-map within a second threshold range for each candidate pose, and by stitching together all sub-maps, it can obtain a laser point cloud map as initialization; further, it obtains the laser point cloud of the current frame observed by the robot, and traverses all candidate poses, using each candidate pose as the initial matching value to match the laser point cloud map with the laser point cloud of the current frame; further, it calculates the actual matching distance between the laser point cloud of the current frame and the laser point cloud map based on the matching result of the laser point cloud map and the laser point cloud of the current frame; further, it selects the candidate pose corresponding to the minimum value of the actual matching distance based on relevant rules, and uses this candidate pose as the initialization pose, thereby achieving accurate initialization positioning of the robot indoors.

[0043] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0044] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a first flowchart illustrating an embodiment of the indoor positioning method of this application;

[0046] Figure 2 yes Figure 1 A detailed flowchart illustrating the process preceding step S11;

[0047] Figure 3 yes Figure 1 A detailed flowchart of step S11 is shown below;

[0048] Figure 4 yes Figure 1 A detailed flowchart of step S13 in the first embodiment;

[0049] Figure 5 yes Figure 1 A detailed flowchart of the second embodiment of step S13 is shown below;

[0050] Figure 6 yes Figure 1 A detailed flowchart of step S14 is shown below;

[0051] Figure 7 yes Figure 1 A detailed flowchart of step S15 in the first embodiment;

[0052] Figure 8 yes Figure 1 A detailed flowchart of the second embodiment of step S15 is shown below;

[0053] Figure 9 This is a schematic diagram of the framework of an embodiment of the electronic device of this application;

[0054] Figure 10 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation

[0055] To enable those skilled in the art to better understand the technical solutions of this application, the indoor positioning method, electronic device, and readable storage medium provided in this application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It is understood that the described embodiments are merely some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.

[0056] The terms "first," "second," etc., used in this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0057] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the indoor positioning method of this application.

[0058] The indoor positioning method of this application can be executed by an initialization positioning device. For example, the indoor positioning method can be executed by a terminal device, a server, or other processing device. The initialization positioning device can be a user equipment (UE), mobile device, user terminal, terminal, personal digital assistant (PDA), handheld device, computing device, vehicle-mounted device, wearable device, etc. In some possible implementations, the indoor positioning method can be implemented by a processor calling computer-readable instructions stored in memory.

[0059] Specifically, the indoor positioning method of this embodiment may include the following steps:

[0060] Step S11: Discretize the solution space within the first threshold range of the preset pose to form multiple candidate poses.

[0061] The preset pose is the initial pose of the selected robot to be localized. Specifically, the preset pose includes a first coordinate in the translation dimension and a first heading angle in the rotation dimension, defined as (x0, y0, yaw0) respectively. Further, the first threshold range of this application includes a first sub-threshold and a second sub-threshold, where the first sub-threshold corresponds to the translation dimension and the second sub-threshold corresponds to the rotation dimension.

[0062] Specifically, in this embodiment, by discretizing the solution space within the first threshold range of the preset pose, that is, by gridding the solution space, multiple grids centered on the preset pose can be obtained, each grid corresponding to a candidate pose. By further matching all candidate poses, the most accurate candidate pose can be obtained, and the candidate pose can be set as the robot's initial pose.

[0063] Optionally, before performing step S11, the following may also be performed: Figure 2 The steps shown, Figure 2 yes Figure 1 A flowchart illustrating the process preceding step S11. Specifically, it includes the following steps:

[0064] Step S21: Determine the initial pose of the robot to be localized in the global coordinate system.

[0065] In this embodiment, the robot's position on the global map can be determined by dragging the robot icon in the control interface of a remote terminal or a mobile app. This obtains the initial pose of the robot in the global coordinate system. Specifically, the initial pose of the robot in the global coordinate system can be determined by manually clicking on the operable screen.

[0066] Step S22: Obtain the third mapping relationship between the global coordinate system and the lidar coordinate system based on the initial pose.

[0067] Since it is necessary to transform the initial pose in the global coordinate system to the lidar coordinate system, it is necessary to obtain the third mapping relationship between the global coordinate system and the lidar coordinate system based on the initial pose.

[0068] Step S23: Based on the third mapping relationship and the initial pose, obtain the preset pose in the lidar coordinate system.

[0069] Specifically, based on the third mapping relationship obtained in step S32, the initial pose in the global coordinate system is mapped to the lidar coordinate system, thereby obtaining the preset pose in the lidar coordinate system.

[0070] For details on the discretization process of the solution space, please refer to [link / reference]. Figure 3 , Figure 3 yes Figure 1 A detailed flowchart of step S11 is provided. Specifically, it includes the following steps:

[0071] Step S111: Obtain multiple first grids in the solution space with the preset pose as the center point in the translation dimension.

[0072] Since the preset pose includes the first coordinate (x0, y0) of the translation dimension, the solution space is discretized into multiple first grids with the first coordinate (x0, y0) as the center point of the translation dimension, and the radius of the first grid is the first sub-threshold. At this time, the indoor positioning method of this embodiment determines that the resolution in the translation dimension is twice the first sub-threshold to ensure subsequent matching convergence.

[0073] Specifically, in this embodiment, the range of the first grid is set to [-P, P) or (-P, P], that is, the first grid located at the first coordinate (x0, y0) is taken as the center grid, and it expands outward by P-1 times. Optionally, in this embodiment, P is set to 3, and the translation dimension includes the mutually perpendicular first direction x and second direction y, that is, the number of the first grid in the first direction x and the second direction y is 5 each.

[0074] Step S112: Obtain multiple second meshes in the solution space under the rotation dimension, with the preset pose as the center point.

[0075] In this embodiment, since the preset pose includes a first heading angle yaw0 in the rotation dimension, the solution space is discretized into multiple second grids with the first heading angle yaw0 as the center point of the rotation dimension, and the radius of the second grid is a second sub-threshold. Therefore, the indoor positioning method in this embodiment determines the resolution in the rotation dimension to be 0.628 radians to ensure subsequent matching convergence.

[0076] Specifically, in this embodiment, the range of the second grid is set to [-R, R) or (-R, R], that is, with the second grid where the first heading angle yaw0 is located as the center grid, it expands outward by R-1 times. Optionally, in this embodiment, R is set to 2, that is, the number of the second grid in the rotation dimension is 3.

[0077] Step S113: Combine all the first grids and the second grids to form multiple candidate poses.

[0078] Each candidate pose includes a second coordinate in the translation dimension and a second heading angle in the rotation dimension. That is, each candidate pose corresponds to a first grid and a second grid. By combining multiple first grids and second grids, multiple candidate poses can be formed.

[0079] Step S12: Obtain the sub-maps within the second threshold range of the candidate poses, and stitch all the sub-maps together to form the initial laser point cloud map.

[0080] In step S11, after obtaining multiple candidate poses, it is necessary to establish a corresponding laser point cloud map for each candidate pose.

[0081] Specifically, the robot stores a global point cloud map before matching. This global point cloud map consists of a series of uniformly distributed discrete sub-maps. To further improve matching efficiency, the robot searches for sub-maps within a second threshold range of the candidate pose in the global point cloud map, and stitches together all the sub-maps. The resulting local map is used as the initial laser point cloud map. In this embodiment, the second threshold range is set to a 10-meter radius centered on the candidate pose.

[0082] Step S13: Traverse all candidate poses, and use each candidate pose as the initial matching value to match the laser point cloud map with the laser point cloud of the current frame.

[0083] In this embodiment, the current frame laser point cloud observed by the robot is matched with the initialized laser point cloud map obtained in step S12 to obtain matching results corresponding to different candidate poses.

[0084] For details on the process of matching the laser point cloud map with the laser point cloud of the current frame, please refer to [link / reference needed]. Figure 4 , Figure 4 yes Figure 1 A detailed flowchart of step S13 in the first embodiment is shown. Specifically, it includes the following steps:

[0085] Step S131: Obtain the first mapping relationship between the lidar coordinate system and the global coordinate system based on the candidate pose.

[0086] The process of matching the current frame's laser point cloud with the laser point cloud map first requires projecting each laser point in the current frame's laser point cloud onto the laser point cloud map under the current candidate pose. Therefore, it is necessary to first obtain the mapping relationship between the current frame's laser point cloud and the laser point cloud map. Specifically, based on the current candidate pose, the first mapping relationship between the lidar coordinate system and the global coordinate system is obtained, where the global coordinate system is the coordinate system of the laser point cloud map.

[0087] Step S132: Based on the first mapping relationship and the first current frame laser point cloud in the lidar coordinate system, obtain the second current frame laser point cloud in the global coordinate system.

[0088] In this embodiment, the first current frame laser point cloud is the current frame laser point cloud observed by the robot in step S13. The first current frame laser point cloud is mapped to the global coordinate system through the first mapping relationship to obtain the second current frame laser point cloud in the global coordinate system.

[0089] Step S133: Based on the ICP algorithm, match the laser point cloud of the second current frame after conversion with the laser point cloud map to obtain the relative pose of the laser point cloud of the second current frame.

[0090] However, due to projection bias, when the laser point cloud of the current frame is projected onto the laser point cloud map under the current candidate pose, the second current frame laser point cloud in the global coordinate system obtained is biased from the actual pose. Therefore, the ICP algorithm is used to obtain the bias value of the second current frame laser point cloud projected onto the laser point cloud map.

[0091] Specifically, the ICP (Iterative Closest Point) algorithm is an algorithm based on data registration and using the nearest point search method to solve the problem of freeform surfaces. In this embodiment, the ICP algorithm is used to match the transformed second current frame laser point cloud with the laser point cloud map to obtain the relative pose of the second current frame laser point cloud, that is, to obtain the deviation value of the projection of the second current frame laser point cloud onto the laser point cloud map.

[0092] Step S134: Obtain the global pose based on the relative pose and candidate poses.

[0093] In this embodiment, the relative pose and the candidate pose are superimposed to obtain the corrected global pose. Specifically, both the relative pose and the candidate pose are transformation matrices. The corrected global pose can be obtained by multiplying the relative pose and the candidate pose.

[0094] For details on the process of matching the laser point cloud map with the laser point cloud of the current frame, please refer to [link / reference needed]. Figure 5 , Figure 5 yes Figure 1 A detailed flowchart of step S13 in the second embodiment is shown. Specifically, it includes the following steps:

[0095] Step S135: Obtain the second mapping relationship between the lidar coordinate system and the global coordinate system based on the global pose.

[0096] After obtaining the corrected global pose according to steps S131-S134, a second mapping relationship between the lidar coordinate system and the global coordinate system is obtained based on the global pose, wherein the global coordinate system is the coordinate system of the lidar point cloud map.

[0097] Step S136: Based on the second mapping relationship and the first current frame laser point cloud in the lidar coordinate system, obtain the third current frame laser point cloud in the global coordinate system.

[0098] In this embodiment, the first current frame laser point cloud is the current frame laser point cloud observed by the robot in step S13. The first current frame laser point cloud is mapped to the global coordinate system through the first mapping relationship to obtain the third current frame laser point cloud in the global coordinate system.

[0099] Step S137: Based on the laser point cloud map, obtain the search point within the preset matching distance of each laser point in the laser point cloud of the third current frame.

[0100] The preset matching distance can be used as the first sub-threshold. In this embodiment, the search is performed with each laser point in the laser point cloud of the third current frame as the center and the first sub-threshold as the radius.

[0101] Step S14: Calculate the actual matching distance between the laser point cloud in the current frame and the laser point cloud map based on the matching result between the laser point cloud map and the laser point cloud in the current frame.

[0102] Among them, the matching result between the laser point cloud map and the laser point cloud of the current frame is used to calculate the actual matching distance between the laser point cloud of the current frame and the laser point cloud map based on all the search points obtained, that is, to calculate the actual matching distance between the laser point cloud of the third current frame and the laser point cloud map.

[0103] For details on the process of calculating the actual matching distance between the current frame's laser point cloud and the laser point cloud map, please refer to [link / reference needed]. Figure 6 , Figure 6 yes Figure 1 A detailed flowchart of step S14 is provided. Specifically, it includes the following steps:

[0104] Step S141: Obtain and sum the first distances between all search points and their corresponding laser points to obtain the sum of the first distances.

[0105] Specifically, when a search point is found within the preset matching distance of the laser point, the first distance between the search point and the laser point is obtained, and the interior point counter is incremented by one. When the next search point is found, the first distance between the current search point and the laser point is further obtained, and this distance is added to the first distance corresponding to the previous search point, while the interior point counter is incremented by one. This process is repeated until all search points within the preset matching distance have been accumulated. At this point, the sum of the first distances of all search points and the sum of the first counts of all search points can be obtained.

[0106] Step S142: Based on the distance and the first sum of all search points, obtain the average interior point distance.

[0107] The average interior point distance can be calculated by dividing the sum of distances by the sum of the first quantities obtained in step S141.

[0108] Step S143: Obtain the matching overlap score based on the first sum of numbers and the second sum of numbers of laser points in the global laser point cloud map.

[0109] The matching overlap score can be calculated by summing the first number obtained in step S141 with the second number of laser points in the global laser point cloud map.

[0110] Specifically, the matching overlap can be obtained by dividing the first sum by the second sum, which gives the proportion of the search point in the global laser point cloud map.

[0111] Furthermore, in order to increase the matching distance with low overlap and improve matching robustness, this embodiment also needs to perform a nonlinear transformation on the matching overlap to obtain a matching overlap score. The specific transformation formula is as follows:

[0112] overlap_score=(overlap_ratio / 0.9) 2

[0113] Where overlap_score is the matching overlap score, and overlap_ratio is the matching overlap.

[0114] Step S144: Obtain the actual matching distance based on the average inlier distance and the matching overlap score.

[0115] The actual matching distance can be calculated by dividing the average interior point distance obtained in step S142 by the matching overlap score obtained in step S134.

[0116] Step S15: Based on relevant rules, select the candidate pose corresponding to the minimum actual matching distance as the initial pose.

[0117] After obtaining the actual matching distance corresponding to the current candidate pose through step S14, it is necessary to sort the actual matching distances calculated based on multiple candidate poses according to relevant rules, so as to use the candidate pose corresponding to the minimum actual matching distance as the initial pose.

[0118] For details on the process of selecting the candidate pose corresponding to the minimum actual matching distance as the initial pose based on relevant rules, please refer to [link to relevant documentation]. Figure 7 , Figure 7 yes Figure 1A detailed flowchart of step S15 in the first embodiment is shown. Specifically, it includes the following steps:

[0119] Step S151: Determine whether the actual matching distance is less than the first receiving distance.

[0120] In this embodiment, a receiving distance is set. By matching the actual matching distance with the receiving distance, it is determined whether the current candidate pose matches the laser point cloud map.

[0121] Specifically, the receiving distance in this embodiment includes a first receiving distance, which is used to calibrate the maximum matching value between the candidate pose and the laser point cloud map. Specifically, in this embodiment, the first receiving distance is further set to 0.03cm.

[0122] If the actual matching distance is less than the first receiving distance, then the matching value between the current candidate pose and the laser point cloud map is greater than the maximum matching value, indicating that the initial pose is correct, and step S152 is further executed.

[0123] Step S152: If so, use the candidate pose corresponding to the actual matching distance as the initial pose.

[0124] Specifically, when the actual matching distance is determined to be less than the first receiving distance, the candidate pose corresponding to the actual matching distance is used as the initial pose.

[0125] For details regarding the process of selecting the candidate pose corresponding to the minimum actual matching distance as the initial pose based on relevant rules, please refer to the following article. Figure 8 , Figure 8 yes Figure 1 A detailed flowchart of the second embodiment of step S15 is shown. Specifically, it includes the following steps:

[0126] Step S153: In response to the actual matching distance being greater than the first receiving distance, determine whether the actual matching distance is less than the second receiving distance.

[0127] Specifically, if the actual matching distance is greater than the first receiving distance, then if the matching value between the current candidate pose and the laser point cloud map is less than the maximum matching value, then the current candidate pose may be an incorrect initial pose.

[0128] In order to reduce the number of iterations for matching and to cope with the increase in matching distance caused by environmental changes, the receiving distance in this embodiment further includes a second receiving distance. The second receiving distance is used to calibrate the minimum matching value between the candidate pose and the laser point cloud map. Specifically, in this embodiment, the second receiving distance is further set to 0.15cm.

[0129] If the actual matching distance is determined to be less than the second receiving distance, then the matching value between the current candidate pose and the laser point cloud map is determined to be greater than the minimum matching value, which may be the correct initial pose, and then step S154 is executed.

[0130] If the actual matching distance is greater than the second receiving distance, the matching value between the current candidate pose and the laser point cloud map is less than the minimum matching value, which is an incorrect initial pose. In other words, the current candidate pose does not match the laser point cloud map, and the matching of the next candidate pose is performed, i.e., steps S12-S15 are repeated.

[0131] Step S154: If yes, cache the actual matching distance and define the actual matching distance as a valid actual match.

[0132] Specifically, if the actual matching distance is determined to be less than the second receiving distance, the actual matching distance is cached and defined as a valid actual match.

[0133] Step S155: Sort all valid actual matching distances, obtain the minimum value among all valid actual matching distances, and use the candidate pose corresponding to the minimum value as the initial pose.

[0134] Specifically, after the actual matching distance of all candidate poses is matched with the first receiving distance and the second receiving distance, all valid actual matching distances are sorted according to their values, the minimum value among all valid actual matching distances is obtained, and the candidate pose corresponding to the minimum value is determined to be the correct initialization pose, and this candidate pose is used as the initialization pose.

[0135] Furthermore, if the number of valid actual matching distances is zero, the initialization is deemed to have failed, and a positioning failure is reported.

[0136] This application discretizes the solution space within a first threshold range of a preset pose to obtain multiple candidate poses to be matched; further, it obtains a sub-map within a second threshold range of each candidate pose, and by stitching together all the sub-maps, it can obtain a laser point cloud map as initialization, thereby improving matching efficiency by reducing the amount of matching data.

[0137] Furthermore, this application obtains search points within a preset matching distance for each laser point in the current frame laser point cloud observed by the robot through the laser point cloud map; furthermore, by calculating the actual matching distance between the current frame laser point cloud and the laser point cloud map, and matching the actual matching distance with the receiving distance, this application further calculates the matching overlap degree and the matching overlap degree score after calculating the average predetermined distance to obtain the final actual matching distance, which can improve the accuracy and robustness of matching.

[0138] Furthermore, this application obtains the target pose from multiple candidate poses based on the matching results and uses this target pose as the initial pose, thereby achieving accurate initial localization of the robot indoors. The receiving distance in this application includes a first receiving distance and a second receiving distance. When the actual matching distance is determined to be less than the first receiving distance, the current initial matching is considered successful, allowing for early exit from the matching loop and improving matching efficiency. Moreover, when environmental changes cause the calculated actual matching distance to be relatively large, the smallest matching distance result is selected as the final pose by sorting, improving the recall rate (also known as the overall detection rate) of the initial localization.

[0139] This application also provides an electronic device, please refer to... Figure 9 , Figure 9 This is a schematic diagram of the framework of an embodiment of the electronic device of this application. Figure 9 As shown, the electronic device 80 includes a memory 81 and a processor 82 coupled to each other. The processor 82 is used to execute program instructions stored in the memory 81 to implement the steps in any of the above-described indoor positioning method embodiments. In a specific implementation scenario, the electronic device 80 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 80 may also include mobile devices such as laptops and tablets, which are not limited here.

[0140] Specifically, processor 82 controls itself and memory 81 to implement the steps in any of the above-described indoor positioning method embodiments. Processor 82 can also be referred to as a CPU (Central Processing Unit). Processor 82 may be an integrated circuit chip with signal processing capabilities. Processor 82 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 82 can be implemented using integrated circuit chips.

[0141] This application also provides a computer-readable storage medium; please refer to [link to relevant documentation]. Figure 10 , Figure 10 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Figure 10As shown, the computer-readable storage medium 90 stores program instructions 91 that can be executed by a processor. The program instructions 91 are used to implement the steps in any of the above-described indoor positioning method embodiments.

[0142] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0143] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.

[0144] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0145] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0146] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0147] The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. An indoor positioning method, characterized in that, include: Discretize the solution space within the first threshold range of the preset pose to form multiple candidate poses; Obtain sub-maps within the second threshold range of the candidate poses, and stitch all the sub-maps together to form an initialized laser point cloud map; Iterate through all the candidate poses, and use each candidate pose as the initial matching value to match the laser point cloud map with the laser point cloud of the current frame; The actual matching distance between the current frame laser point cloud and the laser point cloud is calculated based on the matching result between the laser point cloud map and the laser point cloud map. Based on relevant rules, the candidate pose corresponding to the minimum value of the actual matching distance is selected as the initial pose; The step of calculating the actual matching distance between the current frame laser point cloud and the laser point cloud map based on the matching result between the laser point cloud map and the current frame laser point cloud includes: Obtain and sum the first distances between all search points and their corresponding laser points to obtain the sum of the first distances; Based on the distance and the first sum of all the search points, the average interior point distance is obtained; Based on the first number and the second number of laser points in the global laser point cloud map, a matching overlap score is obtained; The actual matching distance is obtained based on the average inlier distance and the matching overlap score.

2. The indoor positioning method according to claim 1, characterized in that, The first threshold range includes a first sub-threshold and a second sub-threshold. The step of discretizing the solution space within a first threshold range of the preset pose to form multiple candidate poses includes: Obtain multiple first grids in the solution space under the translation dimension with the preset pose as the center point, and the radius of the first grid is the first sub-threshold; Obtain multiple second grids in the solution space under the rotation dimension with the preset pose as the center point, and the radius of the second grid is the second sub-threshold; All the first grids and the second grids are combined to form multiple candidate poses.

3. The indoor positioning method according to claim 2, characterized in that, The step of traversing all the candidate poses and matching the laser point cloud map with the current frame laser point cloud using each candidate pose as the initial matching value includes: Based on the candidate pose, a first mapping relationship between the lidar coordinate system and the global coordinate system is obtained; Based on the first mapping relationship and the first current frame laser point cloud in the lidar coordinate system, obtain the second current frame laser point cloud in the global coordinate system; The relative pose of the laser point cloud in the second current frame is obtained by matching the laser point cloud transformed by the ICP algorithm with the laser point cloud map. The global pose is obtained based on the relative pose and the candidate pose.

4. The indoor positioning method according to claim 3, characterized in that, The step of traversing all the candidate poses and matching the laser point cloud map with the current frame laser point cloud using each candidate pose as the initial matching value further includes: Based on the global pose, a second mapping relationship between the lidar coordinate system and the global coordinate system is obtained; Based on the second mapping relationship and the first current frame laser point cloud in the lidar coordinate system, obtain the third current frame laser point cloud in the global coordinate system; Based on the laser point cloud map, search points within a preset matching distance for each laser point in the third current frame laser point cloud are obtained; wherein, the preset matching distance is the first sub-threshold.

5. The indoor positioning method according to claim 1, characterized in that, The step of selecting the candidate pose corresponding to the minimum actual matching distance as the initial pose based on relevant rules includes: Determine whether the actual matching distance is less than the first receiving distance; If so, the candidate pose corresponding to the actual matching distance is used as the initial pose.

6. The indoor positioning method according to claim 5, characterized in that, The step of selecting the candidate pose corresponding to the minimum actual matching distance as the initial pose based on relevant rules further includes: In response to the actual matching distance being greater than the first receiving distance, it is determined whether the actual matching distance is less than the second receiving distance; If so, then cache the actual matching distance and define the actual matching distance as a valid actual matching distance; Sort all the effective actual matching distances, obtain the minimum value among all the effective actual matching distances, and use the candidate pose corresponding to the minimum value as the initial pose.

7. The indoor positioning method according to claim 1, characterized in that, The indoor positioning method further includes: Determine the initial pose of the robot to be localized in the global coordinate system; Based on the initial pose, obtain the third mapping relationship between the global coordinate system and the lidar coordinate system; Based on the third mapping relationship and the initial pose, the preset pose in the lidar coordinate system is obtained.

8. An electronic device, characterized in that, It includes a memory and a processor coupled to each other, the processor being used to execute program instructions stored in the memory to implement the indoor positioning method as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the indoor positioning method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Initialization positioning method and device, vehicle and storage medium

    CN113899373A

  • Robot repositioning method and device and robot

    CN114519817A