Container posture alignment detection method and system based on laser radar

By constructing a 3D Gaussian template, a unified coordinate system, and adaptive point cloud acquisition, combined with Lie algebra incremental optimization, the problems of point cloud sparsity and environmental interference in lidar container attitude detection were solved, achieving high-precision attitude alignment detection and automated closed-loop.

CN122149314APending Publication Date: 2026-06-05SICHUAN HUATIETENGZHI TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SICHUAN HUATIETENGZHI TECHNOLOGY CO LTD
Filing Date
2026-02-09
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing lidar-based container attitude detection technologies suffer from problems such as sparse point clouds, local missing points, and environmental interference leading to unstable initial pose and poor alignment accuracy.

Method used

By establishing a 3D Gaussian template for containers and constructing a unified coordinate system, point cloud data is adaptively collected and ground segmentation is performed to generate non-ground point clouds. Based on the clustering of non-ground point clouds, a unique target is selected, and a dual-plane voting 3D center estimation is performed. The point cloud is aligned using the template center, and a linear mapping matrix is ​​constructed to extract the initial values ​​of rotation for orthogonality and environmental constraints. An observation distance map is constructed, and combined with the refined loss of structural consistency and environmental constraints, the pose is optimized using Lie algebra increments.

Benefits of technology

It achieves high-precision container attitude alignment detection in complex environments, improves alignment accuracy and system intelligence, ensures data quality and the stability of the optimization process, and completes an automated closed loop from perception to execution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122149314A_ABST
    Figure CN122149314A_ABST
Patent Text Reader

Abstract

The application discloses a container posture alignment detection method and system based on a laser radar, relates to the technical field of alignment detection, and comprises the following steps: a 3D Gaussian template of a container is established, a unified coordinate system is constructed, laser radar point cloud data is adaptively collected, and non-ground point cloud is obtained by ground segmentation; container candidate clusters are generated based on non-ground point cloud clustering, a unique target is selected according to structural consistency, target point cloud is obtained, and three-dimensional center estimation of the target point cloud is carried out by double-plane voting; the template center is used to align the three-dimensional center of the target point cloud, the point cloud is projected to a ground constraint plane and the direction distribution is calculated, a linear mapping matrix is constructed, rotation initial values satisfying orthogonality and environmental constraints are extracted by polar decomposition, and an initial posture is obtained; and high-precision, high-reliability and full-automatic container posture alignment is achieved in a complex, dynamic and unstructured port scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of alignment detection technology, and in particular to a container attitude alignment detection method and system based on lidar. Background Technology

[0002] With the rapid development of port automation, intelligent logistics, and unmanned loading and unloading equipment, the automatic identification and precise alignment of containers in terminals, yards, and multimodal transport scenarios has become one of the key technologies in intelligent port systems. The core objective of container attitude alignment detection is to acquire the three-dimensional position and attitude information of containers in space in real time and accurately, providing reliable input for automatic grabbing, alignment correction, and closed-loop control of spreaders. In existing technologies, container attitude detection methods mainly include methods based on visual sensors, lidar, and multi-sensor fusion. Among them, methods based on monocular or binocular vision rely on image feature extraction and target detection networks, which are not robust enough in complex port environments such as changes in lighting, rain and fog, and strong reflections. LiDAR, on the other hand, is gradually becoming an important technical path for container attitude perception because it is not sensitive to lighting and can directly acquire high-precision three-dimensional geometric information.

[0003] However, existing lidar-based container attitude alignment technologies still have several shortcomings. First, in the point cloud acquisition and preprocessing stage, the point cloud sparsity is not dynamically adjusted according to environmental complexity and target distance, resulting in insufficient point cloud information in long-distance or occluded scenarios. Second, in the attitude estimation stage, existing technologies typically use PCA principal direction or ICP initial value alignment, which is difficult to simultaneously meet orthogonality constraints, environmental constraints, and structural consistency requirements, leading to significant instability in the initial pose and affecting overall alignment accuracy. Furthermore, most schemes still construct loss functions based on discrete point cloud distances or simple geometric errors during pose optimization, lacking joint modeling of observed structural consistency and environmental constraints. The optimization process is prone to getting trapped in local optima and is difficult to achieve end-to-end differentiable optimization. Summary of the Invention

[0004] In view of the aforementioned existing problems, the present invention is proposed.

[0005] Therefore, this invention provides a container attitude alignment detection method and system based on lidar, which solves the problems of unstable initial pose and poor alignment accuracy caused by sparse point cloud, local missing points and environmental interference in the existing automatic container alignment process.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: In a first aspect, the present invention provides a container attitude alignment detection method based on lidar, comprising, A 3D Gaussian template for the container was established, a unified coordinate system was constructed, lidar point cloud data was adaptively acquired, and ground segmentation was performed to obtain non-ground point clouds; Container candidate clusters are generated based on non-ground point cloud clustering. A unique target is selected based on structural consistency to obtain the target point cloud. The target point cloud is then used for three-dimensional center estimation by biplane voting. The target point cloud's 3D center is aligned by translation using the template center. The point cloud is then projected onto the ground constraint plane, and the orientation distribution is calculated. A linear mapping matrix is ​​constructed, and initial rotation values ​​that satisfy orthogonality and environmental constraints are extracted through polar decomposition to obtain the initial pose. An observation distance map is constructed based on the target point cloud. The 3D Gaussian template is rendered using the initial pose to obtain a predicted distance map. A predicted point set is constructed based on the predicted distance map. A refined loss is constructed by combining structural consistency and environmental constraints. The initial pose is updated using Lie algebra increment and refinement loss to obtain the refined pose, which is then converted into alignment deviation and output to the control system.

