Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, the millimeter wave radar calibration method according to the embodiment of the present invention is implemented by the following steps:
s1, detecting the key point positions of a plurality of markers 200 with the same height in a region to be detected by using a laser radar and a millimeter wave radar respectively to obtain the key point position based on the laser radar and the key point position based on the millimeter wave radar;
wherein, the marker 200 is put on the place 300 that levels spaciously, as shown in fig. 3, is in the effective detection area scope of installing millimeter wave radar and laser radar on own car 100, the marker 200 is put on the place that the surface is spaciously and smoothly, can be in the place ahead of own car 100, levels the central line 310 one side of the place 300 that levels spaciously, between the curb 320 of both sides, the width W in place will satisfy certain requirement, if be greater than 10 m. The selection of an open and flat field 300 for placement of the marker 200 ensures that no other millimeter wave radar or lidar detectable targets are in the vicinity of the marker 200.
As an alternative embodiment, the marker 200 may be a radar reflector or other marker, or a combination of a radar reflector and other markers. The number and placement of the markers is not limited to the embodiment of fig. 3.
As an alternative embodiment, the middle key point position is preferably a center point, but is not limited to taking the center point position as the key point position.
It should be noted that, in the embodiment of the present invention, when the laser radar is used to detect the marker 200, the position of the key point of the marker may be obtained from the clustering result by using a clustering method, and the clustering method used may be any available clustering method.
S2, matching the key point position based on the laser radar with the key point position based on the millimeter wave radar, and calculating a 6-degree-of-Freedom (Six details of Freedom) conversion relation from a millimeter wave radar coordinate system to a laser radar coordinate system according to a matching result;
and S3, calculating the 6-degree-of-freedom conversion relation from the millimeter wave radar coordinate system to the vehicle coordinate system by utilizing the conversion relation between the laser radar coordinate system and the vehicle coordinate system and the 6-degree-of-freedom conversion relation from the millimeter wave radar coordinate system to the laser radar coordinate system.
Fig. 2a-2c are schematic diagrams of a laser radar coordinate system, a millimeter wave radar coordinate system, and a relationship between the millimeter wave radar coordinate system and the laser radar coordinate system, respectively.
In step S3, the 6-degree-of-freedom conversion relationship from the millimeter wave radar coordinate system to the laser radar coordinate system includes the following parameters:
x-axis translation amount xoffset, Y-axis translation amount yoffset, Z-axis translation amount zoffset, X-axis rotation angle roll, Y-axis rotation angle pitch, Z-axis rotation angle yaw:
the parameters have the following relations:
the X axis and the Y axis respectively represent a front-back axis and a left-right axis which are vertical to each other on a horizontal plane; in connection with fig. 2a-2c, the X-axis corresponds to the OX-axis in fig. 2a, 2c and the Y-axis corresponds to the OY-axis in fig. 2a, 2 c;
the Z axis represents the upper and lower axes perpendicular to the horizontal plane; in connection with fig. 2a-2c, the Z-axis corresponds to the OZ-axis in fig. 2a, 2 c;
(lx, ly, lz) is the coordinate of a point in a laser radar coordinate system;
(rx, ry, rz) is the coordinate of a point in the millimeter wave radar coordinate system;
r is a rotation matrix, and R is a rotation matrix,
θ and φ represent the Z-axis rotation angle yaw, the Y-axis rotation angle pitch, and the X-axis rotation angle roll, respectively;
t is a translation matrix;
and converting the coordinates (rx, ry and rz) of the point under the millimeter wave radar coordinate system into the coordinates (lx, ly and lz) of the point under the laser radar coordinate system in a mode of rotating first and then translating.
And the Z-axis translation amount zoffset is obtained by calculation according to the installation heights of the millimeter wave radar and the laser radar. Because the millimeter wave radar has no resolution capability on the height, the millimeter wave radar has higher requirements on the Z-axis translation amount zoffset, the X-axis rotation angle roll and the Y-axis rotation angle pitch during actual installation, the height of the millimeter wave radar is generally required to be not less than 400mm and not more than 800mm during installation, the angle error is not more than 1 degree, and the Y-axis rotation angle pitch approaches to 0 degree (certain angle error exists, and the requirement is not more than 1 degree). Therefore, after the millimeter wave radar and the laser radar are mounted on the own vehicle, the Z-axis translation amount zoffset and the Y-axis rotation angle pitch of the millimeter wave radar coordinate system with respect to the laser radar coordinate system are known. Therefore, after the X-axis translation amount xoffset, the Y-axis translation amount yoffset, the X-axis rotation angle roll and the Z-axis rotation angle yaw of the millimeter wave radar coordinate system relative to the laser radar coordinate system are calibrated based on the laser radar coordinate system, the calibration of the millimeter wave radar coordinate system to the vehicle coordinate system can be realized, and the calibration and calibration of the millimeter wave radar coordinate system relative to the vehicle coordinate system are realized.
As an alternative embodiment, the Z-axis rotation angle yaw may be calculated by the following steps:
step 1: performing linear fitting on the positions of the key points based on the millimeter wave radar on a horizontal plane, and calculating the slope ra of the fitted linear;
step 2: performing straight line fitting on the positions of the key points based on the laser radar on a horizontal plane, and calculating the slope la of the fitted straight line;
and step 3: the Z-axis rotation angle yaw is calculated according to the following formula:
yaw=arctan(la)-arctan(ra)。
as shown in fig. 3, the height of 5 markers 200 arranged in the field is rh, and the positions of the markers 1# to 5# detected by the millimeter wave radar are unique, r1(x1_ r, y1_ r, rh), r2(x2_ r, y2_ r, rh), r3(x3_ r, y3_ rr, rh), r4(x4_ r, y4_ rr, rh), r5(x5_ r, y5_ rr, rh). The method comprises the steps that the laser radar detects that each marker 200 is composed of a plurality of points, two corresponding markers are found by determining key points and clustering, the key point position of each marker is calculated and is used for corresponding to the positions of 5 markers detected by the millimeter wave radar, the positions of the 5 markers are assumed to be l1(x1_ l, y1_ lr, rh), l2(x2_ l, y2_ lr, rh), l3(x3_ l, y3_ l, rh), l4(x4_ l, y4_ l, rh), l5(x5_ l, y5_ l, rh) after the laser radar is detected and clustered, straight line fitting is carried out on data of the 5 points detected by the millimeter wave radar and the laser radar on a X, Y plane, and slope ra corresponding to millimeter wave radar data and slope la corresponding to the laser radar are obtained.
In the embodiment of the invention, after the slope ra corresponding to millimeter wave radar data and the slope la corresponding to laser radar data are obtained by fitting a straight line by using a plurality of markers, the Z-axis rotation angle yaw is calculated by using the formula, so that the error of the Z-axis rotation angle yaw is reduced.
In the embodiment of the present invention, the method for fitting the straight line of the data detected by the millimeter wave radar and the laser radar on the X, Y plane may use a RANSAC method to perform the straight line fitting, or may use any available fitting method, such as a least square fitting method.
As an alternative embodiment, the embodiment of the present invention may calculate the X-axis rotation angle roll according to the following formula:
i and j represent any two markers, respectively;
xi _ l represents an X-axis coordinate value of a key point position of the marker i obtained based on the laser radar;
xj _ l represents an X-axis coordinate value of a key point position of the marker j obtained based on the laser radar;
xi _ r represents an X-axis coordinate value of the key point position of the marker i obtained based on the millimeter wave radar;
xj _ r represents an X-axis coordinate value of a key point position of the marker j obtained based on the millimeter wave radar;
yj _ r represents a Y-axis coordinate value of the key point position of the marker j obtained based on the millimeter wave radar;
yi _ r represents a Y-axis coordinate value of the key point position of the marker i obtained based on the millimeter wave radar;
n is the number of markers;
is the permutation and combination of any two markers.
As an alternative embodiment, the embodiment of the present invention may calculate the X-axis translation amount xoffset and the Y-axis translation amount yoffset according to the following formulas:
xoffseti=xi_l-cos(roll)*xi_r+sin(roll)cos(yaw)*yi_r-sin(roll)sin(yaw)*rh
yoffseti=yi_l-sin(roll)*xi_r-cos(roll)cos(yaw)*yi_r+cos(roll)sin(yaw)*rh;
rh represents the height of the marker;
yi _ l represents a Y-axis coordinate value of the key point position of the marker i obtained based on the laser radar.
In the embodiment of the invention, the errors of the X-axis rotation angle roll, the X-axis translation amount xoffset and the Y-axis translation amount yoffset are reduced by taking a calculation mode of averaging a plurality of groups of values instead of taking a single result as a final result, and meanwhile, the accuracy of a calibration result is improved by fully utilizing known conditions, such as the height rh of a marker.
It should be noted that the manner of calculating the X-axis rotation angle roll, the X-axis translation amount xoffset, and the Y-axis translation amount yoffset according to the embodiment of the present invention is not limited to the manner of averaging, and may be implemented in other available manners.
Based on the same inventive concept, a second aspect of the embodiments of the present invention provides a target detection method, in which a 6-degree-of-freedom conversion relationship from a millimeter wave radar coordinate system to a vehicle coordinate system, which is obtained by using the millimeter wave radar calibration method provided by the first aspect of the embodiments of the present invention, is used to convert a target position obtained by the millimeter wave radar detection to a target position in the vehicle coordinate system.
Based on the same inventive concept, a third aspect of the embodiments of the present invention further provides an object detection apparatus, including:
the degree-of-freedom conversion module is used for obtaining a 6-degree-of-freedom conversion relation from a millimeter wave radar coordinate system to a vehicle coordinate system by using the millimeter wave radar calibration method provided by the first aspect of the embodiment of the invention;
and the coordinate conversion module is used for converting the target position obtained by the detection of the millimeter wave radar into the target position under the vehicle coordinate system by utilizing the 6-degree-of-freedom conversion relation from the millimeter wave radar coordinate system to the vehicle coordinate system.
In the embodiment of the present invention, since the laser radar coordinate system is calibrated to the vehicle coordinate system in advance by the millimeter wave radar calibration method according to the first aspect of the embodiment of the present invention, after the obtained 6-degree-of-freedom conversion relationship of the millimeter wave radar coordinate system with respect to the laser radar coordinate system, the 6-degree-of-freedom conversion relationship of the millimeter wave radar coordinate system to the vehicle coordinate system is obtained, and thus the position of the target position in the vehicle coordinate system under the millimeter wave transfer coordinate system can be calculated by the 6-degree-of-freedom conversion relationship.
Specifically, as shown in fig. 4, scene construction is performed first, a hollow and flat road surface is selected, then a plurality of markers are placed on the road surface, as shown in fig. 3, and the markers are arranged in a consistent height, then the markers are detected by a laser radar on a self-vehicle and are subjected to cluster analysis, the positions of key points of the markers are calculated according to a clustering result, meanwhile, the positions of the key points of the markers are matched in combination with the positions of the key points of the markers detected by a millimeter wave radar, and after the matching of the key points is completed, 6-degree-of-freedom parameters of the millimeter wave radar, namely, an X-axis translation amount xoffyoffset, a Y-axis translation amount zoffset, an X-axis rotation angle roll, a Y-axis rotation angle pitch and a Z-axis rotation angle yaw, are calculated.
As described in the foregoing first embodiment of the present invention, the millimeter wave radar is installed on the host vehicle, the height of the millimeter wave radar is fixed, the height is known, that is, the Z-axis translation amount zoffset is known, and the Y-axis rotation angle pitch approaches to 0 degree, which are also known, so that after the parameter value of 6 degrees of freedom is obtained, the corresponding transformation matrix R and translation matrix T can be established, so that the transformation relationship between the coordinates of the point under the laser radar coordinate and the coordinates of the point under the millimeter wave radar coordinate system is established, and thus the 6 degrees of freedom transformation relationship between the millimeter wave radar coordinate system and the laser radar coordinate system can be obtained, and since the laser radar coordinate system is calibrated to the vehicle coordinate system in advance, the calibration of the millimeter wave radar coordinate system to the vehicle coordinate system can be realized; after the millimeter wave radar is calibrated, when the target is detected, the position of the target is detected by the millimeter wave radar, and then the lower target position in the vehicle coordinate system can be obtained by utilizing the 6-degree-of-freedom conversion relation from the millimeter wave radar coordinate system to the vehicle coordinate system, so that the target detection is realized.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.