Laser radar calibration method and system
By constructing data acquisition and error calculation models, and using natural scene planes to calibrate lidar parameters, the problems of lidar calibration time and low accuracy are solved, and efficient and accurate dynamic scene calibration and parameter correction of low-cost sensors are achieved.
Patent Information
- Application Number
- CN202510823539.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2045-06-19
AI Technical Summary
The existing lidar calibration methods require specific scenarios, which are time-consuming and have a human-caliber effect, making it difficult to adapt to dynamic scenarios, and the calibration of low-cost lidar has mechanical deviations and ranging errors.
By constructing a data acquisition model, a three-dimensional coordinate transformation model, a fitting error calculation model and a parameter calibration model, the planes in natural scenes are used to obtain the measurement original data, and combined with the calibration of the fitting plane to calculate the overall error, dynamically correct the lidar parameters to achieve parameter calibration.
The calibration process is simplified, the calibration accuracy and speed are improved, and it is suitable for dynamic scenarios, the point cloud quality and measurement performance are improved, and the calibration problem of low-cost sensors is solved.
Smart Images

Figure CN120334886A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a calibration method and system for a lidar, belonging to the technical field of lidar calibration. Background Art
[0002] Chinese Patent Application (Publication No.: CN115144839A) discloses a 3D lidar, which includes a vertical scanning unit and a horizontal rotating device. The vertical scanning unit includes a laser emission port for emitting laser pulse signals and a reflecting mirror that can rotate non-uniformly. The laser emission port is arranged on the axis of rotation of the reflecting mirror, and the reflecting mirror rotates uniformly or non-uniformly to scan the external environment, so as to control the spatial distribution of the point cloud obtained by scanning. Through the uniform or non-uniform rotation of the reflecting mirror, the above invention realizes the uniform or non-uniform scanning of the laser emitter in the vertical plane, and the horizontal rotating device drives the uniform or non-uniform rotation of the vertical scanning unit, thereby realizing the control of the spatial distribution of the scanned point cloud.
[0003] Furthermore, as a core sensor in fields such as autonomous driving and robot navigation, the accurate calibration of the internal parameters of the lidar directly affects the point cloud quality and system performance. However, the above solution does not disclose how to calibrate the lidar. If the traditional specific-scene calibration method is used for calibration, calibration targets such as checkerboards and reflectors are required. Therefore, the environmental requirements for the calibration scene are harsh, and it is difficult to adapt to the calibration of dynamic scenes, resulting in a cumbersome calibration process, a long calibration time, and the accuracy being affected by human factors. For example, it is easy to miss feature points when manually extracting the point cloud information of the calibration board.
[0004] The information disclosed in this background art is only used to understand the background of the inventive concept of the present invention, so it may include information that does not constitute the prior art. Summary of the Invention
[0005] Aiming at the above problems or one of the above problems, the first object of the present invention is to provide a calibration method and system for a lidar. Through continuous exploration and experiments, the present invention constructs a data acquisition model, a three-dimensional coordinate transformation model, a fitting error calculation model, and a parameter calibration model. Therefore, without a specific scene, it can use a plane (such as a wall surface) in the natural scene to obtain the original measurement data, and combine the calibrated fitting plane to calculate the overall error, and then adjust the parameters according to the overall error to achieve parameter calibration. The calibration process is simple, time-saving and labor-saving, and has high accuracy, thus effectively avoiding missing point cloud features and being applicable to the calibration of dynamic scenes, and further effectively improving the point cloud quality and measurement performance of the lidar.
[0006] In view of the above problems or one of the above problems, the second object of the present invention is to provide a calibration method and system for a lidar, which fully considers the mechanical deviation and ranging error of a low-cost lidar, designs a calibration process suitable for a low-cost lidar, and dynamically corrects lidar parameters through a distance scale factor, effectively solving the calibration problem of low-cost sensors.
[0007] To achieve one of the above objects, the first technical solution of the present invention is as follows: A calibration method for a lidar, comprising the following steps: Step 1, obtain the original measurement data of a certain lidar through a pre-constructed data acquisition model; Step 2, use a pre-constructed three-dimensional coordinate transformation model to perform spatial coordinate transformation on the original measurement data based on the correspondence between the measurement points and the spatial coordinate system, and obtain several three-dimensional point coordinates in the lidar coordinate system; Step 3, adopt a pre-constructed fitting error calculation model to calculate the distance value between the three-dimensional coordinate points and the calibration fitting plane, and determine the overall error value of several three-dimensional coordinate points and the calibration fitting plane based on the distance value; Step 4, use a pre-constructed parameter calibration model to adjust one or more parameters of the lidar according to the overall error value to obtain parameter calibration information.
[0008] Through continuous exploration and experiments, the present invention constructs a data acquisition model, a three-dimensional coordinate transformation model, a fitting error calculation model and a parameter calibration model. Without a specific scene, it can obtain the original measurement data by using a plane (such as a wall surface) in the natural scene, calculate the overall error in combination with the calibration fitting plane, and then adjust the parameters according to the overall error to achieve parameter calibration. The calibration process is simple, time-saving and labor-saving, and has high precision, thus effectively avoiding missing point cloud features and being applicable to the calibration of dynamic scenes, and further effectively improving the point cloud quality and measurement performance of the lidar.
[0009] Furthermore, the present invention fully considers the mechanical deviation and ranging error of a low-cost lidar, designs a calibration process suitable for a low-cost lidar, and dynamically corrects lidar parameters through a distance scale factor, effectively solving the calibration problem of low-cost sensors.
[0010] As a preferred technical measure: Step 1, the method for obtaining the original measurement data of a certain lidar through a pre-constructed data acquisition model is as follows: Obtain the coordinate system information of a certain lidar, which at least includes the positive half-axis of the Y-axis, the negative half-axis of the Y-axis and the positive half-axis of the Z-axis; According to the coordinate system information and the natural scene information, three measurement planes are selected, including a first measurement plane perpendicular to the positive half axis of the Y axis, a second measurement plane perpendicular to the negative half axis of the Y axis, and a third measurement plane perpendicular to the positive half axis of the Z axis; The designed parameter values of the laser radar are used as the initial parameter values and input into the hardware of the laser radar to obtain the initially calibrated laser radar; Then, the initially calibrated laser radar is used to measure the first measurement plane, the second measurement plane and the third measurement plane respectively to obtain raw measurement data.
[0011] The measuring plane is a wall surface, a roof surface, a cabinet surface, or other relatively flat surfaces.
[0012] As the preferred technical measures: Step 2: Using the pre-built three-dimensional coordinate transformation model, based on the correspondence between the measurement points and the spatial coordinate system, the spatial coordinate transformation of the original measurement data is performed to obtain the coordinates of several three-dimensional points in the laser radar coordinate system as follows: Based on the measurement raw data, one or more measurement space points are obtained; Construct a multi-dimensional coordinate system based on the correspondence between the measurement points and the spatial coordinate system; Based on the multi-dimensional coordinate system, the measurement space point is rotated around the Z axis by a first angle to obtain a first coordinate point after rotation; The first coordinate point is rotated around the X axis by a second angle to obtain a second coordinate point; The second coordinate point is rotated around the Y axis by a third angle to obtain a third coordinate point; For the third coordinate point, add the first translation amount to obtain the fourth coordinate point; Then the fourth coordinate point is rotated around the Z axis by an angle, and the second translation amount is added to obtain the fifth coordinate point; The fifth coordinate point is used as the three-dimensional space coordinate point of the laser measurement value; Summarize several three-dimensional space coordinate points to obtain several three-dimensional point coordinate points in the laser radar coordinate system.
[0013] As the preferred technical measures: According to the correspondence between the measurement points and the spatial coordinate system, the method of constructing a multidimensional coordinate system is as follows: Obtain the structural data of a laser radar, including the laser radar lower board information, laser radar upper board information, high-speed rotor information, laser transmitting tube information, speed information and degree of freedom information; The rotation speed information includes the low-speed rotation information of the upper plate of the laser radar relative to the lower plate of the laser radar and the high-speed rotation information of the high-speed rotor relative to the upper plate of the laser radar. The degree of freedom information is 2 active degrees of freedom; Determine the pose transformation information according to the structural data, which includes the pose transformation information from the lower plate of the lidar to the upper plate of the lidar, the pose transformation information from the upper plate of the lidar to the high-speed rotor, and the pose transformation information from the high-speed rotor to the laser emitter tube; Based on the pose transformation information, set the coordinate systems of each part of the lidar, which includes the lower plate coordinate system {L} of the lidar, the upper plate coordinate system {U} of the lidar, the high-speed rotor coordinate system {A}, and the laser emitter tube coordinate system {B}.
[0014] As a preferred technical measure: The origin of the lower plate coordinate system {L} of the lidar is located at the geometric center of the mounting plane of the lower plate base of the lidar. The positive half-axis of its X-axis is opposite to the direction of the bottom cable outlet. Its Z-axis coincides with the low-speed rotating shaft, and its Y-axis is obtained by the right-hand coordinate system; The upper plate coordinate system {U} of the lidar is obtained by translating and rotating the lower plate coordinate system {L} of the lidar; The high-speed rotor coordinate system {A} is obtained by translating and rotating the upper plate coordinate system {U} of the lidar; The laser emitter tube coordinate system {B} is obtained by rotating the high-speed rotor coordinate system {A}; the laser direction of the laser emitter tube is consistent with the positive half-axis direction of the Y-axis of the laser emitter tube coordinate system {B}.
[0015] As a preferred technical measure: The first angle represents the structural error value of the laser emitter tube rotating around the Z-axis, and its expected mean value is equal to 0; The second angle represents the sum of the rotation angle value of the upper motor and the starting angle deviation value of the upper motor rotating shaft; The third angle represents the structural error value of the upper motor rotating shaft rotating around the Y-axis, and its expected mean value is equal to 0; The first translation amount represents the translation amount from the lower plate coordinate system {L} of the lidar to the upper plate coordinate system {U} of the lidar; The second translation amount represents the translation amount from the upper plate coordinate system {U} of the lidar to the laser emitter tube coordinate system {B}; The rotation angle represents the rotation angle of the lower motor, and its value is directly read by the encoder.
[0016] As a preferred technical measure: Step 3, use a pre-constructed fitting error calculation model to calculate the distance value between the three-dimensional coordinate points and the calibration fitting plane, and based on the distance value, determine the overall error value of several three-dimensional coordinate points and the calibration fitting plane as follows: Obtain the coordinates of several three-dimensional points in the lidar coordinate system; According to the positions of the first measurement plane, the second measurement plane, and the third measurement plane in the three-dimensional space, corresponding calibration fitting planes are constructed respectively, including a first calibration fitting plane perpendicular to the positive half-axis of the Y-axis, a second calibration fitting plane perpendicular to the negative half-axis of the Y-axis, and a third calibration fitting plane perpendicular to the positive half-axis of the Z-axis; Calculate the distance values between each three-dimensional point coordinate and each calibration fitting plane to obtain a number of distance values; Classify the number of distance values and calculate the average distance from all three-dimensional points to each calibration fitting plane to obtain three average distance values; Take the three average distance values as the error values of the corresponding calibration fitting planes and perform an average calculation to obtain the overall error value.
[0017] As a preferred technical measure: The method for constructing the corresponding calibration fitting plane according to the position of the first measurement plane in the three-dimensional space is as follows: Based on the position of the first measurement plane in the three-dimensional space, set the plane normal vector and intercept, and based on any point on the first measurement plane, establish a plane equation for fitting the first measurement plane; Combine the plane normal vector and intercept into a four-dimensional vector, rewrite the plane equation, and obtain the initial plane parameters in the form of four-dimensional vectors; Based on the initial plane parameters, establish an initial calibration fitting plane; For any three-dimensional coordinate point, add a 1 at the end to change it to a four-dimensional homogeneous coordinate to obtain a four-dimensional coordinate point; Calculate the geometric distances between the four-dimensional coordinate points and the initial calibration fitting plane to obtain a number of geometric distances; According to the number of geometric distances, solve for the optimal plane parameters to minimize the average squared distance from all four-dimensional coordinate points to the calibration fitting plane; Construct the corresponding calibration fitting plane according to the optimal plane parameters.
[0018] As a preferred technical measure: Step 4, use the pre-constructed parameter calibration model to adjust one or more parameters of the lidar according to the overall error value. The method for obtaining the parameter calibration information is as follows: Step 41, perform dynamic binary search calibration on the calibration parameters according to the overall error value to obtain new calibration parameters; Step 42, then write the new calibration parameter results into the lidar hardware, cache a new set of radar measurement values, and use this set of data to calibrate the starting angle deviation of the upper motor to obtain a new starting angle deviation; According to the new starting angle deviation, calibrate the structural error value of the upper motor to obtain the new structural error value of the upper motor; Based on the new structural error value of the upper motor, the structural error value of the laser emitting tube is calibrated to obtain a new structural error value of the laser emitting tube; According to the new structural error value of the laser transmitting tube, the ranging deviation is calibrated to obtain a new ranging deviation; Step 43, summarizing the new starting angle deviation, the structural error value of the upper motor, the structural error value of the laser transmitting tube, and the ranging deviation to obtain new calibration parameters, and based on the new calibration parameters, calculating a new overall error value; In step 44, the new overall error value is judged. When the new overall error value is less than the given calibration threshold, the calibration is deemed to be successfully completed and the new calibration parameters are used as the final parameter calibration information; otherwise, steps 41 to 44 are executed.
[0019] The present invention drives parameter search through plane fitting errors without manual intervention or specific calibration objects. Vertical planes (such as walls) in natural scenes are used as constraints to achieve parameter calibration through multi-plane joint optimization. At the same time, the present invention decouples key parameters into independent optimization modules and adopts a step-by-step search strategy. The search range can be narrowed by setting the initial value of the Gaussian distribution and the dynamic dichotomy method, avoiding coupling interference between parameters, and improving the convergence speed. The calibration speed is significantly better than the traditional calibration method.
[0020] To achieve one of the above purposes, the second technical solution of the present invention is: A laser radar calibration system, comprising: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned laser radar calibration method.
[0021] Compared with the prior art solutions, the present invention has the following beneficial effects: After continuous exploration and experiments, the present invention constructs a data acquisition model, a three-dimensional coordinate transformation model, a fitting error calculation model and a parameter calibration model. Without a specific scene, the present invention can use the plane (such as a wall) in the natural scene to obtain the original measurement data, and calculate the overall error in combination with the calibrated fitting plane, and then adjust the parameters according to the overall error to achieve parameter calibration. The calibration process is simple, time-saving, labor-saving and highly accurate, thereby effectively avoiding missing point cloud features, and can be suitable for calibration of dynamic scenes, thereby effectively improving the point cloud quality and measurement performance of the lidar.
[0022] Furthermore, the present invention fully considers the mechanical deviation and ranging error of low-cost lidars, designs a calibration process suitable for low-cost lidars, and dynamically corrects lidar parameters through a distance scale factor, effectively solving the calibration problem of low-cost sensors. Description of the Drawings
[0023] Figure 1 It is a schematic flow chart of a calibration method for the lidar of the present invention; Figure 2 It is a schematic flow chart of calibrating a certain lidar according to the present invention; Figure 3 It is a schematic diagram of constructing a coordinate system for a certain lidar according to the present invention; Figure 4 It is a schematic diagram of constructing a calibration fitting plane according to the present invention; Figure 5 It is the first schematic diagram of the point cloud effect before calibrating a certain lidar; Figure 6 It is the second schematic diagram of the point cloud effect before calibrating a certain lidar; Figure 7 It is the third schematic diagram of the point cloud effect before calibrating a certain lidar; Figure 8 It is the first schematic diagram of the point cloud effect after calibrating a certain lidar; Figure 9 It is the second schematic diagram of the point cloud effect after calibrating a certain lidar; Figure 10 It is the third schematic diagram of the point cloud effect after calibrating a certain lidar.
[0024] Description of the Reference Numerals: 1, low-speed rotating shaft; 2, high-speed rotor; 3, high-speed rotating shaft; 4, upper plate of the lidar; 5, lower plate of the lidar; 6, laser emitter. Detailed Embodiments
[0025] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0026] On the contrary, the present invention covers any alternatives, modifications, equivalent methods and solutions made within the spirit and scope of the present invention defined by the claims. Further, in order to enable the public to have a better understanding of the present invention, some specific details are described in detail in the following detailed description of the present invention. Those skilled in the art can fully understand the present invention without the description of these details.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the technical field to which this invention belongs. The terms used herein are for the purpose of describing particular embodiments only and are not intended to limit the invention. The term "or / and" used herein includes any and all combinations of one or more of the related listed items.
[0028] As Figure 1 shown, a specific embodiment of the calibration method of the lidar of the present invention: A calibration method for a lidar includes the following steps: Step 1, obtain the original measurement data of a certain lidar through a pre-constructed data acquisition model; Step 2, use a pre-constructed three-dimensional coordinate transformation model to perform spatial coordinate transformation on the original measurement data based on the correspondence between the measurement points and the spatial coordinate system, and obtain several three-dimensional point coordinates in the lidar coordinate system; Step 3, adopt a pre-constructed fitting error calculation model to calculate the distance value between the three-dimensional coordinate points and the calibration fitting plane, and determine the overall error value of several three-dimensional coordinate points and the calibration fitting plane based on the distance value; Step 4, use a pre-constructed parameter calibration model to adjust one or more parameters of the lidar according to the overall error value to obtain parameter calibration information.
[0029] As Figure 2 shown, a specific embodiment of calibrating a dual-rotating-axis lidar using the present invention: Calibrate a certain dual-rotating-axis lidar using the calibration method of the present invention, and the method is as follows: Step 1, set four coordinate systems for the dual-rotating-axis lidar; Step 2, screen the calibration parameters based on the four coordinate systems; Step 3, obtain the laser measurement value, and perform coordinate transformation on the laser measurement value according to the calibration parameters to obtain three-dimensional space coordinate points; Step 4, perform plane fitting and error calculation based on the three-dimensional space coordinate points to obtain error information; Step 5, perform dynamic binary search calibration on the calibration parameters according to the error information to obtain new calibration parameters; then write the new calibration parameter results into the lidar hardware, and then execute Step 3 and Step 4 to obtain new error information; Step 6, judge the new calibration parameters according to the new error information. If the requirements are not met, execute Step 5. If the requirements are met, determine the final calibration parameters.
[0030] The present invention can quickly calibrate the internal parameters of a dual-rotating-axis lidar. Compared with the traditional manual calibration method, the present invention has the advantages of fast calibration speed, high point cloud accuracy, and good consistency.
[0031] As Figure 3 shown, in this embodiment, step 1, the method for setting up the four coordinate systems of the dual-rotating-axis lidar is as follows: The dual-rotating-axis lidar is a 3D lidar with a publication number of CN115144839A; from bottom to top, this 3D lidar includes: a lidar lower plate 5, a lidar upper plate 4, a high-speed rotor 2, and a laser emitter 6. Among them, the lidar upper plate 4 rotates slowly relative to the lidar lower plate 5, and the high-speed rotor 2 rotates at high speed relative to the lidar upper plate 4. The entire mechanical structure includes 2 active degrees of freedom.
[0032] Assume that during the rotation of the lidar, each rotating part is a rigid body and the rotation axis remains fixed without change. In order to convert the laser ranging value emitted by the laser emitter into the three-dimensional space point coordinates in the lower plate coordinate system, the pose transformation parameters that need to be calibrated in the present invention include: the pose transformation from the lower plate to the upper plate, the pose transformation from the upper plate to the high-speed rotor, and the pose transformation from the high-speed rotor to the laser emitter.
[0033] For the convenience of calibration, the present invention defines the coordinate systems of each part of the lidar as follows, which satisfies the definition method of the right-hand coordinate system, and specifically includes the following content: First, define the lidar lower plate coordinate system {L}, whose origin is located at the geometric center of the base mounting plane of the lidar lower plate, its X-axis is opposite to the direction of the bottom cable outlet, its Z-axis coincides with the low-speed rotating shaft 1, and its Y-axis is obtained from the right-hand coordinate system.
[0034] Then, define the lidar upper plate coordinate system {U}, which is obtained by translating the lidar lower plate coordinate system {L} upward along its Z-axis by a distance , and then rotating by an angle around the Z-axis, where the parameter is a fixed value determined by the hardware structure, and the angle is the rotation angle around the low-speed rotating shaft 1.
[0035] Secondly, define the high-speed rotor coordinate system {A}, which is obtained by translating the lidar upper plate coordinate system {U} along its X-axis by a distance , then rotating by a small angle around the Y-axis, and finally rotating by an angle around the x-axis, where the parameter is a fixed value determined by the hardware structure, the angle is the structural micro error value, and the angle is the rotation angle around the high-speed rotating shaft 3.
[0036] Furthermore, a laser emission tube coordinate system {B} is defined, which is obtained by rotating the high-speed rotor coordinate system {A} by an angle along its Z-axis. The laser direction of the laser emission tube is consistent with the Y-axis direction of the laser emission tube coordinate system {B}, and the angle is the structural micro error value.
[0037] Finally, considering that due to the installation position deviation, the encoder installation positions of the upper and lower motors will not be strictly located at the zero angle position, the present invention additionally adds a deviation value to the rotation angle of the lower motor and adds a deviation value to the rotation angle of the upper motor.
[0038] Meanwhile, the present invention constructs a pose transformation expression to represent the pose transformation from coordinate system 1 to coordinate system 2, and its expression is as follows:
[0039] where are the translation amounts respectively, and are the rotation Euler angles respectively.
[0040] Thus, the present invention can obtain: The pose transformation from the lidar lower plate coordinate system {L} to the lidar upper plate coordinate system {U} is:
[0041] The pose transformation from the lidar upper plate coordinate system {U} to the high-speed rotor coordinate system {A} is:
[0042] The pose transformation from the high-speed rotor coordinate system {A} to the laser emission tube coordinate system {B} is:
[0043] In this embodiment, in step 2, the method for screening calibration parameters based on four coordinate systems is as follows: In the above pose transformation, the parameters that do not need to be calibrated are as follows: and are the rotation angle values of the lower motor and the upper motor respectively, which are directly read by the encoder and do not need to be calibrated.
[0044] and It can be directly obtained from the design parameters of the mechanical structure, and the influence of its tiny deviation on the coordinate calculation of the laser point can be ignored, so calibration is not required either.
[0045] is the initial deviation angle of the encoder of the lower motor, which has no influence on the overall point cloud quality, so calibration is not required here either.
[0046] The parameters that need to be calibrated are as follows: is the starting angle deviation of the rotating shaft of the upper motor, and its expected mean value is equal to 0.
[0047] is the structural angle deviation of the rotating shaft of the upper motor around the Y-axis, and its expected mean value is equal to 0.
[0048] is the structural angle deviation of the laser emission tube around the Z-axis, and its expected mean value is equal to 0.
[0049] In addition, considering the error of the laser ranging itself, let the original value of the laser measurement be , the measured distance value be , the ranging deviation be , the distance scale factor be , then the expression of the distance measurement formula is as follows:
[0050] Among them, the parameters that need to be calibrated include the ranging deviation and the distance scale factor . The mean value of the ranging deviation is equal to 0; the mean value of the distance scale factor is equal to 1.
[0051] Furthermore, the present invention uniformly records all the parameters that need to be calibrated as a vector, and its expression is as follows:
[0052] In this embodiment, the method for obtaining the laser measurement value and performing coordinate transformation on the laser measurement value according to the calibration parameters to obtain the three-dimensional space coordinate points is as follows: Take the design value of the lidar structure as the initial value and input it into the hardware of the lidar to obtain a measured distance in the coordinate system {B} of the laser emission tube. For a measured distance in the coordinate system {B} of the laser emission tube, assume that its corresponding space point is P, and the corresponding coordinate is . Assume that the coordinate of this point in the coordinate system {L} of the lower plate of the lidar is , then the calculation is as follows according to the pose transformation relationship:
[0053] Among them, is a rotation matrix that rotates a certain angle around the corresponding axis, , , are the characteristic elements in the rotation matrix respectively, is the translation amount from coordinate system to coordinate system , is the translation amount from coordinate system to coordinate system .
[0054] The step-by-step calculation of the above pose transformation is as follows: Rotate point P around the Z axis by an angle , and obtain the first coordinate point after rotation. The expression of its coordinates is as follows:
[0055] Among them, c is the trigonometric function cos, and s is the trigonometric function sin.
[0056] Rotate the first coordinate point around the X axis by an angle , and obtain the second coordinate point. The expression of its coordinates is as follows:
[0057] Rotate the second coordinate point around the Y axis by an angle , and obtain the third coordinate point. The expression of its coordinates is as follows:
[0058] For the third coordinate point, add the translation amount , and obtain the fourth coordinate point. The expression of its coordinates is as follows:
[0059] Furthermore, simplify the variables in the coordinate formula to obtain the following expression:
[0060] Finally, rotate the fourth coordinate point around the Z axis by an angle , and add the translation amount , and obtain the fifth coordinate point. The expression of its coordinates is as follows:
[0061] Finally, take the fifth coordinate point as the three-dimensional space coordinate point of the laser measurement value , and its expression is as follows:
[0062] In this embodiment, in step 4, based on the three-dimensional space coordinate points, plane fitting and error calculation are performed to obtain the error information as follows: As Figure 4 shown, the present invention uses three calibration fitting planes to calibrate the lidar. The three planes are successively perpendicular to the positive half-axis of the Y-axis, the negative half-axis of the Y-axis, and the positive half-axis of the Z-axis of the lidar coordinate system, and are respectively called P1, P2, and P3.
[0063] According to the known current calibration parameters , the present invention caches the original lidar data for a period of time, and then uses the above-mentioned space coordinate conversion method and uses the current calibration parameters to convert these original data into three-dimensional point coordinates in the lidar coordinate system, denoted as the set , and this set contains a total of n points, that is:
[0064] For a plane in three-dimensional space, let the plane normal vector be , the intercept be , and any point on the plane be , then the plane equation is:
[0065] By combining the plane normal vector and the intercept into a four-dimensional vector, the plane parameter in the form of a four-dimensional vector can be obtained, and its expression is as follows:
[0066] For a three-dimensional space point coordinate, by adding a 1 at the end, it can be changed into a four-dimensional homogeneous coordinate, and then the three-dimensional space point has the following expression:
[0067] For a three-dimensional space point in the point set X, the geometric distance from this point to the above plane is:
[0068] In order to obtain the optimal plane parameters by fitting all the points in the point set X, the plane parameters that minimize the average squared distance from all points to the fitting plane can be solved. Therefore, the present invention only needs to solve the solution of the linear least squares in the following form :
[0069] For the convenience of using matrix solution, all the points in the point set X can be written in the same matrix, and the matrix The expression is as follows:
[0070] Then, rewrite the least - squares formula in the above summation form into the least - squares formula in matrix form, and its expression is as follows:
[0071] Perform singular value decomposition on the above matrix, and its calculation formula is as follows:
[0072] Among them, is the singular value matrix, which is a diagonal matrix with diagonal elements arranged from largest to smallest. Both U and V are orthogonal matrices. In the present invention, take the last column of matrix V That is the solution of the least - squares formula, and its expression is as follows:
[0073] Finally, the present invention calculates the average distance from all points in the point set X to the fitted plane as the error value of this plane, and its expression is as follows:
[0074] To ensure the consistency in all directions, the present invention calculates the errors of three planes in total, including the error in the positive - half - axis direction of the Y - axis in the lidar coordinate system, the error in the negative - half - axis direction of the Y - axis, and the error in the positive - half - axis direction of the Z - axis. The present invention respectively denotes the errors of these three planes as , and , and then takes the average value as the overall error, and its calculation formula is as follows:
[0075] In this embodiment, in step 5, according to the error information, perform dynamic binary - search calibration on the calibration parameters to obtain new calibration parameters; then write the results of the new calibration parameters into the lidar hardware, and then execute steps 3 and 4 to obtain new error information. The method is as follows: First, initialize the initial values of all parameters Then, cache a set of original radar data packets, which include measurement values such as the ranging value and motor angle value of the lidar, and use this set of data for one - round calibration. In one - round calibration, the present invention decouples the parameters and performs dynamic binary - search calibration respectively in sequence, which can simplify the calibration process and avoid the coupling between parameters. The calibration sequence is as follows: The first step is to calibrate the starting - angle deviation of the upper motor ; The second step is to calibrate the pitch angle of the upper motor ; Step 3: Calibrate the angular deviation of the laser emitter ; Step 4: Calibrate the ranging deviation ; Step 5: Calibrate the measurement distance scale ; Step 6: Detect whether the current round of calibration is successful. If the calibration is successful or the maximum allowable number of calibration rounds is exceeded, the calibration ends.
[0076] Finally, write the calibration parameter results to the lidar hardware.
[0077] In this embodiment, the method of dynamic binary search calibration for a single parameter is as follows: Given a parameter to be calibrated, obtain the approximate mean and variance of its distribution. The mean is the theoretical value of the structural design, and the variance is the variance value caused by actual processing. Relative to the calibration search range, the variance can be small enough to be negligible. Here, taking the calibration of the starting angular deviation as an example, it follows a Gaussian distribution, and its expression is as follows:
[0078] where, is the mean of the starting angular deviation , is the Gaussian distribution function, is the starting angular deviation variance.
[0079] Standard deviation is mainly determined by the machining and assembly accuracy. The present invention sets a sufficiently large boundary as the subsequent calibration search range. In this embodiment, the maximum boundary takes a value of , and satisfies:
[0080] For the starting angular deviation , the present invention will use as its calibration initial value and as its calibration search range.
[0081] Divide the search range into N equal parts. Here, take , then the search step size is:
[0082] During the search, traverse sequentially from front to back within the current search range of this parameter according to this step size to obtain a new calibration parameter; then write the result of the new calibration parameter into the lidar hardware, and then execute steps 3 and 4 to obtain new error information, and further find the optimal value. , and its calculation formula is as follows:
[0083] Adopt the same method as the calibration parameter to automatically search for the remaining parameters , and to find the optimal value, that is, the parameter value that minimizes the comprehensive error.
[0084] Finally, calibrate the distance scale parameter. Using the point sets of the selected plane 1 and plane 2, fit the parameters of the two planes respectively, and set them as and . Then calculate the distance between the two planes, and its calculation formula is as follows:
[0085] where , are the parameters (intercepts) of the plane equation.
[0086] Given that the actual distance between plane 1 and plane 2 is , then the relevant formula for calculating the distance scale is as follows:
[0087] In this embodiment, in step 6, according to the new error information, judge the new calibration parameter. If the requirement is not met, execute step 5. If the requirement is met, the method for determining the final calibration parameter is as follows: At this time, all parameters have been updated once. The present invention then statistically calculates the value of the average error E of the fitting of the three planes. If the overall error is less than the given calibration threshold, it is considered that the calibration is successful and the calibration ends; otherwise, the next round of data collection and search calibration is performed. The threshold set here is as follows:
[0088]
[0089] In the next round of calibration, the present invention takes the optimal value of each parameter obtained in the previous round of calibration as the new mean value, and dichotomously reduces the search range of this parameter to obtain a new search mean value and range, and its expression is as follows:
[0090] Among them, is the optimal value obtained from the previous round of calibration.
[0091] Similarly for other parameters. Here, the present invention lists the initial values and search ranges of all parameters as follows:
[0092] Among them, is the mean value of the starting angle deviation and is also the initial value of the starting angle deviation ; is the maximum boundary of the value taken by the starting angle deviation ; is the mean value of the structural angle deviation of the upper motor rotating shaft around the Y-axis and is also the initial value of the structural angle deviation ; is the maximum boundary of the value taken by the structural angle deviation ; is the mean value of the structural angle deviation of the laser emitting tube around the Z-axis and is also the initial value of the structural angle deviation of the laser emitting tube around the Z-axis ; is the maximum boundary of the value taken by the structural angle deviation of the laser emitting tube around the Z-axis ; is the mean value of the ranging deviation and is also the initial value of the ranging deviation ; is the maximum boundary of the value taken by the ranging deviation ; is the mean value of the distance scale factor and is also the initial value of the distance scale factor ; is the maximum boundary of the value taken by the distance scale factor .
[0093] In this embodiment, the data processing method is as follows: The initial values of all parameters are set in sequence as: . Among them, the search ranges of the first three parameters are all , and the search range of the fourth parameter rb is .
[0094] The search range of the first parameter is evenly divided into 50 parts. Traverse the parameters, calculate the error values respectively, and find the parameter value that makes the comprehensive error the smallest, and take it as the search result of this round.
[0095] Using the same method, the search results for the second, third, and fourth parameters can be obtained. For example, the results of the first four parameters are respectively .
[0096] The fifth parameter does not require searching and is directly obtained according to the method of calibrating the distance scale parameter.
[0097] Finally, calculate the comprehensive error to determine whether the calibration can be ended. If not satisfied, continue the next round of calibration.
[0098] For the comparison of the point cloud effects of a certain lidar before and after calibration, refer to Figures 5 - 10 , where Figure 5 , Figure 6 , Figure 7 are the effect diagrams before calibration, Figure 8 , Figure 9 , Figure 10 are the effect diagrams after calibration. It can be seen that before calibration, the point cloud on the plane is uneven with protrusions and stratifications; after calibration, the plane point cloud becomes flat and the stratifications disappear.
[0099] Therefore, the present invention drives parameter search through the plane fitting error, without manual intervention or specific calibration objects. Using the vertical plane (such as a wall surface) in the natural scene as a constraint, through multi-plane joint optimization, parameter calibration is realized. At the same time, the present invention decouples the key parameters into independent optimization modules, adopts a step-by-step search strategy, and reduces the search range by setting the Gaussian distribution initial value and the dynamic dichotomy method, avoiding the coupling interference between parameters, improving the convergence speed, and the calibration speed is significantly better than the traditional manual calibration.
[0100] Furthermore, the present invention designs a dedicated calibration process for the mechanical deviation and ranging error of low-cost lidars, and solves the non-linear response problem of low-cost sensors through dynamic correction of the distance scale factor.
[0101] At the same time, the present invention takes the average error E of plane fitting as the optimization goal, combines with the singular value decomposition (SVD) algorithm to solve, and realizes high-precision point cloud registration. By reducing the parameter search step size through multiple rounds of iteration, the final error can be controlled within 0.02m.
[0102] Experiments show that the single calibration success rate of the present invention > 95%, and the single calibration time is shortened by more than 70% compared with the traditional manual method.
[0103] An equipment embodiment applying the method of the present invention:[[]] An electronic device, which includes: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the above-described calibration method and system for a lidar.
[0104] An embodiment of a computer medium applying the method of the present invention: A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the above-described calibration method and system for a lidar.
[0105] Those skilled in the art should understand that the embodiments of the present application may be provided as a method, a system, or a computer program product. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, optical storage, etc.) containing computer-usable program code.
[0106] The present application is described with reference to the flowcharts and / or block diagrams of the methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine such that the instructions executed by the processors of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0107] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to produce a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0109] The model in this application is an object that constitutes an objective descriptive morphological structure with the help of physical or virtual representations. The object is not equal to an object and is not limited to physical and virtual. It can be a data processing function, software program, processing mode, usage method, operation method, workflow, application process, electronic hardware, circuit module, processing system, system imitation, or simulation object.
[0110] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art can still modify or equivalently replace the specific implementation manners of the present invention. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the protection scope of the claims of the present invention.
Claims
1. A laser radar calibration method, characterized in that: The following steps are involved: Step 1: Obtain the raw data of a laser radar through a pre-built data acquisition model; Step 2: Using the pre-built three-dimensional coordinate transformation model, based on the correspondence between the measurement points and the spatial coordinate system, the original measurement data is transformed into spatial coordinates to obtain several three-dimensional point coordinates in the laser radar coordinate system; Step 3: using a pre-built fitting error calculation model to calculate the distance value between the three-dimensional coordinate point and the calibrated fitting plane, and based on the distance value, determining the overall error value between a number of three-dimensional coordinate points and the calibrated fitting plane; Step 4: Use the pre-built parameter calibration model to adjust one or more parameters of the lidar according to the overall error value to obtain parameter calibration information.
2. A laser radar calibration method as claimed in claim 1, characterized in that: Step 1: The method for obtaining the raw data of a laser radar through a pre-built data acquisition model is as follows: Obtain the coordinate system information of a certain laser radar, which at least includes the positive half axis of the Y axis, the negative half axis of the Y axis, and the positive half axis of the Z axis; According to the coordinate system information and the natural scene information, three measurement planes are selected, including a first measurement plane perpendicular to the positive half axis of the Y axis, a second measurement plane perpendicular to the negative half axis of the Y axis, and a third measurement plane perpendicular to the positive half axis of the Z axis; The designed parameter values of the laser radar are used as the initial parameter values and input into the hardware of the laser radar to obtain the initially calibrated laser radar; Then, the initially calibrated laser radar is used to measure the first measurement plane, the second measurement plane and the third measurement plane respectively to obtain raw measurement data.
3. The laser radar calibration method according to claim 1, characterized in that: Step 2: Using the pre-built three-dimensional coordinate transformation model, based on the correspondence between the measurement points and the spatial coordinate system, the spatial coordinate transformation of the original measurement data is performed to obtain the coordinates of several three-dimensional points in the laser radar coordinate system as follows: Based on the measurement raw data, one or more measurement space points are obtained; Construct a multi-dimensional coordinate system based on the correspondence between the measurement points and the spatial coordinate system; Based on the multi-dimensional coordinate system, the measurement space point is rotated around the Z axis by a first angle to obtain a first coordinate point after rotation; The first coordinate point is rotated around the X axis by a second angle to obtain a second coordinate point; The second coordinate point is rotated around the Y axis by a third angle to obtain a third coordinate point; For the third coordinate point, add the first translation amount to obtain the fourth coordinate point; Then the fourth coordinate point is rotated around the Z axis by an angle, and the second translation amount is added to obtain the fifth coordinate point; The fifth coordinate point is used as the three-dimensional space coordinate point of the laser measurement value; Summarize several three-dimensional space coordinate points to obtain several three-dimensional point coordinate points in the laser radar coordinate system.
4. A laser radar calibration method as claimed in claim 3, characterized in that: According to the correspondence between the measurement points and the spatial coordinate system, the method of constructing a multidimensional coordinate system is as follows: Obtain the structural data of a lidar, which includes lidar lower board information, lidar upper board information, high-speed rotor information, laser emitter information, rotation speed information, and degree of freedom information; The rotation speed information includes the low-speed rotation information of the lidar upper board relative to the lidar lower board and the high-speed rotation information of the high-speed rotor relative to the lidar upper board. The degree of freedom information is two active degrees of freedom; According to the structural data, determine the pose transformation information, which includes the pose transformation information from the lidar lower board to the lidar upper board, the pose transformation information from the lidar upper board to the high-speed rotor, and the pose transformation information from the high-speed rotor to the laser emitter; Based on the pose transformation information, set the coordinate systems of each part of the lidar, which includes the lidar lower board coordinate system {L}, the lidar upper board coordinate system {U}, the high-speed rotor coordinate system {A}, and the laser emitter coordinate system {B}.
5. A calibration method for a lidar as claimed in claim 4, wherein: The origin of the lidar lower board coordinate system {L} is located at the geometric center of the installation plane of the lidar lower board base. The positive half-axis of its X-axis is opposite to the direction of the bottom cable outlet. Its Z-axis coincides with the low-speed rotation axis, and its Y-axis is obtained by the right-hand coordinate system; The lidar upper board coordinate system {U} is obtained by translating and rotating the lidar lower board coordinate system {L}; The high-speed rotor coordinate system {A} is obtained by translating and rotating the lidar upper board coordinate system {U}; The laser emitter coordinate system {B} is obtained by rotating the high-speed rotor coordinate system {A}; The laser direction of the laser emitter is consistent with the positive half-axis direction of the Y-axis of the laser emitter coordinate system {B}.
6. A calibration method for a lidar as claimed in claim 5, wherein: The first angle represents the structural error value of the laser emitter rotating around the Z-axis, and its expected mean value is equal to 0; The second angle represents the sum of the rotation angle value of the upper motor and the deviation value of the starting angle of the upper motor shaft; The third angle represents the structural error value of the upper motor shaft rotating around the Y-axis, and its expected mean value is equal to 0; The first translation amount represents the translation amount from the lidar lower board coordinate system {L} to the lidar upper board coordinate system {U}; The second translation amount represents the translation amount from the lidar upper board coordinate system {U} to the laser emitter coordinate system {B}; The rotation angle represents the rotation angle of the lower motor, and its value is directly read by the encoder.
7. A calibration method for a lidar as claimed in claim 1, wherein: Step three, use a pre-constructed fitting error calculation model to calculate the distance value between the three-dimensional coordinate points and the calibration fitting plane, and based on the distance value, determine the overall error value of several three-dimensional coordinate points and the calibration fitting plane as follows: Obtain the coordinates of several three-dimensional points in the lidar coordinate system; According to the positions of the first measurement plane, the second measurement plane, and the third measurement plane in the three-dimensional space, respectively construct the corresponding calibration fitting planes, which include the first calibration fitting plane perpendicular to the positive half-axis of the Y-axis, the second calibration fitting plane perpendicular to the negative half-axis of the Y-axis, and the third calibration fitting plane perpendicular to the positive half-axis of the Z-axis; Calculate the distance value between each three-dimensional point coordinate and each calibration fitting plane to obtain several distance values; Classify several distance values, and calculate the average distance from all three-dimensional points to each calibrated fitting plane to obtain three average distance values; Take the three average distance values as the error values of the corresponding calibrated fitting planes, and perform an averaging calculation to obtain the overall error value.
8. A calibration method for a lidar according to claim 7, characterized in that: The method for constructing the corresponding calibrated fitting plane according to the position of the first measurement plane in the three-dimensional space is as follows: Based on the position of the first measurement plane in the three-dimensional space, set the plane normal vector and intercept, and based on any point on the first measurement plane, establish a plane equation for fitting the first measurement plane; Combine the plane normal vector and intercept into a four-dimensional vector, rewrite the plane equation, and obtain the initial plane parameters in the form of four-dimensional vectors; Based on the initial plane parameters, establish an initial calibrated fitting plane; For any three-dimensional coordinate point, add a 1 at the end to change it to a four-dimensional homogeneous coordinate to obtain a four-dimensional coordinate point; Calculate the geometric distance between the four-dimensional coordinate point and the initial calibrated fitting plane to obtain several geometric distances; According to several geometric distances, solve for the optimal plane parameters to minimize the average squared distance from all four-dimensional coordinate points to the calibrated fitting plane; According to the optimal plane parameters, construct the corresponding calibrated fitting plane.
9. A calibration method for a lidar according to claim 1, characterized in that: Step 4, use the pre-constructed parameter calibration model, and according to the overall error value, adjust one or more parameters of the lidar to obtain the parameter calibration information as follows: Step 41, according to the overall error value, perform dynamic binary search calibration on the calibration parameters to obtain new calibration parameters; Step 42, then write the new calibration parameter results into the lidar hardware, cache a new set of radar measurement values, and use this set of data to calibrate the starting angle deviation of the upper motor to obtain a new starting angle deviation; According to the new starting angle deviation, calibrate the structural error value of the upper motor to obtain a new structural error value of the upper motor; Based on the new structural error value of the upper motor, calibrate the structural error value of the laser emitter to obtain a new structural error value of the laser emitter; According to the new structural error value of the laser emitter, calibrate the ranging deviation to obtain a new ranging deviation; Step 43, summarize the new starting angle deviation, the structural error value of the upper motor, the structural error value of the laser emitter, and the ranging deviation to obtain new calibration parameters, and based on the new calibration parameters, calculate a new overall error value; Step 44, judge the new overall error value. When the new overall error value is less than the given calibration threshold, it is considered that the calibration is successful and the calibration ends, and the new calibration parameters are used as the final parameter calibration information; Otherwise, execute steps 41 to 44.
10. A calibration system for a lidar, characterized in that: It includes: One or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors are caused to implement a calibration method for a lidar as described in any one of claims 1-9.
Citation Information
Patent Citations
3D laser radar and foot type robot and cleaning robot applying 3D laser radar
CN115144839A
External parameter calibration method and device, intelligent robot and computer readable storage medium
CN111190153A
Laser radar parameter calibration method and device
CN113466834A
Method and device for detecting precision of internal parameter of laser radar
US20200081105A1