[0007] As a preferred embodiment of the container attitude alignment detection method based on LiDAR described in this invention, the steps of establishing a 3D Gaussian template for the container, constructing a unified coordinate system, adaptively acquiring LiDAR point cloud data, and performing ground segmentation to obtain non-ground point clouds include: The container geometry model is constructed using standard ISO container CAD, with the container's geometric center set as the origin. The x-axis points in the length direction, the y-axis points in the width direction, and the z-axis points in the vertical direction; Convert the container geometry model into a 3D Gaussian template; Establish and solidify the lidar coordinate system Coordinate system of operating equipment and the target coordinate system The external parameter variation matrix of laser-radar to the operating equipment was obtained through calibration. The transformation from the coordinate system of the working equipment to the coordinate system of the positioning target is expressed as: ; After completing coordinate system one, collect lidar point cloud data and calculate the point cloud sparsity based on the nearest obstacle distance d in the current frame. The calculated point cloud sparsity is compared with the preset target sparsity threshold to determine the number of point cloud frames K that need to be accumulated. K frames of point cloud data were continuously acquired, and the point cloud data of each frame was uniformly converted to... After coordinate system alignment, time alignment and overlay are performed to form a cumulative point cloud; The cumulative point cloud is cropped by ROI and outliers are removed by radius to obtain a denoised point cloud. The RANSAC algorithm is used to fit the denoised point cloud to obtain a ground plane model. The ground normal unit vector is defined based on the ground plane model. Ground points are identified and removed based on the ground normal unit vector, resulting in a non-ground point cloud. .

[0008] As a preferred embodiment of the container attitude alignment detection method based on lidar described in this invention, the step of generating container candidate clusters based on non-terrestrial point cloud clustering, selecting a unique target based on structural consistency to obtain a target point cloud, and performing three-dimensional center estimation of the target point cloud through biplane voting includes: Perform Euclidean clustering on non-terrestrial point clouds to generate a set of point cloud clusters; For each point cloud cluster, the bounding box size of the axis alignment is calculated, and the size constraint is based on the ISO container size range. Only clusters that meet the size constraint are retained as container candidate clusters. For each candidate cluster of containers, calculate the covariance matrix and perform PCA decomposition to obtain the eigenvalues; Calculate the structural consistency score based on the eigenvalues, and select the cluster with the highest score as the target point cloud; Project the target point cloud onto the XY and XZ planes to generate a BEV view and a side view. Input the two views into a pre-trained center heatmap network to output two center heatmaps and the corresponding offset fields. The peak pixel coordinates of the central heatmap are selected and corrected using an offset field to obtain two two-dimensional center coordinates. The two two-dimensional center coordinates are then fused and used to generate a three-dimensional center.

[0009] As a preferred embodiment of the container attitude alignment detection method based on lidar described in this invention, the method includes: aligning the three-dimensional center of the target point cloud using a template center, projecting the point cloud onto a ground constraint plane and calculating its orientation distribution, constructing a linear mapping matrix, and extracting initial rotation values ​​that satisfy orthogonality and environmental constraints through polar decomposition to obtain the initial pose, including... center of template Compare with the 3D center of the target point cloud to obtain the initial translation value, and use the initial translation value to center-align the target point cloud to obtain the center-aligned point cloud; Construct an orthogonal projection matrix to project the center-aligned point cloud onto the ground tangent plane; Construct a second-order tensor for the ground projection components of the center-aligned point cloud For second-order tensors Perform eigenvalue decomposition to obtain orthogonal matrices. ,in , and Located within the ground plane, therefore directly take , and These represent the potential length, width, and height of the container, respectively. The three directional vectors are combined column-wise into a linear mapping matrix. For linear mapping matrix Perform right-pole decomposition and construct a symmetric positive definite matrix to extract the initial values ​​for rotation; Construct the initial pose based on the initial values ​​of translation and rotation.

[0010] As a preferred embodiment of the container attitude alignment detection method based on lidar described in this invention, the step of constructing an observation distance map based on the target point cloud and obtaining a predicted distance map by performing differentiable rendering of a 3D Gaussian template using the initial pose includes: The width of the observation range map is calculated based on the calibration parameters of the lidar. With height ; Initialize observation distance map It is completely empty, among which , ; Calculate the spherical projection parameters for each point in the target point cloud. Based on the spherical projection parameters, map each point in the center point cloud to pixels in the observation range map. Take the minimum depth as the front surface and update the pixel distance accordingly. Finally, output the updated observation range map. ; Using the initial pose as the initial value for the current pose, all Gaussian centers of the 3D Gaussian template are transformed from the template coordinate system to the working equipment coordinate system based on the current pose, resulting in the transformed Gaussian center coordinates. ; Using the same computational steps as the target point cloud, Projected into pixels With distance ; Pixel weights are calculated using soft rasterization, and a predicted distance map is synthesized based on these pixel weights. .

[0011] As a preferred embodiment of the container attitude alignment detection method based on lidar described in this invention, the step of constructing a prediction point set based on a prediction distance map and combining structural consistency, geometric consistency, and environmental constraints to construct a refined loss includes: For the predicted distance map All pixels with predicted distance Calculate the corresponding angle; Based on the angle of each pixel, back projection is performed using the predicted distance to generate 3D points, and the predicted point set is obtained by summing them up. The structural consistency loss is defined based on the structural consistency of the observed distance map and the predicted distance map. The geometric consistency loss is defined based on the Chamfer distance between the target point cloud and the predicted point set. The environmental constraint is defined based on the environmental normal unit vector. The structural consistency loss, geometric consistency loss and environmental constraint are jointly used to construct a refined loss function.

[0012] As a preferred embodiment of the container attitude alignment detection method based on lidar described in this invention, the step of updating the initial pose using Lie algebra increment and refining loss to obtain a refined pose and converting it into an alignment deviation output to the control system includes: Parameterizing the incremental pose update using Lie algebras ,in Indicates the rotation increment. This represents the translation increment, which updates the current pose through an exponential mapping. Gradient descent optimization is performed using a refined loss function and the AdamW optimizer, on the incremental... The process involves updating the pose. If the refined loss function no longer decreases significantly during continuous iterations, the iteration stops, the optimal increment is output, and the current pose is updated to obtain the refined pose. The refined pose is transformed to the target coordinate system, the alignment deviation is calculated, and the alignment deviation is output to the spreader control system to complete the control closed loop.

[0013] Secondly, the present invention provides a container attitude alignment detection system based on lidar, comprising, The calibration and acquisition module is used to establish a 3D Gaussian template for the container and construct a unified coordinate system, acquire lidar point cloud data, and extract non-ground point clouds through a ground segmentation algorithm to eliminate ground interference. The target extraction module is used to cluster non-ground point clouds to generate container candidate clusters and select unique target point clouds based on structural consistency constraints. The center estimation module is used to perform biplane voting calculations on the target point cloud to accurately estimate the three-dimensional geometric center of the container. The initial pose calculation module is used to perform translational alignment based on the template center and the target center, and to obtain the initial rotational pose that satisfies orthogonality and environmental constraints through orientation distribution analysis and polar decomposition methods. The refined loss module is used to generate a predicted distance map by performing differentiable rendering of a 3D Gaussian template using the initial pose, and constructs a refined loss function that combines structural, geometric consistency and environmental constraints with the observation data. The optimized output module is used to iteratively optimize the pose through Lie algebra increments, convert the refined container pose into alignment deviation parameters, and output them to the control system for alignment control.

[0014] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein the computer program, when executed by the processor, implements any step of the container attitude alignment detection method based on lidar as described in the first aspect of the present invention.

[0015] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the container attitude alignment detection method based on lidar as described in the first aspect of the present invention.

[0016] The beneficial effects of this invention are as follows: by constructing a 3D Gaussian template, unifying the coordinate system, adaptively acquiring and preprocessing point clouds, estimating the 3D center of gravity through biplane voting, calculating the initial pose based on ground constraints and tensor analysis, constructing differentiable 3D Gaussian templates and multimodal refinement loss, and optimizing manifolds and achieving closed-loop output based on Lie algebras, the invention ensures the quality of data input, provides accurate initial pose value analysis, defines a smooth and highly guided optimization objective, and achieves automated gradient descent refinement. Ultimately, it realizes a complete automated closed loop from perception and computation to execution, thereby improving the intelligence and efficiency of the entire alignment operation system. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of the container attitude alignment detection method based on lidar in Example 1.

[0019] Figure 2 This is a structural diagram of the container attitude alignment detection system based on lidar in Example 1.

[0020] Figure 3 This is a flowchart of pose refinement and output in Example 1. Detailed Implementation

