Positioning data sending method, hardware-in-the-loop testing device and electronic equipment

文档序号:510382 发布日期:2021-05-28 浏览:2次 中文

阅读说明:本技术 定位数据发送方法、硬件在环测试装置和电子设备 (Positioning data sending method, hardware-in-the-loop testing device and electronic equipment ) 是由 冯西 于 2019-11-28 设计创作,主要内容包括:本申请公开了一种定位数据发送方法、硬件在环测试装置和电子设备,涉及自动驾驶技术领域。其中方法包括:获取预先采集的第一时段内的定位数据,定位数据包括N帧第一定位数据和M帧第二定位数据;从第一时刻开始,按照第一定位数据的预设发送频率,将N帧第一定位数据逐帧向车载计算平台发送;从第一时刻开始,将M帧第二定位数据逐帧向车载计算平台发送,其中,每一帧第二定位数据发送完成时,计算睡眠时间,并在达到睡眠时间时,将下一帧第二定位数据向车载计算平台发送,直至M帧第二定位数据全部发送完成。本申请中的一个实施例具有如下有益效果:能够确保两种定位数据发送的同步性,使两种定位数据能够在同一时段内发送至车载计算平台。(The application discloses a positioning data sending method, a hardware-in-the-loop testing device and electronic equipment, and relates to the technical field of automatic driving. The method comprises the following steps: acquiring positioning data in a first period of time, wherein the positioning data comprises N frames of first positioning data and M frames of second positioning data; from the first moment, sending N frames of first positioning data to a vehicle-mounted computing platform frame by frame according to the preset sending frequency of the first positioning data; and sending the M frames of second positioning data to the vehicle-mounted computing platform frame by frame from the first moment, wherein when the sending of each frame of second positioning data is finished, the sleep time is calculated, and when the sleep time is reached, the next frame of second positioning data is sent to the vehicle-mounted computing platform until the sending of all the M frames of second positioning data is finished. One embodiment in the present application has the following beneficial effects: the synchronism of the two types of positioning data can be ensured, and the two types of positioning data can be sent to the vehicle-mounted computing platform in the same time period.)

1. A method for sending positioning data is applied to a hardware-in-the-loop test device, and is characterized by comprising the following steps:

acquiring positioning data in a first period of time, wherein the positioning data comprises N frames of first positioning data and M frames of second positioning data, and both N and M are greater than 1;

from a first moment, sending the N frames of first positioning data to a vehicle-mounted computing platform frame by frame according to the preset sending frequency of the first positioning data;

starting from the first moment, sending the M frames of second positioning data to the vehicle-mounted computing platform frame by frame, wherein when each frame of the M frames of second positioning data is sent, the sleep time is calculated, and when the sleep time is reached, the next frame of second positioning data is sent to the vehicle-mounted computing platform until all the M frames of second positioning data are sent;

the sleep time is determined according to a difference value between an expected sending time length and an actual sending time length, the actual sending time length is determined according to a time interval between the current time when the sleep time is calculated and the first time, and the expected sending time length is determined according to the number of accumulated frames of sent second positioning data and a preset sending frequency of the second positioning data.

2. The method of claim 1, wherein the sleep time is calculated by the following formula:

Ts=m÷f2-(T2-T1)

wherein, TsM is the cumulative number of frames over which the second positioning data has been transmitted, f2A predetermined transmission frequency, T, for the second positioning data2Is the current time, T1Is the first time.

3. The method of claim 2, wherein the predetermined transmission frequency of the second positioning data is calculated by the following formula:

f2=M÷N×f1

wherein f is1And the preset sending frequency of the first positioning data is set.

4. The method according to any one of claims 1 to 3, characterized in that the preset transmission frequency of the first positioning data is the same as the acquisition frequency of the first positioning data.

5. The method according to any one of claims 1 to 3, characterized in that the first positioning data is positioning data acquired by a lidar and the second positioning data is positioning data acquired by a satellite navigation system.

