Point cloud matching method and apparatus for rotary laser radar, and electronic device
By performing coordinate transformation, downsampling, and pose iteration optimization on the point cloud data of rotating lidar, the accuracy and reliability issues of point cloud matching for rotating lidar were solved, achieving a more efficient point cloud matching effect.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- CCTEG COAL MINING RES INST
- Filing Date
- 2025-12-10
- Publication Date
- 2026-07-02
Smart Images

Figure CN2025141609_02072026_PF_FP_ABST
Abstract
Description
Point cloud matching methods, devices and electronic equipment for rotating lidar
[0001] Cross-references to related applications
[0002] This application is based on and claims priority to Chinese Patent Application No. 202411931337.4, filed on December 26, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure relates to the field of point cloud matching technology, and in particular to a point cloud matching method, apparatus and electronic device for a rotating lidar. Background Technology
[0004] In related technologies, point cloud matching for rotating lidar is often determined by conventional point cloud matching methods. However, the above methods cannot accurately and reliably obtain the point cloud matching results of rotating lidar. How to accurately and reliably obtain the point cloud matching results of rotating lidar has become an urgent problem to be solved. Summary of the Invention
[0005] The purpose of this disclosure is to at least partially address one of the technical problems in the aforementioned technologies.
[0006] The first aspect of this disclosure provides a point cloud matching method for a rotating lidar, comprising: acquiring point cloud data carrying a first timestamp based on the lidar, and acquiring a rotation angle carrying a second timestamp output by a motor, wherein the lidar and the motor are fixedly connected by a mechanical structure; performing coordinate transformation on the point cloud data according to the rotation angle to obtain first point cloud data; acquiring the downsampling size of the first point cloud data, and performing downsampling processing on the first point cloud data according to the downsampling size to obtain second point cloud data; acquiring an initial update step size for iterating the initial pose of two adjacent frames of point cloud data in the second point cloud data; optimizing the initial update step size to obtain a target update step size, and iterating the initial pose according to the target update step size to obtain the target pose of the two adjacent frames of point cloud data.
[0007] A second aspect of this disclosure provides a point cloud matching device for a rotating lidar, comprising: a first acquisition module, configured to acquire point cloud data carrying a first timestamp based on the lidar, and acquire a rotation angle carrying a second timestamp output by a motor, wherein the lidar and the motor are fixedly connected by a mechanical structure; a conversion module, configured to perform coordinate transformation on the point cloud data according to the rotation angle to obtain first point cloud data; a downsampling module, configured to acquire the downsampling size of the first point cloud data, and perform downsampling processing on the first point cloud data according to the downsampling size to obtain second point cloud data; a second acquisition module, configured to acquire an initial update step size for iterating the initial pose of two adjacent frames of point cloud data in the second point cloud data; and a third acquisition module, configured to optimize the initial update step size to obtain a target update step size, and iterate the initial pose according to the target update step size to obtain the target pose of the two adjacent frames of point cloud data.
[0008] A third aspect of this disclosure provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores executable program code or instructions that can be executed by the at least one processor, the executable program code or instructions being executed by the at least one processor to enable the at least one processor to execute the point cloud matching method of the rotating lidar provided in the first aspect of this disclosure.
[0009] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the point cloud matching method of the rotating lidar provided in the first aspect of this disclosure.
[0010] A fifth aspect of this disclosure provides a computer program product that, when executed by a processor, implements the point cloud matching method for a rotating lidar provided in the first aspect of this disclosure.
[0011] A sixth aspect of this disclosure provides a computer program including computer-readable code that, when run on a computer device, implements the point cloud matching method for a rotating lidar provided in the first aspect of this disclosure.
[0012] Additional aspects and advantages of this disclosure will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this disclosure. Attached Figure Description
[0013] The above and / or additional aspects and advantages of this disclosure will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, in which:
[0014] Figure 1 is a schematic flowchart of a point cloud matching method for a rotating lidar according to an embodiment of the present disclosure.
[0015] Figure 2 is a schematic diagram of a lidar and a motor according to an embodiment of the present disclosure;
[0016] Figure 3 is a flowchart illustrating a point cloud matching method for a rotating lidar according to another embodiment of this disclosure.
[0017] Figure 4 is a schematic diagram of the structure of a point cloud matching device for a rotating lidar according to an embodiment of the present disclosure.
[0018] Figure 5 is a block diagram of an electronic device according to an embodiment of the present disclosure. Detailed Implementation
[0019] Embodiments of this disclosure are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0020] The following description, with reference to the accompanying drawings, describes a point cloud matching method, apparatus, electronic device, and medium for a rotating lidar according to embodiments of the present disclosure.
[0021] Figure 1 is a schematic flowchart of a point cloud matching method for a rotating lidar according to an embodiment of the present disclosure. As shown in Figure 1, the method includes the following steps S101 to S105.
[0022] S101, based on the lidar, acquires point cloud data carrying a first timestamp, and acquires the rotation angle output by the motor carrying a second timestamp, wherein the lidar and the motor are fixedly connected by a mechanical structure.
[0023] For example, as shown in Figure 2, the lidar and the motor are fixedly connected by a mechanical structure. The lidar's coordinate system is set to right-front-up by default, that is, the X-axis is to the right, the Y-axis is forward, and the Z-axis is up. The mechanical structure ensures that the rotation axis of the motor is consistent with the Y-axis of the lidar, and the extension line of the rotation axis passes through the origin of the lidar's coordinate system. The motor can drive the lidar to perform rotational scanning. Based on the point cloud data with the first timestamp acquired by the lidar, the motor can output the rotation angle with the second timestamp in real time.
[0024] S102, based on the rotation angle, perform coordinate transformation on the point cloud data to obtain the first point cloud data.
[0025] In an embodiment of the present disclosure, the initial angle output by the motor in a stationary state can be obtained. According to the first timestamp, the second timestamp, and the rotation angle, the target rotation angle of the motor corresponding to each frame of point cloud data is obtained. According to the initial angle and the target rotation angle, the rotation angle change amount of each frame of point cloud data is determined. Based on the rotation angle change amount, coordinate transformation is performed on each frame of point cloud data to obtain the first point cloud data.
[0026] It should be noted that when the lidar horizontal plane is kept substantially parallel to the ground in a stationary state, the lidar and the motor are powered on, but the motor is kept from rotating. In this case, the initial angle k0 output by the motor in the stationary state is obtained.
[0027] In some embodiments, an interpolation algorithm can be used to obtain the target rotation angle of the motor corresponding to each frame of point cloud data according to the first timestamp, the second timestamp, and the rotation angle.
[0028] For example, for the m-th frame of point cloud data in the point cloud data, the first timestamp t p of the m-th frame of point cloud data is used to obtain the timestamp t1 and timestamp t2 closest to the first timestamp from the second timestamp, and t1 < t p < t2. When the rotation angle corresponding to the timestamp t1 is k1 and the rotation angle corresponding to the timestamp t2 is k2, the target rotation angle k p of the motor corresponding to the m-th frame of point cloud data is k1+(k2 - k1)×(t p - t1)÷(t2 - t1). By repeating the above steps, the target rotation angle of the motor corresponding to each frame of point cloud data is obtained.
[0029] In an embodiment of the present disclosure, after obtaining the initial angle and the target rotation angle, the rotation angle change amount of each frame of point cloud data can be determined according to the initial angle and the target rotation angle.
[0030] For example, for the m-th frame of point cloud data in the point cloud data, when the initial angle is k0 and the target rotation angle is k p , if the motor rotates in the clockwise direction, the rotation angle change amount dk of the m-th frame of point cloud data is +|k p- - k0|, if the motor rotates in the counterclockwise direction, the rotation angle change amount dk of the m-th frame of point cloud data is -|k p- - k0|; by repeating the above steps, the rotation angle change amount of each frame of point cloud data is determined.
[0031] In an embodiment of the present disclosure, after obtaining the rotation angle change amount, coordinate transformation can be performed on each frame of point cloud data based on the rotation angle change amount to obtain the first point cloud data.
[0032] It should be noted that since the rotation axis of the motor is consistent with the Y-axis of the lidar, and the extension of the rotation axis passes through the origin of the lidar's coordinate system, only one rotation transformation is needed to perform coordinate transformation on each frame of point cloud data. If the three-dimensional coordinates of the point cloud data before the coordinate transformation are (a, b, c), and if the rotation angle change is dk, then the x-coordinate of the point cloud data after the coordinate transformation is c×cos(90°-dk)-a×sin(dk), the y-coordinate remains unchanged at b, and the z-coordinate is c×sin(90°-dk)+a×cos(dk).
[0033] S103, obtain the downsampling size of the first point cloud data, and perform downsampling processing on the first point cloud data according to the downsampling size to obtain the second point cloud data.
[0034] In this embodiment of the disclosure, for the i-th frame point cloud data in the first point cloud data, the first average depth of the i-th frame point cloud data and the second average depth of the (i-1)-th frame point cloud data are obtained. Based on the first average depth and the second average depth, the target fusion depth of the i-th frame point cloud data is determined. Based on the target fusion depth, the downsampling size of the i-th frame point cloud data is determined.
[0035] For example, the target fusion depth of the point cloud data in the i-th frame can be determined using the following formula: De = 0.2 × D_last + 0.8 × D_curr
[0036] Where De is the target fusion depth of the point cloud data in frame i, D_last is the second average depth of the point cloud data in frame i-1, and D_curr is the first average depth of the point cloud data in frame i. Here, i is an integer greater than 1 and less than or equal to N, and N is the total number of frames of point cloud data in the first point cloud data set.
[0037] In this embodiment of the disclosure, after obtaining the target fusion depth, the downsampling size of the i-th frame point cloud data can be determined based on the target fusion depth.
[0038] In some embodiments, a pre-built mapping table between fusion depth and downsampling size can be obtained, and the downsampling size of the i-th frame point cloud data can be determined by querying the mapping table based on the target fusion depth.
[0039] In some embodiments, a mapping relationship between fusion depth and downsampling size can be obtained. For example: when the target fusion depth De is less than 0.5m, the downsampling size S_curr is 0.03m; when the target fusion depth De is in the interval [0.5m, 1m], the downsampling size S_curr is 0.05m; when the target fusion depth De is in the interval [1m, 2m], the downsampling size S_curr is 0.1m; when the target fusion depth De is in the interval [2m, 4m], the downsampling size S_curr is 0.2m; when the target fusion depth De is in the interval [4m, 8m], the downsampling size S_curr is 0.4m; when the target fusion depth De is greater than 8m, the downsampling size S_curr is 1m; and a mapping relationship table between fusion depth and downsampling size can be constructed according to the mapping relationship.
[0040] For example, when the target fusion depth De of the i-th frame point cloud data is 1.5, that is, when the target fusion depth De is in the interval [1m, 2m], the downsampling size S_curr of the i-th frame point cloud data is determined to be 0.1m by querying the mapping table. By repeating the above steps, the downsampling size of each frame point cloud data in the first point cloud data can be obtained.
[0041] In this embodiment of the disclosure, after obtaining the downsampling size of each frame of point cloud data in the first point cloud data, an adaptive downsampling size is set to achieve adaptability to various situations, thereby improving the flexibility of downsampling processing. The downsampling processing is performed on each frame of point cloud data in the first point cloud data according to the downsampling size to obtain the second point cloud data.
[0042] S104, obtain the initial update step size for iterating the initial pose of two adjacent frames of point cloud data in the second point cloud data.
[0043] It should be noted that since the lidar acquires sparse point clouds, and the data is rotated and downsampled, the amount of data in the second point cloud is relatively small. Therefore, the second point cloud data can be directly used as feature points without separate feature extraction.
[0044] In this embodiment of the disclosure, feature matching can be performed on the second point cloud data to obtain the initial pose of two adjacent frames of point cloud data in the second point cloud data. Since the initial pose is often not accurate enough, in order to obtain a more accurate pose, the pose can be iteratively optimized. During the iterative optimization process, the initial update step size for iterating the initial pose can be obtained.
[0045] In some embodiments, the Jacobian matrix and the gradient of the objective function at the initial pose can be calculated, a system of linear equations can be constructed using the Gauss-Newton method or the Levenberg-Marquardt method, and the system of linear equations can be solved to obtain the initial update step size.
[0046] S105, optimize the initial update step size to obtain the target update step size, and iterate the initial pose according to the target update step size to obtain the target pose of two adjacent frames of point cloud data.
[0047] In this embodiment of the disclosure, in order to improve the accuracy of the point cloud data matching process, the initial update step size can be optimized to obtain the target update step size. The initial pose is iterated according to the target update step size to obtain the target pose of two adjacent frames of point cloud data.
[0048] In some embodiments, a six-degree-of-freedom matrix can be determined based on the product of the Jacobian matrix and the transpose of the Jacobian matrix, the eigenvalues and eigenvalue thresholds of the six-degree-of-freedom matrix can be obtained, and the initial update step size can be optimized based on the eigenvalues and eigenvalue thresholds to obtain the target update step size.
[0049] In this embodiment of the disclosure, after obtaining the target update step size, the initial pose can be iterated. After each iteration, it is determined whether the convergence condition is met. If the convergence condition is met, the pose of the last iteration is used as the target pose of the two adjacent frames of point cloud data. If the convergence condition is not met, the Jacobian matrix, six-degree-of-freedom matrix, eigenvalue and update step size processes are repeated, and the iteration process is repeated, that is, S105 is repeated, until the convergence condition is met, and the pose of the last iteration is used as the target pose of the two adjacent frames of point cloud data.
[0050] This disclosure proposes a point cloud matching method for a rotating lidar. It acquires point cloud data carrying a first timestamp based on the lidar and obtains a rotation angle output by a motor carrying a second timestamp. The lidar and motor are mechanically connected. Based on the rotation angle, coordinate transformation is performed on the point cloud data to obtain first point cloud data. The downsampling size of the first point cloud data is obtained, and downsampling processing is performed on the first point cloud data according to the downsampling size to obtain second point cloud data. An initial update step size is obtained to iterate the initial pose of two adjacent frames of point cloud data in the second point cloud data. The initial update step size is optimized to obtain a target update step size. The initial pose is iterated according to the target update step size to obtain the target pose of two adjacent frames of point cloud data. Therefore, this disclosure effectively improves the sensing range and point cloud data density of the lidar, reduces the point cloud data acquisition cost, and improves the point cloud matching process, resulting in a point cloud matching method suitable for rotating lidar, thus improving the accuracy and reliability of the point cloud matching results of the rotating lidar.
[0051] Figure 3 is a flowchart illustrating a point cloud matching method for a rotating lidar according to an embodiment of this disclosure. As shown in Figure 3, the method includes:
[0052] S301 acquires point cloud data carrying a first timestamp based on lidar, and acquires the rotation angle output by the motor carrying a second timestamp, wherein the lidar and the motor are fixedly connected by a mechanical structure.
[0053] S302, based on the rotation angle, perform coordinate transformation on the point cloud data to obtain the first point cloud data.
[0054] S303: Obtain the downsampling size of the first point cloud data, and perform downsampling processing on the first point cloud data according to the downsampling size to obtain the second point cloud data.
[0055] S304, obtain the initial update step size for iterating the initial pose of two adjacent frames of point cloud data in the second point cloud data.
[0056] For details regarding steps S301-S304, please refer to the above embodiments; they will not be repeated here.
[0057] S305. Determine the six-degree-of-freedom matrix based on the product of the Jacobian matrix and its transpose.
[0058] For example, if the Jacobian matrix calculated during the second point cloud data matching process is J, then the six-degree-of-freedom matrix A = J. T *J. Where A is a six-degree-of-freedom matrix, J is a Jacobian matrix, and JB is a Jacobian matrix. T This is the transpose of the Jacobi matrix, where the six-degree-of-freedom matrix consists of three degrees of freedom for translation (x, y, z) and three degrees of freedom for rotation (roll, pitch, yaw). The six-degree-of-freedom matrix is a 6x6 matrix.
[0059] S306, obtain the eigenvalues and eigenvalue thresholds of a six-degree-of-freedom matrix.
[0060] It should be noted that each eigenvalue corresponds to a degree of freedom. For example, the first column of the Jacobi matrix is obtained by taking the partial derivative with respect to x. Therefore, the first eigenvalue of the six-degree-of-freedom matrix A corresponds to the degree of freedom in the x-direction, and so on.
[0061] In some embodiments, the six-degree-of-freedom matrix can be decomposed to obtain the eigenvalues of the six-degree-of-freedom matrix.
[0062] In this embodiment of the disclosure, a preset initial feature value threshold is obtained. Since the motor rotation is introduced, the feature value threshold is related to the rotation angle of the motor. In response to the motor being stationary, the preset initial feature value threshold is used as the feature value threshold. In response to the motor being rotating, an adjustment factor for the initial feature value threshold is determined according to the change in rotation angle. The initial feature value threshold is adjusted according to the adjustment factor to obtain the feature value threshold.
[0063] It should be noted that this disclosure does not limit the setting of the initial feature value threshold. For example, the initial feature value threshold can be set to 100.
[0064] For example, when the motor is stationary, the eigenvalue threshold Th can be 100.
[0065] In some embodiments, the cosine value of the change in rotation angle can be obtained, and the adjustment factor of the initial feature value threshold can be determined based on the absolute value of the cosine value, that is, the adjustment factor is |cos(dk)|.
[0066] For example, if the initial eigenvalue threshold is 100, the product of the adjustment factor and the initial eigenvalue threshold can be obtained to get the eigenvalue threshold Th as |cos(dk)|×100, that is, different rotation angle changes have a corresponding eigenvalue threshold.
[0067] S307, optimize the initial update step size based on the eigenvalues and eigenvalue thresholds to obtain the target update step size.
[0068] It should be noted that in engineering applications, the magnitude of the eigenvalues of the six-degree-of-freedom matrix is related to whether there are enough constraints in that direction for the current optimization iteration. In other words, the magnitude of the eigenvalues of the six-degree-of-freedom matrix represents the quality of the optimization iteration. The larger the eigenvalues of the six-degree-of-freedom matrix, the better the optimization iteration effect.
[0069] It should be noted that when the eigenvalue corresponding to any degree of freedom is greater than or equal to the corresponding eigenvalue threshold, the optimization in that degree of freedom is trusted; when the eigenvalue corresponding to any degree of freedom is less than the corresponding eigenvalue threshold, the optimization in that degree of freedom is not trusted.
[0070] In this embodiment, the eigenvalue of each degree of freedom is compared with the corresponding eigenvalue threshold to obtain the target degree of freedom whose eigenvalue is less than the eigenvalue threshold. The element value corresponding to the target degree of freedom in the initial update step size is set as the target value, thereby obtaining the target update step size. The target update step size can be composed of the target value corresponding to the target degree of freedom and the element values corresponding to the other degrees of freedom besides the target degree of freedom.
[0071] It should be noted that this disclosure does not limit the setting of the target value; for example, the target value can be set to 0.
[0072] For example, with a target value of 0, when the initial update step size dX = (dx, dy, dz, droll, dpitch, dyaw), the eigenvalue of each degree of freedom is compared with the corresponding eigenvalue threshold. If only the eigenvalue corresponding to the y degree of freedom is less than the eigenvalue threshold Th, then the optimization of the y degree of freedom in this iteration is considered to have failed. The dy value in the initial update step size dX is set to 0, and the values of the remaining degrees of freedom remain unchanged, thus obtaining the target update step size.
[0073] S308, according to the target update step size, iterate the initial pose to obtain the target pose of two adjacent frames of point cloud data.
[0074] In this embodiment of the disclosure, the initial pose can be iterated according to the target update step size until the convergence condition is met, so as to obtain the target pose of two adjacent frames of point cloud data.
[0075] This disclosure proposes a point cloud matching method for a rotating lidar. The method acquires point cloud data carrying a first timestamp based on the lidar and obtains the rotation angle output by a motor carrying a second timestamp. The lidar and motor are mechanically connected. Based on the rotation angle, coordinate transformation is performed on the point cloud data to obtain first point cloud data. The downsampling size of the first point cloud data is obtained. Downsampling processing is then performed on the first point cloud data according to the downsampling size to obtain second point cloud data. The initial update step size for iterating the initial pose of two adjacent frames of point cloud data in the second point cloud data is obtained. The six self-propagation parameters are determined based on the product of the Jacobian matrix and its transpose. By using the degree matrix, the eigenvalues and eigenvalue thresholds of the six-degree-of-freedom matrix are obtained. Based on the eigenvalues and eigenvalue thresholds, the initial update step size is optimized to obtain the target update step size. According to the target update step size, the initial pose is iterated to obtain the target pose of two adjacent frames of point cloud data. Thus, this disclosure optimizes the initial update step size based on eigenvalues and eigenvalue thresholds, effectively improving the accuracy of determining the target update step size. Furthermore, by iterating the initial pose according to the target update step size to obtain the target pose of two adjacent frames of point cloud data, the accuracy of point cloud matching in some extreme scenarios is effectively improved, thereby enhancing the accuracy and reliability of point cloud matching results for rotating radar.
[0076] Figure 4 is a schematic diagram of the structure of a point cloud matching device for a rotating lidar according to an embodiment of this disclosure. As shown in Figure 4, a point cloud matching device 400 for a rotating lidar includes a first acquisition module 41, a conversion module 42, a downsampling module 43, a second acquisition module 44, and a third acquisition module 45. Wherein:
[0077] The first acquisition module 41 is used to acquire point cloud data carrying a first timestamp based on the lidar, and to acquire the rotation angle of the motor output carrying a second timestamp, wherein the lidar and the motor are fixedly connected by a mechanical structure.
[0078] The conversion module 42 is used to perform coordinate transformation on the point cloud data according to the rotation angle to obtain the first point cloud data;
[0079] The downsampling module 43 is used to obtain the downsampling size of the first point cloud data, and perform downsampling processing on the first point cloud data according to the downsampling size to obtain the second point cloud data;
[0080] The second acquisition module 44 is used to acquire the initial update step size for iterating the initial pose of two adjacent frames of point cloud data in the second point cloud data.
[0081] The third acquisition module 45 is used to optimize the initial update step size to obtain the target update step size, and iterate the initial pose according to the target update step size to obtain the target pose of the point cloud data of the two adjacent frames.
[0082] The second aspect of this disclosure provides a point cloud matching device for a rotating lidar, which also has the following technical features.
[0083] According to one embodiment of this disclosure, the conversion module 42 is configured to: obtain the initial angle output by the motor in a stationary state; obtain the target rotation angle of the motor corresponding to each frame of point cloud data based on the first timestamp, the second timestamp, and the rotation angle; determine the rotation angle change of each frame of point cloud data based on the initial angle and the target rotation angle; and perform coordinate transformation on each frame of point cloud data based on the rotation angle change to obtain first point cloud data.
[0084] According to one embodiment of this disclosure, the downsampling module 43 is configured to: for the i-th frame of point cloud data in the first point cloud data, obtain a first average depth of the i-th frame of point cloud data and a second average depth of the (i-1)-th frame of point cloud data; determine a target fusion depth of the i-th frame of point cloud data based on the first average depth and the second average depth; and determine the downsampling size of the i-th frame of point cloud data based on the target fusion depth.
[0085] According to one embodiment of this disclosure, the downsampling module 43 is configured to: obtain a pre-built mapping table between fusion depth and downsampling size; and, based on the target fusion depth, query the mapping table to determine the downsampling size of the i-th frame point cloud data.
[0086] According to one embodiment of this disclosure, the third acquisition module 45 is configured to: determine a six-degree-of-freedom matrix based on the product of the Jacobian matrix and the transpose of the Jacobian matrix; acquire the eigenvalues and eigenvalue thresholds of the six-degree-of-freedom matrix; and optimize the initial update step size based on the eigenvalues and the eigenvalue thresholds to obtain the target update step size.
[0087] According to one embodiment of this disclosure, the third acquisition module 45 is configured to: acquire a preset initial feature value threshold; in response to the motor being in a stationary state, use the preset initial feature value threshold as the feature value threshold; or, in response to the motor being in a rotating state, determine an adjustment factor for the initial feature value threshold based on the change in rotation angle, and adjust the initial feature value threshold according to the adjustment factor to obtain the feature value threshold.
[0088] According to one embodiment of this disclosure, the third acquisition module 45 is configured to: compare the feature value of each degree of freedom with the corresponding feature value threshold; acquire the target degree of freedom whose feature value is less than the feature value threshold; and set the element value corresponding to the target degree of freedom in the initial update step as the target value.
[0089] This disclosure proposes a point cloud matching device for a rotating lidar. It acquires point cloud data carrying a first timestamp based on the lidar and obtains a rotation angle output by a motor carrying a second timestamp. The lidar and motor are mechanically connected. Based on the rotation angle, coordinate transformation is performed on the point cloud data to obtain first point cloud data. The downsampling size of the first point cloud data is obtained, and downsampling processing is performed on the first point cloud data according to the downsampling size to obtain second point cloud data. An initial update step size is obtained to iterate the initial pose of two adjacent frames of point cloud data in the second point cloud data. The initial update step size is optimized to obtain a target update step size. The initial pose is iterated according to the target update step size to obtain the target pose of two adjacent frames of point cloud data. Therefore, this disclosure effectively improves the sensing range and point cloud data density of the lidar, reduces the point cloud data acquisition cost, and improves the point cloud matching process, resulting in a point cloud matching method suitable for rotating lidar, thus improving the accuracy and reliability of the point cloud matching results of the rotating lidar.
[0090] To achieve the above embodiments, this disclosure also provides an electronic device, a computer-readable storage medium, and a computer program product.
[0091] Figure 5 is a block diagram of an electronic device according to an embodiment of the present disclosure. As shown in Figure 5, the electronic device 1000 includes a memory 101, a processor 102, and executable program code or instructions stored in the memory 101 and executable on the processor 102. When the processor 102 executes the executable program code or instructions, it can run a program corresponding to the executable program code or instructions, thereby realizing the point cloud matching method of the rotating lidar described in the embodiments of Figures 1 to 3.
[0092] To implement the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a point cloud matching method for a rotating lidar according to the embodiments of FIG1 to FIG3.
[0093] To implement the above embodiments, this disclosure also provides a computer program product, which, when the instructions in the computer program product are executed by a processor, executes a point cloud matching method for a rotating lidar according to the embodiments of FIG1 to FIG3.
[0094] To implement the above embodiments, this disclosure also provides a computer program, including computer-readable code, which, when run in a computer device, implements the point cloud matching method of the rotating lidar described above.
[0095] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0096] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0097] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing custom logic functions or processes, and the scope of preferred embodiments of this disclosure includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of this disclosure pertain.
[0098] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0099] It should be understood that various parts of this disclosure can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0100] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0101] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0102] The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc. Although embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. Those skilled in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present disclosure.
Claims
1. A point cloud matching method for a rotating lidar, wherein, The method includes: The laser radar acquires point cloud data carrying a first timestamp and obtains the rotation angle output by the motor carrying a second timestamp, wherein the laser radar and the motor are fixedly connected by a mechanical structure. Based on the rotation angle, the point cloud data is subjected to coordinate transformation to obtain the first point cloud data; Obtain the downsampling size of the first point cloud data, and perform downsampling processing on the first point cloud data according to the downsampling size to obtain the second point cloud data; Obtain the initial update step size for iterating the initial pose of two adjacent frames of point cloud data in the second point cloud data; The initial update step size is optimized to obtain the target update step size. The initial pose is iterated according to the target update step size to obtain the target pose of the point cloud data of the two adjacent frames.
2. The method according to claim 1, wherein, The step of performing coordinate transformation on the point cloud data according to the rotation angle to obtain the first point cloud data includes: Obtain the initial angle output by the motor in a stationary state; Based on the first timestamp, the second timestamp, and the rotation angle, obtain the target rotation angle of the motor corresponding to each frame of point cloud data; Based on the initial angle and the target rotation angle, determine the rotation angle change of each frame of point cloud data; Based on the change in rotation angle, coordinate transformation is performed on each frame of point cloud data to obtain the first point cloud data.
3. The method according to claim 1 or 2, wherein, The downsampling size for obtaining the first point cloud data includes: For the i-th frame of point cloud data in the first point cloud data, obtain the first average depth of the i-th frame of point cloud data and the second average depth of the (i-1)-th frame of point cloud data. The target fusion depth of the i-th frame point cloud data is determined based on the first average depth and the second average depth. The downsampling size of the i-th frame point cloud data is determined based on the target fusion depth.
4. The method according to claim 3, wherein, Determining the downsampling size of the i-th frame point cloud data based on the target fusion depth includes: Obtain the pre-built mapping table between fusion depth and downsampling size; Based on the target fusion depth, the mapping relationship table is queried to determine the downsampling size of the i-th frame point cloud data.
5. The method according to any one of claims 1-4, wherein, The optimization of the initial update step size to obtain the target update step size includes: The six-degree-of-freedom matrix is determined by the product of the Jacobian matrix and its transpose. Obtain the eigenvalues and eigenvalue thresholds of the six-degree-of-freedom matrix; The initial update step size is optimized based on the feature value and the feature value threshold to obtain the target update step size.
6. The method according to claim 5, wherein, Obtaining the feature value threshold includes: Obtain the preset initial feature value threshold; In response to the motor being in a stationary state, the preset initial feature value threshold is used as the feature value threshold; or, In response to the motor being in a rotating state, an adjustment factor for the initial feature value threshold is determined based on the change in rotation angle, and the initial feature value threshold is adjusted according to the adjustment factor to obtain the feature value threshold.
7. The method according to claim 5 or 6, wherein, The step of optimizing the initial update step size based on the feature value and the feature value threshold to obtain the target update step size includes: Compare the eigenvalue of each degree of freedom with the corresponding eigenvalue threshold; Obtain the target degree of freedom where the feature value is less than the feature value threshold, and set the element value corresponding to the target degree of freedom in the initial update step size as the target value.
8. A point cloud matching device for a rotating lidar, wherein, The device includes: The first acquisition module is used to acquire point cloud data carrying a first timestamp based on the lidar, and to acquire the rotation angle output by the motor carrying a second timestamp, wherein the lidar and the motor are fixedly connected by a mechanical structure. The conversion module is used to perform coordinate transformation on the point cloud data according to the rotation angle to obtain the first point cloud data; The downsampling module is used to obtain the downsampling size of the first point cloud data, and perform downsampling processing on the first point cloud data according to the downsampling size to obtain the second point cloud data; The second acquisition module is used to acquire the initial update step size for iterating the initial pose of two adjacent frames of point cloud data in the second point cloud data. The third acquisition module is used to optimize the initial update step size to obtain the target update step size, and iterate the initial pose according to the target update step size to obtain the target pose of the point cloud data of the two adjacent frames.
9. An electronic device, comprising a processor and a memory; in, The processor runs a program corresponding to the executable program code stored in the memory to implement the method as described in any one of claims 1-7.
10. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method as described in any one of claims 1-7.
11. A computer program product that, when instructions in the computer program product are executed by a processor, implements the method of any one of claims 1-7.
12. A computer program comprising computer-readable code that, when executed in a computer device, implements the method as described in any one of claims 1-7.