A method, device, equipment and storage medium for calibrating multiple vehicle-mounted lidars
By installing the target calibration plate in front of the vehicle and using lidar and total station measurements, the conversion matrix from the multi-lidar coordinate system to the vehicle coordinate system is calculated, and the error problem of lidar calibration in the complex environment of engineering vehicles is solved, and fast and accurate multi-lidar calibration is achieved.
Patent Information
- Application Number
- CN202210410323.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-19
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-04-19
AI Technical Summary
It is difficult for the prior art to effectively calibrate multi-lidar onboard, especially in complex environments of engineering vehicles. Traditional methods have problems such as large errors and serious impacts of occlusions.
By installing target calibration plates at specific locations in front of the vehicle, using lidar and total stations to measure the central coordinate of the calibration plate, calculate the conversion matrix from the lidar coordinate system to the total station coordinate system and the total station coordinate system to the vehicle coordinate system, and combine the chain law to obtain the conversion matrix from the lidar coordinate system to the vehicle coordinate system, achieving fast and accurate calibration.
It realizes the rapid and effective measurement of the six-degree-of-freedom posture relationship between the lidar measurement coordinate system and the vehicle coordinate system without being affected by external environmental factors, and improves calibration accuracy and efficiency.
Smart Images

Figure CN114706060B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous driving technology, and particularly relates to a method, device, equipment and storage medium for calibrating multiple vehicle-mounted lidars. Background Art
[0002] Lidar plays an important role in the environmental perception system of intelligent autonomous driving technology. For example, by collecting environmental data with lidars mounted on engineering vehicles, a three-dimensional point cloud map is drawn, and then the driverless operation of construction vehicles is realized, improving the safety of construction and reducing the number of construction personnel. It should be noted that due to the large volume of engineering vehicles and many obstacles on the vehicle body, a single lidar is far from enough. Therefore, multiple lidars need to assist each other to comprehensively perceive the surrounding environmental information. However, before fusing the information perceived by multiple lidars, it is necessary to calibrate the multiple lidars to unify the coordinate systems of the multiple lidars.
[0003] Currently, the mainstream calibration methods for lidars include: (1) The traditional manual measurement calibration method, which uses external measuring instruments and manually measures the pitch angle, roll angle, yaw angle and translation vector from the lidar to the vehicle coordinate system; (2) The natural environment feature calibration method, which uses the horizontal road surface as the reference plane and solves the external calibration parameters of the three-dimensional lidar relative to the vehicle coordinate system by using the surrounding natural environment features; (3) The point cloud matching calibration method, which calibrates the rotation and translation matrix of the lidar relative to the reference lidar coordinate system by performing point cloud matching on the overlapping point cloud data scanned by multiple lidars.
[0004] However, there are certain defects in using the above three methods to calibrate the lidars mounted on engineering vehicles. Among them, the traditional manual measurement calibration method can only measure the translation relationship between the lidar housing and the vehicle coordinate system, and it is difficult to measure the attitude relationship. Moreover, there is an offset between the lidar housing and the radar coordinate system, resulting in calibration errors. The natural environment feature calibration method needs to be carried out in a specific environment, and the construction environment of engineering vehicles is complex and changeable, which cannot meet the calibration conditions. Due to the influence of the obstacles on the vehicle body on the lidars mounted on engineering vehicles, the field of view is limited in the point cloud matching calibration method. There is no overlapping field of view or the overlapping field of view is too narrow between multiple lidars, and overlapping point clouds cannot be extracted, making calibration difficult. Moreover, this calibration method cannot unify the lidar coordinate system to the vehicle coordinate system.
[0005] In summary, how to effectively calibrate multiple vehicle-mounted lidars is a problem that still needs to be further solved at present. Summary of the Invention
[0006] In view of this, the purpose of this application is to provide a method, device, equipment and storage medium for calibrating multiple vehicle-mounted lidars, which can accurately and quickly calibrate multiple vehicle-mounted lidars. The specific solutions are as follows:
[0007] In a first aspect, the present application discloses a method for calibrating multiple vehicle-mounted lidars, including:
[0008] Scanning a target calibration board located at a specific position in front of the vehicle by a lidar mounted on the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system;
[0009] Measuring the center position of the target calibration board and a prism pre-mounted on the vehicle by a total station to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system;
[0010] Calculating a first transformation matrix from the lidar coordinate system to the total station coordinate system by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system;
[0011] Calculating a second transformation matrix from the total station coordinate system to the vehicle coordinate system by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system;
[0012] Obtaining a third transformation matrix from the lidar coordinate system to the vehicle coordinate system according to the first transformation matrix and the second transformation matrix, and calibrating the lidar through the third transformation matrix.
[0013] Optionally, the target calibration board consists of a diffuse reflection external region with a reflectivity at a preset medium reflection level, a retroreflective intermediate region, and a diffuse reflection internal region; wherein, the reflectivities of the retroreflective intermediate region and the diffuse reflection internal region are both at a preset high reflection level.
[0014] Optionally, the step of scanning a target calibration board located at a specific position in front of the vehicle by a lidar mounted on the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system includes:
[0015] Scanning a target calibration board located at a specific position in front of the vehicle by a lidar mounted on the vehicle to obtain the point cloud of the target calibration board, and extracting the point cloud of the diffuse reflection external region in the target calibration board by using the reflectivity to obtain the point cloud of the target external region;
[0016] Calculating the eigenvector and geometric center coordinates of the diffuse reflection external region by using the three-dimensional spatial coordinates of the point cloud of the target external region;
[0017] Calculating the center coordinates of the target calibration board by using the eigenvector and the geometric center coordinates to obtain the center coordinates of the calibration board in the lidar coordinate system.
[0018] Optionally, the extracting the point cloud of the diffuse reflection external region in the target calibration board by using the reflectivity to obtain the point cloud of the target external region includes:
[0019] Extracting the point cloud of the diffuse reflection external region in the target calibration board by using the reflectivity to obtain the initial external region point cloud;
[0020] Using the random sample consensus algorithm to remove the wrong point cloud in the initial external region point cloud to obtain the point cloud of the target external region.
[0021] Optionally, the calculating the central coordinate of the target calibration board by using the eigenvector and the geometric center coordinate to obtain the central coordinate of the calibration board in the lidar coordinate system includes:
[0022] Using the point cloud of the target calibration board and the point cloud of the diffuse reflection external region in the target calibration board to obtain the point cloud of the target intermediate region and the point cloud of the target internal region;
[0023] Using the eigenvector, the geometric center coordinate, the three-dimensional space coordinates and the reflectivity of the point cloud of the target intermediate region and the point cloud of the target internal region to calculate the central coordinate of the target calibration board by weighted average to obtain the central coordinate of the calibration board in the lidar coordinate system.
[0024] Optionally, the calculating the first transformation matrix from the lidar coordinate system to the total station coordinate system includes:
[0025] Using the singular value decomposition algorithm to calculate the first transformation matrix from the lidar coordinate system to the total station coordinate system.
[0026] Optionally, the vehicle-mounted multi-lidar calibration method further includes:
[0027] Calculating the inverse matrix of the second transformation matrix to obtain the fourth transformation matrix from the vehicle coordinate system to the total station coordinate system;
[0028] Using the third transformation matrix and the fourth transformation matrix to obtain the fifth transformation matrix from the lidar coordinate system to the total station coordinate system;
[0029] Using the fifth transformation matrix to calculate the coordinate of a preset calibration point in the total station coordinate system to obtain the first calibration point coordinate;
[0030] Measuring the coordinate of the preset calibration point by the total station to obtain the second calibration point coordinate, and verifying the calibration accuracy by comparing the first calibration point coordinate and the second calibration point coordinate.
[0031] In a second aspect, the present application discloses a vehicle-mounted multi-lidar calibration device, including:
[0032] A position scanning module, configured to scan a target calibration board located at a specific position in front of the vehicle through a lidar installed on the vehicle, and obtain the center coordinates of the calibration board in the lidar coordinate system;
[0033] A coordinate measurement module, configured to use a total station to measure the center position of the target calibration board and a prism pre-installed on the vehicle, and obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system;
[0034] A first coordinate transformation module, configured to calculate a first transformation matrix from the lidar coordinate system to the total station coordinate system by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system;
[0035] A second coordinate transformation module, configured to calculate a second transformation matrix from the total station coordinate system to the vehicle coordinate system by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system;
[0036] A calibration module, configured to obtain a third transformation matrix from the lidar coordinate system to the vehicle coordinate system according to the first transformation matrix and the second transformation matrix, and calibrate the lidar through the third transformation matrix.
[0037] In a third aspect, the present application discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, the foregoing vehicle-mounted multi-lidar calibration method is implemented.
[0038] In a fourth aspect, the present application discloses a computer-readable storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the foregoing vehicle-mounted multi-lidar calibration method is implemented.
[0039] It can be seen that in this application, the lidar installed on the vehicle first scans the target calibration board at a specific position in front of the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system. Then, a total station is used to measure the center position of the target calibration board and a prism pre-installed on the vehicle to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system. Next, the first transformation matrix from the lidar coordinate system to the total station coordinate system is calculated using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system. Then, the second transformation matrix from the total station coordinate system to the vehicle coordinate system is calculated using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system. Finally, the third transformation matrix from the lidar coordinate system to the vehicle coordinate system is obtained based on the first transformation matrix and the second transformation matrix, and the lidar is calibrated using the third transformation matrix. It can be seen that this application can obtain the transformation matrix from the lidar coordinate system to the total station coordinate system and the transformation matrix from the total station coordinate system to the vehicle coordinate system through a preset target calibration board, and then obtain the transformation matrix from the lidar coordinate system to the vehicle coordinate system according to the chain rule of coordinate transformation, thereby realizing the rapid calibration of multiple lidars in the vehicle coordinate system and being able to measure the six-degree-of-freedom pose relationship between the lidar measurement coordinate system and the vehicle coordinate system quickly and effectively without being affected by external environmental factors. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative efforts.
[0041] Figure 1 It is a flowchart of a method for calibrating multiple vehicle-mounted lidars disclosed in the present application;
[0042] Figure 2 It is a schematic structural diagram of a specific target calibration board disclosed in the present application;
[0043] Figure 3 It is a flowchart of a specific method for calibrating multiple vehicle-mounted lidars disclosed in the present application;
[0044] Figure 4 It is a schematic diagram of a system for a specific method for calibrating multiple vehicle-mounted lidars disclosed in the present application;
[0045] Figure 5 It is a schematic diagram of a target calibration board after segmentation based on the RANSAC algorithm disclosed in the present application;
[0046] Figure 6 Structural schematic diagram of a vehicle-mounted multi-lidar calibration device disclosed in this application;
[0047] Figure 7 Structural diagram of an electronic device disclosed in this application. Specific implementation manners
[0048] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0049] An embodiment of this application discloses a vehicle-mounted multi-lidar calibration method. Refer to Figure 1 As shown, this method includes:
[0050] Step S11: Scan a target calibration board located at a specific position in front of the vehicle by a lidar installed on the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system.
[0051] In this embodiment, first, a dedicated target calibration board needs to be designed and placed in front of the vehicle. Then, the target calibration board is scanned by multiple lidars installed on the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system. Among them, at least three target calibration boards are required, and they are composed of a diffuse reflection external region with a reflectivity at a preset medium reflection level, a retroreflection intermediate region, and a diffuse reflection internal region. The reflectivities of the retroreflection intermediate region and the diffuse reflection internal region are both at a preset high reflection level. Specifically, refer to Figure 2 As shown, Figure 2 Shows a specific structure of the target calibration board, which is respectively composed of an external region A1, an intermediate region A2, and an internal region A3 with significantly different reflectivities. Among them, the reflectivity of the external region A1 is at a preset medium reflection level and undergoes diffuse reflection; the reflectivity of the intermediate region A2 is at a preset high reflection level and undergoes retroreflection; the reflectivity of the internal region A3 is at a preset high reflection level and undergoes diffuse reflection.
[0052] Step S12: Measure the center position of the target calibration board and a prism pre-installed on the vehicle by a total station to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system.
[0053] In this embodiment, after a lidar installed on the vehicle scans a target calibration board located at a specific position in front of the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system, a total station placed at a specific position outside the vehicle is used to measure the center position of the above-mentioned target calibration board and a prism pre-installed on the vehicle to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system. Among them, at least three prisms on the vehicle are required.
[0054] Step S13: Calculate a first transformation matrix from the lidar coordinate system to the total station coordinate system by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system.
[0055] In this embodiment, after using a total station to measure the center position of the target calibration board and a prism pre-installed on the vehicle to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system, further, the transformation matrix from the lidar coordinate system to the total station coordinate system, that is, the first transformation matrix, can be calculated through the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system. In a specific implementation manner, the first transformation matrix from the lidar coordinate system to the total station coordinate system can be calculated by the Singular Value Decomposition (SVD) algorithm.
[0056] Step S14: Calculate a second transformation matrix from the total station coordinate system to the vehicle coordinate system by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system.
[0057] In this embodiment, after calculating the first transformation matrix from the lidar coordinate system to the total station coordinate system by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system, the transformation matrix from the total station coordinate system to the vehicle coordinate system, that is, the second transformation matrix, can be further calculated by using the coordinates of the prism measured by the total station and the coordinates of the prism measured in the vehicle coordinate system.
[0058] Step S15: Obtain a third transformation matrix from the lidar coordinate system to the vehicle coordinate system according to the first transformation matrix and the second transformation matrix, and calibrate the lidar by using the third transformation matrix.
[0059] In this embodiment, after calculating the second transformation matrix from the total station coordinate system to the vehicle coordinate system by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system, according to the first transformation matrix from the lidar coordinate system to the total station coordinate system and the second transformation matrix from the total station coordinate system to the vehicle coordinate system, the multi-lidar coordinate systems can be unified to the vehicle coordinate system by combining the chain rule of coordinate transformation, and the third transformation matrix from the lidar coordinate system to the vehicle coordinate system can be obtained. Furthermore, the lidar can be calibrated by using the third transformation matrix.
[0060] In this embodiment, after calibrating the lidar by using the third transformation matrix, it may further specifically include: calculating the inverse matrix of the second transformation matrix to obtain the fourth transformation matrix from the vehicle coordinate system to the total station coordinate system; using the third transformation matrix and the fourth transformation matrix to obtain the fifth transformation matrix from the lidar coordinate system to the total station coordinate system; using the fifth transformation matrix to calculate the coordinates of a preset calibration point in the total station coordinate system to obtain the first calibration point coordinates; measuring the coordinates of the preset calibration point by using the total station to obtain the second calibration point coordinates, and verifying the calibration accuracy by comparing the first calibration point coordinates and the second calibration point coordinates. Specifically, after obtaining the third transformation matrix through the conversion between matrices and calibrating the lidar by using the third transformation matrix, in order to verify whether the calibration is accurate, the inverse matrix of the second transformation matrix from the total station coordinate system to the vehicle coordinate system can be calculated first to obtain the fourth transformation matrix from the vehicle coordinate system to the total station coordinate system, and then the third transformation matrix from the lidar coordinate system to the vehicle coordinate system and the fourth transformation matrix from the vehicle coordinate system to the total station coordinate system are used. By combining the chain rule of coordinate transformation, the fifth transformation matrix from the lidar coordinate system to the total station coordinate system is obtained, and a calibration point is preset. The coordinates of the calibration point in the total station coordinate system are calculated by using the fifth transformation matrix from the lidar coordinate system to the total station coordinate system to obtain the corresponding first calibration point coordinates, and then the coordinates of the calibration point are measured by using the total station to obtain the corresponding second calibration point coordinates. The first calibration point coordinates and the second calibration point coordinates are compared, and the calibration accuracy is verified by the comparison result. For example, if the first calibration point coordinates and the second calibration point coordinates coincide, or the distance between the two coordinates meets a preset threshold, it is determined that the calibration is accurate; if the distance between the two coordinates exceeds the preset threshold, it is determined that the calibration is inaccurate.
[0061] It can be seen that in the embodiment of the present application, first, the lidar installed on the vehicle scans the target calibration board at a specific position in front of the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system. Then, a total station is used to measure the center position of the target calibration board and the prism pre-installed on the vehicle to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system. Next, the first transformation matrix from the lidar coordinate system to the total station coordinate system is calculated using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system. Then, the second transformation matrix from the total station coordinate system to the vehicle coordinate system is calculated using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system. Finally, the third transformation matrix from the lidar coordinate system to the vehicle coordinate system is obtained based on the first transformation matrix and the second transformation matrix, and the lidar is calibrated using the third transformation matrix. It can be seen that in the embodiment of the present application, the transformation matrix from the lidar coordinate system to the total station coordinate system and the transformation matrix from the total station coordinate system to the vehicle coordinate system can be obtained through the preset target calibration board, and then the transformation matrix from the lidar coordinate system to the vehicle coordinate system is obtained according to the chain rule of coordinate transformation, thereby realizing the calibration of multiple lidars in the vehicle coordinate system, and being able to measure the six-degree-of-freedom pose relationship between the lidar measurement coordinate system and the vehicle coordinate system quickly and effectively without being affected by external environmental factors.
[0062] The embodiment of the present application discloses a specific method for calibrating multiple vehicle-mounted lidars. Refer to Figure 3 as shown, the method includes:
[0063] Step S21: The lidar installed on the vehicle scans the target calibration board at a specific position in front of the vehicle to obtain the point cloud of the target calibration board, and the point cloud of the diffuse reflection external area in the target calibration board is extracted using the reflectivity to obtain the point cloud of the target external area.
[0064] In a specific implementation manner, refer to Figure 4 as shown, it can be carried out according to Figure 4The layout shown places three pre-designed target calibration plates 5 in front of the vehicle 1, and the placement distance can be 6 to 10 meters in front of the vehicle. Then, a total station 7 is placed outside the vehicle, three prisms 6 are installed on the vehicle, and two lidars 4 are installed on the vehicle. Among them, the label 3 represents a calculator with data processing functions, specifically a computer; the label 2 represents the cab of the vehicle. The target calibration plate is scanned by multiple lidars installed on the vehicle to obtain the point cloud of the target calibration plate. Among them, the target calibration plate is composed of an external area A1 with a reflectivity at a preset medium reflection level and undergoing diffuse reflection, an intermediate area A2 with a reflectivity at a preset high reflection level and undergoing retroreflection, and an internal area A3 with a reflectivity at a preset high reflection level and undergoing diffuse reflection. Since there are obvious differences in the reflectivity between the external area A1 of the target calibration plate and the intermediate area A2 and the internal area A3, the point cloud of the external area A1 that undergoes diffuse reflection in the target calibration plate can be extracted using the reflectivity to obtain the target external area point cloud.
[0065] In this embodiment, the method of using the reflectivity to extract the point cloud of the diffuse reflection external area in the target calibration plate to obtain the target external area point cloud may specifically include: using the reflectivity to extract the point cloud of the diffuse reflection external area in the target calibration plate to obtain the initial external area point cloud; using the random sample consensus algorithm to remove the incorrect point cloud in the initial external area point cloud to obtain the target external area point cloud. In a specific implementation manner, after using the reflectivity to extract the point cloud of the diffuse reflection external area in the target calibration plate to obtain the initial external area point cloud, the random sample consensus algorithm (RANdom SAmple Consensus, RANSAC) can be further used to remove the incorrect point cloud in the initial external area point cloud to obtain the target external area point cloud. For details, please refer to Figure 5 shown Figure 5 It shows that the random sample consensus algorithm is used to segment the target calibration plate and remove the incorrect point cloud in the external area A1 of the target calibration plate.
[0066] Step S22: Calculate the feature vector and geometric center coordinates of the diffuse reflection external area using the three-dimensional space coordinates of the target external area point cloud.
[0067] In this embodiment, a lidar installed on the vehicle scans a target calibration board at a specific position in front of the vehicle to obtain the point cloud of the target calibration board. After using the reflectivity to extract the point cloud of the diffuse reflection external area in the target calibration board to obtain the point cloud of the target external area, the feature vector and geometric center coordinates of the diffuse reflection external area can be calculated using the three-dimensional spatial coordinates of the point cloud of the target external area. Specifically, let the three-dimensional spatial coordinates of the point cloud of the target external area be matrix A, then the matrix of the feature vector of the diffuse reflection external area is [V, ~]=eig(cov(A)), the feature vectors are v1 = V(:, 1), v2 = V(:, 2), v3 = V(:, 3), and the geometric center is w = mean(A, 1).
[0068] Step S23: Calculate the center coordinates of the target calibration board using the feature vector and the geometric center coordinates to obtain the center coordinates of the calibration board in the lidar coordinate system.
[0069] In this embodiment, after calculating the feature vector and geometric center coordinates of the diffuse reflection external area using the three-dimensional spatial coordinates of the point cloud of the target external area, the center coordinates of the target calibration board can be calculated using the above feature vector and the above geometric center coordinates to obtain the center coordinates of the calibration board in the lidar coordinate system.
[0070] Specifically, the calculating the center coordinates of the target calibration board using the feature vector and the geometric center coordinates to obtain the center coordinates of the calibration board in the lidar coordinate system may include: obtaining the point cloud of the target intermediate area and the point cloud of the target internal area using the point cloud of the target calibration board and the point cloud of the diffuse reflection external area in the target calibration board; calculating the center coordinates of the target calibration board by weighted average using the feature vector, the geometric center coordinates, the three-dimensional spatial coordinates and reflectivity of the point cloud of the target intermediate area and the point cloud of the target internal area to obtain the center coordinates of the calibration board in the lidar coordinate system. In this embodiment, the random sample consensus algorithm is first used to remove the incorrect point cloud in the initial external area point cloud to obtain the point cloud of the target external area, and then the point cloud of the target intermediate area and the point cloud of the target internal area are obtained by combining the point cloud of the target calibration board. Then, let the three-dimensional spatial coordinates of the point cloud of the target intermediate area and the point cloud of the target internal area be matrix B, and the reflectivity be matrix C, then the calculation formula for the center coordinates of the calibration board in the lidar coordinate system is w' = w + C T *(B - w)*[v1 v2]*[v1 v2] T / sum(C).
[0071] Step S24: Measure the center position of the target calibration board and the prism pre-installed on the vehicle using a total station to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system.
[0072] Step S25: Calculate the first transformation matrix from the lidar coordinate system to the total station coordinate system by using the calibration board center coordinates in the lidar coordinate system and the calibration board center coordinates in the total station coordinate system.
[0073] In this embodiment, after measuring the center position of the target calibration board and the prism pre-installed on the vehicle by using a total station to obtain the calibration board center coordinates in the total station coordinate system and the prism coordinates in the total station coordinate system, the transformation matrix from the lidar coordinate system to the total station coordinate system can be calculated by using the calibration board center coordinates in the above-mentioned lidar coordinate system and the calibration board center coordinates in the above-mentioned total station coordinate system. The specific calculation steps are as follows:
[0074] ① Let the matrix composed of the center coordinates of the target calibration board measured by the total station be D, and the matrix composed of the center coordinates of the target calibration board scanned by the lidar be E, and calculate the matrix F = (D - mean(D, 1)) T *(E - mean(E, 1));
[0075] ② Perform singular value decomposition on the matrix F to obtain [G H I] = svd(F);
[0076] ③ When the matrix F is a full-rank matrix, the rotation matrix is R = I * G T , calculate the determinant value det(R) of R. If det(R) = 1, then record R as the optimal value. If det(R) = -1, then record -R as the optimal value;
[0077] ④ Calculate the translation vector T = mean(E, 1)) - R * mean(D, 1) T ;
[0078] ⑤ Then the transformation matrix from the lidar coordinate system to the total station coordinate system is
[0079] Step S26: Calculate the second transformation matrix from the total station coordinate system to the vehicle coordinate system by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system.
[0080] In this embodiment, after calculating the first transformation matrix from the lidar coordinate system to the total station coordinate system by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system, the second transformation matrix from the total station coordinate system to the vehicle coordinate system can be calculated by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system. It should be noted that the specific calculation process of the second transformation matrix is the same as the process of obtaining the first transformation matrix from the lidar coordinate system to the total station coordinate system. For the specific calculation steps of the first transformation matrix, please refer to the above, and details will not be elaborated here.
[0081] Step S27: Obtain the third transformation matrix from the lidar coordinate system to the vehicle coordinate system according to the first transformation matrix and the second transformation matrix, and calibrate the lidar through the third transformation matrix.
[0082] Among them, for the more specific processing processes of steps S24 and S27 above, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated here.
[0083] It can be seen that in the embodiment of the present application, first, the reflectivity is used to extract the point cloud of the diffuse reflection external area in the target calibration board to obtain the point cloud of the target external area. Then, the three-dimensional spatial coordinates of the point cloud of the target external area are used to calculate the eigenvector and geometric center coordinates of the diffuse reflection external area. Next, the eigenvector and the geometric center coordinates are used to calculate the center coordinates of the target calibration board to obtain the center coordinates of the calibration board in the lidar coordinate system. Then, the transformation matrix from the lidar coordinate system to the total station coordinate system is calculated by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system, and further the transformation matrix from the total station coordinate system to the vehicle coordinate system is obtained. Finally, according to the chain rule of coordinate transformation, the transformation matrix from the lidar coordinate system to the vehicle coordinate system is obtained, thus realizing the rapid calibration of multiple lidars in the vehicle coordinate system.
[0084] Correspondingly, the embodiment of the present application also discloses a vehicle-mounted multi-lidar calibration device. Refer to Figure 6 as shown. The device includes:
[0085] A position scanning module 11, configured to scan a target calibration board located at a specific position in front of the vehicle through a lidar installed on the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system;
[0086] A coordinate measurement module 12, configured to use a total station to measure the center position of the target calibration board and a prism pre-installed on the vehicle to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system;
[0087] The first coordinate system conversion module 13 is configured to calculate a first conversion matrix from the lidar coordinate system to the total station coordinate system by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system;
[0088] The second coordinate system conversion module 14 is configured to calculate a second conversion matrix from the total station coordinate system to the vehicle coordinate system by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system;
[0089] The calibration module 15 is configured to obtain a third conversion matrix from the lidar coordinate system to the vehicle coordinate system according to the first conversion matrix and the second conversion matrix, and calibrate the lidar by using the third conversion matrix.
[0090] Among them, the specific working processes of the above-mentioned various modules can refer to the corresponding content disclosed in the foregoing embodiments, and will not be elaborated herein.
[0091] It can be seen that in the embodiment of the present application, first, the lidar installed on the vehicle scans the target calibration board located at a specific position in front of the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system, and then the total station is used to measure the center position of the target calibration board and the prism pre-installed on the vehicle to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system. Then, the first conversion matrix from the lidar coordinate system to the total station coordinate system is calculated by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system. Then, the second conversion matrix from the total station coordinate system to the vehicle coordinate system is calculated by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system. Finally, a third conversion matrix from the lidar coordinate system to the vehicle coordinate system is obtained according to the first conversion matrix and the second conversion matrix, and the lidar is calibrated by using the third conversion matrix. It can be seen that in the embodiment of the present application, the conversion matrix from the lidar coordinate system to the total station coordinate system and the conversion matrix from the total station coordinate system to the vehicle coordinate system can be obtained through the preset target calibration board, and then the transformation matrix from the lidar coordinate system to the vehicle coordinate system is obtained according to the chain rule of coordinate transformation, thereby realizing the rapid calibration of multiple lidars in the vehicle coordinate system and being able to measure the six-degree-of-freedom pose relationship between the lidar measurement coordinate system and the vehicle coordinate system quickly and effectively without being affected by external environmental factors.
[0092] In some specific embodiments, the target calibration board consists of a diffuse reflection external region with a reflectivity at a preset medium reflection level, a retroreflective intermediate region, and a diffuse reflection internal region; wherein, the reflectivities of the retroreflective intermediate region and the diffuse reflection internal region are both at a preset high reflection level.
[0093] In some specific embodiments, the position scanning module 11 may specifically include:
[0094] A point cloud reading unit, configured to scan a target calibration board located at a specific position in front of the vehicle through a lidar installed on the vehicle to obtain target calibration board point cloud;
[0095] A first point cloud extraction unit, configured to extract the point cloud of the diffuse reflection external region in the target calibration board by using the reflectivity to obtain the target external region point cloud;
[0096] A first calculation unit, configured to calculate the feature vector and geometric center coordinates of the diffuse reflection external region by using the three-dimensional space coordinates of the target external region point cloud;
[0097] A second calculation unit, configured to calculate the center coordinates of the target calibration board by using the feature vector and the geometric center coordinates to obtain the calibration board center coordinates in the lidar coordinate system.
[0098] In some specific embodiments, the first point cloud extraction unit may specifically include:
[0099] A second point cloud extraction unit, configured to extract the point cloud of the diffuse reflection external region in the target calibration board by using the reflectivity to obtain the initial external region point cloud;
[0100] A point cloud rejection unit, configured to reject the wrong point cloud in the initial external region point cloud by using the random sample consensus algorithm to obtain the target external region point cloud.
[0101] In some specific embodiments, the second calculation unit may specifically include:
[0102] A target calibration board segmentation unit, configured to obtain the target intermediate region point cloud and the target internal region point cloud by using the target calibration board point cloud and the point cloud of the diffuse reflection external region in the target calibration board;
[0103] A third calculation unit, configured to calculate the center coordinates of the target calibration board by weighted average by using the feature vector, the geometric center coordinates, the three-dimensional space coordinates and the reflectivity of the target intermediate region point cloud and the target internal region point cloud to obtain the calibration board center coordinates in the lidar coordinate system.
[0104] In some specific embodiments, calculating the first transformation matrix from the lidar coordinate system to the total station coordinate system may specifically include:
[0105] A fourth calculation unit, configured to calculate the first transformation matrix from the lidar coordinate system to the total station coordinate system by using the singular value decomposition algorithm.
[0106] In some specific embodiments, the vehicle-mounted multi-lidar calibration device may further include:
[0107] A fifth calculation unit, configured to calculate the inverse matrix of the second transformation matrix to obtain a fourth transformation matrix from the vehicle coordinate system to the total station coordinate system;
[0108] A matrix transformation unit, configured to obtain a fifth transformation matrix from the lidar coordinate system to the total station coordinate system by using the third transformation matrix and the fourth transformation matrix;
[0109] A sixth calculation unit, configured to calculate the coordinates of a preset calibration point in the total station coordinate system by using the fifth transformation matrix to obtain a first calibration point coordinate;
[0110] A measurement unit, configured to measure the coordinates of the preset calibration point by using the total station to obtain a second calibration point coordinate;
[0111] A calibration accuracy verification unit, configured to verify the calibration accuracy by comparing the first calibration point coordinate and the second calibration point coordinate.
[0112] Furthermore, an embodiment of the present application also discloses an electronic device, Figure 7 which is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be regarded as any limitation on the scope of use of the present application.
[0113] Figure 7 This is a schematic structural diagram of an electronic device 20 provided by an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the vehicle-mounted multi-lidar calibration method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0114] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and no specific limitation is imposed here; the input / output interface 25 is used to obtain external input data or output data to the outside, and its specific interface type can be selected according to specific application needs, and no specific limitation is made here.
[0115] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, a random access memory, a magnetic disk, an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0116] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the vehicle-mounted multi-lidar calibration method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0117] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the vehicle-mounted multi-lidar calibration method disclosed above is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.
[0118] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The same or similar parts among the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0119] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0120] The steps of the methods or algorithms described in connection with the embodiments disclosed herein may be implemented directly in hardware, in software modules executed by a processor, or in a combination thereof. The software modules may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the art.
[0121] Finally, it should also be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variation thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.
[0122] The above has introduced in detail a vehicle-mounted multi-lidar calibration method, device, equipment and storage medium provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for calibrating multiple vehicle-mounted lidars, characterized in that, Including: Scanning a target calibration board located at a specific position in front of the vehicle by a lidar installed on the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system; Measuring the center position of the target calibration board and a prism pre-installed on the vehicle by a total station to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system; Calculating a first transformation matrix from the lidar coordinate system to the total station coordinate system by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system; Calculating a second transformation matrix from the total station coordinate system to the vehicle coordinate system by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system; Obtaining a third transformation matrix from the lidar coordinate system to the vehicle coordinate system according to the first transformation matrix and the second transformation matrix, and calibrating the lidar by using the third transformation matrix; The target calibration board consists of a diffuse reflection external area with a reflectivity at a preset medium reflection level, a retroreflective intermediate area, and a diffuse reflection internal area; wherein, the reflectivities of the retroreflective intermediate area and the diffuse reflection internal area are both at a preset high reflection level; The calculation formula for the center coordinates of the calibration board in the lidar coordinate system is: ; In the formula, B is the three-dimensional space coordinates of the point cloud in the target intermediate area and the point cloud in the target internal area, C is the reflectivity, v1 = V(:,1), v2 = V(:,2) are eigenvectors, w = mean(A,1) is the geometric center, and A is the three-dimensional space coordinates of the point cloud in the target external area.
2. The vehicle-mounted multi-lidar calibration method according to claim 1, wherein The step of scanning a target calibration board located at a specific position in front of the vehicle by a lidar installed on the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system includes: Scanning a target calibration board located at a specific position in front of the vehicle by a lidar installed on the vehicle to obtain a point cloud of the target calibration board, and extracting the point cloud of the diffuse reflection external area in the target calibration board by using the reflectivity to obtain a point cloud of the target external area; Calculating the eigenvector and geometric center coordinates of the diffuse reflection external area by using the three-dimensional space coordinates of the point cloud of the target external area; Calculating the center coordinates of the target calibration board by using the eigenvector and the geometric center coordinates to obtain the center coordinates of the calibration board in the lidar coordinate system.
3. The vehicle-mounted multi-lidar calibration method according to claim 2, wherein The step of extracting the point cloud of the diffuse reflection external area in the target calibration board by using the reflectivity to obtain a point cloud of the target external area includes: Extracting the point cloud of the diffuse reflection external area in the target calibration board by using the reflectivity to obtain an initial external area point cloud; Removing the wrong point cloud in the initial external area point cloud by using the random sample consensus algorithm to obtain a point cloud of the target external area.
4. The vehicle-mounted multi-lidar calibration method according to claim 2, wherein, The step of calculating the center coordinates of the target calibration board by using the eigenvector and the geometric center coordinates to obtain the center coordinates of the calibration board in the lidar coordinate system includes: Obtaining a point cloud of the target intermediate area and a point cloud of the target internal area by using the point cloud of the target calibration board and the point cloud of the diffuse reflection external area in the target calibration board; Using the eigenvector, the geometric center coordinates, the three-dimensional spatial coordinates and reflectivity of the target intermediate region point cloud and the target internal region point cloud, calculate the center coordinates of the target calibration board by weighted average to obtain the center coordinates of the calibration board in the lidar coordinate system.
5. The vehicle-mounted multi-lidar calibration method according to claim 1, wherein The calculating of the first transformation matrix from the lidar coordinate system to the total station coordinate system includes: Calculating the first transformation matrix from the lidar coordinate system to the total station coordinate system by using the singular value decomposition algorithm.
6. The vehicle-mounted multi-lidar calibration method according to any one of claims 1 to 5, characterized in that It also includes: Calculating the inverse matrix of the second transformation matrix to obtain the fourth transformation matrix from the vehicle coordinate system to the total station coordinate system; Using the third transformation matrix and the fourth transformation matrix to obtain the fifth transformation matrix from the lidar coordinate system to the total station coordinate system; Calculating the coordinates of the preset calibration point in the total station coordinate system by using the fifth transformation matrix to obtain the first calibration point coordinates; Measuring the coordinates of the preset calibration point by the total station to obtain the second calibration point coordinates, and verifying the calibration accuracy by comparing the first calibration point coordinates and the second calibration point coordinates.
7. An in-vehicle multi-lidar calibration device, characterized in that, It includes: A position scanning module, configured to scan a target calibration board located at a specific position in front of the vehicle by a lidar installed on the vehicle to obtain the center coordinates of the calibration board in the lidar coordinate system; A coordinate measurement module, configured to measure the center position of the target calibration board and a prism pre-installed on the vehicle by a total station to obtain the center coordinates of the calibration board in the total station coordinate system and the prism coordinates in the total station coordinate system; A first coordinate transformation module, configured to calculate the first transformation matrix from the lidar coordinate system to the total station coordinate system by using the center coordinates of the calibration board in the lidar coordinate system and the center coordinates of the calibration board in the total station coordinate system; A second coordinate transformation module, configured to calculate the second transformation matrix from the total station coordinate system to the vehicle coordinate system by using the prism coordinates in the total station coordinate system and the coordinates of the prism in the vehicle coordinate system; A calibration module, configured to obtain the third transformation matrix from the lidar coordinate system to the vehicle coordinate system according to the first transformation matrix and the second transformation matrix, and calibrate the lidar by the third transformation matrix; The target calibration board is composed of a diffuse reflection external region with a reflectivity in a preset medium reflection degree, a retroreflective intermediate region, and a diffuse reflection internal region; wherein, the reflectivities of the retroreflective intermediate region and the diffuse reflection internal region are both in a preset high reflection degree; The calculation formula for the center coordinates of the calibration board in the lidar coordinate system is: ; In the formula, B is the three-dimensional spatial coordinates of the target intermediate region point cloud and the target internal region point cloud, C is the reflectivity, v1 = V(:,1), v2 = V(:,2) are eigenvectors, w = mean(A,1) is the geometric center, and A is the three-dimensional spatial coordinates of the target external region point cloud.
8. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes the computer program stored in the memory, it implements the vehicle-mounted multi-lidar calibration method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, For storing a computer program; wherein, when the computer program is executed by a processor, it implements the vehicle-mounted multi-lidar calibration method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Two-dimension laser scanner calibration method, system and device
CN107782240A
Laser calibration system and method for automatic transport vehicle
CN110986904A
Laser radar external parameter calibration method based on total station
CN112068108A
Calibration method, calibration device, calibration system and readable storage medium
CN114265042A