6. The method according to any one of claims 1 to 3, wherein the first positioning data is sent to the on-board computing platform by a field programmable logic device (FPGA);

and the second positioning data is sent to the vehicle-mounted computing platform through the CPU.

7. A hardware-in-the-loop test apparatus, comprising:

the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring positioning data in a first period of time which is acquired in advance, the positioning data comprises N frames of first positioning data and M frames of second positioning data, and both N and M are greater than 1;

the first sending module is used for sending the N frames of first positioning data to the vehicle-mounted computing platform frame by frame from a first moment according to the preset sending frequency of the first positioning data;

a second sending module, configured to send, from the first time, the M frames of second positioning data to the vehicle-mounted computing platform frame by frame, where a sleep time is calculated when each frame of the M frames of second positioning data is sent, and when the sleep time is reached, a next frame of second positioning data is sent to the vehicle-mounted computing platform until all the M frames of second positioning data are sent;

the sleep time is determined according to a difference value between an expected sending time length and an actual sending time length, the actual sending time length is determined according to a time interval between the current time when the sleep time is calculated and the first time, and the expected sending time length is determined according to the number of accumulated frames of sent second positioning data and a preset sending frequency of the second positioning data.

8. The apparatus of claim 7, wherein the sleep time is calculated by the following formula:

Ts=m÷f2-(T2-T1)

wherein, TsM is the cumulative number of frames over which the second positioning data has been transmitted, f2A predetermined transmission frequency, T, for the second positioning data2Is the current time, T1Is the first time.

9. The apparatus of claim 7, wherein the predetermined transmission frequency of the second positioning data is calculated by the following formula:

f2=M÷N×f1

wherein f is1Is the firstAnd presetting the sending frequency of the positioning data.

10. The apparatus according to any one of claims 7 to 9, wherein the preset transmission frequency of the first positioning data is the same as the acquisition frequency of the first positioning data.

11. The apparatus of claim 10, wherein the first positioning data is positioning data acquired by a laser radar, and the second positioning data is positioning data acquired by a satellite navigation system.

12. The apparatus according to any one of claims 7 to 9, wherein the first positioning data is sent to the vehicle computing platform by a field programmable logic device (FPGA);

and the second positioning data is sent to the vehicle-mounted computing platform through the CPU.

13. An electronic device, comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 6.

14. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 6.

Technical Field

The application relates to a data processing technology, in particular to the technical field of automatic driving, and specifically relates to a positioning data sending method, a hardware-in-loop testing device and electronic equipment.

Background

Hardware-In-the-Loop (HIL for short) testing technology is widely used In automobile research and development and testing, and along with the development of automatic driving technology, the Hardware-In-Loop testing technology is gradually applied to automatic driving vehicles. Hardware for automatic driving in a loop test, the positioning data of the vehicle comes from data generated by a real road test, and the data needs to be sent to an on-board computing platform. If a plurality of positioning data are involved, how to ensure the synchronous transmission of the plurality of positioning data is directly related to whether the positioning module can work normally.

Disclosure of Invention

The application provides a positioning data sending method, a hardware-in-loop test device and electronic equipment, and aims to solve the problem of how to ensure synchronous sending of various positioning data in hardware-in-loop test.

In order to solve the technical problem, the present application is implemented as follows:

in a first aspect, the present application provides a method for sending location data, which is applied to a hardware-in-the-loop test apparatus, and the method includes:

acquiring positioning data in a first period of time, wherein the positioning data comprises N frames of first positioning data and M frames of second positioning data, and both N and M are greater than 1;

from a first moment, sending the N frames of first positioning data to a vehicle-mounted computing platform frame by frame according to the preset sending frequency of the first positioning data;

starting from the first moment, sending the M frames of second positioning data to the vehicle-mounted computing platform frame by frame, wherein when each frame of the M frames of second positioning data is sent, the sleep time is calculated, and when the sleep time is reached, the next frame of second positioning data is sent to the vehicle-mounted computing platform until all the M frames of second positioning data are sent;