[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0022] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0023] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0024] Example 1, referring to Figure 1 , Figure 2 and Figure 3 This is the first embodiment of the present invention, which provides a container attitude alignment detection method based on lidar, including the following steps: S1. Establish a 3D Gaussian template for the container, construct a unified coordinate system, adaptively acquire LiDAR point cloud data, and perform ground segmentation to obtain non-ground point cloud; Specifically, the container geometric model is constructed using standard ISO container CAD, with the container's geometric center set as the origin. The x-axis points in the length direction, the y-axis points in the width direction, and the z-axis points in the vertical direction; The container geometry model is converted into a 3D Gaussian template, represented as: ; in, This represents a 3D Gaussian template. Let i represent the i-th Gaussian center. Indicates Gaussian rotation, Indicates Gaussian scale, Indicates opacity. Represents the total number of Gaussians; Establish and solidify the lidar coordinate system Coordinate system of operating equipment and the target coordinate system The external parameter variation matrix of laser-radar to the operating equipment was obtained through calibration. The transformation from the coordinate system of the working equipment to the coordinate system of the positioning target is expressed as: ; After completing coordinate system one, collect lidar point cloud data, and calculate the point cloud sparsity based on the nearest obstacle distance d in the current frame, expressed as: ; in, Indicates the sparsity of point clouds. and These represent the horizontal and vertical angular resolutions of the lidar, respectively. The calculated point cloud sparsity is compared with a preset target sparsity threshold to determine the number of point cloud frames K to be accumulated, denoted as: ; in, This represents the preset target sparsity threshold. This represents a very small constant that prevents division by zero. K frames of point cloud data were continuously acquired, and the point cloud data of each frame was uniformly converted to... After coordinate system alignment, time alignment and overlay are performed to form a cumulative point cloud; The accumulated point cloud is pruned for ROI and outliers are removed by radius to obtain a denoised point cloud; The RANSAC algorithm is used to perform plane fitting on the denoised point cloud to obtain the ground plane model, which is represented as follows: ; in, , and Represents the plane normal parameter. Indicates plane offset; Based on the ground plane model, the ground normal unit vector is defined as follows: ; in, Represents the unit vector normal to the ground; Ground point determination is based on the ground normal unit vector, and the determination formula is expressed as follows: ; in, , and Let x, y, and z represent the x, y, and z coordinates of the i-th point in the cumulative point cloud, respectively. Indicates the ground distance threshold; Points that satisfy the determination formula are removed to obtain non-ground point clouds. .

[0025] By establishing a 3D Gaussian template for the container and constructing a unified coordinate system, and simultaneously adaptively accumulating LiDAR point clouds based on real-time point cloud sparsity and performing ground segmentation, continuous modeling of the container's prior structure and stable acquisition of high-quality non-ground point clouds were achieved. The core function of this step is twofold: firstly, by converting the standard ISO container CAD model into a 3D Gaussian template, the container is transformed from a fixed physical model into a continuous representation that facilitates subsequent differentiable rendering, providing a mathematical foundation for subsequent gradient-based pose optimization; secondly, by introducing a point cloud sparsity evaluation mechanism based on the nearest obstacle distance, the environmental perception status is improved. State quantization is adopted as a data acquisition strategy, enabling proactive control of data quality and solving the fundamental problem of low signal-to-noise ratio in point cloud data under long distances or severe weather conditions, making it unusable directly. Simultaneously, by leveraging a unified multi-coordinate system calibration relationship and RANSAC-based ground plane modeling and ground point removal, interference from ground reflections, equipment vibrations, and environmental clutter on the target point cloud is effectively reduced. Thus, this step ensures the sufficiency and purity of input data at the algorithm entry point, fundamentally improving the system's adaptability to working distances and environmental interference, and laying a stable data foundation for subsequent target extraction and pose estimation.

[0026] S2. Generate container candidate clusters based on non-ground point cloud clustering, select a unique target based on structural consistency, obtain the target point cloud, and perform three-dimensional center estimation of the target point cloud by dual-plane voting; Specifically, Euclidean clustering is performed on non-ground point clouds to generate a set of point cloud clusters; For each point cloud cluster, the bounding box size of the axis alignment is calculated, and the size constraint is based on the ISO container size range. Only clusters that meet the size constraint are retained as container candidate clusters. For each candidate cluster of containers, calculate the covariance matrix and perform PCA decomposition to obtain the eigenvalues; Calculate the structure consistency score based on the eigenvalues, and select the cluster with the highest score as the target point cloud, represented as: ; in, Indicates structural consistency score, , and Represents eigenvalues. and An empirical ratio constant representing the typical length, width, and height structure of a container; Project the target point cloud onto the XY and XZ planes to generate a BEV view and a side view. Input the two views into a pre-trained center heatmap network to output two center heatmaps and the corresponding offset fields. The peak pixel coordinates of the central heatmap are selected and corrected using an offset field to obtain two two-dimensional center coordinates. The two two-dimensional center coordinates are then fused and used to generate a three-dimensional center.

[0027] By clustering non-terrestrial point clouds and combining size constraints and structural consistency scores to select a unique target, and by employing a dual-plane voting method to estimate the 3D center, reliable identification and robust center localization of container targets in complex scenes are achieved. The significance of this step lies in the fact that traditional center estimation (such as point cloud centroid) is easily affected by the missing sides caused by uneven distribution of point clouds. This invention innovatively decomposes the 3D center estimation problem into a sub-pixel-level center prediction problem under two 2D views, utilizing the powerful feature extraction and regression capabilities of deep networks and combining multi-view geometric fusion. As a result, the target recognition accuracy and center localization precision are significantly improved in cases where the target point cloud is incomplete, occluded, or has structurally similar interference objects. This provides a highly reliable spatial anchor point for subsequent pose initialization, avoiding the risk of subsequent optimization failure due to excessive initial center deviation.

