Calibration method of laser point cloud generation device and point cloud data generation method
By constructing the transformation relationship between the lidar and motor coordinate systems and using the transformation and translation matrices for calibration, the problem of point cloud accuracy caused by the deviation between the motor rotation axis and the lidar rotation center line was solved, and high-precision 3D point cloud data acquisition was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI SHUANGWEI NAVIGATION TECH CO LTD
- Filing Date
- 2023-06-28
- Publication Date
- 2026-04-24
AI Technical Summary
In existing technologies, there is a deviation between the rotation axis of the motor and the rotation center line of the lidar, which affects the accuracy of the three-dimensional point cloud acquired by the laser point cloud generation device.
By constructing the transformation relationship between the lidar coordinate system and the motor coordinate system, calibration is performed using the transformation matrix and translation matrix to obtain calibration parameters, generate coordinate transformation relationships, and correct point cloud data deviations caused by biases.
It improves the accuracy of the 3D point cloud acquired by the laser point cloud generation device, ensures the accuracy of coordinate transformation relationships, and corrects errors caused by the deviation between the motor rotation axis and the laser radar rotation center line.
Smart Images

Figure CN116719053B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of laser point cloud technology, and more specifically, to a calibration method for a laser point cloud generation device and a point cloud data generation method. Background Technology
[0002] A laser point cloud generation device is a point cloud generation system that uses emitted laser beams to detect the position of the target object's surface. It has advantages such as long ranging, high precision, and strong anti-interference ability, and is often used for acquiring three-dimensional point clouds in environmental space.
[0003] The laser point cloud generation device mainly consists of a lidar and a motor. When the laser point cloud generation device is working, the motor drives the lidar to rotate to acquire the three-dimensional point cloud of the environment. If there is a deviation between the rotation axis of the motor and the rotation center line of the lidar, the deviation will directly affect the accuracy of the three-dimensional point cloud acquired by the laser point cloud generation device. Summary of the Invention
[0004] The purpose of this application is to address the shortcomings of the prior art by providing a calibration method and a point cloud data generation method for a laser point cloud generation device, so as to solve the problem that when there is a deviation between the rotation axis of the motor and the rotation center line of the lidar, the accuracy of the three-dimensional point cloud acquired by the laser point cloud generation device will be affected.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, embodiments of this application provide a laser point cloud generation device, including: a lidar, a slip ring, a motor, and an encoder;
[0007] The lidar is connected to one end of the motor shaft via the slip ring. The motor and the encoder are separately configured, and the other end of the motor shaft is also connected to the encoder.
[0008] In one embodiment, the laser point cloud generation device further includes an inertial measurement unit, and the motor is fixedly connected to the inertial measurement unit.
[0009] In one embodiment, the laser point cloud generation device further includes an external positioning unit.
[0010] Secondly, embodiments of this application provide a calibration method for a laser point cloud generation device, wherein the laser point cloud generation device is the laser point cloud generation device described in the above embodiments, and the method includes:
[0011] The laser point cloud generation device acquires point cloud data of a preset scene in the laser radar coordinate system when the laser radar rotates driven by the motor.
[0012] Based on the preset transformation matrix and translation matrix, construct the transformation relationship between the lidar coordinate system and the motor coordinate system of the motor;
[0013] Based on the transformation relationship, construct the error equation of the point cloud data of the preset scene in the motor coordinate system;
[0014] Based on the point cloud data of the preset scene, the error equation is solved to obtain the calibration parameters corresponding to the transformation relationship;
[0015] Based on the calibration parameters corresponding to the transformation relationship, a coordinate transformation relationship between the lidar coordinate system and the motor coordinate system is generated.
[0016] In one embodiment, before solving the error equation based on the point cloud data of the preset scene to obtain the calibration parameters corresponding to the transformation relationship, the method further includes:
[0017] Based on the point cloud data of the preset scene and the preset angle range, determine the point cloud data corresponding to the two preset angle intervals;
[0018] The step of solving the error equation based on the point cloud data of the preset scene to obtain the calibration parameters corresponding to the transformation relationship includes:
[0019] Based on the point cloud data corresponding to the two preset angle intervals, the error equation is solved to obtain the calibration parameters corresponding to the transformation relationship.
[0020] In one embodiment, before generating the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship, the method further includes:
[0021] Based on the calibration parameters corresponding to the transformation relationship, the point cloud data of the preset scene is transformed from the lidar coordinate system to the motor coordinate system using the transformation relationship to obtain the transformed point cloud data.
[0022] Based on the converted point cloud data, the error parameters are calculated using the error equation.
[0023] The step of generating the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship includes:
[0024] If the error parameter is less than or equal to a preset error threshold, then a coordinate transformation relationship between the lidar coordinate system and the motor coordinate system is generated based on the calibration parameters corresponding to the transformation relationship.
[0025] In one embodiment, the method further includes:
[0026] If the error parameter is greater than the preset error threshold, the transformation relationship is reconstructed based on the calibration parameters until the error parameter obtained based on the reconstructed transformation relationship is less than or equal to the preset error threshold.
[0027] Thirdly, embodiments of this application provide a point cloud data generation method, including:
[0028] Acquire the initial point cloud data of the preset scene in the lidar coordinate system collected by the lidar in the lidar generator when the motor drives the lidar to rotate at a preset angle;
[0029] Using a preset coordinate transformation relationship, the initial point cloud data of the preset scene is transformed from the lidar coordinate system to the motor coordinate system at the preset angle to obtain the transformed point cloud data. The preset coordinate transformation relationship is obtained by calibrating the laser point cloud generation device using the calibration method of the laser point cloud generation device in the above embodiment.
[0030] Based on the target coordinate transformation relationship, the transformed point cloud data is transformed from the motor coordinate system at the preset angle to the lidar coordinate system to obtain the target point cloud data.
[0031] In one embodiment, if the laser point cloud generation device further includes: an inertial measurement unit; the method further includes:
[0032] Acquire measurement data of the preset scenario collected by the inertial measurement unit;
[0033] The target point cloud data is transformed from the lidar coordinate system to the inertial coordinate system of the inertial measurement unit to obtain the point cloud data in the transformed inertial coordinate system.
[0034] A preset spatial positioning algorithm is used to fuse the point cloud data in the transformed inertial coordinate system and the measurement data to obtain the three-dimensional point cloud data of the preset scene.
[0035] In one embodiment, if the laser point cloud generation device further includes: a positioning unit; the method further includes:
[0036] Acquire the positioning data of the laser point cloud generation device collected by the positioning unit;
[0037] The positioning data is transformed from the spatial coordinate system of the positioning unit to the inertial coordinate system to obtain the transformed positioning data;
[0038] Based on the converted positioning data, the spatial positioning algorithm is used to obtain the point cloud and movement trajectory of the laser point cloud generation device in the preset scene.
[0039] Fourthly, embodiments of this application also provide a calibration device for a laser point cloud generation device, wherein the laser point cloud generation device is the laser point cloud generation device described in the above embodiments, and the device includes:
[0040] The first acquisition module is used to acquire point cloud data of a preset scene in the laser radar coordinate system collected by the laser radar in the laser point cloud generation device when the motor drives the laser radar to rotate.
[0041] The transformation relationship construction module is used to construct the transformation relationship between the lidar coordinate system and the motor coordinate system of the motor according to the preset transformation matrix and translation matrix;
[0042] An error equation construction module is used to construct the error equation of the point cloud data of the preset scene in the motor coordinate system according to the transformation relationship.
[0043] The solution module is used to solve the error equation based on the point cloud data of the preset scene to obtain the calibration parameters corresponding to the transformation relationship;
[0044] The generation module is used to generate the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship.
[0045] Fifthly, embodiments of this application provide a point cloud data generation apparatus, comprising:
[0046] The second acquisition module is used to acquire the initial point cloud data of the preset scene in the laser radar coordinate system collected by the laser radar in the laser point cloud generation device when the motor drives the laser radar to rotate at a preset angle.
[0047] The conversion module is used to convert the initial point cloud data of the preset scene from the lidar coordinate system to the motor coordinate system at the preset angle using a preset coordinate conversion relationship, thereby obtaining the converted point cloud data. The preset coordinate conversion relationship is obtained by calibrating the laser point cloud generation device using the calibration method of the laser point cloud generation device described in the above embodiment. According to the target coordinate conversion relationship, the converted point cloud data is converted from the motor coordinate system at the preset angle to the lidar coordinate system to obtain the target point cloud data.
[0048] Sixthly, embodiments of this application also provide a computer device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the computer device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the calibration method or point cloud data generation method of the laser point cloud generation device as described in the above embodiments.
[0049] In a seventh aspect, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the calibration method or point cloud data generation method of the laser point cloud generation device as described in the above embodiments.
[0050] The beneficial effects of this application are as follows: This application provides a calibration method and a point cloud data generation method for a laser point cloud generation device. The calibration method includes: acquiring point cloud data of a preset scene in the laser radar coordinate system collected by the laser radar in the laser point cloud generation device when it is rotated by a motor; constructing a transformation relationship between the laser radar coordinate system and the motor coordinate system based on a preset transformation matrix and translation matrix; constructing an error equation for the point cloud data of the preset scene in the motor coordinate system based on the transformation relationship; solving the error equation based on the point cloud data of the preset scene to obtain calibration parameters corresponding to the transformation relationship; and generating a coordinate transformation relationship between the laser radar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship. The calibration method of this application can obtain the transformation relationship between the laser radar coordinate system and the motor coordinate system. Through this transformation relationship, the coordinate transformation relationship between the laser radar coordinate system and the motor coordinate system can be calculated. Using the coordinate transformation relationship, the deviation in the point cloud data of the preset scene caused by the deviation between the rotation axis of the motor and the rotation center line of the laser radar can be corrected. Attached Figure Description
[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0052] Figure 1 This is a schematic diagram of the structure of the laser point cloud generation device provided in the embodiments of this application;
[0053] Figure 2 A schematic flowchart illustrating the calibration method of a laser point cloud generation device provided in an embodiment of this application;
[0054] Figure 3 A schematic flowchart illustrating a method for obtaining point cloud data in two preset angle intervals according to an embodiment of this application;
[0055] Figure 4 This is a schematic flowchart of a method for ensuring the accuracy of coordinate transformation relationships according to an embodiment of this application;
[0056] Figure 5 A schematic flowchart of a point cloud data generation method provided in an embodiment of this application;
[0057] Figure 6(a) is a schematic diagram of point cloud data before calibration provided in an embodiment of this application;
[0058] Figure 6(b) is a schematic diagram of point cloud data after calibration according to an embodiment of this application;
[0059] Figure 7 This is one of the schematic diagrams of a method for optimizing target point cloud data provided in an embodiment of this application;
[0060] Figure 8 This is a second schematic diagram of a method for optimizing target point cloud data according to an embodiment of this application;
[0061] Figure 9 A schematic diagram of the structure of a calibration device for a laser point cloud generation apparatus provided in an embodiment of this application;
[0062] Figure 10 This is a schematic diagram of the structure of a point cloud data generation device provided in an embodiment of this application;
[0063] Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0064] Explanation of reference numerals in the attached diagram: 10, LiDAR; 20, Slip ring; 30, Motor; 40, Encoder; 50, Inertial Measurement Unit. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.
[0066] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0067] In the description of this application, it should be noted that if the terms "upper", "lower", etc. appear to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship that the product of this application is usually placed in, it is only for the convenience of describing this application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0068] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0069] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set" and "connection" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can be a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0070] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.
[0071] The laser point cloud generation device includes a lidar and a motor. The lidar has advantages such as long range, high precision, and strong anti-interference ability. Lidar is often used in mobile measurement to obtain the three-dimensional point cloud of the environment. When the lidar is working, the motor drives the lidar to rotate to obtain the three-dimensional point cloud of the environment. However, if there is a deviation between the rotation axis of the motor and the rotation center line of the lidar, this deviation will directly affect the accuracy of the three-dimensional point cloud of the environment finally obtained by the laser point cloud generation device.
[0072] Therefore, this application provides a calibration method for a laser point cloud generation device. This method can be used to correct the deviation between the rotation axis of the motor and the rotation center line of the lidar. It should be noted that this method can be generated by any computer device that integrates a calibration method generation algorithm for a laser point cloud generation device. The computer device can be, for example, a terminal-facing computer device or a back-end server.
[0073] The following, in conjunction with the accompanying drawings, provides specific examples illustrating the laser point cloud generation device, its calibration method, and the point cloud data generation method provided in this application.
[0074] First, the laser point cloud generation device provided in this application will be described. Figure 1 This is a schematic diagram of the structure of the laser point cloud generation device provided in the embodiments of this application, as shown below. Figure 1 As shown, the laser point cloud generation device includes: a lidar 10, a slip ring 20, a motor 30, and an encoder 40.
[0075] A lidar is a radar system that uses emitted laser beams to detect the surface position of a target; a motor is used to generate driving torque to rotate the lidar connected to it; an encoder is used to obtain the rotation angle of the lidar and the motor.
[0076] In this embodiment, as Figure 1 As shown, the lidar is connected to one end of the motor shaft via a slip ring. Ideally, the motor's rotation axis and the lidar's rotation center line are coaxial. Figure 1 The dashed line in the diagram represents the rotation axis of the motor and the rotation center line of the lidar. However, in actual operation, due to installation errors or other reasons, there may be an error between the rotation axis of the motor and the rotation center line of the lidar. This application aims to calibrate the accuracy deviation of the point cloud data caused by this error in the laser point cloud generation device; continue to refer to Figure 1 The motor and encoder are set separately, that is, the motor and encoder are not integrated, which can better balance the weight of the laser point cloud generation device, reduce the production cost of the laser point cloud generation device, and the other end of the motor shaft can be connected to the encoder.
[0077] In one embodiment, the laser point cloud generation device may further include an inertial measurement unit 50, which is a device for measuring the three-axis attitude angles (the three axes are the xyz axes in three-dimensional space), angular rate and acceleration of the laser point cloud generation device. The motor is also fixedly connected to the inertial measurement unit.
[0078] In one embodiment, the laser point cloud generating device may further include an external positioning unit, such as a GPS global positioning system, for positioning the laser point cloud generating device.
[0079] Based on the laser point cloud generation device provided in the above embodiments, this application provides a calibration method for the laser point cloud generation device, used to calibrate the accuracy of the environmental three-dimensional point cloud acquired by the laser point cloud generation device provided in the above embodiments.
[0080] Figure 2 This is a schematic flowchart of a calibration method for a laser point cloud generation device provided in an embodiment of this application, as shown below. Figure 2 As shown, the method includes:
[0081] S201. Obtain point cloud data of a preset scene in the laser radar coordinate system collected by the laser radar in the laser point cloud generation device when the motor drives the laser radar to rotate.
[0082] First, the method of this embodiment will be explained: The purpose of this embodiment is to obtain the transformation relationship between the lidar coordinate system and the motor coordinate system, and then generate the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system according to the transformation relationship, and calibrate the point cloud data obtained by the laser point cloud generation device through the coordinate transformation relationship.
[0083] However, the calculation of the specific values of each parameter in the transformation relationship requires the use of point cloud data collected by the laser point cloud generation device. Therefore, before starting to calculate the transformation relationship, this embodiment needs to first obtain the point cloud data collected by the laser point cloud generation device, and then calculate the specific values of each parameter in the transformation relationship based on the point cloud data.
[0084] In this embodiment, when the lidar in the laser point cloud generation device is rotated by the motor, it can collect point cloud data of a preset scene in the lidar coordinate system. The preset scene is any sampling scene determined according to actual sampling requirements. This embodiment does not impose any restrictions on the preset scene.
[0085] S202. Based on the preset transformation matrix and translation matrix, construct the transformation relationship between the lidar coordinate system and the motor coordinate system.
[0086] After acquiring the point cloud data collected by the laser point cloud generation device, it is also necessary to construct the transformation relationship between the laser radar coordinate system and the motor coordinate system. The parameters in this transformation relationship are preset initial values. After calculating the specific values of each parameter in the transformation relationship, the specific values are substituted into the transformation relationship to obtain the transformation relationship between the laser radar coordinate system and the motor coordinate system.
[0087] For example, the transformation between two coordinate systems is usually achieved by calculating the transformation matrix and translation matrix. In this embodiment, a preset transformation matrix can be constructed. Translation matrix And the rotation Euler angles in the preset transformation matrix The initial value is set to 0, and the initial value in the preset translation matrix is also set to 0. The transformation relationship between the lidar coordinate system and the motor coordinate system is constructed. The transformation relationship can be referred to in equation (1).
[0088] (1)
[0089] in, For example, it can represent a 4×4 transformation matrix. For example, it can represent a 3×3 rotation matrix. For example, it can represent a translation of 3 × 1. Assume time... The encoder records the motor angle as follows: At that moment Compared to The rotation matrix of the motor coordinate system is denoted as At that moment, the laser points obtained from the point cloud data of the preset scene will be... Coordinate transformation in the lidar coordinate system to coordinates in the motor coordinate system , can be represented as:
[0090] (2)
[0091] It should be noted that in equation (2) and The specific values of the parameters are preset initial values, which are obtained after calculation. and After obtaining the specific values of each parameter, substitute the specific values into equation (2) to obtain the transformation relationship between the lidar coordinate system and the motor coordinate system.
[0092] After constructing the transformation relationship between the lidar coordinate system and the motor coordinate system in this embodiment, the point cloud data of the preset scene in the acquired lidar coordinate system can be divided into two preset angle intervals, for example, divided into... Two parts, respectively denoted as and Substituting the point cloud data from the two preset angle intervals into the transformation relationship, we obtain... In the motor coordinate system, the point cloud data for two preset angle intervals are denoted as follows: and .
[0093] S203. Based on the transformation relationship, construct the error equation of the point cloud data of the preset scene in the motor coordinate system.
[0094] After constructing the transformation relationship (2) between the lidar coordinate system and the motor coordinate system, if it is necessary to solve for each parameter in the transformation relationship (2), it is also necessary to construct the point cloud data of the preset scene. The error equation in the motor coordinate system is used to solve for the parameters in the transformation relationship. Specifically, it can be described as follows:
[0095] First, a point cloud registration algorithm is used (the point cloud registration algorithm can be of any type, as long as the registration parameters can be calculated and the registration accuracy is guaranteed) to... and Registration was performed, and the registration parameters were calculated. and ,according to and and two preset angle ranges The point cloud data is used to construct the point cloud data for the preset scene. The error equation in the motor coordinate system, where, This refers to the rotation matrix between two preset angles. This refers to the error equation constructed from the translation matrix between two preset angles. See formula (3) for reference. The coordinates of each point cloud can be obtained by converting the point cloud data of two preset angle intervals according to equation (2).
[0096] (3)
[0097] This error equation is used to characterize and The error between them can be obtained by solving the error equation to get the specific values of the calibration parameters corresponding to the transformation relationship. The calibration parameters are the values of the transformation relationship. and The parameters in the equation, under ideal conditions, are the error equation. The value should be 0.
[0098] S204. Based on the point cloud data of the preset scene, solve the error equation to obtain the calibration parameters corresponding to the transformation relationship.
[0099] When the error equation is obtained Then, substituting equation (2) into equation (3) yields equation (4). Solving equation (4) will give the transformation relationship. and The parameters in the matrix, i.e., the rotation matrix Euler angles of rotation and translation matrix The specific values of the parameters.
[0100] (4)
[0101] S205. Based on the calibration parameters corresponding to the transformation relationship, generate the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system.
[0102] Once the calibration parameters corresponding to the transformation relationship are obtained, they can be substituted into the transformation relationship (2) to generate the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system at a preset angle. The preset angle refers to... The coordinate transformation relationship at the preset angle refers to the transformation of point cloud data in the lidar coordinate system to... Transformation matrix of the motor coordinate system.
[0103] In summary, the calibration method of this embodiment can obtain the transformation relationship between the lidar coordinate system and the motor coordinate system. Through this transformation relationship, the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system can be calculated. Using the coordinate transformation relationship, the deviation in the point cloud data of the preset scene caused by the deviation between the rotation axis of the motor and the rotation center line of the lidar can be corrected.
[0104] One embodiment of this application also provides a possible implementation for acquiring point cloud data between two preset angle intervals. Figure 3 This is a schematic flowchart illustrating a method for obtaining point cloud data of two preset angle intervals, provided in an embodiment of this application.
[0105] like Figure 3 As shown, before step S204, which involves solving the error equation based on the point cloud data of a preset scene to obtain the calibration parameters corresponding to the transformation relationship, the following may be included:
[0106] S301. Based on the point cloud data of the preset scene and the preset angle range, determine the point cloud data corresponding to the two preset angle intervals.
[0107] In this embodiment, the point cloud data of the preset scene in the collected lidar coordinate system can be calculated according to equations (5)-(7) to obtain the preset angle range, and then two preset angle intervals can be determined according to the preset angle range. Point cloud data.
[0108] (5)
[0109] (6)
[0110] (7)
[0111] in, and That is, the angle mapping and inverse mapping of each point cloud are calculated according to equations (5)-(6). After the mapping and inverse mapping are obtained, the mapping and inverse mapping are substituted into equation (7) to obtain the angle value of each point cloud in the point cloud data of the preset scene. For example, the angle value range of the point cloud data of the preset scene can be calculated. The time interval of the angle interval is and the angle value range Divided into two preset angle ranges .
[0112] In step S204 of the above embodiment, solving the error equation based on the point cloud data of the preset scene to obtain the calibration parameters corresponding to the transformation relationship may include:
[0113] S302. Based on the point cloud data corresponding to the two preset angle intervals, solve the error equation to obtain the calibration parameters corresponding to the transformation relationship.
[0114] Angle value range Divided into two preset angle ranges Then, the error equation (4) can be solved based on the point cloud data corresponding to the two preset angle intervals to obtain the calibration parameters corresponding to the transformation relationship.
[0115] One embodiment of this application provides a method to ensure the accuracy of the generated coordinate transformation relationship. Figure 4 This is a schematic flowchart illustrating a method for ensuring the accuracy of coordinate transformation relationships according to an embodiment of this application.
[0116] like Figure 4 As shown, before step S205 of the above embodiment generates the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship, the accuracy of the coordinate transformation relationship generated by the calibration method can be determined according to steps S401-S402:
[0117] S401. Based on the calibration parameters corresponding to the transformation relationship, the point cloud data of the preset scene is transformed from the lidar coordinate system to the motor coordinate system to obtain the transformed point cloud data.
[0118] After calculating the calibration parameters corresponding to the transformation relationship, the point cloud data of the preset scene is transformed from the lidar coordinate system to the motor coordinate system using the transformation relationship to obtain the transformed point cloud data. The accuracy of the coordinate transformation relationship is then verified using the transformed point cloud data.
[0119] S402. Based on the converted point cloud data, calculate the error parameters using the error equation.
[0120] To verify the accuracy of the coordinate transformation relationship using the transformed point cloud data, the transformed point cloud data needs to be substituted into the error equation to calculate the two preset angle intervals. The error parameters between them are used to determine the accuracy of the coordinate transformation relationship obtained in step S205.
[0121] In step S205, generating the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship may include:
[0122] S403. If the error parameter is less than or equal to the preset error threshold, then according to the calibration parameters corresponding to the transformation relationship, generate the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system at the preset angle.
[0123] If the error parameter calculated according to step S402 is less than or equal to the preset error threshold, then the coordinate transformation relationship obtained in step S205 can be determined to be accurate enough. Based on the calibration parameters corresponding to the transformation relationship, the transformation relationship, and the transformation matrix of the preset angle, the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system can be generated.
[0124] S404. If the error parameter is greater than the preset error threshold, the transformation relationship is reconstructed based on the calibration parameters until the error parameter obtained based on the reconstructed transformation relationship is less than or equal to the preset error threshold.
[0125] If the error parameter calculated according to step S402 is greater than the preset error threshold, the coordinate transformation relationship obtained in step S205 is considered inaccurate. The transformation relationship needs to be reconstructed according to the calibration parameters, and steps S401-S404 are repeated until the error parameter obtained based on the reconstructed transformation relationship is less than or equal to the preset error threshold.
[0126] In this embodiment, the preset error threshold can be set according to actual needs. As long as the error parameter is less than or equal to the preset error threshold, the obtained coordinate transformation relationship can be used to calibrate the deviation between the lidar coordinate system and the motor coordinate system.
[0127] In summary, this embodiment provides a method for verifying the accuracy of coordinate transformation relationships. By using the method provided in this embodiment, it can be ensured that the accuracy of the obtained coordinate transformation relationships meets the requirements, thus avoiding the waste of time and resources caused by having to reuse the coordinate transformation relationships due to insufficient accuracy.
[0128] Based on the calibration method of the laser point cloud generation device provided in the above embodiments, this application provides a point cloud data generation method in one embodiment. Figure 5This is a flowchart illustrating a point cloud data generation method provided in an embodiment of this application, as shown below. Figure 5 As shown, the method includes:
[0129] S501. Obtain the initial point cloud data of the preset scene in the laser radar coordinate system collected by the laser radar in the laser point cloud generation device when the motor drives the laser radar to rotate at a preset angle.
[0130] This embodiment provides a laser point cloud data generation method after calibrating the laser point cloud generation device using a calibration method for the laser point cloud generation device. Specifically, before generating the laser point cloud data, it is necessary to obtain the initial point cloud data of the preset scene in the laser radar coordinate system collected by the laser radar in the laser point cloud generation device when the motor drives it to rotate at a preset angle.
[0131] S502. Using a preset coordinate transformation relationship, the initial point cloud data of the preset scene is transformed from the lidar coordinate system to the motor coordinate system at a preset angle to obtain the transformed point cloud data.
[0132] The initial point cloud data is uncalibrated point cloud data. After obtaining the initial point cloud data according to step S501, a preset coordinate transformation relationship is required to transform the initial point cloud data of the preset scene from the lidar coordinate system to the motor coordinate system at a preset angle to obtain the transformed point cloud data and complete the calibration of the initial point cloud data.
[0133] S503. Based on the target coordinate transformation relationship, the transformed point cloud data is transformed from the motor coordinate system at the preset angle to the lidar coordinate system to obtain the target point cloud data.
[0134] After converting the initial point cloud data of the preset scene from the lidar coordinate system to the motor coordinate system at the preset angle, and calibrating the initial point cloud data based on the converted point cloud data, the converted point cloud data can be converted back to the lidar coordinate system to obtain the target point cloud data, which is convenient for subsequent calculations. The target point cloud conversion relationship can be found in Equation (8).
[0135] (8)
[0136] Equation (8) can be used to transform the converted point cloud data from the motor coordinate system to the lidar coordinate system. Since the preset coordinate transformation relationship is obtained by calibrating the lidar point cloud generation device using the calibration method of the lidar point cloud generation device described in the above embodiment, the preset angle is determined by the parameters in the calibration method of the lidar point cloud generation device. For example, the coordinate transformation relationship obtained in the calibration method of the lidar point cloud generation device is to transform the lidar coordinate system to the lidar coordinate system. In the motor coordinate system, equation (8) of this embodiment is used to convert the point cloud data from... Transform the motor coordinate system to the lidar coordinate system.
[0137] Figure 6(a) is a schematic diagram of point cloud data before calibration provided in an embodiment of this application, and Figure 6(b) is a schematic diagram of point cloud data after calibration provided in an embodiment of this application. As shown in Figure 6(a), if the point cloud data is not calibrated, the boundaries of objects in the three-dimensional point cloud data are blurred due to the deviation between the rotation axis of the motor and the rotation center line of the lidar. As shown in Figure 6(b), after the point cloud data is calibrated, the boundaries of objects in the three-dimensional point cloud data are clear.
[0138] In one embodiment, if the laser point cloud generation device further includes an inertial measurement unit, the measurement data of the inertial measurement unit can be merged with the target point cloud data to further optimize the target point cloud data.
[0139] Figure 7 This is one of the schematic diagrams of a method for optimizing target point cloud data provided in an embodiment of this application, such as... Figure 7 As shown, the point cloud data generation method may also include:
[0140] S701. Acquire measurement data of a preset scenario collected by the inertial measurement unit.
[0141] If the laser point cloud generation device also includes an inertial measurement unit, it can acquire the measurement data of the preset scene collected by the inertial measurement unit and merge the measurement data of the preset scene collected by the inertial measurement unit with the target point cloud data in step S503.
[0142] S702. Transform the target point cloud data from the lidar coordinate system to the inertial coordinate system of the inertial measurement unit to obtain the point cloud data in the transformed inertial coordinate system.
[0143] Specifically, the transformation relationship between the lidar coordinate system and the inertial navigation coordinate system can be calculated and obtained. This transformation relationship is used to transform the target point cloud data from the lidar coordinate system to the inertial coordinate system, resulting in point cloud data in the transformed inertial coordinate system.
[0144] S703. Using a preset spatial positioning algorithm, the point cloud data and measurement data in the transformed inertial coordinate system are fused to obtain the three-dimensional point cloud data of the preset scene.
[0145] After obtaining the point cloud data in the transformed inertial coordinate system, the point cloud data in the transformed inertial coordinate system is fused with the measurement data to obtain the fused data. For specific operations of data fusion, please refer to formula (9).
[0146] (9)
[0147] in, Indicates laser point Coordinates in the inertial navigation coordinate system , which represents the transformation matrix from the inertial navigation coordinate system to the lidar coordinate system.
[0148] In one embodiment, if the laser point cloud generation device further includes a positioning unit, the positioning data of the laser point cloud generation device collected by the positioning unit can be merged with the target point cloud data to further optimize the target point cloud data.
[0149] Figure 8 This is a second schematic diagram of a method for optimizing target point cloud data according to an embodiment of this application, as shown below. Figure 8 As shown, the point cloud data generation method may also include:
[0150] S801. Obtain the positioning data of the laser point cloud generation device collected by the positioning unit.
[0151] If the laser point cloud generation device also includes a positioning unit, the positioning data of the laser point cloud generation device collected by the positioning unit can be obtained, and the positioning data of the laser point cloud generation device collected by the positioning unit can be merged with the target point cloud data in step S503.
[0152] S802. Transform the positioning data from the spatial coordinate system of the positioning unit to the inertial coordinate system to obtain the transformed positioning data.
[0153] After obtaining the positioning data, the positioning data is transformed from the spatial coordinate system of the positioning unit to the inertial coordinate system to obtain the transformed positioning data. Specifically, this can be done by calculating and obtaining the transformation matrix from the spatial coordinate system of the positioning unit to the inertial coordinate system. Using a transformation matrix The positioning data is transformed from the spatial coordinate system of the positioning unit to the inertial coordinate system to obtain the transformed positioning data.
[0154] After obtaining the transformed positioning data, the transformed point cloud data in the inertial coordinate system is fused with the transformed positioning data to obtain the fused data. For specific operations of data fusion, please refer to formulas (10)-(11).
[0155] (10)
[0156] (11)
[0157] in, , Indicates laser point The coordinates in the spatial coordinate system; according to equation (12), they can be calculated. Coordinates in a spatial coordinate system.
[0158] S803. Based on the converted positioning data, a spatial positioning algorithm is used to obtain the movement trajectory of the laser point cloud generation device in the preset scene.
[0159] After fusing the converted point cloud data and the converted positioning data, a preset spatial positioning algorithm can be used to process the fused data to obtain the three-dimensional point cloud data of the preset scene. The obtained three-dimensional point cloud data of the preset scene includes the converted point cloud data and the converted positioning data.
[0160] The calibration device, point cloud data generation device, computer equipment, and storage medium for the laser point cloud generation device provided in any of the above embodiments of this application will be explained below. The specific implementation process and the resulting technical effects are the same as those in the corresponding method embodiments. For the sake of brevity, the parts not mentioned in the following embodiments can be referred to the corresponding content in the method embodiments.
[0161] This application also provides a calibration device for a laser point cloud generation apparatus, wherein the laser point cloud generation apparatus is the same as the one described in the above embodiments. Figure 9 This is a schematic diagram of the structure of the calibration device for a laser point cloud generation apparatus provided in an embodiment of this application, as shown below. Figure 9 As shown, the device includes:
[0162] The first acquisition module 901 is used to acquire point cloud data of a preset scene in the laser radar coordinate system collected by the laser radar in the laser point cloud generation device when the laser radar is rotated by the motor.
[0163] The transformation relationship construction module 902 is used to construct the transformation relationship between the lidar coordinate system and the motor coordinate system of the motor according to the preset transformation matrix and translation matrix.
[0164] Error equation construction module 903 is used to construct error equations for point cloud data of a preset scene in the motor coordinate system based on the transformation relationship.
[0165] The solver module 904 is used to solve the error equation based on the point cloud data of the preset scene to obtain the calibration parameters corresponding to the transformation relationship.
[0166] The generation module 905 is used to generate the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship.
[0167] In one possible example, the calibration device of the laser point cloud generation device further includes a determination module, which is used to determine the point cloud data corresponding to two preset angle intervals based on the point cloud data of the preset scene and the preset angle range.
[0168] The solver module 904 is also used to solve the error equation based on the point cloud data corresponding to the two preset angle intervals, and obtain the calibration parameters corresponding to the transformation relationship.
[0169] In one possible example, the calibration device of the laser point cloud generation device further includes a calculation module, which is used to transform the point cloud data of the preset scene from the lidar coordinate system to the motor coordinate system according to the calibration parameters corresponding to the transformation relationship, thereby obtaining the transformed point cloud data; and to calculate the error parameters based on the transformed point cloud data using an error equation.
[0170] The generation module 905 is also used to generate a coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship if the error parameter is less than or equal to a preset error threshold.
[0171] In one possible example, the generation module 905 is further configured to reconstruct the transformation relationship based on the calibration parameters if the error parameter is greater than a preset error threshold, until the error parameter obtained based on the reconstructed transformation relationship is less than or equal to the preset error threshold.
[0172] This application provides a point cloud data generation device. Figure 10 This is a schematic diagram of the structure of a point cloud data generation device provided in an embodiment of this application, as shown below. Figure 10 As shown, the point cloud data generation device includes:
[0173] The second acquisition module 101 is used to acquire the initial point cloud data of the preset scene in the laser radar coordinate system collected by the laser radar in the laser point cloud generation device when the motor drives the laser radar to rotate at a preset angle.
[0174] The conversion module 102 is used to convert the initial point cloud data of the preset scene from the lidar coordinate system to the motor coordinate system at a preset angle using a preset coordinate conversion relationship, thereby obtaining the converted point cloud data. The preset coordinate conversion relationship is obtained by calibrating the laser point cloud generation device using the calibration method of the laser point cloud generation device in the above embodiment. According to the target coordinate conversion relationship, the converted point cloud data is converted from the motor coordinate system at the preset angle to the lidar coordinate system to obtain the target point cloud data.
[0175] In one possible example, the second acquisition module 101 is also used to acquire measurement data of a preset scenario collected by the inertial measurement unit.
[0176] The conversion module 102 is also used to convert the target point cloud data from the lidar coordinate system to the inertial coordinate system of the inertial measurement unit, so as to obtain the point cloud data in the converted inertial coordinate system; and to use a preset spatial positioning algorithm to fuse the point cloud data in the converted inertial coordinate system and the measurement data to obtain the three-dimensional point cloud data of the preset scene.
[0177] In one possible example, the second acquisition module 101 is also used to acquire the positioning data of the laser point cloud generation device collected by the positioning unit.
[0178] The conversion module 102 is also used to convert the positioning data from the spatial coordinate system of the positioning unit to the inertial coordinate system to obtain the converted positioning data; based on the converted positioning data, a spatial positioning algorithm is used to obtain the movement trajectory of the laser point cloud generation device in the preset scene.
[0179] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0180] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0181] This application also provides a computer device. Figure 11 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application, as shown below. Figure 11 As shown, the computer device includes a processor 100, a storage medium 200, and a bus 300. The storage medium stores program instructions executable by the processor. When the computer device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the calibration method or point cloud data generation method of the laser point cloud generation device as described in the above embodiments.
[0182] An embodiment of this application also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the steps of the calibration method or point cloud data generation method of the laser point cloud generation apparatus as described above.
[0183] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0184] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0185] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0186] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0187] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A calibration method for a laser point cloud generation device, characterized in that, The laser point cloud generation device includes: a lidar, a slip ring, a motor, and an encoder; the lidar is connected to one end of the motor shaft via the slip ring, the motor and the encoder are separately configured, and the other end of the motor shaft is also connected to the encoder; the method includes: The laser point cloud generation device acquires point cloud data of a preset scene in the laser radar coordinate system when the laser radar rotates driven by the motor. Based on the preset transformation matrix and translation matrix, construct the transformation relationship between the lidar coordinate system and the motor coordinate system of the motor; Based on the transformation relationship, construct the error equation of the point cloud data of the preset scene in the motor coordinate system; Based on the point cloud data of the preset scene, the error equation is solved to obtain the calibration parameters corresponding to the transformation relationship; Based on the calibration parameters corresponding to the transformation relationship, a coordinate transformation relationship between the lidar coordinate system and the motor coordinate system is generated.
2. The method according to claim 1, characterized in that, Before solving the error equation based on the point cloud data of the preset scene to obtain the calibration parameters corresponding to the transformation relationship, the method further includes: Based on the point cloud data of the preset scene and the preset angle range, determine the point cloud data corresponding to the two preset angle intervals; The step of solving the error equation based on the point cloud data of the preset scene to obtain the calibration parameters corresponding to the transformation relationship includes: Based on the point cloud data corresponding to the two preset angle intervals, the error equation is solved to obtain the calibration parameters corresponding to the transformation relationship.
3. The method according to claim 1, characterized in that, Before generating the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship, the method further includes: Based on the calibration parameters corresponding to the transformation relationship, the point cloud data of the preset scene is transformed from the lidar coordinate system to the motor coordinate system using the transformation relationship to obtain the transformed point cloud data. Based on the converted point cloud data, the error parameters are calculated using the error equation. The step of generating the coordinate transformation relationship between the lidar coordinate system and the motor coordinate system based on the calibration parameters corresponding to the transformation relationship includes: If the error parameter is less than or equal to a preset error threshold, then a coordinate transformation relationship between the lidar coordinate system and the motor coordinate system is generated based on the calibration parameters corresponding to the transformation relationship.
4. The method according to claim 3, characterized in that, The method further includes: If the error parameter is greater than the preset error threshold, the transformation relationship is reconstructed based on the calibration parameters until the error parameter obtained based on the reconstructed transformation relationship is less than or equal to the preset error threshold.
5. A method for generating point cloud data, characterized in that, include: Acquire the initial point cloud data of the preset scene in the lidar coordinate system collected by the lidar in the lidar generator when the motor drives the lidar to rotate at a preset angle; Using a preset coordinate transformation relationship, the initial point cloud data of the preset scene is transformed from the lidar coordinate system to the motor coordinate system at the preset angle to obtain the transformed point cloud data; wherein, the preset coordinate transformation relationship is obtained by calibrating the laser point cloud generation device using the calibration method of the laser point cloud generation device described in claim 1. Based on the target coordinate transformation relationship, the transformed point cloud data is transformed from the motor coordinate system at the preset angle to the lidar coordinate system to obtain the target point cloud data.
6. The method according to claim 5, characterized in that, If the laser point cloud generation device further includes: an inertial measurement unit, and the motor is fixedly connected to the inertial measurement unit; the method further includes: Acquire measurement data of the preset scenario collected by the inertial measurement unit; The target point cloud data is transformed from the lidar coordinate system to the inertial coordinate system of the inertial measurement unit to obtain the point cloud data in the transformed inertial coordinate system. A preset spatial positioning algorithm is used to fuse the point cloud data in the transformed inertial coordinate system and the measurement data to obtain the three-dimensional point cloud data of the preset scene.
7. The method according to claim 6, characterized in that, If the laser point cloud generation device further includes a positioning unit; the method further includes: Acquire the positioning data of the laser point cloud generation device collected by the positioning unit; The positioning data is transformed from the spatial coordinate system of the positioning unit to the inertial coordinate system to obtain the transformed positioning data; Based on the converted positioning data, the spatial positioning algorithm is used to obtain the movement trajectory of the laser point cloud generation device in the preset scene.
Citation Information
Patent Citations
Panoramic three-dimensional inspection system
CN116243275A