Vehicle driving simulation method, device, electronic device and storage medium
By obtaining map data in the autonomous driving simulator, generating multiple driving paths and filtering out excellent quality paths, the problem of single driving routes in the prior art is solved, and a more complex and safe driving simulation is achieved.
Patent Information
- Application Number
- CN202210600799.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-30
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2042-05-30
AI Technical Summary
The existing autonomous driving simulators are too single when simulating vehicle driving routes and cannot meet the simulation needs of complex driving scenarios.
By acquiring map data of the simulated driving environment, a first driving path of at least one simulated vehicle in the travelable area is determined and a plurality of second driving paths similar to the path is generated. The first target driving path that meets the quality requirements is selected through the quality evaluation information, and the simulated vehicle is controlled to drive on the path.
It enriches the simulated lines of simulated vehicles in the feasible area, improves the path quality, enhances the simulation effect, and ensures the driving safety of autonomous driving vehicles.
Smart Images

Figure CN114987540B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of control technology, and in particular to a vehicle driving simulation method, device, electronic device and storage medium. Background Art
[0002] Autonomous driving technology can improve the safety of vehicles on the road, effectively alleviate traffic pressure, and lower the threshold for driving. Simulation is an indispensable part of verifying autonomous driving technology. Simulation can simulate various problems encountered by vehicles during driving, allowing vehicles to respond promptly and accurately. In the prior art, the simulation of vehicles can be completed through autonomous driving simulators. However, the driving routes planned by existing autonomous driving simulators for simulated vehicles are relatively simple. Therefore, for complex driving scenarios in real scenes, existing autonomous driving simulators cannot meet the simulation needs of users. Summary of the invention
[0003] The embodiments of the present disclosure at least provide a vehicle driving simulation method, device, electronic device and storage medium.
[0004] In a first aspect, an embodiment of the present disclosure provides a vehicle driving simulation method, comprising: acquiring map data of a simulated driving environment; wherein the map data is used to indicate the area boundaries of a drivable area and / or the boundaries of obstacles in the simulated driving environment; determining a first driving path of at least one simulated vehicle within the drivable area based on the map data; generating a plurality of second driving paths based on the first driving path, and determining quality evaluation information of each of the second driving paths; wherein the similarity between the second driving path and the first driving path meets a preset similarity requirement; determining a first target driving path among the plurality of second driving paths whose quality evaluation information meets the quality requirement, and controlling each of the simulated vehicles to drive on the first target driving path.
[0005] In an optional embodiment, generating multiple second driving paths based on the first driving path includes: optimizing the first driving path to obtain a target optimized path; wherein the path quality of the target optimized path is greater than or equal to the path quality of the first driving path; generating multiple new path key points based on the path key points of the first driving path; and generating the multiple second driving paths using the target optimized path and the multiple new path key points.
[0006] In an optional embodiment, the method of generating the multiple second driving paths using the target optimized path and the multiple new path key points includes: determining a curve function of the path curve corresponding to the target optimized path; using the curve function as a target fitness function, and screening target path key points that meet path combination requirements from the multiple new path key points based on the target fitness function; and generating the multiple second driving paths based on the target path key points.
[0007] In an optional embodiment, there are multiple first driving paths, and optimizing the first driving paths to obtain a target optimized path includes: determining a target driving area in the drivable area; wherein the target driving area is the drivable area where the path starting point and the path end point of the first driving path are located; determining multiple sub-areas of the target driving area; calculating the key point average of the path key points located in each of the sub-areas among the path key points of each of the first driving paths to obtain multiple average key points; performing curve fitting on the multiple average key points to obtain a curve fitting result, and determining the curve fitting result as the target optimized path.
[0008] In an optional embodiment, determining the quality evaluation information of each second driving path includes: obtaining a target optimized path of the first driving path; wherein the path quality of the target optimized path is greater than or equal to the path quality of the first driving path; determining the path similarity between each second driving path and the target optimized path, and determining the path similarity as the quality evaluation information, wherein the path similarity is used to indicate the path smoothness and / or path deviation of the corresponding second driving path.
[0009] In an optional embodiment, determining the quality evaluation information of each of the second driving paths includes: determining a target vector based on adjacent path key points located on the same second driving path to obtain multiple target vectors; wherein the direction of each of the target vectors is associated with the forward direction of the second driving path; determining a vector angle between adjacent target vectors among the multiple target vectors, and determining the quality evaluation information based on the vector angle.
[0010] In an optional embodiment, the method also includes: in the process of controlling each of the simulated vehicles to travel on the first target driving path, detecting obstacles on the first target driving path along the driving direction of each of the simulated vehicles; in response to detecting the obstacle, determining a new path starting point of the simulated vehicle; determining a third driving path of the simulated vehicle within the drivable area based on the new path starting point, the path end point of the simulated vehicle and the map data; regenerating multiple fourth driving paths based on the third driving path, and determining quality evaluation information of each of the fourth driving paths; determining a second target driving path whose quality evaluation information meets the evaluation requirements among the multiple fourth driving paths, and controlling the simulated vehicle to travel on the second target driving path.
[0011] In an optional embodiment, controlling the simulated vehicle to travel on the second target driving path includes: determining simulated driving parameters of the simulated vehicle on the second target driving path, wherein the simulated driving parameters are used to indicate the driving speed and / or driving direction of the simulated vehicle at each key point of the path; and controlling the simulated vehicle to travel on the second target driving path based on the simulated driving parameters.
[0012] In an optional embodiment, determining a first driving path of at least one simulated vehicle within the drivable area based on the map data includes: determining a path starting point and a path end point within the drivable area, and establishing a target search tree based on the path starting point and the path end point, wherein the target search tree includes a plurality of search nodes, and the plurality of search nodes include the path starting point and the path end point; and determining at least one path from the path starting point to the path end point in the target search tree as the first driving path.
[0013] In a second aspect, an embodiment of the present disclosure provides a vehicle driving simulation device, comprising: an acquisition unit, used to acquire map data of a simulated driving environment; wherein the map data is used to indicate the area boundaries of a drivable area and / or the boundaries of obstacles in the simulated driving environment; a first determination unit, used to determine a first driving path of at least one simulated vehicle within the drivable area based on the map data; wherein the similarity between the second driving path and the first driving path meets a preset similarity requirement; a generation unit, used to generate a plurality of second driving paths based on the first driving path; a second determination unit, used to determine quality evaluation information of each of the second driving paths; a third determination unit, used to determine a first target driving path whose quality evaluation information meets quality requirements among the plurality of second driving paths; and a control unit, used to control each of the simulated vehicles to drive on the first target driving path.
[0014] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.
[0015] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.
[0016] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0018] Figure 1 A flow chart of a vehicle driving simulation method provided by an embodiment of the present disclosure is shown;
[0019] FIG. 2( a ) shows a schematic diagram of initial map data provided by an embodiment of the present disclosure before being discretized;
[0020] FIG2( b ) shows a schematic diagram of initial map data after discretization processing provided by an embodiment of the present disclosure;
[0021] Figure 3 A schematic diagram showing key points of a first driving path provided by an embodiment of the present disclosure is shown;
[0022] Figure 4 A schematic diagram showing a target optimization path provided by an embodiment of the present disclosure within a drivable area;
[0023] Figure 5 A schematic diagram showing a display of a key point of a new path obtained by cross-mutation in a drivable area provided by an embodiment of the present disclosure is shown;
[0024] Figure 6 A schematic diagram of a first target driving path after screening provided by an embodiment of the present disclosure is shown;
[0025] Figure 7 A schematic diagram of a target vector in a second driving path provided by an embodiment of the present disclosure is shown;
[0026] Figure 8 A schematic diagram showing the positional relationship between a simulated vehicle and an obstacle before obstacle avoidance provided by an embodiment of the present disclosure is shown;
[0027] Fig. 9 A schematic diagram showing the positional relationship between a simulated vehicle and an obstacle after obstacle avoidance provided by an embodiment of the present disclosure is shown;
[0028] Fig.10 A schematic diagram of a vehicle driving simulation device provided by an embodiment of the present disclosure is shown;
[0029] Fig.11 A schematic diagram of an electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0031] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0032] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0033] Research has found that autonomous driving technology can improve the safety of vehicles on the road, effectively alleviate traffic pressure, and lower the threshold for driving. Simulation is an indispensable part of verifying autonomous driving technology. Simulation can simulate various problems encountered by vehicles during driving, allowing vehicles to respond promptly and accurately. In the prior art, vehicle simulation can be completed through an autonomous driving simulator. However, the driving routes planned by the existing autonomous driving simulator for simulating vehicles are relatively simple. Therefore, for complex driving scenarios in real scenes, the existing autonomous driving simulators cannot meet the simulation needs of users.
[0034] Based on the above research, the present disclosure provides a vehicle driving simulation method, device, electronic device and storage medium. In an embodiment of the present disclosure, after acquiring the map data of the simulated driving environment, a first driving path of at least one simulated vehicle in a drivable area can be determined based on the map data, and multiple second driving paths similar to the first driving path can be generated. Through this processing method, the simulated routes of the simulated vehicle in the drivable area can be enriched. Afterwards, the quality evaluation information of each second driving path can be determined, so as to determine a first target driving path that meets the quality requirements among the multiple second driving paths based on the quality evaluation information. By scoring each second driving path, the path quality of the first target driving path can be improved to improve the simulation effect of the simulated vehicle and ensure the driving safety of the autonomous driving vehicle.
[0035] To facilitate understanding of this embodiment, a vehicle driving simulation method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the vehicle driving simulation method provided in the embodiment of the present disclosure is generally an electronic device with certain computing capabilities. In some possible implementations, the vehicle driving simulation method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0036] See also Figure 1 FIG. 1 is a flow chart of a vehicle driving simulation method provided by an embodiment of the present disclosure, wherein the method comprises steps S101 to S107, wherein:
[0037] S101: Acquire map data of a simulated driving environment; wherein the map data is used to indicate the area boundary of a drivable area and / or the boundary of an obstacle in the simulated driving environment.
[0038] In the disclosed embodiment, the map data may include a plurality of continuous discrete points, wherein the plurality of continuous discrete points are discrete points for indicating the regional boundary of the drivable area, and may also be discrete points for indicating the object contour of obstacles (i.e., the boundary of obstacles) in the simulated driving environment. For example, the map data may be data as shown in FIG2(b), wherein the map data as shown in FIG2(b) may be data obtained after discretization processing based on the initial map data as shown in FIG2(a). As can be seen from FIG2(b), the map data includes the regional boundary of the drivable area.
[0039] S103: Determine a first driving path of at least one simulated vehicle within the drivable area based on the map data.
[0040] In an embodiment of the present disclosure, a plurality of simulated vehicles may be provided, and at least one first driving path may be determined for each simulated vehicle within a drivable area. Corresponding simulated roles may be provided for the plurality of simulated vehicles, for example, the simulated roles may be the vehicle itself and other vehicles. Here, the manner of determining at least one first driving path for simulated vehicles belonging to different simulated roles may be the same or different, and the first driving paths determined for different simulated vehicles may partially overlap or completely overlap, and the present disclosure does not specifically limit this.
[0041] In specific implementation, the first driving path of each simulated vehicle may be determined by a rapidly-exploring random trees (RRT) path planning algorithm. In addition, the first driving path of each simulated vehicle may also be determined by other methods.
[0042] S105: Generate multiple second driving paths based on the first driving path, and determine quality evaluation information of each of the second driving paths; wherein the similarity between the second driving path and the first driving path meets a preset similarity requirement.
[0043] In the disclosed embodiment, the first driving path information can be processed based on a genetic algorithm, so as to derive more driving paths, that is, multiple second driving paths, based on the first driving path. Here, multiple second driving paths can be derived from at least one first driving path of each simulated vehicle; wherein the number of multiple second driving paths derived from the simulated vehicle can be determined based on the simulated role of each simulated vehicle, for example, the number of second driving paths derived from different simulated roles can be different. For example, more second driving paths can be derived for the vehicle itself, and fewer second driving paths can be derived for other vehicles.
[0044] In a specific implementation, for each simulated vehicle, an optimal path of at least one first driving path of the simulated vehicle can be determined, wherein the path quality of the optimal path is higher than that of the first driving path. Here, the path quality can be represented by the following quality parameters: path smoothness and / or path deviation. After the optimal path is determined, the optimal path can be used as guidance information to derive multiple second driving paths through the guidance information. The multiple second driving paths derived under the guidance of the optimal path have better path quality, so that a driving path that better meets the simulation requirements can be obtained.
[0045] S107: Determine a first target driving path whose quality evaluation information meets the quality requirements among the plurality of second driving paths, and control each of the simulated vehicles to drive on the first target driving path.
[0046] After deriving multiple second driving paths, the quality evaluation information of each second driving path can be determined, wherein the quality evaluation information can include sub-information corresponding to multiple dimensions, for example, the sub-information can include: the similarity between each second driving path and the above-mentioned optimal path, and / or the vector angle between adjacent target vectors in the forward direction of the same second driving path. Here, it can be considered that the higher the similarity between the second driving path and the optimal path, the higher the path quality of the second driving path, and the higher the probability that the second driving path is selected as the first target driving path. Similarly, it can be considered that the larger the above-mentioned vector angle, the lower the path smoothness of the second driving path, and the lower the probability that the second driving path is selected as the first target driving path.
[0047] In the embodiment of the present disclosure, corresponding sub-quality requirements can be set for each dimension of sub-information in the quality evaluation information. If the sub-information of each dimension meets the corresponding sub-quality requirements, the second driving path can be determined to be the first target driving path.
[0048] In the disclosed embodiment, a corresponding dimension weight may be set for each dimension in the quality evaluation information, and then the dimension weight and the sub-information are weighted and summed to obtain a weighted sum result. When it is determined that the weighted sum result meets the quality requirements, the second driving path may be determined to be the first target driving path.
[0049] In an embodiment of the present disclosure, after acquiring the map data of the simulated driving environment, a first driving path of at least one simulated vehicle within a drivable area can be determined based on the map data, and multiple second driving paths similar to the first driving path can be generated. Through this processing method, the simulated routes of the simulated vehicle within the drivable area can be enriched. Afterwards, the quality evaluation information of each second driving path can be determined, and then a first target driving path that meets the quality requirements can be determined among the multiple second driving paths based on the quality evaluation information. By scoring each second driving path, the path quality of the first target driving path can be improved to improve the simulation effect of the simulated vehicle and ensure the driving safety of the autonomous driving vehicle.
[0050] The above steps S101 to S107 will be described in detail below in conjunction with a specific implementation method.
[0051] In the disclosed embodiment, an autonomous driving simulation file (e.g., an openscenario file) may be obtained, or a file in another format for describing road information may be obtained. The autonomous driving simulation file includes simulation area and test scenario information. At this point, the user may also add new test scenario information or modify the original test scenario information in the simulation area. For example, a traffic light may be added to the simulation area, and a traffic light change rule may be set.
[0052] After obtaining the autonomous driving simulation file, the autonomous driving simulation file can be parsed to obtain two-dimensional map data, that is, map data containing the above-mentioned simulation area. Next, the simulation area can be discretized using the differential equation method to obtain map data containing multiple discrete points. By discretizing the simulation area, the road boundaries and obstacle contours in the simulation area can be represented as continuous discrete points.
[0053] For the straight line part in the two-dimensional map data, discretization can be performed in the following ways:
[0054]
[0055] Here, dx and dy are the derivatives of the starting point x and y, s is the length of the line segment from the starting point, and hdg is the angle of the line. The above formula can be expressed as: given the starting point (x, y), the angle of the line hdg, and the length of the line segment s from the starting point, calculate dx and dy relative to the starting point, and thus obtain the x / y coordinates corresponding to the corresponding length.
[0056] For the straight line part in the two-dimensional map data, discretization can be performed in the following ways:
[0057]
[0058] Among them, H represents the angle of the curve's forward direction, hdg is the curve angle, c is the curvature, a is the length from the point to the center of curvature, α is the angle, and dx and dy are the derivatives of x and y at the point. As shown in Figure 2(a), it is a solid road. After the formula is analyzed, multiple continuous discrete points can be obtained. Since gaps are easily formed during curve detection, the continuous points of curves with larger curvatures are set more densely, and the effect is shown in Figure 2(b).
[0059] In addition, the coordinates of the road boundary and obstacle contour in the two-dimensional map data can be obtained from the two-dimensional map data by using clustering.
[0060] After the map data is acquired in the manner described above, a first driving path within the drivable area of at least one simulated vehicle may be determined based on the map data.
[0061] In an optional implementation, the above step S103 specifically includes the following steps:
[0062] Step S1031: determining a path start point and a path end point in the drivable area, and establishing a target search tree based on the path start point and the path end point, wherein the target search tree includes a plurality of search nodes, and the plurality of search nodes include the path start point and the path end point;
[0063] Step S1032: Determine in the target search tree at least one path from the path starting point to the path ending point as the first driving path.
[0064] In the disclosed embodiment, the path starting point and path ending point (ie, path start and end points) of each simulated vehicle may first be determined within the drivable area, wherein the path starting and end points of different simulated vehicles may be the same or different.
[0065] Next, we can search the drivable area based on the path start point and the path end point to obtain a target search tree, where the target search tree contains multiple search nodes, and the multiple search nodes are connected in the search order. The following is a brief introduction to the search process of the target search tree:
[0066] First, a random point A1 is randomly selected in the drivable area, and then a search node A2 that is closest to the random point A1 is selected in the searched random tree; a new node A3 is obtained by extending a distance from the search node A2 to the random point A1. After that, a collision detection can be performed on the new node A3. If it is determined that the new node A3 collides with multiple continuous discrete points used to represent the boundary in the map data, the current growth is abandoned, otherwise the new node is added to the random tree as a new search node.
[0067] In specific implementation, the collision detection of the new node A3 can be performed by the collision condition described by the following formula:
[0068] Wherein, x0 and y0 represent the coordinates of a plurality of continuous discrete points used to represent the boundary in the map data, and r represents a preset constant. Here, the new node A3 can be compared with each discrete point according to the above collision condition, and when it is determined that the new node A3 satisfies the above collision condition, the new node A3 can be added to the random tree as a new search node.
[0069] When it is determined that the searched random tree satisfies the stop search condition, the searched random tree is determined as the target search tree, wherein satisfying the stop search condition can be understood as: searching from the path starting point to the path end point, or, understood as, the search node in the searched random tree already includes the path starting point and the path end point.
[0070] After the target search tree is established, at least one path from the path starting point to the path ending point can be determined in the target search tree as the first driving path. For example, Figure 3 As shown, the search node located on the first driving path within the boundary of the drivable area is the path key point of the above-mentioned first driving path.
[0071] In the above implementation, by using a fast random search tree algorithm to search for at least one first driving path for each simulated vehicle in the drivable area, the first driving path can be quickly determined for each simulated vehicle in the drivable area to improve the simulation efficiency of the vehicle driving simulation.
[0072] In an optional implementation, the step S105 generates a plurality of second driving paths based on the first driving path, and specifically includes the following steps:
[0073] Step S1051: optimizing the first driving path to obtain a target optimized path; wherein the path quality of the target optimized path is greater than or equal to the path quality of the first driving path;
[0074] Step S1052: generating a plurality of new path key points based on the path key points of the first driving path;
[0075] Step S1053: Generate the multiple second driving paths using the target optimized path and the multiple new path key points.
[0076] In the embodiment of the present disclosure, the first driving path of each simulated vehicle can be optimized to obtain the optimal path of the first driving path, that is, the above-mentioned target optimized path, for example. Figure 4 The diagram shown is a schematic diagram of the target optimized path within the drivable area. Afterwards, the key points of the path of the first driving path can be used as basic data through a genetic algorithm, and the basic data can be cross-mutated by the genetic algorithm to obtain new path key points. Next, the target optimized path can be used to screen multiple new path key points to obtain the screened new path key points.
[0077] Here, the path quality is represented by the following quality parameters: path smoothness and / or path deviation. The path smoothness of each driving path can be determined by a path smoothing algorithm, and the path deviation is used to indicate the deflection angle of the driving path relative to the area boundary of the drivable area.
[0078] like Figure 5 The figure shows the schematic diagram of the key points of the new path obtained by cross mutation in the drivable area. Figure 5 As can be seen from , after crossover mutation, many new discrete points (i.e., new path key points) appear, but the new discrete points may not meet the requirements. For example, Figure 5 As shown in the figure, it can be seen that some discrete points are outside the drivable area, or the turning radius of some discrete points is too large. Therefore, it is necessary to further screen the new discrete points. Here, the new discrete points can be further screened based on the target optimization path to obtain the key points of the screened new path. After that, a new driving path can be generated based on the key points of the screened new path through a genetic algorithm, that is, multiple second driving paths.
[0079] In an optional implementation, when there are multiple first driving paths, the step S1051 above optimizes the first driving paths to obtain a target optimized path, which specifically includes the following process:
[0080] Step S11: determining a target driving area in the driving area; wherein the target driving area is a driving area where a starting point and an end point of the first driving path are located;
[0081] Step S12: determining a plurality of sub-areas of the target driving area;
[0082] Step S13: calculating the key point average of the key points of the first driving paths located in each of the sub-areas, to obtain a plurality of average key points;
[0083] Step S14: performing curve fitting on the multiple average key points to obtain a curve fitting result, and determining the curve fitting result as the target optimization path.
[0084] In the embodiment of the present disclosure, the area where the first driving path is located can be first determined in the drivable area, that is, the target driving area. In specific implementation, the area where at least one first driving area of each simulated vehicle is located can be determined. Afterwards, the target driving area can be divided into a plurality of continuous sub-areas, which can be rectangular areas or circular areas, and the present disclosure does not specifically limit this. For example, Figure 3 As shown, the lane area where the first driving path is located can be determined as the target driving area, and the lane area can be divided into a plurality of continuous sub-areas.
[0085] Next, the key points of each first driving path in each sub-area can be determined, and then the average of the key points of each sub-area can be calculated to obtain the average key points. For each sub-area, at least one average key point can be calculated, and the number of average key points corresponding to each sub-area can be preset by the user, which is not specifically limited in the present disclosure.
[0086] After obtaining multiple average key points, a cubic spline fitting algorithm can be used to perform curve fitting on the multiple average key points to obtain a target optimization path. For example, Figure 4 The target optimization path shown, specifically, the formula of the cubic spline fitting algorithm can be described as:
[0087]
[0088] Among them, [a,b] is the starting point and end point of the target optimization path, a3, a2, a, a0 are unknown coefficients, x is the horizontal coordinate, x i is the horizontal coordinate of each average key point, y i is the ordinate of each average keypoint.
[0089] Here, in addition to using the cubic spline fitting algorithm to perform curve fitting on multiple average key points, other high-order curves can also be used to perform curve fitting on multiple average key points. The present disclosure does not specifically limit the specific fitting algorithm, which is subject to achievable implementation.
[0090] In an optional implementation, the step S1053 generates the plurality of second driving paths using the target optimized path and the plurality of new path key points, specifically comprising the following steps:
[0091] Step S21: determining a curve function of a path curve corresponding to the target optimization path;
[0092] Step S22: using the curve function as a target fitness function, and selecting target path key points that meet the path combination requirements from the multiple new path key points based on the target fitness function;
[0093] Step S23: generating the plurality of second driving paths based on the target path key points.
[0094] In the disclosed embodiment, the cubic spline fitting function obtained in the above process can be obtained, that is, the curve function of the path curve corresponding to the target optimization path. Then, the cubic spline fitting function is used as the target fitness function, and the path key points of the first driving path are used as basic data to obtain new path key points through cross-mutation.
[0095] Afterwards, the multiple new path key points can be screened based on the target fitness function, so as to retain the key points that meet the requirements, namely the target path key points. Afterwards, the target path key points can be combined into a new driving path through a genetic algorithm, so as to determine the new driving path as the second driving path.
[0096] In the above implementation manner, the method of generating multiple second driving paths by using a genetic algorithm can improve the path planning efficiency of the simulated vehicle, so that the second driving path with richer routes can be determined more quickly.
[0097] In an optional implementation, the above step S105 determines the quality evaluation information of each second driving path, specifically comprising the following steps:
[0098] Step S1054: acquiring a target optimized path of the first driving path; wherein the path quality of the target optimized path is greater than or equal to the path quality of the first driving path;
[0099] Step S1055: Determine the path similarity between each of the second driving paths and the target optimized path, and determine the path similarity as the quality evaluation information, wherein the path similarity is used to indicate the path smoothness and / or path deviation of the corresponding second driving path.
[0100] In the disclosed embodiment, after obtaining multiple second driving paths for each simulated vehicle, each second driving path can be scored to obtain quality evaluation information for each second driving path, so as to screen out a path that meets the quality requirements from the multiple second driving paths as the first target driving path through the quality evaluation information.
[0101] After the target optimized path of the first driving path is acquired, the path difference between each second driving path and the target optimized path may be determined, and then the path difference may be determined as the above-mentioned path similarity.
[0102] It can be understood that the smaller the path gap is, the higher the path similarity between the second driving path and the target optimized path is; conversely, the larger the path gap is, the lower the path similarity between the second driving path and the target optimized path is. Since the target optimized path is the optimal path determined based on the first driving path, the path smoothness of the first driving path is the optimal smoothness, and the path deviation is the optimal deviation. At this time, the path gap can be used to determine the difference between the path smoothness of the second driving path and the optimal smoothness, and / or the difference between the path deviation of the second driving path and the optimal deviation.
[0103] Here, the path difference may be determined based on a coordinate difference between the coordinates of each path key point in the first driving path and the coordinates of each path key point in the target optimized path.
[0104] In an optional implementation, a Q learning algorithm may be used to determine the path similarity between the second driving path and the target optimized path, so as to score the deviation degree of the second driving path in a straight line and the smoothness degree in a curve according to the path similarity, and the scoring calculation method includes:
[0105]
[0106] In the above formula, Q(s,a) on the left side of “←” represents the updated Q value, Q(s,a) on the back side of “←” represents the previous Q value, r is the reward value, α is the weight coefficient, a is the learning rate, and γ is the discount factor. is the maximum Q value.
[0107] Here, in combination with the above-mentioned determination process of the quality evaluation information of each second driving path, represents the coordinates of each key point in the above target optimization path (equivalent to the coordinates of the key points in the standard driving path), Q(s,a) located on the back of “←” represents the coordinates of each key point in the second driving path, and Q(s,a) located on the left side of “←” in the formula can be understood as quality evaluation information, which is used to characterize the path similarity between the second driving path and the target optimization path. Among them, the smaller the Q(s,a) located on the left side of “←” in the formula, the smaller the path difference between the second driving path and the target optimization path.
[0108] like Figure 6 The diagram shown is a schematic diagram of the first target driving path after screening, such as Figure 6 As shown, relative to Figure 5 The schematic diagram shown, Figure 6The new path key points that do not meet the path combination requirements are filtered out, leaving the path key points that can be used as alternative paths (i.e., the target path key points mentioned above); then the points with better performance are selected and connected to form the vehicle driving path, i.e., multiple second driving paths. The first target driving path is determined from the multiple second driving paths according to the quality evaluation information, wherein the specific selection principle can be described as follows: the second driving path with high quality evaluation information is closer to the approximate optimal path, and the second driving path with low quality evaluation information has a greater probability of sudden conditions, and the gap between it and the optimal path is also greater.
[0109] In the above implementation, the quality evaluation information of each second driving path can be determined more accurately, so that the first target driving path that meets the quality requirements can be screened out more accurately from multiple second driving paths, thereby improving the authenticity of the vehicle driving simulation.
[0110] In an optional implementation, the above step S105 determines the quality evaluation information of each second driving path, specifically comprising the following steps:
[0111] Step S1056: determining a target vector based on adjacent path key points located on the same second driving path, and obtaining a plurality of target vectors; wherein the direction of each target vector is associated with the forward direction of the second driving path;
[0112] Step S1057: Determine the vector angle between adjacent target vectors in the multiple target vectors, and determine the quality evaluation information based on the vector angle.
[0113] In the embodiment of the present disclosure, in addition to determining the quality evaluation information by the above method of determining the path similarity, the quality evaluation information may also be determined by the method described in the above step S1056 and step S1057.
[0114] Specifically, the vector angle between adjacent target vectors in the same second driving path can be determined. If the vector angle meets the preset angle requirement, for example, it is less than or equal to the preset angle, then the second driving path is determined to meet the quality requirement; otherwise, the second driving path is determined to not meet the quality requirement. The target vector in the second driving path can be a vector determined by adjacent path key points in all path key points of the second driving path, and the direction of the target vector is associated with the forward direction of the simulated vehicle in the second driving path. For example, Figure 7 As shown, the direction of the target vector can be the next path key point pointing from the current path key point to the forward direction.
[0115] Here, the vector angle between adjacent target vectors can be calculated by the following formula:
[0116]
[0117] Among them, θ is the vector angle between adjacent target vectors, (x1, y1) is the coordinate of the first vector, and (x2, y2) is the coordinate of the next vector of the first vector.
[0118] In the above implementation, by setting the vector angle between adjacent vectors in the forward direction to determine the quality evaluation information of the second driving path, sharp turns of the path can be avoided, thereby making the obtained path smoother.
[0119] In an optional embodiment, Figure 1 Based on the described embodiment, the method provided in the embodiment of the present disclosure further includes the following steps:
[0120] Step S108: in the process of controlling each of the simulated vehicles to travel on the first target travel path, detecting obstacles on the first target travel path along the travel direction of each of the simulated vehicles;
[0121] Step S109: In response to detecting an obstacle, determining a new path starting point of the simulated vehicle;
[0122] Step S110: determining a third driving path of the simulated vehicle within the drivable area based on the new path starting point, the path end point of the simulated vehicle and the map data;
[0123] Step S111: regenerating a plurality of fourth driving paths based on the third driving path, and determining quality evaluation information of each of the fourth driving paths;
[0124] Step S112: determining a second target driving path among the plurality of fourth driving paths whose quality evaluation information meets the evaluation requirements, and controlling the simulated vehicle to drive on the second target driving path.
[0125] In the disclosed embodiment, after the first target driving path is determined, the driving behavior of the simulated vehicle in the first target driving path can be simulated in the simulator. At this time, the vehicle driving behavior data set by the user in the simulator can be detected, and the moving direction and moving speed of each key point of the simulated vehicle in the first target driving path can be determined.
[0126] When the simulated vehicle encounters an obstacle (e.g., another vehicle) while traveling in the forward direction of the first target driving path, a path start point and a path end point may be re-determined for the simulated vehicle, and a third driving path within the drivable area of the simulated vehicle may be determined based on the new path start point, the path end point of the simulated vehicle, and the map data, for example. Figure 8As shown, if the obstacle is in the path pre-planned by the simulated vehicle and within a certain distance ahead, and the speed of the obstacle is less than the speed of the simulated vehicle, the simulated vehicle needs to re-plan a path in order to avoid the occupied area.
[0127] Here, the process of determining the third driving path is the same as the process of determining the first driving path described above, and will not be described in detail here.
[0128] After the third driving path is determined, a derivative path of the third driving path may be determined by a genetic algorithm, thereby obtaining a plurality of fourth driving paths.
[0129] Here, the process of determining the derivative path of the third driving path by genetic algorithm is the same as the process of determining the derivative path of the first driving path (ie, multiple second driving paths) by genetic algorithm in the above embodiment, and will not be described in detail here.
[0130] After determining multiple fourth driving paths, quality evaluation information of each fourth driving path may be determined. Here, the process of determining the quality evaluation information of each fourth driving path is the same as the process of determining the quality evaluation information of each second driving path, and will not be described in detail here.
[0131] Finally, a second target driving path can be determined from among a plurality of fourth driving paths based on the quality evaluation information in the fourth driving path, and the simulated vehicle can be controlled to drive on the second target driving path.
[0132] In the process of controlling the simulated vehicle to travel on the second target driving path, if no obstacle is detected on the second target driving path in the driving direction of each simulated vehicle, the simulated vehicle can be controlled to return to the first target driving path, for example, Fig. 9 Otherwise, the above steps S109 to S112 are repeatedly executed until no obstacle is detected. Therefore, in the embodiment of the present disclosure, the second target driving path can also be called an obstacle avoidance path.
[0133] In an optional implementation, the above step S112 controls the simulated vehicle to travel on the second target driving path, and specifically includes the following steps:
[0134] Step S1121, determining the simulated driving parameters of the simulated vehicle on the second target driving path, wherein the simulated driving parameters are used to indicate the driving speed and driving direction of the simulated vehicle at each key point of the path;
[0135] Step S1122: Control the simulated vehicle to travel on the second target driving path based on the simulated driving parameters.
[0136] In the embodiment of the present disclosure, after the second target driving path is determined, it is necessary to set corresponding simulation driving parameters for each key point of the second target driving path. Here, the simulation driving parameters can be calculated by the following formula:
[0137]
[0138]
[0139]
[0140] v i =ρ kp ×ρ i
[0141] ω i =α kp ×α i +β kp ×β i
[0142] θ i+1 =θ i +ω i ×dt
[0143] x i+1 =x i +v i ×cos(θ i )×dt
[0144] y i+1 =y i +v i ×sin(θ i )×dt.
[0145] Among them, ρi is the distance between the current path key point position (hereinafter referred to as the current position) and the target position, (x goal ,y goal ) is the coordinate of the target position, (x i ,y i ) is the coordinate of the key point of the path at the current location of the vehicle, α i is the angle between the direction formed by the target position and the current position and the current direction of travel, θ i is the vehicle's direction of travel at the current position, β i is the angle between the direction formed by the target position and the current position and the direction of the target position, v i is the velocity at the current position, ρ kp is the velocity weight coefficient, ω i is the rate of change of direction, α kp is the angle coefficient between the direction formed by the target position and the current position and the current direction of travel, βkp is the angle coefficient between the direction formed by the target position and the current position and the direction of the target position, d t is the time interval, θ i+1 is the direction of the next point, (x i+1 ,y i+1 ) are the coordinates of the next point.
[0146] From the above description, it can be known that at least one driving path from the new path starting point to the path end point can be searched in the map data based on the fast search random tree RRT path planning algorithm, that is, the third driving path. At this time, the path key point in the third driving path can be a search node located on the third driving path in the random tree. Afterwards, the third driving path can be derived into multiple fourth driving paths through a genetic algorithm. Specifically, the genetic algorithm generates new path key points after cross-mutating the path key points of the third driving path, and then derives multiple fourth driving paths based on the new path key points.
[0147] In the disclosed embodiment, the key point of the path can be understood as the driving point of the simulated vehicle, and the key point of the path is used to indicate the driving trajectory of the simulated vehicle. After the simulated driving parameters are determined, the simulated vehicle can be controlled to travel on the second target driving path based on the simulated driving parameters.
[0148] It can be seen from the above description that in the disclosed embodiment, the road coordinates (i.e., the above-mentioned multiple continuous discrete points) can be parsed from the information described in the openscenario, and then the path key points between the path starting point and the path end point are obtained using a fast random search tree, and then a plurality of sets of data that meet the requirements (i.e., multiple second driving paths) are obtained through an improved genetic algorithm, and the data is used as an improved reinforcement learning environment database, and a path that meets the requirements (i.e., the first target driving path) is obtained after calculation; the aforementioned path (i.e., the first target driving path) is used as the original path, and the vehicle travels along the path when there are no obstacles on the path, and once an obstacle is encountered, the vehicle autonomously bypasses the obstacle and returns to the original path to continue driving.
[0149] In the disclosed embodiment, the driving paths of other vehicles can also be added to the simulator, and it can be set that other vehicles can actively avoid the vehicle when they encounter it, so that other vehicles can interact with the vehicle in the simulator, making other vehicles also become intelligent entities that can avoid the vehicle and obstacles and successfully reach the destination from the starting point.
[0150] The technical solution provided by the disclosed embodiment can obtain routes for various driving behaviors in the autonomous driving simulation, thereby solving the shortcomings of a single autonomous driving simulation scene and no interaction between the vehicle and other vehicles. The method of enriching the route using a genetic algorithm speeds up the efficiency of the original fast RRT planning. At the same time, reinforcement learning is used to score the route to ensure the quality of the final route.
[0151] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0152] Based on the same inventive concept, a vehicle driving simulation device corresponding to the vehicle driving simulation method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned vehicle driving simulation method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0153] Reference Fig.10 , which is a schematic diagram of a vehicle driving simulation device provided by an embodiment of the present disclosure, the device comprises: an acquisition unit 10, a first determination unit 20, a generation unit 30, a second determination unit 40, a third determination unit 50 and a control unit 60; wherein,
[0154] An acquisition unit 10 is used to acquire map data of a simulated driving environment; wherein the map data is used to indicate a boundary of a drivable area and / or a boundary of an obstacle in the simulated driving environment;
[0155] A first determining unit 20 is used to determine a first driving path of at least one simulated vehicle in the drivable area based on the map data; wherein the similarity between the second driving path and the first driving path meets a preset similarity requirement;
[0156] A generating unit 30, configured to generate a plurality of second driving paths based on the first driving path;
[0157] A second determining unit 40, configured to determine quality evaluation information of each of the second driving paths;
[0158] A third determining unit 50 is used to determine a first target driving path among the plurality of second driving paths whose quality evaluation information satisfies the quality requirement;
[0159] The control unit 60 is used to control each of the simulated vehicles to travel on the first target driving path.
[0160] In a possible implementation, the generation unit 30 is used to: optimize the first driving path to obtain a target optimized path; wherein the path quality of the target optimized path is greater than or equal to the path quality of the first driving path; generate multiple new path key points based on the path key points of the first driving path; and generate the multiple second driving paths using the target optimized path and the multiple new path key points.
[0161] In a possible implementation, the generation unit 30 is used to: determine a curve function of a path curve corresponding to the target optimized path; use the curve function as a target fitness function, and screen target path key points that meet the path combination requirements from among the multiple new path key points based on the target fitness function; and generate the multiple second driving paths based on the target path key points.
[0162] In a possible implementation, the generation unit 30 is used to: determine a target driving area in the drivable area when there are multiple first driving paths; wherein the target driving area is the drivable area where the path starting point and the path end point of the first driving path are located; determine multiple sub-areas of the target driving area; calculate the key point average of the path key points located in each of the sub-areas among the path key points of each of the first driving paths to obtain multiple average key points; perform curve fitting on the multiple average key points to obtain a curve fitting result, and determine the curve fitting result as the target optimized path.
[0163] In a possible implementation, the second determination unit is further used to: obtain a target optimized path for the first driving path; wherein the path quality of the target optimized path is greater than or equal to the path quality of the first driving path; determine the path similarity between each of the second driving paths and the target optimized path, and determine the path similarity as the quality evaluation information, wherein the path similarity is used to indicate the path smoothness and / or path deviation of the corresponding second driving path.
[0164] In one possible implementation, the second determination unit is further used to: determine the target vector based on adjacent path key points located on the same second driving path to obtain multiple target vectors; wherein the direction of each target vector is associated with the forward direction of the second driving path; determine the vector angle between adjacent target vectors in the multiple target vectors, and determine the quality evaluation information based on the vector angle.
[0165] In a possible implementation, the device is also used to: detect obstacles on the first target driving path along the driving direction of each simulated vehicle during the process of controlling each simulated vehicle to travel on the first target driving path; determine a new path starting point of the simulated vehicle in response to detecting an obstacle; determine a third driving path of the simulated vehicle within the drivable area based on the new path starting point, the path end point of the simulated vehicle and the map data; regenerate multiple fourth driving paths based on the third driving path, and determine quality evaluation information of each of the fourth driving paths; determine a second target driving path whose quality evaluation information meets evaluation requirements among the multiple fourth driving paths, and control the simulated vehicle to travel on the second target driving path.
[0166] In a possible implementation, the device is also used to: determine simulated driving parameters of the simulated vehicle on the second target driving path, wherein the simulated driving parameters are used to indicate the driving speed and / or driving direction of the simulated vehicle at each key point of the path; and control the simulated vehicle to travel on the second target driving path based on the simulated driving parameters.
[0167] In a possible implementation, the first determination unit is further used to: determine a path starting point and a path end point within the drivable area, and establish a target search tree based on the path starting point and the path end point, wherein the target search tree includes multiple search nodes, and the multiple search nodes include the path starting point and the path end point; and determine in the target search tree at least one path from the path starting point to the path end point as the first driving path.
[0168] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0169] Corresponds to Figure 1 The vehicle driving simulation method in the present disclosure also provides an electronic device 1100, such as Fig.11 FIG. 1 is a schematic diagram of the structure of an electronic device 1100 provided in an embodiment of the present disclosure, including:
[0170] Processor 111, memory 112, and bus 113; memory 112 is used to store execution instructions, including internal memory 1121 and external memory 1122; the internal memory 1121 is also called internal memory, which is used to temporarily store the operation data in the processor 111 and the data exchanged with the external memory 1122 such as a hard disk. The processor 111 exchanges data with the external memory 1122 through the internal memory 1121. When the electronic device 1100 is running, the processor 111 communicates with the memory 112 through the bus 113, so that the processor 111 executes the following instructions:
[0171] Acquire map data of a simulated driving environment; wherein the map data is used to indicate the area boundary of a drivable area and / or the boundary of an obstacle in the simulated driving environment; determine a first driving path of at least one simulated vehicle within the drivable area based on the map data; generate multiple second driving paths based on the first driving path, and determine quality evaluation information of each second driving path; wherein the similarity between the second driving path and the first driving path meets a preset similarity requirement; determine a first target driving path among the multiple second driving paths whose quality evaluation information meets the quality requirement, and control each simulated vehicle to drive on the first target driving path.
[0172] The embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the vehicle driving simulation method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0173] The disclosed embodiments also provide a computer program product, which carries a program code. The program code includes instructions that can be used to execute the steps of the vehicle driving simulation method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0174] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0175] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0176] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0177] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0178] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A vehicle driving simulation method, characterized in that: include: Acquiring map data of a simulated driving environment; wherein the map data is used to indicate a boundary of a drivable area and / or a boundary of an obstacle in the simulated driving environment; Determine a first driving path of at least one simulated vehicle within the drivable area based on the map data; Generate multiple second driving paths based on the first driving path, and determine quality evaluation information of each second driving path; wherein the similarity between the second driving path and the first driving path meets a preset similarity requirement; A first target driving path whose quality evaluation information meets the quality requirement is determined among the plurality of second driving paths, and each of the simulated vehicles is controlled to drive on the first target driving path.
2. The method according to claim 1, characterized in that The generating a plurality of second driving paths based on the first driving path comprises: Optimizing the first driving path to obtain a target optimized path; wherein the path quality of the target optimized path is greater than or equal to the path quality of the first driving path; generating a plurality of new path key points based on the path key points of the first driving path; The plurality of second driving paths are generated using the target optimized path and the plurality of new path key points.
3. The method according to claim 2, characterized in that The step of generating the plurality of second driving paths by using the target optimized path and the plurality of new path key points comprises: Determine a curve function of a path curve corresponding to the target optimization path; Using the curve function as a target fitness function, and selecting target path key points that meet the path combination requirements from the multiple new path key points based on the target fitness function; The plurality of second driving paths are generated based on the target path key points.
4. The method according to claim 2 or 3, characterized in that: The number of the first driving paths is multiple, and the optimizing the first driving paths to obtain a target optimized path includes: Determining a target driving area in the drivable area; wherein the target driving area is a drivable area where a path starting point and a path end point of the first driving path are located; determining a plurality of sub-areas of the target driving area; Calculating an average value of key points of the path key points located in each of the sub-areas among the path key points of each of the first driving paths to obtain a plurality of average key points; Curve fitting is performed on the multiple average key points to obtain a curve fitting result, and the curve fitting result is determined as the target optimization path.
5. The method according to any one of claims 1 to 4, characterized in that The determining of the quality evaluation information of each of the second driving paths includes: Acquire a target optimized path of the first driving path; wherein the path quality of the target optimized path is greater than or equal to the path quality of the first driving path; Determine a path similarity between each of the second driving paths and the target optimized path, and determine the path similarity as the quality evaluation information, wherein the path similarity is used to indicate a path smoothness and / or a path deviation of the corresponding second driving path.
6. The method according to any one of claims 1 to 5, characterized in that The determining of the quality evaluation information of each of the second driving paths includes: Determine a target vector based on adjacent path key points located on the same second driving path to obtain a plurality of target vectors; wherein the direction of each of the target vectors is associated with the forward direction of the second driving path; A vector angle between adjacent target vectors among the plurality of target vectors is determined, and the quality evaluation information is determined based on the vector angle.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: In the process of controlling each of the simulated vehicles to travel on the first target travel path, detecting obstacles on the first target travel path along the travel direction of each of the simulated vehicles; In response to detecting the obstacle, determining a new path starting point for the simulated vehicle; Determining a third driving path of the simulated vehicle within the drivable area based on the new path starting point, the path end point of the simulated vehicle and the map data; regenerating a plurality of fourth driving paths based on the third driving path, and determining quality evaluation information of each of the fourth driving paths; A second target driving path whose quality evaluation information meets the evaluation requirements is determined among the plurality of fourth driving paths, and the simulated vehicle is controlled to travel on the second target driving path.
8. The method according to claim 7, characterized in that The step of controlling the simulated vehicle to travel on the second target travel path comprises: Determining simulated driving parameters of the simulated vehicle on the second target driving path, wherein the simulated driving parameters are used to indicate the driving speed and / or driving direction of the simulated vehicle at key points of each path; The simulated vehicle is controlled to travel on the second target driving path based on the simulated driving parameters.
9. The method according to any one of claims 1 to 8, characterized in that: The determining of a first driving path of at least one simulated vehicle within the drivable area based on the map data comprises: Determine a path start point and a path end point in the drivable area, and establish a target search tree based on the path start point and the path end point, wherein the target search tree includes a plurality of search nodes, and the plurality of search nodes include the path start point and the path end point; At least one path from the path starting point to the path ending point is determined in the target search tree as the first driving path.
10. A vehicle driving simulation device, characterized in that: include: An acquisition unit, used for acquiring map data of a simulated driving environment; wherein the map data is used for indicating a boundary of a drivable area and / or a boundary of an obstacle in the simulated driving environment; A first determining unit, configured to determine a first driving path of at least one simulated vehicle within the drivable area based on the map data; A generating unit, configured to generate a plurality of second driving paths based on the first driving path; wherein the similarity between the second driving paths and the first driving path satisfies a preset similarity requirement; A second determining unit, configured to determine quality evaluation information of each of the second driving paths; A third determining unit, configured to determine a first target driving path among the plurality of second driving paths whose quality evaluation information satisfies the quality requirement; A control unit is used to control each of the simulated vehicles to travel on the first target driving path.
11. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the vehicle driving simulation method as described in any one of claims 1 to 9 are performed.
12. 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 vehicle driving simulation method as claimed in any one of claims 1 to 9 are executed.
Citation Information
Patent Citations
Processing method and device for driving simulation scene and storage medium
CN110118661A
Road processing method and device for simulation test
CN112765783A