[0028] S3. Use the template center to perform translation center alignment on the 3D center of the target point cloud, project the point cloud onto the ground constraint plane and calculate the orientation distribution, construct a linear mapping matrix, and extract the initial rotation values ​​that satisfy orthogonality and environmental constraints through polar decomposition to obtain the initial pose; Specifically, the template center The initial translation value is obtained by comparing it with the 3D center of the target point cloud; The target point cloud is centered using the initial translation value to obtain a centered aligned point cloud. Construct an orthogonal projection matrix to project the center-aligned point cloud onto the ground tangent plane, expressed as: ; in, Represents the orthogonal projection matrix. Represents a third-order identity matrix. Represents a one-dimensional projection operator along the ground normal; Construct a second-order tensor for the ground projection components of the center-aligned point cloud , is represented as: ; in, This represents the i-th point in the center-aligned point cloud; For second-order tensors Perform eigenvalue decomposition to obtain orthogonal matrices. ,in , and Located within the ground plane, therefore directly take , and These represent the potential length, width, and height of the container, respectively. The three directional vectors are combined column-wise into a linear mapping matrix. ; For linear mapping matrix Perform right-pole decomposition and construct a symmetric positive definite matrix to extract the initial values ​​for rotation, expressed as: ; ; ; in, Indicates the initial value of the rotation. This represents a symmetric positive definite matrix used to characterize residual tensile deformation; The initial pose is constructed based on the initial values ​​of translation and rotation, and is expressed as: ; in, Indicates the initial pose. This represents the initial value of the translation.

[0029] By constructing a second-order tensor M through center alignment and ground projection, and performing eigenvalue decomposition, and finally performing polar decomposition on the orientation matrix A to extract initial rotation values, pose estimation that satisfies orthogonality and environmental constraints is achieved. The main function of this step is to: explicitly separate the translation and rotation estimation processes, avoiding error amplification caused by their coupling in traditional methods; and directly extract the main orientations of the container on the ground by projecting the point cloud onto the ground tangent plane and analyzing its distribution, thereby effectively suppressing attitude drift caused by ground undulations or noise. Furthermore, the potential length, width, and height orientations are obtained through second-order tensor construction and eigenvalue decomposition. By using extreme decomposition, the linear mapping matrix A, which may have anisotropic scaling, is separated into a pure rotation component. At the same time, the residual scaling deformation is absorbed into the symmetric positive definite matrix S without interfering with the rotation estimation, ensuring that the initial rotation strictly satisfies the orthogonality constraint. This step provides a fast analytical and physically meaningful pose initialization method. This method is insensitive to point cloud missing data, can naturally guarantee the orthogonality of the rotation matrix, and embeds the strong constraint of aligning the template's vertical axis with the ground normal into the initial value. This provides a starting point for subsequent non-convex optimization that is very close to the global optimum, significantly reducing the time required for iterative convergence and the probability of getting trapped in local optima.

[0030] S4. Construct an observation distance map based on the target point cloud, use the initial pose to perform differentiable rendering of the 3D Gaussian template to obtain the prediction distance map, construct a prediction point set based on the prediction distance map, and construct a refined loss by combining structural consistency and environmental constraints. Specifically, the width of the observation range map is calculated based on the calibration parameters of the lidar. With height , is represented as: ; ; in, and This indicates the horizontal field-of-view boundary of the lidar. and This indicates the vertical market boundaries for LiDAR; Initialize observation distance map It is completely empty, among which , ; Calculate the spherical projection parameters for each point in the target point cloud, as follows: ; ; ; in, , and These represent the x, y, and z coordinates of the point, respectively. This indicates the azimuth of a point on the horizontal plane. Represents the pitch angle of a point. This represents the Euclidean distance from the point to the radar origin; Based on the spherical projection parameters, each point in the central point cloud is mapped to a pixel in the observation range map. The minimum depth is taken as the front surface, and the pixel distance is updated accordingly. Finally, the updated observation range map is output. , is represented as: ; ; ; in, and Indicates pixel index, Indicates the updated pixel; Using the initial pose as the initial value for the current pose, all Gaussian centers of the 3D Gaussian template are transformed from the template coordinate system to the working equipment coordinate system based on the current pose, resulting in the transformed Gaussian center coordinates. , is represented as: ; in, Indicates the current pose. This represents the rotation value of the current pose. This represents the translation value of the current pose; Using the same computational steps as the target point cloud, Projected into pixels With distance ; Pixel weights are calculated using soft rasterization and are expressed as follows: ; ; in, Represents pixel weights, used to describe the impact of the i-th Gaussian center on the pixel position after being projected onto the distance map in the current pose. The contribution strength of depth value and This indicates the pixel index of the distance currently being calculated. This represents the horizontal distance between the current pixel and the i-th Gaussian center in the pixel domain. This represents the vertical distance between the current pixel and the i-th Gaussian center in the pixel domain. This represents the pixel unit uncertainty scale corresponding to angular resolution; Predicted distance map based on pixel weighted synthesis , is represented as: ; in, This represents a predicted distance map, used to describe the distance at pixel locations. All pairs The continuously differentiable front surface depth estimate obtained under the combined effect of contributing Gaussian centers. Represents extremely small numbers, used to prevent division by zero; Furthermore, for the predicted distance map All pixels with predicted distance The corresponding angle is calculated and expressed as: ; ; in, and Represents pixels The corresponding angle; Based on the angle of each pixel, 3D points are generated by backprojection using the predicted distance, and the summation yields the predicted point set, represented as: ; ; in, express medium pixel 3D points, Represents pixels The predicted distance is determined by Sure, Represents the set of prediction points; The structural consistency loss is defined based on the structural consistency of the observed distance map and the predicted distance map; the geometric consistency loss is defined based on the Chamfer distance between the target point cloud and the predicted point set; and the environmental constraint is defined based on the environmental normal unit vector. A refined loss function is constructed by jointly using the structural consistency loss, geometric consistency loss, and environmental constraint, expressed as: ; in, Represents the refining loss function. Indicates structural similarity. Represents the Chamfer distance. This represents the rotation value of the current pose. Indicates the vertical axis of the template. Used to keep the vertical axis of the template aligned with the ground normal. , and To represent the weights, we can set... Leading For auxiliary purposes Constraints are determined using small weights and cross-validation.

