Automatic estimation method for geometric dimension and driving direction of trailer and vehicle system
By preprocessing trailer point cloud data, principal component analysis, and Kalman filter combined with RANSAC fitting technology, automatic estimation of trailer geometry and driving direction is achieved, solving the problems of reliance on prior information and poor environmental adaptability in existing technologies, and improving estimation accuracy and control accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JIANGSU SUPER PANTHER POWER TECH CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-04-24
AI Technical Summary
Existing technologies suffer from problems such as reliance on prior information, poor environmental adaptability, low estimation accuracy, and high system cost when estimating trailer geometry and driving direction, making it difficult to meet the real-time, robust, and prior-aware requirements of intelligent driving systems for trailer status.
By acquiring the raw point cloud data of the trailer, preprocessing it, and then using principal component analysis to generate size estimation information, and combining Kalman filter and RANSAC fitting techniques, candidate regions and bounding boxes are constructed to achieve automatic estimation of the trailer's geometric dimensions and driving direction. A closed-loop iterative method is used to improve the estimation accuracy.
It can estimate the geometric dimensions and driving direction of trailers of any size without prior information on trailer model or size, improving estimation accuracy and control precision, and adapting to various environmental conditions.
Smart Images

Figure CN121912977A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of vehicle driving and visual recognition, and in particular to a method and vehicle system for automatically estimating the geometry and driving direction of a trailer. Background Technology
[0002] In articulated vehicle systems consisting of a tractor and a trailer, accurately obtaining the trailer's geometric dimensions (length, width) and driving direction (attitude angle) is crucial for applications such as autonomous driving, automatic reversing assistance, blind spot warning, and path planning. Currently, the relevant technical solutions mainly include the following two types: (1) Vision-based detection methods: These methods use monocular or binocular cameras to capture images of trailers and then use image processing algorithms (such as edge detection and template matching) to identify the trailer outline and estimate its geometric dimensions and driving direction. For example, some commercial vehicle ADAS (Advanced Driving Assistance System) systems use rear-view cameras for reversing guidance. However, this method is greatly affected by lighting conditions, and its detection performance is severely reduced in environments such as night, rain, snow, and strong light. It also relies on a trailer model database for template matching, making it unsuitable for trailers of unknown size or non-standard shapes. In addition, cameras are easily damaged, resulting in high maintenance costs. Two-dimensional images are difficult to accurately recover the three-dimensional geometric information of the trailer, leading to large errors in geometric dimension estimation. (2) A positioning fusion method based on GPS (Global Positioning System) and IMU (Inertial Measurement Unit); by installing GPS and IMU on the trailer and combining the motion information of the tractor, the attitude angle of the trailer is estimated. However, this method requires additional sensors to be installed on the trailer, which increases the complexity and cost of the system; in addition, the system also needs to pre-store the three-dimensional models of various trailer models, and match the current observation data through point cloud registration such as ICP (Iterative Closest Point) algorithm. The geometric dimensions of the trailer cannot be directly estimated, and it cannot handle non-standard or customized trailers, still relying on prior information; and GPS signals are easily lost or drifted in environments such as tunnels and urban canyons; the installation and calibration process is cumbersome and not conducive to large-scale promotion.
[0003] In summary, the relevant technical solutions generally suffer from problems such as reliance on prior information, poor environmental adaptability, low estimation accuracy, and high system cost, making it difficult to meet the requirements of intelligent driving systems for real-time, robust, and prior-aware trailer status. Summary of the Invention
[0004] In view of this, the object of the present invention is to provide a method and vehicle system for automatically estimating the geometry and driving direction of a trailer, so as to alleviate at least some of the above-mentioned technical problems.
[0005] In a first aspect, embodiments of the present invention provide an automatic estimation method for the geometric dimensions and driving direction of a trailer. The method includes: acquiring raw point cloud data of the trailer; preprocessing the raw point cloud data to obtain target point cloud data; generating trailer size estimation information based on principal component analysis (PCA) and the target point cloud data; wherein the size estimation information includes estimated length and estimated width; constructing candidate regions based on the size estimation information and the articulation point position, and using the target point cloud data within the candidate regions as trailer candidate point cloud data; fitting the trailer candidate point cloud data to obtain trailer side point cloud data; generating trailer driving direction estimation information based on a Kalman filter and the trailer side point cloud data; constructing a bounding box of the trailer based on the driving direction estimation information and the articulation point position, and determining the trailer's attitude angle relative to the tractor; filtering the raw point cloud data based on the bounding box to obtain trailer point cloud data, and re-performing PCA on the trailer point cloud data using PCA until convergence conditions are met, thereby obtaining the trailer's geometric dimensions and driving direction.
[0006] Optionally, the step of generating trailer travel direction estimation information based on Kalman filter and trailer side point cloud data includes: using the output of the Kalman filter at the previous moment as the state prior at the current moment, and using the trailer side direction corresponding to the trailer side point cloud data as the observation value of the Kalman filter at the current moment, so that the Kalman filter fuses and outputs the travel direction estimation information at the current moment.
[0007] Optionally, the step of fitting the candidate point cloud data of the trailer to obtain the side point cloud data of the trailer includes: performing random sampling consistency plane fitting on the candidate point cloud data of the trailer on the left and right sides of the trailer respectively, and obtaining the plane equations of the left and right sides of the trailer when the number of iterations reaches a preset number; and using the candidate point cloud data of the trailer in the plane equations as the side point cloud data of the trailer.
[0008] Optionally, the step of generating trailer size estimation information based on principal component analysis technology and target point cloud data includes: determining the centroid of the target point cloud data, performing decentralization based on the centroid to obtain processed target point cloud data; determining the covariance matrix of the processed target point cloud data, and performing eigenvalue decomposition on the covariance matrix to obtain three eigenvalues and three corresponding eigenvectors; and generating trailer size estimation information based on the target point cloud data and eigenvectors.
[0009] Optionally, the step of generating trailer size estimation information based on target point cloud data and feature vectors includes: determining the maximum and minimum feature values among the three feature values, and using the feature vector corresponding to the maximum feature value as the first principal component vector, and using the feature vector corresponding to the intermediate feature value between the maximum and minimum feature values as the second principal component vector; projecting all target point cloud data onto the first principal component vector, and using the distance between the maximum and minimum values among all projected points as the estimated length; projecting all target point cloud data onto the second principal component vector, and using the distance between the maximum and minimum values among all projected points as the estimated width.
[0010] Optionally, the step of preprocessing the original point cloud data to obtain the target point cloud data includes: converting the original point cloud data to a preset coordinate system to obtain the first point cloud data; wherein the preset coordinate system is a global coordinate system with the center of the rear axle of the tractor as the origin; identifying outliers in the first point cloud data and removing the outliers to obtain the second point cloud data; and downsampling the second point cloud data based on a voxel grid to obtain the target point cloud data.
[0011] Optionally, the step of determining outliers in the first point cloud data includes: identifying points with reflection intensity lower than a preset intensity threshold as outliers.
[0012] Optionally, the step of determining outliers in the first point cloud data includes: determining points whose distance is less than a first distance threshold as outliers; or determining points whose distance is greater than a second distance threshold as outliers; wherein, distance refers to the distance between any point and the center of the rear axle of the tractor.
[0013] Secondly, embodiments of the present invention also provide a vehicle system, including: a controller, a tractor, and a trailer; wherein, lidar is installed on both sides of the rear of the tractor for collecting raw point cloud data of the trailer and sending the raw point cloud data to the controller; the controller is used to acquire the raw point cloud data and automatically estimate the geometric dimensions and driving direction of the trailer using the method described in the first aspect.
[0014] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the method described in the first aspect.
[0015] The embodiments of the present invention bring the following beneficial effects: This invention provides an automatic estimation method and vehicle system for the geometric dimensions and driving direction of a trailer. First, the original point cloud data of the trailer is preprocessed to obtain target point cloud data. Then, principal component analysis (PCA) is used to generate trailer size estimation information based on the target point cloud data. Next, candidate regions are constructed based on the size estimation information and the articulation point location, and the target point cloud data within these regions is used as candidate trailer point cloud data. Then, the candidate trailer point cloud data is fitted to obtain trailer side point cloud data, and driving direction estimation information is generated based on a Kalman filter and the trailer side point cloud data. Finally, a bounding box of the trailer is constructed based on the driving direction estimation information and the articulation point location, and the trailer's attitude angle relative to the tractor is determined. The original point cloud data is then filtered based on the bounding box to obtain trailer point cloud data. PCA is then performed again on the trailer point cloud data until convergence conditions are met, thus obtaining the trailer's geometric dimensions and driving direction. The above-mentioned automatic estimation method not only requires no prior information on trailer model or size, but also enables automatic estimation of the geometric dimensions and driving direction of trailers of any size. Furthermore, it achieves multiple iterations through convergence conditions during the estimation process, allowing the estimated results of the trailer's geometric dimensions and driving direction to gradually approach the true values, thereby improving the estimation accuracy and, consequently, the control accuracy of the trailer.
[0016] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained through the structures particularly pointed out in the description and the drawings.
[0017] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating an automatic estimation method for the geometry and direction of travel of a trailer, provided as an embodiment of the present invention; Figure 2 A schematic diagram of a vehicle system provided in an embodiment of the present invention; Figure 3 A schematic diagram of a lidar installation is provided for an embodiment of the present invention; Figure 4A flowchart of another method for automatically estimating the geometry and direction of travel of a trailer provided in an embodiment of the present invention. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] To facilitate understanding of this embodiment, the embodiments of the present invention will be described in detail below.
[0022] Example 1 This invention provides an automatic estimation method for the geometry and direction of travel of a trailer, such as... Figure 1 As shown, the method includes the following steps: Step S102: Obtain the raw point cloud data of the trailer, preprocess the raw point cloud data to obtain the target point cloud data.
[0023] In practical applications, such as Figure 2 As shown, the vehicle system includes a tractor unit 21 and a trailer unit 22, wherein the tractor unit 21 and the trailer unit 22 are articulated together. During operation, accurately acquiring the geometric dimensions (length, width) and driving direction (attitude angle) of the trailer unit 22 is crucial for applications such as autonomous driving, automatic reversing assistance, blind spot warning, and path planning. Therefore, in order to achieve dual-side observation of the trailer unit 22, this embodiment of the invention... Figure 3 As shown, lidar 23 is installed on both sides of the rear of the tractor 21, and the original point cloud data of the trailer 22 is collected synchronously by the lidar 23 on both sides to effectively cover the two side walls of the trailer 22, reduce the blind spot on one side, and thus improve the accuracy of automatic estimation of the trailer's geometric dimensions and driving direction.
[0024] For the raw point cloud data of the trailer collected by the aforementioned lidar, each point, after coordinate transformation, also carries coordinate information (x, y, z), that is, the position of the point in the global coordinate system with the center of the rear axle of the tractor as the origin. Furthermore, the raw point cloud data needs to be preprocessed; the preprocessing process includes the following sub-steps: ① Transform the raw point cloud data to a preset coordinate system to obtain the first point cloud data; the preset coordinate system is the global coordinate system with the center of the rear axle of the tractor as the origin; ② Identify and remove outliers in the first point cloud data to obtain the second point cloud data; ③ Downsample the second point cloud data based on a voxel grid to obtain the target point cloud data.
[0025] Specifically, in sub-step ①, for the original point cloud data of the trailer collected by the lidar, each point is transformed to a preset coordinate system. For example, coordinate alignment is completed by a pre-calibrated extrinsic matrix to obtain the corresponding first point cloud data. After the coordinate transformation, each point also carries coordinate information (x, y, z), that is, the position of the point in the global coordinate system with the center of the rear axle of the tractor as the origin.
[0026] Next, in sub-step ②, outliers in the first point cloud data are identified. One method for identifying outliers is to define points with reflection intensity below a preset intensity threshold as outliers; another method is to define points with a distance less than a first distance threshold as outliers; or, points with a distance greater than a second distance threshold as outliers. Here, distance refers to the distance between any point and the center of the rear axle of the tractor. For example, points with a distance less than the first distance threshold (e.g., 0.5 meters) or a distance greater than the second distance threshold (e.g., 15 meters) are designated as outliers and removed to avoid near-field interference or far-field noise, further improving the accuracy of the target point cloud data, thereby improving the accuracy of automatic estimation of the trailer's geometry and driving direction.
[0027] After determining invalid points through sub-step ②, the first point cloud data after removing invalid points is referred to as the second point cloud data for easy differentiation. Finally, in sub-step ③, the second point cloud data is downsampled using a voxel grid to obtain the target point cloud data, thereby reducing data density and improving computational efficiency. This not only improves the accuracy of the target point cloud data but also improves the efficiency of automatic estimation of the trailer's geometric dimensions and driving direction.
[0028] It should be noted that the specific process of downsampling the second point cloud data using voxel mesh, as well as the specific process of converting the original point cloud data to a preset coordinate system and completing coordinate alignment through a pre-calibrated extrinsic matrix, can be referred to the existing technology. The embodiments of the present invention will not be described in detail here.
[0029] Step S104: Generate trailer size estimation information based on principal component analysis technology and target point cloud data.
[0030] The size estimation information includes estimated length and estimated width. The specific generation process is as follows: determine the centroid of the target point cloud data, perform decentralization based on the centroid to obtain the processed target point cloud data; determine the covariance matrix of the processed target point cloud data, and perform eigenvalue decomposition on the covariance matrix to obtain three eigenvalues and three corresponding eigenvectors; generate the trailer size estimation information based on the target point cloud data and eigenvectors.
[0031] Specifically, for the target point cloud data, the centroid of the target point cloud data is first determined, such as by calculating the average coordinates of all points in the target point cloud data and using the calculated geometric center as the centroid of the target point cloud data. Then, decentralization is performed based on the centroid by subtracting the centroid coordinates from the coordinates of each point in the target point cloud data to obtain the processed target point cloud data. A 3×3 covariance matrix is then calculated based on the processed target point cloud data. This covariance matrix describes the variance of the target point cloud data in the X, Y, and Z dimensions and the correlation between them.
[0032] The covariance matrix is decomposed into three eigenvalues and their corresponding eigenvectors. Based on the target point cloud data and the eigenvectors, trailer size estimation information is generated. Specifically, the largest eigenvalue (λ1) and the smallest eigenvalue (λ3) are determined. The eigenvector corresponding to the largest eigenvalue (λ1) is used as the first principal component vector, and the eigenvector corresponding to the intermediate eigenvalue (λ2) between the largest and smallest eigenvalues (λ1 and λ3) is used as the second principal component vector. All target point cloud data are projected onto the first principal component vector, and the distance between the maximum and minimum values among all projected points is used as the estimated length. All target point cloud data are then projected onto the second principal component vector, and the distance between the maximum and minimum values among all projected points is used as the estimated width.
[0033] The first principal component vector precisely defines the main axis direction (i.e., the length direction) of the trailer, thus representing its orientation in space. The second principal component vector precisely defines the width direction of the trailer. Furthermore, the eigenvector corresponding to the smallest eigenvalue (λ3) is used as the third principal component vector, which determines the height direction of the trailer. Therefore, based on principal component analysis technology and target point cloud data, trailer size estimation information can be generated without any prior information about the trailer model or size. The overall attitude and contour of the trailer can be quickly estimated solely through the main direction of the point cloud distribution, providing reliable initial values for subsequent precise estimation.
[0034] Step S106: Construct candidate regions based on size estimation information and articulation point positions, and use the target point cloud data within the candidate regions as candidate point cloud data for trailers.
[0035] In practical applications, the articulation point location refers to the articulation point between the tractor and the trailer. This location is determined during vehicle design and manufacturing and is a fixed structural parameter of the tractor, which can be pre-stored in the vehicle system's controller. After the controller generates trailer size estimation information based on principal component analysis technology and target point cloud data, it can construct a candidate region (i.e., the trailer's outline) based on the size estimation information and the articulation point location. For example, the articulation point location can be used as the midpoint of the trailer's width, and the target point cloud data within the candidate region can be used as the trailer's candidate point cloud data. This improves the accuracy of the trailer candidate point cloud data used to describe the trailer, thereby improving the estimation accuracy of the trailer's geometric dimensions and travel direction.
[0036] Step S108: Fit the candidate point cloud data of the trailer to obtain the side point cloud data of the trailer.
[0037] Specifically, Random Sample Consensus (RANSAC) plane fitting is performed on the candidate point cloud data of the trailer on the left and right sides of the trailer, and when the number of iterations reaches a preset number, the plane equations of the left and right sides of the trailer are obtained; and the candidate point cloud data of the trailer in the plane equations are used as the point cloud data of the trailer side.
[0038] In practical applications, RANSAC plane fitting is performed on the candidate point cloud data of the trailer on both the left and right sides, and distance thresholds and iteration numbers are set to obtain the planar equations of the two sides of the trailer. For the planar equations, the internal point cloud is retained, while the external point cloud is discarded, resulting in the trailer side point cloud data. Therefore, by fitting the planar model of the trailer region using RANSAC and introducing a dynamic outlier proportion threshold to improve fitting stability, the system effectively resists noise, occlusion, and outliers in the point cloud, thereby obtaining a more accurate planar equation for the trailer sides. This provides high-quality input for direction estimation and further improves the estimation accuracy of the trailer's geometry and driving direction. It should be noted that the above RANSAC fitting process can refer to existing technologies, and the embodiments of this invention will not be described in detail here.
[0039] Step S110: Generate trailer travel direction estimation information based on Kalman filter and trailer side point cloud data.
[0040] Specifically, the output of the Kalman filter at the previous moment is used as the state prior at the current moment, and the trailer side direction corresponding to the trailer side point cloud data is used as the observation value of the Kalman filter at the current moment, so that the Kalman filter can fuse and output the driving direction estimation information at the current moment. In practical applications, the Kalman filter is designed to fuse direction information by directly using the filtered output of the previous moment as the state prior at the current moment, and using the trailer side direction corresponding to the trailer side point cloud data as the observation value of the Kalman filter at the current moment. At this time, the Kalman filter fuses and outputs the optimal direction estimate (i.e., driving direction estimation information) at the current moment, which is used for subsequent boundary calculation and attitude output. It should be noted that when using the filtered output of the previous moment as the state prior at the current moment, if it is the first frame of data, since there is no historical filtered output result, the principal axis direction estimated by the principal component analysis technique in step S104 can be used as the initial filtered output.
[0041] Therefore, temporal direction fusion is achieved through a Kalman filter. This involves directly using the filtered output from the previous time step as the state prior for the current time step and fusing it with the observations from the Kalman filter at the current time step. This approach avoids dependence on modeling the trailer's motion characteristics, simplifies the vehicle system structure, and effectively suppresses RANSAC estimation jitter, improving the continuity and stability of trailer travel direction estimation. Furthermore, the principal axis direction estimated using principal component analysis in the first frame of data is used as the initial direction, further ensuring the vehicle system's self-starting capability, especially demonstrating excellent performance during low-speed cornering.
[0042] Step S112: Construct the bounding box of the trailer based on the estimated travel direction information and the articulation point position, and determine the attitude angle of the trailer relative to the tractor.
[0043] Based on the estimated travel direction information output by the Kalman filter, and combined with the articulation point positions of the tractor and trailer, an oriented bounding box (OBB) for the trailer can be constructed. This bounding box can be a two-dimensional or three-dimensional bounding box, and the attitude angle (i.e., travel direction) of the trailer relative to the tractor can be determined. The process of constructing the bounding box can refer to existing technologies, and will not be described in detail here.
[0044] Step S114: Based on the bounding box, the original point cloud data is filtered to obtain trailer point cloud data. Then, principal component analysis is performed again on the trailer point cloud data according to the principal component analysis technique until the convergence condition is met, so as to obtain the geometric dimensions and driving direction of the trailer.
[0045] For the aforementioned bounding box, the original point cloud data is re-filtered, retaining only the point cloud within the bounding box as the trailer point cloud data to obtain more accurate trailer point cloud information. Then, the process returns to step S104 for the next iteration, where principal component analysis (PCA) is performed again on the trailer point cloud data until the convergence condition is met, yielding the trailer's geometric dimensions and driving direction. Therefore, by implementing multiple iterations through the convergence condition, the estimated results of the trailer's geometric dimensions and driving direction gradually approach the true values, thereby improving the estimation accuracy.
[0046] It should be noted that the above convergence conditions include, but are not limited to, reaching the preset total number of iterations, and can be set according to the actual situation.
[0047] In summary, the automatic estimation method for trailer geometry and driving direction provided by the embodiments of the present invention not only eliminates the need for any prior information on trailer model or size, enabling automatic estimation of the geometry and driving direction of trailers of any size, but also achieves multiple iterations through convergence conditions during the estimation process, allowing the estimated results of trailer geometry and driving direction to gradually approach the true values, thereby improving the estimation accuracy and consequently improving the control accuracy of the trailer.
[0048] Example 2 Based on the above-described method embodiments, this invention provides another method for automatically estimating the geometric dimensions and driving direction of a trailer. This method describes the process of automatically estimating the geometric dimensions and driving direction of a trailer through a closed-loop mechanism of "coarse estimation—fine estimation—filtering—feedback—re-estimation." Figure 4 As shown, the method includes the following steps: Step S400, Startup: Load the lidar extrinsic parameter matrix and initialize the Kalman filter. The extrinsic parameter matrix is used to transform the raw point cloud data acquired by the lidar into a global coordinate system with the center of the tractor's rear axle as the origin.
[0049] Step S402: Obtain the raw point cloud data of the trailer; that is, the LiDAR on both the left and right sides simultaneously collects the raw point cloud data of the trailer.
[0050] Step S404 involves preprocessing the original point cloud data to obtain the target point cloud data. This preprocessing includes outlier removal, voxel mesh downsampling, and coordinate transformation, as detailed in the foregoing embodiments. Further details are omitted here.
[0051] Step S406: Principal component analysis is used to roughly estimate the size information; this includes, but is not limited to, calculating the centroid and covariance matrix of the target point cloud data, eigenvalue decomposition, and projection calculation of the estimated length and width of the trailer, etc. For details, please refer to the aforementioned embodiments.
[0052] Step S408: Construct candidate regions; that is, construct candidate regions based on size estimation information and articulation point positions, and use the target point cloud data within the candidate regions as candidate point cloud data for trailers.
[0053] Step S410: Based on RANSAC, refine the side plane to obtain trailer side point cloud data; that is, perform RANSAC plane fitting on the candidate point cloud data of the trailer on the left and right sides respectively to obtain the plane equations of the left and right sides of the trailer, and use the candidate point cloud data of the trailer within the plane equations as the trailer side point cloud data.
[0054] Step S412: A Kalman filter is used to achieve temporal direction fusion; that is, the filter output of the previous time step is directly used as the state prior of the current time step and fused with the observation value of the Kalman filter at the current time step to make the trailer's driving direction estimation information more accurate.
[0055] Step S414: Construct the bounding box of the trailer and determine the attitude angle of the trailer relative to the tractor.
[0056] Step S416: Filter out trailer point cloud data based on bounding boxes.
[0057] Step S418: Determine whether the convergence condition has been met. If yes, proceed to step S420; otherwise, return to step S406 and proceed to the next iteration until the convergence condition is met.
[0058] Step S420: Output the trailer's geometry and direction of travel.
[0059] Therefore, in the above-mentioned automatic estimation process, the trailer's geometric dimensions and driving direction are automatically estimated through a closed-loop mechanism of "coarse estimation (principal component analysis) - fine estimation (RANSAC) - filtering (Kalman filter) - feedback (if convergence condition is not met) - iterative re-estimation". This makes the estimated results of the trailer's geometric dimensions and driving direction gradually approach the true values, thereby improving the estimation accuracy of the trailer's geometric dimensions and driving direction.
[0060] Example 3 Based on the above method embodiments, this invention also provides a vehicle system, including: a controller, a tractor, and a trailer; wherein, lidar is installed on both sides of the rear of the tractor to collect raw point cloud data of the trailer and send the raw point cloud data to the controller; the controller is used to acquire the raw point cloud data and automatically estimate the geometric dimensions and driving direction of the trailer using the above method embodiments.
[0061] It should be noted that the specific automatic estimation process can be referred to the above method embodiments, and the embodiments of the present invention will not be described in detail here. Furthermore, the above controller can be set up independently and connected to the control module of the tractor; alternatively, it can be set up in the tractor, depending on the actual situation.
[0062] The vehicle system provided in this embodiment of the invention has the same technical features as the automatic estimation method for the geometry and driving direction of the trailer provided in the above embodiments, so it can also solve the same technical problems and achieve the same technical effects.
[0063] This embodiment also provides a computer-readable storage medium storing a computer program, which, when run by a processor, executes the above-described automatic estimation method for the geometry and direction of travel of the trailer.
[0064] The automatic estimation method for trailer geometry and driving direction and the computer program product for the vehicle system provided in this invention include a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.
[0065] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0066] Furthermore, in the description of the embodiments of the present invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention based on the specific circumstances.
[0067] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0068] In the description of this invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0069] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for automatically estimating the geometric dimensions and driving direction of a trailer, characterized in that, The method includes: The raw point cloud data of the trailer is acquired, and the raw point cloud data is preprocessed to obtain the target point cloud data. The size estimation information of the trailer is generated based on principal component analysis technology and the target point cloud data; wherein, the size estimation information includes estimated length and estimated width; Based on the size estimation information and the articulation point location, a candidate region is constructed, and the target point cloud data within the candidate region is used as the trailer candidate point cloud data. The candidate point cloud data of the trailer is fitted to obtain the side point cloud data of the trailer; The driving direction estimation information of the trailer is generated based on the Kalman filter and the side point cloud data of the trailer; The bounding box of the trailer is constructed based on the estimated driving direction information and the position of the articulation point, and the attitude angle of the trailer relative to the tractor is determined. Based on the bounding box, the original point cloud data is filtered to obtain trailer point cloud data. Then, principal component analysis is performed again on the trailer point cloud data according to the principal component analysis technique until the convergence condition is met, so as to obtain the geometric dimensions and driving direction of the trailer.
2. The method according to claim 1, characterized in that, The step of generating the trailer's driving direction estimation information based on the Kalman filter and the trailer's side point cloud data includes: The output of the Kalman filter at the previous moment is used as the state prior at the current moment, and the trailer side direction corresponding to the trailer side point cloud data is used as the observation value of the Kalman filter at the current moment, so that the Kalman filter can fuse and output the driving direction estimation information at the current moment.
3. The method according to claim 1, characterized in that, The step of fitting the candidate point cloud data of the trailer to obtain the side point cloud data of the trailer includes: Random sampling consistency plane fitting is performed on the candidate point cloud data of the trailer on the left and right sides respectively, and when the number of iterations reaches a preset number, the plane equations of the left and right sides of the trailer are obtained; and the candidate point cloud data of the trailer in the plane equations are used as the point cloud data of the trailer side.
4. The method according to claim 1, characterized in that, The step of generating the trailer size estimation information based on principal component analysis technology and the target point cloud data includes: The centroid of the target point cloud data is determined, and the data is decentralized based on the centroid to obtain the processed target point cloud data. Determine the covariance matrix of the processed target point cloud data, and perform eigenvalue decomposition on the covariance matrix to obtain three eigenvalues and three corresponding eigenvectors; The size estimation information of the trailer is generated based on the target point cloud data and the feature vector.
5. The method according to claim 4, characterized in that, The step of generating the trailer size estimation information based on the target point cloud data and the feature vector includes: Determine the maximum and minimum eigenvalues among the three eigenvalues, and use the eigenvector corresponding to the maximum eigenvalue as the first principal component vector, and use the eigenvector corresponding to the intermediate eigenvalue between the maximum and minimum eigenvalues as the second principal component vector; All target point cloud data are projected onto the first principal component vector, and the distance between the maximum and minimum values among all projected points is used as the estimated length. All target point cloud data are projected onto the second principal component vector, and the distance between the maximum and minimum values among all projected points is used as the estimated width.
6. The method according to claim 1, characterized in that, The step of preprocessing the original point cloud data to obtain the target point cloud data includes: The original point cloud data is converted to a preset coordinate system to obtain the first point cloud data; wherein, the preset coordinate system is a global coordinate system with the center of the rear axle of the tractor as the origin; Identify outliers in the first point cloud data and remove them to obtain the second point cloud data; The target point cloud data is obtained by downsampling the second point cloud data based on a voxel grid.
7. The method according to claim 6, characterized in that, The step of determining outliers in the first point cloud data includes: Points with reflection intensity lower than a preset intensity threshold are identified as abnormal points.
8. The method according to claim 6, characterized in that, The step of determining outliers in the first point cloud data includes: Points whose distance is less than a first distance threshold are identified as abnormal points; or, points whose distance is greater than a second distance threshold are identified as abnormal points. The distance refers to the distance between any point and the center of the rear axle of the tractor.
9. A vehicle system, characterized in that, include: The system includes a controller, a tractor, and a trailer; wherein, lidar is installed on both rear sides of the tractor to collect raw point cloud data of the trailer and send the raw point cloud data to the controller. The controller is used to acquire the raw point cloud data and automatically estimate the geometric dimensions and driving direction of the trailer using the method described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, performs the steps of the method described in any one of claims 1-8.