the sleep time is determined according to a difference value between an expected sending time length and an actual sending time length, the actual sending time length is determined according to a time interval between the current time when the sleep time is calculated and the first time, and the expected sending time length is determined according to the number of accumulated frames of sent second positioning data and a preset sending frequency of the second positioning data.

In the technical scheme, the sleep time in the process of sending the second positioning data is adjusted by taking the sending of the first positioning data as a reference, and the sleep time after each frame of second positioning data is sent takes the time consumed by sending the second positioning data into consideration, and the dynamic property or the variability of the time consumed in the process of sending the second positioning data into consideration, so that the synchronism of sending the two positioning data is ensured, and the two positioning data can be sent to the vehicle-mounted computing platform in the same time period.

Optionally, the sleep time is calculated by the following formula:

Ts=m÷f2-(T2-T1)

wherein, TsM is the cumulative number of frames over which the second positioning data has been transmitted, f2A predetermined transmission frequency, T, for the second positioning data2Is the current time, T1Is the first time.

In the technical scheme, the sleep time is calculated through the formula, so that the calculation of the sleep time is simple and easy to implement and is easy to realize.

Optionally, the preset sending frequency of the second positioning data is calculated by the following formula:

f2=M÷N×f1

wherein f is1And the preset sending frequency of the first positioning data is set.

In the above technical solution, the preset sending frequency of the second positioning data is calculated by the above formula, so that the calculation of the preset sending frequency of the second positioning data is simple and easy to implement and is easy to implement.

Optionally, the preset sending frequency of the first positioning data is the same as the collecting frequency of the first positioning data.

In the technical scheme, the preset sending frequency of the first positioning data is set as the acquisition frequency of the first positioning data, so that the HIL test can better reflect real road test parameters, a coordinate system of the HIL test is consistent with a coordinate system of the real road test, and the authenticity of data in the HIL test is improved.

Optionally, the first positioning data is positioning data acquired by a laser radar, and the second positioning data is positioning data acquired by a satellite navigation system.

The above technical solution can further support the positioning data transmission synchronization policy in the present application, that is, the synchronization policy adjusts the sleep time in the second positioning data transmission process with the transmission of the first positioning data as a reference.

Optionally, the first positioning data is sent to the vehicle-mounted computing platform through a field programmable logic device FPGA;

and the second positioning data is sent to the vehicle-mounted computing platform through the CPU.

In the technical scheme, the precision of the FPGA is high, so that the first positioning data can be sent in a preset time period.

In a second aspect, the present application provides a hardware-in-loop test apparatus, comprising:

the device comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring positioning data in a first period of time which is acquired in advance, the positioning data comprises N frames of first positioning data and M frames of second positioning data, and both N and M are greater than 1;

the first sending module is used for sending the N frames of first positioning data to the vehicle-mounted computing platform frame by frame from a first moment according to the preset sending frequency of the first positioning data;

a second sending module, configured to send, from the first time, the M frames of second positioning data to the vehicle-mounted computing platform frame by frame, where a sleep time is calculated when each frame of the M frames of second positioning data is sent, and when the sleep time is reached, a next frame of second positioning data is sent to the vehicle-mounted computing platform until all the M frames of second positioning data are sent;

the sleep time is determined according to a difference value between an expected sending time length and an actual sending time length, the actual sending time length is determined according to a time interval between the current time when the sleep time is calculated and the first time, and the expected sending time length is determined according to the number of accumulated frames of sent second positioning data and a preset sending frequency of the second positioning data.

Optionally, the sleep time is calculated by the following formula:

Ts=m÷f2-(T2-T1)

wherein, TsM is the cumulative number of frames over which the second positioning data has been transmitted, f2A predetermined transmission frequency, T, for the second positioning data2Is the current time, T1Is the first time.

