Simulation scene generation method and device, electronic equipment and storage medium
By analyzing the geographic data structure and the simulation model of autonomous driving vehicles, high-precision electronic maps adapted to various terrain data are solved, and the accuracy and generation efficiency of existing high-precision maps are improved.
Patent Information
- Application Number
- CN202311102304.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-29
- Publication Date
- 2025-02-28
AI Technical Summary
The traffic elements of existing high-precision maps cannot meet the needs of autonomous driving simulation scenarios and cannot adapt to various types of terrain data.
By obtaining the object representation data format and the autonomous driving vehicle simulation model representing the geographical data structure, data analysis is performed to determine the element set and the first coordinate set, an electronic three-dimensional map is generated based on the Unity engine, and an autonomous driving simulation scenario that meets the preset requirements is generated based on the electronic map and simulation model.
It realizes complete analysis of map data in various formats, generates high-precision electronic maps that are adapted to various terrain data, improves the accuracy and generation efficiency of electronic maps, and meets the needs of autonomous driving simulation scenarios.
Smart Images

Figure CN119533500A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of autonomous driving technology, and in particular, relates to a method, device, electronic device and storage medium for generating a simulation scene. Background Art
[0002] The high-precision maps currently produced cannot fully parse map data in various formats and cannot adapt to various types of terrain data. The traffic elements of high-precision maps cannot meet the needs of autonomous driving simulation scenarios.
[0003] The existing technology has the problem that the traffic elements of high-precision maps cannot meet the needs of autonomous driving simulation scenarios. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for generating a simulation scene, which can solve the problem that the traffic elements of high-precision maps cannot meet the requirements of autonomous driving simulation scenes.
[0005] In a first aspect, an embodiment of the present application provides a method for generating a simulation scene, comprising:
[0006] Obtaining an object representation data format representing a geographic data structure and an autonomous vehicle simulation model;
[0007] Perform data parsing based on the object representation data format to determine a feature set and a first coordinate set;
[0008] Generate an electronic three-dimensional map based on the element set, the first coordinate set and the Unity engine;
[0009] Based on the electronic map and the autonomous driving vehicle simulation model, an autonomous driving simulation scenario that meets preset requirements is generated.
[0010] In one embodiment, the performing of data parsing based on the object representation data format to determine the element set and the first coordinate set includes:
[0011] Based on the object representation data format, determining a first programming language object;
[0012] If the type field of the first programming language object is a geometry set, continue to parse the data format of the object representation until the type field of the first programming language object is a feature set;
[0013] If the type field of the first programming language object is an element set, the element set is parsed to determine the first coordinate set, wherein the element set represents a basic feature data set of the electronic map, and the first coordinate set represents a latitude and longitude coordinate set of the electronic map.
[0014] In one embodiment, determining the first programming language object based on the object representation data format includes:
[0015] Obtain a byte array based on the object representation data format;
[0016] Get a string based on the byte array;
[0017] Converts to a first programming language object based on the string.
[0018] In one embodiment, the element set includes at least one of a single-line element, a multi-line element, a single-surface element, or a multi-surface element. If the type field of the first programming language object is an element set, parsing the element set to determine the first coordinate set includes:
[0019] If the type field of the first programming language object is an element set, the element set is parsed to obtain the single-line element, the multi-line element, the single-surface element or the multi-surface element;
[0020] Based on the single-line element, the multi-line element, the single-surface element or the multi-surface element, the first coordinate set is determined, and the first coordinate set includes the longitude and latitude coordinate sets corresponding to the single-line element, the multi-line element, the single-surface element or the multi-surface element respectively.
[0021] In one embodiment, generating an electronic three-dimensional map based on the element set, the first coordinate set and the Unity engine includes:
[0022] Adding each element of the element set to an empty object of the Unity engine to form an element object corresponding to each element;
[0023] Based on each of the element objects, the reference origin coordinates, the material data, and the width and height data, an element entity corresponding to each of the element objects is formed;
[0024] An electronic three-dimensional map is generated based on each of the element entities, the first coordinate set and a rendering tool.
[0025] In one of the embodiments, the rendering tool includes a line rendering tool and a surface rendering tool;
[0026] The generating of the electronic three-dimensional map based on each of the element entities, the first coordinate set and a rendering tool comprises:
[0027] The latitude and longitude coordinates of each of the element entities and the first coordinate set are converted into the second coordinate set corresponding to each of the element entities, wherein the second coordinate set is a plane coordinate set corresponding to each of the element entities in the three-dimensional coordinate system within the Unity engine;
[0028] Based on each of the element entities, the second coordinate set corresponding to each of the element entities, and the line rendering tool, generating a plurality of linear objects of the electronic three-dimensional map according to a preset rule;
[0029] Based on each of the element entities, the second coordinate set corresponding to each of the element entities, and the surface rendering tool, generating a plurality of surface objects of the electronic three-dimensional map according to the preset rules;
[0030] Based on each of the element entities, the second coordinate set corresponding to each of the element entities, the line rendering tool and the surface rendering tool, a plurality of linear and surface combined objects of the electronic three-dimensional map are generated according to the preset rules.
[0031] In one embodiment, the preset rules include a first preset rule, a second preset rule and a third preset rule;
[0032] Among them, the first preset rule is a generation rule for each of the linear objects, the second preset rule is a generation rule for each of the planar objects, and the third preset rule is a generation rule for each of the linear and planar combined objects.
[0033] In a second aspect, an embodiment of the present application provides a device for generating a simulation scene, including:
[0034] An acquisition module, used for acquiring an object representation data format representing a geographic data structure and an autonomous driving vehicle simulation model;
[0035] A determination module, configured to perform data parsing based on the object representation data format to determine a feature set and a first coordinate set;
[0036] A first generating module, used for generating an electronic three-dimensional map based on the element set, the first coordinate set and the Unity engine;
[0037] The second generation module is used to generate an autonomous driving simulation scenario that meets preset requirements based on the electronic map and the autonomous driving vehicle simulation model.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements a method as described in any one of the contents of the first aspect above.
[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the contents of the first aspect above is implemented.
[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the terminal device to execute any of the methods described in the first aspect above.
[0041] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0042] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0043] The present application obtains an object representation data format representing a geographic data structure and an autonomous driving vehicle simulation model; performs data parsing based on the object representation data format to determine a feature set and a first coordinate set; generates an electronic three-dimensional map based on the feature set, the first coordinate set and the Unity engine; generates an autonomous driving simulation scene that meets preset requirements based on the electronic map and the autonomous driving vehicle simulation model. Since map data in various formats can be fully parsed to determine a feature set and a first coordinate set, various elements and corresponding first coordinate sets can be adapted to various types of terrain data, thereby generating a high-precision electronic map of traffic elements that meets the autonomous driving simulation scene, improving the accuracy of the electronic map, while reducing the complexity of generating the electronic map, improving the efficiency of generating an electronic map that meets the requirements, and thereby improving the efficiency of generating the autonomous driving simulation scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 It is a flowchart of a method for generating a simulation scene provided by an embodiment of the present application;
[0046] Figure 2 It is a flowchart of performing data parsing based on an object representation data format to determine a feature set and a first coordinate set provided by an embodiment of the present application;
[0047] Figure 3It is a flowchart of parsing the feature set to determine the first coordinate set if the type field of the first programming language object is a feature set provided by another embodiment of the present application;
[0048] Figure 4 It is a schematic diagram of a process of generating an electronic three-dimensional map based on a feature set, a first coordinate set and a Unity engine according to another embodiment of the present application;
[0049] Figure 5 It is a schematic diagram of a process of generating an electronic three-dimensional map based on each element entity, a first coordinate set and a rendering tool provided by another embodiment of the present application;
[0050] Figure 6 It is a structural schematic diagram of a simulation scene generation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0051] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0052] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0053] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0054] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0055] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0056] With the rapid development of automobile intelligence, the intelligent scenarios required for simulation testing (such as lane warning and collision warning) cannot be accurately displayed in ordinary electronic maps. They require high-precision electronic maps with higher coordinate accuracy and richer traffic information elements, and can be combined with intelligent units such as Advanced Driving Assistant System (ADAS), radar, camera, and vehicle to everything (Vehicle to Everything, V2X).
[0057] Currently, most of the production methods of high-precision maps are not in an open source state. Existing mapping tools include Unity (a 3D scene development platform), MapBox, interactive graphics program (OpenSceneGraph, OSG), etc. The formats of map data files include standard Geographic Information System (GIS) files (such as shapefile spatial data files), road files for driving simulation applications (ie Opendrive format files), object representation data format files (ie Geojson format files), etc. Among them, the Unity engine has the highest degree of visualization, flexible packaging, and focuses on 3D scene development.
[0058] The high-precision maps currently produced cannot fully parse map data in various formats and cannot adapt to various types of terrain data. The traffic elements of high-precision maps cannot meet the needs of autonomous driving simulation scenarios.
[0059] The existing technology has the problem that the traffic elements of high-precision maps cannot meet the needs of autonomous driving simulation scenarios.
[0060] The present application obtains an object representation data format representing a geographic data structure and an autonomous driving vehicle simulation model; performs data parsing based on the object representation data format to determine a feature set and a first coordinate set; generates an electronic three-dimensional map based on the feature set, the first coordinate set and the Unity engine; generates an autonomous driving simulation scene that meets preset requirements based on the electronic map and the autonomous driving vehicle simulation model. Since map data in various formats can be parsed to determine a feature set and a first coordinate set, various elements and corresponding first coordinate sets can be adapted to various types of terrain data, thereby generating a high-precision electronic map of traffic elements that meet the autonomous driving simulation scene, improving the accuracy of the electronic map, while reducing the complexity of generating the electronic map, improving the efficiency of generating an electronic map that meets the requirements, and thereby improving the efficiency of generating the autonomous driving simulation scene.
[0061] The technical solution of the present application is described below through specific embodiments.
[0062] First, as Figure 1 As shown, this embodiment provides a method for generating a simulation scene, including:
[0063] S100, obtaining an object representation data format representing a geographic data structure and an autonomous driving vehicle simulation model.
[0064] In one embodiment, the data format of an object representing a geographic data structure is obtained through a data stream, and the autonomous driving vehicle simulation model is built according to the simulation test needs of autonomous driving.
[0065] S200, performing data parsing based on the object representation data format to determine a feature set and a first coordinate set.
[0066] In one embodiment, data parsing is performed based on the object representation data format to determine the element set and the first coordinate set, which is conducive to completely parsing the object representation data format so as to obtain an electronic map with higher accuracy.
[0067] In one embodiment, the feature set includes at least one of a single-line feature, a multi-line feature, a single-area feature, or a multi-area feature.
[0068] In one embodiment, Figure 2 As shown, data parsing is performed based on the object representation data format to determine the feature set and the first coordinate set, including:
[0069] S210: Determine a first programming language object based on an object representation data format.
[0070] In one embodiment, a first programming language object is determined based on an object representation data format, wherein the first programming language is a programming language of the Unity engine, such as C#, which is conducive to effective interaction with the Unity engine and to improving the efficiency of developers using object-oriented languages.
[0071] In one embodiment, determining a first programming language object based on an object representation data format includes:
[0072] Based on the object representation data format, a byte array is obtained; based on the byte array, a character string is obtained; based on the character string, an object of the first programming language is converted. All contents in the object representation data format can be completely parsed through a self-compiled script, which is beneficial to improving the accuracy of the electronic map.
[0073] In one embodiment, a parser (eg, a json parser) is used to convert a string into a C# object.
[0074] S220: If the type field of the first programming language object is a geometry set, continue to parse the object representation data format until the type field of the first programming language object is a feature set.
[0075] In one embodiment, the type field of the outermost data of the first programming language object is obtained and the type field is judged. If the type field of the first programming language object is a geometric set, the object representation data format is continued to be parsed until the type field of the first programming language object is a feature set, which is conducive to further parsing the content of the converted object representation data format.
[0076] S230: If the type field of the first programming language object is a feature set, parse the feature set to determine a first coordinate set, wherein the feature set represents a basic feature data set of the electronic map, and the first coordinate set represents a latitude and longitude coordinate set of the electronic map.
[0077] In one embodiment, if the type field of the first programming language object is a feature set, the feature set is parsed to determine a first coordinate set, wherein the feature set represents a basic feature data set of the electronic map, and the first coordinate set represents a latitude and longitude coordinate set of the electronic map, thereby facilitating the generation of a higher-precision electronic map by combining the basic feature data with the latitude and longitude coordinates, thereby further improving the accuracy of the electronic map.
[0078] In one embodiment, Figure 3 As shown, if the type field of the first programming language object is a feature set, parsing the feature set to determine the first coordinate set includes:
[0079] S231: If the type field of the first programming language object is a feature set, parse the feature set to obtain single-line features, multi-line features, single-surface features, or multi-surface features.
[0080] In the prior art, real map data is parsed to obtain multiple basic map elements, and the probability and location of each basic map element are counted, and only a set of map elements with probability information and location information can be obtained; real scene data is parsed to obtain multiple basic scene elements, and the probability and location of each basic scene element are counted, and only a set of scene elements with probability information and location information can be obtained. The basic map elements include lanes, intersections, traffic markings, traffic signs, traffic lights, isolation and protection facilities, and bus stops. Therefore, the accuracy of the generated electronic map still cannot meet the accuracy requirements of autonomous driving simulation scenarios.
[0081] In one embodiment, if the type field of the first programming language object is a feature set, the feature set is parsed to obtain single-line features, multi-line features, single-surface features or multi-surface features. Since the basic characteristic elements of the electronic map are further refined into multi-lines and multi-surfaces after complete parsing, and further refined into single lines and single surfaces, the accuracy of the electronic map is greatly improved, which is beneficial to the accuracy requirements of autonomous driving simulation scenarios.
[0082] S232, based on the single-line element, the multi-line element, the single-surface element or the multi-surface element, determine a first coordinate set, the first coordinate set including the longitude and latitude coordinate sets corresponding to the single-line element, the multi-line element, the single-surface element or the multi-surface element respectively.
[0083] In one embodiment, a first coordinate set is determined based on single-line elements, multi-line elements, single-surface elements or multi-surface elements. The first coordinate set includes longitude and latitude coordinate sets corresponding to the single-line elements, multi-line elements, single-surface elements or multi-surface elements, respectively. Since the longitude and latitude coordinates of each element are determined, it is convenient to convert each high-precision element into a high-precision plane coordinate in the Unity engine.
[0084] Unity (also known as Unity 3D) is a multi-platform comprehensive game development tool developed by Unity Technologies that allows players to easily create interactive content such as 3D video games, architectural visualization, real-time 3D animation, etc. It is a fully integrated professional game engine including graphics, sound, physics and other functions.
[0085] S300, generating an electronic three-dimensional map based on the feature set, the first coordinate set and the Unity engine.
[0086] In one embodiment, an electronic three-dimensional map is generated based on a feature set, a first coordinate set, and a Unity engine, which facilitates each feature, the longitude and latitude coordinates corresponding to each feature, and the Unity engine to generate an electronic three-dimensional map that meets the accuracy requirements of an autonomous driving simulation scenario.
[0087] In one embodiment, Figure 4 As shown, based on the feature set, the first coordinate set and the Unity engine, an electronic three-dimensional map is generated, including:
[0088] S310, adding each element of the element set to an empty object of the Unity engine to form an element object corresponding to each element.
[0089] In one embodiment, each element of the element set is added to an empty object of the Unity engine to form an element object corresponding to each element, which is conducive to constructing basic characteristic elements of the electronic map.
[0090] S320, forming a feature entity corresponding to each feature object based on each feature object, reference origin coordinates, material data, and width and height data.
[0091] In one embodiment, the material data includes top material data and side material data; the width and height data includes line width data and surface height data.
[0092] In one embodiment, a feature entity corresponding to each feature object is formed based on each feature object, reference origin coordinates, material data, and width and height data. This is beneficial for configuring the coordinates, top material data, side material data, line width data, and surface height data of each feature to each feature object to form a feature entity corresponding to each feature object, which is beneficial for scene construction based on the accuracy requirements of the autonomous driving simulation scene.
[0093] S330, generating an electronic three-dimensional map based on each element entity, the first coordinate set and a rendering tool.
[0094] In one embodiment, the rendering tool includes a line rendering tool and a surface rendering tool.
[0095] In one embodiment, the preset rules include a first preset rule, a second preset rule and a third preset rule; wherein the first preset rule is a generation rule for each linear object, the second preset rule is a generation rule for each planar object, and the third preset rule is a generation rule for each linear and planar combination of objects.
[0096] In one embodiment, an electronic three-dimensional map is generated based on each element entity, the first coordinate set and a rendering tool, which is conducive to generating an electronic three-dimensional map that meets the accuracy requirements of an autonomous driving simulation scenario.
[0097] In one embodiment, Figure 5As shown, an electronic three-dimensional map is generated based on each element entity, a first coordinate set and a rendering tool, including:
[0098] S331, converting the longitude and latitude coordinates of each element entity and the first coordinate set into a second coordinate set corresponding to each element entity, wherein the second coordinate set is a plane coordinate set corresponding to each element entity in a three-dimensional coordinate system within the Unity engine.
[0099] In one embodiment, the longitude and latitude coordinates of each feature entity and the first coordinate set are converted into a second coordinate set corresponding to each feature entity. Since the longitude and latitude coordinates of each feature entity are the accuracy of the basic features of a single line, multiple lines, a single surface or multiple surfaces, the accuracy of the plane coordinates corresponding to each feature entity in the Unity engine is also improved.
[0100] S332, based on each element entity, the second coordinate set corresponding to each element entity and the line rendering tool, generate multiple linear objects of the electronic three-dimensional map according to preset rules.
[0101] In one embodiment, the first preset rule is a generation rule for each linear object. For example, the first preset rule includes that the tail coordinates of any single line or any multi-line cannot be the same, and if there are the same tail coordinates, the tail coordinate of one single line or one multi-line is removed.
[0102] In one embodiment, based on each feature entity, the second coordinate set corresponding to each feature entity and the line rendering tool, multiple linear objects of the electronic three-dimensional map are generated according to preset rules, including connecting the coordinates of the plane coordinate set corresponding to any single-line entity or any multi-line entity in sequence according to a preset order to form a line graphic, and then stretching the line width data of the single-line entity or the multi-line entity, and then using the line rendering tool to fill the line entity according to the material data of the single-line entity or the multi-line entity to generate multiple linear objects of the electronic three-dimensional map.
[0103] S333, based on each element entity, the second coordinate set corresponding to each element entity and the surface rendering tool, generate multiple surface objects of the electronic three-dimensional map according to preset rules.
[0104] In one embodiment, the second preset rule is a generation rule for each planar object. For example, the second preset rule includes that the tail coordinates of any single surface or any multiple surfaces cannot be the same, and if there are identical tail coordinates, the tail coordinate of one single surface or one multiple surface is removed.
[0105] In one embodiment, based on each element entity, the second coordinate set corresponding to each element entity and the surface rendering tool, multiple surface objects of the electronic three-dimensional map are generated according to preset rules, including connecting the coordinates of the plane coordinate set corresponding to any single-face entity or any multi-faceted entity in sequence according to a preset order to form a surface figure, and then raising the surface height data of the single-face entity or the multi-faceted entity to form a three-dimensional stereographic figure, and then using the surface rendering tool to fill the surface entity according to the top material data and / or side material data of the single-face entity or the multi-faceted entity, thereby generating multiple surface objects of the electronic three-dimensional map.
[0106] S334, based on each element entity, the second coordinate set corresponding to each element entity, the line rendering tool and the surface rendering tool, generate multiple linear and surface combined objects of the electronic three-dimensional map according to preset rules.
[0107] In one embodiment, the third preset rule is a generation rule for each linear and planar combination of objects. For example, the third preset rule includes that the tail coordinates of any single line, multiple lines, single surface, or multiple surfaces cannot be the same, and if there are identical tail coordinates, the identical tail coordinates of the single line, multiple lines, single surface, or multiple surfaces are removed.
[0108] In one embodiment, based on each element entity, the second coordinate set corresponding to each element entity, the line rendering tool and the surface rendering tool, multiple linear and surface objects of the electronic three-dimensional map are generated according to preset rules, including first connecting the coordinates of the plane coordinate set corresponding to any single-line or multi-line entity in sequence according to a preset order to form a line graphic, then connecting the coordinates of the plane coordinate set corresponding to any single-face / face line entity in sequence according to a preset order to form a surface graphic, then stretching the line width data of the single-line entity or the multi-line entity, and raising the surface height data of the single-face entity or the multi-face entity to form a three-dimensional stereographic figure, then using the line rendering tool to fill the line entity according to the material data of the single-line entity or the multi-line entity, then using the surface rendering tool to fill the surface entity according to the top material data and / or side material data of the single-face entity or the multi-face entity, and finally combining the line entity and the surface entity according to the needs of the scene to generate multiple linear and surface objects of the electronic three-dimensional map.
[0109] S400 generates an autonomous driving simulation scenario that meets preset requirements based on the electronic map and the autonomous driving vehicle simulation model.
[0110] The existing technologies use map boxes (MapBox) and interactive graphics programs (OSG) for simulation scenes with low visualization, and their programming language codes are poorly coupled with the user interface (UI). The user interface adjustment is too cumbersome, and the interaction with the Android car system is too complicated and even cannot meet the needs.
[0111] This embodiment fully parses the highly versatile object representation data format (GeoJson) and adapts to a variety of geometry types. In the Unity engine, a variety of high-precision traffic elements can be generated by configuring the element data source, geometry material, height and other information to meet the various needs of autonomous driving simulation scenarios. The C# code is combined with the user interface in a programming way for real-time compilation. Only simple configuration is required to package it into an Android external library (AndroidLib library) for the embedded vehicle system to generate an autonomous driving simulation scenario that meets the needs.
[0112] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0113] Compared with the prior art, the present embodiment has the following beneficial effects:
[0114] By obtaining an object representation data format representing a geographic data structure and an autonomous driving vehicle simulation model; performing data parsing based on the object representation data format to determine a feature set and a first coordinate set; generating an electronic three-dimensional map based on the feature set, the first coordinate set and the Unity engine; and generating an autonomous driving simulation scene that meets preset requirements based on the electronic map and the autonomous driving vehicle simulation model. Since map data in various formats can be parsed to determine a feature set and a first coordinate set, various elements and corresponding first coordinate sets can be adapted to various types of terrain data, thereby generating a high-precision electronic map of traffic elements that meet the autonomous driving simulation scene, thereby improving the accuracy of the electronic map, while reducing the complexity of generating the electronic map, and improving the efficiency of generating an electronic map that meets the requirements, thereby improving the efficiency of generating the autonomous driving simulation scene.
[0115] Second, as Figure 6 As shown, the embodiment of the present application provides a device 100 for generating a simulation scene, including:
[0116] The acquisition module 110 is used to acquire an object representation data format representing a geographic data structure and an autonomous driving vehicle simulation model.
[0117] The determination module 120 is used to perform data analysis based on the object representation data format to determine a feature set and a first coordinate set.
[0118] The first generating module 130 is used to generate an electronic three-dimensional map based on the feature set, the first coordinate set and the Unity engine.
[0119] The second generation module 140 is used to generate an autonomous driving simulation scene that meets preset requirements based on the electronic map and the autonomous driving vehicle simulation model.
[0120] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / modules are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0121] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0122] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, it implements a method as described in any one of the contents of the first aspect above.
[0123] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the contents of the first aspect above is implemented.
[0124] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on an electronic device, enables the terminal device to execute any of the methods described in the first aspect above.
[0125] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.
[0126] A method for generating a simulation scene provided in an embodiment of the present application can be applied to terminal devices such as mobile phones, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR) / virtual reality (VR) devices, laptop computers, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiment of the present application does not impose any restrictions on the specific type of the terminal device.
[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by a processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc.
[0128] The computer-readable medium may include at least: any entity or device capable of carrying computer program codes to a camera / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk, or an optical disk. In some jurisdictions, according to legislation and patent practice, a computer-readable medium cannot be an electric carrier signal or a telecommunication signal.
[0129] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0130] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0131] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0132] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0133] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for generating a simulation scene, characterized in that: include: Obtaining an object representation data format representing a geographic data structure and an autonomous vehicle simulation model; Perform data parsing based on the object representation data format to determine a feature set and a first coordinate set; Generate an electronic three-dimensional map based on the element set, the first coordinate set and the Unity engine; Based on the electronic map and the autonomous driving vehicle simulation model, an autonomous driving simulation scenario that meets preset requirements is generated.
2. The method according to claim 1, characterized in that The performing data parsing based on the object representation data format to determine the element set and the first coordinate set includes: Based on the object representation data format, determining a first programming language object; If the type field of the first programming language object is a geometry set, continue to parse the data format of the object representation until the type field of the first programming language object is a feature set; If the type field of the first programming language object is an element set, the element set is parsed to determine the first coordinate set, wherein the element set represents a basic feature data set of the electronic map, and the first coordinate set represents a latitude and longitude coordinate set of the electronic map.
3. The method according to claim 2, characterized in that The determining of a first programming language object based on the object representation data format comprises: Obtain a byte array based on the object representation data format; Get a string based on the byte array; Converts to a first programming language object based on the string.
4. The method according to claim 2, characterized in that The element set includes at least one of a single-line element, a multi-line element, a single-surface element, or a multi-surface element. If the type field of the first programming language object is an element set, parsing the element set to determine the first coordinate set includes: If the type field of the first programming language object is an element set, the element set is parsed to obtain the single-line element, the multi-line element, the single-surface element or the multi-surface element; Based on the single-line element, the multi-line element, the single-surface element or the multi-surface element, the first coordinate set is determined, and the first coordinate set includes the longitude and latitude coordinate sets corresponding to the single-line element, the multi-line element, the single-surface element or the multi-surface element respectively.
5. The method according to claim 1, characterized in that The generating of the electronic three-dimensional map based on the element set, the first coordinate set and the Unity engine includes: Adding each element of the element set to an empty object of the Unity engine to form an element object corresponding to each element; Based on each of the element objects, the reference origin coordinates, the material data, and the width and height data, an element entity corresponding to each of the element objects is formed; An electronic three-dimensional map is generated based on each of the element entities, the first coordinate set and a rendering tool.
6. The method according to claim 5, characterized in that The rendering tool includes a line rendering tool and a surface rendering tool; The generating of the electronic three-dimensional map based on each of the element entities, the first coordinate set and a rendering tool comprises: The latitude and longitude coordinates of each of the element entities and the first coordinate set are converted into the second coordinate set corresponding to each of the element entities, wherein the second coordinate set is a plane coordinate set corresponding to each of the element entities in the three-dimensional coordinate system within the Unity engine; Based on each of the element entities, the second coordinate set corresponding to each of the element entities, and the line rendering tool, generating a plurality of linear objects of the electronic three-dimensional map according to a preset rule; Based on each of the element entities, the second coordinate set corresponding to each of the element entities, and the surface rendering tool, generating a plurality of surface objects of the electronic three-dimensional map according to the preset rules; Based on each of the element entities, the second coordinate set corresponding to each of the element entities, the line rendering tool and the surface rendering tool, a plurality of linear and surface combined objects of the electronic three-dimensional map are generated according to the preset rules.
7. The method according to claim 6, characterized in that The preset rules include a first preset rule, a second preset rule and a third preset rule; Among them, the first preset rule is a generation rule for each of the linear objects, the second preset rule is a generation rule for each of the planar objects, and the third preset rule is a generation rule for each of the linear and planar combined objects.
8. A device for generating a simulation scene, characterized in that: include: An acquisition module, used for acquiring an object representation data format representing a geographic data structure and an autonomous driving vehicle simulation model; A determination module, configured to perform data parsing based on the object representation data format to determine a feature set and a first coordinate set; A first generating module, used for generating an electronic three-dimensional map based on the element set, the first coordinate set and the Unity engine; The second generation module is used to generate an autonomous driving simulation scenario that meets preset requirements based on the electronic map and the autonomous driving vehicle simulation model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.