A method for calibration of lidar deviation
By using a deviation calibration method for lidar, the lidar is controlled to perform point cloud scanning. By utilizing coordinate system transformation and iterative optimization of deviation parameters, the problem of reduced lidar measurement accuracy is solved, achieving higher measurement accuracy and reliability.
Patent Information
- Application Number
- CN202510466249.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-04-11
AI Technical Summary
As lidar is used for a longer period of time, deformation of internal structural components leads to a decrease in measurement accuracy, affecting the accuracy of measuring objects in three-dimensional space.
By controlling the lidar to perform point cloud scanning, the sampling coordinate values and angle parameters of the sampling points are obtained. Using the transformation relationship between the lidar spherical coordinate system and the gimbal's three-dimensional rectangular coordinate system, compensation deviation parameters are set, and the deviation parameters are iteratively optimized until the deviation is minimized, thereby achieving the deviation calibration of the lidar.
This improves the accuracy of lidar in measuring objects and ensures that measurement deviations in the scanning system are effectively compensated, thereby enhancing the precision and reliability of the measurement.
Smart Images

Figure CN119986612B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lidar scanning measurement technology, and in particular to a method for lidar deviation calibration. Background Technology
[0002] LiDAR is a radar system that uses laser beams to detect the position, velocity, and other characteristics of a target. Its working principle is to emit a detection signal (laser beam) towards the target, and then compare the received signal reflected back from the target (target echo) with the emitted signal. After appropriate processing, relevant information about the target can be obtained, such as the target's distance, azimuth, altitude, speed, attitude, and even shape parameters, thereby enabling the detection, tracking, and identification of targets such as aircraft and missiles.
[0003] In order to enable lidar to measure objects in a three-dimensional space, it is necessary to control the lidar to collect the three-dimensional point cloud of the target object from different angles and orientations by using motion scanning. However, as the lidar is used for a longer period of time, deformation inevitably occurs inside the lidar and in the structural components that drive the lidar to move, which may lead to a decrease in the measurement accuracy of the lidar. Summary of the Invention
[0004] The purpose of this invention is to provide a deviation calibration method for lidar, which can calibrate the deviation compensation amount of lidar scanning measurement, improve the accuracy of lidar in measuring objects and scenes, and facilitate the widespread application of lidar.
[0005] To solve the above-mentioned technical problems, the present invention provides a deviation calibration method for a lidar, wherein the lidar is connected to a gimbal for driving the lidar to rotate; the deviation calibration method includes:
[0006] The lidar is controlled to perform point cloud scanning on the measurement plane to obtain the sampling coordinate values of each sampling point in the lidar spherical coordinate system and the angle parameters of the gimbal driving the lidar to rotate when acquiring each sampling point.
[0007] Based on the transformation relationship between the lidar spherical coordinate system and the gimbal three-dimensional rectangular coordinate system, the set compensation deviation parameters, and the angle parameters corresponding to each sampling point, the sampling coordinate values are compensated and transformed to obtain the compensation coordinate values of the compensation sampling points corresponding to each sampling point in the gimbal three-dimensional rectangular coordinate system.
[0008] The center reference plane of each compensation sampling point is determined based on the compensation coordinate values;
[0009] The compensation deviation parameter is iteratively optimized by taking the deviation of each compensation sampling point relative to the central reference plane as the optimization objective, until the compensation deviation parameter corresponding to the minimum deviation is obtained, which is then used as the calibration deviation parameter.
[0010] In one optional embodiment of this application, the lidar includes a plurality of lasers arranged sequentially along a predetermined straight line.
[0011] Controlling the lidar to perform point cloud scanning on the measurement plane includes:
[0012] The laser in the lidar is controlled to rotate around a first rotation axis, and the lidar is driven to rotate around a second rotation axis via the gimbal, and each laser is synchronously controlled to perform point cloud scanning on the position points on the measurement plane; wherein, the first rotation axis and the set straight line direction are parallel to each other, and the first rotation axis and the second rotation axis are perpendicular to each other.
[0013] In one optional embodiment of this application, the angle between the scanning direction of each laser and the set straight line direction gradually decreases from the middle position to the two ends position;
[0014] The second axis of rotation is a horizontal axis of rotation.
[0015] In one optional embodiment of this application, the sampled coordinate values include distance, polar angle, and azimuth angle; the angle parameters include tilt angle.
[0016] Wherein, the distance is the straight-line distance between the sampling point and the origin of the lidar spherical coordinate system;
[0017] The polar angle and the azimuth angle are respectively the lines connecting the sampling point and the origin of the lidar spherical coordinate system, and the lines in the lidar's three-dimensional rectangular coordinate system. shaft and The angle between the axes; wherein the origin of the three-dimensional rectangular coordinate system of the lidar coincides with the origin of the spherical coordinate system of the lidar; the The shaft coincides with the first rotation axis, the The shaft coincides with the second rotation axis;
[0018] The tilt angle is the angle at which the gimbal controls the lidar to rotate around the second rotation axis when the sampling point is scanned.
[0019] In one optional embodiment of this application, the lidar spherical coordinate system and the lidar three-dimensional rectangular coordinate system are two relatively stationary coordinate systems, and both are coordinate systems that move relative to the three-dimensional rectangular coordinate system of the platform about the second rotation axis;
[0020] The X-axis and Y-axis of the platform's three-dimensional Cartesian coordinate system are both horizontal, and the Z-axis is vertical; furthermore, the Y-axis of the platform's three-dimensional Cartesian coordinate system and the laser radar's three-dimensional Cartesian coordinate system... Axis coincidence.
[0021] In one optional embodiment of this application, the compensation deviation parameters set include internal compensation deviation parameters and shaft compensation deviation parameters;
[0022] The internal compensation deviation parameters include distance compensation amount, polar angle compensation amount, and azimuth angle compensation amount, respectively, for compensating the distance, polar angle, and azimuth angle.
[0023] The shaft compensation deviation parameters include a first translation compensation amount, a second translation compensation amount, a first rotation compensation angle, and a second rotation compensation angle, which are set to compensate for the roll angle.
[0024] Wherein, the first translation compensation amount and the second translation compensation amount are respectively for compensating the translational deviations in the Z-axis and X-axis directions of the three-dimensional rectangular coordinate system of the platform introduced when the platform-driven lidar rotates; the first rotation compensation angle and the second rotation compensation angle are respectively for compensating the angular deviations relative to the Z-axis and X-axis of the three-dimensional rectangular coordinate system of the platform introduced when the platform-driven lidar rotates.
[0025] In an optional embodiment of this application, the sampled coordinate values are compensated and converted into compensated coordinate values in the gimbal coordinate system according to the transformation relationship between the lidar spherical coordinate system and the gimbal coordinate system and a set compensation deviation parameter, including:
[0026] The sampled coordinate values are compensated according to the internal compensation deviation parameter and then converted into preliminary compensated coordinate values in the three-dimensional motion rectangular coordinate system of the lidar. ;in, ; For the first The sampling coordinate values of the sampling points; These are the distance compensation amount, the polar angle compensation amount, and the azimuth angle compensation amount, respectively.
[0027] Based on the transformation relationship between the lidar's three-dimensional rectangular coordinate system and the gimbal's three-dimensional rectangular coordinate system, and the axis compensation deviation parameters, the gimbal compensation matrix is determined. ,in, , ; , , For the first translation compensation amount, For the second translation compensation amount, The first rotation compensation angle, This is the second rotation compensation angle;
[0028] The preliminary compensation coordinate values are converted into the actual compensation coordinate values based on the gimbal compensation matrix and the platform transformation matrix. ;in, Let be the transformation matrix of the platform. , For the first The tilt angle corresponding to each of the sampling points.
[0029] In an optional embodiment of this application, determining the center reference plane corresponding to the compensation value of each sampling point based on the compensation coordinate value includes:
[0030] The fitting plane corresponding to each compensation sampling point is determined based on the compensation coordinate values, and the fitting plane is used as the center reference plane.
[0031] In an optional embodiment of this application, the compensation deviation parameter is iteratively optimized using the deviation value of each compensation coordinate value relative to the central reference plane as the optimization target, including:
[0032] The standard deviation of the vertical distance from each compensation sampling point to the central reference plane is determined using each compensation coordinate value as the objective function. The compensation deviation parameter is iteratively optimized until the standard deviation of the distance is minimized.
[0033] In one optional embodiment of this application, the compensation deviation parameter is iteratively optimized until the distance standard deviation is minimized, including:
[0034] The compensation deviation parameter is iteratively optimized until the distance standard deviation is minimized;
[0035] The iteration process ends when the norm of the change in the compensation deviation parameter is lower than the preset threshold in two consecutive optimization iterations.
[0036] This invention provides a deviation calibration method for a lidar, wherein the lidar is connected to a gimbal for driving its rotation. The deviation calibration method includes: controlling the lidar to perform point cloud scanning on a measurement plane to obtain the sampling coordinate values of each sampling point in the lidar's spherical coordinate system and the angle parameters of the gimbal driving the lidar to rotate when acquiring each sampling point; performing compensation transformation on each sampling coordinate value according to the transformation relationship between the lidar's spherical coordinate system and the gimbal's three-dimensional rectangular coordinate system, the set compensation deviation parameters, and the angle parameters corresponding to each sampling point, to obtain the compensation coordinate values of the compensation sampling points corresponding to each sampling point in the gimbal's three-dimensional rectangular coordinate system; determining the central reference plane of each compensation sampling point based on the compensation coordinate values; using the deviation of each compensation sampling point relative to the central reference plane as the optimization target, iteratively optimizing the compensation deviation parameters until the compensation deviation parameter corresponding to the minimum deviation is obtained, which is then used as the calibration deviation parameter.
[0037] In this application, the lidar is controlled to scan a measurement plane using point cloud technology. After obtaining the sampled coordinate values of each sampling point on the measurement plane, under the condition that the entire scanning system is error-free, the coordinate values of each sampled point, when converted to the coordinate values in the three-dimensional rectangular coordinate system of the gimbal, should also represent points located in the same plane. Based on this, this application sets a compensation deviation parameter to compensate for the deviation of the entire scanning system. The coordinate values are compensated during the conversion of the sampled coordinate values of each sampling point to the three-dimensional rectangular coordinate system of the gimbal, resulting in compensated coordinate values. The accuracy of the compensation deviation parameter is then verified based on the magnitude of the deviation between each compensated sampling point and the central reference plane, thereby optimizing the compensation deviation parameter. Finally, a set of compensation deviation parameters is determined that ensures that the compensated sampling points have a relatively small deviation from the central reference plane as calibration deviation parameters. When subsequently using the lidar to scan objects in a three-dimensional space, these calibration deviation parameters are used to compensate and correct the acquired point cloud, ensuring the accuracy of the target measurement and facilitating the widespread application of lidar. Attached Figure Description
[0038] To more clearly illustrate the technical solutions of the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A schematic flowchart illustrating the deviation calibration method for a lidar provided in an embodiment of this application;
[0040] Figure 2 This is a schematic diagram of the structure of the lidar scanned point cloud provided in this application;
[0041] Figure 3 This is a schematic diagram of the distribution structure of the internal lasers of a lidar provided in an embodiment of this application;
[0042] Figure 4 This is a lateral schematic diagram illustrating the relative positional relationship between the compensation sampling point and the central reference plane provided in an embodiment of this application. Detailed Implementation
[0043] The core of this invention is to provide a deviation calibration method for lidar, which can improve the accuracy of lidar in measuring targets to a certain extent.
[0044] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0045] like Figures 1 to 4 As shown, Figure 1 A schematic flowchart illustrating the deviation calibration method for a lidar provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of the lidar scanned point cloud provided in this application; Figure 3 This is a schematic diagram of the distribution structure of the internal lasers of a lidar provided in an embodiment of this application; Figure 4 This is a lateral schematic diagram illustrating the relative positional relationship between the compensation sampling point and the central reference plane provided in an embodiment of this application.
[0046] In one specific embodiment of this application, the deviation calibration method of the lidar may include:
[0047] S1: Control the lidar to perform point cloud scanning on the measurement plane, obtain the sampling coordinate values of each sampling point in the lidar spherical coordinate system, and obtain the angle parameters of the gimbal driving the lidar to rotate when acquiring each sampling point.
[0048] S2: Based on the transformation relationship between the lidar spherical coordinate system and the gimbal's three-dimensional rectangular coordinate system, the set compensation deviation parameters, and the angle parameters corresponding to each sampling point, the sampling coordinate values are compensated and transformed to obtain the compensation coordinate values of the corresponding compensation sampling points in the gimbal's three-dimensional rectangular coordinate system.
[0049] S3: Determine the center reference plane of each compensation sampling point based on the compensation coordinate values;
[0050] S4: Using the deviation of each compensation sampling point relative to the central reference plane as the optimization objective, iteratively optimize the compensation deviation parameter until the compensation deviation parameter corresponding to the minimum deviation is obtained as the calibration deviation parameter.
[0051] Reference Figure 2 In this application, to calibrate the lidar, a wall surface or other flat surface is used as the measurement plane. Various points on the measurement plane are scanned and acquired. Obviously, all points on the measurement plane must lie on the same plane. Therefore, during the lidar's measurement of these points, if the lidar's measurement is completely error-free, then all the sampling points acquired by the lidar must lie on the same plane. This can be used as a standard to subsequently determine the accuracy of the compensated and corrected coordinate values in this application.
[0052] Based on this, further referencing Figure 2 and Figure 3 The lidar of this application includes multiple lasers arranged along a predetermined straight line. It is understood that each laser can acquire and measure data at a single point on a measurement plane, while multiple lasers arranged in a straight line can acquire and measure data at multiple points along this predetermined straight line. In practical applications, to expand the measurement range of each laser along this predetermined straight line, the angle between the scanning direction of each laser located in the middle and at both ends and the predetermined straight line gradually increases; that is, the scanning direction of each laser is approximately outward-diverging.
[0053] Furthermore, each laser can be mounted on the same bearing, which is connected to the shaft of a rotary motor, thereby enabling the rotary motor to drive each laser to rotate synchronously. In practical applications, the shaft of the rotary motor can be parallel to the aforementioned set linear direction, and the rotary motor can drive each laser to rotate around a first rotation axis, which is parallel to the arrangement direction of each laser. Obviously, as the rotary motor drives the rotation of each laser, each laser in the lidar can achieve acquisition and measurement in the second dimension.
[0054] Furthermore, to further enhance the measurement range of the lidar in three-dimensional space, this application further mounts the lidar on a gimbal capable of driving its rotation. This allows each laser to perform acquisition and measurement in a third dimension as the lidar rotates with the gimbal. In this embodiment, the gimbal-driven lidar rotates around a second rotation axis, which should be perpendicular to the first rotation axis. Figure 2 As shown, in Figure 2In the embodiment shown, the second rotation axis is a horizontal rotation axis; therefore, the first rotation axis for the rotation of each laser should be located in a vertical plane perpendicular to the second rotation axis, and since the gimbal is used to drive the entire lidar to rotate around the second rotation axis, the first rotation axis should also rotate and change in the vertical plane around the second rotation axis as the lidar rotates.
[0055] Based on the above discussion of the structure and scanning measurement method of the lidar, the position information of each sampling point acquired by the lidar relative to the lidar can be represented by three different sampling coordinate values: distance, polar angle, and azimuth angle, using the lidar spherical coordinate system as a reference. At the same time, during the acquisition and scanning of sampling points, the gimbal will drive the lidar to rotate to different positions. Therefore, the position information of each sampling point in space needs to be represented by the sampling coordinate value corresponding to the sampling point and the angle parameter (i.e., the tilt angle) of the gimbal driving the lidar to rotate when acquiring the sampling point.
[0056] To better characterize the position of each sampling point in space, in practical applications, a three-dimensional rectangular coordinate system for the lidar and a three-dimensional rectangular coordinate system for the gimbal can be further established based on the lidar's own spherical coordinate system.
[0057] It should be noted that the three-dimensional rectangular coordinate system of the lidar in this embodiment is a three-dimensional orthogonal coordinate system corresponding to the lidar spherical coordinate system. That is, the origin of the lidar's three-dimensional rectangular coordinate system coincides with the origin of the lidar spherical coordinate system. The three pairwise orthogonal coordinate axes of the lidar's three-dimensional rectangular coordinate system are respectively... axis, axis, Axis, and The axis coincides with the aforementioned first rotation axis, and The first axis coincides with the second rotation axis; therefore, the coordinates of any point in three-dimensional space in the lidar spherical coordinate system are... Coordinates in the three-dimensional Cartesian coordinate system of the laser. The transformation relationship between them is satisfied:
[0058] ;
[0059] In other words, in the sampling coordinate values of each sampling point, the distance... The straight-line distance between the sampling point and the origin of the lidar spherical coordinate system, and the polar angle. The line connecting the sampling point and the origin of the lidar spherical coordinate system intersects the lidar's three-dimensional rectangular coordinate system. Axis; Azimuth The line connecting the sampling point and the origin of the lidar spherical coordinate system intersects the lidar's three-dimensional rectangular coordinate system. The angle between axes.
[0060] Furthermore, based on the above discussion, both the three-dimensional rectangular coordinate system and the spherical coordinate system of the lidar are coordinate systems that are stationary relative to the lidar. However, during the process of scanning and acquiring each sampling point, the gimbal drives the lidar to rotate as a whole. Thus, both the three-dimensional rectangular coordinate system and the spherical coordinate system of the lidar are motion coordinate systems that rotate relative to the gimbal. Therefore, this application further creates a three-dimensional rectangular coordinate system of the gimbal that is stationary relative to the gimbal. This allows the coordinate values of each sampling point to be further converted into coordinate values in the three-dimensional rectangular coordinate system of the gimbal. In other words, the coordinate values in the stationary coordinate system in three-dimensional space represent the position of each sampling point in space.
[0061] Because the gimbal-driven LiDAR rotates around a second rotation axis that passes through the origin of the LiDAR's three-dimensional Cartesian coordinate system, the origins of both the LiDAR's three-dimensional Cartesian coordinate system and its spherical coordinate system remain unchanged as the LiDAR rotates. The axes will not move; therefore, to simplify the transformation relationships between the various coordinate systems, the origin of the 3D Cartesian coordinate system created in this application can coincide with the origin of the 3D Cartesian coordinate system of the lidar; based on this, among the X-axis, Y-axis, and Z-axis of the 3D Cartesian coordinate system of the PTZ, the Y-axis can coincide with the 3D Cartesian coordinate system of the lidar, while the X-axis is a horizontal coordinate axis, and the Z-axis is a vertical coordinate value. Based on the above method of PTZ driving the lidar to rotate, it can be seen that as the lidar rotates, shaft and The axis should rotate within the XOY plane, therefore it can be defined as when When the X-axis and the X-axis coincide, the tilt angle of the lidar, or angular parameter, is 0, which means that the lidar is at the zero point of rotation.
[0062] Based on the creation of the above three coordinate systems, the compensation deviation parameters can be further set in this application.
[0063] As mentioned above, during the scanning and measurement of point clouds, the lidar involves both the rotational motion of the internal lasers and the rotational motion of the lidar as a whole driven by the gimbal. Therefore, in order to more accurately and reasonably compensate for the errors introduced by the two different rotational motions in the sampling process, this application sets internal compensation deviation parameters and axial compensation deviation parameters for the compensation deviation parameters. The internal compensation deviation parameter compensates for the deviation introduced by the internal rotation of each laser driven by the lidar along the first rotation axis, while the axial compensation deviation parameter compensates for the deviation introduced by the gimbal driving the lidar as a whole to rotate around the second rotation axis.
[0064] The internal compensation deviation for this application may include the distance compensation amount, polar angle compensation amount, and azimuth angle compensation amount set separately for distance, polar angle, and azimuth angle.
[0065] The shaft compensation deviation parameters may include a first translation compensation amount, a second translation compensation amount, a first rotation compensation angle, and a second rotation compensation angle, which are set to compensate for the roll angle.
[0066] Among them, the first translation compensation amount and the second translation compensation amount are the translation deviations in the Z-axis direction and X-axis direction of the three-dimensional rectangular coordinate system of the platform introduced when the platform drives the lidar to rotate, respectively.
[0067] The first rotation compensation angle and the second rotation compensation angle are the angular deviations introduced by the lidar relative to the three-dimensional rectangular coordinate system of the platform when the platform drives the lidar to rotate, respectively.
[0068] As mentioned above, the gimbal drives the LiDAR to rotate based on the Y-axis and Since the second rotation axis coincides with the central rotation axis, the deviation introduced by the relative motion between the lidar and the platform will not affect the Y-axis and... The deviation in the axial direction will only occur in the Z-axis and X-axis directions. Furthermore, since the lidar rotates relative to the platform, this movement will not only introduce translational deviations along the Z-axis and X-axis directions, but also deviations in the rotation angles relative to the Z-axis and X-axis directions. Therefore, in this embodiment, by setting a first translational compensation amount, a second translational compensation amount, a first rotational compensation angle, and a second rotational compensation angle, the accuracy and reliability of compensating for the error introduced by the lidar's rotation relative to the platform can be guaranteed to a certain extent.
[0069] Based on the aforementioned internal compensation deviation parameters and axis compensation deviation parameters, the process of further compensating and converting the sampled coordinate values of each sampling point into the three-dimensional rectangular coordinate system of the platform can include:
[0070] S21: After compensating the sampled coordinate values according to the internal compensation deviation parameter, convert them into preliminary compensated coordinate values in the three-dimensional motion rectangular coordinate system of the lidar. ;in, ; For the first Each sampled coordinate value; These are the distance compensation, polar angle compensation, and azimuth angle compensation, respectively.
[0071] S22: Determine the gimbal compensation matrix based on the transformation relationship between the lidar spherical coordinate system and the gimbal coordinate system, as well as the axis compensation deviation parameters. ,in, , ; , , For the first translation compensation amount, For the second translation compensation amount, The first rotational compensation angle, This is the second rotational compensation angle;
[0072] S23: Convert the initial compensation coordinate values into actual compensation coordinate values based on the gimbal compensation matrix and the platform transformation matrix. ;in, This is the tabletop transformation matrix. , For the first The tilt angle corresponding to each sampling point.
[0073] In this embodiment, based on the transformation relationship between the lidar spherical coordinate system and the lidar three-dimensional rectangular coordinate system, the sampling coordinate values of each sampling point in the lidar spherical coordinate system are first added with the internal compensation deviation parameter, and then converted to coordinate values in the lidar three-dimensional rectangular coordinate system, thus obtaining the preliminary compensation coordinate values. Clearly, the initial compensation coordinate values satisfy the following: ;in, For the first The sampling coordinate values of each sampling point; These are the distance compensation, polar angle compensation, and azimuth angle compensation, respectively.
[0074] Furthermore, since the lidar's three-dimensional rectangular coordinate system is a coordinate system that rotates relative to the gimbal's three-dimensional rectangular coordinate system, the gimbal compensation matrix can be further determined based on the transformation relationship between the lidar's and the gimbal's three-dimensional rectangular coordinate systems and the axis compensation deviation parameters. ,in, , ; , , For the first translation compensation amount, For the second translation compensation amount, The first rotational compensation angle, This is the second rotational compensation angle.
[0075] Based on the gimbal compensation matrix and the transformation relationship between the lidar's three-dimensional rectangular coordinate system and the gimbal's three-dimensional rectangular coordinate system, it can be further determined that the compensation coordinate values of each preliminary compensation coordinate value, after being compensated by the axis compensation deviation parameter and transformed into the gimbal's three-dimensional rectangular coordinate system, satisfy the following: ;in This refers to the gimbal transformation matrix, which characterizes the transformation relationship between the three-dimensional Cartesian coordinate system of the lidar and the three-dimensional Cartesian coordinate system of the gimbal; the method of driving the lidar rotational motion by the gimbal can be determined. ;in, That is, to collect the first Each sampling point corresponds to a tilt angle for the gimbal-driven lidar rotation.
[0076] It is understandable that if the above-mentioned internal compensation deviation parameters and axis compensation deviation parameters are set accurately and reasonably, then the compensation sampling points represented by each compensation coordinate value should be basically located in the same plane.
[0077] To verify each compensation deviation parameter, a central reference plane can be further determined based on the compensation coordinate values corresponding to each compensation sampling point.
[0078] Reference Figure 4 In this application, the central reference plane is a plane that can roughly characterize the distribution of each compensation sampling point. In practical applications, a fitting algorithm can be used to determine the fitting plane corresponding to each compensation sampling point based on each compensation coordinate value, and this fitting plane can be used as the central reference plane.
[0079] Furthermore, in another optional embodiment of this application, another method for determining the central reference plane is provided, which may specifically include:
[0080] S31: Determine the centroid coordinates of each compensation sampling point based on the compensation coordinate values. ;in, ;
[0081] S32: Construct a mathematical matrix based on the centroid coordinates and each compensation coordinate. ;
[0082] S33: Perform singular value decomposition on the mathematical matrix to obtain the singular vector corresponding to the smallest singular value, and take the plane passing through the centroid and with the singular vector as the normal vector as the central reference plane.
[0083] In this embodiment, the central reference plane is determined using singular value decomposition (SVD). First, the centroid of each compensated sampling point is obtained by averaging its compensated coordinate values. Then, a mathematical matrix is constructed based on the difference between each compensated coordinate value and the centroid coordinate value. SVD is then applied to this mathematical matrix, resulting in:
[0084] ;in, , All are orthogonal matrices. Let be a diagonal matrix with singular values on its diagonal. Therefore, taking the centroid as the origin, we find the minimum singular value. The corresponding singular vector , which is the normal vector of the central reference plane, is expressed as Therefore, by combining the centroid coordinates and the normal vector, the central reference plane can be characterized.
[0085] like Figure 4 As shown, the initially set compensation coordinate values may not accurately compensate for the coordinate values of each sampling point. Therefore, the determined compensation sampling points fluctuate around the central reference plane. Obviously, the smaller the distance of each compensation sampling point from the central reference plane, the closer the compensation sampling points are to being located in the same plane. Ideally, all compensation sampling points should be located in the same plane. Therefore, in this embodiment, the standard deviation of the vertical distance between each compensation sampling point and the central reference plane is used as the standard to measure whether the compensation deviation parameter is accurate, and the compensation deviation parameter is optimized and adjusted accordingly. Figure 4 As shown, when the compensation deviation parameter can effectively compensate for each sampling point, the final determined compensation sampling point will deviate from the central reference plane by a smaller distance.
[0086] Therefore, in this embodiment, the standard deviation of the vertical distance from each compensation sampling point to the central reference plane can be used as the objective function to iteratively optimize the compensation deviation parameter until the standard deviation is minimized.
[0087] In practical applications, after determining the central reference plane, the vertical distance of each compensation sampling point relative to the central reference plane can be further determined, that is, the distance from the compensation sampling point to the central plane. Obviously, this vertical distance can also characterize the magnitude of the deviation of the compensation sampling point relative to the central reference plane.
[0088] In determining the vertical distance between each compensation sampling point and the central reference plane, it can be obtained by multiplying the compensation coordinate value of each compensation sampling point with the normal vector of the central reference plane, i.e., the vertical distance. Further calculate the average vertical distance corresponding to each compensation sampling point. Based on this average distance, the standard deviation of the distance can be further determined. .
[0089] The distance standard deviation determined in the above implementation method is the overall standard deviation of all compensated sampling points.
[0090] However, this application further considers that the number of sampling points collected by the lidar may be relatively large, and correspondingly, the number of compensation sampling points will also be relatively large, and the computational workload for determining the overall standard deviation may be relatively large. Therefore, in another optional implementation of this application, in practical applications, several points can be randomly selected from each compensation sampling point as sample sampling points; thus, in determining the distance standard deviation, only the average vertical distance between each sample sampling point and the central reference plane needs to be calculated, and then the sample standard deviation can be determined based on the coordinate values of each sample sampling point and the average vertical distance; that is, the sample standard deviation is: ;in, This represents the total number of sample points selected. for The average vertical distance of each sample point. Clearly, whether this application uses the overall standard deviation of the vertical distance or the sample standard deviation as the distance standard deviation for judging the accuracy of the compensation bias parameter, it does not affect the implementation of the technical solution of this application.
[0091] In the iterative optimization of the compensation bias parameter using the aforementioned distance standard deviation as the objective function, the Levenberg-Marquardt algorithm can be used, or other optimization algorithms that can automatically calculate gradients or do not require explicit gradient calculations can be selected, until the distance standard deviation is relatively small. Furthermore, the iteration process ends when the norm of the change in the compensation bias parameter in two consecutive optimization iterations is lower than a preset threshold. For example, this preset threshold could be... .
[0092] In summary, this application controls the lidar to scan the measurement plane using point cloud technology. After obtaining the sampled coordinate values of each sampling point on the measurement plane, under the condition that the entire scanning system is error-free, the coordinate values of each sampled point, when converted to the coordinate values in the three-dimensional rectangular coordinate system of the gimbal, should also represent points located in the same plane. Therefore, based on this principle, this application sets compensation deviation parameters to compensate for deviations in the entire scanning system. Compensation is performed on the coordinate values during the conversion of the sampled coordinate values of each sampling point to the three-dimensional rectangular coordinate system of the gimbal, obtaining compensated coordinate values. The accuracy of the compensation deviation parameters is then verified based on the magnitude of the deviation between each compensated sampling point and the central reference plane, thereby optimizing the compensation deviation parameters. Finally, a set of compensation deviation parameters is determined that ensures that the compensated sampling points have minimal deviation from the central reference plane, serving as calibration deviation parameters. When subsequently using the lidar to scan objects in a three-dimensional space, these calibration deviation parameters are used to compensate and correct the acquired point cloud, ensuring the accuracy of object measurement and facilitating the widespread application of lidar.
[0093] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that the elements inherent in a process, method, article, or apparatus that includes a list of elements are included. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. Additionally, portions of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0094] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make several improvements and modifications to the present invention without departing from the principles of the present invention, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. A method for calibrating the deviation of a lidar, characterized in that, The lidar is connected to a gimbal for driving its rotation; the deviation calibration method includes: The lidar is controlled to perform point cloud scanning on the measurement plane to obtain the sampling coordinate values of each sampling point in the lidar spherical coordinate system and the angle parameters of the gimbal driving the lidar to rotate when acquiring each sampling point. Based on the transformation relationship between the lidar spherical coordinate system and the gimbal three-dimensional rectangular coordinate system, the set compensation deviation parameters, and the angle parameters corresponding to each sampling point, the sampling coordinate values are compensated and transformed to obtain the compensation coordinate values of the compensation sampling points corresponding to each sampling point in the gimbal three-dimensional rectangular coordinate system. The center reference plane of each compensation sampling point is determined based on the compensation coordinate values; The compensation deviation parameter is iteratively optimized using the deviation of each compensation sampling point relative to the central reference plane as the optimization objective, until the compensation deviation parameter corresponding to the minimum deviation is obtained as the calibration deviation parameter; The sampled coordinate values include distance, polar angle, and azimuth angle; the angle parameters include tilt angle. Wherein, the distance is the straight-line distance between the sampling point and the origin of the lidar spherical coordinate system; The polar angle and the azimuth angle are respectively the lines connecting the sampling point and the origin of the lidar spherical coordinate system, and the lines in the lidar's three-dimensional rectangular coordinate system. shaft and The angle between the axes; wherein the origin of the three-dimensional rectangular coordinate system of the lidar coincides with the origin of the spherical coordinate system of the lidar; the The shaft and the first rotation axis coincide, the The axis and the second rotation axis coincide; The tilt angle is the angle at which the gimbal controls the lidar to rotate around the second rotation axis when the sampling point is scanned. The compensation deviation parameters set include internal compensation deviation parameters and shaft compensation deviation parameters; The internal compensation deviation parameters include distance compensation amount, polar angle compensation amount, and azimuth angle compensation amount, respectively, for compensating the distance, polar angle, and azimuth angle. The shaft compensation deviation parameters include a first translation compensation amount, a second translation compensation amount, a first rotation compensation angle, and a second rotation compensation angle, which are set to compensate for the roll angle. Wherein, the first translation compensation amount and the second translation compensation amount are respectively for compensating the translational deviations in the Z-axis and X-axis directions of the three-dimensional rectangular coordinate system of the gimbal introduced when the gimbal drives the lidar to rotate; the first rotation compensation angle and the second rotation compensation angle are respectively for compensating the angular deviations relative to the Z-axis and X-axis of the three-dimensional rectangular coordinate system of the gimbal introduced when the gimbal drives the lidar to rotate.
2. The deviation calibration method for lidar as described in claim 1, characterized in that, The lidar includes multiple lasers arranged sequentially along a set straight line. Controlling the lidar to perform point cloud scanning on the measurement plane includes: The laser in the lidar is controlled to rotate around a first rotation axis, and the lidar is driven to rotate around a second rotation axis via the gimbal, and each laser is synchronously controlled to perform point cloud scanning on the position points on the measurement plane; wherein, the first rotation axis and the set straight line direction are parallel to each other, and the first rotation axis and the second rotation axis are perpendicular to each other.
3. The deviation calibration method for lidar as described in claim 2, characterized in that, From the middle position to both ends of each laser, the angle between the scanning direction of each laser and the set straight line direction gradually decreases; The second axis of rotation is a horizontal axis of rotation.
4. The deviation calibration method for lidar as described in claim 2 or 3, characterized in that, The lidar spherical coordinate system and the lidar three-dimensional rectangular coordinate system are two relatively stationary coordinate systems, and both of them move about the second rotation axis relative to the gimbal three-dimensional rectangular coordinate system. The X-axis and Y-axis of the gimbal's three-dimensional Cartesian coordinate system are both horizontal, and the Z-axis is vertical; furthermore, the Y-axis of the gimbal's three-dimensional Cartesian coordinate system and the laser radar's three-dimensional Cartesian coordinate system... Axis coincidence.
5. The deviation calibration method for lidar as described in claim 4, characterized in that, Based on the transformation relationship between the lidar spherical coordinate system and the gimbal's three-dimensional rectangular coordinate system, the set compensation deviation parameters, and the angle parameters corresponding to each sampling point, the sampling coordinate values are compensated and transformed to obtain the compensated coordinate values of the compensated sampling points corresponding to each sampling point in the gimbal's three-dimensional rectangular coordinate system, including: After compensating the sampled coordinate values according to the internal compensation deviation parameter, they are converted into preliminary compensated coordinate values in the three-dimensional motion rectangular coordinate system of the lidar. ;in, ; For the first The sampling coordinate values of the sampling points; These are the distance compensation amount, the polar angle compensation amount, and the azimuth angle compensation amount, respectively. Based on the transformation relationship between the lidar's three-dimensional rectangular coordinate system and the gimbal's three-dimensional rectangular coordinate system, and the axis compensation deviation parameters, the gimbal compensation matrix is determined. ,in, , ; , , For the first translation compensation amount, For the second translation compensation amount, The first rotation compensation angle, This is the second rotational compensation angle; The preliminary compensation coordinate values are converted into the compensation coordinate values based on the gimbal compensation matrix and the platform transformation matrix. ;in, Let be the transformation matrix of the platform. , For the first The tilt angle corresponding to each of the sampling points.
6. The deviation calibration method for lidar as described in claim 5, characterized in that, Determining the central reference plane corresponding to the compensation value of each sampling point based on the compensation coordinate values includes: The fitting plane corresponding to each compensation sampling point is determined based on each compensation coordinate value, and the fitting plane is used as the center reference plane.
7. The deviation calibration method for lidar as described in claim 6, characterized in that, Using the deviation of each of the compensated coordinate values relative to the central reference plane as the optimization objective, the compensation deviation parameters are iteratively optimized, including: Using the standard deviation of the vertical distance from each compensation sampling point to the central reference plane determined by each compensation coordinate value as the objective function, the compensation deviation parameter is iteratively optimized until the standard deviation of the distance is minimized.
8. The deviation calibration method for lidar as described in claim 7, characterized in that, The compensation deviation parameter is iteratively optimized until the distance standard deviation is minimized, including: The compensation deviation parameter is iteratively optimized. The iteration process ends when the norm of the change in the compensation deviation parameter is lower than a preset threshold in two consecutive optimization iterations.