External parameter calibration method and device of laser radar
By filtering and utilizing the first target point cloud data in the target frame and the normal vector of the lidar, the problem of low calibration accuracy between IMU and carrier is solved, and higher calibration accuracy and accuracy are achieved.
Patent Information
- Application Number
- CN202411997205.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-15
AI Technical Summary
In the fields of autonomous driving and robot navigation, the current method of calibrating the 6-degree-of-freedom external parameters between the IMU and the carrier has a problem of accuracy, especially when the carrier motion excitation is insufficient or comprehensive enough.
By obtaining the first target point cloud data in the target frame that meets the predetermined conditions, using the first normal vector and the second normal vector of the lidar for external parameter calibration, the point cloud data that meets the conditions is selected to improve the calibration accuracy.
By reducing errors, this method improves the accuracy of determining the position and attitude of the lidar in the vehicle coordinate system, and reduces the demand for calibration equipment and environment.
Smart Images

Figure CN119828115A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to an external parameter calibration method, device, computer equipment, storage medium and program product for a laser radar. Background Art
[0002] In the fields of autonomous driving, robot navigation, and precision positioning, it is crucial to accurately estimate and track the motion state of an object. Among them, the Inertial Measurement Unit (IMU), as one of the core sensors, can provide real-time acceleration and angular velocity information of an object, and is an important means of achieving motion estimation. However, in order to accurately convert the IMU data into the position and attitude of the object in the world coordinate system, the relative position and attitude (i.e., external parameters) between the IMU and the carrier (such as a vehicle) need to be accurately calibrated.
[0003] Currently, the method of calibrating the 6-DOF external parameters between the IMU and the carrier is to directly perform it through an optimized algorithm. Specifically, various motion excitations of the carrier in space, such as rotation and translation, are used to fully stimulate all the degrees of freedom of the IMU and collect sufficient data. Then, these data are used to solve the optimal solution of the external parameters through an optimization algorithm.
[0004] However, when the motion excitation of the carrier is insufficient or incomplete, some degrees of freedom of the IMU may not be fully stimulated, which will directly affect the solution effect of the optimization algorithm and make the accuracy of the calibration results worrying.
[0005] Therefore, how to improve the accuracy of LiDAR's external parameter calibration becomes a problem that needs to be solved. Summary of the invention
[0006] In view of this, the present invention provides a method and device for calibrating external parameters of a laser radar.
[0007] In a first aspect, the present invention provides a method for calibrating the external parameters of a laser radar, the method comprising: obtaining first target point cloud data in a target frame that meets predetermined conditions; wherein the target frame is each frame in a multi-frame point cloud data; the predetermined conditions include: a value in a first dimension direction is less than a preset value; determining a first normal vector of a target plane corresponding to the target frame according to the first target point cloud data; wherein the target plane is perpendicular to the first dimension direction; calibrating a first external parameter of the laser radar in a vehicle coordinate system according to the first normal vector and a second normal vector of the laser radar; determining second target point cloud data of the target frame in a vehicle coordinate system according to parameters corresponding to the second dimension direction, parameters in the third dimension direction and the first target point cloud data in the first external parameter; wherein the second dimension direction, the third dimension direction and the first dimension direction correspond to the three-dimensional direction of the three-dimensional coordinate system respectively; calibrating a second external parameter of the laser radar in the vehicle coordinate system based on the second target point cloud data of two adjacent target frames and the vehicle status data at two adjacent moments; wherein the two adjacent moments correspond to the acquisition timestamps of the two adjacent target frames respectively.
[0008] The external parameter calibration method of the laser radar provided in this embodiment uses the first target point cloud data in the target frame that meets the value less than the preset value in the first dimension direction to screen out the point cloud data for subsequent processing, thereby avoiding the influence of the point cloud data greater than the preset value on the subsequent processing process and improving the accuracy of calibration. In addition, by combining the second normal vector of the laser radar and the first normal vector of the target plane for external parameter calibration, the complementarity between the first normal vector and the second normal vector can be used to reduce the error, thereby more accurately determining the position and posture of the laser radar in the vehicle coordinate system.
[0009] In addition, the first normal vector determined by the first target point cloud data of a target frame and the second normal vector of the lidar can be used to determine the first external parameter of the lidar in the vehicle coordinate system. That is, when the vehicle is stationary, some external parameters of the vehicle can be determined. Compared with requiring the vehicle to perform various movements, such as rotation and translation, in order to fully stimulate all degrees of freedom of the sensor system, the demand for calibration equipment and environment can be reduced.
[0010] At the same time, by determining the parameters of the second dimension direction, the parameters of the third dimension direction and the first target point cloud data in the first extrinsic parameter, the second target point cloud data of the target frame in the vehicle coordinate system is obtained, so that the solution problem of the second extrinsic parameter is limited to the two-dimensional plane. Compared with the need for the vehicle to perform various movements, such as rotation, translation, etc., in order to fully stimulate all degrees of freedom of the sensor system, the elevation excitation of the vehicle in the two-dimensional plane can be ignored, and there is no need to fully stimulate all degrees of freedom of the sensor system, thereby reducing the error caused by the elevation change and accurately determining the second extrinsic parameter of the vehicle.
[0011] In a possible implementation, the first external parameter includes: a roll angle, a pitch angle and coordinate values in the first dimension direction; wherein, according to the first normal vector and the second normal vector of the laser radar, the first external parameter of the laser radar in the vehicle coordinate system is calibrated, including: determining the rotation angle between the first normal vector and the second normal vector based on the vector dot product result of the first normal vector and the second normal vector; determining the rotation axis between the first normal vector and the second normal vector based on the vector cross product result of the first normal vector and the second normal vector; determining the first rotation matrix between the first normal vector and the second normal vector based on the rotation angle and the rotation axis; determining the roll angle and pitch angle of the laser radar in the vehicle coordinate system based on the first rotation matrix; determining the angle between the first normal vector and the second normal vector based on the first normal vector and the second normal vector; determining the height of the center point of the laser radar coordinate system from the target plane based on the angle and the distance of the center point of the laser radar coordinate system from the target plane in the direction of the second normal vector; determining the coordinate value in the first dimension direction based on the difference between the height of the center point of the laser radar coordinate system from the target plane and the tire radius.
[0012] The external parameter calibration method of the laser radar provided in this embodiment can accurately determine the relative posture between the radar coordinate system and the vehicle coordinate system by calculating the rotation angle and the rotation axis between the first normal vector and the second normal vector, thereby improving the calibration accuracy. In addition, the relative rotation between the radar coordinate system and the vehicle coordinate system is accurately represented by the first rotation matrix between the first normal vector and the second normal vector, thereby accurately calculating the roll angle and pitch angle of the laser radar relative to the vehicle coordinate system.
[0013] In addition, by calculating the angle between the normal vectors, the relative posture between the radar coordinate system and the target plane can be accurately determined, and combined with the distance of the center point of the radar coordinate system in the direction of the second normal vector, the height of the center point of the radar coordinate system relative to the target plane can be further accurately calculated. Moreover, by introducing the tire radius, the accuracy of determining the coordinate value in the first dimension direction can be improved.
[0014] In a possible implementation, second target point cloud data of the target frame in the vehicle coordinate system is determined based on parameters corresponding to the second dimension direction, parameters in the third dimension direction and the first target point cloud data in the first external parameter, and the second target point cloud data corresponding to the target frame is determined, including: constructing a second rotation matrix based on the roll angle and the pitch angle; determining the second target point cloud data of the target frame in the vehicle coordinate system based on the second rotation matrix and the first target point cloud data.
[0015] The external parameter calibration method of the laser radar provided in this embodiment constructs a rotation matrix through the roll angle and the pitch angle, so that the spatial structure and relative position relationship of the first target point cloud data remain unchanged during the conversion of the first target point cloud data from the laser radar coordinate system to the vehicle coordinate system, thereby being able to accurately describe the rotation state of the object in the three-dimensional space.
[0016] At the same time, according to the second rotation matrix and the first target point cloud data, the second target point cloud data of the target frame in the vehicle coordinate system is determined, so that the second target point cloud data is in the vehicle coordinate system, that is, the solution problem of the second extrinsic parameter is limited to the two-dimensional plane. Compared with the need for the vehicle to perform various movements, such as rotation, translation, etc., in order to fully stimulate all degrees of freedom of the sensor system, the elevation excitation of the vehicle in the two-dimensional plane can be ignored, and there is no need to fully stimulate all degrees of freedom of the sensor system, thereby reducing the error caused by the elevation change, and then accurately determining the second extrinsic parameter of the vehicle.
[0017] In a possible implementation, based on the second target point cloud data of two adjacent target frames and the vehicle status data at two adjacent moments, the second external parameter of the laser radar in the vehicle coordinate system is calibrated, including: determining the predicted posture change of the laser radar based on the vehicle status data at two adjacent moments and the initial external parameter; determining the actual posture change of the laser radar according to the second target point cloud data of two adjacent target frames; determining the error loss based on the actual posture change of the laser radar and the predicted posture change of the laser radar; optimizing the initial external parameter to minimize the error loss and obtain the target external parameter corresponding to the minimum error loss; using the target external parameter as the second external parameter; wherein the second external parameter includes the yaw angle, the coordinate value of the second dimension direction and the coordinate value of the third dimension direction in the laser radar coordinate system.
[0018] The external parameter calibration method of the laser radar provided in this embodiment can accurately calculate the error loss by comparing the predicted posture change of the laser radar with the actual posture change, and then optimize the initial external parameters to reduce the cumulative error in the positioning process and improve the positioning accuracy of the radar and the vehicle. In addition, the actual posture change of the laser radar is determined based on the second target point cloud data of two adjacent target frames, and then the initial external parameters are optimized to minimize the error loss. The method can improve the positioning accuracy of the laser radar.
[0019] In one possible implementation, a first normal vector of a target plane corresponding to a target frame is determined based on first target point cloud data, including: inputting each first target point cloud data into a preset plane equation in turn to construct an overdetermined set of equations; wherein the overdetermined set of equations consists of a target matrix and an undetermined solution; performing singular value decomposition on the target matrix to determine a right singular vector corresponding to the minimum singular value of the undetermined solution; and using the right singular vector as the first normal vector of the target plane corresponding to the target frame.
[0020] The external parameter calibration method of the laser radar provided in this embodiment can make full use of the information in the first target point cloud data by constructing an overdetermined set of equations to improve the accuracy of normal vector calculation. At the same time, singular value decomposition can extract key information in the target matrix, that is, the right singular vector corresponding to the minimum singular value, which can best represent the overall trend of the data point, thereby enhancing the robustness of plane fitting.
[0021] In one possible implementation, the initial external parameters are optimized to minimize the error loss and obtain the target external parameters corresponding to the minimum error loss, including: repeatedly performing the step of optimizing the initial external parameters until the number of repetitions reaches a preset number, and determining that the error loss is minimized or the error loss is lower than a preset loss threshold; and using the initial external parameters corresponding to the minimum error loss as the target external parameters.
[0022] The external parameter calibration method of the laser radar provided in this embodiment can gradually approach the global optimal solution or the local optimal solution by repeatedly optimizing the process, thereby improving the accuracy of the optimization result. At the same time, the preset number of times can ensure that the optimization process of the initial external parameters is fully executed, avoiding the problem of insufficient optimization of the initial external parameters due to insufficient optimization times of the initial external parameters.
[0023] In a second aspect, the present invention provides an external parameter calibration device for a laser radar, the device comprising: an acquisition module, used to acquire first target point cloud data in a target frame that meets predetermined conditions; wherein the target frame is each frame in a multi-frame point cloud data; the predetermined conditions include: a value in a first dimensional direction is less than a preset value; a first determination module, used to determine a first normal vector of a target plane corresponding to the target frame according to the first target point cloud data; wherein the target plane is perpendicular to the first dimensional direction; a first calibration module, used to calibrate a first external parameter of the laser radar in a vehicle coordinate system according to the first normal vector and a second normal vector of the laser radar; a second determination module, used to determine a second target point cloud data of the target frame in a vehicle coordinate system according to parameters corresponding to the second dimensional direction, parameters in the third dimensional direction and the first target point cloud data in the first extrinsic parameter; wherein the second dimensional direction, the third dimensional direction and the first dimensional direction correspond to the three-dimensional direction of the three-dimensional coordinate system respectively; a second calibration module, used to calibrate a second external parameter of the laser radar in the vehicle coordinate system based on the second target point cloud data of two adjacent target frames and vehicle status data at two adjacent moments; wherein the two adjacent moments correspond to the acquisition timestamps of the two adjacent target frames respectively.
[0024] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the external parameter calibration method of the laser radar of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0025] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the external parameter calibration method for a laser radar according to the first aspect or any corresponding embodiment thereof.
[0026] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, which are used to enable a computer to execute the external parameter calibration method of the laser radar of the above-mentioned first aspect or any corresponding embodiment. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 is a schematic flow chart of an external parameter calibration method for a laser radar according to an embodiment of the present invention;
[0029] Figure 2 is a schematic diagram of a laser radar coordinate system and a target plane provided according to an embodiment of the present invention;
[0030] Figure 3 A schematic diagram of a flow chart of an extrinsic parameter calibration method for a laser radar according to an embodiment of the present invention;
[0031] Figure 4 is a schematic diagram of another laser radar coordinate system and target plane provided according to an embodiment of the present invention;
[0032] Figure 5 is a schematic diagram of a laser radar coordinate system and a vehicle coordinate system during vehicle motion according to an embodiment of the present invention;
[0033] Figure 6 is a structural block diagram of an external parameter device of a laser radar according to an embodiment of the present invention;
[0034] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0036] According to an embodiment of the present invention, an embodiment of an external parameter calibration method of a laser radar is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] In this embodiment, a laser radar external parameter calibration method is provided, which can be used for computer equipment, such as computers, servers, etc. Figure 1 FIG. 1 is a flow chart of an external parameter calibration method for a laser radar according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0038] Step S101, obtaining first target point cloud data in a target frame that meets a predetermined condition; wherein the target frame is each frame in a plurality of frames of point cloud data; and the predetermined condition includes: a value in a first dimensional direction being less than a preset value.
[0039] In the target frame, the point cloud data that meets specific predetermined conditions is called the first target point cloud data. In multi-frame point cloud data, each frame of data can be represented as a target frame. The first dimension direction can be the Z-axis direction or other directions, which is not specifically limited here. The preset value can represent a value close to the ground. Among them, the preset value can be N1, or N2, etc., which is not specifically limited here. Multi-frame point cloud data can be collected according to a certain time interval or spatial position order, etc., to form a continuous point cloud data sequence.
[0040] Specifically, a series of continuous frames can be obtained from an acquisition device or a data source, and multiple frames of point cloud data constitute the entire point cloud data set. For the target frame in the multiple frames of point cloud data, a traversal process is performed, and during the traversal process, the first target point cloud data that meets the condition is screened out according to a predetermined condition (the value in the first dimension direction is less than a preset value).
[0041] As an example, data can be collected using devices such as laser radar, RGB-D camera, and 3D scanner to obtain multi-frame point cloud data. Then, the values in the Z-axis direction that are less than the value of N1 can be filtered out from the multi-frame point cloud data.
[0042] In a possible implementation, the point cloud data of the target frame may be sorted according to the values in the Z-axis direction, and the perigee may be screened out according to a certain ratio.
[0043] As an example, data can be collected using devices such as LiDAR, RGB-D cameras, and 3D scanners. Then, the point cloud data of the target frame can be sorted according to the value in the Z-axis direction, and the near-point location can be screened out according to a certain ratio. For example, the point cloud data of the target frame includes: A1, A2, A3, A4, and A5. Among them, after sorting the point cloud data of the target frame according to the value in the Z-axis direction, the order of the point cloud data of the target frame is A1, A3, A4, A2, A5, and a ratio of 2 / 5 can be selected to determine the first target point cloud data, that is, A1 and A3 can be selected as the first target point cloud data.
[0044] In one possible implementation, a value range restriction in the second dimension direction (such as the X-axis direction) or the third dimension direction (such as the Y-axis direction) can be added to the method of determining the first target point cloud data, and screening can also be combined according to other attributes or features, such as the color, reflectivity, intensity, etc. of the point cloud data.
[0045] As an example, the specific content of adding a value range restriction in the second dimension direction (such as the X-axis direction) or the third dimension direction (such as the Y-axis direction) in the method for determining the first target point cloud data can be: the value in the first dimension direction (such as the Z-axis direction, indicating height) is less than a preset value, which is used to filter out point cloud data on the ground or low objects; the value in the second dimension direction needs to be within a certain range, which is used to limit the horizontal position of the point cloud data; the value in the third dimension direction (such as the Y-axis direction, indicating another horizontal direction or vertical direction, depending on the specific definition of the coordinate axis) also needs to meet certain range restrictions to further accurately control the spatial position of the point cloud data.
[0046] Step S102, determining a first normal vector of a target plane corresponding to the target frame according to the first target point cloud data; wherein the target plane is perpendicular to the first dimensional direction.
[0047] The target plane can be a plane fitted with the first target point cloud data. The first dimensional direction can represent the Z-axis direction of the laser radar coordinate system, or it can represent other axis directions, which are not specifically limited here. Among them, the target plane can be a plane perpendicular to the first dimensional direction, such as the ground. The first normal vector can represent a normal vector perpendicular to the target plane. Specifically, the first target point cloud data that meets the predetermined conditions is screened out from the multi-frame point cloud data, and the first target point cloud data is used to determine the first plane perpendicular to the first dimensional direction through a plane fitting algorithm (such as the least squares method, the random sampling consistency algorithm, etc.), and the normal vector, that is, the first normal vector, is calculated based on the fitted first plane.
[0048] As an example, a plane fitting function is used to fit the first target point cloud data. Specifically, it can include the least squares method, which finds the best fitting plane by minimizing the sum of squares of the distances from the point to the plane; or the random sampling consensus algorithm (RANSAC), which can robustly estimate the plane model in data containing noise and outliers. According to the plane equation obtained by fitting (such as Ax+By+Cz+D=0), the normal vector (A, B, C) of the plane can be calculated. After normalization, this vector is the first normal vector.
[0049] As an example, a clustering algorithm (such as DBSCAN, K-means, etc.) can be used to divide the data into multiple subsets, and then plane fitting and normal vector calculation are performed on each subset to determine the target plane and the first normal vector corresponding to the first target point cloud data.
[0050] As an example, the first normal vector corresponding to the target plane may also be determined by singular value decomposition.
[0051] Step S103, calibrating the first extrinsic parameter of the laser radar in the vehicle coordinate system according to the first normal vector and the second normal vector of the laser radar.
[0052] The first external parameter can characterize the external parameters of the laser radar in the vehicle coordinate system, and specifically can describe the conversion relationship between the radar coordinate system and the vehicle coordinate system. The first parameter can include position (translation) and direction (rotation) information. Among them, the first external parameter can include: roll angle, pitch angle and coordinate values in the first dimension direction. The second normal vector of the laser radar can be a normal vector perpendicular to the plane of the laser radar.
[0053] Specifically, based on the first normal vector and the second normal vector of the laser radar, the first external parameter of the laser radar in the vehicle coordinate system can be calibrated by determining the rotation matrix. It can also be determined by other methods, which are not specifically limited here and can be implemented by technical personnel in this field.
[0054] As an example, the first normal vector can be calculated through the previous steps and combined with the second normal vector of the lidar to calculate the rotation matrix required to transform the radar coordinate system into the vehicle coordinate system, and then combined with the physical installation position of the radar (additional measurement or calibration steps may be required) to determine the complete external parameters (including position and orientation) of the radar in the vehicle coordinate system.
[0055] Step S104, determining the second target point cloud data of the target frame in the vehicle coordinate system according to the parameters corresponding to the second dimensional direction, the parameters corresponding to the third dimensional direction and the first target point cloud data in the first external parameter; wherein the second dimensional direction, the third dimensional direction and the first dimensional direction correspond to the three-dimensional direction of the three-dimensional coordinate system respectively.
[0056] The parameters in the second dimension direction can represent the parameters in the first external parameter that describe the rotation of the radar coordinate system in the vehicle coordinate system along the second dimension direction (such as the X-axis direction). The parameters in the third dimension direction can represent the parameters in the first external parameter that describe the rotation of the radar coordinate system in the vehicle coordinate system along the third dimension direction (such as the Y-axis direction). The second target point cloud data can represent the point cloud data set obtained after converting the first target point cloud data from the radar coordinate system to the vehicle coordinate system according to the relevant parameters in the first external parameter. The vehicle coordinate system can be a coordinate system established with the vehicle as the center, which is used to describe the relative position and direction of the vehicle and its surrounding environment.
[0057] Specifically, the parameters in the second dimension direction and the parameters in the third dimension direction are extracted from the first external parameter. The first target point cloud data is converted from the radar coordinate system to the vehicle coordinate system according to the parameters in the second dimension direction and the parameters in the third dimension direction to obtain the second target point cloud data in the vehicle coordinate system.
[0058] As an example, the first external parameter can be a 4x4 homogeneous transformation matrix, and the second dimension parameter and the third dimension parameter are parsed from the first parameter to perform corresponding rotation and translation operations on each point in the first target point cloud data. The converted point cloud data is stored as the second target point cloud data.
[0059] For example, the first target point cloud data collected by the laser radar is in the radar coordinate system. First, the rotation angle and translation amount related to the X-axis (second dimension direction) and the Y-axis (third dimension direction) are extracted from the first external parameter. Then, each point in the first target point cloud data is rotated and translated to obtain the second target point cloud data in the vehicle coordinate system.
[0060] Please refer to Figure 2 , Figure 2 Schematic diagram of a laser radar coordinate system and a target plane provided according to an embodiment of the present invention.
[0061] The laser radar coordinate system may include a first dimension direction, a second dimension direction and a third dimension direction, wherein the first dimension direction, the second dimension direction and the third dimension direction correspond to the three-dimensional direction of the three-dimensional coordinate system respectively. Figure 2 The target plane in is the plane obtained by fitting the first target point cloud data near the ground. The first normal vector is perpendicular to the target plane. The second normal vector of the laser radar can be the first dimension direction in the laser radar coordinate system. The second dimension and the third dimension are respectively perpendicular to the second normal vector.
[0062] From the above content, it can be seen that the first external parameter also includes: the coordinate value in the direction of the first dimension. Figure 2 The height in can be the height of the center point of the laser radar coordinate system from the target plane. The coordinate value in the first dimension can be calculated by the height of the center point of the laser radar coordinate system from the target plane. The height of the center point of the laser radar coordinate system from the target plane can be calculated by the distance from the center point of the laser radar coordinate system to the target plane in the second normal vector direction ( Figure 2 The distance formed by the intersection of the extension line of the second normal vector of the first dimension in the target plane and the center point of the laser radar coordinate system). The specific calculation method is described in detail below.
[0063] Step S105, calibrating the second external parameter of the laser radar in the vehicle coordinate system based on the second target point cloud data of two adjacent target frames and the vehicle status data at two adjacent moments; wherein the two adjacent moments correspond to the acquisition timestamps of the two adjacent target frames respectively.
[0064] Two adjacent target frames can represent two frames that are continuous in time series, and the two adjacent target frames are collected by the laser radar at different time points. Two adjacent moments can represent moments corresponding to the acquisition timestamps of the two adjacent target frames. The vehicle state data can represent the position and posture of the vehicle during driving. The second external parameter can represent another set of external parameters of the laser radar in the vehicle coordinate system, which is used to more accurately describe the conversion relationship between the radar coordinate system and the vehicle coordinate system. Among them, the second external parameter can include: the coordinate value of the second dimension direction and the coordinate value of the third dimension direction in the laser radar coordinate system.
[0065] Obtain the second target point cloud data of two adjacent target frames, and the corresponding vehicle status data at two adjacent moments. Extract feature points or feature areas that can be used for calibration, such as ground points, road edge points, static obstacle points, etc. from the second target point cloud data. Use the vehicle status data at two adjacent moments to estimate the movement of the vehicle between these two moments (such as translation and rotation). Combine the extracted feature points and the vehicle's motion estimate to calculate the second external parameters of the lidar in the vehicle coordinate system. Specifically, an optimization algorithm can be used to minimize the error of the feature points between the two moments to calibrate the second external parameters of the lidar in the vehicle coordinate system.
[0066] As an example, when determining the vehicle's motion estimate and performing the second external parameter calibration of the lidar, the vehicle's motion parameters can be calculated based on the vehicle state data (such as wheel speed sensor, etc.), and the external parameter calibration can be performed using a nonlinear optimization algorithm (such as ICP algorithm, Levenberg-Marquardt algorithm, etc.).
[0067] The external parameter calibration method of the laser radar provided in this embodiment uses the first target point cloud data in the target frame that meets the value less than the preset value in the first dimension direction to screen out the point cloud data for subsequent processing, thereby avoiding the influence of the point cloud data greater than the preset value on the subsequent processing process and improving the accuracy of calibration. In addition, by combining the second normal vector of the laser radar and the first normal vector of the target plane for external parameter calibration, the complementarity between the first normal vector and the second normal vector can be used to reduce the error, thereby more accurately determining the position and posture of the laser radar in the vehicle coordinate system.
[0068] In addition, the first normal vector determined by the first target point cloud data of a target frame and the second normal vector of the lidar can be used to determine the first external parameter of the lidar in the vehicle coordinate system. That is, when the vehicle is stationary, some external parameters of the vehicle can be determined. Compared with requiring the vehicle to perform various movements, such as rotation and translation, in order to fully stimulate all degrees of freedom of the sensor system, the demand for calibration equipment and environment can be reduced.
[0069] At the same time, by determining the parameters of the second dimension direction, the parameters of the third dimension direction and the first target point cloud data in the first extrinsic parameter, the second target point cloud data of the target frame in the vehicle coordinate system is obtained, so that the solution problem of the second extrinsic parameter is limited to the two-dimensional plane. Compared with the need for the vehicle to perform various movements, such as rotation, translation, etc., in order to fully stimulate all degrees of freedom of the sensor system, the elevation excitation of the vehicle in the two-dimensional plane can be ignored, and there is no need to fully stimulate all degrees of freedom of the sensor system, thereby reducing the error caused by the elevation change and accurately determining the second extrinsic parameter of the vehicle.
[0070] Figure 3FIG. 1 is a flow chart of an external parameter calibration method for a laser radar according to an embodiment of the present invention. Figure 3 As shown, in a possible implementation, the first external parameter includes: a roll angle, a pitch angle, and a coordinate value in a first dimensional direction; wherein the above step S103 includes:
[0071] Step S1031: determining a rotation angle between the first normal vector and the second normal vector based on a vector dot product result of the first normal vector and the second normal vector.
[0072] The vector dot product result of the first normal vector and the second normal vector can be determined by multiplying the corresponding components of the two vectors and then summing them. The length (modulus) of the first normal vector and the second normal vector can then be calculated, and the cosine of the angle between the two vectors (the vector dot product result) can be calculated using the vector dot product and the vector length result. The cosine value is converted to an angle using the inverse cosine function (arccos) to determine the rotation angle between the first normal vector and the second normal vector.
[0073] In a possible implementation, the rotation angle between the first normal vector and the second normal vector may be determined by the following formula.
[0074] n1·n2=|n1||n2|cos(angle); wherein n1 is the first normal vector, n2 is the second normal vector, cos(angle) is the vector dot product result, and angle is the rotation angle between the first normal vector and the second normal vector.
[0075] Step S1032: determining a rotation axis between the first normal vector and the second normal vector based on a vector cross product result of the first normal vector and the second normal vector.
[0076] The rotation axis can represent the axis around which an object rotates in three-dimensional space. For a rotation between two normal vectors, the rotation axis is a vector perpendicular to the plane defined by the two normal vectors. Specifically, the cross product of the first normal vector and the second normal vector is calculated. The result of the cross product is the rotation axis.
[0077] In a possible implementation, the rotation axis between the first normal vector and the second normal vector may be determined by the following formula.
[0078] n1 x n2 = |n1||n2|sin(angle); where |n1||n2|sin(angle) is the vector cross product result, that is, the rotation axis between the first normal vector and the second normal vector.
[0079] As an example, the first normal vector is (0, 0, 1) and the second normal vector is (1, 0, 0). The cross product of the first normal vector and the second normal vector is (0, 0, 1) × (1, 0, 0) = (00-10, 10-00, 01-01) = (0, 0, 0-0) = (0, 1, 0); the result of the cross product (0, 1, 0) is the rotation axis.
[0080] Step S1033: determining a first rotation matrix between the first normal vector and the second normal vector according to the rotation angle and the rotation axis.
[0081] In three-dimensional space, the first rotation matrix rotating around an arbitrary axis can be constructed by the Rodrigues' rotation formula, or by other methods, which are not specifically limited here and can be implemented by those skilled in the art. The specific formula is as follows: R = cos(θ)*I+(1-cos(θ))*n*n T +sin(θ)*n; where θ is the rotation angle, n is the rotation axis, and n T is the transpose of the rotation axis, and R is the first rotation matrix.
[0082] Step S1034, based on the first rotation matrix, determine the roll angle and pitch angle of the laser radar in the vehicle coordinate system.
[0083] After determining the first rotation matrix, only the rotational degrees of freedom of the roll angle and pitch angle of the laser radar in the vehicle coordinate system can be calibrated through the first rotation matrix, so the roll angle and pitch angle are decomposed from this rotation matrix.
[0084] As an example, a mathematical formula can be used to extract the roll angle and pitch angle from the rotation matrix. For example, for the roll angle around the X axis, the first two elements of the first column of the rotation matrix can be used to calculate the inverse tangent function; for the pitch angle around the Y axis, the first two elements of the second column of the rotation matrix can be used to calculate the inverse tangent function, and so on.
[0085] As an example, the roll angle and the pitch angle may be determined by decomposing the Euler angle from the first rotation matrix.
[0086] Step S1035: determining an angle between the first normal vector and the second normal vector based on the first normal vector and the second normal vector.
[0087] The angle may represent the angle between the first normal vector and the second normal vector. Specifically, the angle between the first normal vector and the second normal vector is determined after determining the coordinate value between the first normal vector and the second normal vector.
[0088] Step S1036, determining the height of the center point of the laser radar coordinate system from the target plane according to the angle and the distance of the center point of the laser radar coordinate system from the target plane in the direction of the second normal vector.
[0089] The center point of the laser radar coordinate system can be the origin of the laser radar coordinate system, which can be located at the physical center or geometric center of the radar. The direction of the second normal vector can be the normal vector direction of the target plane, which is perpendicular to the target plane. In this direction, the distance between the center point of the laser radar coordinate system and the target plane can be measured. Specifically, determine the angle between the vertical direction of the laser radar coordinate system and the normal vector of the target plane. Determine the distance between the center point of the laser radar coordinate system and the target plane along the normal vector direction of the target plane (i.e., the second normal vector direction). Using trigonometric functions (such as sine, cosine or tangent) and known angle and distance data, the height of the center point of the laser radar coordinate system relative to the target plane can be calculated.
[0090] For example: the angle between the vertical direction of the lidar coordinate system and the normal vector of the target plane is 45 degrees. The distance between the center point of the lidar coordinate system and the target plane along the normal vector direction of the target plane is 10 meters. Using the sine function, the height can be calculated to be 10×cos45°≈7.07 meters.
[0091] Please refer to Figure 4 , Figure 4 is a schematic diagram of another laser radar coordinate system and target plane provided according to an embodiment of the present invention.
[0092] Figure 4 The angle in can be the angle between the first normal vector and the second normal vector. The distance from the center point of the laser radar coordinate system to the target plane in the direction of the second normal vector can be Figure 4 The H in the laser radar coordinate system is the height from the center point of the target plane. Figure 4 The height of the medium.
[0093] Step S1037, determining the coordinate value in the first dimension direction according to the difference between the height of the center point of the laser radar coordinate system from the target plane and the tire radius.
[0094] After determining the height of the center point of the laser radar coordinate system from the target plane, the coordinate value in the first dimension direction can be obtained by subtracting the tire radius from the height of the center point of the laser radar coordinate system from the target plane.
[0095] The external parameter calibration method of the laser radar provided in this embodiment can accurately determine the relative posture between the radar coordinate system and the vehicle coordinate system by calculating the rotation angle and the rotation axis between the first normal vector and the second normal vector, thereby improving the calibration accuracy. In addition, the relative rotation between the radar coordinate system and the vehicle coordinate system is accurately represented by the first rotation matrix between the first normal vector and the second normal vector, thereby accurately calculating the roll angle and pitch angle of the laser radar relative to the vehicle coordinate system.
[0096] In addition, by calculating the angle between the normal vectors, the relative posture between the radar coordinate system and the target plane can be accurately determined, and combined with the distance of the center point of the radar coordinate system in the direction of the second normal vector, the height of the center point of the radar coordinate system relative to the target plane can be further accurately calculated. Moreover, by introducing the tire radius, the accuracy of determining the coordinate value in the first dimension direction can be improved.
[0097] In a possible implementation, the above step S104 includes:
[0098] Step S1041: construct a second rotation matrix according to the roll angle and the pitch angle.
[0099] The second rotation matrix can be a 3x3 matrix. Specifically, a second rotation matrix can be constructed based on the known roll angle and pitch angle. This rotation matrix will be able to describe the rotation state of the laser radar relative to the vehicle coordinate system in three-dimensional space.
[0100] As an example, a first matrix may be constructed according to the roll angle, and a second matrix may be constructed according to the pitch angle. In the case of continuous rotation of the same reference coordinate system, the first rotation matrix may be the product of the first matrix and the second matrix.
[0101] Step S1042: Determine the second target point cloud data of the target frame in the vehicle coordinate system according to the second rotation matrix and the first target point cloud data.
[0102] After the second rotation matrix is determined, the first target point cloud data may be rotated according to the second rotation matrix so that the second target point cloud data is in the same plane as the vehicle coordinate system.
[0103] As an example, the second rotation matrix (denoted as R) is the matrix required to rotate the first target point cloud data from the radar coordinate system to the vehicle coordinate system to obtain the second target point cloud data. Among them, the first target point cloud data (denoted as P original) is a set of multiple points, each point is represented by its coordinates (x, y, z) in three-dimensional space, P vehicle = R × P original; among them, P vehicle is the second target point cloud data, and R is the second target rotation matrix.
[0104] The external parameter calibration method of the laser radar provided in this embodiment constructs a rotation matrix through the roll angle and the pitch angle, so that the spatial structure and relative position relationship of the first target point cloud data remain unchanged during the conversion of the first target point cloud data from the laser radar coordinate system to the vehicle coordinate system, thereby being able to accurately describe the rotation state of the object in the three-dimensional space.
[0105] At the same time, according to the second rotation matrix and the first target point cloud data, the second target point cloud data of the target frame in the vehicle coordinate system is determined, so that the second target point cloud data is in the vehicle coordinate system, that is, the solution problem of the second extrinsic parameter is limited to the two-dimensional plane. Compared with the need for the vehicle to perform various movements, such as rotation, translation, etc., in order to fully stimulate all degrees of freedom of the sensor system, the elevation excitation of the vehicle in the two-dimensional plane can be ignored, and there is no need to fully stimulate all degrees of freedom of the sensor system, thereby reducing the error caused by the elevation change, and then accurately determining the second extrinsic parameter of the vehicle.
[0106] In a possible implementation, step S105 includes:
[0107] Step S1051, based on the vehicle state data at two adjacent moments and the initial external parameters, determine the predicted posture change of the laser radar.
[0108] The vehicle state data at two adjacent moments can represent the state information of the vehicle at two adjacent moments. Among them, the vehicle state data may include position, direction, etc. It is used to describe the motion state of the vehicle in space. The initial external parameters can represent the relative position relationship between the radar and the vehicle, including the position and direction of the radar relative to the vehicle coordinate system. Among them, the initial external parameters may include: the initial yaw angle, the initial coordinate value of the second dimension direction in the laser radar coordinate system, and the initial coordinate value of the third dimension direction.
[0109] The vehicle status data at two adjacent moments can be obtained from the vehicle's sensor system. According to the initial external parameters, the data measured by the radar is converted into data in the vehicle coordinate system. Based on the vehicle status data at two adjacent moments, the motion changes of the vehicle between the two moments are calculated, including position changes and attitude changes. According to the vehicle's motion changes and the initial external parameters, the position and attitude changes of the lidar relative to the vehicle coordinate system at a certain moment in the future are predicted.
[0110] As an example, the vehicle status data is acquired in real time through the vehicle sensor system (such as GPS, etc.) and transmitted to the processing unit through the data interface or communication protocol. The radar data is converted into data in the vehicle coordinate system according to the initial external parameters using the matrix operation and coordinate transformation principle, and the motion change of the vehicle between the two moments is calculated using the kinematic formula or algorithm based on the vehicle status data at two adjacent moments. Based on the motion change of the vehicle and the initial external parameters, the prediction algorithm (such as Kalman filter, particle filter, etc.) is used to predict the position change of the radar at a certain moment in the future.
[0111] In a possible implementation, based on the vehicle state data at two adjacent moments and the initial external parameters, the predicted position change of the lidar can be determined using the following formula:
[0112] Among them, s k is the predicted position change of the lidar, q k is the vehicle status data at time k, q k+1 is the vehicle status data at time k+1, and I is the unit matrix.
[0113] More specifically, q k =[a x , a y , a theta ]T,q k+1 =[b x , b y , b theta ]T; where a x is the position in the second dimension at time k, a y is the position in the third dimension at time k, a theta is the yaw angle at time k, and similarly. x is the position in the second dimension at time k+1, b y is the position in the third dimension at time k+1, b theta is the yaw angle at time k+1. k It can be obtained by the deformation formula:
[0114]
[0115] Step S1052, determining the actual posture change of the laser radar based on the second target point cloud data of two adjacent target frames.
[0116] The actual position and posture change of the laser radar represents the change in the position and posture of the laser radar in two-dimensional space between two adjacent target frames, which can specifically include translation and rotation. Specifically, the point cloud data of two adjacent target frames are aligned, that is, a target frame transformation (including translation and rotation) is found so that one target frame can be aligned with the second target point cloud data of another target frame as much as possible. In the process of point cloud registration, a transformation matrix can be calculated, which can represent the transformation relationship from the source point cloud to the target point cloud. The translation component and rotation component are extracted from the transformation matrix to characterize the change in the actual position and posture of the laser radar between two adjacent target frames.
[0117] In one possible implementation, radar data often contains noise and errors, so when performing point cloud registration and pose calculation, corresponding filtering and calibration measures can be taken to improve accuracy.
[0118] Step S1053, determining the error loss based on the actual posture change of the laser radar and the predicted posture change of the laser radar.
[0119] The actual pose change is compared with the predicted pose change, and the degree of difference between them, i.e., the error loss, is calculated.
[0120] For example, a self-driving car is driving at a constant speed on a straight road. The vehicle is equipped with a high-precision radar system that can perceive the surrounding environment and calculate its own posture (position and attitude) in real time. At the same time, the vehicle is also equipped with a set of advanced prediction algorithms that can predict posture changes in the future based on historical data and vehicle dynamics models.
[0121] Actual posture change: The radar system outputs the vehicle's posture data at regular intervals (such as 0.1 seconds), including position (x, y) and yaw angle. By comparing the posture data of two adjacent times, the actual posture change of the lidar can be calculated. Predicted posture change: The prediction algorithm predicts the posture change in the future (such as 0.5 seconds) based on historical posture data and vehicle dynamics models. The prediction results also include changes in position (x, y) and attitude yaw angle. Then compare them to get the error loss.
[0122] Step S1054, optimizing the initial external parameters to minimize the error loss, and obtaining the target external parameters corresponding to the minimum error loss.
[0123] As can be seen above, the initial external parameters define the relative position and attitude between the laser radar and the vehicle coordinate system. The error loss is calculated based on the difference between the actual position change and the predicted position change of the laser radar. During the optimization process, the purpose is to determine the external parameter corresponding to the minimum error loss, which can be used as the second external parameter.
[0124] Specifically, the loss function can be minimized by iteratively adjusting the parameters to determine the second external parameter. The optimal solution can also be found by simulating natural selection and genetic mechanisms to determine the second external parameter, etc., which are not specifically limited here and can be implemented by those skilled in the art.
[0125] As an example, based on the current initial external parameters, calculate the gradient of the error loss function with respect to the initial external parameters. Adjust the external parameter estimate according to the gradient. Recalculate the error loss using the updated external parameter estimate. If the error loss is less than a preset threshold, or the parameter update amount is less than a certain threshold, stop the iteration; otherwise, continue the iteration. After the iteration is completed, output the external parameter estimate that minimizes the error loss as the target external parameter.
[0126] In a possible implementation, the initial external parameters are optimized to minimize the error loss, and the target external parameters corresponding to the minimum error loss are obtained. The following formula can be used:
[0127] Among them, s k is the predicted position change of the lidar, s k is the actual position change of the laser radar, P k is the covariance matrix, which can characterize the uncertainty of parameter estimation and the correlation between parameters. J is the error loss.
[0128] It should be noted that, as can be seen from the above, s k In the process of determining , the initial external parameter is used. In this formula, by optimizing the initial external parameter, the error loss can be minimized, and the external parameter corresponding to the minimum error loss is used as the second external parameter.
[0129] As an example, the process of determining the minimum error loss can be performed by setting a threshold value, and when the value of the error loss is lower than the threshold value, the error loss can be characterized as the minimum. It can also be performed by setting the number of repeated executions, that is, when the number of repeated executions is reached, the error loss is minimized, etc., which is not specifically limited here and can be implemented by those skilled in the art.
[0130] Please refer to Figure 5 , Figure 5 It is a schematic diagram of a laser radar coordinate system and a vehicle coordinate system during vehicle motion according to an embodiment of the present invention.
[0131] Figure 5 In the example, the vehicle state data at time k can be q k , the vehicle status data at time k+1 can be q k+1 , accordingly, s k is the actual pose change of the lidar.
[0132] After the laser radar coordinate system is aligned with the vehicle's coordinate system, the vehicle can move on a two-dimensional plane. The vehicle's movement process is as follows: Figure 5 As shown in the figure, the external parameter between the vehicle coordinate system and the laser radar coordinate system in the two-dimensional plane is L = (x, y, yaw). Among them, yaw is the yaw angle. A wheel odometer (r k ), a lidar odometer (s k ). A certain period of time [t k ,t k+1 ], wheel odometer at t k The position at the moment is q k , at t k+1 The position at the moment is q k+1 , the external parameter is L.
[0133] Specifically, the above step S1054 includes:
[0134] Step a1, repeatedly executing the step of optimizing the initial external parameters until the number of repetitions reaches a preset number or the error loss is lower than a preset loss threshold, and determining that the error loss is minimum.
[0135] The preset number of times can represent the upper limit of the number of repeated executions set before the optimization process is performed, and is used to control the number of iterations of the optimization process. The preset number of times can be F1 times, or F2 times, etc., which is not specifically limited here.
[0136] The preset loss threshold may represent a threshold that satisfies the minimum error loss. The preset loss threshold may be K1 or K2, which is not specifically limited here.
[0137] The error loss between the radar posture change and the actual posture change can be calculated based on the value of the current initial external parameter. Then, the error loss is reduced by adjusting the value of the initial external parameter. The value of the initial external parameter can be adjusted by an optimization algorithm (such as gradient descent, Levenberg-Marquardt, etc.) to reduce the error loss. The value of the initial external parameter can also be adjusted by other methods to reduce the error loss. No specific limitation is made here, and it can be implemented by those skilled in the art.
[0138] In the process of repeated execution, once the error loss is lower than a preset loss threshold, it can be determined that the error loss is minimum.
[0139] In one possible implementation, during the optimization process, the convergence state of the optimization process can be determined and the preset number of times can be adjusted dynamically. For example: set the initial external parameter estimate. Define the error loss function. Set an initial preset number of times. Set a convergence threshold to determine whether the optimization is close enough to the optimal solution. After each iteration, calculate the difference between the current error loss and the error loss of the previous iteration. If this difference is less than the preset convergence threshold, it is considered that the optimization has converged to a degree close enough to the optimal solution. If it has converged before reaching the preset number of times (that is, the error change is less than the convergence threshold), stop the iteration in advance and output the current value of the initial external parameter. If it has not converged when the preset number of times is reached, you can increase the preset number of times and continue to iterate until it converges or reaches a new preset number of upper limits.
[0140] Step a2: The initial external parameter corresponding to the minimum error loss is used as the target external parameter.
[0141] After determining that the error loss is minimized, the initial external parameter corresponding to the minimum error loss is used as the target external parameter.
[0142] Step S1055, taking the target external parameter as the second external parameter; wherein the second external parameter includes the yaw angle, the coordinate value of the second dimension direction and the coordinate value of the third dimension direction in the laser radar coordinate system.
[0143] The second external parameter may include a yaw angle, a coordinate value of a second dimension direction and a coordinate value of a third dimension direction in the laser radar coordinate system. After the target external parameter is determined, the second external parameter is also determined.
[0144] The external parameter calibration method of the laser radar provided in this embodiment can accurately calculate the error loss by comparing the predicted posture change of the laser radar with the actual posture change, and then optimize the initial external parameters to reduce the cumulative error in the positioning process and improve the positioning accuracy of the radar and the vehicle. In addition, the actual posture change of the laser radar is determined based on the second target point cloud data of two adjacent target frames, and then the initial external parameters are optimized to minimize the error loss. The method can improve the positioning accuracy of the laser radar.
[0145] In addition, by repeating the optimization process for many times, the global optimal solution or the local optimal solution can be gradually approached, thereby improving the accuracy of the optimization result. At the same time, the preset number of times can ensure that the optimization process of the initial external parameters is fully executed, avoiding the problem of insufficient optimization of the initial external parameters due to insufficient optimization times of the initial external parameters.
[0146] In a possible implementation, the above step S102 includes:
[0147] Step S1021, input each first target point cloud data into the preset plane equation in sequence to construct an overdetermined equation group; wherein the overdetermined equation group consists of a target matrix and a to-be-determined solution.
[0148] The preset plane method can be ax+by+cz+d=0, where (x, y, z) represents each point in the first target point cloud data. i ,y i , z i ), and substitute it into the preset plane equation to obtain an equation Ax i +By i +Cz i +D=0, since there are multiple point cloud data points, multiple such equations will be obtained, forming an overdetermined system of equations. Among them, the overdetermined system of equations can be AX=0. Among them, A is the target matrix and X is the solution to be determined.
[0149] Step S1022, performing singular value decomposition on the target matrix to determine the right singular vector corresponding to the minimum singular value of the undetermined solution.
[0150] Step S1023: Use the right singular vector as the first normal vector of the target plane corresponding to the target frame.
[0151] From the above content, we can know that A is composed of point cloud coordinates (x i ,y i , z i, 1) T The matrix is composed of, and X = (a, b, c, d) is the solution to the plane equation. By performing singular value decomposition (SVD) on the target matrix A, the right singular vector corresponding to the minimum singular value of A is the optimal solution. Among them, n1 = (a, b, c) is the first normal vector.
[0152] The external parameter calibration method of the laser radar provided in this embodiment can make full use of the information in the first target point cloud data by constructing an overdetermined set of equations to improve the accuracy of normal vector calculation. At the same time, singular value decomposition can extract key information in the target matrix, that is, the right singular vector corresponding to the minimum singular value, which can best represent the overall trend of the data point, thereby enhancing the robustness of plane fitting.
[0153] In this embodiment, an external parameter calibration device for a laser radar is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0154] This embodiment provides an external parameter calibration device for a laser radar, such as Figure 6 As shown, it includes: an acquisition module 601, which is used to acquire first target point cloud data in a target frame that meets a predetermined condition; wherein the target frame is each frame in the multi-frame point cloud data; the predetermined condition includes: a value in the first dimension direction is less than a preset value;
[0155] A first determination module 602 is used to determine a first normal vector of a target plane corresponding to the target frame according to the first target point cloud data; wherein the target plane is perpendicular to the first dimensional direction;
[0156] A first calibration module 603, used to calibrate a first extrinsic parameter of the laser radar in the vehicle coordinate system according to the first normal vector and the second normal vector of the laser radar;
[0157] A second determination module 604 is used to determine the second target point cloud data of the target frame in the vehicle coordinate system according to the parameters corresponding to the second dimensional direction, the parameters corresponding to the third dimensional direction and the first target point cloud data in the first external parameter; wherein the second dimensional direction, the third dimensional direction and the first dimensional direction correspond to the three-dimensional direction of the three-dimensional coordinate system respectively;
[0158] The second calibration module 605 is used to calibrate the second external parameter of the laser radar in the vehicle coordinate system based on the second target point cloud data of two adjacent target frames and the vehicle status data at two adjacent moments, and the two adjacent moments correspond to the acquisition timestamps of the two adjacent target frames respectively.
[0159] In some possible implementations, the first external parameter includes: a roll angle, a pitch angle, and a coordinate value in the first dimension direction; wherein the first calibration module 603 includes: a first determination unit, used to determine the rotation angle between the first normal vector and the second normal vector based on the vector dot product result of the first normal vector and the second normal vector; a second determination unit, used to determine the rotation axis between the first normal vector and the second normal vector based on the vector cross product result of the first normal vector and the second normal vector; a third determination unit, used to determine the first rotation matrix between the first normal vector and the second normal vector according to the rotation angle and the rotation axis; a fourth determination unit, used to determine the roll angle and the pitch angle of the laser radar in the vehicle coordinate system based on the first rotation matrix; a fifth determination unit, used to determine the angle between the first normal vector and the second normal vector based on the first normal vector and the second normal vector; a sixth determination unit, used to determine the height of the center point of the laser radar coordinate system from the target plane according to the angle and the distance of the center point of the laser radar coordinate system from the target plane in the direction of the second normal vector; a seventh determination unit, used to determine the coordinate value in the first dimension direction according to the difference between the height of the center point of the laser radar coordinate system from the target plane and the tire radius.
[0160] In some possible implementations, the second determination module 604 includes: a first construction unit, used to construct a second rotation matrix based on the roll angle and the pitch angle; an eighth determination unit, used to determine the second target point cloud data of the target frame in the vehicle coordinate system based on the second rotation matrix and the first target point cloud data.
[0161] In some possible implementations, the second calibration module 605 includes: a ninth determination unit, used to determine the predicted posture change of the laser radar based on the vehicle state data and the initial external parameters at two adjacent moments; a tenth determination unit, used to determine the actual posture change of the laser radar according to the second target point cloud data of two adjacent target frames; an eleventh determination unit, used to determine the error loss based on the actual posture change of the laser radar and the predicted posture change of the laser radar; an optimization processing unit, used to optimize the initial external parameters to minimize the error loss and obtain the target external parameters corresponding to the minimum error loss; a twelfth determination unit, used to use the target external parameters as the second external parameters; wherein the second external parameters include the yaw angle, the coordinate value in the second dimension direction in the laser radar coordinate system, and the coordinate value in the third dimension direction.
[0162] In some possible implementations, the optimization determination unit includes: a repeated execution sub-unit, used to repeatedly execute the steps of optimizing the initial external parameters until the number of repeated executions reaches a preset number of times and the error loss is determined to be minimum; a determination sub-unit, used to use the initial external parameters corresponding to the minimum error loss as target external parameters.
[0163] In some possible implementations, the first determination module 602 includes: a second construction unit, used to input each first target point cloud data into a preset plane equation in sequence to construct an overdetermined set of equations; wherein the overdetermined set of equations consists of a target matrix and an undetermined solution; a thirteenth determination unit, used to perform singular value decomposition on the target matrix, and determine the right singular vector corresponding to the minimum singular value of the undetermined solution; and a fourteenth determination unit, used to use the right singular vector as the first normal vector of the target plane corresponding to the target frame.
[0164] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0165] The external parameter calibration device of the laser radar in this embodiment is presented in the form of a functional unit, where the functional unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0166] The embodiment of the present invention also provides a computer device having the above Figure 6The external parameter calibration device of the laser radar shown.
[0167] See also Figure 7 , Figure 7 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0168] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0169] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0170] The memory 20 may include a program storage area and a data storage area; wherein the program storage area may store an operating system, an application required for at least one function; and the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0171] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0172] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.
[0173] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0174] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0175] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0176] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A laser radar external parameter calibration method, characterized in that: The method comprises: Acquire first target point cloud data in a target frame that meets a predetermined condition; wherein the target frame is each frame in the multi-frame point cloud data; the predetermined condition includes: a value in a first dimension direction is less than a preset value; Determine a first normal vector of a target plane corresponding to the target frame according to the first target point cloud data; wherein the target plane is perpendicular to the first dimensional direction; Calibrate a first extrinsic parameter of the laser radar in the vehicle coordinate system according to the first normal vector and the second normal vector of the laser radar; Determine the second target point cloud data of the target frame in the vehicle coordinate system according to the parameters corresponding to the second dimensional direction, the parameters corresponding to the third dimensional direction and the first target point cloud data in the first external parameter; wherein the second dimensional direction, the third dimensional direction and the first dimensional direction correspond to the three-dimensional direction of the three-dimensional coordinate system respectively; Based on the second target point cloud data of two adjacent target frames and the vehicle status data at two adjacent moments, the second external parameter of the laser radar in the vehicle coordinate system is calibrated; wherein the two adjacent moments correspond to the acquisition timestamps of the two adjacent target frames respectively.
2. The external parameter calibration method of laser radar according to claim 1, characterized in that: The first external parameter includes: a roll angle, a pitch angle, and a coordinate value of a first dimension direction; wherein, calibrating the first external parameter of the laser radar in the vehicle coordinate system according to the first normal vector and the second normal vector of the laser radar includes: Determine a rotation angle between the first normal vector and the second normal vector based on a vector dot product result of the first normal vector and the second normal vector; determining a rotation axis between the first normal vector and the second normal vector based on a vector cross product result of the first normal vector and the second normal vector; Determine a first rotation matrix between the first normal vector and the second normal vector according to the rotation angle and the rotation axis; Based on the first rotation matrix, determine the roll angle and pitch angle of the laser radar in the vehicle coordinate system; Determine an angle between the first normal vector and the second normal vector based on the first normal vector and the second normal vector; Determine the height of the center point of the laser radar coordinate system from the target plane according to the angle and the distance of the center point of the laser radar coordinate system from the target plane in the direction of the second normal vector; The coordinate value in the first dimension direction is determined according to the difference between the height of the center point of the laser radar coordinate system from the target plane and the tire radius.
3. The external parameter calibration method of laser radar according to claim 2, characterized in that: The method of determining the second target point cloud data of the target frame in the vehicle coordinate system according to the parameter corresponding to the second dimension direction in the first external parameter, the parameter corresponding to the third dimension direction and the first target point cloud data, and determining the second target point cloud data corresponding to the target frame includes: constructing a second rotation matrix according to the roll angle and the pitch angle; Determine second target point cloud data of the target frame in the vehicle coordinate system according to the second rotation matrix and the first target point cloud data.
4. The external parameter calibration method of laser radar according to claim 3, characterized in that: The calibrating the second external parameter of the laser radar in the vehicle coordinate system based on the second target point cloud data of two adjacent target frames and the vehicle state data at two adjacent moments includes: Determining a predicted position change of the laser radar based on the vehicle state data and initial external parameters at the two adjacent moments; Determining an actual position change of the laser radar according to the second target point cloud data of two adjacent target frames; Determining error loss based on an actual pose change of the laser radar and a predicted pose change of the laser radar; Optimizing the initial external parameters to minimize the error loss and obtaining target external parameters corresponding to the minimum error loss; The target external parameter is used as the second external parameter; wherein the second external parameter includes a yaw angle, a coordinate value in a second dimension direction and a coordinate value in a third dimension direction in a laser radar coordinate system.
5. The external parameter calibration method of laser radar according to claim 1, characterized in that: The step of determining a first normal vector of a target plane corresponding to the target frame according to the first target point cloud data includes: Inputting each first target point cloud data into a preset plane equation in sequence to construct an overdetermined equation group; wherein the overdetermined equation group consists of a target matrix and an undetermined solution; Performing singular value decomposition on the target matrix to determine the right singular vector corresponding to the minimum singular value of the undetermined solution; The right singular vector is used as the first normal vector of the target plane corresponding to the target frame.
6. The external parameter calibration method of laser radar according to claim 4, characterized in that: The optimizing process of the initial external parameter to minimize the error loss and obtain the target external parameter corresponding to the minimum error loss includes: Repeating the step of optimizing the initial external parameter until the number of repetitions reaches a preset number of times or the error loss is lower than a preset loss threshold, determining that the error loss is minimum; The initial external parameter corresponding to the minimum error loss is used as the target external parameter.
7. An external parameter calibration device for a laser radar, characterized in that: The device comprises: An acquisition module is used to acquire first target point cloud data in a target frame that meets a predetermined condition; wherein the target frame is each frame in the multi-frame point cloud data; the predetermined condition includes: a value in a first dimension direction is less than a preset value; A first determination module, configured to determine a first normal vector of a target plane corresponding to the target frame according to the first target point cloud data; wherein the target plane is perpendicular to the first dimensional direction; A first calibration module, used for calibrating a first extrinsic parameter of the laser radar in a vehicle coordinate system according to the first normal vector and a second normal vector of the laser radar; A second determination module is used to determine the second target point cloud data of the target frame in the vehicle coordinate system according to the parameters corresponding to the second dimensional direction, the parameters corresponding to the third dimensional direction and the first target point cloud data in the first external parameter; wherein the second dimensional direction, the third dimensional direction and the first dimensional direction correspond to the three-dimensional direction of the three-dimensional coordinate system respectively; The second calibration module is used to calibrate the second external parameter of the laser radar in the vehicle coordinate system based on the second target point cloud data of two adjacent target frames and the vehicle status data at two adjacent moments; wherein the two adjacent moments correspond to the acquisition timestamps of the two adjacent target frames respectively.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the external parameter calibration method of the laser radar according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the external parameter calibration method of the laser radar according to any one of claims 1 to 6.
10. A computer program product, characterized in that It includes computer instructions, and the computer instructions are used to enable a computer to execute the external parameter calibration method of the laser radar described in any one of claims 1 to 6.
Citation Information
Cited By
Mobile robot external parameter calibration method and system based on multi-vision technology and medium
CN120339416A
Target plate and method for rail transit laser radar external parameter calibration
CN121299634A