[0031] By rendering a 3D Gaussian template into a predicted distance map that is differentiable to the current pose T, and constructing a structural similarity loss with the observed distance map and a Chamfer distance loss with the original point cloud, while adding environmental normal constraints, a refined loss function that is continuous, differentiable, and incorporates multi-dimensional consistency information about the current pose T is constructed. This achieves the transformation from discrete point cloud matching to continuous differentiable pose optimization. The key role of this step is that traditional ICP or its variants usually optimize directly on point-to-point or point-to-surface distances, which are sensitive to noise and initial values. This invention innovatively introduces differentiable rendering technology, making the process of generating predicted observations from parameterized templates (pose → distance) more efficient. The gradient can be calculated, and the structural consistency loss constructed from it can be compared at the image level. It is insensitive to local noise and can capture the overall structural similarity. The geometric consistency loss can constrain at the point set level to ensure the alignment of geometric shapes. The environmental constraint is a soft regularization term to keep the optimization process from violating physical common sense. Thus, this step allows the use of gradient-based optimizers for efficient search in the system. At the same time, it combines multiple supervision signals at the pixel level, point set level and physical rule level, making the pose optimization process more robust, converges faster and has higher final accuracy. It effectively overcomes the problem that traditional pure geometric registration methods are susceptible to noise interference and local shape ambiguity.

[0032] S5. Use Lie algebra increment and refinement loss to update the initial pose, obtain the refined pose, and convert it into alignment deviation output to the control system. Specifically, the increment of pose update is parameterized using Lie algebras. ,in Indicates the rotation increment. This represents the translation increment, updated using an exponential mapping to update the current pose, expressed as: ; in, This indicates the updated pose. Indicates the current pose. Indicates increment Hat operator; Gradient descent optimization is performed using a refined loss function and the AdamW optimizer, on the incremental... The process involves updating the pose. If the refined loss function no longer decreases significantly during continuous iterations, the iteration stops, the optimal increment is output, and the current pose is updated to obtain the refined pose. The refined pose is transformed to the target coordinate system, and the alignment deviation is calculated, expressed as: ; ; in, This represents the refined pose transformed to the target coordinate system. Indicates a refined posture. and These represent rotational and translational deviations, respectively. The target pose is indicated and is given by the port operations system. The alignment deviation is output to the spreader control system to complete the control closed loop.

[0033] By using Lie algebra incremental parameterization for pose update and minimizing the refinement loss using the AdamW optimizer, the aligned refined pose is finally converted into alignment deviation and output to the control system. This achieves closed-loop alignment from perception to execution control. This step is to perform optimization and complete the system closed loop. The introduction of Lie algebra is a key technology. It transforms the update of the non-additive rotation matrix into an additive update of the Lie algebra in the vector space, allowing the standard gradient descent algorithm (AdamW) to be directly applied. The AdamW optimizer provides an adaptive learning rate and good convergence characteristics. Through iteration guided by the refinement loss function, the AdamW optimizer achieves efficient and stable optimization of pose parameters in the correct geometric space. The final output deviation command is seamlessly integrated with the control system, realizing a complete automated closed loop from perception, calculation to execution. This improves the intelligence and efficiency of the entire alignment operation system, thereby achieving high-precision attitude alignment closed-loop control, improving the safety and efficiency of automated hoisting operations, and enhancing the feasibility of system engineering.

