CN114063089A - Rotation angle error detection method, device, equipment and storage medium - Google Patents

Rotation angle error detection method, device, equipment and storage medium Download PDF

Info

Publication number
CN114063089A
CN114063089A CN202111263170.5A CN202111263170A CN114063089A CN 114063089 A CN114063089 A CN 114063089A CN 202111263170 A CN202111263170 A CN 202111263170A CN 114063089 A CN114063089 A CN 114063089A
Authority
CN
China
Prior art keywords
rotation angle
angle
laser radar
time information
rotation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111263170.5A
Other languages
Chinese (zh)
Inventor
陈思达
徐立人
韩旭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wenyuan Suhang Jiangsu Technology Co ltd
Original Assignee
Wenyuan Suhang Jiangsu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wenyuan Suhang Jiangsu Technology Co ltd filed Critical Wenyuan Suhang Jiangsu Technology Co ltd
Priority to CN202111263170.5A priority Critical patent/CN114063089A/en
Publication of CN114063089A publication Critical patent/CN114063089A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/26Measuring arrangements characterised by the use of optical techniques for measuring angles or tapers; for testing the alignment of axes

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

The invention relates to the field of laser radars, and discloses a method, a device, equipment and a storage medium for detecting a rotation angle error, wherein the method comprises the following steps: extracting time information in data messages uploaded by a laser radar and an actual rotation angle corresponding to the time information; acquiring configuration information of the laser radar through a preset data interface; calculating an ideal rotation angle corresponding to each time information of the laser radar based on the configuration information; and 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. According to the method, the data message uploaded by the laser radar acquired in real time is analyzed, the actual rotation angle detected by the laser radar is used, the data is more accurate, the rotation angle error obtained through calculation is high in precision and strong in real-time performance due to the fact that the real-time data is used, the detection can be carried out in the working process of the laser radar, and the risk of the laser radar in various application scenes is reduced.

Description