Optionally, the preset sending frequency of the second positioning data is calculated by the following formula:

f2=M÷N×f1

wherein f is1And the preset sending frequency of the first positioning data is set.

Optionally, the preset sending frequency of the first positioning data is the same as the collecting frequency of the first positioning data.

Optionally, the first positioning data is positioning data acquired by a laser radar, and the second positioning data is positioning data acquired by a satellite navigation system.

Optionally, the first positioning data is sent to the vehicle-mounted computing platform through a field programmable logic device FPGA;

and the second positioning data is sent to the vehicle-mounted computing platform through the CPU.

In a third aspect, the present application provides an electronic device, comprising:

at least one processor; and

a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,

the memory stores instructions executable by the at least one processor to enable the at least one processor to perform any of the methods of the first aspect.

In a fourth aspect, the present application provides a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of the first aspects.

One embodiment in the above application has the following advantages or benefits: in order to ensure that the first positioning data and the second positioning data collected in the same time period are synchronously transmitted in the environment testing scene, the hardware starts to transmit the two positioning data at the same moment, and transmits each frame of first positioning data at a preset transmission frequency, and in the transmission process of the second positioning data, when each frame of second positioning data is completely transmitted, the sleep time is adjusted according to the difference value between the estimated transmission time and the actual transmission time, and when the sleep time is reached, the next frame of second positioning data is transmitted to the vehicle-mounted computing platform. By adopting the technical means, the sleep time after each frame of second positioning data is sent takes into account the time consumed by sending the second positioning data and the dynamic or variable time consumed in the sending process of the second positioning data, so that the synchronism of sending the two positioning data is ensured, and the two positioning data can be sent to the vehicle-mounted computing platform in the same time period.

Other effects of the above-described alternative will be described below with reference to specific embodiments.

Drawings

The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:

FIG. 1 is a schematic diagram of a hardware-in-the-loop test apparatus for sending positioning data according to the present application;

fig. 2 is a flowchart of a method for transmitting positioning data according to the present application;

FIG. 3 is a block diagram of a hardware-in-the-loop test apparatus provided in accordance with the present application;

fig. 4 is a block diagram of an electronic device for implementing the positioning data transmission method according to the embodiment of the present application.

Detailed Description

The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

Before describing the embodiments of the present application, a brief description of hardware-in-loop (HIL) testing techniques developed for autopilot systems is provided below.

The HIL testing apparatus developed for the autopilot System may be simply understood as a server (server), in which simulation of all sensors, such as Radar (Radar), Lidar (Lidar), Global Navigation Satellite System (GNSS), pp6, pp7, or camera, is implemented by using some technical means, devices, etc., and at the same time, it is ensured that the output interface of the sensor simulated by the HIL testing apparatus is consistent with the interface of the raw sensor output to the vehicle-mounted computing platform. Therefore, the real sensor can be conveniently replaced, and the real vehicle-mounted computing platform can be accessed.

The data of the sensors simulated by all the HIL testing devices are from data generated by real road testing, and the data are sent to the vehicle-mounted computing platform after certain processing is carried out on the real original data. Taking positioning data as an example, the positioning data in automatic driving generally includes a plurality of positioning data, for example, as shown in fig. 1, the HIL testing apparatus 1 transmits positioning data collected by Lidar (Lidar data for short) and positioning data collected by GNSS (GNSS data for short) to the vehicle-mounted computing platform 2.

Generally, GNSS data is smaller than Lidar data, and the transmission speed is higher, which requires that the GNSS data should sleep properly during the transmission process, otherwise, all GNSS data can be transmitted to the vehicle-mounted computing platform in a shorter time, and Lidar data and GNSS data cannot be synchronously transmitted to the vehicle-mounted computing platform, which affects the positioning test of automatic driving.

In view of this, the present application provides a method for sending positioning data to solve the problem of synchronicity of sending multiple types of positioning data in a hardware-in-loop test.

As shown in fig. 2, the positioning data transmitting method includes the following steps:

step 201: the method comprises the steps of acquiring positioning data in a first period of time collected in advance, wherein the positioning data comprise N frames of first positioning data and M frames of second positioning data, and N and M are both larger than 1.

In this step, the HIL testing device can acquire the positioning data acquired in advance within the first time period. The pre-collected positioning data in the first time period may be data generated in a real road test, and specifically, the pre-collected positioning data in the first time period is data generated in the first time period in the real road test.

Above-mentioned first locating data and second locating data are the locating data of different grade type, and are specific, the locating data that gathers for different positioning device.

In the HIL testing apparatus, a first sensor for transmitting N frames of first positioning data to the vehicle-mounted computing platform and a second sensor for transmitting M frames of second positioning data to the vehicle-mounted computing platform may be simulated.

The data size of the N frames of first positioning data may be greater than the data size of the M frames of second positioning data, and the time required to transmit the N frames of first positioning data may be greater than the time required to transmit the M frames of second positioning data. Therefore, in the application, the first sensor can send N frames of first positioning data according to a certain fixed frequency, and the second sensor can sleep properly in the process of sending M frames of second positioning data, so that the first sensor and the second sensor can finish sending the N frames of first positioning data and the M frames of second positioning data in the same time period, and the first sensor and the second sensor are ensured to be synchronous.

It should be noted that, the time taken for the first sensor to transmit the N frames of the first positioning data and the time taken for the second sensor to transmit the M frames of the second positioning data are allowed to have a certain error, for example, between 0.01s and 0.1 s.

Step 202: and from the first moment, sending the N frames of first positioning data to the vehicle-mounted computing platform frame by frame according to the preset sending frequency of the first positioning data.

In this step, the HIL testing apparatus, specifically, a first sensor simulated in the HIL testing apparatus, may send N frames of the first positioning data to the vehicle-mounted computing platform frame by frame from the first time according to a preset sending frequency of the first positioning data until the N frames of the first positioning data are sent completely. This first time can be understood as an initial timestamp or starting time.

Step 203: and sending the M frames of second positioning data to the vehicle-mounted computing platform frame by frame from the first moment, wherein when each frame of the M frames of second positioning data is sent, the sleep time is calculated, and when the sleep time is reached, the next frame of second positioning data is sent to the vehicle-mounted computing platform until all the M frames of second positioning data are sent.

The sleep time is determined according to a difference value between an expected sending time length and an actual sending time length, the actual sending time length is determined according to a time interval between the current time when the sleep time is calculated and the first time, and the expected sending time length is determined according to the number of accumulated frames of sent second positioning data and a preset sending frequency of the second positioning data.

The determination method of the preset sending frequency of the first positioning data may be various, for example, the determination method is determined according to the acquisition frequency of the first positioning data, or the determination method is determined according to an empirical value, and the like; the predetermined transmission frequency of the second positioning data may be determined in various manners, for example, according to the predetermined transmission frequency of the first positioning data, or according to an empirical value, and so on.

In this step, when the HIL testing apparatus starts to send the first positioning data from the first time, the HIL testing apparatus, specifically, a simulated second sensor in the HIL testing apparatus sends the first frame of second positioning data to the vehicle-mounted computing platform at the first time.

In the application, in order to ensure that the synchronous transmission of the N frames of first positioning data and the M frames of second positioning data is completed, the sleep time of the second sensor needs to be adjusted when the transmission of each frame of second positioning data is completed.

The following implementations currently exist: after each frame of second positioning data is sent, the user sleeps for a fixed period of time, and the sleeping time is determined according to the duration of the original data and the frame number of the second positioning data. Assuming 10000 frames of second positioning data in a duration of 300s, the sleep time is 0.03s (i.e. 300 s/10000). It can be seen that the sleep time is not calculated in consideration of the time consumption required for transmitting the second positioning data per frame, and the time consumption required for transmitting the second positioning data per frame may change dynamically with the passage of time. Therefore, the time actually consumed by the 10000 frames of second positioning data may have a large error with the time duration of 300s, for example, 1s to 2s, and 301s to 302s may be required if the original 300s second positioning data is transmitted according to the sleep time of 0.03 s. This results in poor synchronization between the first sensor and the second sensor, which makes subsequent positioning misaligned, thereby affecting the HIL test.