[0034] This embodiment also provides a container attitude alignment detection system based on lidar, including: The calibration and acquisition module is used to establish a 3D Gaussian template for the container and construct a unified coordinate system, acquire lidar point cloud data, and extract non-ground point clouds through a ground segmentation algorithm to eliminate ground interference. The target extraction module is used to cluster non-ground point clouds to generate container candidate clusters and select unique target point clouds based on structural consistency constraints. The center estimation module is used to perform biplane voting calculations on the target point cloud to accurately estimate the three-dimensional geometric center of the container. The initial pose calculation module is used to perform translational alignment based on the template center and the target center, and to obtain the initial rotational pose that satisfies orthogonality and environmental constraints through orientation distribution analysis and polar decomposition methods. The refined loss module is used to generate a predicted distance map by performing differentiable rendering of a 3D Gaussian template using the initial pose, and constructs a refined loss function that combines structural, geometric consistency and environmental constraints with the observation data. The optimized output module is used to iteratively optimize the pose through Lie algebra increments, convert the refined container pose into alignment deviation parameters, and output them to the control system for alignment control.

[0035] This embodiment also provides a computer device applicable to the container attitude alignment detection method based on lidar, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to realize the container attitude alignment detection method based on lidar as proposed in the above embodiment.

[0036] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0037] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the container attitude alignment detection method based on lidar as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0038] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A container attitude alignment detection method based on lidar, characterized in that: include, A 3D Gaussian template for the container was established, a unified coordinate system was constructed, lidar point cloud data was adaptively acquired, and ground segmentation was performed to obtain non-ground point clouds; Container candidate clusters are generated based on non-ground point cloud clustering. A unique target is selected based on structural consistency to obtain the target point cloud. The target point cloud is then used for three-dimensional center estimation by biplane voting. The target point cloud's 3D center is aligned by translation using the template center. The point cloud is then projected onto the ground constraint plane, and the orientation distribution is calculated. A linear mapping matrix is ​​constructed, and initial rotation values ​​that satisfy orthogonality and environmental constraints are extracted through polar decomposition to obtain the initial pose. An observation distance map is constructed based on the target point cloud. The 3D Gaussian template is rendered using the initial pose to obtain a predicted distance map. A predicted point set is constructed based on the predicted distance map. A refined loss is constructed by combining structural consistency and environmental constraints. The initial pose is updated using Lie algebra increment and refinement loss to obtain the refined pose, which is then converted into alignment deviation and output to the control system.

2. The container attitude alignment detection method based on lidar as described in claim 1, characterized in that: The process of establishing a 3D Gaussian template for the container, constructing a unified coordinate system, adaptively acquiring LiDAR point cloud data, and performing ground segmentation to obtain non-ground point clouds includes: The container geometry model is constructed using standard ISO container CAD, with the container's geometric center set as the origin. The x-axis points in the length direction, the y-axis points in the width direction, and the z-axis points in the vertical direction; Convert the container geometry model into a 3D Gaussian template; Establish and solidify the lidar coordinate system Coordinate system of operating equipment and the target coordinate system The external parameter variation matrix of laser-radar to the operating equipment was obtained through calibration. The transformation from the coordinate system of the working equipment to the coordinate system of the positioning target is expressed as: ; After completing coordinate system one, collect lidar point cloud data and calculate the point cloud sparsity based on the nearest obstacle distance d in the current frame. The calculated point cloud sparsity is compared with the preset target sparsity threshold to determine the number of point cloud frames K that need to be accumulated. K frames of point cloud data were continuously acquired, and the point cloud data of each frame was uniformly converted to... After coordinate system alignment, time alignment and overlay are performed to form a cumulative point cloud; The cumulative point cloud is cropped by ROI and outliers are removed by radius to obtain a denoised point cloud. The RANSAC algorithm is used to fit the denoised point cloud to obtain a ground plane model. The ground normal unit vector is defined based on the ground plane model. Ground points are identified and removed based on the ground normal unit vector, resulting in a non-ground point cloud. .

3. The container attitude alignment detection method based on lidar as described in claim 2, characterized in that: The process of generating container candidate clusters based on non-terrestrial point cloud clustering, selecting a unique target based on structural consistency to obtain a target point cloud, and performing 3D center estimation of the target point cloud using biplane voting includes: Perform Euclidean clustering on non-terrestrial point clouds to generate a set of point cloud clusters; For each point cloud cluster, the bounding box size of the axis alignment is calculated, and the size constraint is based on the ISO container size range. Only clusters that meet the size constraint are retained as container candidate clusters. For each candidate cluster of containers, calculate the covariance matrix and perform PCA decomposition to obtain the eigenvalues; Calculate the structural consistency score based on the eigenvalues, and select the cluster with the highest score as the target point cloud; Project the target point cloud onto the XY and XZ planes to generate a BEV view and a side view. Input the two views into a pre-trained center heatmap network to output two center heatmaps and the corresponding offset fields. The peak pixel coordinates of the central heatmap are selected and corrected using an offset field to obtain two two-dimensional center coordinates. The two two-dimensional center coordinates are then fused and used to generate a three-dimensional center.