Rotation angle error detection method, device, equipment and storage medium
Technical Field
The invention relates to the field of laser radars, in particular to a rotation angle error detection method, a rotation angle error detection device, rotation angle error detection equipment and a storage medium.
Background
The laser radar is a radar system that detects a characteristic amount such as a position and a velocity of a target by emitting a laser beam. The working principle of the method is that a detection signal is transmitted to a target, and then the received signal reflected from the target is compared with the transmitted signal to obtain information such as the distance, the height and the like of the target. Currently, laser radars are widely used in mobile robots and smart factories.
In the prior art, the error detection of the rotation angle of the laser radar can only be realized by checking whether the point cloud is lost or not, but the real-time performance of the whole process of checking the point cloud data is poor, and the point cloud data can only be identified after serious faults occur.
Disclosure of Invention
The main objective of this application is to solve current laser radar's the rotation angle error detection real-time poor technical problem.
The invention provides a rotation angle error detection method in a first aspect, which comprises the following steps: acquiring configuration information in the laser radar and an uploaded data message; analyzing the time information in the data message and the actual rotation angle corresponding to the time information; calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information; and calculating a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
Optionally, in a first implementation manner of the first aspect of the present invention, the data packet is a UDP packet; the analyzing the time information in the data message and the actual rotation angle corresponding to the time information comprises: analyzing the UDP message to obtain a time stamp and N data packets of the UDP message, wherein N is a natural number not less than 1; analyzing the N data packets to obtain data packet completion time and angle data corresponding to each data packet; and based on the data packet completion time, screening angle data from the N data packets as an actual rotation angle, and using the timestamp as corresponding time information.
Optionally, in a second implementation manner of the first aspect of the present invention, the acquiring the configuration information in the laser radar and the uploaded data packet include: calling an HTTP interface corresponding to the laser radar; sending an HTTP request to the HTTP interface, and directing to a configuration page of the laser radar through the HTTP interface; reading the configuration information of the laser radar in the configuration page; and acquiring the data message uploaded by the laser radar.
Optionally, in a third implementation manner of the first aspect of the present invention, the acquiring the configuration information in the laser radar and the uploaded data packet include: calling a general gateway interface corresponding to the laser radar; sending a data acquisition request to the universal gateway interface; receiving configuration information of the laser radar returned by the universal gateway interface; and acquiring the data message uploaded by the laser radar.
Optionally, in a fourth implementation manner of the first aspect of the present invention, the configuration information includes a synchronization angle, a rotation frequency, and a rotation direction, where the rotation direction includes a forward rotation and a reverse rotation; the calculating the ideal rotation angle corresponding to each time information of the laser radar based on the configuration information comprises: respectively calculating ideal rotation angles corresponding to all time information of the laser radar during forward rotation and reverse rotation according to the synchronous angle and the rotation frequency; judging whether the ideal rotation angle is larger than a preset angle threshold value or not; and if so, subtracting the angle threshold value from the ideal rotation angle, and updating the ideal rotation angle.
Optionally, in a fifth implementation manner of the first aspect of the present invention, the calculating, according to the synchronization angle and the rotation frequency, an ideal rotation angle corresponding to each time information of the laser radar during the forward rotation and the reverse rotation respectively 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 positive rotation, adding the second rotation angle to the synchronization angle to obtain a corresponding ideal rotation angle; and when the rotation direction is reverse rotation, adding an angle threshold to the synchronous angle and subtracting the second rotation angle to obtain a corresponding ideal rotation angle.
Optionally, in a sixth implementation manner of the first aspect of the present invention, the calculating, according to the ideal rotation angle and the actual rotation angle, a rotation angle error corresponding to each time information of the laser radar includes: subtracting the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error; if the error of the rotation angle is larger than one hundred eighty degrees, subtracting three hundred sixty degrees from the rotation angle; and if the error of the rotation angle is less than minus one hundred eighty degrees, adding three hundred sixty degrees to the rotation angle.
A second aspect of the present invention provides a rotation angle error detection device, including: the acquisition module is used for acquiring the configuration information in the laser radar and the uploaded data message; the analysis module is used for analyzing the time information in the data message and the actual rotation angle corresponding to the time information; the angle calculation module is used for calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information; and the error calculation module is used for calculating the rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
Optionally, in a first implementation manner of the second aspect of the present invention, the data packet is a UDP packet; the analysis module is specifically configured to: analyzing the UDP message to obtain a time stamp and N data packets of the UDP message, wherein N is a natural number not less than 1; analyzing the N data packets to obtain data packet completion time and angle data corresponding to each data packet; and based on the data packet completion time, screening angle data from the N data packets as an actual rotation angle, and using the timestamp as corresponding time information.
Optionally, in a second implementation manner of the second aspect of the present invention, the obtaining module is specifically configured to: calling an HTTP interface corresponding to the laser radar; sending an HTTP request to the HTTP interface, and directing to a configuration page of the laser radar through the HTTP interface; reading the configuration information of the laser radar in the configuration page; and acquiring the data message uploaded by the laser radar.
Optionally, in a third implementation manner of the second aspect of the present invention, the obtaining module is specifically configured to: calling a general gateway interface corresponding to the laser radar; sending a data acquisition request to the universal gateway interface; receiving configuration information of the laser radar returned by the universal gateway interface; and acquiring the data message uploaded by the laser radar.
Optionally, in a fourth implementation manner of the second aspect of the present invention, the configuration information includes a synchronization angle, a rotation frequency, and a rotation direction, where the rotation direction includes a forward rotation and a reverse rotation; the angle calculation module specifically includes: the calculation unit is used for calculating ideal rotation angles corresponding to all time information of the laser radar during forward rotation and reverse rotation respectively according to the synchronous angle and the rotation frequency; the judging unit is used for judging whether the ideal rotation angle is larger than a preset angle threshold value or not; and the angle updating unit is used for subtracting an angle threshold value from the ideal rotation angle and updating the ideal rotation angle when the ideal rotation angle is larger than the angle threshold value.
Optionally, in a fifth implementation manner of the second aspect of the present invention, the computing unit is specifically configured to: 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 positive rotation, adding the second rotation angle to the synchronization angle to obtain a corresponding ideal rotation angle; and when the rotation direction is reverse rotation, adding an angle threshold to the synchronous angle and subtracting the second rotation angle to obtain a corresponding ideal rotation angle.
Optionally, in a sixth implementation manner of the second aspect of the present invention, the error calculation module is specifically configured to: subtracting the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error; if the error of the rotation angle is larger than one hundred eighty degrees, subtracting three hundred sixty degrees from the rotation angle; and if the error of the rotation angle is less than minus one hundred eighty degrees, adding three hundred sixty degrees to the rotation angle.
A third aspect of the present invention provides a computer apparatus comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line; the at least one processor invokes the instructions in the memory to cause the computer device to perform the steps of the lidar rotation angle error detection method described above.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the above-described method for detecting a rotation angle error of a lidar.
Has the advantages that:
in the technical scheme of the invention, the configuration information in the laser radar and the uploaded data message are acquired; analyzing the time information in the data message and the actual rotation angle corresponding to the time information; calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information; and calculating a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle. According to the method, the data message uploaded by the laser radar acquired in real time is analyzed, the actual rotation angle detected by the laser radar is used, the data is more accurate, meanwhile, the ideal rotation angle of each time period is obtained through configuration information calculation, and the rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle.
Drawings
Fig. 1 is a schematic diagram of a first embodiment of a rotation angle error detection method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a second embodiment of a method for detecting an error in a rotation angle according to an embodiment of the present invention;
fig. 3 is a schematic diagram of a third embodiment of a method for detecting a rotation angle error according to an embodiment of the present invention;
fig. 4 is a schematic diagram of a fourth embodiment of a rotation angle error detection method according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an embodiment of a rotation angle error detection apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of another embodiment of a rotation angle error detection apparatus according to an embodiment of the present invention;
fig. 7 is a schematic diagram of an embodiment of a computer device according to an embodiment of the present invention.
Detailed Description
In the technical scheme of the invention, the configuration information in the laser radar and the uploaded data message are acquired; analyzing the time information in the data message and the actual rotation angle corresponding to the time information; calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information; and calculating a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle. According to the method, the data message uploaded by the laser radar acquired in real time is analyzed, the actual rotation angle detected by the laser radar is used, the data is more accurate, meanwhile, the ideal rotation angle of each time period is obtained through configuration information calculation, and the rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprises," "comprising," or "having," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
For convenience of understanding, a specific flow of the embodiment of the present invention is described below, and referring to fig. 1, a first embodiment of a rotation angle error detection method provided by the embodiment of the present invention includes:
101. acquiring configuration information in a laser radar and an uploaded data message;
it is to be understood that the executing main body of the present invention may be a rotation angle error detecting device, and may also be a terminal or a server, which is not limited herein. The embodiment of the present invention is described by taking a server as an execution subject.
In this embodiment, the configuration information of the lidar may be obtained through an HTTP interface of the lidar itself, and if the HTTP interface cannot be used, other interfaces provided by a manufacturer may also be used to obtain the relevant configuration, such as a CGI interface.
In this embodiment, the configuration information mainly includes the device IP of the laser radar, the device port, the device model, the rotational speed, the rotational direction, the synchronization angle, etc., wherein, data such as the device IP, the device port, the device model, etc. are mainly used for positioning the corresponding laser radar, when it detects that there is a large error in the laser radar that carries out the rotational angle error detection correspondence, it is determined that the laser radar is not suitable for the existing application scenario, can carry out the device positioning according to information such as the device IP, the device port, the device model, etc. that is relevant to the device, carry out the rework replacement of the laser radar.
In this embodiment, the laser radar uploads the data packet by using a UDP protocol, which is compared with a TCP protocol, connection between two parties is not required before data is sent, and the sent data is not verified and packet loss detection is not performed, so that the laser radar is not suitable for sending a large amount of data to a PC at one time.
102. Analyzing the time information in the data message and the actual rotation angle corresponding to the time information;
in this embodiment, the lidar transmits data to the network using the form of UDP. And setting a page at the radar web end or setting the page through a command line, and then receiving the data message of the UDP protocol by matching the radar IP and the radar UDP port number.
In this embodiment, the data of each frame of the laser radar includes a plurality of UDP packets, each UDP packet has a fixed length, and the UDP packet includes: data packet identification, data packet, timestamp and radar model parameter, wherein, the data packet composition can be: flag (start identification), Azimuth (current rotation angle), distance and intensity information, etc.
In this embodiment, laser radar can upload the laser data who collects through the format of UDP message, in order to guarantee the accuracy of data, can not handle the UDP message when collecting the UDP message, but keep the information of time and turned angle, because the laser radar message format of different models is different, can be as required according to the radar model parameter in the UDP data packet, inquire laser radar's manual and find the byte position of required data. The time information of the message can be brought to a fixed position of each message and can be directly taken out, the information of the rotation angle needs to check the completion time of each block of the radar UDP message in the document, the angle of the block with the latest recording time in the UDP message is taken out, the minimum error can be ensured, the UDP server is closed after the time information is stored for a certain time, and then the processing is started.
In this embodiment, reading byte stream information, that is, querying a laser radar manual to find byte positions of required data, may consider reading data block by data block in a cyclic manner, or may read several hundred data blocks at a time by using a fixed format that it follows, and then extract corresponding information, such as an angle, which is only present at a second position of each block, for example, a timestamp, according to a fixed position of each data block in the whole list, so every N positions are angle information of the block, and so on.
103. Calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
in this embodiment, the time information is a timestamp in the UDP packet, and the configuration information mainly includes a device IP, a device port, a device model, a rotation frequency, a rotation direction, and a synchronization angle of the lidar, where the ideal rotation angle corresponding to the calculated time information mainly uses data such as the rotation frequency, the rotation direction, and the synchronization angle.
In this embodiment, after obtaining the time information t and the rotation angle a in the UDP packet of the lidar, the rotation angle in the ideal case is calculated by combining the synchronization angle as, the rotation frequency f, and the rotation direction of the lidar.
The rotation direction comprises a forward direction and a reverse direction, and the calculation formula of the ideal rotation angle ar of the laser radar under the condition of forward rotation is as follows:
Figure BDA0003326398870000061
for uniform output, if the ideal rotation angle ar is greater than 360 °:
ar=ar-360°
the same can be said, in the case of inversion:
Figure BDA0003326398870000062
for uniform output, if ar is greater than 360:
ar=ar-360°
and calculating the ideal angle of all the time to obtain the data of the time and the ideal angle.
104. And calculating the rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
In this embodiment, after obtaining the data list of the ideal value and the actual value, the deviation is calculated for the ideal angle and the actual angle at the same time:
ae=ar-e
to unify the angular deviation values, we need to unify ae within ± 180 degrees:
when ae is greater than 180 degrees:
ae=ae-360°
when ae is less than-180 degrees:
ae=ae+360°
because the data in the uploaded data message is real-time data, in the detection process, the data of the time and the rotation angle error value corresponding to each time is obtained, a data list can be generated according to the rotation angle error value, the ideal rotation angle and the actual rotation angle corresponding to the time information, and each column on the data list is a time information and the corresponding rotation angle error value, the ideal rotation angle and the actual rotation angle.
In this embodiment, an error threshold may be preset, and when the rotation angle error value is greater than the error threshold in the data list, it indicates that the actual performance of the corresponding laser radar does not conform to the current application scenario, for example, an automatic driving scenario, and the laser radar needs to be repaired or replaced.
In this embodiment, the configuration information in the laser radar and the uploaded data message are acquired; analyzing the time information in the data message and the actual rotation angle corresponding to the time information; calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information; and calculating a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle. According to the method, the data message uploaded by the laser radar acquired in real time is analyzed, the actual rotation angle detected by the laser radar is used, the data is more accurate, meanwhile, the ideal rotation angle of each time period is obtained through configuration information calculation, and the rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle.
Referring to fig. 2, a second embodiment of the method for detecting a rotation angle error according to the present invention includes:
201. calling an HTTP interface corresponding to the laser radar;
202. sending an HTTP request to an HTTP interface, and directing to a configuration page of the laser radar through the HTTP interface;
in practical applications, the HTTP protocol is based on the TCP protocol, and when the browser needs to obtain the web page data from the server, an HTTP request is issued. The HTTP establishes a connection channel to the server through the TCP, and when the data required by the request is completed, the HTTP immediately disconnects the TCP, which is a very short process. The HTTP connection is a short connection and a stateless connection.
203. Reading configuration information of the laser radar in the configuration page;
in practical application, after an HTTP request HTTP interface is sent, a corresponding configuration page of the laser radar is returned, in this embodiment, through the configuration page, a worker can read configuration information of the corresponding laser radar and input the configuration information into the server, the server identifies the input configuration information and performs corresponding data operation, or after the configuration page is obtained, automatically identifies the configuration information in the configuration page, for example, crawls text data in the configuration page and matches the crawled text data with a preset configuration option, if the preset configuration option is an equipment ip, after matching is successful, an equipment ip number behind the equipment ip is read, and if matching is failed, manual reading is performed.
204. Acquiring a data message uploaded by a laser radar, wherein the data message is a UDP (user Datagram protocol) message;
205. analyzing the UDP message to obtain a time stamp and N data packets of the UDP message;
in this embodiment, the laser radar adopts UDP protocol data packets, and the data packets uploaded by the laser radar can be acquired through: 1. and 2, acquiring data of the radar in real time through Wireshark software. The data length of each frame of the laser radar is fixed to be 1248 bytes, wherein the data length is respectively a front data packet identifier of the first 42 bytes, 12 groups of data packets, a 4-byte timestamp and a last two-byte radar model parameter. The first two bytes in 12 groups of data packets are the start identifier (0 xfffee) of the data packet, the rotation angle (current angle) value of the next two bytes and the distance information of continuous 32 bytes (the distance value of 2 bytes + the laser reflection intensity value of 1 byte), wherein 32 bytes 3 bytes respectively obtain detection information for the radar twice, the rotation angle carried at the beginning of each data packet is the angle corresponding to the first 16 bytes 3 bytes of the current data packet, and the rotation angle corresponding to the last 16 bytes 3 bytes is not directly given by the lidar, and needs to be obtained by calculating the rotation angles of the previous two bytes and the next two bytes and then calculating the average value.
206. Analyzing the N data packets to obtain data packet completion time and angle data corresponding to each data packet;
in this embodiment, the information of the rotation angle needs to check the completion time of each block of the radar UDP packet in the document, and take the angle of the block closest to the recording time in the UDP packet, so as to ensure the minimum error.
207. Based on the data packet completion time, screening angle data from the N data packets as an actual rotation angle, and using a timestamp as corresponding time information;
in the present embodiment, the rotation angle value is calculated, for example, the rotation angle of the data packet is 0xE0, 0x 63; 255.68 is obtained by inverting two bytes to hexadecimal 63E0, then 63E0 to unsigned decimal 25568, and finally 25568 to 100.0, and the obtained value is 255.68, which is the actual rotation angle of the corresponding time information.
208. Calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
209. and calculating the rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
On the basis of the previous embodiment, the process of analyzing the time information in the UDP packet and the actual rotation angle corresponding to the time information is described in detail, and a time stamp and N data packets of the UDP packet are obtained by analyzing the UDP packet, where N is a natural number not less than 1; analyzing the N data packets to obtain data packet completion time and angle data corresponding to each data packet; and based on the data packet completion time, screening angle data from the N data packets as an actual rotation angle, and taking a timestamp as corresponding time information. In the embodiment, UDP is used as the data message, and is a stateless transmission protocol, so that it is very fast when transmitting data, so that the real-time performance of the laser radar for transmitting data is higher.
Referring to fig. 3, a third embodiment of the method for detecting a rotation angle error according to the present invention includes:
301. calling a general gateway interface corresponding to the laser radar;
302. sending a data acquisition request to a universal gateway interface;
303. receiving configuration information of the laser radar returned by the universal gateway interface;
304. acquiring a data message uploaded by a laser radar;
in this embodiment, the configuration of lidar itself is obtained through the HTTP interface of lidar itself, and the IP of the device, the port of the device, the model of the device, the rotation speed, the rotation direction, and the synchronization angle are obtained through the configuration of the lidar itself, and when the HTTP of the webpage is inconvenient, the CGI interface officially provided by the lidar manufacturer can be used, and the relevant configuration of the lidar is obtained by sending a CGI command to the radar.
In practical applications, Common Gateway Interface (CGI) is a specification of an external program when a Web server runs, and a program written according to CGI can extend functions of the server. The CGI application can interact with the browser and can also communicate with an external data source such as a database server through a data API to obtain data from the database server. Formatted as an HTML document, and sent to the browser, or the data obtained from the browser may be placed in a database. CGI is supported by almost all servers and can be written in any language, including popular C, C + +, Java, VB, and Delphi, among others.
305. Analyzing the time information in the data message and the actual rotation angle corresponding to the time information;
306. calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
307. and calculating the rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
On the basis of the previous embodiment, the present embodiment describes in detail the process of acquiring the configuration information in the laser radar and the uploaded data packet, and calls a universal gateway interface corresponding to the laser radar; sending a data acquisition request to the universal gateway interface; receiving configuration information of the laser radar returned by the universal gateway interface; and acquiring the data message uploaded by the laser radar. According to the scheme, another method for acquiring the configuration information of the laser radar through the data interface is provided, when webpage http is inconvenient to use, a CGI (common gateway interface) provided by a laser radar manufacturer official party can be used, the CGI command is sent to the radar to acquire the relevant configuration of the laser radar, the configuration information of the laser radar is acquired in multiple ways, and the stability of data acquisition is guaranteed.
Referring to fig. 4, a 4 th embodiment of the method for detecting an error of a rotation angle according to the present invention includes:
401. acquiring configuration information in a laser radar and an uploaded data message, wherein the configuration information comprises a synchronization angle, a rotation frequency and a rotation direction, and the rotation direction comprises forward rotation and reverse rotation;
402. analyzing the time information in the data message and the actual rotation angle corresponding to the time information;
403. 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;
404. when the rotation direction is positive rotation, adding the second rotation angle to the synchronization angle to obtain a corresponding ideal rotation angle;
405. when the rotation direction is reverse rotation, adding an angle threshold to the synchronous angle and subtracting a second rotation angle to obtain a corresponding ideal rotation angle;
406. judging whether the ideal rotation angle is larger than an angle threshold value or not;
407. if so, subtracting an angle threshold value from the ideal rotation angle, and updating the ideal rotation angle;
in this embodiment, the time information is a timestamp in a UDP packet, and the configuration information mainly includes a device IP, a device port, a device model, a rotation frequency, a rotation direction, and a synchronization angle of the lidar, where the ideal rotation angle corresponding to the calculated time information mainly uses data such as the rotation frequency, the rotation direction, and the synchronization angle.
In this embodiment, after obtaining the time information t and the rotation angle a in the UDP packet of the lidar, the rotation angle in an ideal case may be calculated by combining the synchronization angle as, the rotation frequency f, and the rotation direction of the lidar, and an angle threshold is preset, and in this embodiment, the angle threshold is set to three hundred and sixty degrees.
The calculation formula of the ideal rotation angle ar under the condition of positive rotation of the laser radar is as follows:
Figure BDA0003326398870000091
for uniform output, if the ideal rotation angle ar is greater than 360 °:
ar=ar-360°
the same can be said, in the case of inversion:
Figure BDA0003326398870000101
for uniform output, if ar is greater than 360:
ar=ar-360°
and calculating the ideal angle of all the time to obtain the data of the time and the ideal angle.
408. Subtracting the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error;
409. if the error of the rotation angle is more than one hundred eighty degrees, subtracting three hundred sixty degrees from the rotation angle;
410. if the error of the rotation angle is less than minus one hundred eighty degrees, the rotation angle is added with three hundred sixty degrees.
In this embodiment, after obtaining the data list of the ideal value and the actual value, the deviation is calculated for the ideal angle and the actual angle at the same time:
ae=ar-a
to unify the angular deviation values, we need to unify ae within ± 180 degrees:
when ae is greater than 180 degrees:
ae=ae-360°
when ae is less than-180 degrees:
ae=ae+360°
in this embodiment, an error threshold may be preset, and when the rotation angle error value is greater than the error threshold in the data list, it indicates that the actual performance of the corresponding laser radar does not conform to the current application scenario, for example, an automatic driving scenario, and the laser radar needs to be repaired or replaced.
On the basis of the embodiment before, the detailed description calculates ideal turned angle that each time information of laser radar corresponds when forward rotation and reverse rotation respectively according to synchronous angle and rotational frequency and according to ideal turned angle and actual turned angle, the process of the turned angle error that each time information of calculation laser radar corresponds, this scheme carries out error detection through the configuration information that directly acquires real-time data and laser radar, rather than the mode of looking over point cloud data, error detection's real-time is high, can realize that the performance of all laser radar is appraised when the automatic drive vehicle of every turn gets out the vehicle, in time change the radar that fails, guarantee the normal function of vehicle and the safety of passenger in the car.
With reference to fig. 5, the method for detecting a rotation angle error according to an embodiment of the present invention is described above, and a rotation angle error detecting apparatus according to an embodiment of the present invention is described below, where an embodiment of the rotation angle error detecting apparatus according to an embodiment of the present invention includes:
an obtaining module 501, configured to obtain configuration information in the laser radar and an uploaded data packet;
an analyzing module 502, configured to analyze time information in the data packet and an actual rotation angle corresponding to the time information;
an angle calculating module 503, configured to calculate an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
an error calculating module 504, configured to calculate a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
In the embodiment of the invention, the rotation angle error detection device runs the rotation angle error detection method, and the device acquires configuration information in the laser radar and an uploaded data message; analyzing the time information in the data message and the actual rotation angle corresponding to the time information; calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information; and calculating a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle. According to the method, the data message uploaded by the laser radar acquired in real time is analyzed, the actual rotation angle detected by the laser radar is used, the data is more accurate, meanwhile, the ideal rotation angle of each time period is obtained through configuration information calculation, and the rotation angle error of the laser radar can be calculated based on the ideal rotation angle and the actual rotation angle.
Referring to fig. 6, a second embodiment of the device for detecting an error of a rotation angle according to the present invention includes:
an obtaining module 501, configured to obtain configuration information in the laser radar and an uploaded data packet;
an analyzing module 502, configured to analyze time information in the data packet and an actual rotation angle corresponding to the time information;
an angle calculating module 503, configured to calculate an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
an error calculating module 504, configured to calculate a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
In this embodiment, the data packet is a UDP packet; the parsing module 502 is specifically configured to: analyzing the UDP message to obtain a time stamp and N data packets of the UDP message, wherein N is a natural number not less than 1; analyzing the N data packets to obtain data packet completion time and angle data corresponding to each data packet; and based on the data packet completion time, screening angle data from the N data packets as an actual rotation angle, and using the timestamp as corresponding time information.
In this embodiment, the obtaining module 501 is specifically configured to: calling an HTTP interface corresponding to the laser radar; sending an HTTP request to the HTTP interface, and directing to a configuration page of the laser radar through the HTTP interface; reading the configuration information of the laser radar in the configuration page; and acquiring the data message uploaded by the laser radar.
In this embodiment, the obtaining module 501 is specifically configured to: calling a general gateway interface corresponding to the laser radar; sending a data acquisition request to the universal gateway interface; receiving configuration information of the laser radar returned by the universal gateway interface; and acquiring the data message uploaded by the laser radar.
In this embodiment, the configuration information includes a synchronization angle, a rotation frequency, and a rotation direction, and the rotation direction includes a forward rotation and a reverse rotation; the angle calculation module 503 specifically includes: a calculating unit 5031, configured to calculate an 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 determining unit 5032, configured to determine whether the ideal rotation angle is greater than an angle threshold; an angle updating unit 5033, configured to subtract an angle threshold from the ideal rotation angle and update the ideal rotation angle when the ideal rotation angle is greater than the angle threshold.
In this embodiment, the calculating unit 5031 is specifically configured to: 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 positive rotation, adding the second rotation angle to the synchronization angle to obtain a corresponding ideal rotation angle; and when the rotation direction is reverse rotation, adding an angle threshold to the synchronous angle and subtracting the second rotation angle to obtain a corresponding ideal rotation angle.
In this embodiment, the error calculation module 504 is specifically configured to: subtracting the actual rotation angle from the ideal rotation angle to obtain a corresponding rotation angle error; if the error of the rotation angle is larger than one hundred eighty degrees, subtracting three hundred sixty degrees from the rotation angle; and if the error of the rotation angle is less than minus one hundred eighty degrees, adding three hundred sixty degrees to the rotation angle.
On the basis of the previous embodiment, functions and relations among modules are described in detail, and unit structures in partial modules are described, data messages uploaded by laser radars, which can be acquired by the module units in real time, are analyzed, the actual rotation angle detected by the laser radars is used, the data are more accurate, meanwhile, the ideal rotation angle of each time period is obtained through configuration information calculation, and the rotation angle error of the laser radars can be calculated based on the ideal rotation angle and the actual rotation angle.
Fig. 5 and 6 describe the rotation angle error detection apparatus in the embodiment of the present invention in detail from the perspective of the modular functional entity, and the computer device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
Fig. 7 is a schematic structural diagram of a computer device 700 according to an embodiment of the present invention, where the computer device 700 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 710 (e.g., one or more processors) and a memory 720, one or more storage media 730 (e.g., one or more mass storage devices) for storing applications 733 or data 732. Memory 720 and storage medium 730 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 730 may include one or more modules (not shown), each of which may include a sequence of instructions operating on the computer device 700. Further, the processor 710 may 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 rotation angle error detection method.
The computer device 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input-output interfaces 760, and/or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and so forth. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 7 is not intended to be limiting of the computer devices provided herein and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and may also be a volatile computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on a computer, the instructions cause the computer to execute the steps of the method for detecting the rotation angle error of the laser radar provided in the foregoing embodiment.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses, and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for detecting a rotation angle error of a laser radar, the method comprising:
acquiring configuration information in the laser radar and an uploaded data message;
analyzing the time information in the data message and the actual rotation angle corresponding to the time information;
calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
and calculating a rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
2. The method according to claim 1, wherein the data packet is a UDP packet;
the analyzing the time information in the data message and the actual rotation angle corresponding to the time information comprises:
analyzing the UDP message to obtain a time stamp and N data packets of the UDP message, wherein N is a natural number not less than 1;
analyzing the N data packets to obtain data packet completion time and angle data corresponding to each data packet;
and based on the data packet completion time, screening angle data from the N data packets as an actual rotation angle, and using the timestamp as corresponding time information.
3. The method according to claim 1, wherein the acquiring the configuration information in the lidar and the uploaded data message comprises:
calling an HTTP interface corresponding to the laser radar;
sending an HTTP request to the HTTP interface, and directing to a configuration page of the laser radar through the HTTP interface;
reading the configuration information of the laser radar in the configuration page;
and acquiring the data message uploaded by the laser radar.
4. The method according to claim 1, wherein the acquiring the configuration information in the lidar and the uploaded data message comprises:
calling a general gateway interface corresponding to the laser radar;
sending a data acquisition request to the universal gateway interface;
receiving configuration information of the laser radar returned by the universal gateway interface;
and acquiring the data message uploaded by the laser radar.
5. The rotational angle error detecting method according to claim 1, wherein the configuration information includes a synchronization angle, a rotational frequency, and a rotational direction, the rotational direction including a forward rotation and a reverse rotation;
the calculating the ideal rotation angle corresponding to each time information of the laser radar based on the configuration information comprises:
respectively calculating ideal rotation angles corresponding to all time information of the laser radar during forward rotation and reverse rotation according to the synchronous angle and the rotation frequency;
judging whether the ideal rotation angle is larger than a preset angle threshold value or not;
and if so, subtracting the angle threshold value from the ideal rotation angle, and updating the ideal rotation angle.
6. The method for detecting the error of the rotation angle according to claim 5, wherein the calculating the ideal rotation angle corresponding to each time information of the lidar during the forward rotation and the reverse rotation according to the synchronization angle and the rotation frequency comprises:
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 positive rotation, adding the second rotation angle to the synchronization angle to obtain a corresponding ideal rotation angle;
and when the rotation direction is reverse rotation, adding an angle threshold to the synchronous angle and subtracting the second rotation angle to obtain a corresponding ideal rotation angle.
7. The method for detecting the error of the rotation angle according to any one of claims 1 to 6, wherein the calculating the error of the rotation angle corresponding to each time information of the lidar 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 error of the rotation angle is larger than one hundred eighty degrees, subtracting three hundred sixty degrees from the rotation angle;
and if the error of the rotation angle is less than minus one hundred eighty degrees, adding three hundred sixty degrees to the rotation angle.
8. The utility model provides a laser radar's turned angle error detection device which characterized in that, turned angle error detection device includes:
the acquisition module is used for acquiring the configuration information in the laser radar and the uploaded data message;
the analysis module is used for analyzing the time information in the data message and the actual rotation angle corresponding to the time information;
the angle calculation module is used for calculating an ideal rotation angle corresponding to the time information based on the time information and the configuration information;
and the error calculation module is used for calculating the rotation angle error corresponding to the time information according to the ideal rotation angle and the actual rotation angle.
9. A computer device, characterized in that the computer device comprises: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;
the at least one processor invokes the instructions in the memory to cause the computer device to perform the steps of the lidar angle error detection method of any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for detecting a rotation angle error of a lidar according to any of claims 1 to 7.
CN202111263170.5A 2021-10-28 2021-10-28 Rotation angle error detection method, device, equipment and storage medium Pending CN114063089A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111263170.5A CN114063089A (en) 2021-10-28 2021-10-28 Rotation angle error detection method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111263170.5A CN114063089A (en) 2021-10-28 2021-10-28 Rotation angle error detection method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114063089A true CN114063089A (en) 2022-02-18

