Method, Medium and System for Testing Road Environment Data of Vehicles and Pedestrians in Virtual Simulation Environment
The synchronization of driving simulator data and human, vehicle and road environment data is achieved through interface programs and interpolation filling method, solving the driving simulator control problem and improving the efficiency and accuracy of driving behavior analysis in virtual simulation environments.
Patent Information
- Application Number
- CN202211538659.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-02
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-12-02
AI Technical Summary
In the prior art, driving simulators are difficult to directly control vehicle models, and cannot effectively synchronize multimodal data in human-vehicle and road environments with driving simulator data, resulting in inefficient driving behavior analysis in virtual simulation environments.
Through the interface program, the virtual driving scene data and vehicle model data of the driving simulator are converted and sent to the analysis platform, and the control signals of the driving operation equipment are converted into virtual control signals, so as to realize the synchronization of multimodal data in human, vehicle and road environments, ensure data continuity using the interpolation filling method, and analyze driving behavior through trajectory heat maps and quantitative indicators.
The synchronization of driving simulator data with human, vehicle and road environment data is achieved, which reduces time and labor costs, improves analysis efficiency, and improves the accuracy and efficiency of driving behavior research through visualization and quantitative analysis methods.
Smart Images

Figure CN116030686B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of virtual simulation driving, and in particular, to a method, medium, and system for testing the vehicle-road environment data of a virtual simulation environment. Background Art
[0002] Road safety has always been a matter of great concern to society, so various automobile companies are constantly conducting road safety test experiments. Since conducting experiments on real roads requires high costs, some automobile companies have turned to using driving simulators for testing. However, when using a driving simulator for testing, it is difficult for the driving operation device to directly control the vehicle model in the driving simulator, and it is impossible to effectively synchronize the multi-modal data of the vehicle-road environment with the data of the driving simulator, resulting in difficulties in analyzing driving behavior based on a virtual simulation environment, high time and labor costs, and low test and analysis efficiency. Summary of the Invention
[0003] In order to enable the driving operation device to directly control the vehicle model in the driving simulator and enable the analysis platform to synchronize the vehicle-road environment and the data in the driving simulator, the present application provides a method, computer medium, and system for testing the multi-modal data of the vehicle-road environment in a virtual simulation environment.
[0004] In a first aspect, the present application provides a method for testing the vehicle-road environment data of a virtual simulation environment, adopting the following technical solutions:
[0005] A method for testing the vehicle-road environment data of a virtual simulation environment includes receiving driving map data sent by an interface program, forming a driving map based on the driving map data, where the driving map data is formed by the interface program based on the simulated driving scenario data sent by a driving simulator;
[0006] Forming a target analysis area on the driving map based on the user's selection operation on the driving map;
[0007] Receiving vehicle data sent by the interface program at a preset sampling rate to form a vehicle data set, where the vehicle data includes vehicle coordinates and acquisition time, and the vehicle data is formed by the interface program based on the vehicle model data sent by the driving simulator in response to a virtual control signal;
[0008] Judging whether the vehicle model is located in the target analysis area based on the vehicle data;
[0009] If so, obtaining the human body data of the operator.
[0010] By adopting the above technical solution, the virtual driving scenario data and vehicle model data of the driving simulator are converted and sent to the analysis platform through the interface program, and the driving control signal sent by the driving operation device is converted into a virtual control signal recognizable by the driving simulator, so as to realize the synchronization of multi-modal data of the vehicle-road environment and the data of the driving simulator, which is convenient for analyzing driving behaviors based on the virtual simulation environment, with relatively low time and labor costs and high testing and analysis efficiency.
[0011] Optionally, the driving data testing method further includes: preprocessing the vehicle data in the vehicle dataset to form a displacement point set; and drawing a displacement route map on the driving map according to the displacement point set.
[0012] By adopting the above technical solution, the driving trajectory of the vehicle model in the driving simulator is drawn as a displacement route map on the driving map to achieve visualization, which is convenient for users to study the driving conditions of the vehicle.
[0013] Optionally, when preprocessing the vehicle data in the vehicle dataset, the following steps are included: extracting the sampling times of all vehicle data in the vehicle dataset; traversing all sampling times and calculating the time difference between the sampling times of two adjacent vehicle data; if the time difference between the sampling times of two adjacent vehicle data is greater than the sampling interval and less than the preset time difference, new vehicle data is added between the two adjacent vehicle data, and the vehicle dataset is updated accordingly.
[0014] By adopting the above technical solution, when vehicle data is missing due to reasons such as data collection failure, data filling is performed at the position where the data is missing, so as to ensure the continuity of the data in the vehicle dataset.
[0015] Optionally, when adding new vehicle data between the two adjacent vehicle data, the following steps are included: calculating the number of vehicle data to be added between the two adjacent vehicle data based on the time difference between the sampling times of the two adjacent vehicle data and the sampling interval;
[0016] Calculating the vehicle coordinates in each vehicle data to be added based on the coordinate difference of the vehicle coordinates of the two adjacent vehicle data and the number of vehicle data to be added.
[0017] By adopting the above technical solution, the vehicle coordinates in the vehicle data to be added are calculated by using the interpolation filling method, so that the added vehicle data can more accurately reflect the position of the vehicle model at the corresponding sampling time.
[0018] Preferably, when drawing a displacement route map on the driving map according to the displacement point set, the following steps are included:
[0019] A display icon is formed at the position of the displacement point in the driving map. The display icon indicates the direction of the line connecting the previous displacement point and the current displacement point by pointing, indicates the relationship between the displacement point and the operator by color, and indicates the duration of the vehicle at the displacement point by area.
[0020] By adopting the above technical solution, the relevant information of the vehicle model at a certain displacement point is displayed through the display icon, enabling the user to more intuitively know the situation of the vehicle model when analyzing.
[0021] Preferably, the driving data testing method further includes the following steps: traversing the displacement points in the displacement point set, and using the position of the current displacement point as the center point;
[0022] Taking the position with a distance less than the preset distance value from the center point as the target drawing area, and calculating the number of displacement points in the target drawing area;
[0023] Determining the color intensity of the target drawing area based on the duration of the vehicle at the current displacement point and the number of displacement points in the target drawing area;
[0024] Forming a trajectory heat map based on the color intensity.
[0025] By adopting the above technical solution, a trajectory heat map is formed on the driving map to prompt the user which areas on the map are the positions where the vehicle model stays for a long time or is active frequently, facilitating the user to discover areas with research significance.
[0026] Preferably, the driving data testing method further includes the following steps: calculating the total number of displacement points in all target analysis areas to form the total number of visits to the target analysis areas;
[0027] Calculating the sum of the durations of all displacement points in all target analysis areas to form the total stay time of the target analysis areas;
[0028] Calculating the sum of the durations of all displacement points in the displacement point set to form the travel time;
[0029] Calculating the ratio of the total stay time of the target analysis areas to the travel time to form the total visit time percentage of the target analysis areas;
[0030] Calculating the quotient of the total stay time of the target analysis areas divided by the number of target analysis areas to form the average stay time of the target analysis areas.
[0031] By adopting the above technical solution, the spatio-temporal information in the driving virtual simulation environment is statistically analyzed using quantitative indicators, facilitating the user to perform quantitative analysis on spatio-temporal data.
[0032] Optionally, when determining whether the vehicle model is located in the target analysis area based on the vehicle data, the following steps are included:
[0033] Along the boundary of the target analysis area, successively obtain the analysis area coordinates of the vertices of the target analysis area to form a vertex coordinate set;
[0034] Traverse the vertex coordinate set and compare the magnitudes of the ordinates of the analysis area coordinates in the vertex coordinate set with the ordinate of the vehicle coordinate;
[0035] If among two adjacent analysis area coordinates, the ordinate of one analysis area coordinate is greater than or equal to the ordinate of the vehicle coordinate, and the ordinate of the other analysis area coordinate is less than the ordinate of the vehicle coordinate, then use the two adjacent analysis area coordinates as a pair of area coordinates;
[0036] Extract the pairs of area coordinates that meet the pre-designed calculation conditions to form a calculation coordinate set, where the pre-designed calculation condition is that the abscissa of any area coordinate in the pair of area coordinates is greater than or equal to the abscissa of the vehicle coordinate;
[0037] Establish a measurement line, and the ordinate of each point on the measurement line is equal to the ordinate of the vehicle coordinate;
[0038] Calculate the number of intersection points between the lines connecting the pairs of area coordinates in the calculation coordinate set and the measurement line;
[0039] If the number of intersection points is odd, then determine that the vehicle coordinate is within the target analysis area; otherwise, determine that the vehicle coordinate is not within the target analysis area.
[0040] By adopting the above technical solution, by calculating the number of intersection points between the ray emitted from the vehicle data and the boundary of the target analysis area, it is determined whether the vehicle data is spatially within the target analysis area, thereby achieving the effect of being able to determine whether the vehicle data is within the target analysis area without traversing each analysis area coordinate within the target analysis area, and further realizing the improvement of the calculation speed.
[0041] In a second aspect, the present application provides a computer-readable storage medium, adopting the following technical solution:
[0042] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the steps of the driving data testing method as described above.
[0043] In a third aspect, the present application provides a vehicle-road-person environment data testing system, adopting the following technical solution:
[0044] A vehicle - person - road environment data testing system includes a driving operation device, an interface program, a driving simulator, and an analysis platform. The driving operation device is used to generate a driving control signal based on the driving operation of an operator on the driving operation device. The interface program is used to convert the driving control signal of the driving operation device into a virtual control signal and send it to the driving simulator. The driving simulator is used to respond to the virtual control signal. The analysis platform is used to execute the steps of the driving data testing method as described above.
[0045] In summary, this application includes at least one of the following beneficial technical effects:
[0046] 1. The interface program is used to convert the virtual driving scene data and vehicle model data of the driving simulator and send them to the analysis platform, and convert the driving control signal sent by the driving operation device into a virtual control signal recognizable by the driving simulator, thereby realizing the synchronization of multi - modal data of the vehicle - person - road environment and the data of the driving simulator, facilitating the analysis of driving behaviors based on the virtual simulation environment, with relatively low time and labor costs and high testing and analysis efficiency;
[0047] 2. The driving trajectory of the vehicle model in the driving simulator is drawn as a displacement route map on the driving map to achieve visualization, facilitating users to study the driving conditions of the vehicle;
[0048] 3. The spatio - temporal information in the driving virtual simulation environment is statistically analyzed using quantitative indicators, facilitating users to perform quantitative analysis on spatio - temporal data. Description of the Drawings
[0049] Figure 1 It is a schematic structural diagram of the vehicle - person - road environment data testing system in an embodiment of this application.
[0050] Figure 2 It is a flowchart of steps S01 to S05 in an embodiment of this application.
[0051] Figure 3 It is a flowchart of steps S05 to S09 in an embodiment of this application.
[0052] Figure 4 It is a flowchart of steps S09 to S13 in an embodiment of this application.
[0053] Figure 5 It is a flowchart of steps S13 to S16 in an embodiment of this application. Detailed Embodiment
[0054] The following further elaborates on this application with reference to the accompanying drawings.
[0055] To facilitate the understanding of the terms mentioned in the embodiments of the present application, the meanings of the related terms are first explained as follows:
[0056] Driving simulator: Software for simulating vehicles and traffic, which can provide the tools and models required to construct a virtual world that approximates reality, including road environments, traffic environments, sensors, vehicle dynamics, weather conditions, and scene footprints, etc. Specifically, it can be SCANeR driving simulation software.
[0057] Simulated driving scenario: A driving scenario constructed by the user in the driving simulator using the tools provided by the software.
[0058] Vehicle model: A virtual vehicle traveling in the simulated driving scenario.
[0059] Driving operation device: In the real environment, a hardware device for an objective subject to control or operate to generate driving control signals. Specifically, it can be a physical vehicle, a G29 simulator, a mouse and keyboard, etc.
[0060] Operator: An objective subject who controls the movement of the vehicle model in the simulation scenario by performing driving operations on the driving operation device.
[0061] The embodiments of the present application disclose a method for testing the vehicle-road environment data of a virtual simulation environment, which is applied to an analysis platform. The analysis platform can specifically be an ergolab analysis platform. Refer to Figures 2 to 5 , and the driving data testing method includes the following steps:
[0062] S01: Receive the driving map data sent by the interface program, and form a driving map based on the driving map data. The driving map data is formed by the interface program based on the simulated driving scenario data sent by the driving simulator.
[0063] In the experimental design stage, the user pre-builds the driving scenario in the driving simulator. The driving simulator uses the interface program to send the driving map data to the analysis platform. The driving map data includes map data such as road dimensions, road shapes, road boundary coordinates, and road centerline coordinates. After receiving the driving map data, the analysis platform forms a driving map, that is, a two-dimensional map, based on the map data. Specifically, the analysis platform establishes a two-dimensional coordinate system and draws a two-dimensional map based on the road boundary coordinates and road centerline coordinates. Specifically, when receiving the simulated driving scenario data sent by the driving simulator, the interface program realizes the reception by calling the API network interface. When sending the driving map data to the analysis platform, the interface program performs data communication through the TCP communication protocol.
[0064] S02: Form a target analysis area on the driving map based on the user's selection operation on the driving map.
[0065] After the analysis platform forms a driving map, the user selects a target analysis area in the driving map. The target analysis area is polygonal, such as triangular or rectangular. Each point in the target analysis area has an analysis area coordinate corresponding to the coordinate system of the driving map. For example, when the user constructs a virtual driving scenario in a driving simulator and sets a pedestrian suddenly rushing out on a certain road section to test the reaction ability of the operator and the braking condition of the vehicle, the area corresponding to this road section can be selected on the driving map as the target analysis area to analyze the operator based on specific situations.
[0066] S03: Receive the vehicle data sent by the interface program at a preset sampling rate to form a vehicle data set. The vehicle data includes vehicle coordinates and acquisition time. The vehicle data is formed by the interface program based on the vehicle model data sent after the driving simulator responds to the virtual control signal. The driving control signal is formed based on the driving operations of the operator on the driving operation device. Subsequently, the interface program converts the driving control signal of the driving operation device into a virtual control signal and sends it to the driving simulator. During the experiment, the virtual driving scenario constructed by the user in the experiment design stage is displayed in the front windshield of the driving operation device. The operator sits in the driving operation device and simulates driving operations in the virtual driving scenario. The driving operations can specifically be actual operations that occur in daily driving behaviors, such as stepping on the accelerator, turning the steering wheel, and turning on the turn signal. Corresponding sensors are installed in the driving operation device to detect the vehicle conditions of the driving operation device. For example, a pressure sensor is installed on the accelerator pedal to detect the depression degree of the accelerator pedal, and a rotation angle sensor is installed on the steering wheel to detect the steering wheel rotation angle. The controller on the driving operation device can also directly collect the vehicle conditions of the driving operation device, such as the opening conditions of the turn signal and the warning light. The controller of the driving operation device forms a driving control signal based on the acquisition results and the detection results of each sensor and sends it to the interface program in real time. The interface program converts the driving control signal into a virtual control signal and sends it to the driving simulator. Specifically, when receiving the driving control signal sent by the driving operation device, the interface program realizes the reception by calling the local interface. The virtual control signal includes at least one of a steering wheel angle control signal, an engine speed control signal, a driving speed control signal, an accelerator control signal, a turn signal control signal, a warning light control signal, a horizontal distance control signal, a braking force control signal, a steering wheel rotation speed control signal, and a gear control signal. The vehicle model data includes at least one of a steering wheel angle data, an engine speed data, a vehicle driving speed data, an accelerator size data, a turn signal data, a warning light data, a horizontal distance data of the vehicle relative to the middle of the road, an angle data between the road axis and the vehicle heading, a parking braking force data, a steering wheel rotation speed data, and a gear data. After receiving the control virtual signal, the driving simulator modifies the parameters of the vehicle model accordingly and sends them to the interface program. The interface program forms vehicle data using the vehicle model data. In addition to including vehicle coordinates and acquisition time, the vehicle data also includes a steering wheel angle, an engine speed, a driving speed, an accelerator size, a turn signal opening condition, a warning light opening condition, a gear, etc. The vehicle coordinates share the coordinate system with the road boundary coordinates and the road center line coordinates in the driving map. The analysis platform collects the vehicle data at a preset sampling rate. The preset sampling rate is preferably 100HZ. In the vehicle data set, the vehicle data is arranged in sequence according to the sampling time. Specifically,
[0067] S04: Determine whether the vehicle model is located in the target analysis area based on the vehicle data.
[0068] The vehicle coordinates and the road coordinates use the same coordinate system, enabling the analysis platform to know the position of the vehicle relative to the driving map. In the vehicle dataset, the vehicle data is arranged in sequence according to the sampling time.
[0069] S05: When the formed vehicle data is in the target analysis area, obtain the human body data of the operator.
[0070] When the formed vehicle data is in the target analysis area, it indicates that the vehicle model in the driving simulator has entered the target analysis area. At this time, the analysis platform continuously collects the human body data of the operator through sensors until the vehicle exits the target analysis area.
[0071] The human body data includes, but is not limited to, eye movement data, physiological data, limb movements, and facial expression data of the human body. The physiological data may specifically include respiratory rate, electroencephalogram signal, body temperature, electromyogram, pulse, heart rate, and blood pressure. After the collection is completed, a continuous graph is formed according to the collection time, facilitating the user to intuitively observe the changes in the human body data and conduct analysis.
[0072] To determine whether a point is inside a region, a ray can be drawn from the point and the number of intersections of the ray and the region boundary can be calculated. If the number of intersections is odd, it means the point is inside the region; if the number of intersections is even, it means the point is outside the region. When dealing with vehicle data, it is possible to judge whether the vehicle data is in the target analysis area by calculating the number of intersections of the ray parallel to the horizontal axis emitted from the vehicle data and the boundary of the target analysis area.
[0073] S06: Preprocess the vehicle data in the vehicle dataset to form a displacement point set.
[0074] The analysis platform preprocesses the vehicle data in the vehicle dataset for subsequent efficient and accurate formation of the displacement route map.
[0075] S07: Draw a displacement route map on the driving map according to the displacement point set.
[0076] Draw corresponding marks at the positions corresponding to the displacement points on the displacement route map to display the displacement path of the vehicle.
[0077] S08: Traverse the displacement points in the displacement point set, using the position where the current displacement point is located as the center point.
[0078] S09: Use the positions whose distance from the center point is less than the preset distance value as the target drawing area, and calculate the number of displacement points in the target drawing area.
[0079] S10: Determine the color intensity of the target drawing area based on the duration of the vehicle at the current displacement point and the number of displacement points in the target drawing area.
[0080] S11: Form a trajectory heat map based on the color intensity.
[0081] When the analysis platform draws a trajectory heat map, the current displacement point is used as the center point of the brush, and the target drawing area is used as the drawing area of the brush. The duration of the center point and the number of displacement points in the target drawing area have a linear relationship with the color intensity of the target drawing area. The longer the duration of the center displacement point, the stronger the overall color intensity of the target drawing area. The more the number of displacement points in the target drawing area, the stronger the overall color intensity of the target drawing area. Specifically, the color intensity of the target drawing area decreases from the center point to the edge. After color drawing for each displacement point, a trajectory heat map is formed.
[0082] S12: Calculate the total number of displacement points in all target analysis areas to form the total number of visits to the target analysis area.
[0083] The analysis platform can obtain the number of times the vehicle visits the target analysis area and the path deviation situation during driving in the target analysis area by counting the number of displacement points in the target analysis area.
[0084] S13: Calculate the sum of the durations of all displacement points in all target analysis areas to form the total residence time of the target analysis area.
[0085] The longer the vehicle stays at a displacement point, the greater the degree of interaction among people, vehicles, and road conditions at this displacement point. The analysis platform can analyze the interaction among people, vehicles, and road conditions in the target analysis area through the total residence time of the analysis area.
[0086] S14: Calculate the sum of the durations of all displacement points in the displacement point set to form the travel time.
[0087] The analysis platform represents the time taken by the operator from the start of driving to the end of driving during the experiment through the travel time, that is, the time taken for the entire driving process.
[0088] S15: Calculate the ratio of the total residence time of the target analysis area to the travel time to form the percentage of the total access time of the target analysis area.
[0089] The analysis platform can obtain the degree of interaction between the target analysis area and the operator by calculating the ratio of the total residence time of the target analysis area to the travel time, so as to analyze the impact of the driving scenario corresponding to the target analysis area on the operator.
[0090] S16: Calculate the quotient of the total residence time of the target analysis area and the number of target analysis areas to form the average residence time of the target analysis area.
[0091] The analysis platform can analyze the influence degree of each target analysis area on the operator as a whole during the entire driving process by calculating the quotient of the total residence time of the target analysis area and the number of target analysis areas, or reduce the analysis error by calculating the quotient of the total residence time of the target analysis area and the number of target analysis areas. For example, make the areas of each target analysis area the same, and make the events occurring in the virtual driving scenarios corresponding to each target analysis area the same, and then obtain the average response time of the operator to the same event by calculating the quotient of the total residence time of the target analysis area and the number of target analysis areas.
[0092] In some embodiments, when determining whether the vehicle model is located in the target analysis area, the following steps are included:
[0093] S041: Along the boundary of the target analysis area, sequentially obtain the analysis area coordinates of the vertices of the target analysis area to form a vertex coordinate set.
[0094] The vertices of the target analysis area are also the inflection points of the target analysis area. When extracting the vertices of the target analysis area, the boundary of the target analysis area can be traversed in a clockwise or counterclockwise direction to extract the vertices of the target analysis area. After extraction, the analysis area coordinates of the vertices in the vertex coordinate set are arranged in sequence according to the extraction time.
[0095] S042: Traverse the vertex coordinate set and compare the magnitudes of the ordinates of the analysis area coordinates in the vertex coordinate set with the ordinate of the vehicle coordinates.
[0096] S043: If among two adjacent analysis area coordinates, the ordinate of one analysis area coordinate is greater than or equal to the ordinate of the vehicle coordinates, and the ordinate of the other analysis area coordinate is less than the ordinate of the vehicle coordinates, then use the two adjacent analysis area coordinates as a pair of area coordinates.
[0097] The adjacency of the two analysis area coordinates can refer to being adjacent in the sorting in the vertex coordinate set, that is, adjacent in the extraction time, or can also refer to being adjacent in space for the vertices corresponding to the analysis area coordinates. Take the direction pointed by the vertical axis in the coordinate system as the direction from bottom to top, and the direction pointed by the horizontal axis as the direction from left to right.
[0098] When the coordinates of two adjacent analysis regions are both above or below the vehicle coordinates, the ray parallel to the horizontal axis drawn from the vehicle coordinates will not intersect the boundary formed by these two adjacent analysis region coordinates. Therefore, before calculation, these non-intersecting boundaries are excluded first to reduce the amount of calculation. Specifically, if among the coordinates of two adjacent analysis regions, the ordinate of one analysis region coordinate is greater than or equal to the ordinate of the vehicle coordinates, and the ordinate of the other analysis region coordinate is less than the ordinate of the vehicle coordinates, it indicates that among the two adjacent analysis region coordinates, one analysis region coordinate is above the vehicle coordinates and the other is below the vehicle coordinates. At this time, the boundary formed by these two adjacent analysis region coordinates may intersect the ray drawn from the vehicle coordinates. Therefore, these two adjacent analysis region coordinates are used as a pair of region coordinates, and in subsequent calculations, only the boundaries formed by the connections between each pair of region coordinates are calculated.
[0099] S044: Extract pairs of region coordinates that meet the pre-designed calculation conditions to form a calculation coordinate set, where the pre-designed calculation condition is that the abscissa of any region coordinate in the pair of region coordinates is greater than or equal to the abscissa of the vehicle coordinates.
[0100] S045: Establish a measurement line, and the ordinate of each point on the measurement line is equal to the ordinate of the vehicle coordinates.
[0101] The established measurement line is a straight line passing through the vehicle coordinates and parallel to the horizontal axis. However, since it is necessary to use the ray drawn from the vehicle coordinates in the vehicle data to determine whether the vehicle coordinates are within the target analysis region, that is, to make a judgment by means of a line on one side of the vehicle coordinates, only the pairs of region coordinates on the right side of the vehicle coordinates are selected as the calculation targets.
[0102] S046: Calculate the number of intersection points between the connections of each pair of region coordinates in the calculation coordinate set and the measurement line.
[0103] This is equivalent to calculating the number of intersection points between the ray drawn from the vehicle coordinates and the boundary of the target analysis region.
[0104] S047: If the number of intersection points is odd, it is determined that the vehicle coordinates are within the target analysis region; otherwise, it is determined that the vehicle coordinates are not within the target analysis region.
[0105] Thus, it is realized to judge whether the vehicle data is within the target analysis region by the number of intersection points.
[0106] In some embodiments, when preprocessing the vehicle data in the vehicle dataset, the following steps are included:
[0107] S061: Extract the sampling times of all vehicle data in the vehicle dataset.
[0108] S062: Traverse all sampling times and calculate the time difference between the sampling times of two adjacent vehicle data.
[0109] Specifically, in the embodiments of the present application, the adjacency of the vehicle data mentioned refers to adjacency in time rather than in space.
[0110] S063: If the time difference between the sampling times of two adjacent vehicle data is greater than the sampling interval and less than the preset time difference, add new vehicle data between the two adjacent vehicle data and update the vehicle data set accordingly.
[0111] The sampling interval corresponds to the preset sampling rate. For example, when the preset sampling rate is 100HZ, the sampling interval is 10MS. The preset time difference is preferably 75MS. Under normal sampling conditions, the time difference between the sampling times of two adjacent vehicle data should be equal to the sampling interval. If the time difference between the sampling times of two adjacent vehicle data is greater than the sampling interval, it indicates that data is missing and needs to be filled in the vacant position. After filling, the vehicle data set is updated accordingly, so that when the displacement line graph is drawn subsequently, it can be drawn according to the filled data.
[0112] In some embodiments, when forming the displacement point set, the following steps are included:
[0113] S064: Extract the vehicle coordinates of all vehicle data in the vehicle data set.
[0114] S065: Traverse all vehicle data and extract the first vehicle data and the last vehicle data in the time window when the midpoint time of the time window is the sampling time in the current vehicle data.
[0115] Assume that sampling is performed at a sampling rate of 100HZ. Then the sampling times of the first four vehicle data in the vehicle data set are 0MS, 10MS, 20MS, and 30MS respectively. When the sampling time in the current vehicle data is 20MS and the time window duration is 20MS, the first vehicle data in the time window is the vehicle data with a sampling time of 10MS, and the last vehicle data in the time window is the vehicle data with a sampling time of 30MS.
[0116] S066: Use the line connecting the vehicle coordinates in the current vehicle data and the vehicle coordinates in the first vehicle data as the first straight line, and use the line connecting the vehicle coordinates in the current vehicle data and the vehicle coordinates in the last vehicle data as the second straight line, and calculate the angle between the first straight line and the second straight line.
[0117] S067: Calculate the angular velocity based on the angle and the duration of the time window.
[0118] The angular velocity is specifically equal to the included angle divided by the duration of the time window.
[0119] S068: If the angular velocity corresponding to the current vehicle data is greater than the preset angular velocity threshold, then use the vehicle coordinates in the current vehicle data as the displacement points in the displacement point set.
[0120] The angular velocity threshold is preferably 30° / S. Calculate the deviation between vehicle coordinates in the position data using the angular velocity, and select the position data with a larger offset as the displacement points for drawing the displacement route map, thereby reducing the number of displacement points and improving the efficiency of drawing the displacement route map.
[0121] In some embodiments, when drawing the displacement route map, the following steps are included:
[0122] S071: Form a display icon at the position of the displacement point in the driving map. The display icon indicates the direction of the line connecting the previous displacement point and the current displacement point by pointing, indicates the relationship between the displacement point and the operator by color, and indicates the duration of the vehicle at the displacement point by area.
[0123] The display icon is specifically an arrow with color and area. Among them, the color is used to indicate which operator this displacement point belongs to. For example, when multiple operators conduct experiments using the same driving map, the displacement points of different operators can be made to have different colors to distinguish the movement trajectories of different operators. The area is used to indicate the duration of the vehicle at the displacement point. The duration specifically refers to the difference between the sampling time of the current displacement point and the sampling time of the adjacent next displacement point. The display icon has a certain basic size, and for every 1S increase in the duration of the displacement point, the size of the display icon expands by 10%. The direction of the arrow is specifically the direction from the previous displacement point to the current displacement point.
[0124] In some embodiments, when adding new vehicle data between the adjacent two vehicle data, the following steps are included:
[0125] S0631: Calculate the number of vehicle data to be added between the adjacent two vehicle data based on the time difference between the sampling times of the adjacent two vehicle data and the sampling interval.
[0126] The number of vehicle data to be added is equal to the time difference between the sampling times of the adjacent two vehicle data divided by the sampling interval minus one. Suppose among the adjacent two vehicle data, the sampling time of the first vehicle data is 0.01S, and the sampling time of the second vehicle is 0.05S. Then the time difference between the sampling times is 0.04S, and the sampling interval is 0.01S / time. Then the number of vehicle data to be added between the adjacent two vehicle data is 3.
[0127] S0632: Calculate the vehicle coordinates in each piece of vehicle data to be added based on the coordinate difference between the vehicle coordinates of two adjacent pieces of vehicle data and the number of pieces of vehicle data to be added.
[0128] Use the number of pieces of vehicle data to be added plus one as the calculation intermediate value. The difference in the abscissa between the vehicle coordinates in the vehicle data to be added is equal to the quotient of the difference in the abscissa of the vehicle coordinates of two adjacent pieces of vehicle data divided by the calculation intermediate value. The difference in the ordinate between the vehicle coordinates in the vehicle data to be added is equal to the quotient of the difference in the ordinate of the vehicle coordinates of two adjacent pieces of vehicle data divided by the calculation intermediate value. The difference between the sampling times in the vehicle data to be added is equal to the sampling interval. Assume that the vehicle coordinates of two adjacent pieces of vehicle data are (1, 1) and (5, 5) respectively, and the number of pieces of vehicle data to be added between the two adjacent pieces of vehicle data is 3. Then the difference in the ordinate between the vehicle coordinates in the vehicle data to be added is 1, and the difference in the abscissa between the vehicle coordinates in the vehicle data to be added is 1, that is, the vehicle coordinates of the 3 pieces of vehicle data to be added are (2, 2), (3, 3), and (4, 4) respectively.
[0129] The embodiment of the present application also discloses a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it executes the steps of the foregoing driving data testing method.
[0130] See Figure 1 , the embodiment of the present application also discloses a vehicle-person-road environment data testing system, including a driving operation device, an interface program, a driving simulator, and an analysis platform. The driving operation device is used to generate a driving control signal based on the driving operation of an operator on the driving operation device. The interface program is used to convert the driving control signal of the driving operation device into a virtual control signal and send it to the driving simulator. The driving simulator is used to respond to the virtual control signal. The analysis platform is used to execute the steps of the foregoing driving data testing method.
[0131] The above are all the preferred embodiments of the present application. The protection scope of the present application is not limited by this. Therefore, all equivalent changes made according to the principle of the present application should be covered within the protection scope of the present application.
Claims
1. A method for testing the vehicle-road environment data in a virtual simulation environment, characterized in that: The method includes the following steps: Receiving driving map data sent by an interface program, forming a driving map based on the driving map data, where the driving map data is formed by the interface program based on simulated driving scenario data sent by a driving simulator; Forming a target analysis area on the driving map based on a selection operation of a user for the driving map; Receiving vehicle data sent by the interface program at a preset sampling rate to form a vehicle data set, where the vehicle data includes vehicle coordinates and acquisition time, and the vehicle data is formed by the interface program based on vehicle model data sent by the driving simulator in response to a virtual control signal; Judging whether the vehicle model is located in the target analysis area based on the vehicle data; If so, obtaining human body data of an operator; When judging whether the vehicle model is located in the target analysis area based on the vehicle data, it includes the following steps: Along the boundary of the target analysis area, sequentially obtaining the analysis area coordinates of the vertices of the target analysis area to form a vertex coordinate set; Traversing the vertex coordinate set, comparing the magnitudes of the ordinates of the analysis area coordinates in the vertex coordinate set and the ordinate of the vehicle coordinates; If among two adjacent analysis area coordinates, the ordinate of one analysis area coordinate is greater than or equal to the ordinate of the vehicle coordinates, and the ordinate of the other analysis area coordinate is less than the ordinate of the vehicle coordinates, then taking the two adjacent analysis area coordinates as a pair of area coordinates; Extracting pairs of area coordinates that meet pre-designed calculation conditions to form a calculation coordinate set, where the pre-designed calculation condition is that the abscissa of any area coordinate in the pair of area coordinates is greater than or equal to the abscissa of the vehicle coordinates; Establishing a measurement line, where the ordinate of each point on the measurement line is equal to the ordinate of the vehicle coordinates; Calculating the number of intersection points between the lines connecting the pairs of area coordinates in the calculation coordinate set and the measurement line; If the number of intersection points is odd, judging that the vehicle coordinates are in the target analysis area, otherwise judging that the vehicle coordinates are not in the target analysis area.
2. The method for testing the vehicle-road environment data of a virtual simulation environment according to claim 1, wherein: The method further includes: Pre-processing the vehicle data in the vehicle data set to form a displacement point set; Drawing a displacement route map on the driving map according to the displacement point set.
3. The method for testing the vehicle-road environment data of a virtual simulation environment according to claim 2, characterized in that: When pre-processing the vehicle data in the vehicle data set, it includes the following steps: Extracting the sampling times of all vehicle data in the vehicle data set; Traversing all sampling times, calculating the time difference between the sampling times of two adjacent vehicle data; If the time difference between the sampling times of two adjacent vehicle data is greater than the sampling interval and less than a preset time difference, adding new vehicle data between the two adjacent vehicle data and correspondingly updating the vehicle data set.
4. The method for testing the vehicle-road environment data of a virtual simulation environment according to claim 3, characterized in that: When adding new vehicle data between the two adjacent vehicle data, it includes the following steps: Calculating the number of vehicle data to be added between the two adjacent vehicle data based on the time difference between the sampling times of the two adjacent vehicle data and the sampling interval; Calculate the vehicle coordinates in each vehicle data to be added based on the coordinate difference of the vehicle coordinates of the adjacent two vehicle data and the number of the vehicle data to be added.
5. A method for testing vehicle-road environment data in a virtual simulation environment according to claim 2, characterized in that: When drawing a displacement route map on the driving map according to the displacement point set, the following steps are included: Form a display icon at the position of the displacement point in the driving map. The display icon indicates the direction of the line connecting the previous displacement point and the current displacement point by pointing, indicates the relationship between the displacement point and the operator by color, and indicates the duration of the vehicle at the displacement point by area.
6. A method for testing the vehicle, road and environment data in a virtual simulation environment according to claim 2, characterized in that: The method further includes the following steps: Traverse the displacement points in the displacement point set, and use the position of the current displacement point as the center point; Use the position with a distance less than a preset distance value from the center point as the target drawing area, and calculate the number of displacement points in the target drawing area; Determine the color intensity of the target drawing area based on the duration of the vehicle at the current displacement point and the number of displacement points in the target drawing area; Form a trajectory heat map based on the color intensity.
7. A method for testing the vehicle-road environment data of a virtual simulation environment according to claim 2, characterized in that: The method further includes the following steps: Calculate the total number of displacement points in all target analysis areas to form the total number of visits to the target analysis areas; Calculate the sum of the durations of all displacement points in all target analysis areas to form the total stay time of the target analysis areas; Calculate the sum of the durations of all displacement points in the displacement point set to form the travel time; Calculate the ratio of the total stay time of the target analysis areas to the travel time to form the percentage of the total visit time of the target analysis areas; Calculate the quotient of the total stay time of the target analysis areas divided by the number of target analysis areas to form the average stay time of the target analysis areas.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for testing the vehicle-road environment data of the virtual simulation environment according to any one of claims 1-7 are implemented.
9. A vehicle-person-road environment data testing system, characterized in that: It includes a driving operation device, an interface program, a driving simulator, and an analysis platform. The driving operation device is used to form a driving control signal based on the driving operation of the operator on the driving operation device. The interface program is used to convert the driving control signal of the driving operation device into a virtual control signal and send it to the driving simulator. The driving simulator is used to respond to the virtual control signal, and the analysis platform is used to execute the steps of the method for testing the vehicle-road environment data of the virtual simulation environment according to any one of claims 1-7.
Citation Information
Patent Citations
Driving safety simulation system and method based on virtual reality technology
CN112349171A
Vehicle information fusion display method, non-inductive passing system and storage medium
CN115394089A
Simulation test method for autonomous driving vehicle, computer equipment and medium
US20210394787A1
Cited By
V2X automatic driving safety assessment method, system and equipment based on fuzzy test technology
CN121070787A