Repositioning method and device, robot and storage medium
By calculating the score threshold suitable for the current scene at each relocation and fusing the matching score, the problem of point cloud matching technology reducing relocation accuracy in different environments is solved, and the accuracy and adaptability of robot relocation is improved.
Patent Information
- Application Number
- CN202410956647.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-17
- Publication Date
- 2024-11-15
AI Technical Summary
In the prior art, point cloud matching technology based on score thresholds is difficult to meet the relocation requirements in different environments, resulting in a reduction in relocation accuracy.
Relocation results are determined to improve matching success rate and accuracy by calculating the score threshold applicable to the current scene at each relocation and combining point cloud scale and descriptor matching scores.
It improves the repositioning accuracy and adaptability of the robot in different environments, reduces the matching accuracy when the lidar viewing angle range is limited, and is suitable for more application scenarios.
Smart Images

Figure CN118967788A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot positioning technology, and in particular to a repositioning method, device, robot and storage medium. Background Art
[0002] Robot repositioning refers to a technology that repositions and adjusts the current position and posture of a robot while it is performing a task. Repositioning technology can achieve accurate positioning of the robot in complex environments, allowing the robot to better complete tasks. Point cloud matching technology is a technology that can be applied to robot repositioning scenarios. Point cloud matching technology can help robots quickly achieve repositioning.
[0003] Point cloud matching technology determines the matching relationship between point clouds by calculating the matching scores between point clouds, and its judgment standard is the score threshold. However, there are still many problems with the point cloud matching technology based on the score threshold in related technologies. Specifically, in practical applications, it is easy to find that due to the large differences between environments, such as the large differences between indoor and outdoor environments, this difference will lead to the inability to meet the relocation requirements in different environments, thereby affecting the relocation accuracy. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide a repositioning method, device, robot and storage medium to improve the repositioning accuracy of the robot in different environments.
[0005] In a first aspect, an embodiment of the present application provides a repositioning method, the method comprising: obtaining a candidate key frame and a first local map corresponding to the candidate key frame in a historical key frame; calculating the point cloud scale of the current frame point cloud, and determining a score threshold based on the point cloud scale; wherein the score threshold is used to indicate a successful matching criterion between the current frame point cloud and the first local map; matching the current frame point cloud with the first local map to obtain a first matching score; if the first matching score meets the requirement of the score threshold, determining a first target key frame in the candidate key frame, and obtaining a positioning result based on the first target key frame.
[0006] In the implementation process of the above scheme, a score threshold applicable to the current scene is calculated each time relocalization is performed, and then the relocalization result is determined based on the newly calculated score threshold. This is conducive to improving the situation where the relocalization accuracy is reduced due to the use of the same score threshold in multiple environments, thereby helping to improve the relocalization accuracy.
[0007] In an implementation of the first aspect, obtaining a positioning result based on the first target key frame includes: calculating a fusion matching score of the first matching score and the second matching score of the first target key frame; wherein the second matching score is used to characterize the matching score between the descriptor of the first target key frame and the descriptor of the candidate key frame; determining the first target key frame corresponding to the fusion matching score with the highest matching degree as the second target key frame, and obtaining a positioning result based on the second target key frame.
[0008] In the implementation process of the above scheme, the second target key frame with the highest matching degree with the current frame point cloud is selected in the first target key frame by fusing the fusion matching score of the descriptor matching score and the point cloud matching algorithm score, which is beneficial to improve the positioning accuracy of the above relocation method.
[0009] In an implementation manner of the first aspect, calculating the fusion matching score includes: using a first fusion weight and a second fusion weight to fuse the first matching score and the second matching score to obtain the fusion matching score; wherein the first fusion weight and the second fusion weight are respectively used to characterize the credibility of the first matching score and the second matching score.
[0010] In the implementation process of the above scheme, the first matching score and the second matching score are weightedly fused to obtain a fused matching score that can fully characterize the matching degree between the current frame point cloud and the candidate key frame point cloud. On the one hand, it is beneficial to improve the positioning accuracy of the above repositioning method; on the other hand, it reduces the impact of the laser radar on the matching accuracy when it cannot reach the full viewing range, so that the above repositioning method can be applied to more application scenarios, which is beneficial to improving the adaptability of the above repositioning method.
[0011] In an implementation of the first aspect, determining a score threshold based on the point cloud scale includes: determining a linear ratio of the point cloud scale relative to a point cloud scale range of the historical key frame; and performing linear interpolation on a score range corresponding to the point cloud scale range using the linear ratio to obtain a score threshold.
[0012] In the implementation process of the above scheme, linear interpolation is performed using the linear ratio of the current frame point cloud scale to the point cloud scale range of the historical key frames to obtain a score threshold that is applicable to the current scene. On the one hand, the linear interpolation method has a low amount of calculation, which is beneficial to improving the computational efficiency of the above relocation method; on the other hand, the score threshold is determined by the point cloud scale and the score range of the historical key frames, so that the above relocation method can be applied to scenes with a variety of environments, which is beneficial to improving the positioning accuracy and adaptability of the above relocation method.
[0013] In an implementation of the first aspect, the linear interpolation of the score range corresponding to the point cloud scale range using the linear ratio to obtain a score threshold includes: linear interpolation of the score range corresponding to the point cloud scale range using the linear ratio to obtain an initial score threshold; combining a margin coefficient and the initial score threshold to obtain a score threshold; wherein the margin coefficient is used to characterize an adjustment ratio of the initial score threshold.
[0014] In the implementation process of the above scheme, the margin coefficient is used to appropriately increase the score threshold to improve the matching success rate. On the one hand, it is conducive to improving the matching success rate of the above relocation method, thereby improving the positioning efficiency of the above relocation method; on the other hand, it is conducive to improving the positioning accuracy of the above relocation method.
[0015] In an implementation of the first aspect, the calculating the point cloud scale of the current frame point cloud includes: calculating a first cloud scale of the current frame point cloud based on the sum of the distances from each point in the current frame point cloud to the center of the point cloud and the number of points contained in the current frame point cloud.
[0016] In the implementation process of the above scheme, the distance from each point in the point cloud to the center of the point cloud and the number of points contained in the point cloud can be used to determine the point cloud scale of the current frame point cloud. The amount of calculation is small, which is conducive to improving the calculation efficiency of the above relocation method.
[0017] In an implementation of the first aspect, the method further includes: if the first matching score does not meet the requirement of the score threshold, constructing a second local map of the current area; matching the second local map with the global map to obtain a positioning result; wherein the global map is a global map constructed based on the historical key frames.
[0018] In the implementation process of the above scheme, when the first matching score meets the requirement of the score threshold, a second local map of the current area is constructed in real time, and the second local map is matched with the global map until the positioning result is obtained, thereby completing the repositioning, which is beneficial to improving the positioning success rate of the above repositioning method.
[0019] In a second aspect, an embodiment of the present application provides a relocation device, the device comprising:
[0020] A candidate key frame acquisition module, used to acquire candidate key frames and a first local map corresponding to the candidate key frames in historical key frames;
[0021] A score threshold determination module, used to calculate the point cloud scale of the current frame point cloud, and determine the score threshold according to the point cloud scale; wherein the score threshold is used to indicate the matching success standard between the current frame point cloud and the first local map;
[0022] A first matching score acquisition module, used to match the current frame point cloud with the first local map to obtain a first matching score;
[0023] The positioning result acquisition module is used to determine a first target key frame from the candidate key frames when the first matching score meets the requirement of the score threshold, and acquire a positioning result according to the first target key frame.
[0024] In a third aspect, an embodiment of the present application provides a robot, comprising: a mapping unit and a repositioning unit communicating with the mapping unit, wherein:
[0025] The mapping unit is used to construct a local map and / or a global map according to the point cloud data of the robot's environment and the movement and posture information of the robot, and send the local map and / or the global map to the relocation unit;
[0026] The relocation unit is used to execute the method provided by the first aspect or any possible implementation manner of the first aspect.
[0027] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the method provided by the first aspect or any possible implementation of the first aspect is executed.
[0028] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other through the communication bus; the memory stores computer program instructions that can be executed by the processor, and when the computer program instructions are read and run by the processor, the method provided by the first aspect or any possible implementation of the first aspect is executed.
[0029] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the embodiments of the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A schematic diagram of a flow chart of a relocation method provided in an embodiment of the present application;
[0032] Figure 2 A schematic diagram of the structure of a relocation device provided in an embodiment of the present application;
[0033] Figure 3 A schematic diagram of the working principle of a robot when performing repositioning in a certain scenario provided in an embodiment of the present application;
[0034] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] The following will describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and are therefore only used as examples, and cannot be used to limit the scope of protection of the present application.
[0036] In the actual application of robot repositioning technology, the environmental information collected by the robot in indoor and outdoor environments is quite different. Taking the solution of using point cloud matching technology to realize robot repositioning as an example, the applicant found that due to certain differences between indoor and outdoor environments in terms of environmental complexity, lighting conditions, occlusion, and movement of dynamic objects, the collected point cloud information is also quite different. Of course, in addition to the differences between indoor and outdoor environments, there may also be large differences between indoor environments. For example, the environmental information collected when being in a relatively open area indoors and in a corner indoors is also quite different. Therefore, the applicant found that if the same judgment standard is used for multiple environments, that is, the same score threshold is used, the matching accuracy will be reduced, thereby affecting the repositioning accuracy.
[0037] Based on this, an embodiment of the present application provides a repositioning method, which calculates a score threshold applicable to the current scene each time repositioning is performed, and then determines the repositioning result based on the newly calculated score threshold. This is beneficial to improving the situation where the repositioning accuracy is reduced due to the use of the same score threshold in multiple environments, and thus helps to improve the repositioning accuracy.
[0038] The following is a detailed description of the above relocation methods. Figure 1 , an embodiment of the present application provides a relocation method, the method comprising:
[0039] Step S110: obtaining a candidate key frame and a first local map corresponding to the candidate key frame in the historical key frame;
[0040] Step S120: calculating the point cloud scale of the current frame point cloud, and determining a score threshold according to the point cloud scale; wherein the score threshold is used to indicate a successful matching criterion between the current frame point cloud and the first local map;
[0041] Step S130: Match the current frame point cloud with the first local map to obtain a first matching score;
[0042] Step S140: If the first matching score meets the requirement of the score threshold, a first target key frame is determined in the candidate key frames, and a positioning result is obtained according to the first target key frame.
[0043] It can be understood that the above-mentioned historical key frame refers to the frame data of the task area collected by the robot before performing the task, and the information bound to the historical key frame also includes the posture information when the robot collects the frame information.
[0044] The above-mentioned step S110 of obtaining candidate key frames from historical key frames may include:
[0045] Step S111: obtaining the current frame point cloud and the historical key frame point cloud;
[0046] It is understandable that the current frame point cloud can be acquired in real time by the laser radar installed on the robot, and the historical key frame point cloud can be read from the storage module of the robot or from other storage modules (which can be physical storage modules or cloud storage modules) that can transmit data with the robot;
[0047] Step S112: Obtain the first descriptor of the current frame point cloud and the second descriptor of the historical key frame point cloud;
[0048] It can be understood that the first descriptor of the current frame point cloud can be extracted by the descriptor extraction algorithm after the current frame point cloud is obtained, and the second descriptor of the historical key frame point cloud can be extracted by the descriptor extraction algorithm after the historical key frame point cloud is obtained, or the second descriptor bound to the key frame point cloud can be directly read when the key frame point cloud is obtained, in which case the descriptor extraction operation on the key frame point cloud is no longer required;
[0049] The above descriptor can adopt the SC (Scan Context) descriptor with rotation invariance. When calculating the distance between descriptors, the pose deviation between the frame point clouds corresponding to the two descriptors can be obtained, thereby speeding up the relocalization speed.
[0050] Step S113: If the prior initial pose can be obtained, a local search is performed in the historical key frames to obtain candidate key frames;
[0051] It can be understood that the above-mentioned prior initial pose is a preliminary estimate of the pose corresponding to the point cloud of the current frame. If there is a priori initial pose, it can be used as prior knowledge for relocalization;
[0052] In addition, it can be understood that the prior initial pose can be provided by the RTK device or by the map connection information between maps; of course, if the robot is in an outdoor environment, then the RTK device can be preferably used to provide the prior initial pose, and if the robot is in an indoor environment, then the map connection information can be preferably used to provide the prior initial pose;
[0053] The local search may be performed by matching the second descriptor near the prior initial pose with the first descriptor, for example, calculating the distance between the descriptors, and then determining the historical key frames corresponding to the second descriptors within a preset distance threshold as candidate key frames, and the number of candidate key frames may be one or more;
[0054] Step S114: If the prior initial pose cannot be obtained, a global search is performed in the historical key frames to obtain candidate key frames;
[0055] It can be understood that the above-mentioned global search can search for candidate key frames according to a pre-set search range (such as spatial range and / or time range, etc.) and a search strategy (such as comprehensive search, heuristic search or probabilistic search, etc.). For the solution of global search, please refer to the relevant technology, and the embodiments of this application will not be repeated here.
[0056] The scheme of obtaining the first local map according to the candidate key frames in step S110 may include:
[0057] Step S115: Based on the candidate keyframe point cloud data, a first local map corresponding to the candidate keyframe is constructed using, for example, a SLAM-based map construction algorithm, a deep learning-based map construction algorithm, or the like.
[0058] It is understandable that the "first" in the first local map does not limit the number of maps. The number of first local maps is the same as the number of candidate key frames. Figure 1 Correspondingly, when there are multiple candidate key frames, there will also be multiple first local maps.
[0059] There are multiple calculation methods for the point cloud scale in the above step S120, and the information contained therein may include the distribution range and / or distribution density of the point cloud data. The calculation method is, for example: calculating the maximum distance or the minimum distance from a point in the point cloud to the center of the point cloud, and directly using the maximum distance or the minimum distance as the point cloud scale; or, fitting the point cloud data by an ellipse fitting method, obtaining the major axis length or the minor axis length of the fitted ellipse, and determining the major axis length or the minor axis length as the point cloud scale; or, using a machine learning method, taking the point cloud data as input, directly obtaining an estimated value of the point cloud scale.
[0060] The present application embodiment provides a method for calculating the scale of a point cloud, and the specific scheme is as follows:
[0061] As an optional implementation of the above relocation method, the above step S120 calculates the point cloud scale of the current frame point cloud, including: calculating the point cloud scale of the current frame point cloud according to the distance from each point in the current frame point cloud to the point cloud center and the number of points included in the current frame point cloud. This implementation is for example:
[0062] The calculation method of point cloud scale is:
[0063]
[0064] Where n is the number of data points in the point cloud; d i is the distance from each point in the point cloud to the center of the point cloud.
[0065] The above scheme uses the distance from each point in the point cloud to the center of the point cloud and the number of points contained in the point cloud to determine the point cloud scale of the current frame point cloud. The amount of calculation is small, which is conducive to improving the calculation efficiency of the above relocation method.
[0066] It is understandable that different ways of measuring scores may lead to different processing methods. For example, if the score is obtained based on similarity, the higher the score, the higher the match. If the score is obtained based on distance, the lower the score, the higher the match. For the sake of ease of introduction, the subsequent description will be based on the score obtained based on distance.
[0067] The following is an introduction to the scheme of determining the score threshold according to the point cloud scale in step S120:
[0068] As an optional implementation of the above relocalization method, the above step S120 determines the score threshold according to the point cloud scale, including: determining the linear ratio of the point cloud scale of the current frame point cloud to the point cloud scale range of the historical key frame; using the linear ratio to linearly interpolate the score range corresponding to the point cloud scale range of the current frame point cloud to obtain the score threshold. This implementation is for example:
[0069] The score threshold is calculated as:
[0070]
[0071] Among them, σ1 is the minimum value of the point cloud scale in the historical key frame point cloud; σ2 is the maximum value of the point cloud scale in the historical key frame point cloud; ε1 is the matching score between the historical key frame point cloud and the current frame point cloud when the point cloud scale takes the minimum value; ε2 is the matching score between the historical key frame point cloud and the current frame point cloud when the point cloud scale takes the maximum value; (σ-σ 1 ) / (σ2-σ1) is the linear ratio of the point cloud scale of the current frame point cloud to the point cloud scale range.
[0072] In addition, it can be understood that the above ε1 can be averaged after multiple matches, and of course, the above ε2 can also be averaged after multiple matches.
[0073] The above scheme adopts the linear ratio of the current frame point cloud scale to the point cloud scale range of the historical key frame to perform linear interpolation, so as to obtain a score threshold that can be applied to the current scene. On the one hand, the linear interpolation method has a low amount of calculation, which is beneficial to improving the calculation efficiency of the above relocation method; on the other hand, the score threshold is determined by the point cloud scale and the score range of the historical key frame, which realizes the dynamic matching of the score threshold according to the environmental conditions, so that the above relocation method can be applied to scenes with multiple environments, which is beneficial to improving the positioning accuracy and adaptability of the above relocation method.
[0074] The applicant has found that in actual applications, the robot's motion trajectory when performing a task (which can be called the current motion trajectory) may be different from the motion trajectory when building a regional map (which can be called the historical motion trajectory), or the robot's motion trajectory when acquiring the current frame point cloud is different from the motion trajectory when acquiring the historical key frame point cloud. At this time, the following situation will occur: the current frame point cloud is far away from the historical motion trajectory. Since the current frame point cloud may have a certain perspective difference with the historical frame at a distance from the historical motion trajectory, the point cloud matching score becomes high and does not meet the score threshold, resulting in relocation failure. In order to improve the relocation success rate in this case, the embodiment of the present application provides the following solution:
[0075] As an optional implementation of the above relocation method, the above-mentioned linear interpolation of the score range corresponding to the point cloud scale range using a linear ratio to obtain a score threshold includes: linear interpolation of the score range corresponding to the point cloud scale range using a linear ratio to obtain an initial score threshold; combining a margin coefficient and the initial score threshold to obtain a score threshold; wherein the margin coefficient is used to characterize the adjustment ratio of the initial score threshold. This implementation is for example:
[0076]
[0077] Wherein, α is a margin coefficient. In some embodiments of the present application, the value of α is 0.1, that is, the adjustment ratio of the initial score threshold is 10%.
[0078] The above scheme adopts a margin coefficient to appropriately increase the score threshold to improve the matching success rate. On the one hand, it is conducive to improving the matching success rate of the above relocation method, thereby improving the positioning efficiency of the above relocation method; on the other hand, it is conducive to improving the positioning accuracy of the above relocation method.
[0079] In addition, it can be understood that the above-mentioned margin coefficient can be pre-set to a fixed value, or it can be set dynamically. For example, the distance between the position of the current frame and the position of the historical frame can be estimated, thereby estimating the point cloud quality difference between the current frame point cloud and its corresponding historical frame point cloud, and then setting the margin coefficient according to the point cloud quality difference. The greater the difference in point cloud quality, the greater the margin coefficient value. Conversely, the smaller the difference in point cloud weight, the smaller the margin coefficient value.
[0080] It is understandable that point cloud quality involves multiple indicators, including point cloud accuracy, density, integrity, etc. The point cloud quality of the collected point cloud data is related to the distance from the center of the point cloud. Generally, the farther the distance from the center of the point cloud, the worse the point cloud quality. In the above-mentioned scheme for estimating the difference in point cloud quality between the current frame point cloud and its corresponding historical frame point cloud, a fitting method such as neural network fitting can be used to fit the relationship between the distance from the point cloud center and the point cloud quality, where the point cloud quality can be expressed in the form of an indicator, such as one of the indicators such as point cloud accuracy, point cloud density, and point cloud integrity, or a weighted sum of multiple indicators, and then the approximate position corresponding to the current frame point cloud is estimated by the distance between the position corresponding to the previous frame point cloud or the previous few frames of the current frame point cloud and the position corresponding to the corresponding historical frame point cloud, and then the point cloud quality of the current frame point cloud is estimated based on the fitting relationship between the distance from the point cloud center and the point cloud quality, so as to dynamically set the margin coefficient value according to the point cloud quality.
[0081] The following describes a solution for obtaining the first matching score in step S130 and a solution for determining the first target key frame in step S140, which may include:
[0082] First, a point cloud matching algorithm such as an ICP algorithm is used to match the current frame point cloud with the first local map to obtain a first matching score between the current frame point cloud and the first local map;
[0083] The above-mentioned point cloud matching algorithm can adopt a more mature point cloud matching algorithm in the field. For specific implementation methods, please refer to the relevant technology, and the embodiments of this application will not be repeated.
[0084] Secondly, determine whether the first matching score meets the score threshold requirement;
[0085] Taking the distance-based score acquisition method as an example, if the first matching score is less than the score threshold (or not greater than the score threshold), the first matching score meets the requirement of the score threshold;
[0086] Finally, the candidate key frame corresponding to the first matching score that meets the score threshold requirement is determined as the target key frame.
[0087] It is understandable that the "first" in the above-mentioned first matching score and the "second" in the second matching score in the subsequent description are not limitations on the number of matching scores, but limitations on matching scores from different sources. The number of first matching scores is equal to the number of candidate key frames, and each candidate key frame corresponds to a first matching score. Therefore, when judging whether the first matching score meets the requirements of the score threshold, it should be judged separately whether each first matching score meets the requirements of the score threshold. If all first matching scores do not meet the requirements of the score threshold, it is determined that the first matching score does not meet the requirements of the score threshold. Of course, since there may be multiple first matching scores that meet the requirements of the score threshold, the number of first target key frames may also be multiple.
[0088] The following is an introduction to the solution of obtaining the positioning result in step S140:
[0089] It is understandable that if there is only one first target key frame, the positioning result can be directly obtained according to the target key frame.
[0090] The following is an introduction to the solution for obtaining positioning results when there are multiple first target key frames:
[0091] As an optional implementation of the above relocation method, the above step S140 obtains the positioning result according to the first target key frame, including: calculating the fusion matching score of the first matching score and the second matching score of the first target key frame; wherein the second matching score is used to characterize the matching score between the descriptor of the first target key frame and the descriptor of the candidate key frame; determining the first target key frame corresponding to the fusion matching score with the highest matching degree as the second target key frame, and obtaining the positioning result according to the second target key frame. This implementation is for example:
[0092] Calculate the fusion matching score:
[0093] γ=h*ρ+η
[0094] Wherein, h is the second matching score between the descriptor of the first target key frame and the descriptor of the candidate key frame; ρ is the normalization coefficient; η is the matching score between the point cloud of the first target key frame and the point cloud of the current frame, such as the ICP matching score;
[0095] It can be understood that, if the distance-based matching score is used as an example, the lower the matching score, the higher the matching degree. Conversely, if the similarity-based matching score is used as an example, the higher the matching score, the higher the matching degree. According to this rule, the fusion matching score with the highest matching degree can be determined, and the first target key frame corresponding to the fusion matching score is determined as the second target key frame.
[0096] Calculate the current frame pose:
[0097] T=T y *T c *T i
[0098] Where T is the homogeneous transformation matrix; T y T is the pose transformation relationship between the current frame and the candidate key frame obtained during descriptor matching; c is the position transformation relationship between the current frame and the current key frame (which can be understood as the key frame set on the current motion trajectory, similar to the historical key frame in the historical motion trajectory); T i It is the pose transformation relationship between the current frame and the candidate key frame obtained when using the point cloud matching algorithm.
[0099] The above scheme selects the second target key frame with the highest matching degree with the current frame point cloud in the first target key frame by fusing the fusion matching score of the descriptor matching score and the point cloud matching algorithm score, which is conducive to improving the positioning accuracy of the above relocation method.
[0100] In actual applications, the robot may be equipped with other devices, such as a gimbal, a robotic arm, etc., which may result in the laser radar's viewing angle not being able to reach 360 degrees. The descriptor is usually based on the global representation of the point cloud data, and its own accuracy depends on the integrity of the point cloud data. If the laser radar's viewing angle is limited, the point cloud data captured by the laser radar is likely to be incomplete, which will cause the descriptor to be unable to accurately reflect the global features of the point cloud data. When such a descriptor is used for matching, the matching accuracy will be reduced. Based on this, the embodiment of the present application, on the one hand, fuses the descriptor matching score with the matching score of the point cloud matching algorithm, and on the other hand, the embodiment of the present application also provides the following solution:
[0101] As an optional implementation of the above relocation method, the above calculation of the fusion matching score includes: using the first fusion weight and the second fusion weight to fuse the first matching score and the second matching score to obtain the fusion matching score; wherein the first fusion weight and the second fusion weight are used to characterize the credibility of the first matching score and the second matching score, respectively. This implementation is for example:
[0102] Calculate the fusion matching score:
[0103] γ=h*ρ*β+η*δ
[0104] Among them, δ is the first fusion weight, β is the second fusion weight;
[0105] It can be understood that since the second matching score, that is, the matching score based on descriptor matching, has a lower credibility, a smaller weight value can be assigned to the second fusion weight and a larger weight value can be assigned to the first fusion weight; in addition, the value of the above-mentioned first fusion weight can be 1-β.
[0106] The above scheme performs weighted fusion of the first matching score and the second matching score to obtain a fused matching score that can fully characterize the matching degree between the current frame point cloud and the candidate key frame point cloud. On the one hand, it is beneficial to improve the positioning accuracy of the above repositioning method; on the other hand, it reduces the impact of the laser radar on the matching accuracy when it cannot reach the full viewing range, so that the above repositioning method can be applied to more application scenarios, which is beneficial to improving the adaptability of the above repositioning method.
[0107] As an optional implementation of the above-mentioned relocation method, the above-mentioned relocation method may also include: if the first matching score does not meet the requirement of the score threshold, constructing a second local map of the current area; matching the second local map with the global map to obtain a positioning result; wherein the global map is a global map constructed based on historical key frames.
[0108] It can be understood that, since there may be multiple first matching scores, when all first matching scores do not meet the requirement of the score threshold, it is determined that the first matching score does not meet the requirement of the score threshold.
[0109] In addition, the exploration mode can be used to build a second local map of the current area. For example, the exploration mode can be used to move in the current area in an obstacle avoidance manner and build a second local map in real time. Similarly, the matching between the second local map and the global map can also be performed in real time. When the matching is successful and the positioning result is obtained, the exploration mode is stopped.
[0110] The above-mentioned global map may be a global map pre-constructed according to historical key frames, that is, the electronic device executing the above-mentioned repositioning method may obtain a pre-stored global map. Of course, the electronic device executing the above-mentioned repositioning method may also directly construct a global map according to historical key frames.
[0111] The matching between the above-mentioned local map and the global map can be achieved through a point cloud matching algorithm. For the specific implementation method of the point cloud matching algorithm, please refer to the relevant technology, and the embodiments of this application will not be repeated.
[0112] The above scheme constructs a second local map of the current area in real time when the first matching score meets the score threshold requirement, and matches the second local map with the global map until the positioning result is obtained, thereby completing the repositioning, which is beneficial to improving the positioning success rate of the above repositioning method.
[0113] See also Figure 2 Based on the same inventive concept, the embodiment of the present application further provides a relocation device 200, which includes:
[0114] A candidate key frame acquisition module 210 is used to acquire a candidate key frame and a first local map corresponding to the candidate key frame from the historical key frames;
[0115] A score threshold determination module 220, used to calculate the point cloud scale of the current frame point cloud, and determine the score threshold according to the point cloud scale; wherein the score threshold is used to indicate the matching success standard between the current frame point cloud and the first local map;
[0116] A first matching score acquisition module 230, configured to match the current frame point cloud with the first local map to acquire a first matching score;
[0117] The positioning result acquisition module 240 is used to determine a first target key frame from the candidate key frames when the first matching score meets the requirement of the score threshold, and acquire a positioning result according to the first target key frame.
[0118] As an optional implementation of the above-mentioned re-positioning device, the above-mentioned positioning result acquisition module 240 acquires the positioning result according to the first target key frame, including:
[0119] Calculating a fusion matching score of the first matching score and the second matching score of the first target key frame; wherein the second matching score is used to represent the matching score between the descriptor of the first target key frame and the descriptor of the candidate key frame;
[0120] The first target key frame corresponding to the fusion matching score with the highest matching degree is determined as the second target key frame, and a positioning result is obtained according to the second target key frame.
[0121] As an optional implementation of the above-mentioned relocation device, the above-mentioned positioning result acquisition module 240 calculates the above-mentioned fusion matching score, including:
[0122] The first matching score and the second matching score are fused by using a first fusion weight and a second fusion weight to obtain the fused matching score; wherein the first fusion weight and the second fusion weight are used to represent the credibility of the first matching score and the second matching score respectively.
[0123] As an optional implementation of the above-mentioned relocation device, the above-mentioned score threshold determination module 220 determines the score threshold according to the point cloud scale, including:
[0124] Determining a linear ratio of the point cloud scale relative to a point cloud scale range of the historical keyframe;
[0125] The linear ratio is used to perform linear interpolation on the score range corresponding to the point cloud scale range to obtain a score threshold.
[0126] As an optional implementation of the above-mentioned relocation device, the above-mentioned score threshold determination module 220 uses the linear ratio to linearly interpolate the score range corresponding to the point cloud scale range to obtain the score threshold, including:
[0127] Using the linear ratio to perform linear interpolation on the score range corresponding to the point cloud scale range to obtain an initial score threshold;
[0128] The score threshold is obtained by combining the margin coefficient and the initial score threshold; wherein the margin coefficient is used to characterize the adjustment ratio of the initial score threshold.
[0129] As an optional implementation of the above-mentioned relocalization device, the above-mentioned score threshold determination module 220 calculates the point cloud scale of the current frame point cloud, including:
[0130] The first cloud scale of the current frame point cloud is calculated according to the sum of the distances from each point in the current frame point cloud to the center of the point cloud and the number of points included in the current frame point cloud.
[0131] As an optional implementation of the above-mentioned relocation device, the above-mentioned positioning result acquisition module 240 is also used for:
[0132] If the first matching score does not meet the requirement of the score threshold, constructing a second local map of the current area;
[0133] The second local map is matched with the global map to obtain a positioning result; wherein the global map is a global map constructed according to the historical key frames.
[0134] See also Figure 3 Based on the same inventive concept, the embodiment of the present application further provides a robot 300, comprising a mapping unit 310 and a relocation unit 320 communicating with the mapping unit 310, wherein:
[0135] A mapping unit 310 is used to construct a local map and / or a global map according to the point cloud data of the robot's environment and the movement and posture information of the robot, and send the local map and / or the global map to the relocation unit;
[0136] The relocation unit 320 is configured to execute any one of the above relocation methods.
[0137] The above-mentioned mapping unit 310 may include a laser radar 311 and an inertial navigation IMU 312, wherein the laser radar 311 is used to obtain point cloud data of the environment in which the robot 300 is located, including historical key frame point clouds and current frame point clouds; the inertial navigation IMU 312 is used to obtain the robot's motion and posture information, including acceleration information, angular velocity information, posture information, etc.
[0138] See also Figure 3 As an optional implementation of the robot 300, the mapping unit 310 may further include:
[0139] The RTK device 313 is used to provide the location information of the robot 300, such as a priori initial posture information.
[0140] For ease of understanding, detailed steps for relocating the robot 300 in a certain scenario are provided below:
[0141] Step 1: Get the current frame point cloud and historical key frame point cloud;
[0142] Step 2: Obtain the first descriptor of the current frame point cloud and the second descriptor of the historical key frame point cloud; for example, obtain the first descriptor and the second descriptor by downsampling;
[0143] Step 3: If the prior initial pose can be obtained, perform a local search in the historical key frames to obtain candidate key frames;
[0144] If the prior initial pose cannot be obtained, a global search is performed in the historical key frames to obtain candidate key frames;
[0145] Step 4: Obtain a first local map corresponding to the candidate key frame according to the candidate key frame point cloud data; in this scenario, the first local map can be obtained from the mapping unit 310;
[0146] Step 5: Calculate the point cloud scale and score threshold of the current frame point cloud;
[0147] Step 6: Match the current frame point cloud with the first local map to obtain a first matching score;
[0148] Step 7: If the first matching score meets the requirement of the score threshold, a first target key frame is determined from the candidate key frames;
[0149] Step 8: Determine the second target key frame according to the fusion matching score, and obtain the positioning result according to the second target key frame;
[0150] Step nine: If the first matching score does not meet the score threshold requirement, a second local map of the current area is constructed in exploration mode, and the second local map is matched with the global map to obtain a positioning result; wherein the global map is a global map constructed based on historical key frames, and can be a global map constructed by the mapping unit 310 based on historical key frames.
[0151] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application. Figure 4 The electronic device 400 includes: a processor 410, a memory 420 and a communication interface 430. These components are interconnected and communicate with each other through a communication bus 440 and / or other forms of connection mechanisms (not shown).
[0152] The memory 420 includes one or more (only one is shown in the figure), which may be, but not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The processor 410 and other possible components may access the memory 420, and read and / or write data therein.
[0153] The processor 410 includes one or more (only one is shown in the figure), which can be an integrated circuit chip with signal processing capabilities. The above-mentioned processor 410 can be a general-purpose processor, including a central processing unit (CPU), a micro control unit (MCU), a network processor (NP) or other conventional processors; it can also be a special-purpose processor, including a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0154] The communication interface 430 includes one or more (only one is shown in the figure), which can be used to communicate directly or indirectly with other devices to exchange data. For example, the communication interface 430 can be an Ethernet interface; it can be a mobile communication network interface, such as an interface of a 3G, 4G, or 5G network; or it can be other types of interfaces with data transceiving functions.
[0155] One or more computer program instructions may be stored in the memory 420 , and the processor 410 may read and execute these computer program instructions to implement the relocation method and other desired functions provided in the embodiments of the present application.
[0156] Understandably, Figure 4 The structure shown is for illustration only. The electronic device 400 may also include Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown. Figure 4 Each component shown in the figure can be implemented by hardware, software or a combination thereof. For example, the electronic device 400 can be a single server (or other device with computing processing capabilities), a combination of multiple servers, a cluster of a large number of servers, etc., and can be both a physical device and a virtual device.
[0157] The present application also provides a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are read and executed by a computer processor, the relocation method provided by the present application is executed. For example, the computer-readable storage medium can be implemented as Figure 4 The memory 420 in the electronic device 400.
[0158] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0159] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0160] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0161] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0162] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0163] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0164] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0165] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A relocation method, characterized in that: The method comprises: Acquire a candidate key frame and a first local map corresponding to the candidate key frame in the historical key frame; Calculating the point cloud scale of the current frame point cloud, and determining a score threshold according to the point cloud scale; wherein the score threshold is used to indicate a matching success criterion between the current frame point cloud and the first local map; Matching the current frame point cloud with the first local map to obtain a first matching score; If the first matching score meets the requirement of the score threshold, a first target key frame is determined from the candidate key frames, and a positioning result is obtained according to the first target key frame.
2. The relocation method according to claim 1, characterized in that: The obtaining a positioning result according to the first target key frame includes: Calculating a fusion matching score of the first matching score and the second matching score of the first target key frame; wherein the second matching score is used to represent the matching score between the descriptor of the first target key frame and the descriptor of the candidate key frame; The first target key frame corresponding to the fusion matching score with the highest matching degree is determined as the second target key frame, and a positioning result is obtained according to the second target key frame.
3. The relocation method according to claim 2, characterized in that: Calculating the fusion matching score includes: The first matching score and the second matching score are fused by using a first fusion weight and a second fusion weight to obtain the fused matching score; wherein the first fusion weight and the second fusion weight are used to represent the credibility of the first matching score and the second matching score respectively.
4. The relocation method according to claim 1, characterized in that: The step of determining a score threshold according to the point cloud scale includes: Determining a linear ratio of the point cloud scale relative to a point cloud scale range of the historical keyframe; The linear ratio is used to perform linear interpolation on the score range corresponding to the point cloud scale range to obtain a score threshold.
5. The relocation method according to claim 4, characterized in that: The step of using the linear ratio to linearly interpolate the score range corresponding to the point cloud scale range to obtain a score threshold includes: Using the linear ratio to perform linear interpolation on the score range corresponding to the point cloud scale range to obtain an initial score threshold; The score threshold is obtained by combining the margin coefficient and the initial score threshold; wherein the margin coefficient is used to characterize the adjustment ratio of the initial score threshold.
6. The relocation method according to any one of claims 1 to 5, characterized in that: The step of calculating the point cloud scale of the current frame point cloud includes: The first cloud scale of the current frame point cloud is calculated according to the sum of the distances from each point in the current frame point cloud to the center of the point cloud and the number of points included in the current frame point cloud.
7. The relocation method according to any one of claims 1 to 5, characterized in that: The method further comprises: If the first matching score does not meet the requirement of the score threshold, constructing a second local map of the current area; The second local map is matched with the global map to obtain a positioning result; wherein the global map is a global map constructed according to the historical key frames.
8. A repositioning device, characterized in that: The device comprises: A candidate key frame acquisition module, used to acquire candidate key frames and a first local map corresponding to the candidate key frames in historical key frames; A score threshold determination module, used to calculate the point cloud scale of the current frame point cloud, and determine the score threshold according to the point cloud scale; wherein the score threshold is used to indicate the matching success standard between the current frame point cloud and the first local map; A first matching score acquisition module, used to match the current frame point cloud with the first local map to obtain a first matching score; The positioning result acquisition module is used to determine a first target key frame from the candidate key frames when the first matching score meets the requirement of the score threshold, and acquire a positioning result according to the first target key frame.
9. A robot, characterized in that: include: A mapping unit and a relocation unit communicating with the mapping unit, wherein: The mapping unit is used to construct a local map and / or a global map according to the point cloud data of the robot's environment and the movement and posture information of the robot, and send the local map and / or the global map to the relocation unit; The relocation unit is used to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a computer, the computer is caused to perform the method according to any one of claims 1 to 7.
Citation Information
Cited By
Mobile robot repositioning method, device and equipment and storage medium
CN122312749A
A mobile robot repositioning method, device, apparatus and storage medium
CN122312749B
