Port laser radar calibration method and device, storage medium and electronic equipment
By acquiring laser point clouds during the operation of unmanned trucks, and calculating the rotation and translation matrix using ground normal vectors and guardrail angles to correct the position of the laser point clouds, the problem of unmanned truck lidar calibration relying on calibration tools is solved, achieving convenient and accurate lidar calibration and real-time correction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 申海丽
- Filing Date
- 2022-10-24
- Publication Date
- 2026-06-02
AI Technical Summary
Existing methods for calibrating lidar on unmanned container trucks in ports rely on calibration tools, which have high environmental requirements, high maintenance costs, and potential risks due to loose lidar positions, resulting in poor calibration results.
By acquiring laser point clouds during the unmanned truck's operation, and using ground normal vectors, guardrail angles, and prior route positioning data to calculate angle differences, a rotation and translation matrix is obtained to correct the laser point cloud position, achieving accurate calibration without calibration tools.
It enables convenient lidar calibration, can correct position deviations in real time, meets operational accuracy requirements, reduces manual intervention, and improves calibration accuracy and safety.
Smart Images

Figure CN115902839B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of lidar technology, and in particular to a port lidar calibration method and apparatus, storage medium and electronic equipment. Background Technology
[0002] With the development of economy and technology, modern ports are gradually becoming more automated and intelligent, and driverless container trucks are an important part of modern ports. LiDAR is one of the main sensors for driverless container trucks in ports, playing a crucial role in the process of autonomous driving.
[0003] Currently, unmanned container trucks face numerous challenges in practical applications. Due to varying port environments, issues such as limited yard space and low laser point cloud resolution hinder the effectiveness of existing calibration algorithms. Furthermore, current laser radar calibration relies on specialized calibration tools, which are highly demanding in terms of environmental requirements and maintenance costs. Additionally, the loosening of the laser radar's position during unmanned container truck operation poses potential risks.
[0004] Therefore, there is an urgent need for an accurate and reliable lidar calibration method that does not rely on calibration tools.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] The purpose of this disclosure is to provide a port lidar calibration method and apparatus, storage medium and electronic equipment, which at least to some extent overcomes the problem of lidar calibration accuracy due to related technologies.
[0007] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0008] According to one aspect of this disclosure, a port lidar calibration method is provided, comprising:
[0009] During the process of the unmanned truck group traveling along the preset route, the laser point cloud obtained by the lidar of the unmanned truck group is acquired, wherein the preset route is a route parallel to the guardrail;
[0010] The ground normal vector is obtained based on the initial installation position of the lidar;
[0011] The guardrail angle is obtained based on the location of the unmanned truck.
[0012] The preset route guardrail angle is obtained based on the prior positioning data of the unmanned truck route;
[0013] The angle difference is obtained based on the guardrail angle and the preset route guardrail angle;
[0014] The current laser angle is obtained based on the initial laser angle and the angle difference;
[0015] The rotation matrix and translation matrix are obtained based on the current laser angle and the ground normal vector;
[0016] The correction formula is obtained based on the rotation matrix and the translation matrix;
[0017] The position of the laser point cloud of the lidar is corrected using the aforementioned correction formula.
[0018] In one embodiment of this disclosure, prior to the step of obtaining the ground normal vector based on the initial installation position of the lidar, the method includes:
[0019] The laser point cloud is preprocessed using statistical filtering to obtain the preprocessed laser point cloud.
[0020] In one embodiment of this disclosure, obtaining the ground normal vector based on the initial installation position of the lidar includes:
[0021] Based on the initial installation position of the lidar, select a laser point cloud below a preset height from the preprocessed laser point cloud;
[0022] The random sampling consensus (RANSAC) algorithm is used to perform plane fitting on the laser point cloud below the preset height to obtain the plane fitting result.
[0023] The ground normal vector is obtained based on the plane fitting result.
[0024] In one embodiment of this disclosure, obtaining the guardrail angle based on the location of the unmanned truck includes:
[0025] Two points are randomly selected from the preprocessed laser point cloud as random points;
[0026] Determine the first distance between the rear axle center of the unmanned card set and the random point cloud;
[0027] Select a specific point from the random points whose distance satisfies the first preset threshold;
[0028] Determine a specific straight line based on the specific point;
[0029] Select line points in the preprocessed laser point cloud whose distances to the specific line satisfy a second preset threshold.
[0030] Select specific line points from the line points whose number of line points meets a third preset threshold.
[0031] The guardrail straight line parameters are obtained by least squares fitting of the specific straight line points, wherein the straight line distance of the straight line parameters is greater than a fourth preset threshold.
[0032] The guardrail angle is determined based on the guardrail straight line parameters and the position of the unmanned card set.
[0033] In one embodiment of this disclosure, obtaining the preset route guardrail angle based on the prior positioning data of the unmanned truck includes:
[0034] Record the prior positioning data of the unmanned vehicle set as it travels along the preset route;
[0035] The route prior positioning data in the UTM coordinate system is converted to the unmanned truck coordinate system to obtain the route prior positioning data in the unmanned truck coordinate system.
[0036] Outlier filtering is performed on the positioning coordinates in the positioning data under the unmanned card set coordinate system to obtain the filtered positioning coordinates.
[0037] The filtered positioning coordinates are fitted using the least squares method to obtain the preset guardrail straight line parameters;
[0038] The angle of the preset route guardrail is determined based on the location of the unmanned card set and the preset guardrail straight line parameters.
[0039] In one embodiment of this disclosure, obtaining the angle difference based on the guardrail angle and the preset route guardrail angle includes:
[0040] The initial angle difference is obtained by subtracting the guardrail angle from the preset route guardrail angle.
[0041] The initial angle difference is calculated by moving average over a preset number of frames to obtain the angle difference.
[0042] In one embodiment of this disclosure, the correction formula is:
[0043]
[0044] Wherein, (x, y, z) are the input laser point cloud position coordinates, out is the corrected output laser point cloud position coordinates, rotation is the rotation matrix, and translation is the translation matrix.
[0045] According to another aspect of this disclosure, a port lidar positioning system is provided, comprising:
[0046] The point cloud acquisition module is used to acquire laser point clouds obtained by the lidar of the unmanned truck group when the unmanned truck group travels along a preset route, wherein the preset route is a route parallel to the guardrail.
[0047] A vector acquisition module is used to acquire the ground normal vector based on the initial installation position of the lidar;
[0048] The guardrail angle acquisition module is used to acquire the guardrail angle based on the position of the unmanned truck.
[0049] The preset guardrail angle acquisition module is used to acquire the preset route guardrail angle based on the prior calibration data of the unmanned truck.
[0050] An angle difference acquisition module is used to obtain the angle difference based on the guardrail angle and the preset route guardrail angle;
[0051] The laser angle acquisition module is used to obtain the current laser angle based on the initial laser angle and the angle difference.
[0052] The matrix acquisition module is used to obtain the rotation matrix and translation matrix based on the current laser angle and the ground normal vector;
[0053] The formula acquisition module is used to obtain the modified formula based on the rotation matrix and translation matrix;
[0054] The position correction module is used to correct the position of the laser point cloud of the lidar using the correction formula.
[0055] According to another aspect of this disclosure, an electronic device is provided, comprising:
[0056] Processor; and
[0057] Memory for storing the executable instructions of the processor;
[0058] The processor is configured to execute any of the above-described port lidar calibration methods by executing the executable instructions.
[0059] According to another aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the port lidar calibration method described in any of the preceding claims.
[0060] An embodiment of this disclosure provides a port lidar calibration method, comprising: acquiring a laser point cloud obtained by the lidar of the unmanned truck group while it travels along a preset route, wherein the preset route is a route parallel to a guardrail; acquiring a ground normal vector based on the initial installation position of the lidar; acquiring a guardrail angle based on the position of the unmanned truck; acquiring the guardrail angle of the preset route based on the prior positioning data of the unmanned truck; obtaining an angle difference based on the guardrail angle and the guardrail angle of the preset route; obtaining a current laser angle based on the initial laser angle and the angle difference; obtaining a rotation matrix and a translation matrix based on the current laser angle and the ground normal vector; obtaining a correction formula based on the rotation matrix and the translation matrix; and correcting the position of the laser point cloud of the lidar using the correction formula. The calibration of lidar on unmanned container trucks in ports can be achieved without relying on calibration tools, making the laser calibration convenient. Furthermore, it can issue early warnings and correct deviations when the lidar position of the unmanned container truck deviates, eliminating the need for manual periodic inspection of the lidar calibration parameters. It can perform online calibration in real time, continuously correcting deviations during operation and constantly refining inaccurate laser point clouds to meet operational accuracy requirements, thereby achieving precise lidar calibration.
[0061] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0062] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0063] Figure 1 This invention discloses a flowchart of a port lidar calibration method according to an embodiment;
[0064] Figure 2 This diagram illustrates a port scene layout according to one embodiment of the present disclosure;
[0065] Figure 3 This diagram illustrates a block diagram of a port lidar calibration method according to an embodiment of the present disclosure.
[0066] Figure 4 This diagram illustrates a point cloud representation of a lidar system according to one embodiment of the present disclosure.
[0067] Figure 5 This diagram illustrates a port lidar calibration method according to another embodiment of the present disclosure.
[0068] Figure 6 This diagram illustrates a port lidar calibration method according to yet another embodiment of the present disclosure.
[0069] Figure 7 This diagram illustrates a port lidar positioning device according to one embodiment of the present disclosure; and
[0070] Figure 8 This diagram illustrates a block diagram of an electronic device according to one embodiment of the present disclosure. Detailed Implementation
[0071] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0072] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0073] In one embodiment of this disclosure, a port lidar calibration method is provided, comprising:
[0074] S101, during the process of the unmanned truck group traveling along the preset route, acquire the laser point cloud obtained by the lidar of the unmanned truck group, wherein the preset route is a route parallel to the guardrail;
[0075] The preset route is a pre-designed path for unmanned trucks based on the port's site layout. This path strictly ensures that when the unmanned trucks are in autonomous or manual mode, they can travel parallel to the barriers and that there are no other unmanned trucks or obstacles obstructing their path in front of or in adjacent lanes. Specific port site layout methods, such as... Figure 2 The diagram shows a port scene layout. The unmanned truck 220 travels along the guardrail 210 from the starting point to the ending point of the guardrail 210. Next to the guardrail is a parallel lane, and the unmanned truck travels along the middle of the lane.
[0076] LiDAR can detect the location of a target and obtain the intensity of its reflection; some can also monitor movement speed. A laser beam can accurately measure the relative distance between the edge of an object's contour and the device within the field of view. This contour information forms a point cloud and creates a 3D environmental map with centimeter-level accuracy, thus improving measurement precision.
[0077] Specifically, as the unmanned truck travels along a preset route, the laser beam from the lidar measures surrounding objects to obtain a laser point cloud. Furthermore, the lidar on the unmanned truck in the above steps needs to be placed horizontally.
[0078] S102, Obtain the ground normal vector based on the initial installation position of the lidar;
[0079] Specifically, in the above steps, the initial installation position of the lidar is known. The lidar is placed horizontally on the unmanned vehicle set, and the z-axis direction of the lidar is consistent with the z-axis of the unmanned vehicle set coordinate system.
[0080] Specifically, to reduce the computational complexity and solution complexity caused by excessive laser point clouds, a certain height of the laser point cloud is initially retained. For example, taking a lidar installed in the center of an unmanned truck for viewing the frontal field of view as an example, assuming the installation height (lidar) is 0.5m, the laser point cloud below 0m is initially retained. The RANSAC (random sample consensus) algorithm is used for plane fitting to obtain the ground normal vector.
[0081] S103, Obtain the guardrail angle based on the position of the unmanned truck;
[0082] Specifically, the RANSAC algorithm is first used to obtain the straight line parameters of the guardrail. Two points are randomly selected to determine a straight line. Then, the distance between the rear axle center of the unmanned truck and the selected points is used as a constraint to determine the straight line whose distance value meets the condition. The point cloud on the line is then filtered and fitted to obtain the straight line parameters of the guardrail. Then, the guardrail angle formed by the guardrail and the unmanned truck can be determined based on the obtained straight line parameters.
[0083] S104, Obtain the preset route guardrail angle based on the route prior positioning data of the unmanned truck;
[0084] Specifically, prior route positioning data for the unmanned truck can be collected beforehand. This involves the unmanned truck driving along the center of the lane, from the starting point to the ending point of the guardrail, repeating this process several times and recording the positioning data for the entire route. This prior route positioning data is in the UTM (Universal Transverse Mercartor Grid System) coordinate system. During the unmanned truck calibration process, while driving along the route, according to the rules of the UTM coordinate system to the vehicle coordinate system, the value of the prior route positioning data at any given moment in the unmanned truck's coordinate system can be obtained; this is the aforementioned prior route positioning data. Similarly, after obtaining the prior route positioning data, outlier filtering of the positioning coordinate points is performed to determine the filtered positioning coordinate points corresponding to the prior route positioning data. The corresponding straight line parameter is then fitted to the filtered positioning coordinate points around this straight line parameter. The angle formed by the straight line parameter and the unmanned truck is calculated, which is the preset guardrail angle.
[0085] S105, obtain the angle difference based on the guardrail angle and the preset route guardrail angle;
[0086] Specifically, based on the obtained guardrail straight-line parameters, the guardrail angle formed by the guardrail and the unmanned truck is determined: angle 'a'. Furthermore, the preset route guardrail angle, corresponding to the prior route positioning data, is determined: angle 'b'. The preset route guardrail angle is calculated based on the prior route data, while the actual guardrail angle is the angle obtained from the current laser detection. The initial angle difference, 'ab', is obtained by subtracting the preset route guardrail angle from the route angle. Then, a moving average is applied to this initial angle difference to obtain the final angle difference.
[0087] S106, Obtain the current laser angle based on the initial laser angle and the angle difference;
[0088] Specifically, taking a lidar installed directly in front of an unmanned truck as an example, if the initial angle is set to 0, then adding the obtained angle difference gives the final laser angle θ. The above steps correct the installation angle of the lidar and the laser angle.
[0089] S107, Obtain the rotation matrix and translation matrix based on the current laser angle and the ground normal vector;
[0090] Specifically, the rotation matrix is first solved based on the ground normal vector and the laser angle. For example, the ground normal vectors are (vec_x, vec_y, vec_z), and the laser installation angle is θ.
[0091]
[0092] Formula (1) above uses the cosine of the ground normal vector and the z-axis, and then sinA can be solved using cosA. A is the rotation angle, and the z-axis is the rotation axis.
[0093]
[0094] w represents an antisymmetric matrix.
[0095] R=I+w*sin A+w*w*(1-cos A) (3)
[0096] I represents the identity matrix, and R represents the rotation matrix corresponding to the ground normal vector.
[0097]
[0098] Matrix represents the matrix corresponding to the laser angle θ.
[0099] rotation = matrix * R (5)
[0101] Rotation represents the final rotation matrix.
[0102] The installation positions (posx, posy, posz) of the laser object structure of the lidar can be used to obtain the translation matrix.
[0103] S108, Obtain the correction formula based on the rotation matrix and translation matrix;
[0104] Specifically, the corrected formula is as follows:
[0105]
[0106] The input laser point cloud position coordinates are (x, y, z), and out is the output point cloud data.
[0107] S109, the position of the laser point cloud of the lidar is corrected by the correction formula.
[0108] Specifically, when the laser point cloud positions x, y, and z are obtained, the laser point cloud data output of the calibrated unmanned truck rear axle center position can be obtained through the above-mentioned correction formula in this embodiment.
[0109] In the above embodiments of this disclosure, when the unmanned truck group travels along a preset route, the laser point cloud obtained by the lidar of the unmanned truck group is acquired, wherein the preset route is a route parallel to the guardrail; the ground normal vector is obtained according to the initial installation position of the lidar; the guardrail angle is obtained according to the position of the unmanned truck; the guardrail angle of the preset route is obtained according to the prior positioning data of the unmanned truck; the angle difference is obtained according to the guardrail angle and the guardrail angle of the preset route; the current laser angle is obtained according to the initial laser angle and the angle difference; the rotation matrix and translation matrix are obtained according to the current laser angle and the ground normal vector; a correction formula is obtained according to the rotation matrix and translation matrix; and the position of the lidar point cloud is corrected by the correction formula. Lidar calibration of unmanned trucks in ports can be achieved without relying on calibration tools, making laser calibration convenient; and it enables the unmanned truck in the port to issue an early warning and receive correction when the lidar position deviates, eliminating the need for manual periodic inspection of the radar calibration parameters; it allows for real-time online calibration, continuously correcting deviations during operation and continuously correcting inaccurate laser point clouds to meet operational accuracy requirements, thereby achieving accurate lidar calibration.
[0110] In this embodiment of the disclosure, prior to the step of obtaining the ground normal vector based on the initial installation position of the lidar, the method includes:
[0111] The laser point cloud is preprocessed using statistical filtering to obtain the preprocessed laser point cloud.
[0112] Specifically, laser point cloud preprocessing is performed to avoid the influence of laser radar ghost images and related noise. Statistical filtering is used for point cloud preprocessing, and the preprocessing is performed based on the distribution of distances between laser point clouds.
[0113] The following details the preprocessing of laser point clouds: For each point cloud, calculate its distance to neighboring points. A threshold of 40m can be set, but the specific threshold can be adjusted based on the characteristics of the laser equipment. A larger threshold can be set if the laser points are densely packed, and a smaller threshold if the laser points are sparse. Calculate the average distance from the selected point to its neighboring points. Calculate the Gaussian distribution mean of this average distance for all points. Points with a difference greater than 0.5m from this Gaussian distribution mean are considered outliers. This threshold can also be adjusted based on the laser characteristics. Preprocessing the laser point cloud initially reduces the complexity of point cloud computing. Subsequent steps are performed based on the preprocessed laser point cloud.
[0114] In this embodiment of the disclosure, obtaining the ground normal vector based on the initial installation position of the lidar includes:
[0115] Based on the initial installation position of the lidar, select a laser point cloud below a preset height from the preprocessed laser point cloud;
[0116] The random sampling consensus (RANSAC) algorithm is used to perform plane fitting on the laser point cloud below the preset height to obtain the plane fitting result.
[0117] The ground normal vector is obtained based on the plane fitting result.
[0118] Specifically, such as Figure 3 The diagram shows a judgment block diagram for a port lidar calibration method. The calculation method in this embodiment is as follows: First, step S301 is executed to randomly select a lidar point cloud, optionally selecting 3 points. It is known that 3 points can yield a plane normal vector. Then, step S302 is executed to calculate whether the angle between the normal vector and the z-axis is less than 5 degrees. If the angle is greater than 5 degrees, step S301 is executed again to randomly select 3 points.
[0119] If the above conditions are met, step S303 is executed to calculate the distance from other points to the plane to obtain the plane points. Then, the plane points are filtered, and step S304 is executed to determine whether the number of plane points is greater than 1000 and the height of the plane centroid is less than 0.2. The optional threshold is 0.2m. If the distance from a point to the plane is less than 0.2m, it is considered a point on the plane, and the number of point clouds that meet the conditions is recorded. Planes with fewer than 1000 points that meet the conditions are removed, that is, 3 points are randomly selected again for calculation. The centroid height of the points on the planes that meet the conditions is calculated. If the centroid height is greater than -0.2m, it is discarded. The plane that meets the conditions and has the largest number of point clouds on it is the desired one.
[0120] After determining the number of point clouds on the plane, set the maximum number of iterations. For example, if the maximum number of iterations is set to 1000, execute step S305. If the number of iterations is less than 1000, otherwise execute step S301 again. If it is, then the normal vector parameters (vec_x, vec_y, vec_z) of the plane are finally obtained.
[0121] like Figure 4 The diagram shown is a schematic of a lidar point cloud. Figure 5 The diagram shows a schematic flowchart of a port lidar calibration method. In this embodiment, obtaining the guardrail angle based on the position of the unmanned truck includes:
[0122] S501, randomly select two points from the preprocessed laser point cloud as random points;
[0123] S502, determine the first distance between the rear axle center of the unmanned card set and the random point cloud;
[0124] S503, select a specific point from the random points whose first distance satisfies a first preset threshold;
[0125] S504, Determine a specific straight line based on the specific point;
[0126] S505, in the preprocessed laser point cloud, select line points whose distances to the specific line satisfy the second preset threshold.
[0127] S506, Select specific straight lines among the straight lines whose number of straight lines meets a third preset threshold;
[0128] S507, the guardrail straight line parameters are obtained by least squares fitting of the specific straight line points, wherein the straight line distance of the straight line parameters is greater than a fourth preset threshold.
[0129] S508, determine the guardrail angle based on the guardrail straight line parameters and the position of the unmanned card set.
[0130] Specifically, Figure 4 This is a schematic diagram of the lidar point cloud. 402 represents the fitted guardrail line relative to the unmanned truck's rear axle center (401), and 411 represents the center position of the unmanned truck's rear axle. Two points are randomly selected, and a straight line m is determined from these two points. Based on prior knowledge, the distance k meters from the guardrail to the center of the unmanned truck's rear axle is determined. A threshold is added, such as 2 meters, so the first threshold is k+2. Points are then filtered; if the calculated distance from the guardrail line to the center of the unmanned truck's rear axle exceeds k+2 meters, two more points are randomly selected. The points obtained after this initial filtering are considered specific points. A second threshold of 0.2 meters is set for the straight line distance. Other points whose distance to line m is less than the 0.2-meter threshold are considered points on that line. Furthermore, the number of points can be limited, setting the number of points belonging to the obtained straight line to no more than a certain threshold, such as 300 points. This threshold can be adjusted based on the lidar properties. Additionally, the distance between the starting and ending points of the obtained straight line must exceed a threshold of 25 meters; otherwise, random points are selected again. The final straight line points are fitted using least-squares fitting to obtain the final guardrail straight line parameters. Finally, the guardrail angle is determined based on the guardrail straight line parameters and the position of the unmanned card set.
[0131] like Figure 6 The diagram shows a schematic flowchart of a port lidar calibration method. In this embodiment, obtaining the preset route guardrail angle based on the route prior positioning data of the unmanned truck includes:
[0132] S601, records the prior positioning data of the unmanned vehicle set traveling along the preset route;
[0133] S602, convert the prior positioning data of the route in the UTM coordinate system to the unmanned truck coordinate system to obtain the prior positioning data of the route in the unmanned truck coordinate system;
[0134] S603, filter out the outliers in the prior positioning data of the route in the unmanned card set coordinate system to obtain the filtered positioning coordinates.
[0135] S604, perform least squares fitting on the filtered positioning coordinates to obtain preset guardrail straight line parameters;
[0136] S605, determine the angle of the preset route guardrail based on the position of the unmanned card set and the preset guardrail straight line parameters.
[0137] Specifically, the positioning data is data in the UTM coordinate system. During the calibration process of unmanned trucks, when traveling along the route, according to the rule of transforming the UTM coordinate system to the vehicle coordinate system, the value of the route positioning data in the vehicle coordinate system at any given time can be obtained, which is the route prior positioning data.
[0138] For example, suppose [x] v ,y v ,θ v [x] represents the current global pose of the unmanned truck. s ,y s ,θ s [x] represents the global pose of the sensor. r ,y r ,θ r [x] represents the sensor's pose relative to the vehicle body. Therefore, the prior positioning data for the route [x] is... s y s The value in the vehicle body coordinate system is:
[0139]
[0140] θ r =θ3-θ v (8)
[0142] To avoid the impact of outliers, after filtering outliers using DBSCAN (Density-Based Spatial Clustering of Applications with Noise), the preset guardrail straight line parameters are fitted using the least squares method. Because of the parallel relationship between the guardrail and the route, the preset route guardrail angle can be determined based on the location of the unmanned card set and the preset guardrail straight line parameters.
[0143] In this embodiment of the disclosure, obtaining the angle difference based on the guardrail angle and the preset route guardrail angle includes:
[0144] The initial angle difference is obtained by subtracting the guardrail angle from the preset route guardrail angle.
[0145] The initial angle difference is calculated by moving average over a preset number of frames to obtain the angle difference.
[0146] Specifically, the initial angle difference is obtained by subtracting the guardrail angle obtained from the current laser detection from the preset route angle obtained through prior route positioning data. Then, a moving average is calculated on this initial angle difference; the number of moving averages can be adjusted appropriately according to the guardrail length, generally not less than 200 frames, to obtain the final angle difference. This allows the final laser angle θ to be obtained. When the laser radar position deviates, a timely warning can be issued.
[0147] In one embodiment of this disclosure, the correction formula is:
[0148]
[0149] Wherein, (x, y, z) are the input laser point cloud position coordinates, out is the corrected output laser point cloud position coordinates, rotation is the rotation matrix, and translation is the translation matrix.
[0150] The above embodiments can perform online calibration in real time, and can continuously correct deviations while operating, thus meeting the accuracy requirements of the operation.
[0151] like Figure 7 The image shows a port lidar calibration device. In another embodiment of this disclosure, a port lidar calibration device 700 is provided, comprising:
[0152] The point cloud acquisition module 701 is used to acquire laser point clouds obtained by the lidar of the unmanned truck group when the unmanned truck group travels along a preset route, wherein the preset route is a route parallel to the guardrail.
[0153] Vector acquisition module 702 is used to acquire the ground normal vector according to the initial installation position of the lidar;
[0154] The guardrail angle acquisition module 703 is used to acquire the guardrail angle based on the position of the unmanned truck.
[0155] The preset guardrail angle acquisition module 704 is used to acquire the preset route guardrail angle based on the prior calibration data of the unmanned truck.
[0156] Angle difference acquisition module 705 is used to obtain the angle difference based on the guardrail angle and the preset route guardrail angle;
[0157] The laser angle acquisition module 706 is used to obtain the current laser angle based on the initial laser angle and the angle difference.
[0158] The matrix acquisition module 707 is used to obtain a rotation matrix and a translation matrix based on the current laser angle and the ground normal vector.
[0159] Formula acquisition module 708 is used to obtain a modified formula based on the rotation matrix and translation matrix;
[0160] The position correction module 709 is used to correct the position of the laser point cloud of the lidar using the correction formula.
[0161] This embodiment provides a port lidar calibration device that can calibrate lidar on unmanned container trucks in ports without relying on calibration tools, making lidar calibration convenient. Furthermore, it enables the unmanned container truck to issue an early warning and receive correction when the lidar position deviates, eliminating the need for manual periodic inspection of the lidar calibration parameters. It can perform real-time online calibration, continuously correcting deviations during operation and constantly refining inaccurate lidar point clouds to meet operational accuracy requirements, thereby achieving precise lidar calibration.
[0162] In another embodiment of this disclosure, an electronic device is provided, comprising:
[0163] Processor; and
[0164] Memory for storing the executable instructions of the processor;
[0165] The processor is configured to execute any of the above-described port lidar calibration methods by executing the executable instructions.
[0166] The electronic device provided in this embodiment implements the port lidar calibration method through a processor. Further details will not be elaborated here.
[0167] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuits,” “modules,” or “systems.”
[0168] The following reference Figure 8 To describe an electronic device 800 according to this embodiment of the present invention. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0169] like Figure 8As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 810, at least one storage unit 820, and a bus 830 connecting different system components (including storage unit 820 and processing unit 810).
[0170] The storage unit stores program code that can be executed by the processing unit 810, causing the processing unit 810 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention.
[0171] Storage unit 820 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 8201 and / or cache memory 8202, and may further include a read-only memory (ROM) 8203.
[0172] The storage unit 820 may also include a program / utility 8204 having a set (at least one) of program modules 8205, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0173] Bus 830 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0174] Electronic device 800 can also communicate with one or more external devices 900 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 800, and / or with any device that enables electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 850. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 860. As shown, network adapter 860 communicates with other modules of electronic device 800 via bus 830. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0175] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0176] In another embodiment of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the port lidar calibration method described in any of the preceding claims.
[0177] The computer-readable storage medium provided in this embodiment enables a computer program to be executed by a processor to implement the aforementioned port lidar calibration method. Further details will not be elaborated upon here.
[0178] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the invention described in the "Exemplary Methods" section of this specification.
[0179] A program product for implementing the above-described method according to embodiments of the present invention is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0180] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0181] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.
[0182] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0183] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0184] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0185] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0186] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this disclosure.
[0187] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the appended claims.
Claims
1. A method for calibrating a port lidar, characterized in that, include: During the process of the unmanned truck group traveling along the preset route, the laser point cloud obtained by the lidar of the unmanned truck group is acquired, wherein the preset route is a route parallel to the guardrail; The ground normal vector is obtained based on the initial installation position of the lidar; The guardrail angle is obtained based on the location of the unmanned card set; The preset route guardrail angle is obtained based on the route prior positioning data of the unmanned card set; The angle difference is obtained based on the guardrail angle and the preset route guardrail angle; The current laser angle is obtained based on the initial laser angle and the angle difference. The rotation matrix and translation matrix are obtained based on the current laser angle and the ground normal vector; The correction formula is obtained based on the rotation matrix and the translation matrix; The position of the laser point cloud of the lidar is corrected using the aforementioned correction formula; The step of obtaining the ground normal vector based on the initial installation position of the lidar includes: Based on the initial installation position of the lidar, select a laser point cloud below a preset height from the preprocessed laser point cloud; The random sampling consensus (RANSAC) algorithm is used to perform plane fitting on the laser point cloud below the preset height to obtain the plane fitting result. The ground normal vector is obtained based on the plane fitting result; The step of obtaining the guardrail angle based on the position of the unmanned card set includes: Two points are randomly selected from the preprocessed laser point cloud as random points; Determine the first distance between the rear axle center of the unmanned card set and the random point cloud; Select a specific point from the random points whose first distance satisfies a first preset threshold. Determine a specific straight line based on the specific point; Select line points in the preprocessed laser point cloud whose distances to the specific line satisfy a second preset threshold. Select specific line points from the line points whose number of line points meets a third preset threshold. The guardrail straight line parameters are obtained by least squares fitting of the specific straight line points, wherein the straight line distance of the straight line parameters is greater than a fourth preset threshold. The guardrail angle is determined based on the guardrail straight line parameters and the position of the unmanned card set; The step of obtaining the preset route guardrail angle based on the route prior positioning data of the unmanned card set includes: Record the prior positioning data of the unmanned vehicle set as it travels along the preset route; The route prior positioning data in the UTM coordinate system is transformed to the unmanned card set coordinate system to obtain the route prior positioning data in the unmanned card set coordinate system. Outlier points are filtered out of the route prior positioning data in the unmanned card set coordinate system to obtain the filtered positioning coordinate points. The filtered positioning coordinates are fitted using the least squares method to obtain the preset guardrail straight line parameters; The angle of the preset route guardrail is determined based on the location of the unmanned card set and the preset guardrail straight line parameters. The step of obtaining the angle difference based on the guardrail angle and the preset route guardrail angle includes: The initial angle difference is obtained by subtracting the guardrail angle from the preset route guardrail angle; The initial angle difference is calculated by moving average over a preset number of frames to obtain the angle difference.
2. The port lidar calibration method according to claim 1, characterized in that, Before the step of obtaining the ground normal vector based on the initial installation position of the lidar, the following steps are included: The laser point cloud is preprocessed using statistical filtering to obtain the preprocessed laser point cloud.
3. The port lidar calibration method according to claim 1, characterized in that, The correction formula is: , Where (x, y, z) are the input laser point cloud position coordinates, out is the corrected output laser point cloud position coordinates, rotation is the rotation matrix, and translation is the translation matrix.
4. A port lidar calibration device, employing the method described in any one of claims 1-3, characterized in that, include: The point cloud acquisition module is used to acquire laser point clouds obtained by the lidar of the unmanned truck group when the unmanned truck group travels along a preset route, wherein the preset route is a route parallel to the guardrail. A vector acquisition module is used to acquire the ground normal vector based on the initial installation position of the lidar; The guardrail angle acquisition module is used to acquire the guardrail angle based on the position of the unmanned card set; The preset guardrail angle acquisition module is used to acquire the preset route guardrail angle based on the prior calibration data of the unmanned card set; An angle difference acquisition module is used to obtain the angle difference based on the guardrail angle and the preset route guardrail angle; The laser angle acquisition module is used to obtain the current laser angle based on the initial laser angle and the angle difference. The matrix acquisition module is used to obtain the rotation matrix and translation matrix based on the current laser angle and the ground normal vector; The formula acquisition module is used to obtain the modified formula based on the rotation matrix and the translation matrix; The position correction module is used to correct the position of the laser point cloud of the lidar using the correction formula.
5. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the port lidar calibration method according to any one of claims 1 to 3 by executing the executable instructions.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the port lidar calibration method according to any one of claims 1 to 3.