Distance measurement error correction method, laser radar, robot and storage medium
By constructing a segmented adaptation error model and error correction method, the problem of omnidirectional ranging deviation of mechanical lidar was solved, achieving accurate compensation for omnidirectional ranging and improving ranging accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN CAMSENSE TECHNOLOGIES CO LTD
- Filing Date
- 2026-02-02
- Publication Date
- 2026-08-04
AI Technical Summary
Mechanical lidar suffers from significant omnidirectional ranging bias during omnidirectional ranging. Existing technologies struggle to achieve accurate compensation for omnidirectional and full-range coverage, resulting in low ranging accuracy.
By acquiring the original measurement data and scanning angle of the lidar, a segmented and adapted error model is constructed. The corresponding error model is selected according to the original measurement distance, and the scanning angle is substituted into the model to obtain the target error value. The original measurement distance is corrected, and the omnidirectional ranging deviation caused by structural, assembly and light-transmitting cover defects is eliminated.
It achieves omnidirectional accurate ranging, improves the ranging accuracy of lidar, and eliminates ranging deviations caused by structural and assembly defects.
Smart Images

Figure CN121613438B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lidar technology, and in particular to a ranging error correction method, lidar, robot, and storage medium. Background Technology
[0002] Mechanical lidar, as a core component for environmental perception, leverages its 360° horizontal scanning capability to comprehensively capture information about the surrounding environment, and is widely used in devices such as intelligent robots and autonomous vehicles. However, in practical applications, mechanical lidar suffers from significant omnidirectional ranging bias due to various factors.
[0003] In related technologies, most solutions for correcting lidar ranging errors focus on a single distance or local angle range, or use a single model to cover the entire scene. This makes it difficult to achieve accurate compensation with omnidirectional and full-range coverage, resulting in low lidar ranging accuracy. Summary of the Invention
[0004] This application aims to provide a ranging error correction method, a lidar, a robot, and a storage medium that can improve the ranging accuracy of lidar.
[0005] In a first aspect, this application provides a ranging error correction method applied to lidar, the method comprising:
[0006] The raw measurement data, raw measurement distance, and current scanning angle output by the lidar to detect the target object are obtained, wherein the raw measurement data includes at least one of the measurement distance and the difference between the energy value and the noise value;
[0007] Select the corresponding target error model from the error models based on the original measured distance;
[0008] Substitute the current scanning angle into the target error model to obtain the target error value;
[0009] The original measured distance is corrected based on the target error value to obtain the target measured distance.
[0010] In some embodiments, the method further includes:
[0011] Set up several calibration targets and several different calibration distances;
[0012] For each calibration distance, the calibration target is scanned, and calibration measurement data at each scanning angle is collected, wherein the calibration measurement data includes at least one of the measurement distance, the difference between the energy value and the noise value;
[0013] The error model is determined based on the scanning angle and the calibration measurement data, and so on, until the error model corresponding to each calibration distance is obtained.
[0014] In some embodiments, the calibration target includes a first calibration target with a corresponding calibration distance of a first calibration distance, and the calibration target further includes a second calibration target with a corresponding calibration distance of a second calibration distance. The provision of a plurality of calibration targets includes:
[0015] A plurality of first calibration targets and a plurality of second calibration targets are set, wherein the first calibration target is a circular calibration target, the second calibration targets are set on the same horizontal plane, and the first calibration distance is less than a first preset threshold, the second calibration distance is greater than a second preset threshold, and the first preset threshold is less than the second preset threshold.
[0016] In some embodiments, determining the error model based on the scanning angle and the calibration measurement data includes:
[0017] Determine the reference angle and the reference data corresponding to the reference angle;
[0018] Target data is obtained based on the calibration measurement data and the reference data, wherein the target data is the difference between the calibration measurement data and the reference data or the target data is the ratio between the calibration measurement data and the reference data;
[0019] The error model is obtained by fitting a function between the target data and the scanning angle.
[0020] In some embodiments, the step of performing function fitting on the target data and the scanning angle to obtain the error model includes:
[0021] Construct the following error model:
[0022] ;
[0023] in, Here, x represents the target data, x represents the scanning angle, and A, B, C, and D are fitting parameters.
[0024] Substitute the target data and the scanning angle into the error model, solve for the fitting parameters, and obtain the error model.
[0025] In some embodiments, substituting the target data and the scanning angle into the error model to solve for the fitting parameters and obtain the error model includes:
[0026] Based on the error model and the least squares method, the following first parameter equation is obtained:
[0027] ;
[0028] Where, inv indicates ( ) Matrix inversion for transpose, parameter matrix , , ;
[0029] Determine the parameter range and traversal interval, wherein the parameter range is the range of values for parameter B;
[0030] Based on the parameter range and the traversal interval, traverse parameter B and substitute each parameter B into the first parameter equation to obtain the corresponding parameter matrix.
[0031] Based on each of the parameter matrices, a target parameter matrix and the corresponding parameter B are determined, wherein the target parameter matrix minimizes the error of the target data;
[0032] Substituting the target parameter matrix and the corresponding parameter B into the error model yields the corresponding parameters A and C.
[0033] In some embodiments, selecting a corresponding target error model from the error models based on the original measured distance includes:
[0034] Using each of the calibration distances as a dividing point, the calibration distances are divided into several continuous distance intervals, wherein each distance interval corresponds to an error model;
[0035] Determine the target distance range in which the original measured distance is located;
[0036] Select the error model corresponding to the target distance interval from the error models as the target error model.
[0037] Secondly, this application provides a lidar system, including:
[0038] At least one processor; and,
[0039] A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the ranging error correction method as described above.
[0040] Thirdly, embodiments of this application provide a robot including the lidar described above.
[0041] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions for causing a computer device to perform the ranging error correction method described above.
[0042] The beneficial effects of this application's embodiments are as follows: Unlike existing technologies, the ranging error correction method provided in this application is applied to lidar. This method first acquires the original measurement data output by the lidar detecting the target object, the original measurement distance, and the current scanning angle. The original measurement data includes at least one of the measurement distance and the difference between the energy value and the noise value. Based on the original measurement distance, a corresponding target error model is selected from the error models. Then, the current scanning angle is substituted into the target error model to obtain the target error value. Finally, the original measurement distance is corrected based on the target error value to obtain the target measurement distance. This ranging error correction method matches the corresponding target error model with the original measurement distance, accurately obtains the target error value at the current scanning angle, and corrects the original measurement distance. It eliminates omnidirectional ranging deviations caused by structural, assembly, and lens cover defects in the lidar, achieving omnidirectional accurate ranging and improving the ranging accuracy of the lidar. Attached Figure Description
[0043] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.
[0044] Figure 1 A flowchart illustrating a ranging error correction method provided in an embodiment of this application;
[0045] Figure 2 A flowchart illustrating a ranging error correction method provided in an embodiment of this application;
[0046] Figure 3 for Figure 2 A flowchart illustrating step S80;
[0047] Figure 4 A schematic diagram of a ranging error correction device provided in an embodiment of this application;
[0048] Figure 5 This is a schematic diagram of the structure of a robot provided in an embodiment of this application. Detailed Implementation
[0049] The present application will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any way. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application. These all fall within the protection scope of the present application.
[0050] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0051] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," and "third" used herein do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.
[0052] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this application. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.
[0053] Furthermore, the technical features involved in the various embodiments of this application described below can be combined with each other as long as they do not conflict with each other.
[0054] Mechanical lidar, as a core component for environmental perception, leverages its 360° horizontal scanning capability to comprehensively capture information about the surrounding environment, and is widely used in devices such as intelligent robots and autonomous vehicles. However, in practical applications, mechanical lidar suffers from significant omnidirectional ranging bias due to various factors.
[0055] Specifically, subtle deviations in the structural design of lidar, unavoidable precision errors during assembly, and defects in the light-transmitting cover during production or use can all lead to significant differences in the measurement data collected by lidar when scanning the same target at different angles. For example, when lidar scans the same fixed obstacle 10 meters away at four angles—0°, 90°, 180°, and 270°—it may obtain different ranging results such as 9.95 meters, 10.08 meters, 9.92 meters, and 10.05 meters. This ranging deviation caused by angle changes directly affects the lidar's accurate judgment of the environment, leading to errors in navigation planning and obstacle avoidance functions of intelligent devices, and in severe cases, even causing safety accidents.
[0056] In related technologies, most solutions for correcting lidar ranging errors focus on a single distance or local angle range, or use a single model to cover the entire scene. These solutions are difficult to achieve accurate compensation for omnidirectional and full-range coverage, and cannot fundamentally solve the aforementioned omnidirectional ranging deviation problem, resulting in low ranging accuracy.
[0057] Based on the above problems, this application provides a ranging error correction method applied to lidar. The method first acquires the original measurement data, original measurement distance, and current scanning angle output by the lidar to detect the target object. The original measurement data includes at least one of the measurement distance and the difference between the energy value and the noise value. The corresponding target error model is selected from the error model according to the original measurement distance. The current scanning angle is then substituted into the target error model to obtain the target error value. Finally, the original measurement distance is corrected according to the target error value to obtain the target measurement distance.
[0058] This ranging error correction method matches the target error model corresponding to the original measured distance, accurately obtains the target error value at the current scanning angle, and corrects the original measured distance. It eliminates the omnidirectional ranging deviation caused by defects in the structure, assembly, and lens cover of the lidar, achieves omnidirectional accurate ranging, and improves the ranging accuracy of the lidar.
[0059] Please see Figure 1 , Figure 1 This is a flowchart illustrating a ranging error correction method provided in an embodiment of this application, as shown below. Figure 1 As shown, the ranging error correction method S100 includes:
[0060] S10. Obtain the raw measurement data, raw measurement distance, and current scanning angle output by the lidar to detect the target object, wherein the raw measurement data includes at least one of the measurement distance, the difference between the energy value and the noise value;
[0061] In some embodiments, the raw measurement data includes energy and noise values. The lidar emits a laser towards the target object, and after reflection, the echo signal is received by the lidar's photosensitive chip. The photosensitive chip contains two regions, region one and region two. Both regions one and region two can detect echo signals, but due to the high energy of echoes from certain materials, the captured energy is easily saturated. To avoid this, one of the two regions is specially processed to reduce the echo energy in that region. Therefore, one region is called the normal region, and the other is called the weak region. The normal region outputs normal data, and the weak region outputs the reduced data.
[0062] In the normal region, the system outputs TOF (Time of Flight) values (which can be directly converted into measurement distance), Peak1 value (normal region energy value), and Noise1 value (normal region noise value). In the weak region, the system outputs Peak2 value (weak region energy value) and Noise2 value (weak region noise value).
[0063] In some embodiments, for ease of calculation, the original measurement data also includes the difference between the energy value and the noise value. That is, the original measurement data includes a first difference or a second difference, where the first difference P1 is Peak1 minus Noise1, and the second difference P2 is Peak2 minus Noise2.
[0064] The raw measurement data may also include the raw measurement distance, which can be calculated based on the TOF value. For example, when a lidar detects a target object, the raw measurement distance corresponding to the TOF value is 650mm.
[0065] The current scanning angle refers to the real-time angle (e.g., 30°) when the lidar scans the target object. It is generally expressed in radians, such as 0.523 rad.
[0066] S20. Select the corresponding target error model from the error models based on the original measured distance;
[0067] The error model is segmented and adapted, meaning that based on the actual ranging range of the lidar, multiple error models are built in advance through calibration experiments. Each error model is precisely matched to a specific distance range to ensure the accuracy of error correction under different distance scenarios.
[0068] In some embodiments, each calibration distance is first divided into several continuous distance intervals using each calibration distance as a dividing point. Each distance interval corresponds to an error model. Then, the target distance interval in which the original measured distance is located is determined. Finally, the error model corresponding to the target distance interval is selected from the error models as the target error model.
[0069] Specifically, during the error model construction phase, several key calibration distances are first set, such as 100mm, 200mm, 300mm, 500mm, 700mm, and 1000mm. Then, using these calibration distances as dividing points, the complete ranging range of the lidar is divided into several continuous and non-overlapping distance intervals, such as (0,100mm), [100mm,200mm), [200mm,300mm), [300mm,500mm), [500mm,700mm), [700mm,1000mm), and above 1000mm.
[0070] Based on the calibration data within the corresponding interval, an error model is obtained through function fitting and optimization. The error model can accurately reflect the correspondence between angle and error within that distance range. Each distance interval corresponds to one error model, and a mapping relationship can be established between the distance interval and the error model, which can be pre-stored on the storage medium.
[0071] When a lidar is used to detect a target object, after obtaining the original measured distance, the distance range in which the original distance lies is determined, and then the error model corresponding to this distance range is selected as the target error model. For example, if the original measured distance is 650mm, then its distance range is [500mm, 700mm), and the error model corresponding to this distance range [500mm, 700mm) is determined as the target error model.
[0072] In the error model construction stage, multiple calibration targets and calibration distances are set to obtain corresponding calibration measurement data. Then, the corresponding error model is obtained by performing function fitting, least squares optimization, and other methods on the calibration measurement data.
[0073] Specifically, such as Figure 2 As shown, the method S100 further includes:
[0074] S60. Set several calibration targets and several different calibration distances;
[0075] The error model is constructed in advance through calibration experiments, and different calibration methods are used for different distance scenarios to ensure the accuracy of the model.
[0076] In some embodiments, a circular calibration target is used for close-range calibration, and a planar target is used for long-range calibration.
[0077] Specifically, the calibration target includes a first calibration target with a corresponding calibration distance of a first calibration distance, and the first calibration target is a circular calibration target with a first calibration distance less than a preset threshold. The calibration target also includes a second calibration target with a corresponding calibration distance of a second calibration distance, the second calibration target is a planar target with a second calibration distance greater than a second preset threshold, and the first preset threshold is less than the second preset threshold.
[0078] The first and second preset thresholds can be set as needed, such as the first preset threshold being 500mm and the second preset threshold being 600mm.
[0079] Therefore, for close-range calibration (≤500mm), a circular calibration target is used. The inner wall of the circular calibration target is made of black target material to avoid excessive backlighting at close range, which could lead to overexposure of the data. Several first calibration distances are set, such as 100mm, 200mm, 300mm, and 500mm. The lidar is placed at the center of the circular calibration target, ensuring that the distance from the lidar's rotation center to all points on the inner wall of the ring is consistent, allowing for the collection of dense 360° angular data. For long-range calibration (>500mm), several planar targets are set on the same horizontal plane, such as three calibration targets. The lidar is mounted on a rotating base, with the center of the rotating base coaxial with the lidar's rotation center. Several second calibration distances are set, such as 700mm and 1000mm.
[0080] S70. For each calibration distance, scan the calibration target and collect calibration measurement data at each scanning angle, wherein the calibration measurement data includes at least one of the measurement distance, the difference between the energy value and the noise value;
[0081] After setting the first and second calibration targets, for each calibration distance, the corresponding calibration target is scanned, and calibration measurement data at each scanning angle is collected.
[0082] For close-range acquisition, the lidar is placed at the center of the ring of each first calibration target, and a 360° rotation scan is initiated to acquire calibration measurement data for each scanning angle. Each scanning angle corresponds to a set of calibration measurement data, which includes TOF, Peak1, Noise1, Peak2, Noise2, P1, and P2.
[0083] For long-distance acquisition, the lidar is aligned with the second calibration target corresponding to each second calibration distance, and the rotating base is controlled to rotate at intervals of 5° to 10°. For each rotation angle, calibration measurement data at that scanning angle is acquired, namely TOF, Peak1, Noise1, Peak2, Noise2, P1 and P2.
[0084] S80. Determine the error model based on the scanning angle and the calibration measurement data, and so on, until the error model corresponding to each calibration distance is obtained.
[0085] An error model is obtained by fitting a function to the scanning angle and calibration measurement data, and then optimizing it using the least squares method.
[0086] Specifically, such as Figure 3 As shown, step S80 includes:
[0087] S81. Determine the reference angle and the reference data corresponding to the reference angle;
[0088] Select a certain angle as the reference angle, such as a certain calibration angle (e.g., π / 3), and extract the reference data baseTOF, baseP1, and baseP2 under this reference angle, where baseP1 = basePeak1 - baseNoise1 and baseP2 = basePeak2 - baseNoise2.
[0089] S82. Obtain target data based on the calibration measurement data and the reference data, wherein the target data is the difference between the calibration measurement data and the reference data or the target data is the ratio between the calibration measurement data and the reference data;
[0090] If the target data is f(x) and the calibration measurement data corresponding to each scanning angle is TOF_i, then the target data f(x) = TOF_i - baseTOF, or f(x) = TOF_i / baseTOF, where TOF_i is the calibration measurement data corresponding to each scanning angle and baseTOF is the TOF corresponding to the reference angle.
[0091] If the target data is f(x) and the calibration measurement data corresponding to each scanning angle is P1_i, then the target data f(x) = P1_i - baseP1, or f(x) = P1_i / baseP1, where P1_i is the calibration measurement data corresponding to each scanning angle and baseP1 is the P1 corresponding to the reference angle.
[0092] If the target data is f(x) and the calibration measurement data corresponding to each scanning angle is P2_i, then the target data f(x) = P2_i - baseP2, or f(x) = P2_i / baseP2, where P2_i is the calibration measurement data corresponding to each scanning angle and baseP2 is the P2 corresponding to the reference angle.
[0093] S83. Perform function fitting on the target data and the scanning angle to obtain the error model.
[0094] The fitting method remains the same regardless of whether the target data is the difference between the calibration measurement data and the reference data, or the ratio between the calibration measurement data and the reference data. Furthermore, the fitting method remains the same regardless of whether the target data is a value related to TOF, or a value related to P1 and P2.
[0095] Based on the target data and scanning angle, trigonometric functions are fitted, and then the least squares method is used for optimization to obtain the fitting parameters in the trigonometric functions, thus obtaining the corresponding error model.
[0096] First, construct the following error model:
[0097] (1)
[0098] in, Here, x represents the scanning angle, and A, B, C, and D are the fitting parameters.
[0099] The fitting parameter B is the frequency, which is related to the structure of the lidar. In some embodiments, B = 2π / π = 2. Parameter A represents the amplitude, which refers to the severity of omnidirectionality. The larger the parameter A, the greater the difference in echo characteristics at different angles. The parameter C value represents the phase, which is the angular difference with the flexible printed circuit board of the lidar. The larger the value, the more the selected reference angle deviates from the angle of the flexible printed circuit board. Parameter D is a constant.
[0100] Next, substitute the target data and scanning angle into the error model, solve for the fitting parameters, and obtain the error model. For example, if the scanning angles are π / 3, π / 2, and π, the corresponding target data are respectively... , as well as Then, substitute each scanning angle and the corresponding target data into formula (1) to solve for each fitting parameter and obtain the error model.
[0101] However, this method yields a poor fit to the error model and is prone to getting trapped in local optima and converging in the wrong direction. This is mainly because gradient descent is sensitive to initial learning values. To improve this, we decouple the parameters through mathematical transformations and then optimize using the least squares method, transforming the above error model into:
[0102] (2)
[0103] in, , In this embodiment, the theoretical value of B is known from the structure of the lidar. As in the above embodiment, B equals 2. Therefore, in this embodiment, the range of values for B can be determined based on the theoretical value of B. B is then iterated within this range, and the corresponding solution is obtained. , and constant term In order to quickly find the optimal solution.
[0104] set up , parameter matrix Establish the matrix relationship according to formula (2):
[0105] f(x)(3)
[0106] Then, based on the least squares method, the following first parameter equation is obtained:
[0107] (4)
[0108] Where, inv indicates ( ) Matrix inversion for transpose, For target data.
[0109] Then, the parameter range and traversal interval are determined, where the parameter range is the range of values for parameter B. Based on the parameter range and traversal interval, parameter B is traversed, and each parameter B is substituted into the first parameter equation to obtain the corresponding parameter matrix. Then, based on each parameter matrix, the target parameter matrix and the corresponding parameter B are determined, where the target parameter matrix minimizes the error of the target data. Finally, the target parameter matrix and the corresponding parameter B are substituted into the error model to obtain the corresponding parameters A and C.
[0110] For example, first define the range of parameter B as the parameter interval [B1, BN], and the traversal interval is... B, the traversal process is executed step by step according to the following rules: first, substitute the initial value B1 into formula (4), and obtain the corresponding parameter matrix through calculation. 1. Targeting B1+ B, B1+ Substituting B into formula (4), we obtain the corresponding parameter matrix. 2. And so on, according to "current parameter value + The iterative logic of "B" continues to traverse until the endpoint value BN is reached. Substituting BN into formula (4) yields the corresponding parameter matrix. N, complete the full interval traversal and obtain N sets of parameter matrices, respectively 1. 2... N.
[0111] After the traversal is complete, for all parameter matrices ( 1. 2... N) Perform error evaluation and select the parameter matrix with the smallest error, which is called the target parameter matrix. j, and simultaneously record the target parameter matrix. The parameter B value corresponding to j is denoted as Bj, and parameter Bj is the parameter B obtained in the j-th iteration of [B1, BN].
[0112] Then, according to formula (1), parameters A and C can be deduced:
[0113] (5)
[0114] (6)
[0115] Where atan2 (H,Q) is the standard solution expression for the four-quadrant arctangent, used to accurately calculate the four-quadrant tangent values corresponding to A and C.
[0116] Substituting the previously recorded target parameter Bj into formula (2) or formula (4) yields the corresponding H and Q. Substituting the obtained H and Q into formula (5) and formula (6) yields the parameters A and C corresponding to the target parameter Bj. The final complete set of fitting parameters is the target parameter Bj, and the parameters based on the target parameter Bj are... j The corresponding H and Q are obtained by formula (2) or formula (4), and the corresponding parameters A and C are obtained by reverse deduction based on formula (5) and (6).
[0117] Therefore, by fitting trigonometric functions and optimizing with the least squares method, the final combination of fitting parameters is obtained, thus yielding the final fitted error model.
[0118] Using the above method, the error model corresponding to each calibration distance can be obtained. In order to enable segmented compensation in the future, the two calibration distances are taken as a distance interval, and the error model corresponding to the upper limit of the distance interval is determined as the error model corresponding to that distance interval.
[0119] For example, the calibration distances are 100mm, 200mm, 300mm, 500mm, 700mm, and 1000mm. These calibration distances are then used as dividing points to divide the area into several continuous and non-overlapping distance intervals, such as (0, 100mm), [100mm, 200mm), and [200mm, 300mm).
[0120] The error model corresponding to the calibration distance less than 100mm is determined as the error model corresponding to (0, 100mm), the error model corresponding to 100mm is determined as the error model corresponding to [100mm, 200mm), and the error model corresponding to 200mm is determined as the error model corresponding to [200mm, 300mm).
[0121] Therefore, by using each calibration distance as a dividing point, continuous distance intervals are divided. The error model corresponding to the upper limit of the distance interval is determined as the error model corresponding to that distance interval, so that the corresponding target error model can be selected based on the original measured distance.
[0122] S30. Substitute the current scanning angle into the target error model to obtain the target error value;
[0123] S40. Correct the original measured distance based on the target error value to obtain the target measured distance.
[0124] The target error value is obtained by substituting the current scanning angle into the target error model. If the error model is a difference type, meaning the target data is the difference between the calibration measurement data and the reference data, then the target error value is subtracted from the original measurement data to obtain the first correction value. If the error model is a ratio type, meaning the target data is the ratio between the calibration measurement data and the reference data, then the target error value is divided by the original measurement data to obtain the second correction value.
[0125] The first or second correction value is the corrected data. For example, if the error model is difference-based, the original measurement data is TOF, and the target error value is... Then the first correction value = TOF - The first correction value is the corrected TOF. If the error model is a ratio type, then the second correction value = TOF / The second correction value is the corrected TOF. If the original measurement data is P1 or P2, the method for calculating the first and second correction values is the same as that for TOF. In this case, both the first and second correction values represent the corrected P1 or the corrected P2.
[0126] By inputting TOF, P1, and P2 into a distance calibration system, the final measured distance can be obtained. To eliminate omnidirectional error, corrected data is input into the same system to obtain the final target measured distance after error correction. If the original measurement data is TOF, the target measured distance is obtained based on the corrected TOF value, the original P1 value, and the original P2 value; or, if the original measurement data is P1, the target measured distance is obtained based on the original measured distance, the corrected P1 value, and the original P2 value; or, if the original measurement data is P2, the target measured distance is obtained based on the original measured distance, the corrected P2 value, and the original P1 value; or, if the original measurement data is TOF, P1, and P2, the target measured distance is obtained based on the corrected TOF, the corrected P1, and the corrected P2. This target measured distance is the final measured distance, which has eliminated angular deviations and has higher ranging accuracy.
[0127] In summary, this ranging error correction method matches the target error model corresponding to the original measured distance, accurately obtains the target error value at the current scanning angle, corrects the original measured distance, eliminates omnidirectional ranging deviations caused by defects in the structure, assembly, and lens cover of the lidar, achieves omnidirectional accurate ranging, and improves the ranging accuracy of the lidar.
[0128] Please see Figure 4 , Figure 4 This is a schematic diagram of a ranging error correction device provided in an embodiment of this application. Specifically, the ranging error correction device is applied to one or more processors of the LiDAR.
[0129] like Figure 4 As shown, the ranging error correction device 200 includes: an acquisition module 201, a selection module 202, a substitution module 203, and a correction module 204.
[0130] The acquisition module 201 is used to acquire the original measurement data, original measurement distance, and current scanning angle output by the lidar to detect the target object. The original measurement data includes at least one of the measurement distance and the difference between the energy value and the noise value. The selection module 202 is used to select the corresponding target error model from the error model according to the original measurement distance. The substitution module 203 is used to substitute the current scanning angle into the target error model to obtain the target error value. The correction module 204 is used to correct the original measurement distance according to the target error value to obtain the target measurement distance.
[0131] In the embodiments of this application, the ranging error correction device can also be constructed from hardware devices. For example, the ranging error correction device can be constructed from one or more chips, and the chips can work together to complete the ranging error correction method described in the above embodiments. As another example, the ranging error correction device can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.
[0132] The ranging error correction device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0133] The ranging error correction device provided in this application embodiment can realize all the processes that the above ranging error correction method can achieve. To avoid repetition, it will not be described again here.
[0134] It should be noted that the above-described ranging error correction device can execute the ranging error correction method provided in the embodiments of this application, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments of the ranging error correction device can be found in the ranging error correction method provided in the embodiments of this application.
[0135] This application also provides a robot; please refer to [link / reference]. Figure 5 , Figure 5 This is a schematic diagram of the hardware structure of a robot provided in an embodiment of this application.
[0136] like Figure 5 As shown, the robot 300 includes at least one processor 301, a memory 302, and a lidar 303 connected in communication. Figure 5 (Taking a bus connection and a single processor as an example).
[0137] The processor 301 provides computing and control capabilities to control the robot 300 to perform corresponding tasks, such as controlling the robot 300 to perform the ranging error correction method in any of the above method embodiments. The method includes taking the original measurement data output by the lidar to detect the target object, the original measurement distance, and the current scanning angle. The original measurement data includes at least one of the measurement distance and the difference between the energy value and the noise value. The corresponding target error model is selected from the error model according to the original measurement distance. The current scanning angle is then substituted into the target error model to obtain the target error value. Finally, the original measurement distance is corrected according to the target error value to obtain the target measurement distance.
[0138] In this embodiment, the robot matches the target error model corresponding to the original measured distance to accurately obtain the target error value at the current scanning angle, and corrects the original measured distance. This eliminates the omnidirectional ranging deviation caused by defects in the structure, assembly, and lens cover of the lidar, thereby achieving omnidirectional accurate ranging and improving the ranging accuracy of the lidar.
[0139] Processor 301 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0140] The memory 302, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the ranging error correction method in the embodiments of this application. The processor 301 can implement the ranging error correction method in any of the above method embodiments by running the non-transitory software programs, instructions, and modules stored in the memory 302. To avoid repetition, it will not be described again here.
[0141] Specifically, memory 302 may include volatile memory (VM), such as random access memory (RAM); memory 302 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), solid-state drive (SSD), or other non-transitory solid-state storage devices; memory 302 may also include combinations of the above types of memory.
[0142] In this embodiment, memory 302 may further include memory remotely configured relative to the processor, and this remote memory may be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0143] In this embodiment, the robot 300 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The robot 300 may also include other components for implementing device functions, which will not be described in detail here.
[0144] This application also provides a computer-readable storage medium, such as a memory including program code, which can be executed by a processor to complete the ranging error correction method in the above embodiments. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CDROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0145] This application also provides a computer program product comprising one or more lines of program code stored in a computer-readable storage medium. A processor of an electronic device reads the program code from the computer-readable storage medium and executes the program code to complete the method steps of the ranging error correction method provided in the above embodiments.
[0146] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0147] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of this application as described above, which are not provided in detail for the sake of brevity; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method of range error correction, the method comprising: Applied to lidar, the method includes: The raw measurement data, raw measurement distance, and current scanning angle output by the lidar to detect the target object are obtained, wherein the raw measurement data includes at least one of the measurement distance and the difference between the energy value and the noise value; Select the corresponding target error model from the error models based on the original measured distance; Substitute the current scanning angle into the target error model to obtain the target error value; A correction value is obtained based on the original measurement data and the target error value; The correction value is input into the distance calibration system to obtain the target measurement distance; Set up several calibration targets and several different calibration distances; For each calibration distance, the calibration target is scanned, and calibration measurement data at each scanning angle is collected, wherein the calibration measurement data includes at least one of the measurement distance, the difference between the energy value and the noise value; Determine the reference angle and the reference data corresponding to the reference angle; Target data is obtained based on the calibration measurement data and the reference data, wherein the target data is the difference between the calibration measurement data and the reference data or the target data is the ratio between the calibration measurement data and the reference data; The target data and the scanning angle are fitted with a function to obtain the error model. This process is repeated until the error model corresponding to each calibration distance is obtained.
2. The method of claim 1, wherein, The calibration target includes a first calibration target with a corresponding calibration distance of the first calibration distance. The calibration target also includes a second calibration target with a corresponding calibration distance of the second calibration distance. The provision of setting several calibration targets includes: A plurality of first calibration targets and a plurality of second calibration targets are set, wherein the first calibration target is a circular calibration target, the second calibration targets are set on the same horizontal plane, and the first calibration distance is less than a first preset threshold, the second calibration distance is greater than a second preset threshold, and the first preset threshold is less than the second preset threshold.
3. The method of claim 1, wherein, The step of fitting a function between the target data and the scanning angle to obtain the error model includes: Construct the following error model: ; in, Here, x represents the target data, x represents the scanning angle, and A, B, C, and D are fitting parameters. Substitute the target data and the scanning angle into the error model, solve for the fitting parameters, and obtain the error model.
4. The method of claim 3, wherein, The step of substituting the target data and the scanning angle into the error model and solving for the fitting parameters to obtain the error model includes: Based on the error model and the least squares method, the following first parameter equation is obtained: ; Where, inv indicates ( ) Matrix inversion for transpose, parameter matrix , , ; Determine the parameter range and traversal interval, wherein the parameter range is the range of values for parameter B; Based on the parameter range and the traversal interval, traverse parameter B and substitute each parameter B into the first parameter equation to obtain the corresponding parameter matrix. Based on each of the parameter matrices, a target parameter matrix and the corresponding parameter B are determined, wherein the target parameter matrix minimizes the error of the target data; Substituting the target parameter matrix and the corresponding parameter B into the error model yields the corresponding parameters A and C.
5. The method according to claim 1, characterized in that, The step of selecting the corresponding target error model from the error model based on the original measured distance includes: Using each of the calibration distances as a dividing point, the calibration distances are divided into several continuous distance intervals, wherein each distance interval corresponds to an error model; Determine the target distance range within which the original measured distance lies; Select the error model corresponding to the target distance interval from the error models as the target error model.
6. A lidar, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the ranging error correction method as described in any one of claims 1-5.
7. A robot, characterized in that, include: The lidar as described in claim 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer device to perform the ranging error correction method as described in any one of claims 1-5.