Rotation angle error detection method, device, equipment and storage medium
By acquiring and parsing the configuration information and data packets of the LiDAR and calculating the rotation angle error, the problem of poor real-time detection of the LiDAR rotation angle error is solved, high-precision and high-real-time error detection is achieved, and the risks of the LiDAR in various application scenarios are reduced.
Patent Information
- Application Number
- CN202111263170.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-28
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-10-28
AI Technical Summary
The existing laser radar rotation angle error detection has poor real-time performance and cannot be accurately detected in real time during the operation of the laser radar.
By obtaining the configuration information of the lidar and the uploaded data message, parsing the time information and the actual rotation angle, calculating the error between the ideal rotation angle and the actual rotation angle, and using real-time data for error detection.
It achieves high-precision and high-real-time detection of rotation angle errors, which can promptly detect and detect errors during the operation of the lidar, reducing risks in application scenarios.
Smart Images

Figure CN114063089B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of laser radar, and in particular to a rotation angle error detection method, device, equipment and storage medium. Background Art
[0002] LiDAR is a radar system that uses laser beams to detect target characteristics such as position and speed. It operates by transmitting a detection signal toward the target and then comparing the reflected signal with the transmitted signal to determine the target's distance, height, and other information. Currently, LiDAR is widely used in mobile robots and smart factories.
[0003] In the existing technology, the error detection of the rotation angle of the laser radar can only be detected by checking whether there are any missing points in the point cloud. However, the entire process of checking the point cloud data has poor real-time performance and can generally only be identified after a serious fault occurs. Summary of the Invention
[0004] The main purpose of this application is to solve the technical problem of poor real-time performance of rotation angle error detection in existing laser radars.
[0005] The first aspect of the present invention provides a rotation angle error detection method, including: obtaining configuration information in the laser radar and an uploaded data message; parsing the time information in the data message and the actual rotation angle corresponding to the time information; based on the time information and the configuration information, calculating the ideal rotation angle corresponding to the time information; according to the ideal rotation angle and the actual rotation angle, calculating the rotation angle error corresponding to the time information.
[0006] Optionally, in a first implementation method of the first aspect of the present invention, the data packet is a UDP packet; the parsing of the time information in the data packet and the actual rotation angle corresponding to the time information includes: parsing the UDP packet to obtain the timestamp of the UDP packet and N data packets, wherein N is a natural number not less than 1; parsing the N data packets to obtain the data packet completion time and angle data corresponding to each data packet; based on the data packet completion time, filtering the angle data from the N data packets as the actual rotation angle, and using the timestamp as the corresponding time information.
[0007] Optionally, in a second implementation method of the first aspect of the present invention, obtaining the configuration information in the laser radar and the uploaded data message includes: calling the HTTP interface corresponding to the laser radar; sending an HTTP request to the HTTP interface, and directing it to the configuration page of the laser radar through the HTTP interface; reading the configuration information of the laser radar in the configuration page; and obtaining the data message uploaded by the laser radar.
[0008] Optionally, in a third implementation method of the first aspect of the present invention, obtaining the configuration information in the laser radar and the uploaded data message includes: calling the universal gateway interface corresponding to the laser radar; sending a data acquisition request to the universal gateway interface; receiving the configuration information of the laser radar returned by the universal gateway interface; and obtaining the data message uploaded by the laser radar.
[0009] Optionally, in a fourth implementation method of the first aspect of the present invention, the configuration information includes a synchronization angle, a rotation frequency and a rotation direction, and the rotation direction includes forward rotation and reverse rotation; the calculation of the ideal rotation angle corresponding to each time information of the laser radar based on the configuration information includes: calculating the ideal rotation angle corresponding to each time information of the laser radar during forward rotation and reverse rotation according to the synchronization angle and the rotation frequency; judging whether the ideal rotation angle is greater than a preset angle threshold; if so, subtracting the angle threshold from the ideal rotation angle, and updating the ideal rotation angle.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the calculation of the ideal rotation angle corresponding to each time information of the laser radar during forward rotation and reverse rotation based on the synchronization angle and the rotation frequency includes: calculating a first rotation angle based on the time information and the rotation frequency, and multiplying the first rotation angle by an angle threshold to obtain a second rotation angle corresponding to each time information; when the rotation direction is forward rotation, adding the second rotation angle to the synchronization angle to obtain the corresponding ideal rotation angle; when the rotation direction is reverse rotation, adding the angle threshold to the synchronization angle and subtracting the second rotation angle to obtain the corresponding ideal rotation angle.
[0011] Optionally, in a sixth implementation manner of the first aspect of the present invention, calculating the rotation angle error corresponding to each time information of the laser radar based on the ideal rotation angle and the actual rotation angle includes: subtracting the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error; if the rotation angle error is greater than one hundred and eighty degrees, subtracting three hundred and sixty degrees from the rotation angle; if the rotation angle error is less than negative one hundred and eighty degrees, adding three hundred and sixty degrees to the rotation angle.
[0012] The second aspect of the present invention provides a rotation angle error detection device, including: an acquisition module for acquiring configuration information in the laser radar and an uploaded data message; a parsing module for parsing the time information in the data message and the actual rotation angle corresponding to the time information; an angle calculation module for calculating the ideal rotation angle corresponding to the time information based on the time information and the configuration information; and an error calculation module for calculating the rotation angle error corresponding to the time information based on the ideal rotation angle and the actual rotation angle.
[0013] Optionally, in a first implementation method of the second aspect of the present invention, the data packet is a UDP packet; the parsing module is specifically used to: parse the UDP packet to obtain the timestamp of the UDP packet and N data packets, wherein N is a natural number not less than 1; parse the N data packets to obtain the data packet completion time and angle data corresponding to each data packet; based on the data packet completion time, filter the angle data from the N data packets as the actual rotation angle, and use the timestamp as the corresponding time information.
[0014] Optionally, in a second implementation method of the second aspect of the present invention, the acquisition module is specifically used to: call the HTTP interface corresponding to the laser radar; send an HTTP request to the HTTP interface, and direct it to the configuration page of the laser radar through the HTTP interface; read the configuration information of the laser radar in the configuration page; and obtain the data message uploaded by the laser radar.
[0015] Optionally, in a third implementation method of the second aspect of the present invention, the acquisition module is specifically used to: call the universal gateway interface corresponding to the laser radar; send a data acquisition request to the universal gateway interface; receive the configuration information of the laser radar returned by the universal gateway interface; and obtain the data message uploaded by the laser radar.
[0016] Optionally, in a fourth implementation of the second aspect of the present invention, the configuration information includes a synchronization angle, a rotation frequency and a rotation direction, and the rotation direction includes forward rotation and reverse rotation; the angle calculation module specifically includes: a calculation unit, used to calculate the ideal rotation angle corresponding to each time information of the laser radar during forward rotation and reverse rotation according to the synchronization angle and the rotation frequency; a judgment unit, used to judge whether the ideal rotation angle is greater than a preset angle threshold; an angle updating unit, used to subtract the angle threshold from the ideal rotation angle when the ideal rotation angle is greater than the angle threshold, and update the ideal rotation angle.
[0017] Optionally, in a fifth implementation of the second aspect of the present invention, the calculation unit is specifically used to: calculate a first rotation angle based on the time information and the rotation frequency, and multiply the first rotation angle by an angle threshold to obtain a second rotation angle corresponding to each time information; when the rotation direction is forward rotation, add the synchronization angle to the second rotation angle to obtain a corresponding ideal rotation angle; when the rotation direction is reverse rotation, add the synchronization angle to the angle threshold and subtract the second rotation angle to obtain a corresponding ideal rotation angle.
[0018] Optionally, in a sixth implementation manner of the second aspect of the present invention, the error calculation module is specifically used to: subtract the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error; if the rotation angle error is greater than one hundred and eighty degrees, subtract three hundred and sixty degrees from the rotation angle; if the rotation angle error is less than negative one hundred and eighty degrees, add three hundred and sixty degrees to the rotation angle.
[0019] The third aspect of the present invention provides a computer device, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected through lines; the at least one processor calls the instructions in the memory so that the computer device executes the steps of the above-mentioned laser radar rotation angle error detection method.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the steps of the above-mentioned laser radar rotation angle error detection method.
[0021] Beneficial effects:
[0022] In the technical solution of the present invention, the configuration information of the laser radar and the uploaded data message are obtained; the time information and the actual rotation angle corresponding to the time information in the data message are parsed; based on the time information and the configuration information, the ideal rotation angle corresponding to the time information is calculated; and the rotation angle error corresponding to the time information is calculated based on the ideal rotation angle and the actual rotation angle. This method parses the data message uploaded by the laser radar obtained in real time, uses the actual rotation angle detected by the laser radar itself, and the data is more accurate. At the same time, the ideal rotation angle of each time period is calculated through the configuration information. The rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle. Since real-time data is used, the calculated rotation angle error has high accuracy and strong real-time performance. It can be detected during the operation of the laser radar, reducing the risk of the laser radar in various application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of a first embodiment of a rotation angle error detection method provided by an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of a second embodiment of a rotation angle error detection method provided by an embodiment of the present invention;
[0025] Figure 3 A schematic diagram of a third embodiment of a rotation angle error detection method provided by an embodiment of the present invention;
[0026] Figure 4 A schematic diagram of a fourth embodiment of a rotation angle error detection method provided by an embodiment of the present invention;
[0027] Figure 5 A schematic diagram of an embodiment of a rotation angle error detection device provided by an embodiment of the present invention;
[0028] Figure 6 A schematic diagram of another embodiment of a rotation angle error detection device provided by an embodiment of the present invention;
[0029] Figure 7 A schematic diagram of an embodiment of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In the technical solution of the present invention, the configuration information of the laser radar and the uploaded data message are obtained; the time information and the actual rotation angle corresponding to the time information in the data message are parsed; based on the time information and the configuration information, the ideal rotation angle corresponding to the time information is calculated; and the rotation angle error corresponding to the time information is calculated based on the ideal rotation angle and the actual rotation angle. This method parses the data message uploaded by the laser radar obtained in real time, uses the actual rotation angle detected by the laser radar itself, and the data is more accurate. At the same time, the ideal rotation angle of each time period is calculated through the configuration information. The rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle. Since real-time data is used, the calculated rotation angle error has high accuracy and strong real-time performance. It can be detected during the operation of the laser radar, reducing the risk of the laser radar in various application scenarios.
[0031] The terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0032] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The first embodiment of the rotation angle error detection method provided by the embodiment of the present invention includes:
[0033] 101. Obtain the configuration information of the laser radar and the uploaded data message;
[0034] It is understandable that the execution subject of the present invention may be a rotation angle error detection device, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0035] In this embodiment, the configuration information of the laser radar can be obtained through the HTTP interface of the laser radar itself. In addition, if the http interface cannot be used, other interfaces provided by the manufacturer can also be used to obtain relevant configurations, such as the CGI interface.
[0036] In this embodiment, the configuration information mainly includes the device IP, device port, device model, rotation speed, rotation direction, synchronization angle, etc. of the laser radar. Among them, the device IP, device port, device model and other data are mainly used to locate the corresponding laser radar. When a large error is detected in the laser radar corresponding to the rotation angle error detection, it is determined that the laser radar is no longer suitable for the existing application scenario. The device can be located based on the device IP, device port, device model and other device-related information, and the laser radar can be repaired and replaced.
[0037] In this embodiment, the laser radar uses the UDP protocol to upload data packets. Compared with the TCP protocol, the UDP protocol does not require both parties to establish a connection before sending data, and the sent data has no verification and no packet loss detection. Therefore, it is not suitable for sending large amounts of data to the PC at one time.
[0038] 102. Analyze the time information in the data message and the actual rotation angle corresponding to the time information;
[0039] In this embodiment, the LiDAR uses UDP to send data to the network. After setting it up on the LiDAR web page or through the command line, you can receive UDP protocol data packets by matching the LiDAR IP address with the LiDAR UDP port number.
[0040] In this embodiment, the data of each frame of the laser radar contains multiple UDP data packets, each UDP data packet has a fixed length, and the composition of the UDP data packet is: data packet identifier, data packet, timestamp and radar model parameters, among which the data packet composition can be: Flag (start identifier), Azimuth (current rotation angle), distance and intensity information, etc.
[0041] In this embodiment, the laser radar will upload the collected laser data in the format of a UDP message. To ensure data accuracy, the UDP message will not be processed when it is collected. Instead, the time and rotation angle information will be saved. Since different models of laser radar message formats are different, the byte position of the required data can be found by querying the laser radar manual based on the radar model parameters in the UDP data packet. The time information of the message will be included in a fixed position in each message and can be directly retrieved. The rotation angle information needs to be checked in the document about the completion time of each block of the radar UDP message. The angle of the block with the most recent time record in the UDP message can be retrieved to ensure that the error is minimized. After saving for a certain period of time, the UDP server is closed and processing begins.
[0042] In this embodiment, the byte stream information is read, that is, the manual of the laser radar is queried to find the byte position of the required data. It can be considered to read one data block at a time in a loop, or it can be considered to read hundreds of data blocks at a time using the fixed format it follows, and then extract the corresponding information based on the fixed position of each data block in the entire list, such as the angle, which only appears in the second position of each block, and the timestamp, so every N positions are the angle information of the block, and so on.
[0043] 103. Calculate an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
[0044] In this embodiment, the time information is the timestamp in the UDP data packet, and the configuration information mainly includes the device IP, device port, device model, rotation frequency, rotation direction, and synchronization angle of the laser radar. Among them, the calculation of the ideal rotation angle corresponding to the time information mainly uses data such as rotation frequency, rotation direction, and synchronization angle.
[0045] In this embodiment, after obtaining the time information t and rotation angle a in the UDP message of the laser radar, the ideal rotation angle is calculated by combining the synchronization angle as, rotation frequency f, and rotation direction of the laser radar.
[0046] The rotation direction includes forward and reverse. The calculation formula for the ideal rotation angle ar of the laser radar in the forward rotation condition is as follows:
[0047]
[0048] To unify the output, if the ideal rotation angle ar is greater than 360°:
[0049] ar=ar-360°
[0050] Similarly, in the reverse case:
[0051]
[0052] To unify the output, if ar is greater than 360:
[0053] ar=ar-360°
[0054] After calculating the ideal angles at all times, the data of time and ideal angle can be obtained.
[0055] 104. Calculate a rotation angle error corresponding to the time information based on the ideal rotation angle and the actual rotation angle.
[0056] In this embodiment, after obtaining the data list of ideal values and actual values, the deviation of the ideal angle and the actual angle at the same time is calculated:
[0057] ae=ar-e
[0058] In order to unify the angle deviation value, we need to unify the ae within ±180 degrees:
[0059] When ae is greater than 180 degrees:
[0060] ae=ae-360°
[0061] When ae is less than -180 degrees:
[0062] ae=ae+360°
[0063] Since the data in the uploaded data message is real-time data, during the detection process, the time and the rotation angle error value corresponding to each time are obtained. A data list can be generated based on the rotation angle error value, ideal rotation angle and actual rotation angle corresponding to the time information. Each column in the data list is a time information and the corresponding rotation angle error value, ideal rotation angle and actual rotation angle.
[0064] In this embodiment, an error threshold can be preset. When there is a rotation angle error value greater than the error threshold in the data list, it means that the actual performance of the corresponding laser radar does not meet the current application scenario, such as an autonomous driving scenario, and the laser radar needs to be repaired or replaced.
[0065] In this embodiment, the configuration information of the laser radar and the uploaded data message are obtained; the time information and the actual rotation angle corresponding to the time information in the data message are parsed; based on the time information and the configuration information, the ideal rotation angle corresponding to the time information is calculated; and based on the ideal rotation angle and the actual rotation angle, the rotation angle error corresponding to the time information is calculated. This method parses the data message uploaded by the laser radar obtained in real time and uses the actual rotation angle detected by the laser radar itself, so the data is more accurate. At the same time, the ideal rotation angle of each time period is calculated through the configuration information. The rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle. Since real-time data is used, the calculated rotation angle error has high accuracy and strong real-time performance. It can be detected during the operation of the laser radar, reducing the risk of the laser radar in various application scenarios.
[0066] See also Figure 2 The second embodiment of the rotation angle error detection method provided by the embodiment of the present invention includes:
[0067] 201. Call the HTTP interface corresponding to the laser radar;
[0068] 202. Send an HTTP request to the HTTP interface and direct it to the configuration page of the laser radar through the HTTP interface;
[0069] In practice, the HTTP protocol is built on top of the TCP protocol. When a browser needs to retrieve web page data from a server, it sends an HTTP request. HTTP establishes a connection to the server via TCP. When the data required by the request is complete, HTTP immediately disconnects the TCP connection. This process is very short. Therefore, an HTTP connection is short-lived and stateless.
[0070] 203. Read the configuration information of the laser radar in the configuration page;
[0071] In actual applications, after sending an HTTP request to the HTTP interface, the corresponding laser radar configuration page will be returned. In this embodiment, through the configuration page, the staff can read the configuration information of the corresponding laser radar and input it into the server. The server identifies the input configuration information and performs corresponding data operations, or after obtaining the configuration page, automatically identifies the configuration information in the configuration page, for example, crawls the text data in the configuration page, and matches the crawled text data with the preset configuration options. If the preset configuration option is the device IP, then after the match is successful, the device IP number behind the device IP is read. When the match fails, manual reading is performed.
[0072] 204. Obtain the data message uploaded by the laser radar, which is a UDP message;
[0073] 205. Parse the UDP message to obtain the timestamp and N data packets of the UDP message;
[0074] In this embodiment, the laser radar uses the UDP protocol for data packets. Data packets uploaded by the laser radar can be obtained by: 1. Writing custom code to obtain radar data; 2. Using Wireshark software to obtain laser radar data in real time. The data length of each laser radar frame is fixed at 1248 bytes, which consists of the first 42 bytes of the pre-packet identifier, 12 groups of data packets, a 4-byte timestamp, and the last two bytes of radar model parameters. The first two bytes of the 12 groups of data packets are the start identifier of the packet (0xFFEE), the next two bytes are the rotation angle (current angle) value, and a continuous 32 * (2 bytes of distance value + 1 byte of laser reflection intensity value) bytes of distance information. The 32 * 3 bytes represent the detection information obtained by the radar twice. The rotation angle carried at the beginning of each data packet refers to the angle corresponding to the first 16 * 3 bytes of the current data packet. The rotation angle corresponding to the last 16 * 3 bytes is not directly provided by the laser radar and needs to be obtained by calculating the two rotation angles and then taking the average.
[0075] 206. Parse N data packets to obtain data packet completion time and angle data corresponding to each data packet;
[0076] In this embodiment, the information on the rotation angle needs to be checked in the document about the completion time of each block of the radar UDP message, and the angle of the block closest to the time recorded in the UDP message is taken to ensure that the error is minimized.
[0077] 207. Based on the completion time of the data packet, filter the angle data from the N data packets as the actual rotation angle, and use the timestamp as the corresponding time information;
[0078] In this embodiment, the calculation of the rotation angle value, for example, the rotation angle of the data packet is 0xE0, 0x63; by reversing the two bytes to become hexadecimal 63E0, then converting 63E0 to unsigned decimal 25568, and finally subtracting 25568 from 100.0 to obtain 255.68, the obtained value 255.68 is the actual rotation angle corresponding to the time information.
[0079] 208. Calculate an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
[0080] 209. Calculate a rotation angle error corresponding to the time information based on the ideal rotation angle and the actual rotation angle.
[0081] Building on the previous example, this embodiment details the process of parsing the time information in a data packet and the actual rotation angle corresponding to the time information. By parsing a UDP packet, the UDP packet timestamp and N data packets are obtained, where N is a natural number not less than 1. The N data packets are parsed to obtain the packet completion time and angle data corresponding to each packet. Based on the packet completion time, the angle data from the N data packets is filtered as the actual rotation angle, and the timestamp is used as the corresponding time information. This embodiment uses UDP as the data packet. UDP is a stateless transport protocol, so it transmits data very quickly, making the LiDAR data transmission more real-time.
[0082] See also Figure 3 The third embodiment of the rotation angle error detection method provided by the embodiment of the present invention includes:
[0083] 301. Call the universal gateway interface corresponding to the laser radar;
[0084] 302. Send a data acquisition request to the universal gateway interface;
[0085] 303. Receive the configuration information of the laser radar returned by the universal gateway interface;
[0086] 304. Obtain the data message uploaded by the laser radar;
[0087] In this embodiment, the configuration of the laser radar itself can be obtained through the HTTP interface of the laser radar itself. The configuration of the radar itself can be obtained by viewing the device IP, device port, device model, rotation speed, rotation direction, and synchronization angle on the laser radar web interface. When it is inconvenient to use the web http, the CGI interface officially provided by the laser radar manufacturer can be used to obtain the relevant configuration of the laser radar by sending CGI commands to the radar.
[0088] In practical applications, the Common Gateway Interface (CGI) is a specification for external programs running on a web server. Programs written in accordance with CGI can extend server functionality. CGI applications can interact with browsers and, through data APIs, communicate with external data sources such as database servers and retrieve data from them. After formatting as an HTML document, it is sent to the browser, and data retrieved from the browser can also be stored in a database. Almost all servers support CGI, and CGI programs can be written in any language, including popular languages such as C, C++, Java, Visual Basic, and Delphi.
[0089] 305. Analyze the time information in the data message and the actual rotation angle corresponding to the time information;
[0090] 306. Calculate an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
[0091] 307. Calculate a rotation angle error corresponding to the time information based on the ideal rotation angle and the actual rotation angle.
[0092] This embodiment, building on the previous one, details the process of obtaining the configuration information and uploaded data packets from the laser radar. This involves invoking the universal gateway interface corresponding to the laser radar; sending a data acquisition request to the universal gateway interface; receiving the laser radar configuration information returned by the universal gateway interface; and finally obtaining the data packets uploaded by the laser radar. This solution provides another method for obtaining laser radar configuration information through a data interface. When using HTTP web pages is inconvenient, the CGI interface officially provided by the laser radar manufacturer can be used to obtain the relevant laser radar configuration by sending CGI commands to the radar. This multi-channel acquisition of laser radar configuration information ensures stable data acquisition.
[0093] See also Figure 4 The fourth embodiment of the rotation angle error detection method provided by the embodiment of the present invention includes:
[0094] 401. Obtain configuration information from the laser radar and the uploaded data message, wherein the configuration information includes a synchronization angle, a rotation frequency, and a rotation direction, and the rotation direction includes forward rotation and reverse rotation;
[0095] 402. Analyze the time information in the data message and the actual rotation angle corresponding to the time information;
[0096] 403. Calculate a first rotation angle based on the time information and the rotation frequency, and multiply the first rotation angle by an angle threshold to obtain a second rotation angle corresponding to each time information;
[0097] 404. When the rotation direction is forward, add the second rotation angle to the synchronization angle to obtain the corresponding ideal rotation angle;
[0098] 405. When the rotation direction is reverse rotation, add the angle threshold to the synchronization angle and subtract the second rotation angle to obtain the corresponding ideal rotation angle;
[0099] 406. Determine whether the ideal rotation angle is greater than an angle threshold;
[0100] 407. If yes, subtract the angle threshold from the ideal rotation angle and update the ideal rotation angle;
[0101] In this embodiment, the time information is the timestamp in the UDP data packet, and the configuration information mainly includes the device IP, device port, device model, rotation frequency, rotation direction, and synchronization angle of the laser radar. Among them, the calculation of the ideal rotation angle corresponding to the time information mainly uses data such as rotation frequency, rotation direction, and synchronization angle.
[0102] In this embodiment, after obtaining the time information t and rotation angle a in the UDP message of the laser radar, the ideal rotation angle can be calculated in combination with the synchronization angle as, rotation frequency f, and rotation direction of the laser radar, and the angle threshold can be preset. In this embodiment, the angle threshold is set to three hundred and sixty degrees.
[0103] The calculation formula for the ideal rotation angle ar when the laser radar rotates forward is as follows:
[0104]
[0105] To unify the output, if the ideal rotation angle ar is greater than 360°:
[0106] ar=ar-360°
[0107] Similarly, in the reverse case:
[0108]
[0109] To unify the output, if ar is greater than 360:
[0110] ar=ar-360°
[0111] After calculating the ideal angles at all times, the data of time and ideal angle can be obtained.
[0112] 408. Subtract the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error;
[0113] 409. If the rotation angle error is greater than 180 degrees, then the rotation angle is reduced by 360 degrees;
[0114] 410. If the rotation angle error is less than negative 180 degrees, add 360 degrees to the rotation angle.
[0115] In this embodiment, after obtaining the data list of ideal values and actual values, the deviation of the ideal angle and the actual angle at the same time is calculated:
[0116] ae=ar-a
[0117] In order to unify the angle deviation value, we need to unify the ae within ±180 degrees:
[0118] When ae is greater than 180 degrees:
[0119] ae=ae-360°
[0120] When ae is less than -180 degrees:
[0121] ae=ae+360°
[0122] In this embodiment, an error threshold can be preset. When there is a rotation angle error value greater than the error threshold in the data list, it means that the actual performance of the corresponding laser radar does not meet the current application scenario, such as an autonomous driving scenario, and the laser radar needs to be repaired or replaced.
[0123] Based on the previous embodiment, this embodiment describes in detail the process of calculating the ideal rotation angle corresponding to each time information of the laser radar during forward rotation and reverse rotation based on the synchronization angle and the rotation frequency, and calculating the rotation angle error corresponding to each time information of the laser radar based on the ideal rotation angle and the actual rotation angle. This solution performs error detection by directly obtaining real-time data and the configuration information of the laser radar, rather than checking the point cloud data. The error detection is highly real-time and can evaluate the performance of all laser radars every time the autonomous driving vehicle is dispatched, and replace failed radars in time to ensure the normal function of the vehicle and the safety of the passengers in the vehicle.
[0124] The above describes the rotation angle error detection method provided by the embodiment of the present invention. The following describes the rotation angle error detection device according to the embodiment of the present invention. Figure 5 In one embodiment of the present invention, a rotation angle error detection device includes:
[0125] The acquisition module 501 is used to obtain the configuration information of the laser radar and the uploaded data message;
[0126] A parsing module 502 is configured to parse the time information in the data message and the actual rotation angle corresponding to the time information;
[0127] An angle calculation module 503, configured to calculate an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
[0128] The error calculation module 504 is configured to calculate a rotation angle error corresponding to the time information based on the ideal rotation angle and the actual rotation angle.
[0129] In an embodiment of the present invention, the rotation angle error detection device runs the above-mentioned rotation angle error detection method. The device obtains the configuration information in the laser radar and the uploaded data message; parses the time information and the actual rotation angle corresponding to the time information in the data message; calculates the ideal rotation angle corresponding to the time information based on the time information and the configuration information; and calculates the rotation angle error corresponding to the time information based on the ideal rotation angle and the actual rotation angle. This method parses the data message uploaded by the laser radar obtained in real time and uses the actual rotation angle detected by the laser radar itself, so the data is more accurate. At the same time, the ideal rotation angle of each time period is calculated through the configuration information. The rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle. Since real-time data is used, the calculated rotation angle error is highly accurate and has strong real-time performance. It can be detected during the operation of the laser radar, reducing the risk of the laser radar in various application scenarios.
[0130] See also Figure 6 The second embodiment of the rotation angle error detection device provided by the embodiment of the present invention includes:
[0131] The acquisition module 501 is used to obtain the configuration information of the laser radar and the uploaded data message;
[0132] A parsing module 502 is configured to parse the time information in the data message and the actual rotation angle corresponding to the time information;
[0133] An angle calculation module 503, configured to calculate an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
[0134] The error calculation module 504 is configured to calculate a rotation angle error corresponding to the time information based on the ideal rotation angle and the actual rotation angle.
[0135] In this embodiment, the data packet is a UDP packet; the parsing module 502 is specifically used to: parse the UDP packet to obtain the timestamp of the UDP packet and N data packets, wherein N is a natural number not less than 1; parse the N data packets to obtain the data packet completion time and angle data corresponding to each data packet; based on the data packet completion time, filter the angle data from the N data packets as the actual rotation angle, and use the timestamp as the corresponding time information.
[0136] In this embodiment, the acquisition module 501 is specifically used to: call the HTTP interface corresponding to the laser radar; send an HTTP request to the HTTP interface, and direct it to the configuration page of the laser radar through the HTTP interface; read the configuration information of the laser radar in the configuration page; and obtain the data message uploaded by the laser radar.
[0137] In this embodiment, the acquisition module 501 is specifically used to: call the universal gateway interface corresponding to the laser radar; send a data acquisition request to the universal gateway interface; receive the configuration information of the laser radar returned by the universal gateway interface; and obtain the data message uploaded by the laser radar.
[0138] In this embodiment, the configuration information includes a synchronization angle, a rotation frequency and a rotation direction, and the rotation direction includes forward rotation and reverse rotation; the angle calculation module 503 specifically includes: a calculation unit 5031, used to calculate the ideal rotation angle corresponding to each time information of the laser radar during forward rotation and reverse rotation according to the synchronization angle and the rotation frequency; a judgment unit 5032, used to judge whether the ideal rotation angle is greater than an angle threshold; an angle updating unit 5033, used to subtract the angle threshold from the ideal rotation angle when the ideal rotation angle is greater than the angle threshold, and update the ideal rotation angle.
[0139] In this embodiment, the calculation unit 5031 is specifically used to: calculate the first rotation angle based on the time information and the rotation frequency, and multiply the first rotation angle by the angle threshold to obtain the second rotation angle corresponding to each time information; when the rotation direction is forward rotation, add the synchronization angle to the second rotation angle to obtain the corresponding ideal rotation angle; when the rotation direction is reverse rotation, add the angle threshold to the synchronization angle and subtract the second rotation angle to obtain the corresponding ideal rotation angle.
[0140] In this embodiment, the error calculation module 504 is specifically used to: subtract the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error; if the rotation angle error is greater than one hundred and eighty degrees, subtract three hundred and sixty degrees from the rotation angle; if the rotation angle error is less than negative one hundred and eighty degrees, add three hundred and sixty degrees to the rotation angle.
[0141] Based on the previous embodiment, this embodiment describes in detail the functions and relationships between the modules, as well as the unit composition in some modules. By parsing the data messages uploaded by the laser radar that can be obtained in real time by these module units, the actual rotation angle detected by the laser radar itself is used, and the data is more accurate. At the same time, the ideal rotation angle of each time period is calculated through the configuration information. The rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle. Since real-time data is used, the calculated rotation angle error is highly accurate and real-time, and can be detected during the operation of the laser radar, reducing the risk of the laser radar in various application scenarios.
[0142] above Figure 5 and Figure 6 The rotation angle error detection device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The computer device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0143] Figure 7 7 is a structural diagram of a computer device provided by an embodiment of the present invention. The computer device 700 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 710 (for example, one or more processors) and a memory 720, and one or more storage media 730 (for example, one or more mass storage devices) storing application programs 733 or data 732. Among them, the memory 720 and the storage medium 730 can be temporary storage or permanent storage. The program stored in the storage medium 730 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device 700. Furthermore, the processor 710 can be configured to communicate with the storage medium 730 and execute a series of instruction operations in the storage medium 730 on the computer device 700 to implement the steps of the above-mentioned rotation angle error detection method.
[0144] The computer device 700 may further include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input and output interfaces 760, and / or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 7 The computer device structure shown does not constitute a limitation on the computer device provided in this application, and may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently.
[0145] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions. When the instructions are executed on a computer, the computer executes the steps of the laser radar rotation angle error detection method provided in the above embodiment.
[0146] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program code.
[0148] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting rotation angle error of a laser radar, characterized in that: The rotation angle error detection method comprises: Obtain configuration information from the laser radar, as well as uploaded data packets, wherein the configuration information includes synchronization angle, rotation frequency, and rotation direction, and the data packets are UDP packets; parsing the time information in the data message and the actual rotation angle corresponding to the time information; Determine a corresponding ideal rotation angle calculation formula based on the rotation direction; Calculating an ideal rotation angle corresponding to the time information under the corresponding direction using the ideal rotation angle calculation formula based on the time information, the synchronization angle, the rotation frequency, and the rotation direction; Calculating a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle; The parsing of the time information in the data packet and the actual rotation angle corresponding to the time information includes: parsing the UDP packet to obtain the timestamp of the UDP packet and N data packets, wherein N is a natural number not less than 1; parsing the N data packets to obtain the data packet completion time and angle data corresponding to each data packet; based on the data packet completion time, filtering the angle data from the N data packets as the actual rotation angle, and using the timestamp as the corresponding time information.
2. The rotation angle error detection method according to claim 1, characterized in that: The obtaining of the configuration information in the laser radar and the uploaded data message includes: Call the HTTP interface corresponding to the laser radar; Sending an HTTP request to the HTTP interface, and directing to the configuration page of the laser radar through the HTTP interface; Read the configuration information of the laser radar in the configuration page; Get the data message uploaded by the laser radar.
3. The rotation angle error detection method according to claim 1, characterized in that: The obtaining of the configuration information in the laser radar and the uploaded data message includes: Call the universal gateway interface corresponding to the laser radar; Sending a data acquisition request to the universal gateway interface; Receiving the configuration information of the laser radar returned by the universal gateway interface; Get the data message uploaded by the laser radar.
4. The rotation angle error detection method according to claim 1, characterized in that: The rotation direction includes forward rotation and reverse rotation; The calculating of the ideal rotation angle corresponding to the time information under the corresponding direction using the ideal rotation angle calculation formula based on the time information, the synchronization angle, the rotation frequency, and the rotation direction includes: Calculate the ideal rotation angle corresponding to each time information of the laser radar during forward rotation and reverse rotation according to the synchronization angle, the rotation frequency and the ideal rotation angle calculation formula; Determining whether the ideal rotation angle is greater than a preset angle threshold; If so, the angle threshold is subtracted from the ideal rotation angle, and the ideal rotation angle is updated.
5. The rotation angle error detection method according to claim 4, characterized in that: The calculation of the ideal rotation angle corresponding to each time information of the laser radar during forward rotation and reverse rotation according to the synchronization angle, the rotation frequency and the ideal rotation angle calculation formula includes: Calculating a first rotation angle based on the time information and the rotation frequency, and multiplying the first rotation angle by an angle threshold to obtain a second rotation angle corresponding to each time information; When the rotation direction is forward, the synchronization angle is added to the second rotation angle to obtain the corresponding ideal rotation angle; When the rotation direction is reverse rotation, the angle threshold is added to the synchronization angle and the second rotation angle is subtracted to obtain the corresponding ideal rotation angle.
6. The rotation angle error detection method according to any one of claims 1 to 5, characterized in that: Calculating the rotation angle error corresponding to each time information of the laser radar according to the ideal rotation angle and the actual rotation angle includes: Subtracting the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error; If the rotation angle error is greater than one hundred and eighty degrees, subtract three hundred and sixty degrees from the rotation angle; If the rotation angle error is less than negative one hundred and eighty degrees, three hundred and sixty degrees are added to the rotation angle.
7. A rotation angle error detection device for a laser radar, characterized in that: The rotation angle error detection device comprises: An acquisition module is used to obtain configuration information in the laser radar and uploaded data packets, wherein the configuration information includes synchronization angle, rotation frequency and rotation direction, and the data packets are UDP packets; A parsing module, configured to parse the time information in the data message and the actual rotation angle corresponding to the time information; an angle calculation module, configured to determine a corresponding ideal rotation angle calculation formula based on the rotation direction; and calculate, based on the time information, the synchronization angle, the rotation frequency, and the rotation direction, an ideal rotation angle corresponding to the time information under the corresponding rotation direction using the ideal rotation angle calculation formula; an error calculation module, configured to calculate a rotation angle error corresponding to the time information based on the ideal rotation angle and the actual rotation angle; The parsing of the time information in the data packet and the actual rotation angle corresponding to the time information includes: parsing the UDP packet to obtain the timestamp of the UDP packet and N data packets, wherein N is a natural number not less than 1; parsing the N data packets to obtain the data packet completion time and angle data corresponding to each data packet; based on the data packet completion time, filtering the angle data from the N data packets as the actual rotation angle, and using the timestamp as the corresponding time information.
8. A computer device, characterized in that: The computer device includes: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the computer device to execute the various steps of the rotation angle error detection method of the laser radar as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the rotation angle error detection method of the laser radar as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Laser radar and camera synchronization method and device, equipment and storage medium
CN111435162A
Subway tunnel internal environment three-dimensional reconstruction and disease intelligent identification method
CN111833449A
Laser radar measurement value correction method, error compensation model and laser radar
CN113138373A