In view of this, in this step, the sleep time is adjusted according to the difference between the expected transmission time and the actual transmission time after the second positioning data is transmitted for each frame. The sleep time takes the actual sending time length into consideration, so that the time consumption required by sending the second positioning data of each frame is also considered, and the time consumption required by sending the second positioning data of each frame is also considered to be dynamically changed along with the time, so that the sleep time calculated by the method is not a fixed value any more, but is dynamically adjusted along with the sending of the second positioning data. Just so, can guarantee to finish sending first locating data and second locating data synchronization in same period to the high accuracy synchronization of two kinds of locating data has been guaranteed. The expected transmission duration is determined according to a ratio of the accumulated number of frames that the second positioning data has been transmitted to the preset transmission frequency of the second positioning data, for example.

Optionally, the sleep time is calculated by the following formula:

Ts=m÷f2-(T2-T1)

wherein, TsM is the cumulative number of frames over which the second positioning data has been transmitted, f2A predetermined transmission frequency, T, for the second positioning data2Is the current time, T1Is the first time. Wherein, T2-T1It can be understood that the actual transmission duration, m ÷ f, is described above2It may be understood that the expected transmission time duration or the actual transmission time duration may be T2-T1The estimated transmission time period may be m/f2

In the embodiment, the sleep time is calculated through the formula, so that the calculation of the sleep time is simple and easy to implement and is easy to realize.

Optionally, the preset sending frequency of the second positioning data is calculated by the following formula:

f2=M÷N×f1

wherein f is1And the preset sending frequency of the first positioning data is set.

For example, it is assumed that the frame number of the first positioning data acquired in the first period is 100 frames, and the frame number of the second positioning data acquired in the first period is 10000 frames, that is, N is 100, and M is 10000; further, assume that the preset transmission frequency of the first positioning data is 10 frames per second, i.e., f110, if the first positioning data and the second positioning data are all transmitted in the same time period, the preset transmission frequency of the second positioning data should be 1000 frames per second, i.e. f2=10000÷100×10=1000。

In this embodiment, the preset sending frequency of the second positioning data is calculated by the above formula, so that the calculation of the preset sending frequency of the second positioning data is simple and easy to implement and is easy to implement.

As can be seen from steps 202 to 204, in the present application, the HIL testing apparatus sends the first positioning data and the second positioning data at the same time, where the first positioning data is sent frame by frame according to a fixed frequency (i.e., a preset sending frequency), and the sending of the first positioning data is used as a reference, and the sleep time is adjusted every time the second positioning data is sent one frame, so that the synchronous transmission of the first positioning data and the second positioning data can be realized.

The above embodiments in the present application have the following advantages or beneficial effects: in order to ensure that the first positioning data and the second positioning data collected in the same time period are synchronously transmitted in the environment testing scene, the hardware starts to transmit the two positioning data at the same moment, and transmits each frame of first positioning data at a preset transmission frequency, and in the transmission process of the second positioning data, when each frame of second positioning data is completely transmitted, the sleep time is adjusted according to the difference value between the estimated transmission time and the actual transmission time, and when the sleep time is reached, the next frame of second positioning data is transmitted to the vehicle-mounted computing platform. By adopting the technical means, the sleep time after each frame of second positioning data is sent takes into account the time consumed by sending the second positioning data and the dynamic or variable time consumed in the sending process of the second positioning data, so that the synchronism of sending the two positioning data is ensured, and the two positioning data can be sent to the vehicle-mounted computing platform in the same time period.

