Road scenario and dynamic traffic flow optimization methods, systems and storage media
By acquiring and adjusting road scene and dynamic traffic flow information, optimized OpenDrive and OpenScenario files are generated, solving the problem of inaccurate vehicle placement and achieving more efficient and accurate traffic flow simulation.
Patent Information
- Application Number
- CN202210834754.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2042-07-14
AI Technical Summary
In existing technologies, vehicle positions in OpenScenario files cannot be accurately placed in the correct locations on the road, resulting in insufficient data simulation accuracy for road and dynamic traffic flow simulations, and making it impossible to construct realistic dynamic traffic flows.
By acquiring road scene information and initial dynamic traffic flow information of the reference vehicle, it is determined whether the vehicle under test is the target vehicle, the positional relationship between the reference vehicle and the target vehicle is predicted and adjusted, optimized OpenDrive and OpenScenario files are generated, and a traffic road simulation model is constructed.
It improves the efficiency and accuracy of simulation work, and the dynamic traffic flow on the road map is closer to the real scene, avoiding the need to manually adjust the vehicle position.
Smart Images

Figure CN115391980B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of road traffic simulation modeling, and in particular to a method, system, and storage medium for optimizing road scenes and dynamic traffic flow. Background Technology
[0002] With the continuous development of autonomous driving technology, autonomous driving simulation has become increasingly important, transforming a large amount of development and testing costs of real autonomous vehicles into computer simulation development and testing, saving a significant amount of time, labor, and material costs.
[0003] Intelligent driving complex traffic scenario simulation software can simulate roads and dynamic traffic flow. The road component consists of OpenDrive files, while the dynamic traffic flow component consists of OpenScenario files. These two files are independent yet interdependent. Current technology simply generates OpenDrive and OpenScenario files automatically from traffic data sources, and these files are then loaded by the intelligent driving complex traffic scenario simulation tool. However, due to the curvature of the road, the vehicle positions in the OpenScenario files may not be automatically placed in the correct locations on the road. Furthermore, the data collected by vehicle sensors can only capture the position and speed information when the vehicle encounters an object. This clearly affects the accuracy of the data simulation for roads and dynamic traffic flow, and cannot accurately construct a more realistic dynamic traffic flow on the road map.
[0004] Therefore, it is necessary to make corresponding adjustments to road information and dynamic traffic flow information to more realistically and reasonably realize the effect of running dynamic traffic flow on road maps. Summary of the Invention
[0005] The present invention provides a method, system and storage medium for optimizing road scenes and dynamic traffic flow, which can optimize and adjust dynamic traffic flow information, and make the dynamic traffic flow on the road map more closely resemble the real scene when constructing traffic road simulation models.
[0006] Firstly, a method for optimizing road scenarios and dynamic traffic flow is provided, including the following steps:
[0007] Obtain information about the road scene where the reference vehicle is located, as well as the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and determine whether the vehicle to be tested is the target vehicle.
[0008] Based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, the positional relationship between the reference vehicle and the target vehicle is predicted and adjusted, and the adjusted optimized dynamic traffic flow information is obtained.
[0009] A road scene OpenDrive file is generated based on the road scene information, and a dynamic traffic flow OpenScenario file is generated based on the optimized dynamic traffic flow information.
[0010] Based on the OpenDrive file of the road scene and the OpenScenario file of the dynamic traffic flow, a traffic road simulation model is constructed using simulation software.
[0011] According to the first aspect, in the first possible implementation of the first aspect, the step of "obtaining the road scene information where the reference vehicle is located, and the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and determining whether the vehicle to be tested is the target vehicle" specifically includes the following steps:
[0012] Obtain road scene information where the reference vehicle is located, and obtain initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested based on the road scene information; the initial dynamic traffic flow information includes: the distance between the lane position of the reference vehicle and the leftmost lane, the distance between the lane position of the reference vehicle and the rightmost lane, and the lateral distance between the vehicle and the vehicle to be tested.
[0013] When the lateral distance between the current vehicle and the vehicle to be tested is greater than the distance between the lane where the reference vehicle is located and the rightmost lane, and less than the distance between the lane where the reference vehicle is located and the leftmost lane, then the vehicle to be tested is the target vehicle and is set in the road scene where the reference vehicle is located.
[0014] Otherwise, the vehicle under test is not the target vehicle and is not set in the road scenario where the reference vehicle is located.
[0015] According to the first possible implementation of the first aspect, in the second possible implementation of the first aspect, the step of "predicting and adjusting the positional relationship between the reference vehicle and the target vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and obtaining the adjusted optimized dynamic traffic flow information" specifically includes the following steps:
[0016] Based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle;
[0017] Predict the orientation of the target vehicle relative to the reference vehicle;
[0018] Predict the position of the target vehicle when the reference vehicle and the target vehicle meet;
[0019] And based on the target vehicle's position when the reference vehicle and the target vehicle meet, predict the target vehicle's position some time before the reference vehicle and the target vehicle meet;
[0020] Adjust the position error of the reference vehicle and the position error of the target vehicle respectively.
[0021] According to the second possible implementation of the first aspect, in the third possible implementation of the first aspect, the step of "predicting the orientation of the target vehicle relative to the reference vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle" specifically includes the following steps:
[0022] Based on the lateral distance between the reference vehicle and the target vehicle, and the distance between the reference vehicle and the lane centerline;
[0023] If the lateral distance between the reference vehicle and the target vehicle is less than the distance between the reference vehicle and the center line of the lane, then the reference vehicle and the target vehicle are facing the same direction.
[0024] Otherwise, the reference vehicle and the target vehicle are facing opposite directions.
[0025] According to the third possible implementation of the first aspect, in the fourth possible implementation of the first aspect, the step of "predicting the position of the target vehicle when the reference vehicle and the target vehicle meet based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle" specifically includes the following steps:
[0026] Based on the distance traveled by the reference vehicle and the coordinates of the reference vehicle on the center line of the lane, a center line coordinate distance mapping table is generated in chronological order.
[0027] Based on the distance traveled by the reference vehicle when it meets the target vehicle, and the center line coordinate distance mapping table, obtain the center line coordinates of the reference vehicle on the lane center line when it meets the target vehicle.
[0028] Based on the distance between the reference vehicle and the center line of the lane when the reference vehicle meets the target vehicle, the yaw angle of the road where the reference vehicle is located when the two vehicles meet, and the coordinates of the center line of the lane where the two vehicles meet, the coordinates of the reference vehicle when the two vehicles meet are obtained.
[0029] Based on the relative horizontal and vertical coordinates of the reference vehicle and the target vehicle, and the coordinates of the reference vehicle, the coordinates of the target vehicle when the reference vehicle and the target vehicle meet are obtained.
[0030] According to the fourth possible implementation of the first aspect, in the fifth possible implementation of the first aspect, the step of "predicting the position of the target vehicle some time before the encounter between the reference vehicle and the target vehicle based on the road scene information, the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and the position of the target vehicle when the reference vehicle and the target vehicle meet" specifically includes the following steps:
[0031] Based on the target vehicle's coordinates when the reference vehicle and the target vehicle meet, and the centerline coordinate distance mapping table, obtain the target vehicle's travel distance when the reference vehicle and the target vehicle meet.
[0032] Based on the relative speed of the target vehicle, the speed of the reference vehicle, and the distance traveled by the target vehicle when the reference vehicle and the target vehicle meet, obtain the distance traveled by the target vehicle in the period of time before the reference vehicle and the target vehicle meet.
[0033] Based on the distance traveled by the target vehicle some time before the reference vehicle and the target vehicle meet, and the centerline coordinate distance mapping table, obtain the centerline coordinates of the target vehicle corresponding to the lane centerline before the reference vehicle and the target vehicle meet.
[0034] Based on the distance between the reference vehicle and the lane centerline some time before the reference vehicle and the target vehicle meet, the yaw angle of the road where the reference vehicle is located some time before the meeting, and the coordinates of the lane centerline before the meeting, the coordinates of the reference vehicle and the target vehicle some time before the meeting are obtained.
[0035] According to the fifth possible implementation of the first aspect, in the sixth possible implementation of the first aspect, the step of "adjusting the position error of the reference vehicle and the position error of the target vehicle respectively based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle" specifically includes the following steps:
[0036] Obtain the average speed of the benchmark vehicle every second over a period of time;
[0037] Obtain the average speed of the target vehicle every second over a period of time.
[0038] Secondly, a road scenario and dynamic traffic flow optimization system is provided, characterized by comprising:
[0039] The target vehicle determination module is used to obtain the road scene information where the reference vehicle is located, as well as the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and to determine whether the vehicle to be tested is the target vehicle.
[0040] The optimized dynamic traffic flow information module is communicatively connected to the target vehicle judgment module. It is used to predict and adjust the positional relationship between the reference vehicle and the target vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and to obtain the adjusted optimized dynamic traffic flow information.
[0041] The data file acquisition module is communicatively connected to the target vehicle judgment module and the optimized dynamic traffic flow information module, and is used to generate a road scene OpenDrive file based on the road scene information and a dynamic traffic flow OpenScenario file based on the optimized dynamic traffic flow information.
[0042] The simulation model building module is communicatively connected to the data file acquisition module and is used to build a traffic road simulation model based on the road scene OpenDrive file and the dynamic traffic flow OpenScenario file, and through simulation software.
[0043] According to the second aspect, in a first possible implementation of the second aspect, the optimized dynamic traffic flow information module is used to: predict the orientation of the target vehicle relative to the reference vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle; predict the position of the target vehicle when the reference vehicle and the target vehicle meet; and, based on the position of the target vehicle when the reference vehicle and the target vehicle meet, predict the position of the target vehicle a period of time before the reference vehicle and the target vehicle meet; and adjust the position error of the reference vehicle and the position error of the target vehicle respectively.
[0044] Thirdly, a storage medium is provided on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the above-mentioned road scene and dynamic traffic flow optimization method.
[0045] Compared with existing technologies, the advantages of this invention are as follows: First, by acquiring the road scene information where the reference vehicle is located, and the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and determining whether the vehicle to be tested is the target vehicle, irrelevant vehicles outside the lane that affect the construction of the traffic road simulation model are filtered out; then, based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, the positional relationship between the reference vehicle and the target vehicle is predicted and adjusted, and the adjusted optimized dynamic traffic flow information is obtained, at which point the dynamic traffic flow can be optimized; then, a road scene OpenDrive file is generated based on the road scene information, and a dynamic traffic flow OpenScenario file is generated based on the optimized dynamic traffic flow information; finally, a traffic road simulation model is constructed using simulation software based on the road scene OpenDrive file and the dynamic traffic flow OpenScenario file.
[0046] Therefore, by sharing and interacting in real time with the data sources—road scene information / dynamic traffic flow information—that generate OpenDrive and OpenScenario files, and optimizing the data source parameters, we can obtain adjusted and optimized dynamic traffic flow information. This allows the dynamic traffic flow on the road map to more closely approximate the real scene when building traffic road simulation models, avoiding the need to manually rearrange the vehicle positions on the road and improving the efficiency and accuracy of simulation work. Attached Figure Description
[0047] Figure 1 This is a flowchart illustrating an embodiment of the road scenario and dynamic traffic flow optimization method of the present invention;
[0048] Figure 2 This is a flowchart illustrating another embodiment of the road scenario and dynamic traffic flow optimization method of the present invention;
[0049] Figure 3 This is a schematic diagram of the reference vehicle and the target vehicle in a road scenario according to the present invention;
[0050] Figure 4 This is a schematic diagram of the road scene and dynamic traffic flow optimization system of the present invention. Attached image description:
[0052] 100. Road Scene and Dynamic Traffic Flow Optimization System; 110. Target Vehicle Judgment Module; 120. Optimized Dynamic Traffic Flow Information Module; 130. Data File Acquisition Module; 140. Simulation Model Establishment Module. Detailed Implementation
[0053] Referring now to specific embodiments of the invention, examples of which are illustrated in the accompanying drawings. Although the invention will be described in conjunction with specific embodiments, it will be understood that it is not intended to limit the invention to the described embodiments. Rather, it is intended to cover variations, modifications, and equivalents included within the spirit and scope of the invention as defined by the appended claims. It should be noted that the method steps described herein can be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of both.
[0054] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0055] Note: The examples described below are merely specific examples and are not intended to limit the embodiments of the present invention to the specific steps, values, conditions, data, order, etc. Those skilled in the art can utilize the concept of the present invention to construct more embodiments not mentioned herein by reading this specification.
[0056] See Figure 1 As shown, this embodiment of the invention provides a method for optimizing road scenarios and dynamic traffic flow, including the following steps:
[0057] S100: Obtain road scene information where the reference vehicle is located, as well as initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and determine whether the vehicle to be tested is the target vehicle.
[0058] S200: Based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, predict and adjust the positional relationship between the reference vehicle and the target vehicle, and obtain the adjusted optimized dynamic traffic flow information.
[0059] S300, Generate a road scene OpenDrive file based on the road scene information, and generate a dynamic traffic flow OpenScenario file based on the optimized dynamic traffic flow information;
[0060] S400, based on the OpenDrive file of the road scene and the OpenScenario file of the dynamic traffic flow, and using simulation software, a traffic road simulation model is constructed.
[0061] Specifically, in this embodiment, see Figure 1 As shown, in related technologies, traffic scene simulation software is used to generate OpenDrive files for the road portion and OpenScenario files for the dynamic traffic flow portion. However, the traffic road simulation model constructed by directly generating these files from traffic data obtained by vehicle sensors has certain errors compared to the real traffic scene, and its accuracy is insufficient. Therefore, this embodiment of the invention first obtains the road scene information where the reference vehicle is located, as well as the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and determines whether the vehicle to be tested is the target vehicle, thereby filtering out irrelevant vehicles outside the lane that may affect the construction of the traffic road simulation model. Then, based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, the positional relationship between the reference vehicle and the target vehicle is predicted and adjusted, and the adjusted optimized dynamic traffic flow information is obtained. At this point, the dynamic traffic flow can be optimized. Then, a road scene OpenDrive file is generated based on the road scene information, and a dynamic traffic flow OpenScenario file is generated based on the optimized dynamic traffic flow information. Finally, based on the road scene OpenDrive file and the dynamic traffic flow OpenScenario file, a traffic road simulation model is constructed using simulation software.
[0062] Therefore, by sharing and interacting in real time with the data sources—road scene information / dynamic traffic flow information—that generate OpenDrive and OpenScenario files, and optimizing the data source parameters, we can obtain adjusted and optimized dynamic traffic flow information. This allows the dynamic traffic flow on the road map to more closely approximate the real scene when building traffic road simulation models, avoiding the need to manually rearrange the vehicle positions on the road and improving the efficiency and accuracy of simulation work.
[0063] See also Figure 2 As shown, the process of obtaining the OpenDrive file for the road scene is as follows: By using a Python script to read key information frame by frame from the collected CSV format traffic data source, the road scene information where the reference vehicle is located is obtained, including road width, road length, number of lanes, curvature, yaw angle, etc., among which the number of lanes, curvature, and yaw angle will change over time; then the above information is saved in a dictionary structure and converted into an XML file, which will generate an OpenDrive file with the suffix .xodr.
[0064] See also Figure 2 As shown, the process of obtaining the OpenScenario file for dynamic traffic flow is as follows: Similarly, the initial dynamic traffic flow information, such as the lateral and longitudinal distances between the reference vehicle and the target vehicle, and the relative speed, is read to construct a dictionary of the OpenScenario structure and save the above information. Then, the dictionary structure of the road scene information is read to predict and adjust the positional relationship between the reference vehicle and the target vehicle, and the adjusted optimized dynamic traffic flow information is obtained. Then, the optimized dynamic traffic flow information is saved in dictionary structure and converted into an XML file, which generates an OpenScenario file with the suffix .xosc.
[0065] Preferably, in another embodiment of this application, the step "S100, obtaining road scene information where the reference vehicle is located, and initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and determining whether the vehicle to be tested is the target vehicle" specifically includes the following steps:
[0066] S110, obtain the road scene information where the reference vehicle is located, and obtain the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested based on the road scene information; the initial dynamic traffic flow information includes: the distance between the lane position of the reference vehicle and the leftmost lane, the distance between the lane position of the reference vehicle and the rightmost lane, and the lateral distance between the vehicle and the vehicle to be tested.
[0067] S120, when the lateral distance between the on-site vehicle and the vehicle to be tested is greater than the distance between the lane position of the reference vehicle and the rightmost lane, and less than the distance between the lane position of the reference vehicle and the leftmost lane, then the vehicle to be tested is the target vehicle and is set in the road scene where the reference vehicle is located.
[0068] S130, otherwise, the vehicle under test is not the target vehicle and is not set in the road scene where the reference vehicle is located.
[0069] Specifically, in this embodiment, the vehicle under test is considered the target vehicle and is required to construct the traffic road simulation model only if the lateral distance between the vehicle under test and the vehicle on the ground is greater than the distance between the rightmost lane and the lane where the reference vehicle is located, and less than the distance between the lane where the reference vehicle is located and the leftmost lane. This is because vehicles outside the road are meaningless for constructing the traffic road simulation model. Therefore, if the vehicle under test is not the target vehicle, it is not set in the road scene where the reference vehicle is located and can be discarded.
[0070] Preferably, in another embodiment of this application, the step "S200, predicting and adjusting the positional relationship between the reference vehicle and the target vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and obtaining the adjusted optimized dynamic traffic flow information" specifically includes the following steps:
[0071] S210, based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle;
[0072] S220, predicts the orientation of the target vehicle relative to the reference vehicle;
[0073] S230, predicts the position of the target vehicle when the reference vehicle and the target vehicle meet;
[0074] S240, and based on the target vehicle's position when the reference vehicle and the target vehicle meet, predict the target vehicle's position a certain period before the reference vehicle and the target vehicle meet;
[0075] S250 adjusts the position error of the reference vehicle and the position error of the target vehicle respectively.
[0076] Specifically, in this embodiment, in order to make the dynamic traffic flow on the road map more closely resemble the real scene when constructing the traffic road simulation model, it is necessary to predict and adjust the positional relationship between the reference vehicle and the target vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle. This includes predicting the orientation of the target vehicle relative to the reference vehicle, predicting the position of the target vehicle when the reference vehicle and the target vehicle meet, predicting the position of the target vehicle a period of time before the reference vehicle and the target vehicle meet, and adjusting the position error of the reference vehicle and the position error of the target vehicle respectively; thereby obtaining the adjusted optimized dynamic traffic flow information.
[0077] See also Figure 3 As shown, preferably, in another embodiment of this application, the step of "S210 predicting the orientation of the target vehicle relative to the reference vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle" specifically includes the following steps:
[0078] Based on the lateral distance between the reference vehicle and the target vehicle, and the distance between the reference vehicle and the lane centerline;
[0079] If the lateral distance between the reference vehicle and the target vehicle is less than the distance between the reference vehicle and the center line of the lane, then the reference vehicle and the target vehicle are facing the same direction.
[0080] Otherwise, the reference vehicle and the target vehicle are facing opposite directions.
[0081] Preferably, in another embodiment of this application, the step of "S210 predicting the position of the target vehicle when the reference vehicle and the target vehicle meet based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle" specifically includes the following steps:
[0082] Based on the distance traveled by the reference vehicle and the coordinates of the reference vehicle on the center line of the lane, generate a center line coordinate distance mapping table list in chronological order.
[0083] Based on the distance S traveled by the reference vehicle when it meets the target vehicle, and the centerline coordinate distance mapping table list, obtain the centerline coordinates (x0, y0) of the reference vehicle corresponding to the lane centerline when it meets the target vehicle.
[0084] Based on the distance d between the reference vehicle and the center line of the lane when the reference vehicle meets the target vehicle, the yaw angle hdg of the road where the reference vehicle is located when the two vehicles meet, and the coordinates (x0, y0) of the center line of the lane where the two vehicles meet, the coordinates (x1, y1) of the reference vehicle when the two vehicles meet.
[0085] Where, x1=x0+d*sin(hdg) Equation (I);
[0086] y1=y0-d*cos(hdg) Equation (II);
[0087] Based on the relative horizontal and vertical coordinates (x, y) of the reference vehicle and the target vehicle, and the coordinates (x1, y1) of the reference vehicle, the coordinates (x2, y2) of the target vehicle when the reference vehicle and the target vehicle meet are obtained.
[0088] Where, x2 = x1 + x (Equation 3);
[0089] y2 = y1 + y (Equation 4);
[0090] The purpose of predicting the target vehicle's position when the reference vehicle and the target vehicle meet is to eliminate the influence of road curves on the relative position error between the reference vehicle and the target vehicle.
[0091] Preferably, in another embodiment of this application, the step "S210 predicting the target vehicle's position a certain period before the encounter between the reference vehicle and the target vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and S230 predicting the target vehicle's position a certain period before the encounter between the reference vehicle and the target vehicle based on the target vehicle's position when the reference vehicle and the target vehicle meet" specifically includes the following steps:
[0092] Based on the target vehicle's coordinates (x2, y2) when the reference vehicle meets the target vehicle, and the centerline coordinate distance mapping table list, obtain the target vehicle's travel distance S1 when the reference vehicle meets the target vehicle.
[0093] Based on the relative speed v of the target vehicle and the speed v1 of the reference vehicle, the absolute speed of the target vehicle is v2 = v1 + v (Equation 5).
[0094] Then, based on the distance S1 traveled by the target vehicle when the reference vehicle and the target vehicle meet, obtain the distance Sn traveled by the target vehicle at a time n before the reference vehicle and the target vehicle meet.
[0095] If the reference vehicle and the target vehicle are traveling in opposite directions, then sn = s1 - v2*n (Equation 6);
[0096] If the reference vehicle and the target vehicle are traveling in the same direction, then sn = s1 + v2*n (Equation VII);
[0097] Based on the distance Sn of the target vehicle before the reference vehicle and the target vehicle meet at a time n, and the centerline coordinate distance mapping table list, obtain the centerline coordinates (x01, y01) of the target vehicle corresponding to the lane centerline before the meeting of the reference vehicle and the target vehicle at a time n before the meeting.
[0098] Based on the distance d1 between the reference vehicle and the lane centerline at a time n before the reference vehicle and the target vehicle meet, the yaw angle hdg1 of the road where the reference vehicle is located at a time n before the meeting, and the coordinates of the lane centerline (x01, y01) before the meeting, the coordinates of the target vehicle (xn, yn) at a time n before the meeting are obtained.
[0099] If the reference vehicle and the target vehicle are in the same lane, then,
[0100] xn=x01+d1*sin(hdg1) Equation (8);
[0101] yn=y01-d1*cos(hdg1) Equation (IX);
[0102] If the reference vehicle and the target vehicle are in the opposite lane, then,
[0103] xn=x01-d1*sin(hdg1) Equation (x);
[0104] yn=y01+d1*cos(hdg1) Equation (XI);
[0105] The purpose of predicting the target vehicle's position some time before the reference vehicle and the target vehicle meet is to make the dynamic traffic flow modeling more realistic and to prevent the target vehicle from being stationary when the reference vehicle and the target vehicle meet.
[0106] Preferably, in another embodiment of this application, the step of "S210 adjusting the position error of the reference vehicle and the position error of the target vehicle respectively based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle" specifically includes the following steps:
[0107] Obtain the average speed of the benchmark vehicle every second over a period of time;
[0108] Obtain the average speed of the target vehicle every second over a given period of time.
[0109] Specifically, in this embodiment, the speeds of the reference vehicle and the target vehicle in the real scene often change. The radar data is collected frame by frame, and the speed is different in each frame. However, when performing dynamic traffic flow simulation modeling, the OpenScenario file format stipulates that speed can only be triggered by second, that is, only one speed can be given every second. Therefore, the simulated vehicle speed and target vehicle position will deviate from the real position. Therefore, the following method can be used to eliminate the error: Suppose that the speed of the reference vehicle changes from v1 to v2 from t1 seconds to (t1+1) seconds, and the distance traveled is s1. Then the average speed is v = s1 / 1. Take an average value every second and write this value into the OpenScenario file. After n seconds, the comparison error between the real scene and the reference vehicle's movement position will be very small. Similarly, the error elimination method for the target vehicle is the same as the error elimination method for the reference vehicle.
[0110] See also Figure 4 As shown, this embodiment of the invention also provides a road scene and dynamic traffic flow optimization system 100, including a target vehicle judgment module 110, an optimized dynamic traffic flow information module 120, a data file acquisition module 130, and a simulation model establishment module 140;
[0111] The target vehicle determination module 110 is used to obtain the road scene information where the reference vehicle is located, the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and to determine whether the vehicle to be tested is the target vehicle.
[0112] The optimized dynamic traffic flow information module 120 is communicatively connected to the target vehicle judgment module 110. It is used to predict and adjust the positional relationship between the reference vehicle and the target vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and to obtain the adjusted optimized dynamic traffic flow information.
[0113] The data file acquisition module 130 is communicatively connected to the target vehicle judgment module 110 and the optimized dynamic traffic flow information module 120, and is used to generate a road scene OpenDrive file based on the road scene information and a dynamic traffic flow OpenScenario file based on the optimized dynamic traffic flow information.
[0114] The simulation model building module 140 is communicatively connected to the data file acquisition module 130, and is used to build a traffic road simulation model based on the road scene OpenDrive file and the dynamic traffic flow OpenScenario file, and through simulation software.
[0115] The optimized dynamic traffic flow information module 120 is also used to: predict the orientation of the target vehicle relative to the reference vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle; predict the position of the target vehicle when the reference vehicle and the target vehicle meet; and predict the position of the target vehicle a period of time before the reference vehicle and the target vehicle meet based on the position of the target vehicle when the reference vehicle and the target vehicle meet; and adjust the position error of the reference vehicle and the position error of the target vehicle respectively.
[0116] By sharing and interacting in real time with the data sources—road scene information and dynamic traffic flow information—that generate OpenDrive and OpenScenario files, and optimizing the data source parameters, we can obtain adjusted and optimized dynamic traffic flow information. This makes the dynamic traffic flow on the road map more closely resemble the real scene when building traffic road simulation models, avoiding the need to manually rearrange the vehicle positions on the road, and improving the efficiency and accuracy of simulation work.
[0117] Specifically, this embodiment corresponds one-to-one with the above method embodiments. The functions of each module have been described in detail in the corresponding method embodiments, so they will not be repeated here.
[0118] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements all or part of the method steps of the above method.
[0119] The present invention can implement all or part of the processes in the above methods, or it can be accomplished by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0120] Based on the same inventive concept, embodiments of this application also provide an electronic device, including a memory and a processor. The memory stores a computer program that runs on the processor. When the processor executes the computer program, it implements all or part of the method steps described above.
[0121] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the computer device, connecting all parts of the computer device through various interfaces and lines.
[0122] Memory can be used to store computer programs and / or modules. The processor performs various functions of the computer device by running or executing the computer programs and / or modules stored in the memory, and by accessing data stored in the memory. Memory can primarily include a program storage area and a data storage area. The program storage area can store the operating system and at least one application program required for a function (e.g., sound playback, image playback, etc.); the data storage area can store data created based on the use of the mobile phone (e.g., audio data, video data, etc.). Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, SmartMedia Cards (SMC), Secure Digital (SD) cards, Flash Cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0123] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, servers, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0124] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), servers, and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0125] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0126] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0127] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for optimizing road scenarios and dynamic traffic flow, characterized in that, Includes the following steps: Obtain information about the road scene where the reference vehicle is located, as well as the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and determine whether the vehicle to be tested is the target vehicle. Based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, the positional relationship between the reference vehicle and the target vehicle is predicted and adjusted, and the adjusted optimized dynamic traffic flow information is obtained. A road scene OpenDrive file is generated based on the road scene information, and a dynamic traffic flow OpenScenario file is generated based on the optimized dynamic traffic flow information. Based on the OpenDrive file of the road scene and the OpenScenario file of the dynamic traffic flow, a traffic road simulation model is constructed using simulation software. The step of "predicting and adjusting the positional relationship between the reference vehicle and the target vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and obtaining the adjusted optimized dynamic traffic flow information" specifically includes the following steps: Based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle; Predict the orientation of the target vehicle relative to the reference vehicle; Predict the position of the target vehicle when the reference vehicle and the target vehicle meet; And based on the target vehicle's position when the reference vehicle and the target vehicle meet, predict the target vehicle's position some time before the reference vehicle and the target vehicle meet; Adjust the position errors of the reference vehicle and the target vehicle respectively; The step of "adjusting the position error of the reference vehicle and the position error of the target vehicle respectively" specifically includes the following steps: Obtain the average speed of the benchmark vehicle every second over a period of time; Obtain the average speed of the target vehicle every second over a period of time.
2. The road scenario and dynamic traffic flow optimization method as described in claim 1, characterized in that, The step of "obtaining the road scene information where the reference vehicle is located, and the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and determining whether the vehicle to be tested is the target vehicle" specifically includes the following steps: Obtain road scene information where the reference vehicle is located, and obtain initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested based on the road scene information; the initial dynamic traffic flow information includes: the distance between the lane position of the reference vehicle and the leftmost lane, the distance between the lane position of the reference vehicle and the rightmost lane, and the lateral distance between the vehicle and the vehicle to be tested. When the lateral distance between the current vehicle and the vehicle to be tested is greater than the distance between the lane where the reference vehicle is located and the rightmost lane, and less than the distance between the lane where the reference vehicle is located and the leftmost lane, then the vehicle to be tested is the target vehicle and is set in the road scene where the reference vehicle is located. Otherwise, the vehicle under test is not the target vehicle and is not set in the road scenario where the reference vehicle is located.
3. The road scenario and dynamic traffic flow optimization method as described in claim 1, characterized in that, The step of "predicting the orientation of the target vehicle relative to the reference vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle" specifically includes the following steps: Based on the lateral distance between the reference vehicle and the target vehicle, and the distance between the reference vehicle and the lane centerline; If the lateral distance between the reference vehicle and the target vehicle is less than the distance between the reference vehicle and the center line of the lane, then the reference vehicle and the target vehicle are facing the same direction. Otherwise, the reference vehicle and the target vehicle are facing opposite directions.
4. The road scenario and dynamic traffic flow optimization method as described in claim 1, characterized in that, The step of "predicting the position of the target vehicle when the reference vehicle and the target vehicle meet based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle" specifically includes the following steps: Based on the distance traveled by the reference vehicle and the coordinates of the reference vehicle on the center line of the lane, a center line coordinate distance mapping table is generated in chronological order. Based on the distance traveled by the reference vehicle when it meets the target vehicle, and the centerline coordinate distance mapping table, obtain the centerline coordinates of the reference vehicle on the lane centerline when it meets the target vehicle. Based on the distance between the reference vehicle and the center line of the lane when the reference vehicle meets the target vehicle, the yaw angle of the road where the reference vehicle is located when the two vehicles meet, and the coordinates of the center line of the lane where the two vehicles meet, the coordinates of the reference vehicle when the two vehicles meet are obtained. Based on the relative horizontal and vertical coordinates of the reference vehicle and the target vehicle, and the coordinates of the reference vehicle, the coordinates of the target vehicle when the reference vehicle and the target vehicle meet are obtained.
5. The road scenario and dynamic traffic flow optimization method as described in claim 4, characterized in that, The step of "predicting the target vehicle's position a certain period before the encounter between the reference vehicle and the target vehicle based on the road scene information, the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and the target vehicle's position when the reference vehicle and the target vehicle meet" specifically includes the following steps: Based on the target vehicle's coordinates when the reference vehicle and the target vehicle meet, and the centerline coordinate distance mapping table, obtain the target vehicle's travel distance when the reference vehicle and the target vehicle meet. Based on the relative speed of the target vehicle, the speed of the reference vehicle, and the distance traveled by the target vehicle when the reference vehicle and the target vehicle meet, obtain the distance traveled by the target vehicle in the period of time before the reference vehicle and the target vehicle meet. Based on the distance traveled by the target vehicle some time before the reference vehicle and the target vehicle meet, and the centerline coordinate distance mapping table, obtain the centerline coordinates of the target vehicle corresponding to the lane centerline before the reference vehicle and the target vehicle meet. Based on the distance between the reference vehicle and the lane centerline some time before the reference vehicle and the target vehicle meet, the yaw angle of the road where the reference vehicle is located some time before the meeting, and the coordinates of the lane centerline before the meeting, the coordinates of the reference vehicle and the target vehicle some time before the meeting are obtained.
6. A road scenario and dynamic traffic flow optimization system, characterized in that, include: The target vehicle determination module is used to obtain the road scene information where the reference vehicle is located, as well as the initial dynamic traffic flow information between the reference vehicle and the vehicle to be tested, and to determine whether the vehicle to be tested is the target vehicle. The optimized dynamic traffic flow information module is communicatively connected to the target vehicle judgment module. It is used to predict and adjust the positional relationship between the reference vehicle and the target vehicle based on the road scene information and the effective dynamic traffic flow information between the reference vehicle and the target vehicle, and to obtain the adjusted optimized dynamic traffic flow information. The data file acquisition module is communicatively connected to the target vehicle judgment module and the optimized dynamic traffic flow information module, and is used to generate a road scene OpenDrive file based on the road scene information and a dynamic traffic flow OpenScenario file based on the optimized dynamic traffic flow information. The simulation model building module is communicatively connected to the data file acquisition module and is used to build a traffic road simulation model based on the road scene OpenDrive file and the dynamic traffic flow OpenScenario file, and through simulation software. The optimized dynamic traffic flow information module is used to calculate the effective dynamic traffic flow information between the reference vehicle and the target vehicle based on the road scene information. Predict the orientation of the target vehicle relative to the reference vehicle; Predict the position of the target vehicle when the reference vehicle and the target vehicle meet; and based on the position of the target vehicle when the reference vehicle and the target vehicle meet, predict the position of the target vehicle some time before the meeting; and adjust the position error of the reference vehicle and the position error of the target vehicle respectively. The step of "adjusting the position error of the reference vehicle and the position error of the target vehicle respectively" specifically includes the following steps: Obtain the average speed of the benchmark vehicle every second over a period of time; Obtain the average speed of the target vehicle every second over a period of time.
7. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the road scene and dynamic traffic flow optimization method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Simulation method and system of a vehicle road virtual scene
CN109657355A
Traffic flow simulation scene construction method and system based on real data
CN114117739A