A vehicle railway flatbed detection method based on laser radar
Through the vehicle railway flat panel detection method based on lidar, using two-dimensional point cloud data to identify edge points and calculate distances, the problems of poor real-time, high computing complexity and limited installation in the prior art are solved, and more efficient vehicles are achieved Consistency between offset detection and installation scheme.
Patent Information
- Application Number
- CN202411774229.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The existing vehicle railway flat panel detection method based on three-dimensional lidar has problems such as poor real-time performance, high computational complexity, limited installation location, cumbersome calibration work in the early stage, and inconsistent installation plans of different models.
Using the vehicle railway flat panel detection method based on lidar, the two-dimensional point cloud data of the railway flat panel sensed by lidar is determined, and the positive projection point with a scanning angle of the preset angle is traversed to identify edge points. , calculate the distance between the edge point and the positive projection point based on the trigonometric function, and detect whether the vehicle is offset from the center of the railway slab.
It improves real-time identification and simplicity of calculation, reduces the limitation of vehicle installation location, reduces the complexity of pre-calibration work, and improves the consistency of installation plans for different models.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power electronic control technology, and in particular to a vehicle railway flatbed detection method based on laser radar. Background Art
[0002] When transporting vehicles over long distances, they are usually transported on trains by loading them on railway flatbeds. When loading large and heavy vehicles such as cranes and special vehicles, the center of the vehicle must be basically aligned with the center of the railway flatbed, and the vehicle must be fixed with steel cables to prevent rollover accidents when the train turns quickly. When the vehicle is traveling on the railway flatbed, since most of the railway flatbed is in the driver's blind spot, it is difficult to make the center of the vehicle and the center of the railway flatbed meet the requirements of the specifications, so manual assisted guidance is usually used. Even experienced drivers and guides need more than ten minutes to accurately complete the loading task of a large vehicle, which is time-consuming and labor-intensive.
[0003] At present, a method and system for automatic loading deviation identification of equipment based on a three-dimensional laser radar device (patent number: 114460600A) records that a three-dimensional laser radar device is used to identify the railway flatbed area, and the three-dimensional point cloud data is processed to obtain a fitting straight line of the flatbed edge, and based on this, the distance deviation and angle deviation of the vehicle center relative to the railway flatbed center are calculated. When processing data, this method needs to convert the data from three-dimensional coordinates to two-dimensional plane coordinates, and then perform linear fitting on the data. Poor real-time performance and high computational complexity. At the same time, the radar needs to be installed at the center point of the front of the vehicle, and a certain inclination angle is required to realize the function. Therefore, the installation position of the vehicle is limited, and a lot of preliminary calibration work is required in actual use. Different installation plans need to be customized for different vehicle models, which is undoubtedly time-consuming and labor-intensive for high-frequency and large-scale vehicle railway flatbed loading.
[0004] In view of this, the present application urgently needs to provide a method that can improve the real-time recognition and the simplicity of calculation, while reducing the restrictions on the vehicle installation location, reducing the preliminary calibration work, and improving the consistency of the installation solutions for different vehicle models. Summary of the invention
[0005] The present application provides a laser radar-based vehicle railway flatbed detection method, a laser radar device, and a processing unit for a vehicle and a laser radar device, which can improve the real-time recognition and the simplicity of calculation while reducing the restrictions on the vehicle's installation position and improving the consistency of installation solutions for different vehicle models.
[0006] The first aspect of the application provides a vehicle railway flatbed detection method based on laser radar, which is applied to a processing unit of a laser radar device, and the laser radar device is installed on a vehicle. The method includes: obtaining two-dimensional point cloud data of the railway flatbed sensed by the laser radar of the laser radar device, the two-dimensional point cloud data including multiple two-dimensional point data; determining the two-dimensional point data with a scanning angle of a preset angle as an orthographic projection point, and the orthographic projection point is the orthographic projection point of the scanning line emission hole of the laser radar on the railway flatbed; traversing the two-dimensional point cloud data from the orthographic projection point according to the angle difference of the scanning angle between adjacent two-dimensional point data, if the difference of the scanning distance of adjacent two-dimensional point data is greater than the distance threshold, determining the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data as the edge point of the railway flatbed, the edge point including the first edge point and the second edge point; based on the trigonometric function, determining the first distance between the first edge point and the orthographic projection point, and the second distance between the second edge point and the orthographic projection point according to the scanning distance and scanning angle of the first edge point and the second edge point; detecting whether the vehicle deviates from the center of the railway flatbed according to the deviation between the first distance and the second distance.
[0007] In some embodiments of the first aspect, based on a trigonometric function, a first distance between the first edge point and the positive projection point, and a second distance between the second edge point and the positive projection point are determined according to a scanning distance and a scanning angle of the first edge point and the second edge point, including: obtaining an edge length of the railway slab according to the cosine theorem, and the scanning distance and the scanning angle of the first edge point and the second edge point; obtaining a cosine value of a first angle with the first edge point as a vertex, and a cosine value of a second angle with the second edge point as a vertex according to the edge length, the scanning distance of the first edge point and the second edge point; obtaining the first distance between the first edge point and the positive projection point according to the scanning distance of the first edge point and the cosine value of the first angle; and obtaining the second distance between the second edge point and the positive projection point according to the scanning distance of the second edge point and the cosine value of the second angle.
[0008] In some embodiments of the first aspect, detecting whether the vehicle is offset from the center of the railway flat plate according to a deviation between the first distance and the second distance includes: if the first distance is not equal to the second distance, determining that the vehicle is offset from the center of the railway flat plate; if the first distance is equal to the second distance, determining that the vehicle is not offset from the center of the railway flat plate.
[0009] In some embodiments of the first aspect, a first tangent value of the first angle is determined based on a cosine value of the first angle; a second tangent value of the second angle is determined based on a cosine value of the second angle; two-dimensional point data whose tangent value is less than or equal to the first tangent value or the second tangent value is retained to obtain retained two-dimensional point cloud data; and the first edge point and the second edge point are re-determined based on the retained two-dimensional point cloud data.
[0010] In some embodiments of the first aspect, after determining the first distance between the first edge point and the positive projection point, and the second distance between the second edge point and the positive projection point, the method further includes: continuously reacquiring the two-dimensional point cloud data of the railway flat plate, and determining new first distances and second distances based on the reacquired two-dimensional point cloud data, until the acquisition time of the processing unit meets the calculation cycle, and obtaining the first distance set and the second distance set; removing abnormal values in the first distance set and the second distance set; determining the average value of the first distance set as the first target distance, and the average value of the second distance set as the second target distance; and detecting whether the vehicle deviates from the center of the railway flat plate according to the deviation between the first target distance and the second target distance.
[0011] In some embodiments of the first aspect, an offset distance of the laser radar device from the center of the vehicle is obtained; if the offset distance is the distance that the laser radar device is offset from the center of the vehicle to the first edge point, the offset distance is added to the first distance and the offset distance is subtracted from the second distance to adjust the first distance and the second distance; if the offset distance is the distance that the laser radar device is offset from the center of the vehicle to the second edge point, the offset distance is subtracted from the first distance and the offset distance is added to the second distance to adjust the first distance and the second distance; based on the deviation between the adjusted first distance and the second distance, it is detected whether the vehicle is offset from the center of the railway plate.
[0012] In some embodiments of the first aspect, after detecting whether the vehicle deviates from the center of the railway flat plate according to the deviation between the first distance and the second distance, the method further includes sending a deviation result of whether the vehicle deviates from the center of the railway flat plate to the vehicle.
[0013] According to a second aspect of the present application, a laser radar device is provided. The laser radar device is installed on a vehicle. The laser radar device includes a laser radar and a processing unit. The processing unit is used to obtain two-dimensional point cloud data of a railway flat plate sensed by the laser radar of the laser radar device, wherein the two-dimensional point cloud data includes multiple two-dimensional point data; determine that the two-dimensional point data with a scanning angle of a preset angle is an orthographic projection point, and the orthographic projection point is an orthographic projection point of a scanning line emission hole of the laser radar on the railway flat plate; traverse the two-dimensional point cloud data from the orthographic projection point according to the angle difference of the scanning angle between adjacent two-dimensional point data, if the difference of the scanning distances of adjacent two-dimensional point data is greater than a distance threshold, determine that the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data is an edge point of the railway flat plate, and the edge point includes a first edge point and a second edge point; based on a trigonometric function, determine a first distance between the first edge point and the orthographic projection point, and a second distance between the second edge point and the orthographic projection point according to the scanning distances and scanning angles of the first edge point and the second edge point; detect whether the vehicle deviates from the center of the railway flat plate according to the deviation between the first distance and the second distance.
[0014] A third aspect of the present application provides a vehicle on which a laser radar device is installed.
[0015] The fourth aspect of the present application provides a processing unit, including: a processor and a memory; the memory is coupled to the processor, the memory is used to store computer program code, and the processor calls the computer program code to enable the processing unit to execute the method of the first aspect.
[0016] The present application provides a vehicle railway flatbed detection method based on laser radar, a laser radar device, a vehicle and a processing unit of the laser radar device, which obtains two-dimensional point cloud data of a railway flatbed sensed by the laser radar, including multiple two-dimensional point data. Then, the two-dimensional point data with a scanning angle of a preset angle is determined to be the positive projection point of the laser radar scanning line emission hole on the railway flatbed, and according to the angle difference of the scanning angle between adjacent two-dimensional point data, the two-dimensional point cloud data is traversed from the positive projection point. If the difference in the scanning distance of the adjacent two-dimensional point data is greater than the distance threshold, the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data is determined to be the edge point of the railway flatbed, and the edge point includes a first edge point and a second edge point. Then, based on the trigonometric function, according to the scanning distance and scanning angle of the first edge point and the second edge point, the first distance between the first edge point and the positive projection point, and the second distance between the second edge point and the positive projection point are determined. Finally, according to the deviation between the first distance and the second distance, it is detected whether the vehicle deviates from the center of the railway flatbed.
[0017] This detection method does not need to use the height information of the point cloud data, nor does it need to convert the sensed data from three-dimensional coordinates to two-dimensional plane coordinates for processing. The calculation method of the detection deviation is simple, the recognition is highly real-time, the spatial complexity of the operation is low, and fewer processor resources are required. Due to the low spatial complexity of the operation and the fewer processor resources required, the detection method provided by the present application can be directly deployed in the processing unit of the laser radar device, and the laser radar device can be easily installed on different vehicles to detect whether different vehicles are offset on the railway flatbed. The installation inclination angle can be adjusted between 0 and 90° under the condition that the laser radar can scan the railway flatbed, reducing the restrictions on the installation inclination angle. At the same time, the calculation method of the detection deviation of the present application is applicable to vehicles of different models, which improves the consistency of the installation schemes of different models. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0019] Figure 1 A schematic diagram of the structure of a vehicle provided in an embodiment of the present application;
[0020] Figure 2 A schematic diagram of the structure of a laser radar device provided in an embodiment of the present application;
[0021] Figure 3 Schematic diagram of the railway flatbed scenario provided for related technologies;
[0022] Figure 4 A schematic diagram of a process flow of a vehicle railway flatbed detection method based on laser radar provided in an embodiment of the present application;
[0023] Figure 5 A diagram of a scenario for a vehicle railway flatbed detection method based on laser radar provided in an embodiment of the present application;
[0024] Figure 6 Another scenario diagram of the vehicle railway flatbed detection method based on laser radar provided in the embodiment of the present application;
[0025] Figure 7 A schematic diagram of the structure of a processing unit provided in an embodiment of the present application.
[0026] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0028] The terms "first", "second", etc. involved in this application are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.
[0029] The following is an explanation of the relevant technologies.
[0030] When transporting vehicles over long distances, they are usually transported on trains by loading them on railway flatbeds. When loading large and heavy vehicles such as cranes and special vehicles, the center of the vehicle must be basically aligned with the center of the railway flatbed, and the vehicle must be fixed with steel cables to prevent rollover accidents when the train turns quickly. When the vehicle is traveling on the railway flatbed, since most of the railway flatbed is in the driver's blind spot, it is difficult to make the center of the vehicle and the center of the railway flatbed meet the requirements of the specifications, so manual assisted guidance is usually used. Even experienced drivers and guides need more than ten minutes to accurately complete the loading task of a large vehicle, which is time-consuming and labor-intensive.
[0031] At present, a method and system for automatic loading deviation identification of equipment based on a three-dimensional laser radar device (patent number: 114460600A) records that a three-dimensional laser radar device is used to identify the railway flatbed area, and the three-dimensional point cloud data is processed to obtain a fitting straight line of the flatbed edge, and based on this, the distance deviation and angle deviation of the vehicle center relative to the railway flatbed center are calculated. When processing data, this method needs to convert the data from three-dimensional coordinates to two-dimensional plane coordinates, and then perform linear fitting on the data. The real-time performance is poor and the calculation complexity is high. At the same time, the radar needs to be installed at the center point of the front of the vehicle, and a certain inclination angle is required to realize the function. Therefore, the installation position of the vehicle is limited, and a lot of preliminary calibration work is required in actual use. Different installation plans need to be customized for different vehicle models, which is undoubtedly time-consuming and labor-intensive for high-frequency and large-scale vehicle railway flatbed loading. Specifically, the limitations of the method and system for automatic loading deviation identification of equipment based on a three-dimensional laser radar device include the following aspects:
[0032] 1. The mathematical methods used in data processing are relatively complex, which is manifested in the large amount of data, requiring huge cache space and transmission capabilities; the data processing process is cumbersome, involving the conversion of three-dimensional coordinates to two-dimensional coordinates, coordinate rotation and translation transformation, plane fitting and straight line fitting, which has high requirements on processor performance; in summary, the spatial complexity is high and more processor resources are required.
[0033] 2. The system is not easy to install. In actual use, it needs to be manually calibrated or customized for different vehicle models, which is inefficient for large-scale vehicle loading and transportation.
[0034] 3. The system cost is high. The use of 3D lidar data for processing requires a high-performance processor. The added coordinate transformation process makes the entire processing flow more complicated and increases the amount of computation required for distance deviation value calculation.
[0035] 4. The RANSAC algorithm used requires a sufficient number of iterations to ensure a high probability of finding the optimal solution when matching and filtering data, which will cause the algorithm to run for a long time and fail to respond to various changes and adjustments required during the vehicle's progress. Since the internal parameters and thresholds need to be manually adjusted and the proportion of outlier data filtered is low, changes in the surrounding environment have a greater impact on the algorithm's calculation accuracy.
[0036] 5. For large-scale 3D lidar data sets, as a machine learning algorithm, the K-means algorithm used in the existing technology has a high computational complexity, especially in each iteration, it is necessary to calculate the distance from all points to all cluster centers, which may lead to slower processing speed. Therefore, data preprocessing, such as data smoothing and filtering, has to be performed, which also increases the difficulty of deploying the algorithm on a microprocessor.
[0037] 6. It can only be loaded on the front or rear of the vehicle, and cannot determine the overall position of the vehicle on the flatbed, such as trailers and other large vehicles.
[0038] In view of this, the present application provides a laser radar-based vehicle railway flatbed detection method, a laser radar device, and a processing unit for a vehicle and a laser radar device, which can improve the real-time recognition and calculation simplicity while reducing the restrictions on the vehicle's installation location and improving the consistency of installation solutions for different vehicle models.
[0039] See also Figures 1 to 3 , Figure 1 A schematic diagram of the structure of a vehicle provided in the present application. A laser radar device 100 is installed on the vehicle 30 . Figure 2 A schematic diagram of the structure of the laser radar device provided in the present application. The laser radar device 100 includes a laser radar 10 and a processing unit 20. The laser radar 10 is used to sense the two-dimensional point cloud data of the railway flatbed. Specifically, the laser radar 10 includes a scanning line transmitting hole 11, and the scanning line transmitting hole 11 is used to transmit the scanning line to the railway flatbed 300, and receive the reflected line reflected from the railway flatbed 300, and generate the two-dimensional point cloud data according to the reflected line. The processing unit 20 is used to detect whether the center of the vehicle 30 is offset from the center of the railway flatbed 300 according to the laser radar-based vehicle railway flatbed detection method and two-dimensional point cloud data provided in the present application.
[0040] like Figure 1 and Figure 3 An application scenario diagram of the laser radar device shown in FIG. 1 is that when a vehicle 30 is transported by a train, the train is paved with Figure 3In the railway flatbed 300 shown, the processing unit 20 of the laser radar device 100 responds to the start-up instruction of the vehicle 30 to obtain the two-dimensional point cloud data of the railway flatbed 300 sensed by the laser radar 10, including multiple two-dimensional point data. Next, the two-dimensional point data with a scanning angle of a preset angle is determined to be the positive projection point of the scanning line emission hole 11 of the laser radar 10 on the railway flatbed 300, and according to the angle difference of the scanning angle between adjacent two-dimensional point data, the two-dimensional point cloud data is traversed from the positive projection point. If the difference in the scanning distance of the adjacent two-dimensional point data is greater than the distance threshold, the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data is determined to be the first edge point or the second edge point of the railway flatbed 300. Next, based on the trigonometric function, the first distance between the first edge point and the positive projection point, and the second distance between the second edge point and the positive projection point are determined. Finally, according to the deviation between the first distance and the second distance, it is detected whether the vehicle 30 deviates from the center of the railway flatbed 300.
[0041] It should be noted that Figure 1 This is only a schematic diagram of a structure provided in the embodiment of the present application. Figure 1 The actual form of the various devices included in the Figure 1 The interaction mode between devices is limited, and in the specific application of the solution, it can be set according to actual needs.
[0042] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0043] Please combine Figure 2 and Figure 4 , Figure 4 The present invention provides a flow chart of a laser radar-based vehicle railway flatbed detection method, the detection method may be performed by a laser radar device 100, specifically, the processing unit 20 of the laser radar device 100. Figure 4 As shown, the detection method may include the following steps:
[0044] Step S110: Acquire the two-dimensional point cloud data of the railway slab sensed by the laser radar of the laser radar device.
[0045] Specifically, Figure 5As shown, the processing unit 20 obtains the two-dimensional point cloud data sensed by the laser radar 10 rotating with the scanning starting point O1 as the starting point, and the rotation range can be 0° to 360°. The two-dimensional point cloud data includes a plurality of two-dimensional point data. Each two-dimensional point data includes a scanning distance and a scanning angle. The scanning distance refers to the distance between the scanning line launch hole 11 of the laser radar 10 and the intersection of the scanning line of the scanning line launch hole 11 and the railway flatbed 300. The scanning angle refers to the angle between the scanning line and the starting scanning line of the scanning starting point O1. For example, as Figure 5 As shown, the two-dimensional point data includes point 1, point 2 and point 3, R a Indicates the scanning distance of point 1, R b Indicates the scanning distance of point 3. ∠W a Indicates the scanning angle of point 1, ∠W b Indicates the scanning angle of point 3.
[0046] In one embodiment, after acquiring the two-dimensional point cloud data, the two-dimensional point data with a scanning distance of zero can be deleted to delete abnormal values. In one embodiment, the acquired two-dimensional point cloud data can be stored in a data structure array so that the two-dimensional point cloud data can be called in the data structure array later.
[0047] Step S120: Determine the two-dimensional point data whose scanning angle is a preset angle as the forward projection point.
[0048] The setting of the preset angle is related to the rotation range of the laser radar 10 and can be 180°. The orthographic projection point is the orthographic projection point of the scanning line emission hole 11 of the laser radar 10 on the railway flat plate 300. For example, Figure 5 As shown, point o is the position of the scanning line emission hole 11, and point 2 is the positive projection point.
[0049] Step S130: According to the angle difference of the scanning angles between adjacent two-dimensional point data, traverse the two-dimensional point cloud data starting from the positive projection point, if the difference of the scanning distances of adjacent two-dimensional point data is greater than the distance threshold, determine that the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data is the edge point of the railway slab, and the edge point includes a first edge point and a second edge point.
[0050] Specifically, the angle difference can be obtained by calculating the scanning angle between adjacent two-dimensional point data, or the scanning resolution of the laser radar 10 can be used as the angle difference. The angle difference can be 0.1°.
[0051] The difference in distance thresholds may be 15 cm or 10 cm, etc. It is understandable that the difference in scanning distances between the two-dimensional point data in the railway slab 300 area is relatively small, generally with a difference of about 0.3 or 0.5 cm, while the difference in scanning distances between the two-dimensional point data outside the railway slab 300 area and the railway slab 300 area is relatively large, generally with a difference of about 15 cm or 10 cm. If the difference in scanning distances between adjacent two-dimensional point data is greater than 15 cm or 10 cm, it means that the two-dimensional point data with a smaller scanning distance in the adjacent two-dimensional point data is an edge point of the railway slab 300, wherein the edge point of one side of the railway slab 300 is a first edge point, and the edge point of the other side opposite to the side is a second edge point. For example, Figure 5 As shown, point 1 is determined to be the first edge point based on the difference in scanning distance between point 1 and the adjacent two-dimensional point data being greater than 15 cm, and the scanning distance of point 1 being less than the two-dimensional point data. Similarly, point 3 is determined to be the second edge point based on the difference in scanning distance between point 3 and the adjacent two-dimensional point data being greater than 15 cm, and the scanning distance of point 3 being less than the two-dimensional point data.
[0052] Whether the edge point is a point on the length or width of the railway flatbed 300 depends on the installation position of the laser radar device 100. When the laser radar device 100 is installed at the front or rear of the vehicle 30, the edge point is a point on the width of the railway flatbed 300, and when the laser radar device 100 is installed on the body side of the vehicle 30, the edge point is a point on the length of the railway flatbed 300.
[0053] At the same time, the two-dimensional point data whose difference in scanning distance from the first edge point or the second edge point is less than the characteristic distance threshold can be determined as the two-dimensional characteristic point of the railway slab 300. The characteristic distance threshold can be 0.3 cm or 0.5 cm.
[0054] It is understandable that the first edge point, the second edge point and the two-dimensional feature point of the railway slab 300 may be calculated in real time or processed offline.
[0055] Step S140: Based on the trigonometric function, determine the first distance between the first edge point and the orthographic projection point, and the second distance between the second edge point and the orthographic projection point according to the scanning distance and the scanning angle of the first edge point and the second edge point.
[0056] Specifically, Figure 5 As shown, the scanning distance R of the first edge point 1 a , the scanning distance R of the second edge point 3 b and the railway slab 300 form a triangle. Therefore, combining the trigonometric function, the scanning distance R a and R b And the scanning angle ∠W a and ∠W b, we can get the first distance D between the first edge point 1 and the positive projection point 2 a , and the second distance D between the second edge point 3 and the orthographic projection point 2 b .
[0057] Step S150: Detecting whether the vehicle deviates from the center of the railway slab according to the deviation between the first distance and the second distance.
[0058] In one embodiment, if the first distance is not equal to the second distance, it is determined that the vehicle 30 is offset from the center of the railway flat plate 300. If the first distance is equal to the second distance, it is determined that the vehicle 30 is not offset from the center of the railway flat plate 300. Specifically, the difference between the first distance and the second distance is divided by two to obtain an offset result. If the offset result is zero, the first distance is equal to the second distance. If the offset result is not zero, the first distance is not equal to the second distance. Further, if the offset result is greater than zero, the offset result indicates that the vehicle 30 is offset from the center of the railway flat plate 300 to the first edge point 1. If the offset result is less than zero, the offset result indicates that the vehicle 30 is offset from the center of the railway flat plate 300 to the second edge point 3.
[0059] In some embodiments, after detecting whether the vehicle 30 deviates from the center of the railway flat plate 300, the deviation result of whether the vehicle 30 deviates from the center of the railway flat plate 300 is sent to the vehicle 30, so that the vehicle 30 adjusts the body posture based on the deviation result so that the center of the vehicle 30 coincides with the center of the railway flat plate 300. Alternatively, the driver adjusts the body posture according to the deviation result displayed on the display unit of the vehicle 30 so that the center of the vehicle 30 coincides with the center of the railway flat plate 300.
[0060] It can be understood that in the above technical solution, there is no need to use the height information of the three-dimensional point cloud data, nor is there any need to convert the sensed data from three-dimensional coordinates to two-dimensional plane coordinates for processing. The calculation method of the detection deviation is simple, the recognition is real-time, the spatial complexity of the operation is low, and the processor resources required are less. Due to the low spatial complexity of the operation and the less processor resources required, the detection method provided by the present application can be directly deployed in the processing unit 20 of the laser radar device 100, and the laser radar device 100 can be easily installed on different vehicles 30 to detect whether different vehicles 30 are offset on the railway flatbed 300. The installation inclination angle can be adjusted between 0 and 90° (excluding 90°) when the laser radar 10 can scan the railway flatbed 300, reducing the restriction on the installation inclination angle. At the same time, the calculation method of the detection deviation of the present application is applicable to vehicles 30 of different models, which improves the consistency of the installation schemes of different models.
[0061] In some embodiments, see Figure 5, step S140: based on the trigonometric function, according to the scanning distance and scanning angle of the first edge point and the second edge point, determine the first distance between the first edge point and the positive projection point, and the second distance between the second edge point and the positive projection point, including
[0062] Step S131: Obtain the edge length of the railway slab according to the cosine theorem, and the scanning distance and scanning angle of the first edge point and the second edge point.
[0063] The edge length of the railway flat plate 300 may be the length or width of the railway flat plate 300. Specifically, the edge length is calculated as follows:
[0064] (1)
[0065] in, represents the edge length of the railway slab 300, R a Represents the scanning distance of the first edge point, R b represents the scanning distance of the second edge point, W a represents the scanning angle of the first edge point, W b Indicates the scanning angle of the second edge point.
[0066] Step S132: Obtain the cosine value of a first angle with the first edge point as the vertex and the cosine value of a second angle with the second edge point as the vertex according to the edge length and the scanning distance between the first edge point and the second edge point.
[0067] Specifically, the calculation formula of the cosine value of the first angle is as follows:
[0068] (2)
[0069] in, Represents the cosine value of the first angle with the first edge point as the vertex.
[0070] The formula for calculating the cosine of the second angle is as follows:
[0071] (3)
[0072] in, Represents the cosine value of the second angle with the second edge point as the vertex.
[0073] Step S133: Obtain a first distance between the first edge point and the orthographic projection point according to the scanning distance of the first edge point and the cosine value of the first angle.
[0074] Specifically, the calculation formula of the first distance is as follows:
[0075] (4)
[0076] in, Represents the first distance between the first edge point and the orthographic projection point.
[0077] Step S134: Obtain a second distance between the second edge point and the orthographic projection point according to the scanning distance of the second edge point and the cosine value of the second angle.
[0078] Specifically, the calculation formula of the second distance is as follows:
[0079] (5)
[0080] in, Represents the second distance between the second edge point and the forward projection point.
[0081] In some embodiments, the two-dimensional point cloud data of the railway flatbed 300 may also be de-tailed. Specifically, the detection method further includes the following steps:
[0082] Step S210: Determine a first tangent value of the first angle according to the cosine value of the first angle.
[0083] Specifically, the formula for determining the first tangent value of the first angle is as follows:
[0084] (6)
[0085] in, Represents the first tangent value of the first angle.
[0086] Step S220: Determine a second tangent value of the second angle according to the cosine value of the second angle.
[0087] Specifically, the formula for determining the second tangent value of the second angle is as follows:
[0088] (7)
[0089] in, Represents the second tangent of the second angle.
[0090] Step S230: retaining the two-dimensional point data whose tangent value is less than or equal to the first tangent value or the second tangent value, and obtaining the retained two-dimensional point cloud data.
[0091] Specifically, according to the calculation method of the tangent value of the angle with the first edge point or the second edge point as the vertex, the tangent value of each angle with the two-dimensional point data as the vertex is calculated. The tangent values of the angles with the two-dimensional point data as the vertex are compared in sequence to see whether they are greater than the first tangent value or the second tangent value. If they are greater than the first tangent value or the second tangent value, the two-dimensional point data is deleted to retain the two-dimensional point data with the tangent value less than or equal to the first tangent value or the second tangent value, thereby obtaining the retained two-dimensional point cloud data.
[0092] Step S240: re-determine the first edge point and the second edge point according to the retained two-dimensional point cloud data.
[0093] It is understandable that due to the physical properties of the laser radar device 100, error data will be generated, so that the edge of the railway flatbed 300 will present a trailing point. Therefore, according to the first tangent value of the first angle and the second tangent value of the second angle, the trailing point can be removed (that is, the two-dimensional point data greater than the first tangent value or the second tangent value is removed). Then, based on the two-dimensional point cloud data without the trailing point, the first edge point and the second edge point are re-determined, and the first distance and the second distance are calculated based on the first edge point and the second edge point. That is, based on the two-dimensional point cloud data without the trailing point, steps S120 to S140 are re-executed.
[0094] In some embodiments, the laser radar device 100 is installed at any position on the vehicle 30, and can detect whether the vehicle 30 deviates from the center of the railway flatbed 300. That is, the detection method also includes:
[0095] Step S310: Obtain the offset distance of the laser radar device from the center of the vehicle.
[0096] When the laser radar device 100 is installed on the vehicle 30, the offset distance of the laser radar device 100 from the center of the vehicle 30 is recorded so that the processing unit 20 can obtain the offset distance.
[0097] Step S320: If the offset distance is the distance that the laser radar device is offset from the center of the vehicle to the first edge point 1, then the offset distance is added to the first distance and the offset distance is subtracted from the second distance to adjust the first distance and the second distance.
[0098] Step S330: If the offset distance is the distance that the laser radar device is offset from the center of the vehicle to the second edge point, the offset distance is subtracted from the first distance and the offset distance is added to the second distance to adjust the first distance and the second distance.
[0099] Step S340: Detecting whether the vehicle deviates from the center of the railway slab according to the deviation between the adjusted first distance and the second distance.
[0100] Specifically, the method for detecting whether the vehicle deviates from the center of the railway flatbed according to the deviation between the adjusted first distance and the second distance is referred to step S150.
[0101] It can be understood that in this embodiment, the laser radar device 100 can be installed at any position on the vehicle 30, such as the roof, the front bumper of the vehicle, etc. Figure 6 (1), the rear end of the vehicle 30, the rear bumper such as Figure 6 (2), as well as the surroundings of the vehicle 30 and the lower middle end of the vehicle 30. In short, as long as the installation position has no substantial impact on the ranging and data transmission of the laser radar 10, it can be used as the installation position without the need for central installation. There is no need to find the center line of the vehicle 30, which reduces the time consumption caused by the installation work.
[0102] In some embodiments, the first distance and the second distance may be further optimized, that is, after determining the first distance between the first edge point and the positive projection point, and the second distance between the second edge point and the positive projection point in step S140, the detection method further includes:
[0103] Step S410: continuously reacquire the two-dimensional point cloud data of the railway slab, and determine new first distances and second distances based on the reacquired two-dimensional point cloud data, until the acquisition time of the processing unit meets the calculation cycle, and obtain the first distance set and the second distance set.
[0104] The acquisition duration is the duration for the processing unit 20 to acquire the two-dimensional point cloud data, and the calculation cycle refers to the duration for the processing unit 20 to obtain the first distance and the second distance from the acquisition to the calculation.
[0105] Step S420: removing outliers in the first distance set and the second distance set.
[0106] Step S430: Determine that the average value of a first distance set is a first target distance, and the average value of a distance set is a second target distance.
[0107] Step S440: Detecting whether the vehicle deviates from the center of the railway slab according to the deviation between the first target distance and the second target distance.
[0108] It can be understood that, specifically, the laser radar sensing frequency of the laser radar device 100 is faster than the processing frequency of the processing unit 20, that is, the processing unit 20 can obtain multiple sets of two-dimensional point cloud data and calculate a relatively accurate set of first target distance and second target distance based on the multiple sets of two-dimensional point cloud data.
[0109] Figure 7 This is a schematic diagram of the structure of the processing unit provided in this application. Figure 7As shown, the processing unit 20 includes:
[0110] Processor 21, memory 22 and bus 23;
[0111] The memory 22 is used to store the computer program code of the processor 21;
[0112] The processor 21 is configured to execute the technical solution of the control method of the phase-shifted full-bridge converter in any of the aforementioned method embodiments by executing the computer program code.
[0113] Optionally, the memory 22 may be independent or integrated with the processor 21 .
[0114] The memory 22 is connected to the processor 21 via the bus 23 and completes the communication between them.
[0115] Optionally, the memory 22 may include a random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0116] The bus 23 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0117] The above-mentioned processor can be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it can also be a digital signal processor DSP, an application-specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0118] The processing unit 20 is used to execute the technical solution provided in any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.
[0119] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A vehicle railway flatbed detection method based on laser radar, applied to a processing unit of a laser radar device, characterized in that: The laser radar device is installed on a vehicle, and the method includes: Acquire two-dimensional point cloud data of the railway slab sensed by the laser radar of the laser radar device, wherein the two-dimensional point cloud data includes a plurality of two-dimensional point data; Determine the two-dimensional point data with a scanning angle of a preset angle as a positive projection point, and the positive projection point is the positive projection point of the scanning line emission hole of the laser radar on the railway flat plate; According to the angle difference of the scanning angles between adjacent two-dimensional point data, traverse the two-dimensional point cloud data from the forward projection point, if the difference of the scanning distances of adjacent two-dimensional point data is greater than a distance threshold, determine that the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data is an edge point of the railway slab, and the edge point includes a first edge point and a second edge point; Determine, based on a trigonometric function, a first distance between the first edge point and the orthographic projection point, and a second distance between the second edge point and the orthographic projection point according to the scanning distance and the scanning angle of the first edge point and the second edge point; Obtaining an offset distance of the laser radar device from the center of the vehicle; If the offset distance is the distance that the laser radar device is offset from the center of the vehicle to the first edge point, the offset distance is added to the first distance and the offset distance is subtracted from the second distance to adjust the first distance and the second distance; If the offset distance is the distance that the laser radar device is offset from the center of the vehicle to the second edge point, the offset distance is subtracted from the first distance, and the offset distance is added to the second distance to adjust the first distance and the second distance; Whether the vehicle deviates from the center of the railway slab is detected according to the deviation between the adjusted first distance and the second distance.
2. The method according to claim 1, characterized in that The determining, based on the trigonometric function and according to the scanning distance and the scanning angle of the first edge point and the second edge point, a first distance between the first edge point and the positive projection point, and a second distance between the second edge point and the positive projection point comprises: According to the law of cosines, the scanning distance and the scanning angle of the first edge point and the second edge point, the edge length of the railway slab is obtained; Obtaining, according to the edge length, the scanning distances of the first edge point and the second edge point, a cosine value of a first angle with the first edge point as a vertex, and a cosine value of a second angle with the second edge point as a vertex; Obtaining the first distance between the first edge point and the orthographic projection point according to the scanning distance of the first edge point and the cosine value of the first angle; The second distance between the second edge point and the orthographic projection point is obtained according to the scanning distance of the second edge point and the cosine value of the second angle.
3. The method according to claim 1 or 2, characterized in that: The detecting whether the vehicle deviates from the center of the railway flatbed according to the deviation between the adjusted first distance and the second distance comprises: If the adjusted first distance is not equal to the second distance, determining that the vehicle is offset from the center of the railway slab; If the adjusted first distance is equal to the second distance, it is determined that the vehicle is not offset from the center of the railway slab.
4. The method according to claim 2, characterized in that: The method further comprises, Determine a first tangent value of the first angle according to the cosine value of the first angle; Determine a second tangent value of the second angle according to the cosine value of the second angle; Retaining two-dimensional point data whose tangent value is less than or equal to the first tangent value or the second tangent value to obtain retained two-dimensional point cloud data; The first edge point and the second edge point are re-determined according to the retained two-dimensional point cloud data.
5. The method according to claim 1, characterized in that After determining the first distance between the first edge point and the positive projection point, and the second distance between the second edge point and the positive projection point, the method further includes: Continuously reacquiring the two-dimensional point cloud data of the railway slab, and determining new first distances and second distances based on the reacquired two-dimensional point cloud data, until the acquisition time of the processing unit meets the calculation cycle, thereby obtaining a first distance set and a second distance set; removing outliers in the first distance set and the second distance set; Determine an average value of the first distance set as a first target distance, and determine an average value of the second distance set as a second target distance; According to the deviation between the first target distance and the second target distance, it is detected whether the vehicle deviates from the center of the railway slab.
6. The method according to claim 1, characterized in that After detecting whether the vehicle deviates from the center of the railway slab according to the adjusted deviation between the first distance and the second distance, the method further includes: A deviation result is sent to the vehicle as to whether the vehicle is offset from the center of the railway slab.
7. A laser radar device, characterized in that: The laser radar device is installed on the vehicle, and the laser radar device includes a laser radar and a processing unit, and the processing unit is used to obtain two-dimensional point cloud data of the railway flat plate sensed by the laser radar of the laser radar device, and the two-dimensional point cloud data includes a plurality of two-dimensional point data; Determine the two-dimensional point data with a scanning angle of a preset angle as a positive projection point, and the positive projection point is the positive projection point of the scanning line emission hole of the laser radar on the railway flat plate; According to the angle difference of the scanning angles between adjacent two-dimensional point data, the two-dimensional point cloud data is traversed from the forward projection point, and if the difference of the scanning distances of adjacent two-dimensional point data is greater than a distance threshold, the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data is determined as the edge point of the railway slab, and the edge point includes a first edge point and a second edge point; Determine, based on a trigonometric function, a first distance between the first edge point and the orthographic projection point, and a second distance between the second edge point and the orthographic projection point according to the scanning distance and the scanning angle of the first edge point and the second edge point; Obtaining an offset distance of the laser radar device from the center of the vehicle; If the offset distance is the distance that the laser radar device is offset from the center of the vehicle to the first edge point, the offset distance is added to the first distance and the offset distance is subtracted from the second distance to adjust the first distance and the second distance; If the offset distance is the distance that the laser radar device is offset from the center of the vehicle to the second edge point, the offset distance is subtracted from the first distance, and the offset distance is added to the second distance to adjust the first distance and the second distance; Whether the vehicle deviates from the center of the railway slab is detected according to the deviation between the adjusted first distance and the second distance.
8. A vehicle, characterized in that: The vehicle is equipped with the laser radar device as claimed in claim 7.
9. A processing unit, characterized in that: include: Processor and memory; The memory is coupled to the processor, and the memory is used to store a computer program code. The processor calls the computer program code to enable the processing unit to execute the method according to any one of claims 1 to 6.