It should be noted that, in the present application, the HIL testing apparatus sends N frames of first positioning data frame by frame according to the preset sending frequency of the first positioning data, and embodies a synchronization policy for adjusting the sleep time in the sending process of the second positioning data with the sending of the first positioning data as a reference.

Optionally, the first positioning data is positioning data (i.e., Lidar data) acquired by a laser radar, and the second positioning data is positioning data (i.e., GNSS data) acquired by a satellite navigation system.

Generally, the accuracy of data acquisition by the laser radar is higher than that of data acquisition by a satellite navigation system, and similarly, in the first sensor and the second sensor simulated in the HIL testing device, the accuracy of data transmission by the first sensor is higher than that of data transmission by the second sensor. Therefore, this embodiment can further support the positioning data transmission synchronization policy in the present application, that is, the synchronization policy for adjusting the sleep time in the second positioning data transmission process with the transmission of the first positioning data as a reference.

Optionally, the preset sending frequency of the first positioning data is the same as the collecting frequency of the first positioning data.

In this embodiment, the preset sending frequency of the first positioning data is set as the collection frequency of the first positioning data, and it can be understood that the HIL testing apparatus can send N frames of the first positioning data and M frames of the second positioning data to the vehicle-mounted computing platform synchronously in the first time period.

In the implementation mode, the preset sending frequency of the first positioning data is set as the acquisition frequency of the first positioning data, so that the HIL test can better reflect real road test parameters, a coordinate system of the HIL test is consistent with a coordinate system of the real road test, and the authenticity of data in the HIL test is improved.

Optionally, the first positioning data is sent to the vehicle-mounted computing platform through an FPGA (Field Programmable Gate Array);

and the second positioning data is sent to the vehicle-mounted computing platform through a Central Processing Unit (CPU).

Specifically, the FPGA controls the first positioning data to be sent to the vehicle-mounted computing platform through a User Datagram Protocol (UDP), and the CPU controls the second positioning data to be sent to the vehicle-mounted computing platform through a Transmission Control Protocol (TCP).

In the embodiment, the HIL testing device can send the first positioning data to the vehicle-mounted computing platform through the FPGA, and the sending of the first positioning data in a preset time period can be ensured to be completed due to the high precision of the FPGA.

It should be noted that, the various alternative embodiments described in this application may be implemented in combination with each other or separately, and the present application is not limited thereto.

The present application further provides a hardware-in-loop testing apparatus, as shown in fig. 3, the hardware-in-loop testing apparatus 300 includes:

the acquiring module 301 is configured to acquire positioning data acquired in advance in a first time period, where the positioning data includes N frames of first positioning data and M frames of second positioning data, and both N and M are greater than 1;

a first sending module 302, configured to send, from a first time, the N frames of first positioning data frame by frame to a vehicle-mounted computing platform according to a preset sending frequency of the first positioning data;

a second sending module 303, configured to send, from the first time, the M frames of second positioning data to the vehicle-mounted computing platform frame by frame, where a sleep time is calculated when each frame of the M frames of second positioning data is sent, and when the sleep time is reached, a next frame of second positioning data is sent to the vehicle-mounted computing platform until all M frames of second positioning data are sent;

the sleep time is determined according to a difference value between an expected sending time length and an actual sending time length, the actual sending time length is determined according to a time interval between the current time when the sleep time is calculated and the first time, and the expected sending time length is determined according to the number of accumulated frames of sent second positioning data and a preset sending frequency of the second positioning data.

Optionally, the sleep time is calculated by the following formula:

Ts=m÷f2-(T2-T1)

wherein, TsM is the cumulative number of frames over which the second positioning data has been transmitted, f2A predetermined transmission frequency, T, for the second positioning data2Is the current time, T1Is the first time.

Optionally, the preset sending frequency of the second positioning data is calculated by the following formula:

f2=M÷N×f1

wherein f is1And the preset sending frequency of the first positioning data is set.

