Disclosure of Invention
The application provides a laser radar-based vehicle railway flat detection method, a laser radar device, a vehicle and a processing unit of the laser radar device, which can improve the recognition instantaneity and the calculation simplicity, reduce the limitation of the mounting position of the vehicle and improve the consistency of the mounting schemes of different vehicle types.
The first aspect of the application provides a vehicle railway slab detection method based on a laser radar, which is applied to a processing unit of the laser radar device, wherein the laser radar device is installed on a vehicle, the method comprises the steps of obtaining two-dimensional point cloud data of a railway slab sensed by the laser radar of the laser radar device, wherein the two-dimensional point cloud data comprise a plurality of two-dimensional point data, determining that the two-dimensional point data with a scanning angle being a preset angle are orthographic projection points, wherein the orthographic projection points are orthographic projection points of scanning line emission holes of the laser radar, traversing the two-dimensional point cloud data from the orthographic projection points according to angle difference values of the scanning angles between adjacent two-dimensional point data, determining that the two-dimensional point data corresponding to a smaller scanning distance in the adjacent two-dimensional point data are edge points of the railway slab if the difference value of the scanning distances between the adjacent two-dimensional point data is larger than a distance threshold value, determining that the two-dimensional point data corresponding to the smaller scanning distance between the adjacent two-dimensional point data are the edge points of the railway slab, determining that the edge points comprise a first edge point and a second edge point, determining a first distance between the first edge point and the orthographic projection point and a second distance between the first edge point and the orthographic projection point based on a trigonometric function, and determining whether the two-distance between the first edge point and the second edge point and the orthographic projection point is offset from the center of the railway slab according to the first distance and the second distance.
In some embodiments of the first aspect, determining a first distance between the first edge point and the forward projection point and a second distance between the second edge point and the forward projection point based on a trigonometric function according to a scanning distance and a scanning angle of the first edge point and the second edge point includes obtaining an edge length of the railway slab according to a 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 included angle with the first edge point as a vertex and a cosine value of a second included angle with the second edge point as a vertex according to the edge length and the scanning distance of the first edge point and the cosine value of the first included angle, and obtaining a first distance between the first edge point and the forward projection point according to the scanning distance of the second edge point and the cosine value of the second included angle.
In some embodiments of the first aspect, detecting whether the vehicle is offset from the center of the railroad slab based on a deviation of the first distance from the second distance includes determining that the vehicle is offset from the center of the railroad slab if the first distance is not equal to the second distance and determining that the vehicle is not offset from the center of the railroad slab if the first distance is equal to the second distance.
In some embodiments of the first aspect, a first tangent value of the first included angle is determined according to a cosine value of the first included angle, a second tangent value of the second included angle is determined according to a cosine value of the second included angle, two-dimensional point data with a tangent value smaller than or equal to the first tangent value or the second tangent value is reserved, reserved two-dimensional point cloud data are obtained, and the first edge point and the second edge point are redetermined according to the reserved two-dimensional point cloud data.
In some embodiments of the first aspect, after 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, the method further includes continuously re-acquiring two-dimensional point cloud data of the railway slab, determining new first and second distances based on the re-acquired two-dimensional point cloud data until the processing unit acquires a first distance set and a second distance set after the acquiring duration satisfies the calculation period, removing outliers in the first and second distance sets, determining an average value of the first distance set as a first target distance and an average value of the second distance set as a second target distance, and detecting whether the vehicle deviates from the center of the railway slab according to the deviation of the first target distance and the second target distance.
In some embodiments of the first aspect, an offset distance of the lidar device from the center of the vehicle is obtained, if the offset distance is a distance of the lidar device from the center of the vehicle to a 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 a distance of the lidar device from the center of the vehicle to a 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, and whether the vehicle is offset from the center of the railway slab is detected according to the offset between the adjusted first distance and the adjusted second distance.
In some embodiments of the first aspect, after detecting whether the vehicle is offset from the center of the railroad slab based on the deviation of the first distance from the second distance, the method further includes transmitting an offset result of whether the vehicle is offset from the center of the railroad slab to the vehicle.
The second aspect of the application provides a laser radar device which is arranged on a vehicle and comprises a laser radar and a processing unit, wherein the processing unit is used for acquiring two-dimensional point cloud data of a railway flat plate sensed by the laser radar of the laser radar device, the two-dimensional point cloud data comprise a plurality of two-dimensional point data, the two-dimensional point data with a scanning angle being a preset angle are determined to be orthographic projection points, the orthographic projection points are orthographic projection points of scanning line transmitting holes of the laser radar on the railway flat plate, the two-dimensional point cloud data are traversed from the orthographic projection points according to angle difference values of the scanning angles between the adjacent two-dimensional point data, if the difference value of the scanning distances of the adjacent two-dimensional point data is larger than a distance threshold value, the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data are determined to be edge points of the railway flat plate, the edge points comprise a first edge point and a second edge point, based on a trigonometric function, a first distance between the first edge point and the orthographic projection points and a second distance between the second edge point and the orthographic projection points are determined, and whether the center of the railway flat plate deviates from the second distance is detected according to the deviation between the first distance and the second distance.
A third aspect of the application provides a vehicle on which a lidar device is mounted.
A fourth aspect of the application provides a processing unit comprising a processor and a memory coupled to the processor, the memory for storing computer program code, the processor invoking the computer program code to cause the processing unit to perform the method as in the first aspect.
The application provides a vehicle railway slab detection method based on a laser radar, the laser radar device, a vehicle and a processing unit of the laser radar device, and two-dimensional point cloud data, including a plurality of two-dimensional point data, of a railway slab sensed by the laser radar are obtained. And then, determining that the two-dimensional point data with the scanning angle being a preset angle is a forward projection point of a scanning line transmitting hole of the laser radar on the railway flat plate, traversing the two-dimensional point cloud data from the forward projection point according to the angle difference value of the scanning angle between the adjacent two-dimensional point data, and determining 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 if the difference value of the scanning distances of the adjacent two-dimensional point data is larger than a distance threshold value, wherein the edge point comprises a first edge point and a second edge point. Then, based on the 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 are determined according to the scanning distance and the scanning angle of the first edge point and the second edge point. Finally, whether the vehicle deviates from the center of the railway slab is detected according to the deviation between the first distance and the second distance.
According to the detection method, the height information of the point cloud data is not needed, and the sensed data is not needed to be processed after being converted from the three-dimensional coordinates to the two-dimensional plane coordinates. The calculation mode of detecting the deviation is simple, the identification instantaneity is high, the space complexity of operation is low, and fewer processor resources are needed. Because the space complexity of operation is low, the required processor resources are less, the detection method provided by the application can be directly deployed in the processing unit of the laser radar device, and the laser radar device can be conveniently installed on different vehicles so as to realize the detection of whether different vehicles deviate on a railway flat plate. The installation inclination angle can be adjusted between 0 and 90 degrees under the condition that the laser radar can scan the railway flat plate, and the limitation on the installation inclination angle is reduced. Meanwhile, the calculation mode of the detection deviation is suitable for vehicles of different vehicle types, and the consistency of the installation schemes of the different vehicle types is improved.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The terms "first," "second," and the like, herein referred to, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
The following is an explanation of the related art.
In the case of long-distance transport of vehicles, the vehicles are usually transported on trains by means of railway flatbed loading vehicles. When loading huge heavy vehicles such as cranes and special vehicles, the vehicle center and the railway slab center are basically overlapped, and the vehicles are fixed by steel cables, so that rollover accidents can not occur when the trains rapidly turn. When the vehicle runs on the railway flat plate, most of the railway flat plate is in a blind area of a driver, so that a difficult road for the vehicle center and the railway flat plate center to meet the standard requirement is large, and a manual auxiliary guiding mode is generally adopted. The driver and the guide with abundant experience can accurately finish the loading task of a large vehicle only by tens of minutes, which is time-consuming and labor-consuming.
At present, a method and a system for identifying automatic loading deviation of equipment based on a three-dimensional laser radar device (patent number: 114460600A) record that a railway slab region is identified by the three-dimensional laser radar device, a fitting straight line of a slab edge is obtained after three-dimensional point cloud data is processed, and distance deviation and angle deviation of a vehicle center relative to the railway slab center are calculated on the basis of the fitting straight line. In the method, when data is processed, the data is required to be linearly fitted after the data is converted from three-dimensional coordinates to two-dimensional plane coordinates. Poor real-time performance and high calculation complexity. Meanwhile, the radar needs to be installed at the center point of the vehicle head and needs a certain inclination angle to realize the function, so that the installation position of the vehicle is limited, a large amount of early calibration work is needed in actual use, and respective installation schemes are customized according to different vehicle types, which is certainly time-consuming and labor-consuming for loading of high-frequency and large-batch vehicle railway flat plates. Specifically, limitations of the equipment automatic loading deviation recognition method and system based on the three-dimensional laser radar device include the following aspects:
1. The mathematical method used for data processing is complex, and is characterized by large data volume, huge buffer space and transmission capacity, complicated data processing flow, high performance requirements on a processor, high space complexity and high required processor resources, and relates to conversion from three-dimensional coordinates to two-dimensional coordinates, coordinate rotation and translation transformation, plane fitting and straight line fitting.
2. The system is not simple and convenient to install, and in the actual use process, calibration work is required to be completed manually or customized installation is required to be carried out for different vehicle types, so that the system is inefficient for loading and transporting large-scale vehicles.
3. The system has higher cost, the three-dimensional laser radar data is used for processing, a higher-performance processor is needed, the whole processing flow is more complicated due to the added coordinate transformation process, and the calculation amount of the distance deviation value is increased.
4. The RANSAC algorithm used needs enough iteration times to ensure that the optimal solution can be found with higher probability when data matching and filtering are carried out, which can lead to the running time of the algorithm to be prolonged, and can not respond to various changes and various needed adjustments in the vehicle advancing process in time. Since the internal parameters and threshold values need to be manually adjusted and the proportion of filtered abnormal point data is low, the change of the surrounding environment has a great influence on the operation precision of the algorithm.
5. For a large-scale three-dimensional laser radar data set, as a machine learning algorithm, the computation complexity of the K-means algorithm used in the prior art is high, and especially, the distances from all points to the centers of all clusters need to be calculated in each iteration, which may result in slower processing speed, so that data preprocessing, such as data smoothing and filtering, has to be performed, which also increases the difficulty in deploying the algorithm on a microprocessor.
6. Can only be loaded on the head or the tail of a vehicle, and the overall position of the vehicle on a flat plate, such as a large-sized vehicle like a trailer, cannot be judged.
In view of the above, the present application provides a laser radar-based vehicle railway slab detection method, a laser radar device, a vehicle, and a processing unit of the laser radar device, which can improve recognition instantaneity and calculation simplicity, reduce limitation of installation positions of the vehicle, and improve consistency of installation schemes of different vehicle types.
Referring to fig. 1 to 3, fig. 1 is a schematic structural diagram of a vehicle according to the present application. The vehicle 30 is mounted with a lidar device 100. Fig. 2 is a schematic structural diagram of a lidar device according to the present application. The lidar device 100 includes a lidar 10 and a processing unit 20. The lidar 10 is used to sense two-dimensional point cloud data of a railroad slab. Specifically, the lidar 10 includes a scanning line transmitting hole 11, and the scanning line transmitting hole 11 is used to transmit scanning lines to the railway slab 300 and receive reflected lines reflected from the railway slab 300, and two-dimensional point cloud data is generated from the reflected lines. The processing unit 20 is used for detecting whether the center of the vehicle 30 is deviated from the center of the railway slab 300 according to the laser radar-based vehicle railway slab detection method and the two-dimensional point cloud data provided by the present application.
As shown in fig. 1 and 3, when a train is carried by a vehicle 30, a railroad slab 300 shown in fig. 3 is laid on the train, and a processing unit 20 of the laser radar apparatus 100 acquires two-dimensional point cloud data including a plurality of two-dimensional point data of the railroad slab 300 sensed by the laser radar 10 in response to a start instruction for starting the vehicle 30. Next, it is determined that the two-dimensional point data with the scanning angle being the preset angle is a forward projection point of the scanning line transmitting hole 11 of the laser radar 10 on the railway flat plate 300, and the two-dimensional point cloud data is traversed from the forward projection point according to the angle difference value of the scanning angle between the adjacent two-dimensional point data, if the difference value of the scanning distances of the adjacent two-dimensional point data is greater than the distance threshold value, it is determined that the two-dimensional point data corresponding to the smaller scanning distance in the adjacent two-dimensional point data is the first edge point or the second edge point of the railway flat plate 300. Then, based on the 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 are determined according to the scanning distance and the scanning angle of the first edge point and the second edge point. Finally, it is detected whether the vehicle 30 is offset from the center of the railway slab 300 based on the deviation between the first distance and the second distance.
It should be noted that, fig. 1 is only a schematic diagram of a structure provided by an embodiment of the present application, and the embodiment of the present application does not limit the actual forms of the various devices included in fig. 1, nor limit the interaction modes between the devices in fig. 1, and in a specific application of the scheme, the configuration may be set according to actual requirements.
The following describes the technical scheme of the present application in specific embodiments, and how the technical scheme of the present application solves the above technical problems. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Referring to fig. 2 and fig. 4 in combination, fig. 4 is a schematic flow chart of a method for detecting a railway slab of a vehicle based on a lidar according to the present application, and the detection method may be executed by the lidar device 100, specifically, the processing unit 20 of the lidar device 100. As shown in fig. 4, the detection method may include the steps of:
And step S110, acquiring two-dimensional point cloud data of the railway flat plate sensed by the laser radar of the laser radar device.
Specifically, as shown in fig. 5, the processing unit 20 acquires the two-dimensional point cloud data sensed by the laser radar 10 rotating with the scanning start point O 1 as the start point, and the rotation range may 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 scan distance and a scan angle. The scanning distance refers to the distance from the scanning line emission hole 11 of the laser radar 10 to the intersection point of the scanning line emission hole 11 and the railway slab 300. The scan angle refers to the angle between the scan line and the initial scan line of scan start point O 1. Illustratively, as shown in FIG. 5, the two-dimensional point data includes point 1, point 2, and point 3, R a represents the scan distance of point 1, and R b represents the scan distance of point 3. Angle W a represents the scan angle of point 1 and angle W b represents the scan angle of point 3.
In one embodiment, after the two-dimensional point cloud data is acquired, the two-dimensional point data with the scanning distance of zero may be deleted to delete the outlier. In one embodiment, the acquired two-dimensional point cloud data may be stored in a data structure array for subsequent recall of the two-dimensional point cloud data in the data structure array.
Step S120, determining two-dimensional point data with a scanning angle being a preset angle as a front projection point.
The preset angle is set in relation to the rotation range of the laser radar 10, and may be 180 °. The forward projection point is the forward projection point of the scanning line emission hole 11 of the laser radar 10 on the railway slab 300. Illustratively, as shown in fig. 5, point o is the position of the scan line emission hole 11, and point 2 is the orthographic projection point.
Step S130, traversing the two-dimensional point cloud data from the orthographic projection point according to the angle difference of the scanning angles between the adjacent two-dimensional point data, and determining 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 panel if the difference of the scanning distances between the adjacent two-dimensional point data is larger than a distance threshold value, wherein the edge point comprises a first edge point and a second edge point.
Specifically, the angle difference may be obtained by calculating the scanning angle between adjacent two-dimensional point data, or the scanning resolution of the laser radar 10 may be used as the angle difference. The angle difference may be 0.1 °.
The difference in the distance threshold values may be 15cm or 10cm, etc. It will be appreciated that the difference in scanning distance between the two-dimensional point data of the area of the railroad slab 300 is small, typically about 0.3 or 0.5cm, while the difference in scanning distance between the two-dimensional point data of the area of the railroad slab 300 outside the area of the railroad slab 300 is large, typically about 15cm or 10 cm. If the difference between the scanning distances of the adjacent two-dimensional point data is greater than 15cm or 10cm, it is indicated that the two-dimensional point data with the smaller scanning distance among 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 one side is a second edge point. Illustratively, as shown in fig. 5, the point 1 is determined to be the first edge point according to the difference of the scanning distance between the point 1 and the adjacent two-dimensional point data being greater than 15cm and the scanning distance of the point 1 being less than the two-dimensional point data. Similarly, according to the difference of the scanning distance between the point 3 and the adjacent two-dimensional point data being larger than 15cm and the scanning distance of the point 3 being smaller than the two-dimensional point data, the point 3 is determined to be a second edge point.
The edge point is a point on the length or width of the railway slab 300 depending on the installation position of the laser radar device 100. When the laser radar device 100 is mounted on the head or the tail of the vehicle 30, the edge point is a point on the width of the railroad slab 300, and when the laser radar device 100 is mounted on the body side of the vehicle 30, the edge point is a point on the length of the railroad slab 300.
Meanwhile, it may be determined that the two-dimensional point data having a difference of the scanning distance from the first edge point or the second edge point less than the characteristic distance threshold value is the two-dimensional characteristic point of the railway slab 300. The characteristic distance threshold may be 0.3cm or 0.5cm.
It is understood that the first edge points, the second edge points, and the two-dimensional feature points of the resulting railway slab 300 may be calculated in real time or processed off-line.
Step S140, based on the trigonometric function, determining 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.
Specifically, as shown in fig. 5, the scanning distance R a of the first edge point 1, the scanning distance R b of the second edge point 3, and the railroad plate 300 constitute a triangle. Thus, in combination with the trigonometric function, the scan distances R a and R b, and the scan angles +.w a and +.w b, a first distance D a between the first edge point 1 and the forward projection point 2, and a second distance D b between the second edge point 3 and the forward projection point 2 can be obtained.
And step S150, detecting whether the vehicle deviates from the center of the railway flat plate according to the deviation of the first distance and the second distance.
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 railroad slab 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 railroad slab 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, and 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 instructs the vehicle 30 to offset the center of the railroad slab 300 toward the first edge point 1, and if the offset result is less than zero, the offset result instructs the vehicle 30 to offset the center of the railroad slab 300 toward the second edge point 3.
In some embodiments, after detecting whether the vehicle 30 is offset from the center of the railroad slab 300, an offset result of whether the vehicle 30 is offset from the center of the railroad slab 300 is transmitted to the vehicle 30, so that the vehicle 30 adjusts the body posture based on the offset result so that the center of the vehicle 30 coincides with the center of the railroad slab 300. Or to allow the driver to adjust the posture of the vehicle body so that the center of the vehicle 30 coincides with the center of the railroad slab 300, based on the display unit of the vehicle 30 displaying the offset result.
It can be understood that in the above technical solution, the height information of the three-dimensional point cloud data is not required to be used, and the sensed data is not required to be processed after being converted from the three-dimensional coordinates to the two-dimensional plane coordinates. The calculation mode of detecting the deviation is simple, the identification instantaneity is high, the space complexity of operation is low, and fewer processor resources are needed. Because of low computational space complexity and less processor resources, the detection method provided by the application can be directly deployed in the processing unit 20 of the laser radar device 100, and the laser radar device 100 can be conveniently installed on different vehicles 30 to realize the detection of whether the different vehicles 30 deviate on the railway flat 300. The installation inclination angle can be adjusted between 0 and 90 degrees (not including 90 degrees) under the condition that the laser radar 10 can scan the railway flat plate 300, so that the limitation on the installation inclination angle is reduced. Meanwhile, the calculation mode of the detection deviation is suitable for vehicles 30 of different vehicle types, and the consistency of the installation schemes of the different vehicle types is improved.
In some embodiments, referring to FIG. 5, step S140 includes determining a first distance between the first edge point and the forward projection point and a second distance between the second edge point and the forward projection point based on a trigonometric function according to the scan distance and the scan angle of the first edge point and the second edge point, including
And S131, obtaining the edge length of the railway flat plate according to the cosine theorem and the scanning distance and the scanning angle of the first edge point and the second edge point.
The edge length of the railway slab 300 may be the length or width of the railway slab 300. Specifically, the edge length is calculated as follows:
(1)
Wherein, The edge length of the railway slab 300 is represented by R a, the scanning distance of the first edge point, R b, the scanning distance of the second edge point, W a, the scanning angle of the first edge point, and W b.
Step S132, obtaining the cosine value of a first included angle taking the first edge point as the vertex and the cosine value of a second included angle taking the second edge point as the vertex according to the edge length and the scanning distance of the first edge point and the second edge point.
Specifically, the calculation formula of the cosine value of the first included angle is as follows:
(2)
Wherein, And a cosine value representing a first included angle with the first edge point as a vertex.
The cosine value of the second included angle is calculated as follows:
(3)
Wherein, And a cosine value representing a second included angle with the second edge point as a vertex.
Step S133, obtaining 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 included angle.
Specifically, the calculation formula of the first distance is as follows:
(4)
Wherein, A first distance between the first edge point and the forward projection point is represented.
And S134, obtaining 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 included angle.
Specifically, the calculation formula of the second distance is as follows:
(5)
Wherein, Representing a second distance between the second edge point and the forward projection point.
In some embodiments, the two-dimensional point cloud data of the railroad slab 300 may also be depalletized. Specifically, the detection method further comprises the following steps:
step S210, determining a first tangent value of the first included angle according to the cosine value of the first included angle.
Specifically, the first tangent value of the first included angle is determined as follows:
(6)
Wherein, A first tangent value representing the first included angle.
Step S220, determining a second tangent value of the second included angle according to the cosine value of the second included angle.
Specifically, the second tangent value of the second included angle is determined as follows:
(7)
Wherein, A second tangent value representing a second included angle.
And S230, reserving two-dimensional point data with the tangent value smaller than or equal to the first tangent value or the second tangent value, and obtaining reserved two-dimensional point cloud data.
Specifically, according to the calculation mode of the tangent value of the included angle taking the first edge point or the second edge point as the vertex, the tangent value of each included angle taking the two-dimensional point data as the vertex is calculated. And sequentially comparing whether the tangent value of the included angle taking the two-dimensional point data as the vertex is larger than the first tangent value or the second tangent value, and deleting the two-dimensional point data if the tangent value is larger than the first tangent value or the second tangent value so as to reserve the two-dimensional point data of which the tangent value is smaller than or equal to the first tangent value or the second tangent value, thereby obtaining reserved two-dimensional point cloud data.
And step S240, redetermining the first edge point and the second edge point according to the reserved two-dimensional point cloud data.
It will be appreciated that the edges of the railroad slab 300 may exhibit tailing points due to the error data that may be generated by the physical nature of the lidar device 100. Thus, the trailing point can be removed (i.e., two-dimensional point data greater than the first tangent or the second tangent is removed) based on the first tangent of the first angle and the second tangent of the second angle. And then, according to the two-dimensional point cloud data with the tail points removed, the first edge point and the second edge point are redetermined, and the first distance and the second distance are calculated based on the first edge point and the second edge point. That is, steps S120 to S140 are re-performed according to the two-dimensional point cloud data from which the tail points are removed.
In some embodiments, the lidar device 100 is mounted anywhere on the vehicle 30 to detect whether the vehicle 30 is offset from the center of the railroad slab 300. That is, the detection method further includes:
Step S310, obtaining the offset distance of the laser radar device from the center of the vehicle.
When the lidar device 100 is mounted on the vehicle 30, the offset distance of the lidar device 100 from the center of the vehicle 30 is recorded so that the processing unit 20 acquires the offset distance.
In step S320, if the offset distance is a distance that the laser radar apparatus offsets toward the first edge point 1 from the center of the vehicle, the offset distance is added to the first distance, and the offset distance is subtracted from the second distance, so as to adjust the first distance and the second distance.
If the offset distance is a distance that the laser radar device offsets toward the second edge point from the center of the vehicle, the offset distance is subtracted from the first distance, and the offset distance is added to the second distance, so as to adjust the first distance and the second distance.
And step S340, detecting whether the vehicle deviates from the center of the railway flat plate according to the deviation between the adjusted first distance and the second distance.
Specifically, a detection method of detecting whether the vehicle is offset from the center of the railway slab based on the deviation between the adjusted first distance and second distance, refer to step S150.
It will be appreciated that the present embodiment can mount the lidar device 100 at any position on the vehicle 30, such as the roof, the front bumper of the vehicle such as (1) of fig. 6, the rear end of the vehicle 30, the rear bumper such as (2) of fig. 6, and the periphery of the vehicle 30 and the middle lower end of the vehicle 30, by offsetting the first distance and the second distance, by the present embodiment, as the mounting position, without centering, as long as the mounting position has no substantial influence on the ranging and data transmission of the lidar 10. There is no need to find the center line of the vehicle 30, reducing the time consumption caused by the installation work.
In some embodiments, an optimization may be further advanced with respect to the first distance and the second distance, that is, after determining the first distance between the first edge point and the forward projection point and the second distance between the second edge point and the forward projection point in step S140, the detection method further includes:
step S410, continuously acquiring two-dimensional point cloud data of the railway flat plate again, determining new first distance and second distance based on the acquired two-dimensional point cloud data until the acquisition time length of the processing unit meets the calculation period, and obtaining a first distance set and a second distance set.
The acquisition time period is a time period for the processing unit 20 to acquire the two-dimensional point cloud data, and the calculation period is a time period for the processing unit 20 to calculate the first distance and the second distance from the acquisition.
Step S420, removing abnormal values in the first distance set and the second distance set.
Step S430, determining an average value of the first distance set as a first target distance and an average value of the first distance set as a second target distance.
Step S440, detecting whether the vehicle deviates from the center of the railway flat according to the deviation of the first target distance and the second target distance.
It can be appreciated that, specifically, the laser radar sensing frequency of the laser radar apparatus 100 is faster than the processing frequency of the processing unit 20, that is, the processing unit 20 may acquire multiple sets of two-dimensional point cloud data, and calculate a set of more accurate first target distance and second target distance according to the multiple sets of two-dimensional point cloud data.
Fig. 7 is a schematic structural diagram of a processing unit according to the present application. As shown in fig. 7, the processing unit 20 includes:
a processor 21, a memory 22 and a bus 23;
the memory 22 is for storing computer program code of the processor 21;
Wherein the processor 21 is configured to execute the technical solution of the control method of the phase-shifting full-bridge converter in any of the method embodiments described above via execution of the computer program code.
Alternatively, the memory 22 may be separate or integrated with the processor 21.
The memory 22 is connected to the processor 21 via a bus 23 and performs communication with each other.
Optionally, the memory 22 may include random access memory (random access memory, RAM) and may also include non-volatile memory (non-volatile memory), such as at least one disk memory.
Bus 23 may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, PCI) bus, or an extended industry standard architecture (e 5tended industry standard architecture, EISA) bus, or the like. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The processor may be a general-purpose processor including a Central Processing Unit (CPU), a network processor (network processor, NP), etc., or may be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component.
The processing unit 20 is configured to execute the technical solutions provided in any of the foregoing method embodiments, and its implementation principle and technical effects are similar, and are not described herein again.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of implementing the various method embodiments described above may be implemented by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs the steps comprising the method embodiments described above, and the storage medium described above includes various media capable of storing program code, such as ROM, RAM, magnetic or optical disk.
It should be noted that the above embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the technical solution described in the above embodiments may be modified or some or all of the technical features may be equivalently replaced, and these modifications or substitutions do not make the essence of the corresponding technical solution deviate from the scope of the technical solution of the embodiments of the present application.