4. The container attitude alignment detection method based on lidar as described in claim 3, characterized in that: The process involves aligning the 3D center of the target point cloud using a template center, projecting the point cloud onto a ground constraint plane and calculating its orientation distribution, constructing a linear mapping matrix, and extracting initial rotation values ​​that satisfy orthogonality and environmental constraints through polar decomposition to obtain the initial pose. This includes... center of template Compare with the 3D center of the target point cloud to obtain the initial translation value, and use the initial translation value to center-align the target point cloud to obtain the center-aligned point cloud; Construct an orthogonal projection matrix to project the center-aligned point cloud onto the ground tangent plane; Construct a second-order tensor for the ground projection components of the center-aligned point cloud For second-order tensors Perform eigenvalue decomposition to obtain orthogonal matrices. ,in , and Located within the ground plane, therefore directly take , and These represent the potential length, width, and height of the container, respectively. The three directional vectors are combined column-wise into a linear mapping matrix. For linear mapping matrix Perform right-pole decomposition and construct a symmetric positive definite matrix to extract the initial values ​​for rotation; Construct the initial pose based on the initial values ​​of translation and rotation.

5. The container attitude alignment detection method based on lidar as described in claim 4, characterized in that: The step of constructing an observation distance map based on the target point cloud and using the initial pose to perform differentiable rendering of a 3D Gaussian template to obtain a predicted distance map includes: The width of the observation range map is calculated based on the calibration parameters of the lidar. With height ; Initialize observation distance map It is completely empty, among which , ; Calculate the spherical projection parameters for each point in the target point cloud. Based on the spherical projection parameters, map each point in the center point cloud to pixels in the observation range map. Take the minimum depth as the front surface and update the pixel distance accordingly. Finally, output the updated observation range map. ; Using the initial pose as the initial value for the current pose, all Gaussian centers of the 3D Gaussian template are transformed from the template coordinate system to the working equipment coordinate system based on the current pose, resulting in the transformed Gaussian center coordinates. ; Using the same computational steps as the target point cloud, Projected into pixels With distance ; Pixel weights are calculated using soft rasterization, and a predicted distance map is synthesized based on these pixel weights. .

6. The container attitude alignment detection method based on lidar as described in claim 5, characterized in that: The method involves constructing a prediction point set based on the prediction distance map and combining structural consistency, geometric consistency, and environmental constraints to build a refined loss, including: For the predicted distance map All pixels with predicted distance Calculate the corresponding angle; Based on the angle of each pixel, back projection is performed using the predicted distance to generate 3D points, and the predicted point set is obtained by summing them up. The structural consistency loss is defined based on the structural consistency of the observed distance map and the predicted distance map. The geometric consistency loss is defined based on the Chamfer distance between the target point cloud and the predicted point set. The environmental constraint is defined based on the environmental normal unit vector. The structural consistency loss, geometric consistency loss and environmental constraint are jointly used to construct a refined loss function.

7. The container attitude alignment detection method based on lidar as described in claim 6, characterized in that: The process of updating the initial pose using Lie algebra increments and refining losses to obtain a refined pose, which is then converted into a positioning error and output to the control system, includes the following: Parameterizing the incremental pose update using Lie algebras ,in Indicates the rotation increment. This represents the translation increment, which updates the current pose through an exponential mapping. Gradient descent optimization is performed using a refined loss function and the AdamW optimizer, on the incremental... The process involves updating the pose. If the refined loss function no longer decreases significantly during continuous iterations, the iteration stops, the optimal increment is output, and the current pose is updated to obtain the refined pose. The refined pose is transformed to the target coordinate system, the alignment deviation is calculated, and the alignment deviation is output to the spreader control system to complete the control closed loop.

8. A container attitude alignment detection system based on lidar, based on the container attitude alignment detection method based on lidar according to any one of claims 1 to 7, characterized in that: include, The calibration and acquisition module is used to establish a 3D Gaussian template for the container and construct a unified coordinate system, acquire lidar point cloud data, and extract non-ground point clouds through a ground segmentation algorithm to eliminate ground interference. The target extraction module is used to cluster non-ground point clouds to generate container candidate clusters and select unique target point clouds based on structural consistency constraints. The center estimation module is used to perform biplane voting calculations on the target point cloud to accurately estimate the three-dimensional geometric center of the container. The initial pose calculation module is used to perform translational alignment based on the template center and the target center, and to obtain the initial rotational pose that satisfies orthogonality and environmental constraints through orientation distribution analysis and polar decomposition methods. The refined loss module is used to generate a predicted distance map by performing differentiable rendering of a 3D Gaussian template using the initial pose, and constructs a refined loss function that combines structural, geometric consistency and environmental constraints with the observation data. The optimized output module is used to iteratively optimize the pose through Lie algebra increments, convert the refined container pose into alignment deviation parameters, and output them to the control system for alignment control.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the container attitude alignment detection method based on lidar as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the container attitude alignment detection method based on lidar as described in any one of claims 1 to 7.