Calibration methods, ranging methods, lidar and robots
Patent Information
- Application Number
- CN202310611279.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2043-05-26
AI Technical Summary
[0004]本申请实施例提供了一种标定方法、测距方法、激光雷达及机器人,能够解决全区域标定精度不高和/或仅采用白靶材质进行标定导致测距精度出现偏差的问题,以提高激光雷达的标定精度与测距精度
[0058]本申请实施例的有益效果是:区别于现有技术的情况下,本申请实施例提供一种标定方法,该标定方法应用于激光雷达,标定方法包括:获取不同材质的标定靶对应的光斑中心值;根据激光雷达的量程范围内的每一个标定子段中每个标定靶与激光雷达的理论距离值,以及每一个标定子段中每一种材质的标定靶对应的光斑中心值,确定每一种材质的标定靶对应的若干个分段标定参数。
Smart Images

Figure CN116679289B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lidar technology, and particularly to a calibration method, a ranging method, lidar, and a robot. Background Technology
[0002] LiDAR is a device capable of measuring information such as the distance, orientation, height, and speed of a target, and it is widely used in robotics. Before operating normally, LiDAR typically needs to be calibrated using a calibration target to obtain calibration parameters that can be used to correct the measured distance.
[0003] Currently, calibration is performed using only one type of white target material, requiring the target to be positioned at a preset distance. The parameters obtained from each target are then fitted to obtain the calibration parameters. However, using only a white target material for calibration means that when the lidar measures objects of other materials, it still uses the white target material's calibration parameters, leading to deviations in ranging accuracy. Furthermore, since lidar has a wide range, the parameters must meet a certain ranging error across the entire range during fitting. Obviously, a single set of parameters cannot achieve excellent accuracy for all distances within the full range, thus sacrificing some ranging accuracy at the calibration target. Summary of the Invention
[0004] This application provides a calibration method, a ranging method, a lidar, and a robot, which can solve the problems of low calibration accuracy across the entire area and / or deviations in ranging accuracy caused by using only white target material for calibration, thereby improving the calibration and ranging accuracy of lidar.
[0005] The embodiments of this application provide the following technical solutions:
[0006] In a first aspect, embodiments of this application provide a calibration method applied to lidar, the calibration method comprising:
[0007] Obtain the center value of the light spot corresponding to the calibration target of different materials;
[0008] Based on the theoretical distance between each calibration target and the lidar in each calibration segment within the lidar's measurement range, and the spot center value corresponding to each type of material calibration target in each calibration segment, several segment calibration parameters corresponding to each type of material calibration target are determined.
[0009] In some embodiments, obtaining the spot center value corresponding to calibration targets of different materials includes:
[0010] Select a calibration target as the zero-degree angle correction target;
[0011] The point cloud corresponding to the zero-degree angle correction target is fitted to obtain the point cloud line;
[0012] The difference of zero degrees is obtained by comparing the point cloud line with the standard line of the zero-degree angle correction target. The difference of zero degrees is the angle between the point cloud line and the standard line of the zero-degree angle correction target.
[0013] Based on the difference of zero-degree angle, obtain point clouds within a preset range of preset angles corresponding to several calibration targets of different materials;
[0014] Based on the point cloud, determine the center value of the light spot corresponding to each calibration target.
[0015] In some embodiments, based on the theoretical distance between each calibration target and the lidar in each calibration segment within the lidar's measurement range, and the spot center value corresponding to each type of material calibration target in each calibration segment, several segmented calibration parameters corresponding to each type of material calibration target are determined, including:
[0016] Select a calibration segment and choose a calibration target of a certain material;
[0017] An overdetermined equation is constructed based on the center value of the light spot corresponding to the selected material of the calibration target in the selected calibration sub-segment and the theoretical distance between the selected material of the calibration target and the lidar.
[0018] Solving the overdetermined equations yields the segmented calibration parameters of the calibration target with selected material in the calibration sub-segments, where each calibration sub-segment corresponds to a set of segmented calibration parameters.
[0019] In some embodiments, the method further includes:
[0020] Calibration was performed on calibration targets of different materials to obtain full-area calibration parameters for each type of calibration target, including:
[0021] Select a calibration target of a certain material, and set multiple calibration targets of the selected material within the range of the lidar according to a preset distance step size;
[0022] Determine the theoretical distance between the calibration target of each selected material and the lidar;
[0023] The full-area calibration parameters corresponding to the calibration targets of each selected material are obtained by solving the overdetermined equation composed of the theoretical distance value and the center value of the light spot for each selected material calibration target. Each material calibration target corresponds to one full-area calibration parameter and several segmented calibration parameters.
[0024] In some embodiments, the calibration target includes a first material calibration target, a second material calibration target, and a third material calibration target, and the method further includes:
[0025] Obtain the brightness value corresponding to the calibration target of each material;
[0026] Based on the theoretical distance and brightness values between each calibration target and the lidar, the distance-brightness curve corresponding to each type of calibration target is obtained.
[0027] The average value of the ordinate corresponding to the same abscissa value of each of the two adjacent distance-brightness curves is taken to obtain the first material brightness threshold line and the second material brightness threshold line.
[0028] Secondly, embodiments of this application provide a ranging method applied to lidar, the ranging method comprising:
[0029] Collect point cloud data generated when measuring an object with lidar, and determine the material type of the object based on the point cloud data;
[0030] Based on the material type of the object to be tested, determine the corresponding calibration parameters for the object to be tested. The calibration parameters include full-area calibration parameters and segmented calibration parameters.
[0031] The distance between the object under test and the lidar is calculated based on the point cloud data and the full-area calibration parameters.
[0032] Determine the calibration segment corresponding to the distance within the range of the lidar;
[0033] Based on the segmented calibration parameters corresponding to the calibration sub-segments, the distance is updated to obtain the measured distance of the object to be measured, wherein the segmented calibration parameters are obtained by the calibration method described in the first aspect.
[0034] In some embodiments, point cloud data generated when a lidar measures an object under test is acquired, and the material category of the object under test is determined based on the point cloud data, including:
[0035] Point cloud data includes distance and brightness values;
[0036] Using distance as the x-axis, determine the first y-axis value corresponding to the brightness threshold line of the first material and the second y-axis value corresponding to the brightness threshold line of the second material, wherein the first y-axis value is greater than the second y-axis value.
[0037] If the brightness value is greater than or equal to the value of the first vertical axis, then the material category of the object to be tested is determined to be the first material.
[0038] If the brightness value is less than or equal to the value of the second vertical axis, then the material category of the object to be tested is determined to be the second material.
[0039] If the brightness value is greater than the second ordinate value and the brightness value is less than the first ordinate value, then the material category of the object to be tested is determined to be the third material, wherein the brightness threshold line of the first material and the brightness threshold line of the second material are obtained by the calibration method described in the first aspect.
[0040] In some embodiments, the calibration parameters corresponding to the object under test are determined according to the material type of the object under test, including:
[0041] If the material type of the object to be tested is the first material, then the calibration parameters corresponding to the object to be tested are determined to be the calibration parameters corresponding to the calibration target of the first material.
[0042] If the material type of the object to be tested is the second material, then the calibration parameters corresponding to the object to be tested are determined to be the calibration parameters corresponding to the calibration target of the second material.
[0043] If the material type of the object to be tested is the third material, then the calibration parameters corresponding to the object to be tested are determined to be the calibration parameters corresponding to the third material calibration target.
[0044] Thirdly, embodiments of this application provide a lidar, including:
[0045] At least one processor; and
[0046] A memory that is communicatively connected to at least one processor; wherein,
[0047] The memory stores instructions that can be executed by at least one processor, which enables the at least one processor to perform the ranging method as described in the first aspect.
[0048] Fourthly, embodiments of this application provide a robot, including:
[0049] As described in the third aspect, this is a lidar.
[0050] Fifthly, embodiments of this application provide a ranging method applied to the robot described in the fourth aspect, the ranging method comprising:
[0051] Obtain the radar protocol attribute package, which includes the full-area calibration parameters and segmented calibration parameters for each type of calibration target.
[0052] Point cloud data is collected using lidar, and the material type of the object under test is determined based on the point cloud data.
[0053] Based on the material type of the object to be tested, determine the corresponding calibration parameters for the object to be tested. The calibration parameters include full-area calibration parameters and segmented calibration parameters.
[0054] The distance between the object under test and the lidar is calculated based on the point cloud data and the full-area calibration parameters.
[0055] Determine the calibration segment corresponding to the distance within the range of the lidar;
[0056] Based on the segmented calibration parameters corresponding to the calibration sub-segments, the distance is updated to obtain the measured distance of the object to be measured, wherein the segmented calibration parameters are obtained by the calibration method described in the first aspect.
[0057] In a sixth aspect, embodiments of this application also provide a non-volatile computer-readable storage medium storing computer-executable instructions that, when executed by a processor, cause the processor to perform the calibration method as described in the first aspect.
[0058] The beneficial effects of this application embodiment are as follows: Unlike the prior art, this application embodiment provides a calibration method applied to lidar. The calibration method includes: obtaining the spot center value corresponding to calibration targets of different materials; determining several segmented calibration parameters corresponding to each type of calibration target based on the theoretical distance value between each calibration target and the lidar in each calibration sub-segment within the range of the lidar, and the spot center value corresponding to each type of calibration target in each calibration sub-segment.
[0059] By determining the distance of each calibration segment within the range of the lidar and the center value of the light spot corresponding to each type of calibration target, several segmented calibration parameters corresponding to each type of calibration target are determined. This application can solve the problems of low calibration accuracy across the entire area and / or deviations in ranging accuracy caused by using only white target material for calibration, thereby improving the calibration accuracy of the lidar and enabling different materials to correspond to different segmented calibration parameters, thus improving the ranging accuracy of the lidar. Attached Figure Description
[0060] One or more embodiments are illustrated by way of example with reference to the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements / modules and steps with the same reference numerals in the drawings are represented as similar elements / modules and steps. Unless otherwise stated, the figures in the drawings do not constitute a limitation on scale.
[0061] Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;
[0062] Figure 2 This is a schematic flowchart of a calibration method provided in an embodiment of this application;
[0063] Figure 3 yes Figure 2 A detailed flowchart of step S201 in the process;
[0064] Figure 4 This is a schematic diagram of a zero-degree angle difference provided in an embodiment of this application;
[0065] Figure 5 yes Figure 2 Detailed flowchart of step S202 in the process;
[0066] Figure 6 This is a schematic diagram of a process for obtaining full-area calibration parameters corresponding to calibration targets of each material, provided in an embodiment of this application.
[0067] Figure 7 This is a schematic diagram of a process for determining the brightness threshold line of a first material and the brightness threshold line of a second material, provided in an embodiment of this application.
[0068] Figure 8 This is a schematic diagram of the distance-brightness curves corresponding to calibration targets of different materials provided in the embodiments of this application;
[0069] Figure 9 This is a schematic diagram of the structure of a calibration device provided in an embodiment of this application;
[0070] Figure 10 This is a schematic flowchart of a ranging method provided in an embodiment of this application;
[0071] Figure 11 yes Figure 10 Detailed flowchart of step S1001 in the process;
[0072] Figure 12 yes Figure 10 Detailed flowchart of step S1002 in the process;
[0073] Figure 13 This is a schematic diagram of the structure of a ranging device provided in an embodiment of this application;
[0074] Figure 14 This is a schematic diagram of the structure of a lidar provided in an embodiment of this application;
[0075] Figure 15 This is a schematic diagram of the structure of a robot provided in an embodiment of this application;
[0076] Figure 16 This is a flowchart illustrating another ranging method provided in an embodiment of this application. Detailed Implementation
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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.
[0081] 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.
[0082] To address the issues of low full-area calibration accuracy of current lidar and / or deviations in ranging accuracy caused by using only white target material for calibration, this application provides a calibration method. This method determines several segmented calibration parameters corresponding to each type of calibration target based on the distance of each calibration sub-segment within the lidar's range and the spot center value corresponding to each type of calibration target material. This improves the calibration accuracy of the lidar and allows different materials to correspond to different segmented calibration parameters, thereby enhancing the ranging accuracy of the lidar.
[0083] Please see Figure 1 , Figure 1 This is a schematic diagram of an application environment provided in an embodiment of this application;
[0084] like Figure 1 As shown, the application environment 100 includes a lidar 10 and several calibration targets 20, wherein each calibration target 20 is arranged around the lidar 10 at a certain angle or distance step interval.
[0085] In this embodiment, the lidar 10 is used to emit a laser beam and is calibrated using calibration targets positioned at different locations to obtain calibration parameters. For example, it acquires the spot center values corresponding to calibration targets of different materials; based on the theoretical distance between each calibration target and the lidar in each calibration segment within the lidar's range, and the spot center values corresponding to each type of material calibration target in each calibration segment, it determines several segmented calibration parameters corresponding to each type of material calibration target. In this embodiment, the lidar includes, but is not limited to, pulse lidar and continuous wave lidar.
[0086] In this embodiment of the application, the calibration target 20 is used to reflect the laser beam output by the lidar 10. The calibration target 20 includes calibration targets of different materials, such as: white target, low reflective material calibration target, and high reflective material calibration target. Among them, the low reflective material calibration target is, for example, a black target, and the high reflective material calibration target is, for example, a lattice target.
[0087] This application embodiment uses the above application scenario as an example to further illustrate the calibration method. In actual application scenarios, the settings of the lidar 10 and the calibration target 20, such as the selection of the range of the lidar 10, the setting angle and number of the calibration target 20, and the setting of the area segment, can be set according to actual needs and are not limited to the limitations of this application embodiment.
[0088] Specifically, the embodiments of this application will be further described below with reference to the accompanying drawings.
[0089] Example 1
[0090] Please see Figure 2 , Figure 2 This is a schematic flowchart of a calibration method provided in an embodiment of this application;
[0091] This calibration method is applied to lidar, and specifically, the execution subject of this calibration method is one or at least two processors in the lidar.
[0092] like Figure 2 As shown, the calibration method includes:
[0093] Step S201: Obtain the center value of the light spot corresponding to the calibration target of different materials;
[0094] Specifically, a calibration target of a certain material is selected. Within the range of the lidar, a predetermined number of calibration targets are spaced around the lidar at predetermined angles or distance steps. After the lidar emits a laser beam towards the predetermined number of calibration targets, it receives the light spots reflected from the targets and calculates the center value of the light spot corresponding to each calibration target based on the point cloud within a predetermined range of predetermined angles of the calibration targets. The above steps are repeated for calibration targets of other materials to obtain the center values of the light spots corresponding to calibration targets of different materials.
[0095] The calibration target material includes white targets, highly reflective materials, and low-reflective materials. Low-reflective calibration targets include, for example, black targets, and highly reflective calibration targets include, for example, lattice targets. The preset angle, preset distance step, preset range, and preset quantity can be set according to actual needs and are not limited to the examples in this application. Optionally, the preset angle can be 0°, 60°, 90°, or 180°; the preset distance step can be 1 meter, 2 meters, 3 meters, ..., n meters; the preset range can be ±1°; and the preset quantity can be 10.
[0096] Please see Figure 3 , Figure 3 yes Figure 2 A detailed flowchart of step S201 in the process;
[0097] like Figure 3 As shown, step S201: Obtain the spot center value corresponding to the calibration target of different materials, including:
[0098] Step S2011: Select a calibration target as the zero-degree angle correction target;
[0099] Specifically, among the multiple calibration targets of the same material set around the lidar, select one calibration target as the zero-degree angle correction target. Since the front of the lidar base in four directions is generally 0°, 90°, 180°, or 270°, the calibration targets at preset angles of 0°, 90°, 180°, or 270° can be selected as the zero-degree angle correction target.
[0100] Step S2012: Fit the point cloud corresponding to the zero-degree angle correction target to obtain the point cloud line;
[0101] Specifically, the lidar acquires the point cloud reflected by the zero-degree angle corrected target, and fits the point cloud to obtain the point cloud line.
[0102] Step S2013: Obtain the difference of the zero-degree angle based on the point cloud line and the standard line of the zero-degree angle correction target.
[0103] Specifically, the standard line for the zero-degree angle correction target is the horizontal line at the location of the zero-degree angle correction target. The difference in zero degrees is the angle between the point cloud line and the standard line at the location of the zero-degree angle correction target; for example, the difference in zero degrees is 1°. After obtaining the difference in zero degrees, the difference is written into the non-volatile memory device of the lidar. The non-volatile memory device includes flash memory, electrically erasable programmable read-only memory (EEPROM), etc.
[0104] Please see Figure 4 , Figure 4 This is a schematic diagram of a zero-degree angle difference provided in an embodiment of this application;
[0105] like Figure 4 As shown, a calibration target at a preset angle of 90° is selected as the zero-degree angle correction target. The standard line of the zero-degree angle correction target is a horizontal line of 0°-180°. The difference of the zero-degree angle is the angle between the point cloud line and the standard line of the zero-degree angle correction target.
[0106] Step S2014: Based on the difference of zero-degree angle, obtain point clouds within a preset range of preset angles corresponding to several calibration targets of different materials;
[0107] Specifically, the preset angle is the angle between the calibration target and the lidar setting, representing the orientation of the calibration target. The lidar obtains the actual angle by subtracting the zero-degree angle from the preset angle to correct the zero-degree angle, and acquires point clouds within a preset range of the actual angles of several calibration targets of the same material, i.e., point clouds corresponding to calibration targets of the same material at different setting positions. The preset range is ±1° or the point cloud range extending N points before and after the actual angle, where N can be an integer from 1 to 3.
[0108] For example, if the difference of zero degrees is 1°, for a calibration target with a preset angle set at 60°, select a point cloud with a preset range of ±1°, which means that the lidar will acquire all point clouds within 59°±1°; or, select a point cloud with a preset range of three points extending before and after the actual angle, which means that the lidar will acquire all point clouds at 59° and three point clouds before and after 59°.
[0109] It is understandable that due to errors in the assembly process, the angle of the lidar in the calibration target will be deviated. Therefore, the zero-degree angle needs to be corrected before calibration to ensure that the angle of the lidar point cloud data is consistent with the actual position of the laser beam incident on the calibration target.
[0110] In this embodiment of the application, by obtaining point clouds within a preset range of preset angles corresponding to several calibration targets of different materials based on the difference of zero-degree angle, this application can ensure the consistency between the angle of the radar point cloud data and the actual position of the laser beam incident on the calibration target, thereby improving the calibration accuracy of the lidar.
[0111] Further, select calibration targets of other materials and repeat the above steps S2011-S2014 to obtain point clouds within a preset range of preset angles corresponding to calibration targets of different materials.
[0112] Step S2015: Determine the center value of the light spot corresponding to each calibration target based on the point cloud.
[0113] Specifically, the center value of the light spot is the position of the centroid of the light spot. Based on the position and light intensity information of the point cloud corresponding to each calibration target, a position-light intensity curve is plotted and candidate light spots are determined. Then, based on the position data and light intensity data within the left and right boundary range of the candidate light spots, the position of the centroid of the light spot corresponding to the calibration target with different materials and different setting positions is calculated, that is, the center value of the light spot.
[0114] Step S202: Based on the theoretical distance between each calibration target and the lidar in each calibration segment within the range of the lidar, and the spot center value corresponding to each type of material calibration target in each calibration segment, determine several segment calibration parameters corresponding to each type of material calibration target.
[0115] Specifically, the range between the blind zone distance and the measurement range of the lidar is divided into several regional segments. That is, the minimum and maximum distance that the lidar can measure are divided into several regional segments. Each regional segment is a calibration sub-segment. The range of each calibration sub-segment can be represented by distance. Among them, the blind zone distance is the minimum distance that the lidar can measure, the measurement range is the maximum distance that the lidar can measure, and the distance between the blind zone distance and the measurement range of the lidar is the threshold of the entire range distance.
[0116] For example, if the blind zone distance of a lidar is 10cm and the range is 10m, it can be divided into sub-segments with a preset distance step size of 1m or 2m; or, it can be divided according to the maximum distance threshold of the calibration sub-segment, where the maximum distance threshold is the maximum distance limit that the calibration sub-segment can be divided into. For example, by setting the maximum distance threshold, the original 5 calibration sub-segments can now be divided into 4 calibration sub-segments, saving resources; or, according to actual needs, if more accurate ranging is required within certain distance ranges, then finer divisions can be made within that distance range to ensure ranging accuracy within that range.
[0117] Furthermore, based on the theoretical distance between each calibration target and the lidar in each calibration sub-segment, and the spot center value corresponding to each type of calibration target, the lidar determines several segmented calibration parameters corresponding to each type of calibration target. Each calibration sub-segment corresponds to a set of segmented calibration parameters, and the segmented calibration parameters corresponding to each calibration sub-segment are only used to calculate the measurement distance of the object under test in that calibration sub-segment.
[0118] Please see Figure 5 , Figure 5 yes Figure 2 Detailed flowchart of step S202 in the process;
[0119] like Figure 5 As shown, step S202: Based on the theoretical distance value between each calibration target and the lidar in each calibration segment within the lidar's measurement range, and the spot center value corresponding to each type of material calibration target in each calibration segment, determine several segmented calibration parameters corresponding to each type of material calibration target, including:
[0120] Step S2021: Select a calibration segment and select a calibration target of a certain material;
[0121] Specifically, a calibration segment is selected from several calibration segments, and a calibration target of one material is selected from three types of calibration targets for subsequent calculations.
[0122] Step S2022: Construct an overdetermined equation based on the spot center value corresponding to the selected material of the calibration target in the selected calibration sub-segment and the theoretical distance value between the selected material of the calibration target and the lidar;
[0123] Specifically, the setting position of the calibration target is determined according to the selected calibration sub-segment. Combining the spot center values corresponding to the calibration targets of different materials and different setting positions obtained in step S201, the spot center value corresponding to the selected material of the calibration target in the selected calibration sub-segment is determined. The average distance between the point cloud and the lidar within a preset range of a preset angle corresponding to each calibration target of that material in the calibration sub-segment is taken to obtain the theoretical distance value between each calibration target and the lidar.
[0124] Substitute the center values of the light spots corresponding to the above calibration targets and the theoretical distance values into the following calibration formula:
[0125] d = S i n1 / (xS i n2)
[0126] Where d is the theoretical distance value, S i n1, S i n2 represents a set of segmented calibration parameters corresponding to the i-th calibration segment, and x represents the center value of the light spot.
[0127] In the embodiments of this application, for lidar with a large range, the number of calibration targets is also large. Therefore, the number of calibration targets of different materials selected in the selected calibration sub-segment is also multiple, and there are multiple calibration formula equations. At this time, the number of calibration formulas in the equation set is greater than the number of segmented calibration parameters, that is, the number of equations is greater than the number of unknowns. Therefore, the equation set obtained by combining the calibration formulas is an overdetermined equation set.
[0128] Step S2023: Solve the overdetermined equation to obtain the segmented calibration parameters of the calibration target of the selected material in the calibration sub-segment.
[0129] Specifically, by solving the overdetermined equations of the calibration formula system using the least squares method, the least squares solution obtained is the segmented calibration parameters of the calibration target of the selected material in the calibration sub-segment, where each calibration sub-segment corresponds to a set of segmented calibration parameters.
[0130] Furthermore, after obtaining the segmented calibration parameters of a calibration target of one selected material in one calibration sub-segment, other calibration sub-segments are selected for calibration, i.e., steps S2021-S2023 are repeated until the segmented calibration parameters of the calibration target of one selected material in all calibration sub-segments are obtained. Calibration targets of other materials are selected, and steps S2021-S2023 are repeated until the segmented calibration parameters of calibration targets of all three materials in all calibration sub-segments are obtained. The calibration targets of different materials are placed in the same manner and divided into several calibration sub-segments using the same method.
[0131] In this embodiment, the range of distance from the blind zone to the measurement range of the lidar is divided into several calibration segments, and calibration is performed separately for each segment. This ensures that the segmented calibration parameters for each segment are used only to calculate the measurement distance of the object under test within that segment. Compared to the full-area calibration method, this application improves the calibration and ranging accuracy of the lidar. It is understood that the full-area calibration method, because it uses the entire measurement range, requires selecting a set of parameters with the smallest relative error across the entire range during fitting. This cannot guarantee that the error of each calibration target is minimized; therefore, the resulting set of calibration parameters cannot achieve excellent ranging accuracy for all distances within the entire range.
[0132] In the embodiments of this application, by determining several segmented calibration parameters corresponding to the calibration target of each material, this application enables different materials to correspond to different segmented calibration parameters, thereby improving the ranging accuracy of the lidar when measuring the distance of objects of different materials.
[0133] In this embodiment of the application, the calibration method further includes: calibrating calibration targets of different materials to obtain full-area calibration parameters corresponding to each type of calibration target.
[0134] Please see Figure 6 , Figure 6 This is a schematic diagram of a process for obtaining full-area calibration parameters corresponding to calibration targets of each material, provided in an embodiment of this application.
[0135] like Figure 6 As shown, the process for obtaining the full-area calibration parameters for each type of calibration target includes:
[0136] Step S601: Select a calibration target of a certain material, and set multiple calibration targets of the selected material within the range of the lidar according to a preset distance step size;
[0137] Specifically, the calibration targets include a first material calibration target, a second material calibration target, and a third material calibration target. The first material calibration target is a high-reflectivity material, the second material calibration target is a low-reflectivity material calibration target, and the third material calibration target is a white target. Low-reflectivity materials include, for example, black targets, and high-reflectivity materials include, for example, lattice targets. Selecting a calibration target of a specific material, within the range of the lidar, a predetermined number of calibration targets are spaced at preset angles or distance steps around the lidar.
[0138] Step S602: Determine the theoretical distance between the calibration target of each selected material and the lidar;
[0139] Specifically, the average distance between the point cloud and the lidar within a preset range of preset angles corresponding to each calibration target of the material is taken to obtain the theoretical distance value between each calibration target and the lidar.
[0140] Step S603: Solve the overdetermined equations composed of the theoretical distance value and the center value of the light spot for each selected material calibration target to obtain the full-area calibration parameters corresponding to the selected material calibration target.
[0141] Specifically, based on the material of the calibration target determined in step S601, and combined with the spot center values corresponding to calibration targets of different materials and different setting positions obtained in step S201, the spot center value corresponding to each calibration target of that material is determined. The spot center values corresponding to each of the above calibration targets and the theoretical distance values are then substituted into the following calibration formula:
[0142] d = Gn1 / (x - Gn2)
[0143] Where d is the theoretical distance value, Gn1 and Gn2 are a set of full-area calibration parameters, and x is the center value of the light spot.
[0144] In this embodiment, for lidar with a large measurement range, the number of calibration targets is also large. Therefore, there are multiple calibration targets of the same material, resulting in multiple calibration formula equations. In this case, the number of calibration formulas in the equation set is greater than the number of calibration parameters for the entire region, that is, the number of equations is greater than the number of unknowns. Therefore, the equation set obtained by simultaneously solving the calibration formulas is an overdetermined equation set. Solving the overdetermined equations of the calibration formula equation set using the least squares method yields the least squares solution, which is the full-region calibration parameter corresponding to the selected calibration target material.
[0145] Furthermore, after obtaining the full-area calibration parameters corresponding to the calibration target of one selected material, calibration targets of other materials are selected for calibration, i.e., steps S601-S603 are repeated until the full-area calibration parameters corresponding to the calibration targets of three materials are obtained. Among them, the calibration targets of different materials are placed in the same way and divided into several calibration sub-segments using the same method. Each calibration target of one material corresponds to one full-area calibration parameter and several segment calibration parameters.
[0146] In this embodiment of the application, after calibrating the calibration targets of different materials to obtain the full-area calibration parameters corresponding to each material calibration target, the calibration method further includes: determining the brightness threshold line of the first material and the brightness threshold line of the second material.
[0147] Please see Figure 7 , Figure 7 This is a schematic diagram of a process for determining the brightness threshold line of a first material and the brightness threshold line of a second material, provided in an embodiment of this application.
[0148] like Figure 7 As shown, the process for determining the brightness threshold lines of the first and second materials includes:
[0149] Step S701: Obtain the brightness value corresponding to the calibration target for each material;
[0150] Specifically, the method for obtaining the brightness value of the calibration target for each material is similar to the method for obtaining the center value of the light spot for calibration targets of different materials, and will not be repeated here.
[0151] Step S702: Based on the theoretical distance and brightness values between each calibration target and the lidar, obtain the distance-brightness curve corresponding to each type of calibration target.
[0152] Specifically, using brightness value as the vertical axis and theoretical distance value as the horizontal axis, lines were drawn connecting the brightness values of adjacent calibration targets for each material to obtain three different distance-brightness curves that do not intersect.
[0153] Please see Figure 8 , Figure 8 This is a schematic diagram of the distance-brightness curves corresponding to calibration targets of different materials provided in the embodiments of this application;
[0154] like Figure 8 As shown, the distance-brightness curve of the first material calibration target is at the top, the distance-brightness curve of the third material calibration target is between the distance-brightness curve of the first material calibration target and the brightness curve of the second material calibration target, and the distance-brightness curve of the brightness curve of the second material calibration target is at the bottom.
[0155] For calibration targets of the same material, the closer they are to the lidar, the higher the brightness value. For calibration targets of different materials, since the bright side reflects more energy than the black side, at the same distance, the brightness value of the calibration target with high reflectivity is greater than that of the calibration target with white reflectivity, which is greater than that of the calibration target with low reflectivity.
[0156] Step S703: Take the average of the vertical coordinate values corresponding to the same horizontal coordinate value of each of the two adjacent distance-brightness curves to obtain the first material brightness threshold line and the second material brightness threshold line.
[0157] Specifically, the first material brightness threshold line and the second material brightness threshold line are used to determine the material category of the object under test. The average of the ordinate values corresponding to the same abscissa value on the distance-brightness curve of the first material calibration target and the distance-brightness curve of the second material calibration target is taken to obtain several brightness threshold ordinates. These ordinates are then fitted to several coordinate points to obtain the first material brightness threshold line.
[0158] For each target coordinate point on the distance-brightness curve of the third material calibration target and the distance-brightness curve of the second material calibration target, the average value of the corresponding ordinate value is taken to obtain several brightness threshold ordinates. These brightness threshold ordinates are then fitted to several coordinate points to obtain the brightness threshold line for the second material. The number of target coordinate points is the same as the number of calibration targets of the same material, and each target coordinate point is defined with the theoretical distance between the calibration target and the lidar as its abscissa.
[0159] For example: Six calibration targets of the same material with different distance step sizes are set around the lidar. There are six target coordinate points on the distance-brightness curve of the first material calibration target and the distance-brightness curve of the second material calibration target. The average value of the two ordinate values corresponding to the same abscissa value is taken in turn to obtain six brightness threshold ordinates. The six coordinate points corresponding to the six brightness threshold ordinates are fitted to obtain the brightness threshold line of the first material.
[0160] For LiDARs whose algorithms are already embedded in the chip, or whose motherboard software is already finalized in mass production, it is impossible to add new calibration parameters. Therefore, in this embodiment, the newly added calibration parameters are stored in the microcontroller unit (MCU) of the communication board according to a specific location arrangement, and saved to a non-volatile memory unit such as EEPROM or Flash device during production line calibration to obtain the corresponding radar protocol attribute packet.
[0161] Specifically, the full-area distance range threshold, the maximum distance threshold for each calibration segment, the full-area calibration parameters and several segmented calibration parameters corresponding to the calibration targets of the three materials, and the coordinate values of the target coordinate points on the distance-brightness curves of the three materials, and / or the brightness threshold lines of the first and second materials, are stored in a non-volatile read / write storage medium. The coordinate values of the target coordinate points include the distance value between the i-th calibration target and the lidar and the corresponding brightness value. For example, this could be stored in the Flash memory within the MCU, or in a predetermined storage unit within the memory managed by the MCU, such as a predetermined storage unit in an external EEPROM. The memory managed by the MCU can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
[0162] The full-area distance range threshold and the maximum distance threshold for each calibration segment are designed as 2-byte short integers. The full-area calibration parameters and segment calibration parameters are 4-byte single-precision floating-point data types. It should be noted that the above data types can be designed as other data types with different word lengths and floating-point precisions in different instances, depending on the needs.
[0163] Each unit of memory stores 1 byte. If the parameter word length is greater than 1 byte, the storage address sequence is arranged according to the rule that the low byte of the parameter is stored in the low address space and the high byte of the parameter is stored in the high address space.
[0164] The following explanation uses the full-area distance range threshold as an example: If the starting address of the calibration parameter in memory is byte A, then the 2-byte short integer data – the full-area distance range threshold – is stored in the following format: the address unit of byte A+0 stores the low byte (LSB) of the full-area distance range threshold, and the address unit of byte A+1 stores the high byte (MSB) of the full-area distance range threshold. When the full-area distance range threshold is equal to 0x0102, unit A+0 stores 0x02, and unit A+1 stores 0x01. Or, for example, when one of the parameters in a set of full-area calibration parameters is equal to 0x1718191A, unit A+10 stores 0x1A, unit A+11 stores 0x19, unit A+12 stores 0x18, and unit A+13 stores 0x17.
[0165] In this embodiment, the calibration parameter reading end receives and parses data according to the same order rules. It should be noted that, in specific instances, the total distance range threshold can be defined as a constant value and does not necessarily need to be stored in memory.
[0166] Meanwhile, the default value when there is no calibration data in the storage unit can be designed as any initial design value that can mark this state as agreed by the radar attribute packet protocol; the byte arrangement order of parameters with a word length greater than 1 byte in the memory can also adopt different bit arrangements; and the calibration parameters can be stored in different address locations in a distributed manner. All these changes do not change the logical essence that the calibration parameters must be stored in non-volatile memory in a certain arrangement.
[0167] Furthermore, during production line calibration, the calibration host computer software controls the production line fixture to write calibration parameters into the LiDAR. To ensure that the calibration parameters can be successfully written into the LiDAR's memory, a detailed operating procedure must be followed. The TX interface of the LiDAR's Universal Asynchronous Receiver / Transmitter (UART) is time-division multiplexed. Upon power-up, the TX interface is in input mode. Through a power-on handshake, the LiDAR enters factory mode, and the calibration host computer software writes the calibration parameters into the LiDAR's Flash or EEPROM. If the handshake fails or the LiDAR detects a timeout, the LiDAR automatically enters user program mode and begins outputting radar protocol attribute packets and ranging information.
[0168] Example 2
[0169] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a calibration device provided in an embodiment of this application;
[0170] like Figure 9 As shown, the calibration device 900 includes:
[0171] The acquisition unit 901 is used to acquire the center value of the light spot corresponding to the calibration target of different materials.
[0172] The determining unit 902 is used to determine several segmented calibration parameters corresponding to each calibration target of each material based on the theoretical distance value between each calibration target and the lidar in each calibration sub-segment within the range of the lidar, and the spot center value corresponding to each type of calibration target in each calibration sub-segment.
[0173] In some implementations, the acquisition unit 901 is specifically used for: selecting a calibration target as a zero-degree angle correction target; fitting the point cloud corresponding to the zero-degree angle correction target to obtain a point cloud line; obtaining the difference of the zero-degree angle based on the point cloud line and the standard line of the orientation of the zero-degree angle correction target; acquiring point clouds within a preset range of preset angles corresponding to several calibration targets of different materials based on the difference of the zero-degree angle; and determining the center value of the light spot corresponding to each calibration target based on the point cloud.
[0174] In some implementations, the determining unit 902 is specifically used for: selecting a calibration sub-segment and selecting a calibration target of a certain material; constructing an overdetermined equation based on the spot center value corresponding to the selected calibration target of the selected material and the theoretical distance value between the selected calibration target and the lidar; solving the overdetermined equation to obtain the segmented calibration parameters of the selected calibration target in the calibration sub-segment, wherein each calibration sub-segment corresponds to a set of segmented calibration parameters.
[0175] In this embodiment, the calibration device includes: an acquisition unit for acquiring the spot center values corresponding to calibration targets of different materials; and a determination unit for determining several segmented calibration parameters corresponding to each type of calibration target based on the theoretical distance between each calibration target and the lidar in each calibration sub-segment within the lidar's range, and the spot center values corresponding to each type of calibration target in each calibration sub-segment. This application can solve the problems of low calibration accuracy across the entire area and / or deviations in ranging accuracy caused by using only white target material for calibration, improve the calibration accuracy of the lidar, and enable different materials to correspond to different segmented calibration parameters, thereby improving the ranging accuracy of the lidar.
[0176] Example 3
[0177] Please see Figure 10 , Figure 10 This is a schematic flowchart of a ranging method provided in an embodiment of this application;
[0178] This ranging method is applied to lidar, and specifically, the execution entity of this ranging method is one or at least two processors in the lidar.
[0179] like Figure 10As shown, the ranging method includes:
[0180] Step S1001: Collect point cloud data generated when the lidar measures the object under test, and determine the material type of the object under test based on the point cloud data;
[0181] Specifically, the lidar emits a laser beam towards the object under test and collects the point cloud data generated when the laser beam returns to the lidar. The material type of the object under test is determined based on the point cloud data, which includes distance and brightness values.
[0182] Please see Figure 11 , Figure 11 yes Figure 10 Detailed flowchart of step S1001 in the process;
[0183] like Figure 11 As shown, step S1001: Collect point cloud data generated when the lidar measures the object under test, and determine the material category of the object under test based on the point cloud data, including:
[0184] Step S1011: Using the distance value as the horizontal axis, determine the first vertical axis value corresponding to the brightness threshold line of the first material and the second vertical axis value corresponding to the brightness threshold line of the second material;
[0185] Wherein, the first ordinate value is greater than the second ordinate value, the first ordinate value is the brightness value on the first material brightness threshold line, the second ordinate value is the brightness value on the second material brightness threshold line, the first material brightness threshold line and the second material brightness threshold line are obtained by step S703 of the calibration method in Embodiment 1 and stored in the memory of the lidar.
[0186] Step S1012: If the brightness value is greater than or equal to the first vertical coordinate value, then the material category of the object to be tested is determined to be the first material;
[0187] Specifically, the first material is a highly reflective material, such as a lattice target.
[0188] Step S1013: If the brightness value is less than or equal to the second vertical coordinate value, then the material category of the object to be tested is determined to be the second material;
[0189] Specifically, the second material is a low-reflectivity material, such as a black target.
[0190] Step S1014: If the brightness value is greater than the second vertical coordinate value and the brightness value is less than the first vertical coordinate value, then the material category of the object to be tested is determined to be the third material.
[0191] Specifically, the third material is a white target.
[0192] Step S1002: Determine the calibration parameters corresponding to the object under test according to the material type of the object under test;
[0193] Specifically, based on the material type of the object to be tested, and combined with the calibration parameters corresponding to calibration targets of different materials stored in the LiDAR's memory, the calibration parameters corresponding to the object to be tested are determined. The calibration parameters include full-area calibration parameters and several segmented calibration parameters.
[0194] Please see Figure 12 , Figure 12 yes Figure 10 Detailed flowchart of step S1002 in the process;
[0195] like Figure 12 As shown, step S1002: Determine the calibration parameters corresponding to the object under test according to the material type of the object under test, including:
[0196] Step S1021: Determine the material category of the object to be tested;
[0197] Step S1022: If the material type of the object to be tested is the first material, then determine the calibration parameters corresponding to the object to be tested as the calibration parameters corresponding to the calibration target of the first material;
[0198] Step S1023: If the material type of the object to be tested is the second material, then determine the calibration parameters corresponding to the object to be tested as the calibration parameters corresponding to the calibration target of the second material;
[0199] Step S1024: If the material type of the object to be tested is the third material, then determine the calibration parameters corresponding to the object to be tested as the calibration parameters corresponding to the third material calibration target.
[0200] In this embodiment, the material type of the object under test is determined by measuring the brightness value of the point cloud data generated when measuring the object under test. Combined with the calibration of each individual radar in low reflectivity, white target and high reflectivity materials to obtain three different calibration parameters, the calibration parameters corresponding to the object under test are determined. This application enables objects of different materials to use different calibration parameters, thereby improving the ranging accuracy of high and low reflectivity materials other than white targets.
[0201] Step S1003: Calculate the distance between the object to be measured and the lidar based on the point cloud data and the full-area calibration parameters;
[0202] Specifically, the lidar determines the theoretical spot center value based on point cloud data. The specific implementation of determining the theoretical spot center value based on point cloud data is similar to step S2015 and will not be repeated here. Substituting the theoretical spot center value and the full-area calibration parameters into the following ranging formula, the distance between the object to be measured and the lidar is obtained. The ranging formula is as follows:
[0203] d = Gn1 / (x - Gn2)
[0204] Where d is the distance between the object under test and the lidar, Gn1 and Gn2 are a set of full-area calibration parameters, and x is the theoretical center value of the light spot.
[0205] Step S1004: Determine the calibration sub-segment corresponding to the distance within the range of the lidar;
[0206] Specifically, based on the distance between the object under test and the lidar, and combined with the maximum distance threshold of each calibration segment stored in the lidar's memory, the distance range of which calibration segment the object under test belongs to is determined. The distance between the object under test and the lidar satisfies the following condition:
[0207] S i-1 Dist <d≦S i+1 Dist
[0208] Among them, S i-1 Dist represents the maximum distance threshold of the (i-1)th calibration segment, d represents the distance between the object to be measured and the lidar, and S i+1 Dist represents the maximum distance threshold of the (i+1)th calibration segment.
[0209] Step S1005: Update the distance based on the segment calibration parameters corresponding to the calibration sub-segment to obtain the measurement distance of the object to be measured.
[0210] Specifically, after determining the material type and calibration segment of the object to be measured, the segment calibration parameters corresponding to the calibration targets of the three materials stored in the LiDAR's memory are determined by combining these parameters with the data from the calibration parameters of the three materials stored in the LiDAR's memory. These segment calibration parameters are obtained using the calibration method described in Example 1. The segment calibration parameters and the actual spot center value are then substituted into the following ranging formula to obtain the measurement distance of the object to be measured. The ranging formula is as follows:
[0211] d i ′ =S i n1 / (x ′ -S i n2)
[0212] Where, d i ′ S is the measurement distance of the object to be measured. i n1, S i n2 represents a set of segmented calibration parameters corresponding to the i-th calibration sub-segment, x ′ This is the actual center value of the light spot.
[0213] The actual spot center value is calculated using the following formula:
[0214] x ′=(d i *Gn2+Gn1) / d i
[0215] Where, x ′ d represents the actual center value of the light spot. i Let Gn1 and Gn2 be the distance between the i-th calibration target and the lidar, and Gn1 and Gn2 be a set of calibration parameters for the entire area.
[0216] In the embodiments of this application, by updating the distance based on the segmented calibration parameters corresponding to the calibration sub-segment, the measurement distance of the object to be measured can be obtained, thereby improving the ranging accuracy of the lidar.
[0217] Example 4
[0218] Please see Figure 13 , Figure 13 This is a schematic diagram of the structure of a ranging device provided in an embodiment of this application;
[0219] like Figure 13 As shown, the ranging device 130 includes:
[0220] The material category determination unit 131 is used to collect point cloud data generated when the lidar measures the object under test, and to determine the material category of the object under test based on the point cloud data.
[0221] The calibration parameter determination unit 132 is used to determine the calibration parameters corresponding to the object under test according to the material type of the object under test. The calibration parameters include full-area calibration parameters and segmented calibration parameters.
[0222] The distance calculation unit 133 is used to calculate the distance between the object under test and the lidar based on point cloud data and full-area calibration parameters.
[0223] The calibration segment determination unit 134 is used to determine the calibration segment corresponding to the distance within the range of the lidar.
[0224] The distance calculation unit 135 is used to update the distance based on the segment calibration parameters corresponding to the calibration sub-segment in order to obtain the measurement distance of the object to be measured. The segment calibration parameters are obtained by the calibration method in Example 1.
[0225] In this embodiment, the ranging device includes: a material category determination unit, used to collect point cloud data generated when the lidar measures an object under test, and determine the material category of the object under test based on the point cloud data; a calibration parameter determination unit, used to determine the calibration parameters corresponding to the object under test based on the material category of the object under test; a distance calculation unit, used to calculate the distance between the object under test and the lidar based on the point cloud data and the full-area calibration parameters; a calibration sub-segment determination unit, used to determine the calibration sub-segment corresponding to the distance within the range of the lidar; and a measurement distance calculation unit, used to update the distance based on the segmented calibration parameters corresponding to the calibration sub-segment, so as to obtain the measurement distance of the object under test. This application can improve the ranging accuracy of lidar.
[0226] Example 5
[0227] Please see Figure 14 , Figure 14 This is a schematic diagram of the structure of a lidar provided in an embodiment of this application;
[0228] like Figure 14 As shown, the lidar 140 includes one or more processors 141 and a memory 142. Wherein, Figure 14 Take a processor 141 as an example.
[0229] Processor 141 and memory 142 can be connected via a bus or other means. Figure 14 Taking the example of a connection between China and Israel via a bus.
[0230] The processor 141 is used to provide computing and control capabilities to control the lidar 140 to perform corresponding tasks, such as controlling the lidar 140 to perform the calibration method in Embodiment 1 above, including: obtaining the spot center value corresponding to the calibration target of different materials; and determining several segmented calibration parameters corresponding to each material calibration target based on the theoretical distance value between each calibration target and the lidar in each calibration sub-segment within the range of the lidar, and the spot center value corresponding to each material calibration target in each calibration sub-segment.
[0231] By determining the distance of each calibration segment within the range of the lidar and the center value of the light spot corresponding to each type of calibration target, several segmented calibration parameters corresponding to each type of calibration target are determined. This application can solve the problems of low calibration accuracy across the entire area and / or deviations in ranging accuracy caused by using only white target material for calibration, thereby improving the calibration accuracy of the lidar and enabling different materials to correspond to different segmented calibration parameters, thus improving the ranging accuracy of the lidar.
[0232] Alternatively, the lidar 140 can be controlled to perform the ranging method described in Embodiment 3 above, including: acquiring point cloud data generated when the lidar measures the object to be measured; determining the material type of the object to be measured based on the point cloud data; determining the calibration parameters corresponding to the object to be measured based on the material type of the object to be measured; calculating the distance between the object to be measured and the lidar based on the point cloud data and the full-area calibration parameters; determining the calibration sub-segment corresponding to the distance within the range of the lidar; and updating the distance based on the segmented calibration parameters corresponding to the calibration sub-segment to obtain the measured distance of the object to be measured.
[0233] By updating the distance based on the segmented calibration parameters corresponding to the calibration sub-segments to obtain the measurement distance of the object under test, this application can improve the ranging accuracy of lidar.
[0234] Processor 141 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.
[0235] Memory 142, 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 calibration method or ranging method in the embodiments of this application. Processor 141 can implement the calibration method in Embodiment 1 or the ranging method in Embodiment 3 by running the non-transitory software programs, instructions, and modules stored in memory 142. Specifically, memory 142 may include volatile memory (VM), such as random access memory (RAM); memory 142 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 142 may also include combinations of the above types of memory.
[0236] Memory 142 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 142 may optionally include memory remotely located relative to processor 141, and such remote memory may be connected to processor 141 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0237] One or more modules are stored in memory 142. When executed by one or more processors 141, they perform the calibration method in Embodiment 1 or the ranging method in Embodiment 3, for example, the methods described above. Figure 2 or Figure 10 The steps shown.
[0238] Example 6
[0239] Please see Figure 15 , Figure 15 This is a schematic diagram of the structure of a robot provided in an embodiment of this application;
[0240] like Figure 15 As shown, the robot 150 includes a lidar 151 and a controller 152. The lidar 151 is communicatively connected to the controller 152.
[0241] The lidar 151 is used to receive calibration instructions sent by the controller 152 to execute the calibration method in Embodiment 1, such as: obtaining the spot center value corresponding to the calibration target of different materials; and determining several segmented calibration parameters corresponding to the calibration target of each material based on the theoretical distance value between each calibration target and the lidar in each calibration sub-segment within the range of the lidar, and the spot center value corresponding to the calibration target of each material in each calibration sub-segment.
[0242] Alternatively, the lidar 151 can receive ranging commands sent by the controller 152 to execute the ranging method in Embodiment 3, such as: collecting point cloud data generated when the lidar measures the object to be measured; determining the material type of the object to be measured based on the point cloud data; determining the calibration parameters corresponding to the object to be measured based on the material type of the object to be measured; calculating the distance between the object to be measured and the lidar based on the point cloud data and the full-area calibration parameters; determining the calibration segment corresponding to the distance within the range of the lidar; and updating the distance based on the segmented calibration parameters corresponding to the calibration segment to obtain the measured distance of the object to be measured.
[0243] The controller 152 is used to send a calibration command to the lidar 151 to cause the lidar 151 to execute the calibration method in Embodiment 1; or, to send a ranging command to the lidar 151 to cause the lidar 151 to execute the ranging method in Embodiment 3. Alternatively, it can execute the ranging method in Embodiment 7, for example: acquiring a radar protocol attribute packet; collecting point cloud data through the lidar, and determining the material type of the object to be measured based on the point cloud data; determining the calibration parameters corresponding to the object to be measured based on the material type of the object to be measured; calculating the distance between the object to be measured and the lidar based on the point cloud data and the full-area calibration parameters; determining the calibration sub-segment corresponding to the distance within the range of the lidar; and updating the distance based on the segmented calibration parameters corresponding to the calibration sub-segment to obtain the measured distance of the object to be measured.
[0244] The controller 152 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 PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0245] In this embodiment, the robot 150 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The robot 150 may also include other components for implementing device functions, which will not be described in detail here.
[0246] The robots in this application embodiment exist in various forms, including but not limited to: hotel robots, delivery robots, cleaning robots, service robots, remote monitoring robots, sweeping robots, etc.
[0247] Example 7
[0248] When the robot is powered on, it obtains calibration parameters through radar protocol attribute packets sent by the LiDAR. Examples of robots include mobile robots and robotic vacuum cleaners. To ensure the robot program can receive and correctly parse the radar attribute information data, the attribute packet protocol defines a header, checksum, and radar information fields containing calibration information.
[0249] When the LiDAR is powered on, the processor executes various functional applications and data processing by running non-volatile software programs, instructions, and modules stored in Flash memory. The program reads the full-area calibration parameters and segmented calibration parameters from the memory and stores them in the radar information segment according to a specific arrangement, thus obtaining a complete calibration information radar protocol attribute package. This radar protocol attribute package is used for communication between the LiDAR and the robot regarding calibration parameters. The radar protocol attribute package includes: the full-area distance range threshold, the maximum distance threshold for each calibration sub-segment, the full-area calibration parameters and several segmented calibration parameters corresponding to the calibration targets of three materials, the coordinate values of the target coordinate points on the distance-brightness curves of the three materials, and / or the brightness threshold lines of the first and second materials. This data is stored in a non-volatile read / write storage medium. The coordinate values of the target coordinate points include the distance value between the i-th calibration target and the LiDAR and the corresponding brightness value.
[0250] Please see Figure 16 , Figure 16 This is a flowchart illustrating another ranging method provided in an embodiment of this application;
[0251] This ranging method is applied to robots, and specifically, the execution subject of this ranging method is one or at least two processors in the robot.
[0252] like Figure 16 As shown, the ranging method includes:
[0253] Step S1601: Obtain the radar protocol attribute packet;
[0254] Specifically, after the robot is powered on, it monitors the serial port data of the LiDAR in real time. Once the LiDAR is powered on and running stably, it enters user program mode and sends the radar protocol attribute packet information to the LiDAR's serial port. The robot then receives the data and parses the radar protocol attribute packet to obtain the calibration parameters uploaded by the LiDAR. The radar protocol attribute packet includes the full-area calibration parameters and segmented calibration parameters corresponding to each type of calibration target.
[0255] There are two ways to ensure successful data communication between the LiDAR and the robot: One is for the LiDAR to continuously send N complete radar protocol attribute packets to the serial port, where N can be set by those skilled in the art according to the actual situation; optionally, N is 5-10 times. The other is to use a bidirectional communication method with a handshake protocol. The serial port type includes URAT serial port, Serial Peripheral Interface (SPI), network interface, and other data transmission interface forms.
[0256] Step S1602: Collect point cloud data using lidar and determine the material type of the object to be tested based on the point cloud data;
[0257] Specifically, the implementation method of this step is similar to that of step S1001, and will not be repeated here.
[0258] Step S1603: Determine the calibration parameters corresponding to the object under test according to the material type of the object under test;
[0259] Specifically, the calibration parameters include full-area calibration parameters and segmented calibration parameters. The specific implementation method of this step is similar to that of step S1002, and will not be repeated here.
[0260] Step S1604: Calculate the distance between the object to be measured and the lidar based on the point cloud data and the full-area calibration parameters;
[0261] Specifically, the implementation method of this step is similar to that of step S1003, and will not be repeated here.
[0262] Step S1605: Determine the calibration sub-segment corresponding to the distance within the range of the lidar;
[0263] Specifically, the implementation method of this step is similar to that of step S1004, and will not be repeated here.
[0264] Step S1606: Update the distance based on the segmented calibration parameters corresponding to the calibration sub-segment to obtain the measured distance of the object to be measured.
[0265] Specifically, the implementation method of this step is similar to that of step S1005, and will not be repeated here.
[0266] In this embodiment, distance reconstruction is performed by acquiring radar protocol attribute packets. This application can improve the ranging accuracy of lidar without increasing hardware costs, even when the motherboard software chip is fixed or the mass-produced and finalized lidar motherboard software cannot be changed. It can also support different ranging accuracies. Compared with distance reconstruction by the lidar's own MCU, it can reduce the resource consumption of the lidar's own MCU and reduce costs.
[0267] This application also provides a non-volatile computer-readable storage medium, such as a memory including program code, which can be executed by a processor to perform the calibration method or ranging method in the above embodiments. For example, the non-volatile 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.
[0268] 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 calibration or ranging method provided in the above embodiments.
[0269] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware, or by a program or program code related to hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0270] 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 methods of 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.
[0271] 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 as described above in different aspects of this application, 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 distance measurement method, characterized in that, Applied to lidar, the method includes: The point cloud data generated when the lidar measures the object under test is collected, and the material type of the object under test is determined based on the point cloud data. Based on the material type of the object to be tested, the calibration parameters corresponding to the object to be tested are determined, wherein the calibration parameters include full-area calibration parameters and segmented calibration parameters; The distance between the object to be measured and the lidar is calculated based on the point cloud data and the full-area calibration parameters. Determine the calibration sub-segment corresponding to the distance within the range of the lidar; Based on the segmented calibration parameters corresponding to the calibration sub-segment, the distance is updated to obtain the measurement distance of the object to be measured, wherein the segmented calibration parameters are obtained by the following steps: Obtain the center value of the light spot corresponding to the calibration target of different materials; Based on the theoretical distance between each calibration target and the lidar in each calibration segment within the range of the lidar, and the spot center value corresponding to each type of calibration target in each calibration segment, several segment calibration parameters corresponding to each type of calibration target are determined.
2. The method according to claim 1, characterized in that, The process of obtaining the center value of the light spot corresponding to the calibration target of different materials includes: Select a calibration target as the zero-degree angle correction target; The point cloud corresponding to the zero-degree angle correction target is fitted to obtain the point cloud line; The difference of zero degrees is obtained based on the point cloud line and the standard line of the zero-degree angle correction target. The difference of zero degrees is the angle between the point cloud line and the standard line of the zero-degree angle correction target. Based on the difference of the zero-degree angle, obtain point clouds within a preset range of preset angles corresponding to several calibration targets of different materials; Based on the point cloud, determine the center value of the light spot corresponding to each calibration target.
3. The method according to claim 1, characterized in that, The step involves determining several segmented calibration parameters corresponding to each type of calibration target based on the theoretical distance value between each calibration target and the lidar in each calibration sub-segment within the lidar's measurement range, and the spot center value corresponding to each type of calibration target in each calibration sub-segment. These parameters include: Select a calibration segment and choose a calibration target of a certain material; An overdetermined equation is constructed based on the center value of the light spot corresponding to the selected calibration target of the selected material in the selected calibration sub-segment and the theoretical distance between the selected calibration target and the lidar. Solving the overdetermined equation yields the segmented calibration parameters of the selected material calibration target in the calibration sub-segment, wherein each calibration sub-segment corresponds to a set of segmented calibration parameters.
4. The method according to claim 1, characterized in that, The method further includes: Calibration was performed on calibration targets of different materials to obtain full-area calibration parameters for each type of calibration target, including: Select a calibration target of a certain material, and set multiple calibration targets of the selected material within the range of the lidar according to a preset distance step size; Determine the theoretical distance between each selected material calibration target and the lidar; The full-area calibration parameters corresponding to the calibration target of each selected material are obtained by solving the overdetermined equation composed of the theoretical distance value and the center value of the light spot for each selected material calibration target. Each material calibration target corresponds to one full-area calibration parameter and several segmented calibration parameters.
5. The method according to any one of claims 1-4, characterized in that, The calibration target includes a first material calibration target, a second material calibration target, and a third material calibration target. The method further includes: Obtain the brightness value corresponding to the calibration target of each material; Based on the theoretical distance value between each calibration target and the lidar and the brightness value, the distance-brightness curve corresponding to each type of calibration target is obtained; The average value of the ordinate corresponding to the same abscissa value of each of the two adjacent distance-brightness curves is taken to obtain the first material brightness threshold line and the second material brightness threshold line.
6. The method according to claim 1, characterized in that, The process of acquiring point cloud data generated when the lidar measures the object under test, and determining the material type of the object under test based on the point cloud data, includes: The point cloud data includes distance values and brightness values; Using the distance value as the abscissa, determine the first ordinate value corresponding to the brightness threshold line of the first material and the second ordinate value corresponding to the brightness threshold line of the second material, wherein the first ordinate value is greater than the second ordinate value. If the brightness value is greater than or equal to the first ordinate value, then the material category of the object to be tested is determined to be the first material. If the brightness value is less than or equal to the second ordinate value, then the material category of the object to be tested is determined to be the second material. If the brightness value is greater than the second ordinate value and the brightness value is less than the first ordinate value, then the material category of the object to be tested is determined to be the third material. The calibration target includes a first material calibration target, a second material calibration target, and a third material calibration target. The brightness threshold lines for the first and second materials are obtained through the following steps: Obtain the brightness value corresponding to the calibration target of each material; Based on the theoretical distance value between each calibration target and the lidar and the brightness value, the distance-brightness curve corresponding to each type of calibration target is obtained; The average value of the ordinate corresponding to the same abscissa value of each of the two adjacent distance-brightness curves is taken to obtain the first material brightness threshold line and the second material brightness threshold line.
7. The method according to claim 1 or 6, characterized in that, The step of determining the calibration parameters corresponding to the object under test based on the material type of the object under test includes: If the material type of the object to be tested is the first material, then the calibration parameters corresponding to the object to be tested are determined to be the calibration parameters corresponding to the calibration target of the first material. If the material type of the object to be tested is the second material, then the calibration parameters corresponding to the object to be tested are determined to be the calibration parameters corresponding to the calibration target of the second material. If the material type of the object to be tested is a third material, then the calibration parameters corresponding to the object to be tested are determined to be the calibration parameters corresponding to the third material calibration target.
8. 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 method as described in any one of claims 1-7.
9. A robot, characterized in that, include: The lidar as described in claim 8.
10. A distance measurement method, characterized in that, Applied to the robot of claim 9, the method includes: Obtain the radar protocol attribute package, wherein the radar protocol attribute package includes full-area calibration parameters and segmented calibration parameters corresponding to each type of calibration target; Point cloud data is collected using lidar, and the material type of the object under test is determined based on the point cloud data. Based on the material type of the object to be tested, the calibration parameters corresponding to the object to be tested are determined, wherein the calibration parameters include full-area calibration parameters and segmented calibration parameters; The distance between the object to be measured and the lidar is calculated based on the point cloud data and the full-area calibration parameters. Determine the calibration sub-segment corresponding to the distance within the range of the lidar; Based on the segmented calibration parameters corresponding to the calibration sub-segment, the distance is updated to obtain the measurement distance of the object to be measured, wherein the segmented calibration parameters are obtained by the following steps: Obtain the center value of the light spot corresponding to the calibration target of different materials; Based on the theoretical distance between each calibration target and the lidar in each calibration segment within the range of the lidar, and the spot center value corresponding to each type of calibration target in each calibration segment, several segment calibration parameters corresponding to each type of calibration target are determined.
Citation Information
Patent Citations
Calibration method of laser radar
CN109597054A
Laser three-dimensional imaging radar automatic calibration system
CN111239711A