Single-line laser radar calibration method, device and equipment and readable storage medium
By acquiring and matching point cloud data of a single-line lidar within a preset calibration range, and using the iterative nearest point algorithm and least squares error model to determine the extrinsic parameter matrix of the single-line lidar, the problem of complex and low-accuracy calibration in the prior art is solved, and a more efficient and robust calibration process is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UBTECH ROBOTICS CORP LTD
- Filing Date
- 2026-02-26
- Publication Date
- 2026-05-12
AI Technical Summary
Existing single-line lidar calibration methods rely on manual labor and specific target boards, resulting in high calibration complexity, low accuracy, and poor robustness.
By placing a single-line lidar in a preset calibration room, source point clouds and target point clouds are acquired, point cloud matching and rigid body transformation estimation are performed, and the reference extrinsic matrix is determined using the iterative nearest point algorithm and the least squares error model. After verification, it is calibrated as the target extrinsic matrix, thus avoiding manual intervention.
It reduces calibration complexity, minimizes the influence of human subjectivity, and improves the robustness and accuracy of calibration.
Smart Images

Figure CN122017809A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of radar calibration technology, and in particular to a single-line lidar calibration method, apparatus, device, and readable storage medium. Background Technology
[0002] Single-line LiDAR is widely used in robotics, AGVs, and humanoid robots due to its low cost and low power consumption. However, single-line LiDAR cannot directly provide three-dimensional spatial information; each frame contains only a two-dimensional scan line. Therefore, existing single-line LiDAR calibration mainly relies on radar motion or a specific target board, combined with manual measurement methods. This reliance on manual labor and radar motion or a specific target board increases the complexity of the calibration process. Furthermore, human subjectivity can affect the accuracy of the calibration, resulting in low robustness of current single-line LiDAR calibration methods. Summary of the Invention
[0003] In view of this, the purpose of this application is to overcome the shortcomings of the prior art and provide a single-line lidar calibration method, the method comprising: A single-line lidar is placed in a preset calibration room, and the first source point cloud obtained by the single-line lidar scanning the preset calibration room is acquired, as well as the target point cloud corresponding to the preset calibration room is acquired. Point cloud matching and rigid body transformation estimation are performed on the first source point cloud and the target point cloud to determine the reference extrinsic matrix of the single-line lidar; The second source point cloud obtained by the single-line lidar scanning the preset calibration interval is acquired, and the reference extrinsic parameter matrix is verified based on the second source point cloud and the target point cloud. If the verification passes, the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar.
[0004] In one embodiment, the steps of acquiring the first source point cloud obtained by the single-line lidar scanning the preset calibration space, and acquiring the target point cloud corresponding to the preset calibration space, include: Acquire the laser scanning data of the single-line lidar scanning the preset calibration space, and convert the laser scanning data into first point cloud data; Based on the first point cloud data and the installation height of the single-line lidar, the first source point cloud is determined; Based on the observation range of the single-line lidar and the installation height, the three-dimensional structural point cloud of the preset calibration interval is spatially clipped to obtain the second point cloud data; Based on the spatial resolution of the first source point cloud, voxel filtering is performed on the second point cloud data to obtain the target point cloud corresponding to the preset calibration interval.
[0005] In one embodiment, the step of performing point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud to determine the reference extrinsic matrix of the single-line lidar includes: Point cloud matching is performed on the first source point cloud and the target point cloud to determine the matching point of each laser point in the first source point cloud in the target point cloud, thus obtaining a set of point pairs. Based on the set of points, rigid body transformation estimation is performed to determine the extrinsic parameter matrix of the single-line lidar; Based on the extrinsic parameter matrix, the step of obtaining the first source point cloud obtained by the single-line lidar scanning the preset calibration interval is executed again; The reference extrinsic matrix of the single-line lidar is obtained until the preset number of iterations is reached or the rate of change of the extrinsic matrix is less than the preset threshold.
[0006] In one embodiment, the step of performing point cloud matching on the first source point cloud and the target point cloud to determine the matching point of each laser point in the first source point cloud in the target point cloud includes: Obtain the extrinsic parameter matrix corresponding to the first source point cloud; For each laser point in the first source point cloud, the distance between the laser point and each target point in the target point cloud is calculated based on the extrinsic parameter matrix. The target point with the smallest distance from the laser point in the target point cloud is selected as the matching point of the laser point in the target point cloud.
[0007] In one embodiment, the step of determining the extrinsic parameter matrix of the single-line lidar based on the rigid body transformation estimation of the point pair set includes: Construct a least squares error model, the goal of which is to determine a rigid body transformation that minimizes the sum of squared positional deviations of each matched point pair in the set of point pairs after the transformation. Based on the least squares error model, the rigid body transformation of the point pair set is estimated to determine the target rigid body transformation, and the extrinsic parameter matrix of the single-line lidar is determined based on the target rigid body transformation.
[0008] In one embodiment, the step of acquiring the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and verifying the reference extrinsic matrix based on the second source point cloud and the target point cloud, and if the verification passes, calibrating the reference extrinsic matrix as the target extrinsic matrix of the single-line lidar, includes: The second source point cloud obtained by the single-line lidar scanning the preset calibration interval is acquired, and the second source point cloud and the target point cloud are fused based on the reference extrinsic matrix to obtain a fused point cloud; If the fused point cloud meets the preset conditions, the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
[0009] In one embodiment, the step of acquiring the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and verifying the reference extrinsic matrix based on the second source point cloud and the target point cloud, and if the verification passes, calibrating the reference extrinsic matrix as the target extrinsic matrix of the single-line lidar, includes: The second source point cloud obtained by the single-line lidar scanning the preset calibration interval is acquired, and the average residual and the proportion of inliers are calculated based on the second source point cloud, the target point cloud and the reference extrinsic matrix. If the average residual is less than a preset residual threshold and the inlier ratio is greater than a preset ratio threshold, then the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
[0010] This application also provides a single-line lidar calibration device, the single-line lidar calibration device comprising: The acquisition module is used to place a single-line lidar in a preset calibration room, acquire the first source point cloud obtained by the single-line lidar scanning the preset calibration room, and acquire the target point cloud corresponding to the preset calibration room. The determination module is used to perform point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud, and to determine the reference extrinsic parameter matrix of the single-line lidar. The verification module is used to acquire the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and to verify the reference extrinsic matrix based on the second source point cloud and the target point cloud. If the verification passes, the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
[0011] This application also provides a computer device, which includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the above-described single-line lidar calibration method.
[0012] This application also provides a computer-readable storage medium storing a computer program that, when run on a processor, executes the above-described single-line lidar calibration method.
[0013] The embodiments of this application have the following beneficial effects: This embodiment places a single-line lidar within a preset calibration chamber and acquires a first source point cloud obtained by the single-line lidar scanning the preset calibration chamber, as well as a target point cloud corresponding to the preset calibration chamber. Based on the source and target point clouds, an iterative nearest-point algorithm is used to determine the reference extrinsic matrix of the single-line lidar. A second source point cloud obtained by the single-line lidar scanning the preset calibration chamber is acquired, and the second source and target point clouds are fused based on the reference extrinsic matrix to obtain a fused point cloud. If the fused point cloud meets preset conditions, the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar. This avoids reliance on manual calibration, radar movement, or specific target boards, reducing calibration complexity and avoiding the influence of human subjectivity on calibration results, thus improving the robustness of single-line lidar calibration. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and therefore should not be considered as a limitation on the scope of protection of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 A flowchart illustrating the first embodiment of the single-line lidar calibration method provided in this application; Figure 2 A flowchart illustrating a second embodiment of the single-line lidar calibration method provided in this application; Figure 3 A flowchart illustrating the third embodiment of the single-line lidar calibration method provided in this application; Figure 4 A flowchart illustrating the fourth embodiment of the single-line lidar calibration method provided in this application; Figure 5 A schematic diagram of the point cloud fusion result when the single-line lidar calibration effect provided in this application is good; Figure 6 A flowchart illustrating the fifth embodiment of the single-line lidar calibration method provided in this application; Figure 7 A schematic diagram of the single-line lidar calibration device provided in this application. Detailed Implementation
[0016] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0017] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0018] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0019] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0020] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0021] It is understood that the method of this application is applied to a single-line lidar calibration system, which can be mounted on devices such as smart terminals, PC terminals, and mobile terminals, and is not limited thereto.
[0022] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0023] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a first embodiment of the single-line lidar calibration method provided in this application. The method includes: Step S101: Place the single-line lidar in a preset calibration room, and acquire the first source point cloud obtained by the single-line lidar scanning the preset calibration room, and acquire the target point cloud corresponding to the preset calibration room.
[0024] In this embodiment, the relevant calibration personnel place the single-line lidar in a preset calibration room. The single-line lidar calibration system controls the single-line lidar to scan the preset calibration room to obtain the first source point cloud. At the same time, the single-line lidar calibration system acquires the target point cloud corresponding to the preset calibration room.
[0025] It's important to note that a single-line LiDAR (such as the common RPLIDAR A3 or Hokuyo UTM series) outputs only one two-dimensional polar coordinate scan line per revolution: each point has an angle θ and a distance r, corresponding to Cartesian coordinates (x, y), but it itself lacks Z (height) information. The calibration area, however, is a three-dimensional space, and its model (e.g., reconstructed by a high-precision 3D scanner) is a complete XYZ point cloud. Therefore, to accommodate subsequent matching calculations with the 3D model of the calibration area, the first source point cloud is generated by combining fixed height information from the single-line LiDAR's two-dimensional polar coordinate scan line.
[0026] It's important to note that the calibration room is not an ordinary room, but a precisely designed and reconstructed geometric reference environment: the four walls are vertical, the floor is level, the corners are standard right angles, the walls may have high-contrast corner lines, planar gaps (such as the junction of the baseboard and the wall), or tiny protruding structures (such as positioning grooves). These are not decorative, but natural and stable geometric features. The target point cloud corresponding to the calibration room is obtained by scanning the calibration room with a laser scanner, photogrammetry, or SLAM equipment to acquire its complete point cloud, and then processing it through denoising, registration, meshing, spatial clipping, voxel filtering, etc., to form a reference template with semantic geometric intent optimized specifically for single-line radar calibration.
[0027] Step S102: Perform point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud to determine the reference extrinsic parameter matrix of the single-line lidar.
[0028] In this embodiment, when the single-line lidar calibration system initially acquires the first source point cloud, it performs point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud to determine the extrinsic parameter matrix of the single-line lidar. Based on this extrinsic parameter matrix, the single-line lidar calibration system re-controls the single-line lidar to scan the preset calibration interval to obtain a new first source point cloud. Then, it re-executes the steps of point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud to determine the extrinsic parameter matrix of the single-line lidar, suppressing loop iterations until the obtained extrinsic parameter matrix meets the preset conditions or the loop iterations reach a predetermined number, thus obtaining the reference extrinsic parameter matrix of the single-line lidar.
[0029] Step S103: Obtain the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and verify the reference extrinsic matrix based on the second source point cloud and the target point cloud. If the verification passes, the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
[0030] In this embodiment, after determining the reference extrinsic parameter matrix of the single-line lidar, the single-line lidar calibration system controls the single-line lidar to scan a preset calibration area to obtain a second source point cloud based on the reference extrinsic parameter matrix. The reference extrinsic parameter matrix is then verified based on the second source point cloud and the target point cloud. If the verification passes, the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar. The verification methods include: fusing the second source point cloud and the target point cloud for visual verification, or calculating relevant evaluation parameters based on the second source point cloud, the target point cloud, and the reference extrinsic parameter matrix, and then verifying these evaluation parameters.
[0031] The single-line lidar calibration system of this embodiment places the single-line lidar in a preset calibration room and acquires a first source point cloud obtained by the single-line lidar scanning the preset calibration room, as well as a target point cloud corresponding to the preset calibration room. Based on the source point cloud and the target point cloud, the reference extrinsic parameter matrix of the single-line lidar is determined by combining the iterative nearest point algorithm. A second source point cloud obtained by the single-line lidar scanning the preset calibration room is acquired, and the second source point cloud and the target point cloud are fused based on the reference extrinsic parameter matrix to obtain a fused point cloud. If the fused point cloud meets preset conditions, the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar. This avoids reliance on manual calibration, radar movement, or specific target boards, reduces calibration complexity, avoids the influence of human subjectivity on the calibration results, and improves the robustness of single-line lidar calibration.
[0032] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a second embodiment of the single-line lidar calibration method provided in this application. The difference between the second embodiment and the first embodiment is that the steps of acquiring the first source point cloud obtained by the single-line lidar scanning the preset calibration interval, and acquiring the target point cloud corresponding to the preset calibration interval, include: Step S201: Obtain the laser scanning data of the single-line lidar scanning the preset calibration space, and convert the laser scanning data into first point cloud data.
[0033] In this embodiment, the single-line lidar calibration system, based on an initial extrinsic parameter matrix, controls the single-line lidar to scan a preset calibration interval, obtaining laser scanning data, and converting the laser scanning data into first point cloud data. The initial extrinsic parameter matrix is determined based on the single-line lidar's mechanical installation dimensions, CAD design values, historical calibration results, etc. The single-line lidar calibration system uses the standard PointCloud2 point cloud format to convert the laser scanning data into first point cloud data.
[0034] Step S202: Determine the first source point cloud based on the first point cloud data and the installation height of the single-line lidar.
[0035] In this embodiment, the single-line lidar calibration system obtains the installation height of the single-line lidar and determines the first source point cloud based on the first point cloud data and the installation height of the single-line lidar.
[0036] Understandably, this application adopts a pragmatic and robust dimensionality-upgrading strategy: all laser points in the first point cloud data are uniformly projected onto a preset horizontal reference plane (e.g., 10cm or 50cm above the ground, depending on the installation height h of the single-line lidar, i.e., Z=h is manually set). In this way, the original (x, y) two-dimensional laser points in the first point cloud data become (x, y, h) three-dimensional laser points, forming a "thin sheet" point cloud. Although it has no thickness, it already has the geometric basis for comparison with the calibration model in the same three-dimensional coordinate system. This avoids the inherent limitation of single-line lidar in measuring height and avoids introducing unreliable depth estimation errors; at the same time, it provides a reasonable spatial dimension alignment premise for subsequent ICP (Iterative Closest Point) registration.
[0037] Step S203: Based on the observation range of the single-line lidar and the installation height, the three-dimensional structural point cloud of the preset calibration space is spatially clipped to obtain the second point cloud data.
[0038] In this embodiment, the single-line lidar calibration system spatially clips the 3D structural point cloud of the preset calibration area based on the observation range and installation height of the single-line lidar to obtain second point cloud data. It should be noted that the 3D structural point cloud of the preset calibration area is typically high-density, covers the entire space of the calibration area, and includes areas that the single-line lidar cannot scan. Therefore, the single-line lidar calibration system first reduces the 3D structural point cloud to match the observable range of the single-line lidar, eliminating areas in the 3D structural point cloud that are not observable by the single-line lidar. The single-line lidar calibration system then fixes the vertical coordinate value of each point in the reduced 3D structural point cloud to the same height as the installation height of the single-line lidar, thus obtaining the second point cloud data.
[0039] Step S204: Voxel filtering is performed on the second point cloud data based on the spatial resolution of the first source point cloud to obtain the target point cloud corresponding to the preset calibration interval.
[0040] In this embodiment, the single-line lidar calibration system acquires the spatial resolution of the first source point cloud, and performs voxel filtering (VoxelGrid) on the second point cloud data based on the spatial resolution, that is, using pcl::VoxelGrid. <pcl::pointxyzrgb>The function downsamples the second point cloud data to obtain the target point cloud corresponding to the preset calibration interval, so that the spatial resolution of the target point cloud matches that of the first source point cloud, forming a well-structured matching object, avoiding ICP bias caused by point density differences, and improving the stability and speed of subsequent ICP registration.
[0041] The single-line lidar calibration system of this embodiment acquires the laser scanning data of the single-line lidar scanning the preset calibration interval, and converts the laser scanning data into first point cloud data.
[0042] In this embodiment, the single-line lidar calibration system, based on an initial extrinsic parameter matrix, controls the single-line lidar to scan a preset calibration area, obtaining laser scanning data and acquiring the installation height of the single-line lidar. Based on the first point cloud data and the installation height of the single-line lidar, a first source point cloud is determined. This avoids the inherent limitation of single-line lidar in measuring height and prevents the introduction of unreliable depth estimation errors. It also provides a reasonable spatial dimension alignment prerequisite for subsequent ICP (Iterative Closest Point) registration. Based on the observation range and installation height of the single-line lidar, the 3D structural point cloud of the preset calibration area is spatially clipped to obtain second point cloud data. Based on the spatial resolution of the first source point cloud, voxel filtering is performed on the second point cloud data to obtain the target point cloud corresponding to the preset calibration area. This ensures that the spatial resolution of the target point cloud matches that of the first source point cloud, forming a well-structured matching object. This avoids ICP bias caused by differences in point density, improving the stability and speed of subsequent ICP registration. This contributes to improving the efficiency of subsequent single-line lidar calibration.
[0043] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating a third embodiment of the single-line lidar calibration method provided in this application. The difference between the third embodiment and the first to second embodiments is that the step of performing point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud to determine the reference extrinsic parameter matrix of the single-line lidar includes: Step S301: Perform point cloud matching on the first source point cloud and the target point cloud to determine the matching point of each laser point in the first source point cloud in the target point cloud, thereby obtaining a set of point pairs.
[0044] In this implementation, the single-line lidar calibration system performs point cloud matching on the first source point cloud and the target point cloud. For each laser point in the first source point cloud, a corresponding matching point is determined in the target point cloud, thereby obtaining a set of point pairs.
[0045] Step S302: Based on the set of point pairs, perform rigid body transformation estimation to determine the extrinsic parameter matrix of the single-line lidar.
[0046] In this embodiment, the single-line lidar calibration system estimates the rigid body transformation based on a set of point pairs to determine the target rigid body transformation, and then determines the extrinsic parameter matrix of the single-line lidar based on the target rigid body transformation. It should be noted that the rigid body transformation refers to the transformation parameters corresponding to the matching point in the target point cloud for each laser point in the first source point cloud, including the rotation matrix R and the translation vector t. The rotation matrix R and the translation vector t together form the extrinsic parameter matrix of the single-line lidar.
[0047] Step S303: Based on the extrinsic parameter matrix, re-execute the step of obtaining the first source point cloud obtained by the single-line lidar scanning the preset calibration interval.
[0048] In this embodiment, the single-line lidar calibration system, based on a determined extrinsic parameter matrix, re-controls the single-line lidar to scan a preset calibration interval to obtain a new first source point cloud, and performs point cloud matching between the new first source point cloud and the target point cloud to determine the matching point of each laser point in the new first source point cloud in the target point cloud, thus obtaining a new set of point pairs. Based on the new set of point pairs, rigid body transformation estimation is performed to determine a new extrinsic parameter matrix for the single-line lidar.
[0049] Step S304 continues until a preset number of iterations is reached or the rate of change of the extrinsic parameter matrix is less than a preset threshold, to obtain the reference extrinsic parameter matrix of the single-line lidar.
[0050] In this embodiment, after determining a new extrinsic parameter matrix, the single-line lidar calibration system compares the extrinsic parameter matrix obtained in the previous iteration with the newly obtained extrinsic parameter matrix to determine the rate of change of the extrinsic parameter matrix. If the rate of change of the extrinsic parameter matrix is less than a preset threshold, the new extrinsic parameter matrix is determined as the reference extrinsic parameter matrix of the single-line lidar. If the rate of change of the extrinsic parameter matrix is not less than the preset threshold, the single-line lidar calibration system performs a new round of iterations to continue determining a new extrinsic parameter matrix until the rate of change of the extrinsic parameter matrix is less than the preset threshold. In this case, the latest obtained extrinsic parameter matrix is determined as the reference extrinsic parameter matrix of the single-line lidar, or the system continues until a preset number of iterations is reached, at which point the latest obtained extrinsic parameter matrix is determined as the reference extrinsic parameter matrix of the single-line lidar.
[0051] In one embodiment, the step of performing point cloud matching on the first source point cloud and the target point cloud to determine the matching point of each laser point in the first source point cloud in the target point cloud includes: Step S3011: Obtain the extrinsic parameter matrix corresponding to the first source point cloud.
[0052] Step S3012: For each laser point in the first source point cloud, calculate the distance between the laser point and each target point in the target point cloud based on the extrinsic parameter matrix.
[0053] Step S3013: Select the target point with the smallest distance from the laser point in the target point cloud as the matching point of the laser point in the target point cloud.
[0054] In this embodiment, the single-line lidar calibration system obtains the extrinsic parameter matrix corresponding to the single-line lidar acquiring the first source point cloud during the current iteration. For each laser point in the first source point cloud, the system calculates the distance between the laser point and each target point in the target point cloud based on the extrinsic parameter matrix. The system then selects the target point with the smallest distance from the laser point in the target point cloud as the matching point of the laser point in the target point cloud.
[0055] In one embodiment, the formula for calculating the distance between the laser point and each target point in the target point cloud based on the extrinsic parameter matrix is: D=Rp i +t q, where D is the distance, R is the rotation matrix in the extrinsic parameter matrix, t is the translation vector in the extrinsic parameter matrix, and p i Let q be the i-th laser point in the first source point cloud, and let q be any target point in the target point cloud.
[0056] In one embodiment, the single-line lidar calibration system uses a nearest neighbor matching formula to determine the matching point of the i-th laser point in the first source point cloud in the target point cloud. The nearest neighbor matching formula is: q i =argmin||Rp i +t q||;p i Let q be the i-th laser point in the first source point cloud, q be any target point in the target point cloud, R be the rotation matrix in the extrinsic parameter matrix, and t be the translation vector in the extrinsic parameter matrix. i Let be the matching point of the i-th laser point in the first source point cloud in the target point cloud.
[0057] In one embodiment, the step of determining the extrinsic parameter matrix of the single-line lidar based on the rigid body transformation estimation of the point pair set includes: Step S3021: Construct a least squares error model. The goal of the least squares error model is to determine a rigid body transformation that minimizes the sum of squared positional deviations of each matched point pair in the set of point pairs after the transformation.
[0058] Step S3022: Based on the least squares error model, perform rigid body transformation estimation on the point pair set to determine the target rigid body transformation, and determine the extrinsic parameter matrix of the single-line lidar based on the target rigid body transformation.
[0059] In this embodiment, the single-line lidar calibration system constructs a least-squares error model. The goal of the least-squares error model is to determine a rigid body transformation that minimizes the sum of squared position deviations of each matched point pair in the point pair set after transformation. Based on the least-squares error model, the rigid body transformation of the point pair set is estimated to determine the target rigid body transformation. Based on the target rigid body transformation, the extrinsic parameter matrix of the single-line lidar is determined.
[0060] In one embodiment, the error function of the least squares error model constructed based on the set of point pairs can be formally expressed as: min R,t ∑ρ(||Rp i +t q i || 2 ), where ρ is a robust kernel function (such as the Huber kernel or Tukey kernel) used to suppress the influence of outliers (such as dynamic objects, noise, and mismatched points) on registration, ||Rp i +t q i || 2 The squared distance between the i-th laser point in the first source point cloud and the matching point in the target point cloud is the original error term.
[0061] The single-line lidar calibration system in this embodiment utilizes the ICP algorithm to calculate the optimal rigid body transformation between the first source point cloud and the target point cloud, i.e., the extrinsic parameter matrix of the single-line lidar to the calibration coordinate system. Convergence accuracy is improved through multi-frame accumulation, multiple iterations, and a robust kernel function, resulting in higher reliability in solving the extrinsic parameter matrix. This enhances the robustness of the single-line lidar calibration.
[0062] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating a fourth embodiment of the single-line lidar calibration method provided in this application. The difference between this fourth embodiment and the first to third embodiments lies in the step of acquiring the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and verifying the reference extrinsic parameter matrix based on the second source point cloud and the target point cloud. If the verification passes, the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar. This step includes: Step S401: Obtain the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and fuse the second source point cloud and the target point cloud based on the reference extrinsic matrix to obtain a fused point cloud.
[0063] Step S402: If the fused point cloud meets the preset conditions, then the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
[0064] In this embodiment, after determining the reference extrinsic parameter matrix, the single-line lidar calibration system controls the single-line lidar to scan a preset calibration area to obtain a second source point cloud based on the reference extrinsic parameter matrix. The second source point cloud is then transformed into the coordinate system of the preset calibration area based on the reference extrinsic parameter matrix, and the second source point cloud and the target point cloud are fused to obtain a fused point cloud. The fused point cloud is analyzed; if it meets preset conditions, the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar.
[0065] In one embodiment, a robot is placed in a pre-defined calibration room, with a single-line lidar at both the front and rear of the robot, such as... Figure 5 As shown, Figure 5 The diagram shows the point cloud fusion result when the calibration effect is good. In the diagram, white represents the target point cloud, and red and green represent the second source point clouds of each single-line lidar in front of and behind the robot, respectively. The fused point cloud has a continuous structure, matching edges, and no obvious cracks or misalignments, indicating that the external parameter calibration is accurate. If there are misalignments, breaks, or ghosting, it indicates that the calibration error is large and matching optimization needs to be performed again.
[0066] The single-line lidar calibration system in this embodiment acquires a second source point cloud obtained by scanning a preset calibration interval using a single-line lidar. It then fuses the second source point cloud and the target point cloud based on a reference extrinsic parameter matrix to obtain a fused point cloud. If the fused point cloud meets preset conditions, the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar. By directly analyzing the fused point cloud, the intuitiveness of the reference extrinsic parameter matrix verification is improved, which helps to improve the accuracy of the target extrinsic parameter matrix of the single-line lidar.
[0067] Please refer to Figure 6 , Figure 6 This is a flowchart illustrating the fifth embodiment of the single-line lidar calibration method provided in this application. The difference between the fifth embodiment and the first to fourth embodiments is that the step of obtaining the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and verifying the reference extrinsic parameter matrix based on the second source point cloud and the target point cloud, and calibrating the reference extrinsic parameter matrix as the target extrinsic parameter matrix of the single-line lidar if the verification passes, includes: Step S501: Obtain the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and calculate the average residual and the proportion of interior points based on the second source point cloud, the target point cloud and the reference extrinsic matrix.
[0068] Step S502: If the average residual is less than a preset residual threshold and the inlier ratio is greater than a preset ratio threshold, then the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
[0069] In this embodiment, after determining the reference extrinsic parameter matrix, the single-line lidar calibration system controls the single-line lidar to scan a preset calibration area to obtain a second source point cloud. Based on the second source point cloud, the target point cloud, and the reference extrinsic parameter matrix, the average residual and the inlier ratio are calculated. If the average residual is less than a preset residual threshold and the inlier ratio is greater than a preset ratio threshold, then the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar.
[0070] In one embodiment, the single-line lidar calibration system performs point cloud matching on the second source point cloud and the target point cloud. For each laser point in the second source point cloud, a corresponding matching point is determined in the target point cloud, thus obtaining a set of point pairs. The specific matching process is the same as the aforementioned point cloud matching process for the first source point cloud and the target point cloud, and will not be repeated here. The single-line lidar calibration system calculates the average residual based on the reference extrinsic parameter matrix and the set of point pairs; the specific calculation formula is as follows:
[0071] Where, p i Let q be the i-th laser point in the second source point cloud. i Let be the matching point between the i-th laser point in the second source point cloud and the target point cloud, R be the rotation matrix in the extrinsic parameter matrix, t be the translation vector in the extrinsic parameter matrix, and N be the total number of matching point pairs in the point pair set.
[0072] In one embodiment, after determining the set of point pairs, the single-line lidar calibration system calculates the residual of each matching point pair in the set, and then calculates the proportion of inliers in the set based on the residual of each matching point pair and an inlier distance threshold. The formula for calculating the inlier proportion is as follows:
[0073] Where InlierRatio is the inlier ratio, e i τ is the residual of the i-th matching point pair in the point pair set, τ is the inlier distance threshold (e.g., 5mm, 10mm, etc.), and N is the total number of matching point pairs in the point pair set.
[0074] The single-line lidar calibration system of this embodiment acquires the second source point cloud obtained by scanning a preset calibration interval using a single-line lidar. Based on the second source point cloud, the target point cloud, and the reference extrinsic parameter matrix, it calculates the average residual and the proportion of inliers. Then, when the average residual and the proportion of inliers meet preset conditions, the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar. By calculating and comparing multiple indicators, the reference extrinsic parameter matrix is verified in multiple dimensions, reducing the randomness of the verification results and helping to improve the accuracy of the target extrinsic parameter matrix of the single-line lidar.
[0075] refer to Figure 7 , Figure 7 This is a schematic diagram of the single-line lidar calibration device provided in this application. The single-line lidar calibration device includes: The acquisition module 10 is used to place the single-line lidar in a preset calibration room, acquire the first source point cloud obtained by the single-line lidar scanning the preset calibration room, and acquire the target point cloud corresponding to the preset calibration room.
[0076] The determination module 20 is used to perform point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud to determine the reference extrinsic parameter matrix of the single-line lidar.
[0077] The verification module 30 is used to acquire the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and to verify the reference extrinsic matrix based on the second source point cloud and the target point cloud. If the verification passes, the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
[0078] It is understood that the single-line lidar calibration device in this embodiment corresponds to the single-line lidar calibration method in the above embodiment. The options in the above embodiment are also applicable to this embodiment, so they will not be described again here.
[0079] This application also provides a computer device, exemplary of which includes a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to enable the computer device to perform the functions of the various modules in the above-described single-line lidar calibration method or the above-described single-line lidar calibration device.
[0080] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0081] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0082] This application also provides a data processing method, which includes a controller, such as a BMS (Power Management System) board, etc. The controller stores a computer program, wherein the data processing is used to execute the computer program during the charging process to implement the above-described single-line lidar calibration method.
[0083] This application also provides a computer storage medium for storing the computer program used in the aforementioned computer device. The computer storage medium can be a readable storage medium, a non-volatile storage medium, or a volatile storage medium. For example, the computer storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0084] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0085] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0086] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0087] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.< / pcl::pointxyzrgb>
Claims
1. A method for calibrating a single-line lidar, characterized in that, The method includes: A single-line lidar is placed in a preset calibration room, and the first source point cloud obtained by the single-line lidar scanning the preset calibration room is acquired, as well as the target point cloud corresponding to the preset calibration room is acquired. Point cloud matching and rigid body transformation estimation are performed on the first source point cloud and the target point cloud to determine the reference extrinsic matrix of the single-line lidar; The second source point cloud obtained by the single-line lidar scanning the preset calibration interval is acquired, and the reference extrinsic parameter matrix is verified based on the second source point cloud and the target point cloud. If the verification passes, the reference extrinsic parameter matrix is calibrated as the target extrinsic parameter matrix of the single-line lidar.
2. The single-line lidar calibration method according to claim 1, characterized in that, The steps of acquiring the first source point cloud obtained by the single-line lidar scanning the preset calibration space, and acquiring the target point cloud corresponding to the preset calibration space, include: Acquire the laser scanning data of the single-line lidar scanning the preset calibration space, and convert the laser scanning data into first point cloud data; Based on the first point cloud data and the installation height of the single-line lidar, the first source point cloud is determined; Based on the observation range of the single-line lidar and the installation height, the three-dimensional structural point cloud of the preset calibration interval is spatially clipped to obtain the second point cloud data; Based on the spatial resolution of the first source point cloud, voxel filtering is performed on the second point cloud data to obtain the target point cloud corresponding to the preset calibration interval.
3. The single-line lidar calibration method according to claim 1, characterized in that, The step of performing point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud to determine the reference extrinsic parameter matrix of the single-line lidar includes: Point cloud matching is performed on the first source point cloud and the target point cloud to determine the matching point of each laser point in the first source point cloud in the target point cloud, thus obtaining a set of point pairs. Based on the set of points, rigid body transformation estimation is performed to determine the extrinsic parameter matrix of the single-line lidar; Based on the extrinsic parameter matrix, the step of obtaining the first source point cloud obtained by the single-line lidar scanning the preset calibration interval is executed again; The reference extrinsic matrix of the single-line lidar is obtained until the preset number of iterations is reached or the rate of change of the extrinsic matrix is less than the preset threshold.
4. The single-line lidar calibration method according to claim 3, characterized in that, The step of performing point cloud matching on the first source point cloud and the target point cloud to determine the matching point of each laser point in the first source point cloud in the target point cloud includes: Obtain the extrinsic parameter matrix corresponding to the first source point cloud; For each laser point in the first source point cloud, the distance between the laser point and each target point in the target point cloud is calculated based on the extrinsic parameter matrix. The target point with the smallest distance from the laser point in the target point cloud is selected as the matching point of the laser point in the target point cloud.
5. The single-line lidar calibration method according to claim 3, characterized in that, The step of performing rigid body transformation estimation based on the set of point pairs to determine the extrinsic parameter matrix of the single-line lidar includes: Construct a least squares error model, the goal of which is to determine a rigid body transformation that minimizes the sum of squared positional deviations of each matched point pair in the set of point pairs after the transformation. Based on the least squares error model, the rigid body transformation of the point pair set is estimated to determine the target rigid body transformation, and the extrinsic parameter matrix of the single-line lidar is determined based on the target rigid body transformation.
6. The single-line lidar calibration method according to claim 1, characterized in that, The step of acquiring the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and verifying the reference extrinsic matrix based on the second source point cloud and the target point cloud, and if the verification passes, calibrating the reference extrinsic matrix as the target extrinsic matrix of the single-line lidar, includes: The second source point cloud obtained by the single-line lidar scanning the preset calibration interval is acquired, and the second source point cloud and the target point cloud are fused based on the reference extrinsic matrix to obtain a fused point cloud; If the fused point cloud meets the preset conditions, the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
7. The single-line lidar calibration method according to claim 1, characterized in that, The step of acquiring the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and verifying the reference extrinsic matrix based on the second source point cloud and the target point cloud, and if the verification passes, calibrating the reference extrinsic matrix as the target extrinsic matrix of the single-line lidar, includes: The second source point cloud obtained by the single-line lidar scanning the preset calibration interval is acquired, and the average residual and the proportion of inliers are calculated based on the second source point cloud, the target point cloud and the reference extrinsic matrix. If the average residual is less than a preset residual threshold and the inlier ratio is greater than a preset ratio threshold, then the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
8. A single-line lidar calibration device, characterized in that, The single-line lidar calibration device includes: The acquisition module is used to place a single-line lidar in a preset calibration room, acquire the first source point cloud obtained by the single-line lidar scanning the preset calibration room, and acquire the target point cloud corresponding to the preset calibration room. The determination module is used to perform point cloud matching and rigid body transformation estimation on the first source point cloud and the target point cloud, and to determine the reference extrinsic parameter matrix of the single-line lidar. The verification module is used to acquire the second source point cloud obtained by the single-line lidar scanning the preset calibration interval, and to verify the reference extrinsic matrix based on the second source point cloud and the target point cloud. If the verification passes, the reference extrinsic matrix is calibrated as the target extrinsic matrix of the single-line lidar.
9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the single-line lidar calibration method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a processor, executes the single-line lidar calibration method according to any one of claims 1-7.