Optionally, the preset sending frequency of the first positioning data is the same as the collecting frequency of the first positioning data.

Optionally, the first positioning data is positioning data acquired by a laser radar, and the second positioning data is positioning data acquired by a satellite navigation system.

Optionally, the first positioning data is sent to the vehicle-mounted computing platform through a field programmable logic device FPGA;

and the second positioning data is sent to the vehicle-mounted computing platform through the CPU.

The above embodiments in the present application have the following advantages or beneficial effects: in order to ensure that the first positioning data and the second positioning data collected in the same time period are synchronously transmitted in the environment testing scene, the hardware starts to transmit the two positioning data at the same moment, and transmits each frame of first positioning data at a preset transmission frequency, and in the transmission process of the second positioning data, when each frame of second positioning data is completely transmitted, the sleep time is adjusted according to the difference value between the estimated transmission time and the actual transmission time, and when the sleep time is reached, the next frame of second positioning data is transmitted to the vehicle-mounted computing platform. By adopting the technical means, the sleep time after each frame of second positioning data is sent takes into account the time consumed by sending the second positioning data and the dynamic or variable time consumed in the sending process of the second positioning data, so that the synchronism of sending the two positioning data is ensured, and the two positioning data can be sent to the vehicle-mounted computing platform in the same time period.

The hardware-in-loop testing apparatus 300 provided in the present application can implement each process implemented by the hardware-in-loop testing apparatus in the above-described positioning data sending method embodiment, and can achieve the same beneficial effects, and for avoiding repetition, the details are not repeated here.

According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.

Fig. 4 is a block diagram of an electronic device for transmitting positioning data according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.

As shown in fig. 4, the electronic apparatus includes: one or more processors 501, memory 502, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). In fig. 4, one processor 501 is taken as an example.

Memory 502 is a non-transitory computer readable storage medium as provided herein. The memory stores instructions executable by at least one processor to cause the at least one processor to perform the positioning data transmission method provided by the present application. A non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to execute the positioning data transmission method provided by the present application.

The memory 502, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the positioning data transmission method in the embodiment of the present application (for example, the obtaining module 301, the first transmitting module 302, and the second transmitting module 303 shown in fig. 3). The processor 501 executes various functional applications of the server and data processing, namely, implements the positioning data transmission method in the above-described method embodiment, by running non-transitory software programs, instructions, and modules stored in the memory 502.

The memory 502 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to use of the electronic device for the positioning data transmission method, and the like. Further, the memory 502 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 502 optionally includes a memory remotely located from the processor 501, and these remote memories may be connected to the electronic device for location data transmission method via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.

The electronic device for positioning the data transmission method may further include: an input device 503 and an output device 504. The processor 501, the memory 502, the input device 503 and the output device 504 may be connected by a bus or other means, and fig. 4 illustrates the connection by a bus as an example.

The input device 503 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic apparatus that position the data transmission method, such as an input device such as a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointing stick, one or more mouse buttons, a track ball, a joystick, or the like. The output devices 504 may include a display device, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibrating motors), among others. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.

Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.

These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.

To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.

The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.

The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.

According to the technical scheme of the embodiment of the application, under the environment test scene, in order to ensure that the first positioning data and the second positioning data collected in the same time period are synchronously sent, two types of positioning data are sent from the same moment, and each frame of first positioning data is sent at a preset sending frequency, in the sending process of the second positioning data, when each frame of second positioning data is sent completely, the sleep time is adjusted according to the difference value between the expected sending time length and the actual sending time length, and when the sleep time is reached, the next frame of second positioning data is sent to the vehicle-mounted computing platform. By adopting the technical means, the sleep time after each frame of second positioning data is sent takes into account the time consumed by sending the second positioning data and the dynamic or variable time consumed in the sending process of the second positioning data, so that the synchronism of sending the two positioning data is ensured, and the two positioning data can be sent to the vehicle-mounted computing platform in the same time period.

It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.

The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:医学用户接口

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!