Family

ID=80235836

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111263170.5A Pending CN114063089A (en) 2021-10-28 2021-10-28 Rotation angle error detection method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114063089A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117233731A (en) * 2023-11-14 2023-12-15 上海翊邀信息技术有限公司 Angle positioning detection device of vehicle-mounted scanning laser early warning radar

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117233731A (en) * 2023-11-14 2023-12-15 上海翊邀信息技术有限公司 Angle positioning detection device of vehicle-mounted scanning laser early warning radar
CN117233731B (en) * 2023-11-14 2024-02-13 上海翊邀信息技术有限公司 Angle positioning detection device of vehicle-mounted scanning laser early warning radar

Similar Documents

Publication Publication Date Title
CN112235326B (en) Internet of things equipment data analysis method and device and electronic equipment
CN109587405B (en) Time synchronization method and device
JPH09128342A (en) Tracing device for transaction
US10938544B2 (en) Method and device of data synchronization and data collection for aerial vehicle and aerial vehicle
EP3364601B1 (en) Testing method, device and system
CN114063089A (en) Rotation angle error detection method, device, equipment and storage medium
CN112541527A (en) Multi-sensor synchronization method and device, electronic equipment and storage medium
CN112968747A (en) Time calibration method and device, computer equipment and storage medium
CN115391422A (en) Vehicle perception information generation method, apparatus, device, medium, and program product
CN113075710A (en) Positioning difference information acquisition method, device, equipment and computer storage medium
CN113485282B (en) Message tracking display method, system, equipment and storage medium for distributed control system
CN112925297A (en) Automatic driving algorithm verification method, device, equipment, storage medium and product
CN112231408B (en) Data integration method and device, electronic equipment and storage medium
CN110892671A (en) Aircraft, data processing system and data processing method for aircraft
CN114697205B (en) Log processing method and device
CN113973111B (en) Data forwarding method, device, gateway equipment and computer readable storage medium
CN115790640A (en) Vehicle mileage correction method and device based on multidimensional data intelligent analysis
CN115309630A (en) Method, device and equipment for generating automatic driving simulation data and storage medium
CN115529553A (en) Signal map generation method, device, equipment and storage medium
CN104754125A (en) Method, device and system for positioning
CN109547276B (en) Problem positioning method, terminal and storage medium
CN111556535B (en) Communication method, communication device, electronic equipment and storage medium
CN109309637B (en) Data storage method, device and storage medium for transmission signals
CN113015242B (en) Base station positioning method and system based on NB-IoT network
WO2024103708A1 (en) Positioning method, terminal device, server, and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination