Calibration method and device of two-dimensional laser radar, storage medium and electronic equipment
By setting reflective strips on a two-dimensional lidar and calculating the lidar's extrinsic parameters using the intersection coordinates, the navigation accuracy problem caused by uneven lidar installation was solved, achieving high-precision lidar calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU HIKROBOT TECH CO LTD
- Filing Date
- 2022-12-28
- Publication Date
- 2026-06-19
AI Technical Summary
Existing two-dimensional lidar systems are prone to horizontal misalignment during installation, leading to decreased navigation accuracy, and relying on manual adjustments makes it difficult to guarantee accuracy.
By setting reflective strips on the vertical plane and using the point cloud data reflected by the lidar to scan, the intersection point between the laser scanning plane and the vertical plane is determined. By combining the coordinate relationships of multiple intersection points, the transformation relationship between the laser coordinate system and the world coordinate system is calculated, and then the extrinsic parameters of the lidar are calibrated.
This improves the positioning accuracy of the lidar, reduces reliance on manual adjustments, ensures that the lidar mounting plane is parallel to the vertical plane, and enhances the stability and accuracy of navigation.
Smart Images

Figure CN116125445B_ABST
Abstract
Description
Technical Field
[0001] This application relates to lidar technology, and in particular to a calibration method, apparatus, storage medium, and electronic device for a two-dimensional lidar. Background Technology
[0002] With the rapid development of robot-related technologies in recent years, robots are increasingly being used in logistics, warehousing, and factory production. Currently, robot navigation methods mainly include QR code navigation, guided tracks (guide belts or electromagnetic tracks, etc.), visual SLAM, and laser SLAM. Among these, laser SLAM has gradually become the mainstream navigation method due to its high accuracy and stability. Three-dimensional laser scanning has a wide range and higher stability and reliability. However, three-dimensional lasers require many points and a large amount of data, consuming significant computing and storage resources, and are much more expensive than two-dimensional lasers. Two-dimensional lasers, on the other hand, require fewer points, less computing and storage resources, are cheaper, and can achieve positioning results comparable to three-dimensional lasers in structured indoor environments such as factories. Therefore, most laser radars used in indoor robots are currently two-dimensional laser radars (the term "laser" below refers to two-dimensional laser radars).
[0003] Laser SLAM navigation uses laser scanning to obtain information about a horizontal plane for matching and navigation. If the laser mounting plane is not level, it can easily lead to an angle between the vertical line and the vertical direction of the laser mounting plane. If this angle is too large, the laser beam may hit the ground or ceiling, severely affecting navigation and positioning accuracy, and even causing laser SLAM to fail. To solve this problem, most current practices are: 1. Ensuring the laser plane is level during structural design; 2. During production, manually checking the intersection line between the laser plane and the vertical plane (usually the vertical plane) (this intersection line can be observed using certain equipment) to determine if it is level. If not, it is manually adjusted to be level.
[0004] The above-mentioned solutions have some problems: 1. Inconsistency in incoming materials and installation differences can lead to uneven laser planes; 2. High skill levels are required for workers, which is usually difficult to meet; 3. Visual judgment has a large margin of error, making it difficult to guarantee accuracy. Summary of the Invention
[0005] This application provides a calibration method, apparatus, storage medium, and electronic device for a two-dimensional lidar, which can accurately acquire the external parameters of the lidar installation and improve the lidar positioning accuracy.
[0006] To achieve the above objectives, this application adopts the following technical solution:
[0007] A calibration method for a two-dimensional lidar, wherein the lidar to be calibrated is located on a carrier placed on a horizontal platform, and reflective strips are provided on a vertical plane. The pattern of the reflective strips ensures that when the lidar scans towards the vertical plane, multiple first intersection points between the lidar scanning plane and the reflective strips can uniquely determine the intersection line between the scanning plane and the vertical plane. The calibration method includes:
[0008] a. Extract the point cloud data of the laser beam reflected back by the reflective strip after the lidar scans in the direction of the vertical plane, as well as the point cloud data of the intermediate laser beam that is reflected back.
[0009] b. Based on the extracted point cloud data, determine the coordinates of the plurality of first intersection points in the laser coordinate system and the coordinates of the second intersection point between the intermediate laser beam and the vertical plane in the laser coordinate system; wherein, the z-axis of the laser coordinate system is perpendicular to the laser radar scanning plane;
[0010] c. Based on the coordinates of the plurality of first intersection points in the laser coordinate system, the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the second intersection point in the laser coordinate system, the laser installation height, the height of the horizontal platform surface, and the distance between the plurality of first intersection points and the laser center, determine the first transformation relationship between the laser coordinate system and the world coordinate system; wherein, the y-axis and z-axis of the world coordinate system are on the vertical plane;
[0011] d. Based on the relationship between the carrier coordinate system and the platform coordinate system, and the relationship between the platform coordinate system and the world coordinate system, determine the second transformation relationship between the carrier coordinate system and the world coordinate system;
[0012] e. Based on the first transformation relationship and the second transformation relationship, determine the pose of the laser coordinate system in the carrier coordinate system, which is used as an external parameter for calibrating the lidar.
[0013] Preferably, determining the first transformation relationship between the laser coordinate system and the world coordinate system includes:
[0014] Based on the coordinates of the plurality of first intersection points in the laser coordinate system and the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the plurality of first intersection points in the world coordinate system are determined;
[0015] Based on the coordinates of the plurality of first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, the distance between the plurality of first intersection points and the laser center, and the coordinates of the second intersection point and the plurality of first intersection points in the laser coordinate system, a first transformation relationship between the laser coordinate system and the world coordinate system is determined.
[0016] Preferably, the reflective strip pattern is: an "N" shape composed of three line segments, wherein the middle line segment of the three line segments forms an angle of 90 degrees with the other two line segments, or a partial pattern of the first pattern; the first intersection point has three points.
[0017] Preferably, determining the coordinates of the plurality of first intersection points in the world coordinate system includes:
[0018] Calculate the length of the line segment between the three first intersection points based on the coordinates of the three first intersection points in the laser coordinate system;
[0019] The coordinates of the three first intersection points in the world coordinate system are used as variables to represent the relative positional relationship between the three first intersection points and the reflective strip pattern;
[0020] Based on the line segment lengths between the three first intersection points and the relative positional relationship represented in the world coordinate system, the coordinate values of the three first intersection points in the world coordinate system are determined.
[0021] Preferably, based on the coordinates of the plurality of first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, the actual distance between the plurality of first intersection points and the laser center, and the coordinates of the plurality of first intersection points in the laser coordinate system, a first transformation relationship between the laser coordinate system and the world coordinate system is determined, including:
[0022] The laser center is taken as the origin of the laser coordinate system;
[0023] Based on the coordinates of two of the three first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, and the actual distance between the two first intersection points and the laser center, the coordinates of the laser center in the world coordinate system are determined.
[0024] Based on the distance between the second intersection point between the intermediate laser beam emitted by the lidar and the vertical plane and the laser center, the positional relationship between the second intersection point and the plurality of first intersection points, and the coordinates of the plurality of first intersection points in the world coordinate system and the laser coordinate system, the coordinates of the second intersection point in the world coordinate system are determined.
[0025] The first transformation relationship is determined based on the coordinates of the second intersection point in the world coordinate system and the laser coordinate system, and the coordinates of the other first intersection point (excluding the two first intersection points) in the world coordinate system and the laser coordinate system.
[0026] Preferably, determining the coordinates of the laser center in the world coordinate system includes:
[0027] The laser installation height, the height of the water platform, and the height coordinates of the water platform in the world coordinate system are summed, and the summation result is used as the height coordinates of the laser center in the world coordinate system.
[0028] The coordinates of the laser center in the world coordinate system are used as variables to represent the distance between the laser center and the two first intersection points;
[0029] An equivalence relationship is established between the distance between the laser center and the two first intersection points as represented in the world coordinate system and the actual distance between the laser center and the two first intersection points, thereby determining the coordinates of the laser center in the world coordinate system.
[0030] Preferably, determining the coordinates of the plurality of first intersection points in the laser coordinate system includes:
[0031] The extracted point cloud data is clustered into N point sets. When the N point sets form a straight line, the coordinates of the corresponding intersection point in the laser coordinate system are determined based on the point cloud data in each point set. When the N point sets cannot form a straight line, the process returns to step a. Here, N is preset according to the reflective strip pattern.
[0032] Preferably, after step e, the method further includes:
[0033] Based on the roll and pitch angles of the laser coordinate system in the pose of the carrier coordinate system, the adjustment amount used for laser leveling is determined.
[0034] Preferably, after laser leveling according to the stated adjustment amount, the process returns to step a, and after completing step e, further includes:
[0035] In the pose of the laser coordinate system under the carrier coordinate system, the first error between the coordinate value and the design value, the second error between the orientation angle and the orientation design value, the third error between the roll angle and 0, and the fourth error between the pitch angle and 0 are detected.
[0036] When the first error, second error, third error, and fourth error meet the preset requirements, the calibration is determined to be successful.
[0037] If any of the first error, second error, third error, and fourth error fails to meet the preset requirements, the calibration is determined to have failed.
[0038] Preferably, the structure of the lidar located on the carrier includes: multiple tray supports are provided on the carrier, a tray is placed on the tray supports, and the lidar is placed on the tray; the tray supports are used for laser leveling.
[0039] The determination of the adjustment amount used for laser leveling includes:
[0040] Determine the coordinates of each support point in the pallet coordinate system; wherein, the support point is the intersection between the pallet support column and the pallet, and the z-axis direction of the pallet coordinate system is parallel to the z-axis direction of the laser coordinate system;
[0041] Based on the first transformation relationship and the coordinates of each support point in the pallet coordinate system, determine the coordinates of each support point in the world coordinate system.
[0042] The height coordinates of the set reference support point in the world coordinate system are used as the reference coordinates. The difference between the height coordinates of other support points in the world coordinate system and the reference coordinates is determined. The determined difference is output as the adjustment amount. The adjustment amount includes the adjustment value and the adjustment direction.
[0043] This application also provides a calibration device for a two-dimensional lidar. The lidar to be calibrated is located on a carrier, which is placed on a horizontal platform. A reflective strip is provided on a vertical plane perpendicular to the horizontal platform. The pattern of the reflective strip ensures that when the lidar scans towards the vertical plane, the first intersection point between the lidar scanning plane and the reflective strip can uniquely determine the intersection line between the scanning plane and the vertical plane. The calibration device includes: an input data extraction unit, an intersection point coordinate determination unit, a first transformation relationship determination unit, a second transformation relationship determination unit, and an external parameter determination unit.
[0044] The input data extraction unit is used to extract the point cloud data of the laser beam reflected back by the reflective strip after the lidar scans in the direction of the vertical plane, as well as the point cloud data of the intermediate laser beam that is reflected back.
[0045] The intersection point coordinate determination unit is used to determine the coordinates of the intersection point in the laser coordinate system and the coordinates of the second intersection point between the intermediate laser beam and the vertical plane in the laser coordinate system based on the extracted point cloud data; wherein, the z-axis of the laser coordinate system is perpendicular to the laser radar scanning plane;
[0046] The first transformation relationship determination unit is used to determine a first transformation relationship between the laser coordinate system and the world coordinate system based on the coordinates of the plurality of first intersection points in the laser coordinate system, the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the second intersection point in the laser coordinate system, the laser installation height, the height of the horizontal platform surface, and the distance between the plurality of first intersection points and the laser center; wherein, the y-axis and z-axis of the world coordinate system are on the vertical plane;
[0047] The second transformation relationship determination unit is used to determine a second transformation relationship between the carrier coordinate system and the world coordinate system based on the relationship between the carrier coordinate system and the platform coordinate system, and the relationship between the platform coordinate system and the world coordinate system;
[0048] The extrinsic parameter determination unit is used to determine the pose of the laser coordinate system in the carrier coordinate system based on the first transformation relationship and the second transformation relationship, as an extrinsic parameter for calibrating the lidar.
[0049] Preferably, in the first transformation relationship determination unit, determining the first transformation relationship between the laser coordinate system and the world coordinate system includes:
[0050] Based on the coordinates of the plurality of first intersection points in the laser coordinate system and the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the plurality of first intersection points in the world coordinate system are determined;
[0051] Based on the coordinates of the plurality of first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, the distance between the plurality of first intersection points and the laser center, and the coordinates of the second intersection point and the plurality of first intersection points in the laser coordinate system, a first transformation relationship between the laser coordinate system and the world coordinate system is determined.
[0052] Preferably, the reflective strip pattern is: an "N" shape composed of three line segments, wherein the middle line segment of the three line segments forms an angle of 90 degrees with the other two line segments, or a partial pattern of the first pattern; the first intersection point has three points.
[0053] Preferably, in the first transformation relationship determination unit, determining the coordinates of the first intersection point in the world coordinate system includes:
[0054] Calculate the length of the line segment between the three first intersection points based on the coordinates of the three first intersection points in the laser coordinate system;
[0055] The coordinates of the three first intersection points in the world coordinate system are used as variables to represent the relative positional relationship between the three first intersection points and the reflective strip pattern;
[0056] Based on the line segment lengths between the three first intersection points and the relative positional relationship represented in the world coordinate system, the coordinate values of the three first intersection points in the world coordinate system are determined.
[0057] Preferably, in the first transformation relationship determination unit, based on the coordinates of the first intersection point in the world coordinate system, the laser installation height, the height of the horizontal platform, the actual distance between the intersection point and the laser center, and the coordinates of the first intersection point in the laser coordinate system, a first transformation relationship between the laser coordinate system and the world coordinate system is determined, including:
[0058] The laser center is taken as the origin of the laser coordinate system;
[0059] Based on the coordinates of two of the three first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, and the actual distance between the two first intersection points and the laser center, the coordinates of the laser center in the world coordinate system are determined.
[0060] Based on the distance between the second intersection point between the intermediate laser beam emitted by the lidar and the vertical plane and the laser center, the positional relationship between the second intersection point and the plurality of first intersection points, and the coordinates of the plurality of first intersection points in the world coordinate system and the laser coordinate system, the coordinates of the second intersection point in the world coordinate system are determined.
[0061] The first transformation relationship is determined based on the coordinates of the second intersection point in the world coordinate system and the laser coordinate system, and the coordinates of the other first intersection point (excluding the two first intersection points) in the world coordinate system and the laser coordinate system.
[0062] Preferably, in the first transformation relationship determination unit, determining the coordinates of the laser center in the world coordinate system includes:
[0063] The laser installation height, the height of the water platform surface, and the height coordinates of the water platform surface in the world coordinate system are summed, and the summation result is used as the height coordinates of the laser center in the world coordinate system.
[0064] The coordinates of the laser center in the world coordinate system are used as variables to represent the distance between the laser center and the two first intersection points;
[0065] An equivalence relationship is established between the distance between the laser center and the two first intersection points as represented in the world coordinate system and the actual distance between the laser center and the two first intersection points, thereby determining the coordinates of the laser center in the world coordinate system.
[0066] Preferably, in the intersection point coordinate determination unit, determining the coordinates of the intersection point in the laser coordinate system includes:
[0067] The extracted point cloud data is clustered into N point sets. When the N point sets form a straight line, the coordinates of the corresponding intersection point in the laser coordinate system are determined based on the point cloud data in each point set. When the N point sets cannot form a straight line, the process returns to step a. Here, N is preset according to the reflective strip pattern.
[0068] Preferably, the device further includes an adjustment output unit for determining and outputting an adjustment amount for laser leveling based on the roll angle and pitch angle of the laser coordinate system in the carrier coordinate system.
[0069] Preferably, the device further includes a verification unit, configured to, after laser leveling is performed according to the adjustment amount, and after the input data extraction unit, the intersection coordinate determination unit, the first transformation relationship determination unit, the second transformation relationship determination unit, and the extrinsic parameter determination unit sequentially re-execute the corresponding processing, detect, in the pose of the laser coordinate system under the carrier coordinate system, a first error between the coordinate value and the design value, a second error between the orientation angle and the orientation design value, a third error between the roll angle and 0, and a fourth error between the pitch angle and 0; determine that the calibration is successful when the first error, the second error, the third error, and the fourth error meet preset requirements; determine that the calibration fails when any of the first error, the second error, the third error, and the fourth error does not meet the preset requirements.
[0070] Preferably, the structure of the lidar located on the carrier includes: multiple tray supports are provided on the carrier, a tray is placed on the tray supports, and the lidar is placed on the tray; the tray supports are used for laser leveling.
[0071] In the adjustment output unit, determining the adjustment amount for laser leveling includes:
[0072] Determine the coordinates of each support point in the pallet coordinate system; wherein, the support point is the intersection between the pallet support column and the pallet, and the z-axis direction of the pallet coordinate system is parallel to the z-axis direction of the laser coordinate system;
[0073] Based on the first transformation relationship and the coordinates of each support point in the pallet coordinate system, determine the coordinates of each support point in the world coordinate system.
[0074] The height coordinates of the set reference support point in the world coordinate system are used as the reference coordinates. The difference between the height coordinates of other support points in the world coordinate system and the reference coordinates is determined. The determined difference is output as the adjustment amount. The adjustment amount includes the adjustment value and the adjustment direction.
[0075] This application also provides a computer-readable storage medium storing computer instructions thereon, characterized in that, when the instructions are executed by a processor, they can implement the calibration method of the two-dimensional lidar described in any of the above claims.
[0076] This application also provides an electronic device that includes at least a computer-readable storage medium and a processor;
[0077] The processor is configured to read the executable instructions from the computer-readable storage medium and execute the instructions to implement the calibration method of the two-dimensional lidar as described above.
[0078] As can be seen from the above technical solution, in this application, the lidar scans towards a vertical plane with reflective strips, extracting point cloud data of the laser beam reflected back by the reflective strips and point cloud data of the reflected intermediate laser beam. Using the extracted point cloud data, the coordinates of the first intersection point between the laser scanning plane and the reflective strips in the laser coordinate system and the coordinates of the second intersection point between the intermediate laser beam and the vertical plane in the laser coordinate system are determined. Multiple first intersection points are used to determine the intersection line between the laser scanning plane and the vertical plane. Using the relative positional relationship between this intersection line and the reflective strips, the coordinates of the first and second intersection points in the laser coordinate system, and the laser installation height, the first transformation relationship between the laser coordinate system and the world coordinate system can be determined. Next, based on the relationship between the carrier coordinate system and the platform coordinate system of the horizontal platform, and the preset relationship between the platform coordinate system and the world coordinate system, the second transformation relationship between the carrier coordinate system and the world coordinate system is determined. Finally, based on the first and second transformation relationships, the pose of the laser coordinate system in the carrier coordinate system can be determined as the calibration extrinsic parameter of the lidar. Using the above-mentioned application, the external parameters of laser installation can be accurately determined by setting the reflective strip, thereby improving the laser positioning accuracy. Attached Figure Description
[0079] Figure 1 This is a schematic diagram of the basic process of the calibration method for the two-dimensional lidar in this application;
[0080] Figure 2 This is a schematic diagram of the environment for the calibration scheme in a specific embodiment of this application;
[0081] Figure 3This is a schematic diagram of the reflective strip scheme in a specific embodiment of this application;
[0082] Figure 4 This is a schematic diagram illustrating the specific process of the two-dimensional lidar calibration method in a particular embodiment of this application;
[0083] Figure 5 This is a schematic diagram of laser leveling in a specific embodiment of this application;
[0084] Figure 6 This is a schematic diagram of the pallet support adjustment in a specific embodiment of this application;
[0085] Figure 7 This is a schematic diagram of the basic structure of the calibration device for the two-dimensional lidar in this application;
[0086] Figure 8 This is a schematic diagram of the basic structure of the electronic device in this application. Detailed Implementation
[0087] To make the objectives, technical means, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings.
[0088] First, it should be noted that the typical structure used for calibrating a 2D lidar includes: the lidar to be calibrated is located on a carrier (e.g., a robot), the carrier is placed on a horizontal platform, and there is a vertical plane perpendicular to the horizontal platform. The lidar emits a laser beam towards the vertical plane for calibration.
[0089] Next, we will explain the external parameters to be calibrated (hereinafter referred to as extrinsic parameters).
[0090] The extrinsic parameters for laser installation refer to the coordinates, orientation, and rotation information of the laser center in the carrier coordinate system. Specifically, these include six extrinsic parameters: [x, y, z, ψ, φ, θ]. These parameters directly affect positioning. [x, y, z] represent the three rectangular coordinates of the laser center in the carrier coordinate system, ψ is the orientation angle of the laser center in the carrier coordinate system, and φ and θ are the roll and pitch angles of the laser center in the carrier coordinate system, respectively. Furthermore, the extrinsic parameters for laser installation can be represented by the transformation relationship between the laser coordinate system and the carrier coordinate system. Therefore, determining the extrinsic parameters for laser installation is equivalent to determining the transformation relationship between the laser coordinate system and the carrier coordinate system.
[0091] Of the six extrinsic parameters mentioned above, only [x, y, ψ] can be compensated for in the algorithm. The other parameters [z, φ, θ] require structural guarantees, but the structure lacks effective measurement methods to obtain these parameters. Therefore, they still need to be measured by the calibration algorithm during the calibration process. In other words, the [x, y, ψ] parameters can be stored in the carrier (e.g., a robot) at the factory and then used as configuration parameters for compensation and elimination in the algorithm. However, [z, φ, θ] must be guaranteed by the structure. That is, at the factory, z is a known, definite value that needs to meet the laser installation height requirements, and the [φ, θ] values need to be adjusted to approach 0. The accuracy of the z value is easily guaranteed by the structure. In this application, the z value is determined by the laser installation height, and the five parameters [x, y, φ, θ, ψ] are calibrated. The [x, y, ψ] parameters can be stored in the carrier (e.g., a robot) as calibration results. If the [φ, θ] parameters are not 0, production personnel need to be instructed to adjust them to 0 before shipment.
[0092] The above-mentioned external parameter calculation process requires consideration of the relationships between multiple coordinate systems. These relevant coordinate systems include: the world coordinate system, the laser coordinate system, the platform coordinate system on the water surface, and the carrier coordinate system.
[0093] The basic idea of this application is to set reflective strips on the vertical plane of laser scanning, and use the intersection of the reflective strips and the laser scanning plane to uniquely determine the intersection line between the laser scanning plane and the vertical plane. Based on this intersection line, the laser installation height, and the distance value of the key laser beam, the pose of the laser coordinate system relative to the world coordinate system is determined, which is to calibrate the extrinsic parameters of the lidar.
[0094] It should be noted that the pose includes rectangular coordinates. Therefore, unless otherwise specified, the coordinates in this application refer to rectangular coordinates.
[0095] Figure 1 This is a schematic diagram illustrating the basic flowchart of the calibration method for a two-dimensional lidar in this application. Reflective strips are arranged on a vertical plane. The pattern of the reflective strips ensures that when the lidar scans in the vertical direction, multiple intersection points between the lidar scanning plane and the reflective strips can uniquely determine the intersection line between the scanning plane and the vertical plane. In this application, the intersection point between the lidar scanning plane and the reflective strips is referred to as the first intersection point. For example... Figure 1 As shown, the method includes:
[0096] Step 101: Extract the point cloud data of the laser beam reflected back by the reflective strip after the lidar scans in the vertical direction, as well as the point cloud data of the intermediate laser beam that is reflected back.
[0097] The point cloud data of the reflected laser beams includes the polar coordinates of the corresponding points on the laser scanning plane and the reflection intensity. Since the laser beams reflected back by the reflective strips have a relatively high intensity, the reflection intensity in the point cloud data can be used to distinguish which point cloud data belong to the laser beams reflected back by the reflective strips, and the point cloud data of these laser beams can be extracted for subsequent calculations.
[0098] In addition, as mentioned earlier, the extrinsic parameters of the laser installation are the coordinates, orientation, and rotation information of the laser center in the carrier coordinate system. Therefore, in addition to using the point cloud data reflected back by the reflective strips, the point cloud data reflected back from the 0-degree laser beam (i.e., the intermediate laser beam) emitted by the lidar is also required. Therefore, this step also requires obtaining the point cloud data of the reflected intermediate laser beam.
[0099] Step 102: Based on the extracted point cloud data, determine the coordinates of multiple first intersection points in the laser coordinate system and the coordinates of the second intersection point between the middle laser beam and the vertical plane in the laser coordinate system.
[0100] In this application, the z-axis of the laser coordinate system is perpendicular to the laser radar scanning plane; the plane formed by the x-axis and y-axis of the laser coordinate system is parallel to the laser scanning plane.
[0101] The point cloud data extracted in step 101 includes the point cloud data of the laser beam reflected back by the reflective strip, that is, the point cloud data of the intersection between the laser scanning plane and the reflective strip. Since the reflective strip has a certain width, each intersection may be a collection of several laser beams. Therefore, each intersection may include point cloud data corresponding to multiple laser beams. All the point cloud data of each intersection constitute a point set. The point cloud data of each point set is processed accordingly (such as mean processing) to obtain the coordinates of the corresponding first intersection point.
[0102] Meanwhile, the point cloud data extracted in step 101 also includes the point cloud data of the reflected intermediate laser beam, that is, the point cloud data of the intersection point between the intermediate laser beam and the vertical plane (called the second intersection point). In fact, it includes the polar coordinates of the second intersection point in the laser coordinate system and the reflection intensity of the intermediate laser beam. Thus, the coordinates of the intersection point in the laser coordinate system can be obtained.
[0103] In addition, the point cloud data includes polar coordinates in the laser coordinate system. Based on these polar coordinates, rectangular coordinates can be obtained, which are the coordinates in the laser coordinate system referred to in this application.
[0104] Step 103: Based on the coordinates of multiple first intersection points in the laser coordinate system, the positional relationship between the reflective strip and the intersection line determined by the multiple first intersection points, the coordinates of the second intersection point in the laser coordinate system, the laser installation height, the height of the horizontal platform, and the distance between the multiple first intersection points and the laser center, determine the first transformation relationship between the laser coordinate system and the world coordinate system.
[0105] In this coordinate system, the y-axis and z-axis of the world coordinate system lie on the vertical plane. By using multiple first intersection points between the laser scanning plane and the reflective strip, the intersection line between the laser scanning plane and the vertical plane can be uniquely determined, thus revealing the relative positional relationship between the intersection line and the reflective strip. Simultaneously, the distance between the second intersection point and the laser center can be determined using the second intersection point. Since the relative positional relationship between the intersection line and the reflective strip, and the distance between the second intersection point and the laser center, remain constant across all coordinate systems, while the position of the reflective strip on the vertical plane is predetermined and reflects coordinate information in the world coordinate system, and the first and second intersection points reflect coordinate information in the laser coordinate system, the transformation relationship between the laser coordinate system and the world coordinate system can be calculated by combining the aforementioned relative positional relationship and coordinate information with the laser installation height and the height of the horizontal platform. This transformation relationship is called the first transformation relationship.
[0106] Specifically, the methods for determining the first transformation relationship may include:
[0107] Based on the coordinates of multiple first intersection points in the laser coordinate system and the positional relationship between the reflective strip and the intersection line determined by the multiple first intersection points, the coordinates of the multiple first intersection points in the world coordinate system are determined;
[0108] Based on the coordinates of multiple first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, the distance between multiple first intersection points and the laser center, the coordinates of multiple first intersection points in the laser coordinate system, and the coordinates of the second intersection point in the laser coordinate system, the first transformation relationship between the laser coordinate system and the world coordinate system is determined.
[0109] Step 104: Based on the relationship between the carrier coordinate system and the platform coordinate system, and the relationship between the platform coordinate system and the world coordinate system, determine the second transformation relationship between the carrier coordinate system and the world coordinate system.
[0110] The relationship between the carrier coordinate system and the platform coordinate system can be determined using existing methods. The relationship between the platform coordinate system and the world coordinate system is known and can be guaranteed by structural tooling. Thus, based on the relationship between the carrier coordinate system and the platform coordinate system, and the relationship between the platform coordinate system and the world coordinate system, the transformation relationship between the carrier coordinate system and the world coordinate system can be determined, which is called the second transformation relationship.
[0111] Step 105: Based on the first transformation relationship and the second transformation relationship, determine the pose of the laser coordinate system in the carrier coordinate system, which is used as an external parameter for calibrating the lidar.
[0112] The transformation relationship between the carrier coordinate system and the laser coordinate system is determined by the first transformation relationship obtained in step 103 and the second transformation relationship obtained in step 104. This is the pose of the laser coordinate system in the carrier coordinate system, which is also the external parameter for calibrating the lidar.
[0113] This concludes the basic lidar calibration method flow in this application. After determining the lidar's extrinsic parameters using the above method, further steps can be included:
[0114] Step 106: Based on the roll and pitch angles of the laser coordinate system in the carrier coordinate system, determine the adjustment amount used for laser leveling.
[0115] Based on the external parameters determined in step 105, determine the adjustment amount to adjust the laser scanning plane to be parallel to the horizontal plane (that is, to level the laser scanning plane).
[0116] The specific implementation of the lidar calibration method in this application is illustrated below through specific embodiments.
[0117] Figure 2 This is a schematic diagram of the environment for the calibration scheme in a specific embodiment of this application. For example... Figure 2 As shown, in this specific embodiment, the carrier is a robot, the lidar is located on the robot, and the robot is placed on a fixed horizontal platform. Ground codes are affixed to the platform to determine the transformation relationship between the carrier coordinate system and the platform coordinate system, as well as the relationship between the platform coordinate system and the world coordinate system. The vertical surface is a wall surface with reflective strips affixed to it. The reflective strip pattern is an "N" shape composed of three line segments, with the middle line segment forming a 90-degree angle with the other two line segments. Figure 3 As shown. Based on this reflective strip pattern, there are three first intersection points between the laser scanning plane and the reflective strip.
[0118] First, let's define several relevant coordinate systems, the relationships between coordinate systems, and the representation of points in the specific embodiment:
[0119] 1. Laser coordinate system (l-system): The center of the coordinate system is the laser center (the center of the laser beam), the x-axis is the direction directly in front of the laser, that is, the direction where the azimuth angle of the laser beam is 0, the y-axis is perpendicular to the x-axis on the laser scanning plane and points to the left, and the z-axis is perpendicular to the laser scanning plane and points upward.
[0120] 2. World coordinate system (n-system): Coordinate center as shown in the figure Figure 2 O in nAs shown, the x-axis is on the horizontal plane and is perpendicular to the plane (vertical plane / wall) where the reflective strip is located, pointing into the wall; the y-axis is on the horizontal plane and is perpendicular to the x-axis, pointing to the left; the z-axis is on the plane of the reflective strip, perpendicular to the horizontal plane, and pointing upwards.
[0121] 3. Carrier coordinate system (c-system): In this specific embodiment, it is described as the robot coordinate system. The coordinate center is the robot center, the x-axis is the front of the robot, the y-axis is the left of the robot, and the z-axis is perpendicular to the xy plane and points upward.
[0122] Right now This represents a rotation and translation transformation from coordinate system α to coordinate system β. The coordinate system subscripts are represented by lowercase letters: l - laser system, n - world system, c - carrier system. (Transformation from laser system to world system) Transformation from a carrier system to a world system Laser-to-carrier system conversion )
[0123] 5. This represents point N in coordinate system α. The point is labeled with an uppercase letter in the lower right corner.
[0124] Figure 4 This is a schematic diagram illustrating the specific process of the two-dimensional lidar calibration method in a particular embodiment of this application. Figure 4 As shown, the method includes:
[0125] Step 401: Extract the point cloud data of the laser beam reflected back after the lidar scans towards the wall, as well as the point cloud data of the intermediate laser beam that is reflected back by the reflective strip.
[0126] The lidar scans the wall, emitting a laser beam. The wall reflects the laser beam back, and point cloud data of the reflected laser beam is generated using existing methods. This embodiment receives the point cloud data of the generated reflected laser beam and the point cloud data of the intermediate laser beam that was reflected back.
[0127] Preferably, the received point cloud data can be tested for validity and stability. If the test passes, the point cloud data of the laser beam reflected by the reflective strip is extracted. If the test fails, the laser scan can be performed again and the point cloud data of the reflected laser beam can be received.
[0128] The data validity check mainly verifies whether the range of the point cloud data, the number of laser data points and resolution, and the laser opening angle match. If the point cloud data is invalid or mismatched, the following processing will not be performed, and the result will be returned directly.
[0129] Data stability testing primarily uses a sliding window method to determine whether the laser beam is stably positioned and whether the data from each laser beam converges. This testing ensures that the entire calibration scene is stationary during calibration, preventing erroneous results from occurring during movement.
[0130] After passing the data validity and stability tests, the data extraction of the laser beam reflected by the reflective strips can be performed. The point cloud data includes the polar coordinates and reflection intensity of the corresponding points on the laser scanning plane. Since the laser beam reflected back from the reflective strips has a relatively high intensity, the reflection intensity in the point cloud data can be used to identify which point cloud data belong to the laser beam reflected back from the reflective strips. The point cloud data of these laser beams is then extracted for subsequent calculations. For the extraction of point cloud data for the intermediate laser beam, the angle information in the polar coordinates of the point cloud data can determine that the data belongs to the intermediate laser beam; therefore, the data of the corresponding points is extracted for subsequent calculations.
[0131] Step 402: Based on the extracted point cloud data, determine the coordinates of the three first intersection points and the second intersection point in the laser coordinate system.
[0132] like Figure 3 As shown, there are three first intersection points in this embodiment. This step obtains the coordinates of these three first intersection points in the laser coordinate system.
[0133] Since the reflective strips have a certain width, each intersection point may be a collection of several laser beams. Therefore, each intersection point may include point cloud data corresponding to multiple laser beams, and all point cloud data at each intersection point constitute a point set. Specifically, the extracted point cloud data can be clustered into N point sets. When the N point sets form a straight line, the coordinates of the corresponding intersection point in the laser coordinate system are determined based on the point cloud data in each point set. When the N point sets cannot form a straight line, the process returns to step 401. Here, N can be preset according to the reflective strip pattern.
[0134] Specifically, in this embodiment, the point cloud data extracted in step 401 is clustered by location, resulting in three point sets, each corresponding to one of the three first intersection points (i.e., Figure 2 and 3 (Points A, B, and C in the diagram). If no three point sets are obtained, or if the three extracted point sets are not on a straight line, then the extraction of the first intersection point is considered a failure, and the process returns to step 401.
[0135] For the three point sets obtained, the coordinates of all points in each set are processed (e.g., averaged) to obtain the coordinates of the corresponding first intersection point. For any point, the data includes polar coordinates on the laser scanning plane. Based on these polar coordinates, the x-axis and y-axis coordinates of the corresponding point in the laser coordinate system can be obtained. Since the center of the laser beam in this embodiment is the origin of the laser coordinate system, the z-axis coordinate of all points in the point cloud in the laser coordinate system is 0. Thus, the coordinates of any point in the laser coordinate system can be obtained, and consequently, the coordinates of the three first intersection points in the laser coordinate system can be derived.
[0136] For the coordinates of the second intersection point in the laser coordinate system, such as Figure 3 As shown, the central laser beam of the laser scanning beam (i.e., the laser beam on the x-axis of the laser system) intersects the wall at point R. Its coordinates in the laser system are... It is known that That is, the distance between R and the center of the laser.
[0137] Next, the first transformation relationship between the laser coordinate system and the world coordinate system is determined through steps 403-404.
[0138] Step 403: Based on the coordinates of the three first intersection points in the laser coordinate system and the positional relationship between the reflective strip and the intersection line determined by the three first intersection points, determine the coordinates of the three first intersection points in the world coordinate system.
[0139] Calculating the coordinates of points A, B, and C in the world coordinate system can involve the following steps:
[0140] Based on the coordinates of points A, B, and C in the laser coordinate system, calculate the lengths of the line segments |AB|, |BC|, and |AC| between the three first intersection points;
[0141] The coordinates of points A, B, and C in the world coordinate system are used as variables to represent the relative positional relationship between points A, B, and C and the reflective strip pattern.
[0142] Based on the line segment lengths between points A, B, and C and their relative positions in the world coordinate system, determine the coordinate values of points A, B, and C in the world coordinate system.
[0143] More specifically, the relative positional relationship between the reflective stripe pattern and points A, B, and C remains unchanged regardless of whether the coordinate system is in the world coordinate system or the laser coordinate system. The lengths of the line segments |AB|, |BC|, and |AC| also remain constant. Therefore, by using the relative positional relationship expressed in the world coordinate system and combining it with the lengths of the line segments |AB|, |BC|, and |AC|, we can establish an equality relationship to determine the coordinate values of points A, B, and C in the world coordinate system. For example, we can use... Figure 3 The similarity between triangles AMB and BCN, and the construction of right triangle MNQ by drawing an auxiliary line MQ parallel to AC, are used to establish equality relationships. The specific equality relationships and methods of calculation can be reasonably set by those skilled in the art as needed, and will not be elaborated upon here.
[0144] Step 404: Based on the coordinates of the three first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, the actual distance between the two first intersection points and the laser center, and the coordinates of the second intersection point and the two first intersection points in the laser coordinate system, determine the first transformation relationship between the laser coordinate system and the world coordinate system.
[0145] The origin of the laser system (i.e., the center of the emitted laser beam, or simply the laser center) is located at laser scanning points A and C, with corresponding scanning distances (i.e., the distances r measured by the laser beams at A and C respectively) centered at these points. A r C On a sphere with radius ), and combining the laser installation height and platform height, the height of the laser center in the world system can be obtained. This value can be guaranteed through structural installation. Therefore, the method for determining the first transformation relationship preferably includes:
[0146] 1) Take the laser center as the origin of the laser coordinate system;
[0147] 2) Based on the coordinates of two of the three first intersection points (e.g., points A and C) in the world coordinate system, the laser installation height, the height of the horizontal platform, and the actual distance between the two first intersection points and the laser center, determine the coordinates of the laser center in the world coordinate system;
[0148] 3) Based on the distance between the second intersection point of the laser beam emitted by the lidar and the vertical plane and the laser center, the positional relationship between the second intersection point and the three first intersection points, and the coordinates of the multiple first intersection points in the world coordinate system and the laser coordinate system, determine the coordinates of the second intersection point in the world coordinate system.
[0149] 4) Based on the coordinates of the second intersection point in the world coordinate system and the laser coordinate system, and the coordinates of the other first intersection point (e.g., point B) among the three first intersection points in the world coordinate system and the laser coordinate system, determine the first transformation relationship.
[0150] In the above processing, the detailed processing of 2) will be introduced first. Preferably, the method for determining the coordinates of the laser center in the world coordinate system may specifically include:
[0151] Summing the laser installation height, the height of the horizontal platform, and the height coordinates of the horizontal platform in the world coordinate system, and using the summation result as the height coordinates of the laser center in the world coordinate system;
[0152] The coordinates of the laser center in the world coordinate system are used as variables to represent the distance between the laser center and the two first intersection points;
[0153] By establishing an equal relationship between the distance between the laser center and the two first intersection points as represented in the world coordinate system and the actual distance between the laser center and the two first intersection points, the coordinates of the laser center in the world coordinate system are determined.
[0154] More specifically, the actual distances between the laser center and the two first intersection points are known, that is, the distances r from points A and C to the laser center. A and r C Therefore, by establishing an equal relationship between the distance between the laser center and the two first intersection points in the world coordinate system and the actual distance between the laser center and the two first intersection points, we can obtain two equations with the coordinates of the laser center in the world coordinate system as unknowns. Based on this, we can solve for the coordinates of the laser center in the world coordinate system.
[0155] Next, we will introduce the detailed processing of 3) and 4). As mentioned earlier, the middle laser beam of the laser scanning beam (i.e., the laser beam on the x-axis of the laser system) intersects the wall at point R, and its coordinates in the laser system are... It is known that That is, the distance between R and the center of the laser. Furthermore, point R must lie on line segment AC and pass through... Given the length of AR, and considering the principle that coordinate rotation and translation do not change the vector length, the coordinates of point R in the world coordinate system can be calculated. Therefore, the coordinates of point R in both the world coordinate system and the laser coordinate system are known. Combined with the coordinates of point B in both systems, the transformation matrix between the two coordinate systems can be calculated, i.e., the transformation matrix from the laser coordinate system to the world coordinate system. This yields the three attitude angles of the laser coordinate system in the world coordinate system.
[0156] In summary, the transformation matrix from the laser coordinate system to the world coordinate system is obtained. (i.e., the first transformation relation) yields the pose of the laser coordinate system in the world coordinate system.
[0157] Step 405: Based on the relationship between the carrier coordinate system and the platform coordinate system, and the relationship between the platform coordinate system and the world coordinate system, determine the second transformation relationship between the carrier coordinate system and the world coordinate system.
[0158] The relationship between the carrier coordinate system and the platform coordinate system can be determined using existing methods. In this embodiment, it is obtained by using a ground code affixed to the platform surface. Specifically, a downward-facing camera is installed at the bottom of the carrier coordinate system. The relationship between the carrier coordinate system and the platform coordinate system is determined by capturing information from the ground code (which can be a QR code). In this embodiment, a transformation matrix from the carrier coordinate system to the platform coordinate system is used. express.
[0159] Meanwhile, the pose of the ground code in the world coordinate system is guaranteed by the structural tooling, and the transformation matrix from the platform coordinate system to the world coordinate system can be determined from this pose. Then combine the transformation matrix from the carrier coordinate system to the platform coordinate system The transformation matrix from the carrier coordinate system to the world coordinate system can be determined. This refers to the second transformation relationship. Here, c represents the carrier coordinate system, which in this embodiment is the robot coordinate system, and d represents the platform coordinate system.
[0160] Step 406: Based on the first transformation relationship and the second transformation relationship, determine the pose of the laser coordinate system in the carrier coordinate system, which is used as an external parameter for calibrating the lidar.
[0161] The transformation relationship between the carrier coordinate system and the laser coordinate system is determined by the first transformation relationship obtained in step 404 and the second transformation relationship obtained in step 405. This is the pose of the laser coordinate system in the carrier coordinate system, which is also the external parameter for calibrating the lidar.
[0162] Specifically, the relationship between the laser coordinate system and the world coordinate system And the transformation relationship between the carrier coordinate system and the world coordinate system. Given that the relationship between the laser coordinate system and the carrier coordinate system is required. This can be obtained through simple matrix transpose and matrix multiplication, and thus the pose of the laser coordinate system in the carrier coordinate system can be obtained. This refers to the coordinates of the laser center in the carrier coordinate system. At this point, all six external parameters for laser installation have been calibrated.
[0163] After determining the six extrinsic parameters for laser installation, the laser scanning plane can be leveled based on these parameters. This application further provides optimized steps 407-409, which can further simplify the leveling process of the laser scanning plane.
[0164] Specifically, to achieve laser scanning plane leveling, the structure of the lidar mounted on the carrier typically includes: multiple tray supports on the carrier, trays placed on the tray supports, and the lidar placed on the trays, such as... Figure 5 As shown. The laser scanning plane can be adjusted by adjusting the height of each tray support (e.g., by adding or removing shims).
[0165] The laser calibration has been completed through steps 401-406, obtaining the pose of the laser coordinate system in both the world and carrier coordinate systems. Next, steps 407-409 will be used to determine the required height adjustment of each support column if leveling of the laser plane is necessary, based on the laser coordinate system's pose in the world coordinate system (specifically, the z-axis coordinates of the laser coordinate system in the world coordinate system). The following is a detailed description of steps 407-409:
[0166] Step 407: Determine the coordinates of each support point in the pallet coordinate system.
[0167] The support point is the intersection between the pallet support and the pallet, and the z-axis of the pallet coordinate system is parallel to the z-axis of the laser coordinate system.
[0168] Specifically in this embodiment, such as Figure 6 Support points 1, 2, 3, and 4 are the intersections of the pallet support and the pallet. Establish a pallet coordinate system (t-frame) with its x-axis along one side of a rectangle (e.g., ...). Figure 6 The z-axis is perpendicular to the tray plane and points upwards, and the y-axis direction is determined by the right-hand coordinate system.
[0169] Based on the structural dimensions, the coordinates of each support point in the pallet coordinate system are as follows:
[0170]
[0171]
[0172]
[0173]
[0174] Step 408: Based on the first transformation relationship and the coordinates of each support point in the pallet coordinate system, determine the coordinates of each support point in the world coordinate system.
[0175] The pose of the laser coordinate system relative to the world coordinate system has already been determined. It is easy to see that the z-axis of the laser coordinate system coincides with the z-axis of the pallet coordinate system. Assuming that its yaw angle is 0 (we only need to ensure that the z-axis of the pallet coordinate system coincides with the z-axis of the laser coordinate system; yaw is not a concern), the rotation matrix of the pallet coordinate system relative to the world coordinate system can be calculated. Then, the coordinates of points 1, 2, 3, and 4 in the world coordinate system (relative to the origin of the pallet coordinate system) can be obtained by rotation.
[0176]
[0177]
[0178]
[0179]
[0180] Step 409: Use the height coordinates of the set reference support point in the world coordinate system as the reference coordinates, determine the difference between the height coordinates of other support points in the world coordinate system and the reference coordinates, and output the determined difference as the adjustment amount.
[0181] By adjusting the height coordinates of all support points to be the same, the laser scanning plane can be leveled. Based on this, one support point can be selected as a reference support point. The difference between the height coordinates of the other support points and the reference support point is calculated; this difference represents the adjustment amount for the corresponding support point. This adjustment amount can include the adjustment direction and value. Outputting this adjustment amount allows workers to directly adjust the support pillars accordingly, achieving leveling of the laser scanning plane.
[0182] Specifically, in this embodiment, the support point with the largest z-value among all four support points is taken as the reference support point, and this maximum z-value is... The adjustment amounts for each support pillar are as follows:
[0183]
[0184] If the height of the washers for the support pillars is fixed at τ, then the number of washers added to each support pillar is:
[0185]
[0186] In this embodiment, the adjustment amount for each support post can be output, as well as the number of washers required for each support post. Workers can adjust the supports based on the output. During adjustment, the corresponding support post can be adjusted directly according to the output adjustment amount or number of washers. Alternatively, suitable support posts can be selected for adjustment based on the adjustment amount or number of washers. For example, if the output adjustment amount is to add 2 washers to the support posts corresponding to support points 2, 3, and 4, and the support post corresponding to support point 1 requires more than 2 washers, then the support post corresponding to support point 1 can be reduced by 2 washers.
[0187] To further verify the calibration results, preferably, after laser leveling according to the adjustment amount, the process can return to steps 401-406 and then execute step 410 as follows:
[0188] Step 410: In the pose of the laser coordinate system in the carrier coordinate system, detect the first error between the coordinate value and the design value, the second error between the orientation angle and the orientation design value, the third error between the roll angle and 0, and the fourth error between the pitch angle and 0. Determine whether the calibration is successful based on the first error, the second error, the third error, and the fourth error.
[0189] The calibration result verification mainly involves verifying the range of the six calibrated extrinsic parameters. These six extrinsic parameters are obtained after recalibrating the lidar following laser scanning plane leveling. Calibration is considered successful if the first, second, third, and fourth errors meet the preset requirements; calibration is considered unsuccessful if any one of these errors fails to meet the preset requirements. Specifically, The difference between the design value given by the structure and the actual design value must be within the specified range. It must be within a certain range around 0, otherwise the calibration will fail.
[0190] At this point, Figure 4 The illustrated method flow ends here. In the above specific embodiment, an N-shaped reflective strip pattern was used as an example to illustrate the specific processing of the calibration method of this application. In fact, the reflective strip pattern can be designed as needed, as long as the intersection point between the reflective strip and the laser scanning plane can uniquely determine the intersection line between the laser scanning plane and the vertical plane. For example, the reflective strip pattern can also be a partial pattern of the N-shaped pattern in the above specific embodiment, such as... Figure 2 As shown, the advantage of this design is that if the laser scans a position close to the 90-degree angle, the distance between the two intersection points will be relatively close, making it difficult to distinguish between the two different intersection points when performing point clustering. Based on this, the part close to the 90-degree angle can be removed so that the laser will not scan a position close to the 90-degree angle, making it easier to perform point clustering.
[0191] As can be seen from the specific implementation of the two-dimensional lidar calibration method in this application, this application accurately obtains the relationship between the laser coordinate system and the world coordinate system by designing a specific reflective strip pattern, obtains the relationship between the carrier coordinate system and the world coordinate system by using ground codes, and then obtains the relationship between the laser coordinate system and the carrier coordinate system by connecting them through the world coordinate system, thereby obtaining accurate laser installation extrinsic parameters and improving laser positioning accuracy. Furthermore, the calibration results can be used to directly calculate the height that the support column under the laser tray should be adjusted, which is highly operable, can greatly reduce the technical requirements for workers, and improve production efficiency.
[0192] This application also provides a calibration device for a two-dimensional lidar, which can be used to implement the above-described calibration method for a two-dimensional lidar. The lidar to be calibrated is located on a carrier, which is placed on a horizontal platform. Reflective strips are arranged on a vertical plane perpendicular to the horizontal platform. The pattern of the reflective strips ensures that when the lidar scans in the vertical direction, the first intersection point between the lidar scanning plane and the reflective strips uniquely determines the line of intersection between the scanning plane and the vertical plane. Figure 7 As shown, the calibration device includes: an input data extraction unit, an intersection coordinate determination unit, a first transformation relationship determination unit, a second transformation relationship determination unit, and an external parameter determination unit.
[0193] The input data extraction unit is used to extract the point cloud data of the laser beam reflected back by the reflective strip after the lidar scans the vertical plane, as well as the point cloud data of the intermediate laser beam that is reflected back.
[0194] The intersection point coordinate determination unit is used to determine the coordinates of the intersection point in the laser coordinate system and the coordinates of the second intersection point between the middle laser beam and the vertical plane in the laser coordinate system based on the extracted point cloud data; wherein, the z-axis of the laser coordinate system is perpendicular to the laser radar scanning plane;
[0195] The first transformation relationship determination unit is used to determine a first transformation relationship between the laser coordinate system and the world coordinate system based on the coordinates of the plurality of first intersection points in the laser coordinate system, the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the second intersection point in the laser coordinate system, the laser installation height, the height of the horizontal platform surface, and the distance between the plurality of first intersection points and the laser center; wherein, the y-axis and z-axis of the world coordinate system are on the vertical plane;
[0196] The second transformation relationship determination unit is used to determine the second transformation relationship between the carrier coordinate system and the world coordinate system based on the relationship between the carrier coordinate system and the platform coordinate system, and the relationship between the platform coordinate system and the world coordinate system.
[0197] The extrinsic parameter determination unit is used to determine the pose of the laser coordinate system in the carrier coordinate system based on the first transformation relationship and the second transformation relationship, as an extrinsic parameter for calibrating the lidar.
[0198] Optionally, in the first transformation relationship determination unit, the process of determining the first transformation relationship between the laser coordinate system and the world coordinate system may specifically include:
[0199] Based on the coordinates of multiple first intersection points in the laser coordinate system and the positional relationship between the reflective strip and the intersection line determined by the multiple first intersection points, the coordinates of the multiple first intersection points in the world coordinate system are determined;
[0200] Based on the coordinates of multiple first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, the distance between multiple first intersection points and the laser center, and the coordinates of multiple first intersection points in the laser coordinate system, the first transformation relationship between the laser coordinate system and the world coordinate system is determined.
[0201] Optionally, the reflective strip pattern is: an "N" shape composed of three line segments, wherein the middle line segment of the three line segments forms an angle of 90 degrees with the other two line segments, or a partial pattern of the first pattern; wherein there are three first intersection points.
[0202] Optionally, in the first transformation relationship determination unit, the process of determining the coordinates of the first intersection point in the world coordinate system may specifically include:
[0203] Calculate the length of the line segment between the three first intersection points based on the coordinates of the three first intersection points in the laser coordinate system;
[0204] The coordinates of the three first intersection points in the world coordinate system are used as variables to represent the relative positional relationship between the three first intersection points and the reflective strip pattern;
[0205] Based on the lengths of the line segments between the three first intersection points and their relative positions in the world coordinate system, determine the coordinate values of the three first intersection points in the world coordinate system.
[0206] Optionally, in the first transformation relationship determination unit, based on the coordinates of the first intersection point in the world coordinate system, the laser installation height, the height of the horizontal platform, the actual distance between the intersection point and the laser center, and the coordinates of the first intersection point in the laser coordinate system, the first transformation relationship between the laser coordinate system and the world coordinate system is determined, which may specifically include:
[0207] The laser center is taken as the origin of the laser coordinate system;
[0208] Based on the coordinates of two of the three first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, and the actual distance between the two first intersection points and the laser center, the coordinates of the laser center in the world coordinate system are determined.
[0209] Based on the distance between the second intersection point of the laser beam emitted by the lidar and the vertical plane and the laser center, the positional relationship between the second intersection point and multiple first intersection points, and the coordinates of the multiple first intersection points in the world coordinate system and the laser coordinate system, the coordinates of the second intersection point in the world coordinate system are determined.
[0210] Based on the coordinates of the second intersection point in the world coordinate system and the laser coordinate system, and the coordinates of the other first intersection point (excluding the two mentioned above) in the world coordinate system and the laser coordinate system, the first transformation relationship is determined.
[0211] Optionally, in the first transformation relationship determination unit, the process of determining the coordinates of the laser center in the world coordinate system may specifically include:
[0212] Summing the laser installation height, the height of the horizontal platform, and the height coordinates of the horizontal platform in the world coordinate system, and using the summation result as the height coordinates of the laser center in the world coordinate system;
[0213] The coordinates of the laser center in the world coordinate system are used as variables to represent the distance between the laser center and the two first intersection points;
[0214] By establishing an equivalence between the distance between the laser center and the two first intersection points as represented in the world coordinate system and the actual distance between the laser center and the two first intersection points, the coordinates of the laser center in the world coordinate system are determined.
[0215] Optionally, in the intersection point coordinate determination unit, determining the coordinates of the first intersection point in the laser coordinate system includes:
[0216] The extracted point cloud data is clustered into N point sets. When the N point sets form a straight line, the coordinates of the corresponding intersection point in the laser coordinate system are determined based on the point cloud data in each point set. When the N point sets cannot form a straight line, the process returns to step a. Here, N is preset according to the reflective strip pattern.
[0217] To facilitate leveling of the laser scanning plane, optionally, Figure 7 The device shown may further include an adjustment output unit for determining and outputting an adjustment amount for laser leveling based on the roll and pitch angles of the laser coordinate system in the carrier coordinate system.
[0218] To verify the calibration results, optionally, Figure 7The device shown may further include a verification unit, used to detect, in the pose of the laser coordinate system in the carrier coordinate system, the first error between the coordinate value and the design value, the second error between the orientation angle and the orientation design value, the third error between the roll angle and 0, and the fourth error between the pitch angle and 0, after laser leveling is performed according to the adjustment amount and the input data extraction unit, the intersection coordinate determination unit, the first transformation relationship determination unit, the second transformation relationship determination unit, and the external parameter determination unit sequentially re-execute the corresponding processing, the first error between the coordinate value and the design value, the second error between the orientation angle and the design value, the third error between the roll angle and 0, and the fourth error between the pitch angle and 0, in the pose of the laser coordinate system in the carrier coordinate system; when the first error, the second error, the third error, and the fourth error meet the preset requirements, the calibration is determined to be successful; when any of the first error, the second error, the third error, and the fourth error does not meet the preset requirements, the calibration is determined to be unsuccessful.
[0219] Optionally, the structure of the lidar located on the carrier may include: multiple tray supports are provided on the carrier, a tray is placed on the tray supports, and the lidar is placed on the tray; the tray supports are used for lidar leveling.
[0220] In the adjustment output unit, the process of determining the adjustment amount used for laser leveling may specifically include:
[0221] Determine the coordinates of each support point in the pallet coordinate system; where the support point is the intersection between the pallet support and the pallet, and the z-axis of the pallet coordinate system is parallel to the z-axis of the laser coordinate system.
[0222] Based on the first transformation relationship and the coordinates of each support point in the pallet coordinate system, determine the coordinates of each support point in the world coordinate system.
[0223] The height coordinates of the set reference support point in the world coordinate system are used as the reference coordinates. The difference between the height coordinates of other support points in the world coordinate system and the reference coordinates is determined. The determined difference is output as the adjustment amount. The adjustment amount includes the adjustment value and the adjustment direction.
[0224] This application also provides a computer-readable storage medium that stores instructions, which, when executed by a processor, can perform the steps in the calibration method for a two-dimensional lidar as described above. In practical applications, the computer-readable medium may be included in the devices / apparatus / systems described in the above embodiments, or it may exist independently and not assembled into the device / apparatus / system. The instructions stored in the computer-readable storage medium, when executed by a processor, can perform the steps in the lidar calibration method as described above.
[0225] According to the embodiments disclosed in this application, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof, but not intended to limit the scope of protection of this application. In the embodiments disclosed in this application, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0226] Figure 8 An electronic device is also provided for this application. For example... Figure 8 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:
[0227] The electronic device may include a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, and a computer program stored in the memory and executable on the processor. When the program in the memory 802 is executed, a method for two-dimensional lidar calibration can be implemented.
[0228] Specifically, in practical applications, this electronic device may also include components such as a power supply 803 and an input / output unit 804. Those skilled in the art will understand that... Figure 8 The structure of the electronic device shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0229] The processor 801 is the control center of the electronic device. It connects various parts of the electronic device through various interfaces and lines. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 802 and calling data stored in the memory 802.
[0230] Memory 802 can be used to store software programs and modules, i.e., the aforementioned computer-readable storage medium. Processor 801 executes various functional applications and data processing by running the software programs and modules stored in memory 802. Memory 802 may mainly include a program storage area and a data storage area, wherein the program storage area may store the operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of the server, etc. In addition, memory 802 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 802 may also include a memory controller to provide processor 801 with access to memory 802.
[0231] The electronic device also includes a power supply 803 that supplies power to the various components. This power supply can be logically connected to the processor 801 via a power management system, enabling functions such as charging, discharging, and power consumption management. The power supply 803 may also include one or more DC or AC power supplies, a recharging system, a power fault detection circuit, a power converter or inverter, a power status indicator, or any other components.
[0232] The electronic device may also include an input / output unit 804, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, or optical signal inputs related to user settings and function control. The input unit output 804 can also be used to display information input by the user or information provided to the user, as well as various graphical user interfaces, which can be composed of graphics, text, icons, video, and any combination thereof.
[0233] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of calibrating a two-dimensional laser radar, characterized by, The lidar to be calibrated is located on a carrier placed on a horizontal platform. Reflective strips are provided on the vertical surface, and the pattern of these strips ensures that when the lidar scans towards the vertical surface, multiple first intersection points between the lidar's scanning plane and the reflective strips can uniquely determine the intersection line between the scanning plane and the vertical surface. The calibration method includes: a. Extract the point cloud data of the laser beam reflected back by the reflective strip after the lidar scans in the direction of the vertical plane, as well as the point cloud data of the intermediate laser beam reflected back; the intermediate laser beam is the 0-degree laser beam emitted by the lidar. b. Based on the extracted point cloud data, determine the coordinates of the plurality of first intersection points in the laser coordinate system and the coordinates of the second intersection point between the intermediate laser beam and the vertical plane in the laser coordinate system; wherein, the z-axis of the laser coordinate system is perpendicular to the laser radar scanning plane; c. Based on the coordinates of the plurality of first intersection points in the laser coordinate system, the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the second intersection point in the laser coordinate system, the laser installation height, the height of the horizontal platform surface, and the distance between the plurality of first intersection points and the laser center, determine the first transformation relationship between the laser coordinate system and the world coordinate system; wherein, the y-axis and z-axis of the world coordinate system are on the vertical plane; d. Based on the relationship between the carrier coordinate system and the platform coordinate system, and the relationship between the platform coordinate system and the world coordinate system, determine the second transformation relationship between the carrier coordinate system and the world coordinate system; e. Based on the first transformation relationship and the second transformation relationship, determine the pose of the laser coordinate system in the carrier coordinate system, as an external parameter for calibrating the lidar; Wherein, determining the first transformation relationship between the laser coordinate system and the world coordinate system includes: Based on the coordinates of the plurality of first intersection points in the laser coordinate system and the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the plurality of first intersection points in the world coordinate system are determined; Based on the coordinates of the plurality of first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, the distance between the plurality of first intersection points and the laser center, and the coordinates of the second intersection point and the plurality of first intersection points in the laser coordinate system, a first transformation relationship between the laser coordinate system and the world coordinate system is determined.
2. The method according to claim 1, characterized in that, The reflective strip pattern is: an "N" shape composed of three line segments, with the middle line segment and the other two line segments forming an angle of 90 degrees, or the remaining pattern after cutting off the two angles from the first pattern; there are three first intersection points.
3. The method of claim 2, wherein, Determining the coordinates of the plurality of first intersection points in the world coordinate system includes: Calculate the length of the line segment between the three first intersection points based on the coordinates of the three first intersection points in the laser coordinate system; The coordinates of the three first intersection points in the world coordinate system are used as variables to represent the relative positional relationship between the three first intersection points and the reflective strip pattern; Based on the line segment lengths between the three first intersection points and the relative positional relationship represented in the world coordinate system, the coordinate values of the three first intersection points in the world coordinate system are determined.
4. The method of claim 2, wherein, Based on the coordinates of the plurality of first intersection points in the world coordinate system, the laser installation height, the height of the platform surface, the actual distance between the plurality of first intersection points and the laser center, and the coordinates of the plurality of first intersection points in the laser coordinate system, a first transformation relationship between the laser coordinate system and the world coordinate system is determined, including: The laser center is taken as the origin of the laser coordinate system; Based on the coordinates of two of the three first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, and the actual distance between the two first intersection points and the laser center, the coordinates of the laser center in the world coordinate system are determined. Based on the distance between the second intersection point between the intermediate laser beam emitted by the lidar and the vertical plane and the laser center, the positional relationship between the second intersection point and the plurality of first intersection points, and the coordinates of the plurality of first intersection points in the world coordinate system and the laser coordinate system, the coordinates of the second intersection point in the world coordinate system are determined. The first transformation relationship is determined based on the coordinates of the second intersection point in the world coordinate system and the laser coordinate system, and the coordinates of the third first intersection point (excluding the two first intersection points) in the world coordinate system and the laser coordinate system.
5. The method according to claim 4, characterized in that, Determining the coordinates of the laser center in the world coordinate system includes: The laser installation height, the height of the water platform surface, and the height coordinates of the water platform surface in the world coordinate system are summed, and the summation result is used as the height coordinates of the laser center in the world coordinate system. The coordinates of the laser center in the world coordinate system are used as variables to represent the distance between the laser center and the two first intersection points; An equivalence relationship is established between the distance between the laser center and the two first intersection points as represented in the world coordinate system and the actual distance between the laser center and the two first intersection points, thereby determining the coordinates of the laser center in the world coordinate system.
6. The method according to any one of claims 1 to 5, characterized in that, Determining the coordinates of the plurality of first intersection points in the laser coordinate system includes: The extracted point cloud data is clustered into N point sets. When the N point sets form a straight line, the coordinates of the corresponding intersection point in the laser coordinate system are determined based on the point cloud data in each point set. When the N point sets cannot form a straight line, the process returns to step a. Here, N is preset according to the reflective strip pattern.
7. The method according to any one of claims 1 to 5, characterized in that, Following step e, the method further includes: Based on the roll and pitch angles of the laser coordinate system in the pose of the carrier coordinate system, the adjustment amount used for laser leveling is determined.
8. The method of claim 7, wherein, The structure of the lidar located on the carrier includes: multiple tray supports are set on the carrier, a tray is placed on the tray supports, and the lidar is placed on the tray; the tray supports are used for leveling the lidar. The determination of the adjustment amount used for laser leveling includes: Determine the coordinates of each support point in the pallet coordinate system; wherein, the support point is the intersection between the pallet support column and the pallet, and the z-axis direction of the pallet coordinate system is parallel to the z-axis direction of the laser coordinate system; Based on the first transformation relationship and the coordinates of each support point in the pallet coordinate system, determine the coordinates of each support point in the world coordinate system. The height coordinates of the set reference support point in the world coordinate system are used as the reference coordinates. The difference between the height coordinates of other support points in the world coordinate system and the reference coordinates is determined. The determined difference is output as the adjustment amount. The adjustment amount includes the adjustment value and the adjustment direction.
9. A calibration device for a two-dimensional lidar, characterized in that, The lidar to be calibrated is located on a carrier, which is placed on a horizontal platform. A reflective strip is provided on a vertical plane perpendicular to the horizontal platform. The pattern of the reflective strip ensures that when the lidar scans towards the vertical plane, multiple first intersection points between the lidar scanning plane and the reflective strip can uniquely determine the intersection line between the scanning plane and the vertical plane. The calibration device includes: an input data extraction unit, an intersection coordinate determination unit, a first transformation relationship determination unit, a second transformation relationship determination unit, and an external parameter determination unit; The input data extraction unit is used to extract the point cloud data of the laser beam reflected back by the reflective strip after the lidar scans the vertical plane, as well as the point cloud data of the intermediate laser beam reflected back; the intermediate laser beam is the 0-degree laser beam emitted by the lidar. The intersection point coordinate determination unit is used to determine the coordinates of the intersection point in the laser coordinate system and the coordinates of the second intersection point between the intermediate laser beam and the vertical plane in the laser coordinate system based on the extracted point cloud data; wherein, the z-axis of the laser coordinate system is perpendicular to the laser radar scanning plane; The first transformation relationship determination unit is used to determine a first transformation relationship between the laser coordinate system and the world coordinate system based on the coordinates of the plurality of first intersection points in the laser coordinate system, the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the second intersection point in the laser coordinate system, the laser installation height, the height of the horizontal platform surface, and the distance between the plurality of first intersection points and the laser center; wherein, the y-axis and z-axis of the world coordinate system are on the vertical plane; The second transformation relationship determination unit is used to determine a second transformation relationship between the carrier coordinate system and the world coordinate system based on the relationship between the carrier coordinate system and the platform coordinate system, and the relationship between the platform coordinate system and the world coordinate system; The extrinsic parameter determination unit is used to determine the pose of the laser coordinate system in the carrier coordinate system based on the first transformation relationship and the second transformation relationship, as an extrinsic parameter for calibrating the lidar; Wherein, in the first transformation relationship determination unit, determining the first transformation relationship between the laser coordinate system and the world coordinate system includes: Based on the coordinates of the plurality of first intersection points in the laser coordinate system and the positional relationship between the reflective strip and the intersection line determined by the plurality of first intersection points, the coordinates of the plurality of first intersection points in the world coordinate system are determined; Based on the coordinates of the plurality of first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, the distance between the plurality of first intersection points and the laser center, and the coordinates of the second intersection point and the plurality of first intersection points in the laser coordinate system, a first transformation relationship between the laser coordinate system and the world coordinate system is determined.
10. The apparatus according to claim 9, characterized in that, The reflective strip pattern is: an "N" shape composed of three line segments, wherein the middle line segment of the three line segments forms an angle of 90 degrees with the other two line segments, or a partial pattern of the first pattern; There are three first intersection points; In the first transformation relationship determination unit, determining the coordinates of the first intersection point in the world coordinate system includes: Calculate the length of the line segment between the three first intersection points based on the coordinates of the three first intersection points in the laser coordinate system; The coordinates of the three first intersection points in the world coordinate system are used as variables to represent the relative positional relationship between the three first intersection points and the reflective strip pattern; Based on the line segment lengths between the three first intersection points and the relative positional relationship represented in the world coordinate system, the coordinate values of the three first intersection points in the world coordinate system are determined. The determination of the first transformation relationship between the laser coordinate system and the world coordinate system based on the coordinates of the first intersection point in the world coordinate system, the laser installation height, the height of the platform surface, the actual distance between the intersection point and the laser center, and the coordinates of the first intersection point in the laser coordinate system includes: The laser center is taken as the origin of the laser coordinate system; Based on the coordinates of two of the three first intersection points in the world coordinate system, the laser installation height, the height of the horizontal platform, and the actual distance between the two first intersection points and the laser center, the coordinates of the laser center in the world coordinate system are determined. Based on the distance between the second intersection point between the intermediate laser beam emitted by the lidar and the vertical plane and the laser center, the positional relationship between the second intersection point and the plurality of first intersection points, and the coordinates of the plurality of first intersection points in the world coordinate system and the laser coordinate system, the coordinates of the second intersection point in the world coordinate system are determined. Based on the coordinates of the second intersection point in the world coordinate system and the laser coordinate system, and the coordinates of the other first intersection point (excluding the two first intersection points) among the three first intersection points in the world coordinate system and the laser coordinate system, the first transformation relationship is determined; In the first transformation relationship determination unit, determining the coordinates of the laser center in the world coordinate system includes: The laser installation height, the height of the water platform surface, and the height coordinates of the water platform surface in the world coordinate system are summed, and the summation result is used as the height coordinates of the laser center in the world coordinate system. The coordinates of the laser center in the world coordinate system are used as variables to represent the distance between the laser center and the two first intersection points; An equivalence relationship is established between the distance between the laser center and the two first intersection points as represented in the world coordinate system and the actual distance between the laser center and the two first intersection points, thereby determining the coordinates of the laser center in the world coordinate system.
11. The apparatus of claim 9 or 10, wherein, In the intersection point coordinate determination unit, determining the coordinates of the intersection point in the laser coordinate system includes: The extracted point cloud data is clustered into N point sets. When the N point sets form a straight line, the coordinates of the corresponding intersection point in the laser coordinate system are determined based on the point cloud data in each point set. When the N point sets cannot form a straight line, the process returns to step a. Here, N is preset according to the reflective strip pattern.
12. A computer readable storage medium having stored thereon computer instructions, wherein, When the instruction is executed by the processor, it can implement the calibration method of the two-dimensional lidar according to any one of claims 1 to 8.
13. An electronic device, comprising: The electronic device includes at least a computer-readable storage medium and a processor; The processor is configured to read executable instructions from the computer-readable storage medium and execute the instructions to implement the calibration method of the two-dimensional lidar according to any one of claims 1 to 8.
Citation Information
Patent Citations
Laser radar parameter calibration method and device
CN113466834A
Method and device for calibrating external parameters between laser radar and vehicle, and electronic equipment
CN114488093A
Vehicle-mounted radar automatic leveling device
CN209972335U