A method and apparatus for generating a traffic scenario
By acquiring and transforming the road acquisition data, the OpenSCENARIO scenario is generated, which solves the problems of low efficiency and poor authenticity of building traffic scenes in the existing technology, and achieves efficient and real traffic scene generation.
Patent Information
- Application Number
- CN202210439708.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-04-25
AI Technical Summary
The existing way of building traffic scenes has the problems of low work efficiency and poor authenticity of the traffic scenes built.
By obtaining the road acquisition data collected by road acquisition vehicles, performing coordinate system transformation, generating the entity part, initialization part and story part of the storyboard of the OpenSCENARIO scene, to obtain the final OpenSCENARIO scene.
It improves the work efficiency of building traffic scenes, enhances the authenticity of the built scenes, and can reflect the real traffic situation.
Smart Images

Figure CN114721963B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent driving, and in particular, to a method and device for generating a traffic scenario. Background Art
[0002] The intelligent driving algorithm is the core content of the control of intelligent driving vehicles. To verify and test the intelligent driving algorithm, it is necessary to build a traffic scenario and pay attention to the performance of the intelligent driving algorithm under different traffic scenarios.
[0003] Currently, the common way to build a traffic scenario is that technicians manually build a traffic scenario in an intelligent driving simulation tool based on test purposes, function specifications, and personal experience. However, on the one hand, technicians need to spend a lot of time building the traffic scenario, and the work efficiency is low; on the other hand, the built traffic scenario depends on the personal experience of technicians and cannot truly reflect the real traffic conditions, and the authenticity of the built traffic scenario is poor. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a method and device for generating a traffic scenario to solve the problems such as low work efficiency and poor authenticity of the built traffic scenario existing in the existing way of building a traffic scenario.
[0005] To achieve the above object, embodiments of the present invention provide the following technical solutions:
[0006] A first aspect of an embodiment of the present invention discloses a method for generating a traffic scenario, the method including:
[0007] Obtain road sampling data within a specified time period collected by a road sampling vehicle, where the road sampling data includes first pose information of the road sampling vehicle carrying a first time stamp and second pose information of a specified traffic target carrying a second time stamp, the specified traffic target being any traffic target sensed by a sensing sensor provided on the road sampling vehicle, the first pose information being collected by an inertial navigation sensor provided on the road sampling vehicle, and the second pose information being collected by the sensing sensor;
[0008] Transform the first pose information into a preset global coordinate system to obtain third pose information, where the coordinate origin of the global coordinate system is located at: the vehicle inertial navigation position in the first pose information corresponding to the first time stamp;
[0009] Use the installation position of the inertial navigation sensor in the vehicle coordinate system of the road sampling vehicle to determine the second vehicle origin position corresponding to the first vehicle origin position of the road sampling vehicle at each of the first time stamps in the global coordinate system;
[0010] Transform the second vehicle pose information to the global coordinate system according to the second vehicle origin position, so as to obtain the fourth pose information at each of the second timestamps;
[0011] Generate the entity part of the OpenSCENARIO scenario based on the road-sampling vehicle and the specified traffic target;
[0012] Take the first second timestamp as the initial simulation time, and convert the first timestamp and other second timestamps into a first simulation timestamp and a second simulation timestamp respectively based on the initial simulation time;
[0013] Generate the initialization part of the storyboard of the OpenSCENARIO scenario by using the third pose information and the fourth pose information corresponding to the initial simulation time;
[0014] Generate the story part of the storyboard based on the third pose information corresponding to each first simulation timestamp and the fourth pose information corresponding to each second simulation timestamp, so as to obtain the final OpenSCENARIO scenario.
[0015] Preferably, the first pose information includes first position information and first attitude information;
[0016] Transform the first pose information to a preset global coordinate system to obtain the third pose information, including:
[0017] Transform the vehicle inertial navigation longitude and latitude in the first position information to the UTM coordinate system to obtain the UTM coordinates;
[0018] Transform the UTM coordinates and the altitude in the first position information to the global coordinate system to obtain the third position information used to form the third pose information;
[0019] Determine the first attitude information corresponding to the first timestamp in the global coordinate system as the initial attitude;
[0020] Determine the attitude information of the first attitude information corresponding to each first timestamp relative to the initial attitude to obtain the third attitude information used to form the third pose information.
[0021] Preferably, the second pose information includes second position information and second attitude information;
[0022] According to the second vehicle origin position, transform the second pose information to the global coordinate system to obtain the fourth pose information at each of the second timestamps, including:
[0023] Transform the second position information into the vehicle coordinate system based on the installation position of the perception sensor in the vehicle coordinate system;
[0024] Calculate the second vehicle origin positions corresponding to each of the second timestamps by interpolation based on the second vehicle origin positions corresponding to each of the first timestamps;
[0025] Use the second vehicle origin positions corresponding to each of the second timestamps to transform the second position information in the vehicle coordinate system into the global coordinate system to obtain the fourth position information;
[0026] Combine the fourth position information and the second attitude information to form the fourth pose information in the global coordinate system.
[0027] Preferably, use the third pose information and the fourth pose information corresponding to the initial simulation time to generate the initialization part of the storyboard of the OpenSCENARIO scenario, including:
[0028] Perform linear interpolation based on the third pose information corresponding to each first simulation timestamp to calculate the third pose information corresponding to the initial simulation time;
[0029] Define the third pose information and the fourth pose information corresponding to the initial simulation time in the initialization part of the storyboard of the OpenSCENARIO scenario.
[0030] Preferably, generate the story part of the storyboard based on the third pose information corresponding to each of the first simulation timestamps and the fourth pose information corresponding to each of the second simulation timestamps to obtain the final OpenSCENARIO scenario, including:
[0031] Add the first ManeuverGroup description corresponding to the road sampling vehicle to the first Act and specify the road sampling vehicle as the actor, where the first Act is used to define the first ManeuverGroup;
[0032] Add a first Event to the first Maneuver under the first ManeuverGroup, and add a first action and a trigger condition for triggering the first action in the first Event to define the first Act that completes the story part of the storyboard, where the first action describes each of the first simulation timestamps and their corresponding third pose information in the form of FollowTrajectoryAction;
[0033] Add the description of the second ManeuverGroup corresponding to the specified traffic target to the second Act and specify the specified traffic target as the actor, where the second Act is used to define the second ManeuverGroup;
[0034] Add at least one Event to the second Maneuver under the second ManeuverGroup, and add an action and a trigger condition for triggering the action to each of the at least one Event, so as to define the second Act that completes the story part for composing the storyboard, and obtain the final OpenSCENARIO scenario;
[0035] Wherein, the at least one Event includes a second Event, or the at least one Event includes a second Event and a third Event, or the at least one Event includes a second Event and a fourth Event, or the at least one Event includes a second Event, a third Event and a fourth Event;
[0036] In the second action, each of the second simulation timestamps of the specified traffic target and its corresponding fourth pose information are described in the manner of FollowTrajectoryAction, in the third action, the deletion action of the specified traffic target is described in the manner of DeleteEntityAction, and in the fourth action, the addition action of the specified traffic target is described in the manner of AddEntityAction;
[0037] The second action, the third action and the fourth action are respectively the actions added to the second Event, the third Event and the fourth Event.
[0038] A second aspect of the embodiments of the present invention discloses a device for generating a traffic scenario, the device includes:
[0039] An acquisition unit, configured to acquire road acquisition data within a specified time period collected by a road acquisition vehicle, the road acquisition data includes the first pose information carried by the road acquisition vehicle with a first timestamp and the second pose information carried by a specified traffic target with a second timestamp, the specified traffic target is any traffic target sensed by a sensing sensor disposed on the road acquisition vehicle, the first pose information is acquired by an inertial navigation sensor disposed on the road acquisition vehicle, and the second pose information is acquired by the sensing sensor;
[0040] A first transformation unit, configured to transform the first pose information to a preset global coordinate system to obtain third pose information, wherein the origin of the global coordinate system is located at: the vehicle inertial navigation position in the first pose information corresponding to the first first timestamp;
[0041] A determination unit, configured to determine, by using the installation position of the inertial navigation sensor in the vehicle coordinate system of the road sampling vehicle, the second vehicle origin position corresponding to the first vehicle origin position of the road sampling vehicle at each of the first timestamps in the global coordinate system;
[0042] A second transformation unit, configured to transform the second pose information to the global coordinate system according to the second vehicle origin position to obtain fourth pose information at each of the second timestamps;
[0043] A first generation unit, configured to generate an entity part of an OpenSCENARIO scenario based on the road sampling vehicle and the specified traffic target;
[0044] A conversion unit, configured to use the first second timestamp as an initial simulation time, and convert the first timestamp and other second timestamps into a first simulation timestamp and a second simulation timestamp respectively based on the initial simulation time;
[0045] A second generation unit, configured to generate an initialization part of the storyboard of the OpenSCENARIO scenario by using the third pose information and the fourth pose information corresponding to the initial simulation time;
[0046] A third generation unit, based on the third pose information corresponding to each of the first simulation timestamps and the fourth pose information corresponding to each of the second simulation timestamps, generates a story part of the storyboard to obtain the final OpenSCENARIO scenario.
[0047] Preferably, the first pose information includes first position information and first attitude information; the first transformation unit includes:
[0048] A first transformation module, configured to transform the vehicle inertial navigation longitude and latitude in the first position information to the UTM coordinate system to obtain UTM coordinates;
[0049] A second transformation module, configured to transform the UTM coordinates and the altitude in the first position information to the global coordinate system to obtain third position information for forming the third pose information;
[0050] A first determination module, configured to determine the first attitude information corresponding to the first first timestamp in the global coordinate system as the initial attitude;
[0051] A second determination module, configured to determine the pose information of each of the first pose information corresponding to the first timestamp relative to the initial pose, so as to obtain third pose information for forming the third pose information.
[0052] Preferably, the second pose information includes second position information and second pose information; the second transformation unit includes:
[0053] A first transformation module, configured to transform the second position information to the vehicle coordinate system based on the installation position of the perception sensor in the vehicle coordinate system;
[0054] A calculation module, configured to calculate the second vehicle origin positions corresponding to each of the second timestamps by interpolation based on the second vehicle origin positions corresponding to each of the first timestamps;
[0055] A second transformation module, configured to use the second vehicle origin positions corresponding to each of the second timestamps to transform the second position information in the vehicle coordinate system to the global coordinate system, so as to obtain fourth position information;
[0056] A composition module, configured to combine the fourth position information and the second pose information to form the fourth pose information in the global coordinate system.
[0057] Preferably, the second generation unit is specifically configured to: perform linear interpolation based on the third pose information corresponding to each first simulation timestamp, and calculate the third pose information corresponding to the initial simulation moment; define the third pose information corresponding to the initial simulation moment and the fourth pose information in the initialization part of the storyboard of the OpenSCENARIO scenario.
[0058] Preferably, the third generation unit includes:
[0059] A first addition module, configured to add a description of the first ManeuverGroup corresponding to the road sampling vehicle to the first Act and specify the road sampling vehicle as an actor, where the first Act is used to define the first ManeuverGroup;
[0060] A first processing module, configured to add a first Event to the first Maneuver under the first ManeuverGroup, and add a first action and a trigger condition for triggering the first action to the first Event, so as to define the first Act that completes the story part for forming the storyboard, where the first action describes each of the first simulation timestamps and the corresponding third pose information in the form of FollowTrajectoryAction;
[0061] A second addition module, configured to add a description of a second ManeuverGroup corresponding to the specified traffic target to a second Act and specify the specified traffic target as an actor, where the second Act is used to define the second ManeuverGroup;
[0062] A second processing module, configured to add at least one Event to a second Maneuver under the second ManeuverGroup, add an action to each of the at least one Event, and add a trigger condition for triggering the action, so as to define the second Act that completes the story part for composing the storyboard, and obtain the final OpenSCENARIO scenario;
[0063] Wherein, the at least one Event includes a second Event, or the at least one Event includes a second Event and a third Event, or the at least one Event includes a second Event and a fourth Event, or the at least one Event includes a second Event, a third Event, and a fourth Event;
[0064] In the second action, each of the second simulation timestamps of the specified traffic target and its corresponding fourth pose information are described in the manner of FollowTrajectoryAction, in the third action, the deletion action of the specified traffic target is described in the manner of DeleteEntityAction, and in the fourth action, the addition action of the specified traffic target is described in the manner of AddEntityAction;
[0065] The second action, the third action, and the fourth action are respectively the actions added to the second Event, the third Event, and the fourth Event.
[0066] Based on the method and device for generating a traffic scenario provided in the embodiments of the present invention, the method includes: obtaining road acquisition data within a specified time period collected by a road acquisition vehicle; transforming the first pose information to a preset global coordinate system to obtain the third pose information; using the installation position of the inertial navigation sensor in the vehicle coordinate system of the road acquisition vehicle to determine the second vehicle origin position corresponding to the first vehicle origin position of the road acquisition vehicle at each first timestamp in the global coordinate system; according to the second vehicle origin position, transforming the second pose information to the global coordinate system to obtain the fourth pose information at each second timestamp; generating the entity part of the OpenSCENARIO scenario based on the road acquisition vehicle and the specified traffic target; using the first second timestamp as the initial simulation moment, converting the first timestamp and other second timestamps into the first simulation timestamp and the second simulation timestamp based on the initial simulation moment respectively; generating the initialization part of the storyboard of the OpenSCENARIO scenario by using the third pose information and the fourth pose information corresponding to the initial simulation moment; generating the story part of the storyboard based on the third pose information corresponding to each first simulation timestamp and the fourth pose information corresponding to each second simulation timestamp to obtain the final OpenSCENARIO scenario. In this solution, road acquisition data within a specified time period collected by a road acquisition vehicle is obtained. Coordinate transformation is performed on the road acquisition data, and the entity part, initialization part, and story part of the storyboard of the OpenSCENARIO scenario are generated by using the road acquisition data after coordinate transformation to obtain the final OpenSCENARIO scenario. The final OpenSCENARIO scenario includes traffic participants such as road acquisition vehicles and specified traffic targets, and the final OpenSCENARIO scenario also describes the actions of each traffic participant in a storyboard, which can reflect the real traffic situation and does not require technicians to manually build a traffic scenario, improving work efficiency and the authenticity of the built traffic scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0068] Figure 1 It is a flowchart of a method for generating a traffic scenario provided by an embodiment of the present invention;
[0069] Figure 2 It is a flowchart of generating the story part of the storyboard provided by an embodiment of the present invention;
[0070] Figure 3 Flow chart for adding at least one Event corresponding to a specified traffic target provided by an embodiment of the present invention;
[0071] Figure 4 Block diagram of a device for generating a traffic scenario provided by an embodiment of the present invention. Detailed implementation manners
[0072] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0073] In this application, the term "including", "comprising" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the phrase "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0074] As can be seen from the background art, currently when building a traffic scenario, technicians need to manually build the traffic scenario in an intelligent driving simulation tool based on test purposes, functional specifications and personal experience. However, on the one hand, technicians need to spend a lot of time building the traffic scenario, and the work efficiency is relatively low; on the other hand, the built traffic scenario depends on the personal experience of technicians and cannot truly reflect the real traffic conditions, and the authenticity of the built traffic scenario is relatively poor.
[0075] Therefore, an embodiment of the present invention provides a method and a device for generating a traffic scenario, which obtain road sampling data within a specified time period collected by a road sampling vehicle. Perform coordinate transformation on the road sampling data, and use the road sampling data after coordinate transformation to generate the entity part, initialization part and story part of the storyboard of the OpenSCENARIO scenario, so as to obtain the final OpenSCENARIO scenario. The final OpenSCENARIO scenario includes traffic participants such as road sampling vehicles and specified traffic targets, and the final OpenSCENARIO scenario also describes the actions of each traffic participant in the storyboard, which can reflect the real traffic conditions and does not require technicians to manually build the traffic scenario, so as to improve work efficiency and the authenticity of the built traffic scenario.
[0076] It should be noted that the basic concept of the OpenSCENARIO scenario (i.e., the traffic scenario) is "who is doing what where?". Among them, the RoadNetwork (road network) in the OpenSCENARIO scenario describes "where", and the RoadNetwork can refer to the static driving infrastructure. To more appropriately describe the behavior of road users, the OpenSCENARIO scenario generated in the embodiments of the present invention needs to refer to the description of the topological structure of the road network. Specifically, OpenDRIVE can be used as the road network description format, and the OpenDRIVE file path is specified in the RoadNetwork. The Entity in the OpenSCENARIO scenario describes "who", and the Entity is the road participant (such as vehicles and pedestrians). The Storyboard in the OpenSCENARIO scenario describes "what the person is doing", and each entity can interact according to a set of instructions defined in the storyboard.
[0077] Based on the above content, the real road acquisition data collected by the road acquisition vehicle on the road can be used to generate the OpenSCENARIO scenario; the generated OpenSCENARIO scenario contains road participants (i.e., the above-mentioned Entities) and the action behaviors of each road participant (i.e., the content in the Storyboard), and can reflect the real traffic scenario; in addition, the data corresponding to the road participants of interest can be selected from the road acquisition data to generate the OpenSCENARIO scenario, increasing the flexibility of generating the OpenSCENARIO scenario and being more convenient for the testing of intelligent driving algorithms.
[0078] The following will describe in detail how to generate the OpenSCENARIO scenario through the content of each embodiment.
[0079] See Figure 1 , which shows a flowchart of a method for generating a traffic scenario provided by an embodiment of the present invention. The method includes:
[0080] Step S101: Obtain the road acquisition data within a specified time period collected by the road acquisition vehicle.
[0081] It should be noted that an inertial navigation sensor and a perception sensor are provided on the road sampling vehicle. During the driving process of the road sampling vehicle, the inertial navigation sensor is used to collect the pose information (including longitude, latitude, altitude, yaw angle, roll angle, pitch angle, etc.) of the road sampling vehicle with time stamps in real time; the perception sensor is used to perceive the traffic targets (traffic participants) around the road sampling vehicle, and collect the pose information, unique number (used to distinguish traffic targets), type, length, width, height, etc. of each perceived traffic target with time stamps in real time; the data collected by the inertial navigation sensor and the perception sensor can be called road sampling data.
[0082] In some embodiments, as can be seen from the above content, the road sampling data is real-time collected data with time stamps, and the perception sensor will perceive multiple traffic targets; when generating an OpenSCENARIO scenario using the road sampling data, it is possible to select to generate an OpenSCENARIO scenario using the road sampling data within a specified time period related to the road sampling vehicle and the specified traffic target; specifically, according to the time stamps of the road sampling data, the data outside the specified time period is deleted from the road sampling data, and the data related to traffic targets other than the specified traffic target (pose information, unique number, type, etc.) is deleted, and the road sampling data within the specified time period can be obtained.
[0083] The road sampling data within the specified time period includes: the first pose information of the road sampling vehicle with the first time stamp and the second pose information of the specified traffic target with the second time stamp; the specified traffic target is any traffic target perceived by the perception sensor provided on the road sampling vehicle, the first pose information is collected by the inertial navigation sensor provided on the road sampling vehicle, and the second pose information is collected by the perception sensor. It can be understood that the specified traffic target can be considered as the traffic target of interest, and the specified traffic target can be determined from all the traffic targets perceived by the perception sensor according to actual needs; both the first time stamp and the second time stamp are multiple, and the multiple first time stamps are sorted in chronological order, and the multiple second time stamps are also sorted in chronological order.
[0084] During the specific implementation of step S101, the road sampling data within the specified time period collected by the perception sensor and the inertial navigation sensor on the road sampling vehicle is obtained. The road sampling data is the road sampling data within the specified time period related to the road sampling vehicle and the specified traffic target; an OpenSCENARIO scenario is generated through the obtained road sampling data. The specific process of generating the OpenSCENARIO scenario is described in detail in the following steps.
[0085] Step S102: Transform the first pose information to a preset global coordinate system to obtain the third pose information.
[0086] It should be noted that a global coordinate system is preset. The x-axis of the global coordinate system points east, the y-axis points north, and the z-axis points vertically upward to the sky. Similarly, the directions of the axes of the global coordinate system can be set according to actual needs and are not limited here. The coordinate origin of the global coordinate system is located at the vehicle's inertial navigation position at the initial moment, where the initial moment is the time point corresponding to the first first timestamp within the specified time period. That is to say, the coordinate origin of the global coordinate system is located at: the vehicle's inertial navigation position in the first pose information corresponding to the first first timestamp. The vehicle's inertial navigation position can be considered as the inertial navigation position of the road sampling vehicle. In the embodiments of the present invention, "the vehicle" refers to the road sampling vehicle.
[0087] The first pose information of the road sampling vehicle includes first position information and first attitude information. In the specific implementation process of step S102, the vehicle's inertial navigation longitude and latitude in the first position information are transformed into the UTM (Universal Transverse Mercator Grid System) coordinate system to obtain UTM coordinates. The UTM coordinates and the altitude in the first position information are transformed into the global coordinate system to obtain the third position information used to form the third pose information.
[0088] Determine the first attitude information corresponding to the first first timestamp in the global coordinate system as the initial attitude. Determine the attitude information of the first attitude information corresponding to each first timestamp relative to the initial attitude to obtain the third attitude information used to form the third pose information. For example: Determine the yaw angle, roll angle, and pitch angle deviations of the vehicle's inertial navigation relative to the initial attitude at each first timestamp. The yaw angle, roll angle, and pitch angle deviations of the vehicle's inertial navigation relative to the initial attitude can be used as the third attitude information.
[0089] After obtaining the third position information and the third attitude information, the third pose information can be obtained, that is, the third pose information is composed of the third position information and the third attitude information.
[0090] Step S103: Use the installation position of the inertial navigation sensor in the vehicle's coordinate system of the road sampling vehicle to determine the second vehicle origin position corresponding to the first vehicle origin position of the road sampling vehicle in the global coordinate system at each first timestamp.
[0091] In the specific implementation process of step S103, use the installation position of the inertial navigation sensor in the vehicle's coordinate system of the road sampling vehicle to determine the coordinate position of the first vehicle origin position of the road sampling vehicle in the global coordinate system at each first timestamp (referred to as the second vehicle origin position). It can be understood that each determined second vehicle origin position also needs to retain the first timestamp.
[0092] Step S104: According to the origin position of the second vehicle, transform the second pose information into the global coordinate system to obtain the fourth pose information at each second timestamp.
[0093] The second pose information of the specified traffic target includes second position information and second attitude information; in the specific process of implementing step S104, based on the installation position of the perception sensor in the vehicle coordinate system, the second position information is transformed into the vehicle coordinate system, and then the second position information in the vehicle coordinate system is transformed into the global coordinate system to obtain the fourth position information.
[0094] It can be understood that due to the different data collection frequencies of the perception sensor and the inertial navigation sensor, usually the frequency of the perception sensor outputting data (such as second pose information) of the specified traffic target is much lower than the frequency of the inertial navigation sensor outputting data of the road sampling vehicle. Therefore, for each second timestamp, an adjacent or identical first timestamp can be found; on the basis of the above content, the specific method of transforming the second position information in the vehicle coordinate system into the global coordinate system is as follows:
[0095] Based on the origin position of the second vehicle corresponding to each first timestamp, calculate the origin position of the second vehicle corresponding to each second timestamp by interpolation, that is, the origin position of the second vehicle corresponding to each second timestamp can be calculated by interpolation.
[0096] Using the origin position of the second vehicle corresponding to each second timestamp, transform the second position information in the vehicle coordinate system into the global coordinate system to obtain the fourth position information; that is, for each second timestamp, using the origin position of the second vehicle corresponding to this second timestamp, the second position information corresponding to this second timestamp in the vehicle coordinate system can be transformed into the global coordinate system to obtain the fourth position information.
[0097] Since the pose information includes attitude information and position information, after the second position information corresponding to each second timestamp is transformed into the global coordinate system, combined with the second attitude information and the obtained fourth position information, the fourth pose information in the global coordinate system is formed. That is, for each second timestamp, combining the second attitude information and the fourth position information corresponding to this second timestamp can obtain the fourth pose information corresponding to this second timestamp.
[0098] Step S105: Generate the entity part of the OpenSCENARIO scenario based on the road sampling vehicle and the specified traffic target.
[0099] In the specific process of implementing step S105, add the road sampling vehicle and the specified traffic target to the entity part of OpenSCENARIO to generate the entity part of the OpenSCENARIO scenario.
[0100] Specifically, in the entity part of the OpenSCENARIO scenario, the entity name of the traffic target entity (i.e., the entity corresponding to the specified traffic target) is defined by the unique number of the specified traffic target. The entity name of the vehicle entity (i.e., the entity corresponding to the road sampling vehicle) can be defined as ego (for example only); the type of the specified traffic target corresponds to the type of the traffic target entity, and the type of the vehicle entity can be defined as Vehicle (for example only); the length, width, and height of the specified traffic target correspond to the length, width, and height of the BoundingBox of the traffic target entity, and the length, width, and height of the vehicle entity can be set according to the measurement results (measured through various means).
[0101] Step S106: Using the first second timestamp as the initial simulation time, convert the first timestamp and other second timestamps into the first simulation timestamp and the second simulation timestamp respectively with the initial simulation time as the reference.
[0102] In the process of specifically implementing step S106, the first second timestamp is used as the initial simulation time, that is, the first second timestamp when the second pose information of the specified traffic target is first collected is used as the initial simulation time. Based on this initial simulation time as the reference, the first timestamp is converted into the first simulation timestamp, and other second timestamps are converted into the second simulation timestamp.
[0103] Step S107: Generate the initialization part of the storyboard of the OpenSCENARIO scenario by using the third pose information and the fourth pose information corresponding to the initial simulation time.
[0104] In the process of specifically implementing step S107, linear interpolation is performed based on the third pose information corresponding to each first simulation timestamp to calculate the third pose information corresponding to the initial simulation time. The third pose information (in the global coordinate system) and the fourth pose information (in the global coordinate system) corresponding to the initial simulation time are defined in the initialization part (Init part) of the storyboard of the OpenSCENARIO scenario to generate the initialization part of the storyboard of the OpenSCENARIO scenario.
[0105] Specifically, the third pose information corresponding to the initial simulation time is defined as the initial pose of the road sampling vehicle in the initialization section. Among them, the third pose information corresponding to the initial simulation time is described by the WorldPosition tag in OpenSCENARIO. The x, y, and z in the WorldPosition tag correspond to the coordinates of the vehicle entity itself, and the h, p, and r in the WorldPosition tag correspond to the yaw angle, pitch angle, and roll angle of the vehicle entity itself, respectively. Similarly, when the fourth pose information corresponding to the initial simulation time is defined in the initialization section of the storyboard of the OpenSCENARIO scenario, the fourth pose information corresponding to the initial simulation time is also described by the WorldPosition tag. For the specific content of the WorldPosition tag describing the fourth pose information, please refer to the foregoing explanation and will not be elaborated here.
[0106] It should be noted that the fourth pose information corresponding to the initial simulation time specifically refers to: the pose information of the specified traffic target perceived at the initial simulation time in the global coordinate system corresponding to this initial simulation time. Among them, perceiving a certain specified traffic target at a certain moment specifically means: collecting the pose information corresponding to the specified traffic target at that moment. Similarly, not perceiving a certain specified traffic target at a certain moment specifically means: not collecting the pose information corresponding to the specified traffic target at that moment.
[0107] Step S108: Generate the story part of the storyboard based on the third pose information corresponding to each first simulation timestamp and the fourth pose information corresponding to each second simulation timestamp to obtain the final OpenSCENARIO scenario.
[0108] It should be noted that the story part (Story part) of the storyboard is similar to a narrative novel, and the story part is used to organize different parts of the OpenSCENARIO scenario. The Act concept in the story part is used to define conditional action groups (ManeuverGroup), and the ManeuverGroup describes "who" is doing things by specifying the entity as the executor (Actor) of the action. Multiple Maneuvers can be included under the ManeuverGroup, and the Maneuver defines "what" is happening. The Maneuver is a container for events (Event), and the Event contains the specific action (action) and the trigger condition (Trigger) of this specific action.
[0109] Based on the above, during the specific implementation of step S108, a first Act for forming a story part is defined based on the third pose information corresponding to each first simulation timestamp; a second Act for forming a story part is defined based on the fourth pose information corresponding to each second simulation timestamp; after defining the first Act and the second Act, the story part of the storyboard is generated. After generating the entity part of the OpenSCENARIO scenario, the initialization part of the storyboard, and the story part of the storyboard through the above steps, the final OpenSCENARIO scenario can be obtained, and this final OpenSCENARIO scenario is a traffic scenario that can be used to test intelligent driving algorithms.
[0110] It should be noted that for the specific process of how to define the first Act and the second Act, please refer to the following embodiments of the present invention Figure 2 for the content.
[0111] In the embodiments of the present invention, road acquisition data within a specified time period collected by a road acquisition vehicle is obtained. The coordinate system of the road acquisition data is transformed, and the entity part, initialization part, and story part of the storyboard of the OpenSCENARIO scenario are generated using the road acquisition data after coordinate system transformation to obtain the final OpenSCENARIO scenario. The final OpenSCENARIO scenario includes traffic participants such as road acquisition vehicles and specified traffic targets, and the final OpenSCENARIO scenario also describes the actions of each traffic participant in a storyboard, which can reflect the real traffic situation and does not require technicians to manually build a traffic scenario, improving work efficiency and the authenticity of the built traffic scenario.
[0112] The above embodiments of the present invention Figure 1 In step S108, the first Act and the second Act involved are used to explain how to define the first Act and the second Act through the content shown Figure 2 See Figure 2 , which shows the flowchart of generating the story part of the storyboard provided by the embodiments of the present invention, including the following steps:
[0113] Step S201: Add a first ManeuverGroup description corresponding to the road acquisition vehicle to the first Act and specify the road acquisition vehicle as an actor.
[0114] It should be noted that the first Act is used to define the first ManeuverGroup.
[0115] In the process of specifically implementing step S201, based on the OpenSCENARIO protocol, add the description of the first ManeuverGroup corresponding to the road sampling vehicle in the first Act, and specify the actor as the vehicle entity itself (denoted by Ego), that is, specify the road sampling vehicle as the actor.
[0116] Step S202: Add the first Event in the first Maneuver under the first ManeuverGroup, and add the first action and the triggering condition for triggering the first action in the first Event to define the first Act that completes the story part for composing the storyboard.
[0117] It should be noted that in the first action, each first simulation timestamp and its corresponding third pose information are described in the way of FollowTrajectoryAction.
[0118] In the process of specifically implementing step S202, add the first Event in the first Maneuver under the first ManeuverGroup, and add the first action and the first triggering condition for triggering the first action in the first Event to define the first Act, which is used to compose the story part of the storyboard.
[0119] It should be noted that FollowTrajectoryAction under PrivateAction in the OpenSCENARIO standard can describe the trajectory change of an entity at each time point according to the relationship between the time point (i.e., timestamp) and the pose information. Therefore, in the first action, each first simulation timestamp and its corresponding third pose information can be described in the way of FollowTrajectoryAction.
[0120] In some embodiments, the first triggering condition is set through the simulation time condition SimulationTimeCondition of OpenSCENARIO, and can be set to trigger the first triggering condition when the simulation time is greater than 0, and the first action is triggered when the first triggering condition is triggered.
[0121] Step S203: Add the description of the second ManeuverGroup corresponding to the specified traffic target to the second Act and specify the specified traffic target as the actor.
[0122] It should be noted that the second Act is used to define the second ManeuverGroup.
[0123] In the process of specifically implementing step S203, based on the OpenSCENARIO protocol, add a description of the second ManeuverGroup corresponding to the specified traffic target in the second Act, and specify the actor as the traffic target entity corresponding to the specified traffic target.
[0124] Step S204: Add at least one Event to the second Maneuver under the second ManeuverGroup, and respectively add an action and a trigger condition for triggering the action to each of the at least one Event, so as to define the second Act that completes the story part for composing the storyboard, and obtain the final OpenSCENARIO scenario.
[0125] It should be noted that the at least one Event includes the second Event, or the at least one Event includes the second Event and the third Event, or the at least one Event includes the second Event and the fourth Event, or the at least one Event includes the second Event, the third Event and the fourth Event. The second action, the third action and the fourth action are the actions added to the second Event, the third Event and the fourth Event respectively.
[0126] The second action describes each second simulation timestamp and its corresponding fourth pose information of the specified traffic target in the way of FollowTrajectoryAction, the third action describes the deletion action of the specified traffic target in the way of DeleteEntityAction, and the fourth action describes the addition action of the specified traffic target in the way of AddEntityAction; the third action is used to delete the specified traffic target from the scenario corresponding to the OpenSCENARIO scenario when triggered, and the fourth action is used to add the specified traffic target to the scenario corresponding to the OpenSCENARIO scenario when triggered.
[0127] In the process of specifically implementing step S204, for each specified traffic target, add at least one Event to the second Maneuver corresponding to the specified traffic target, and respectively add an action and a trigger condition for triggering the action to the at least one Event; after adding the Events and actions corresponding to each specified traffic target, the second Act that completes the story part for composing the storyboard is defined.
[0128] The story part is generated after the first Act and the second Act are completed; after the entity part, the initialization part of the storyboard, and the story part of the storyboard are generated, the final OpenSCENARIO scenario can be obtained.
[0129] It should be noted that for each specified traffic target, the specified traffic target may be perceived at the initial simulation time or may not be perceived at the initial simulation time; the specific content of at least one Event, action, and trigger condition corresponding to a certain specified traffic target is related to whether the specified traffic target is perceived at the initial simulation time. The specific content of at least one Event, action, and trigger condition corresponding to the specified traffic target is introduced separately below.
[0130] Explanation of the specified traffic target (adding the second Event, or adding the second Event and the third Event) perceived at the initial simulation time:
[0131] First, describe the initial pose of the specified traffic target in the initialization part of the storyboard; then add the second Event in the second Maneuver, and add the second action and the second trigger condition for triggering the second action in the second Event. If the last second simulation timestamp corresponding to the specified traffic target is before the simulation end time of the entire OpenSCENARIO scenario, then the third Event (that is, adding the second Event and the third Event) needs to be added in the second Maneuver, and add the third action and the third trigger condition for triggering the third action in the third Event. If the last second simulation timestamp corresponding to the specified traffic target is after the simulation end time, then the third Event does not need to be added (that is, only the second Event is added).
[0132] It should be noted that the last second simulation timestamp corresponding to the specified traffic target is the last second simulation timestamp when the specified traffic target "exists" (is perceived). If the last second simulation timestamp corresponding to the specified traffic target is before the simulation end time, it means that the specified traffic target will disappear in the OpenSCENARIO scenario before the simulation ends. Therefore, the third Event needs to be added, and add the third action and the third trigger condition for triggering the third action in the third Event. The third action will delete the specified traffic target from the OpenSCENARIO scenario when triggered.
[0133] In the above content, the second trigger condition can be set through the SimulationTimeCondition of OpenSCENARIO, and can be set to trigger the second trigger condition when the simulation time is greater than 0. When the second trigger condition is triggered, the second action is triggered. The third trigger condition can be set through the SimulationTimeCondition of OpenSCENARIO, and can be set to trigger the third trigger condition when the simulation time is greater than the second time stamp when the specified traffic target "disappears". When the third trigger condition is triggered, the third action is triggered.
[0134] It should be noted that when the third trigger condition is triggered, it can be considered that at the second simulation time stamp when the specified traffic target "disappears", the specified traffic target is deleted from the OpenSCENARIO scenario.
[0135] Explanation of the specified traffic target not perceived at the initial simulation moment (adding the second Event and the fourth Event, or adding the second Event, the third Event and the fourth Event):
[0136] Since the specified traffic target is not perceived at the initial simulation moment, it is necessary to add the specified traffic target to the OpenSCENARIO scenario when the specified traffic target "appears" (is perceived).
[0137] First, add the fourth Event to the second Maneuver, and add the fourth action and the fourth trigger condition for triggering the fourth action in the fourth Event; then add the second Event to the second Maneuver, and add the second action and the second trigger condition for triggering the second action in the second Event. If the last second simulation time stamp corresponding to the specified traffic target is before the simulation end time of the entire OpenSCENARIO scenario, it is necessary to add the third Event (i.e., add the second Event, the third Event and the fourth Event) to the second Maneuver, and add the third action and the third trigger condition for triggering the third action in the third Event. If the last second simulation time stamp corresponding to the specified traffic target is after the simulation end time, there is no need to add the third Event (i.e., only add the second Event and the fourth Event).
[0138] In the above content, the fourth trigger condition can be set through the SimulationTimeCondition of OpenSCENARIO. It can be set to trigger the fourth trigger condition when the simulation time is greater than the second simulation timestamp when the specified traffic target "appears" (is perceived). When the fourth trigger condition is triggered, the fourth action is triggered. The second trigger condition can be set through the SimulationTimeCondition of OpenSCENARIO. It can be set to trigger the second trigger condition when the simulation time is greater than 0. The third trigger condition can be set through the SimulationTimeCondition of OpenSCENARIO. It can be set to trigger the third trigger condition when the simulation time is greater than the second simulation timestamp when the specified traffic target "disappears".
[0139] It should be noted that when the fourth trigger condition is triggered, it can be considered that the specified traffic target is added to the OpenSCENARIO scenario at the second simulation timestamp when the specified traffic target "appears".
[0140] The above is the relevant description of how to generate the story part of the storyboard. After generating the story part of the storyboard, combining the generated entity part, the initialization part of the storyboard, and the story part of the storyboard, the final OpenSCENARIO scenario can be obtained. The final OpenSCENARIO scenario describes the actions of each traffic participant in the storyboard, can reflect the real traffic situation, and does not require technicians to manually build the traffic scenario, improving work efficiency and the authenticity of the built traffic scenario.
[0141] To better explain the above embodiments of the present invention Figure 2 in the process of adding at least one Event corresponding to a specified traffic target, taking adding at least one Event corresponding to a certain specified traffic target as an example, through Figure 3 the flowchart of adding at least one Event corresponding to a specified traffic target shown is used for illustration by way of example, Figure 3 including the following steps:
[0142] Step S301: Determine whether the specified traffic target is perceived at the initial simulation moment. If the specified traffic target is perceived at the initial simulation moment, execute Step S302; if the specified traffic target is not perceived at the initial simulation moment, execute Step S303.
[0143] Step S302: Describe the initial pose of the specified traffic target in the initialization part of the storyboard, and execute Step S304.
[0144] Step S303: Add a fourth Event to the second Maneuver, and add a fourth action and a fourth trigger condition to the fourth Event, then execute Step S304.
[0145] Step S304: Add a second Event to the second Maneuver, and add a second action and a second trigger condition to the second Event.
[0146] Step S305: Determine whether the specified traffic target disappears before the end of the simulation. If the specified traffic target disappears before the end of the simulation, execute Step S306; if the specified traffic target does not disappear before the end of the simulation, execute Step S307.
[0147] Step S306: Add a third Event to the second Maneuver, and add a third action and a third trigger condition to the third Event.
[0148] Step S307: There is no need to add a third Event to the second Maneuver.
[0149] It should be noted that for the execution principles in Steps S301 to S307, reference can be made to the content in the above embodiments of the present invention Figure 2 and will not be elaborated here.
[0150] Corresponding to the method for generating a traffic scenario provided in the above embodiments of the present invention, refer to Figure 4 , the embodiments of the present invention further provide a structural block diagram of a device for generating a traffic scenario. The device includes: an acquisition unit 401, a first transformation unit 402, a determination unit 403, a second transformation unit 404, a first generation unit 405, a conversion unit 406, a second generation unit 407, and a third generation unit 408;
[0151] The acquisition unit 401 is configured to acquire road acquisition data within a specified time period collected by a road acquisition vehicle. The road acquisition data includes the first pose information of the road acquisition vehicle carrying a first time stamp and the second pose information of a specified traffic target carrying a second time stamp. The specified traffic target is any traffic target sensed by a sensing sensor disposed on the road acquisition vehicle. The first pose information is collected by an inertial navigation sensor disposed on the road acquisition vehicle, and the second pose information is collected by the sensing sensor.
[0152] The first transformation unit 402 is configured to transform the first pose information to a preset global coordinate system to obtain a third pose information. The coordinate origin of the global coordinate system is located at: the vehicle inertial navigation position in the first pose information corresponding to the first first time stamp.
[0153] A determination unit 403, configured to determine, according to the installation position of an inertial navigation sensor in the vehicle coordinate system of a road sampling vehicle, a second vehicle origin position corresponding to a first vehicle origin position of the road sampling vehicle at each first timestamp in the global coordinate system.
[0154] A second transformation unit 404, configured to transform the second pose information to the global coordinate system according to the second vehicle origin position, so as to obtain fourth pose information at each second timestamp.
[0155] A first generation unit 405, configured to generate an entity part of an OpenSCENARIO scenario based on the road sampling vehicle and a specified traffic target.
[0156] A conversion unit 406, configured to use the first second timestamp as an initial simulation moment, and respectively convert the first timestamp and other second timestamps into a first simulation timestamp and a second simulation timestamp with the initial simulation moment as a reference.
[0157] A second generation unit 407, configured to generate an initialization part of a storyboard of the OpenSCENARIO scenario by using the third pose information and the fourth pose information corresponding to the initial simulation moment.
[0158] In a specific implementation, the second generation unit is specifically configured to: perform linear interpolation based on the third pose information corresponding to each first simulation timestamp, and calculate the third pose information corresponding to the initial simulation moment; define the third pose information corresponding to the initial simulation moment and the fourth pose information into the initialization part of the storyboard of the OpenSCENARIO scenario.
[0159] A third generation unit 408, configured to generate a story part of the storyboard based on the third pose information corresponding to each first simulation timestamp and the fourth pose information corresponding to each second simulation timestamp, so as to obtain a final OpenSCENARIO scenario.
[0160] Preferably, in combination with Figure 4 the content shown, the first pose information includes first position information and first attitude information; the first transformation unit 402 includes: a first transformation module, a second transformation module, a first determination module, and a second determination module, and the execution principles of each module are as follows:
[0161] The first transformation module is configured to transform the vehicle inertial navigation longitude and latitude in the first position information to the UTM coordinate system to obtain UTM coordinates.
[0162] The second transformation module is configured to transform the UTM coordinates and the altitude in the first position information to the global coordinate system to obtain third position information for composing the third pose information.
[0163] The first determination module is configured to determine the first pose information corresponding to the first timestamp in the global coordinate system as the initial pose.
[0164] The second determination module is configured to determine the pose information of the first pose information corresponding to each first timestamp relative to the initial pose, so as to obtain the third pose information for composing the third pose information.
[0165] Preferably, in combination with Figure 4 the content shown, the second pose information includes second position information and second pose information; the second transformation unit 404 includes: a first transformation module, a calculation module, a second transformation module, and a composition module, and the execution principles of each module are as follows:
[0166] The first transformation module is configured to transform the second position information to the vehicle coordinate system based on the installation position of the perception sensor in the vehicle coordinate system.
[0167] The calculation module is configured to calculate the second vehicle origin positions corresponding to each second timestamp by interpolation based on the second vehicle origin positions corresponding to each first timestamp.
[0168] The second transformation module is configured to use the second vehicle origin positions corresponding to each second timestamp to transform the second position information in the vehicle coordinate system to the global coordinate system, so as to obtain the fourth position information.
[0169] The composition module is configured to combine the fourth position information and the second pose information to compose the fourth pose information in the global coordinate system.
[0170] In the embodiment of the present invention, road acquisition data collected by a road acquisition vehicle within a specified time period is obtained. The coordinate system of the road acquisition data is transformed, and the transformed road acquisition data is used to generate the entity part, the initialization part, and the story part of the storyboard of the OpenSCENARIO scenario, so as to obtain the final OpenSCENARIO scenario. The final OpenSCENARIO scenario includes traffic participants such as road acquisition vehicles and specified traffic targets, and the final OpenSCENARIO scenario also describes the actions of each traffic participant in the storyboard, which can reflect the real traffic situation, and does not require technicians to manually build a traffic scenario, improving work efficiency and the authenticity of the built traffic scenario.
[0171] Preferably, in combination with Figure 4 the content shown, the third generation unit 408 includes: a first addition module, a first processing module, a second addition module, and a second processing module, and the execution principles of each module are as follows:
[0172] The first addition module is used to add the description of the first ManeuverGroup corresponding to the road collection vehicle to the first Act and specify the road collection vehicle as the actor, where the first Act is used to define the first ManeuverGroup.
[0173] The first processing module is used to add the first Event to the first Maneuver under the first ManeuverGroup, and add the first action and the trigger condition for triggering the first action in the first Event, so as to define the first Act that completes the story part for composing the storyboard, where each first simulation timestamp and its corresponding third pose information are described in the first action in the way of FollowTrajectoryAction.
[0174] The second addition module is used to add the description of the second ManeuverGroup corresponding to the specified traffic target to the second Act and specify the specified traffic target as the actor, where the second Act is used to define the second ManeuverGroup.
[0175] The second processing module is used to add at least one Event to the second Maneuver under the second ManeuverGroup, and add actions respectively and the trigger conditions for triggering the actions in at least one Event, so as to define the second Act that completes the story part for composing the storyboard and obtain the final OpenSCENARIO scenario.
[0176] Wherein, at least one Event includes the second Event, or at least one Event includes the second Event and the third Event, or at least one Event includes the second Event and the fourth Event, or at least one Event includes the second Event, the third Event and the fourth Event.
[0177] Each second simulation timestamp and its corresponding fourth pose information of the specified traffic target are described in the second action in the way of FollowTrajectoryAction, the deletion action of the specified traffic target is described in the third action in the way of DeleteEntityAction, and the addition action of the specified traffic target is described in the fourth action in the way of AddEntityAction;
[0178] The second action, the third action and the fourth action are the actions added in the second Event, the third Event and the fourth Event respectively.
[0179] In summary, the embodiments of the present invention provide a method and apparatus for generating a traffic scenario, which acquire road acquisition data within a specified time period collected by a road acquisition vehicle. Transform the coordinate system of the road acquisition data, and use the road acquisition data after coordinate system transformation to generate the entity part, initialization part, and story part of the storyboard of the OpenSCENARIO scenario, so as to obtain the final OpenSCENARIO scenario. The final OpenSCENARIO scenario includes traffic participants such as road acquisition vehicles and specified traffic targets, and the final OpenSCENARIO scenario also describes the actions of each traffic participant in the storyboard, which can reflect the real traffic situation, and does not require technicians to manually build a traffic scenario, improving work efficiency and the authenticity of the built traffic scenario.
[0180] Each embodiment in this specification is described in a progressive manner. The same or similar parts among the embodiments can be referred to each other, and the key point of each embodiment is to illustrate the differences from other embodiments. In particular, for a system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The systems and system embodiments described above are merely illustrative. 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 may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.
[0181] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0182] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a traffic scenario, characterized in that, the method includes: Obtaining road acquisition data within a specified time period collected by a road acquisition vehicle, where the road acquisition data includes the first pose information with a first timestamp of the road acquisition vehicle and the second pose information with a second timestamp of a specified traffic target. The specified traffic target is any traffic target sensed by a sensing sensor installed on the road acquisition vehicle. The first pose information is collected by an inertial navigation sensor installed on the road acquisition vehicle, and the second pose information is collected by the sensing sensor; Transforming the first pose information to a preset global coordinate system to obtain third pose information, where the coordinate origin of the global coordinate system is located at the vehicle inertial position in the first pose information corresponding to the first timestamp; Using the installation position of the inertial navigation sensor in the vehicle coordinate system of the road acquisition vehicle to determine the second vehicle origin position corresponding to the first vehicle origin position of the road acquisition vehicle at each of the first timestamps in the global coordinate system; According to the second vehicle origin position, transforming the second pose information to the global coordinate system to obtain fourth pose information for each of the second timestamps; Generating the entity part of the OpenSCENARIO scenario based on the road acquisition vehicle and the specified traffic target; Taking the first of the second timestamps as the initial simulation time, and converting the first timestamp and other second timestamps into a first simulation timestamp and a second simulation timestamp respectively based on the initial simulation time; Using the third pose information and the fourth pose information corresponding to the initial simulation time to generate the initialization part of the storyboard of the OpenSCENARIO scenario; Defining a first Act for composing the story part based on the third pose information corresponding to each of the first simulation timestamps, and defining a second Act for composing the story part based on the fourth pose information corresponding to each of the second simulation timestamps to generate the story part of the storyboard, so as to obtain the final OpenSCENARIO scenario; The Act in the story part is used to define a conditional action group ManeuverGroup, and the ManeuverGroup is described by specifying an entity as the actor of the action. The ManeuverGroup includes at least one Maneuver, and the Maneuver is a container for an event Event. The Event contains a specific action action and the trigger condition Trigger of the specific action; wherein, the action describes the simulation timestamp and its corresponding pose information of the road acquisition vehicle or the specified traffic target in the form of FollowTrajectoryAction.
2. The method according to claim 1, characterized in that, the first pose information includes first position information and first attitude information; Transform the first pose information to a preset global coordinate system to obtain third pose information, including: Transform the vehicle's inertial longitude and latitude in the first position information to the UTM coordinate system to obtain UTM coordinates; Transform the UTM coordinates and the altitude in the first position information to the global coordinate system to obtain third position information for composing the third pose information; Determine the first attitude information corresponding to the first timestamp in the global coordinate system as the initial attitude; Determine the attitude information of the first attitude information corresponding to each of the first timestamps relative to the initial attitude to obtain third attitude information for composing the third pose information.
3. The method according to claim 1, wherein, The second pose information includes second position information and second attitude information; According to the second vehicle origin position, transform the second pose information to the global coordinate system to obtain fourth pose information for each of the second timestamps, including: Based on the installation position of the perception sensor in the vehicle coordinate system, transform the second position information to the vehicle coordinate system; Based on the second vehicle origin position corresponding to each of the first timestamps, calculate the second vehicle origin position corresponding to each of the second timestamps by interpolation; Use the second vehicle origin position corresponding to each of the second timestamps to transform the second position information in the vehicle coordinate system to the global coordinate system to obtain fourth position information; Combine the fourth position information and the second attitude information to form the fourth pose information in the global coordinate system.
4. The method according to claim 1, wherein, Use the third pose information and the fourth pose information corresponding to the initial simulation moment to generate the initialization part of the storyboard of the OpenSCENARIO scenario, including: Perform linear interpolation based on the third pose information corresponding to each first simulation timestamp to calculate the third pose information corresponding to the initial simulation moment; Define the third pose information and the fourth pose information corresponding to the initial simulation moment in the initialization part of the storyboard of the OpenSCENARIO scenario.
5. The method according to claim 1, wherein, Define the first Act for composing the story part based on the third pose information corresponding to each of the first simulation timestamps, and define the second Act for composing the story part based on the fourth pose information corresponding to each of the second simulation timestamps to generate the story part of the storyboard to obtain the final OpenSCENARIO scenario, including: Add the description of the first ManeuverGroup corresponding to the road sampling vehicle to the first Act and specify the road sampling vehicle as the actor, where the first Act is used to define the first ManeuverGroup; Add a first Event to the first Maneuver under the first ManeuverGroup, and add a first action and a trigger condition for triggering the first action to the first Event to define the first Act that completes the story part for composing the storyboard, where each of the first simulation timestamps and their corresponding third pose information are described in the first action in the way of FollowTrajectoryAction; Add the description of the second ManeuverGroup corresponding to the specified traffic target to the second Act and specify the specified traffic target as the actor, where the second Act is used to define the second ManeuverGroup; Add at least one Event to the second Maneuver under the second ManeuverGroup, and add actions and trigger conditions for triggering the actions to the at least one Event respectively to define the second Act that completes the story part for composing the storyboard, so as to obtain the final OpenSCENARIO scenario; Wherein, the at least one Event includes a second Event, or the at least one Event includes a second Event and a third Event, or the at least one Event includes a second Event and a fourth Event, or the at least one Event includes a second Event, a third Event and a fourth Event; Each of the second simulation timestamps of the specified traffic target and their corresponding fourth pose information are described in the second action in the way of FollowTrajectoryAction, the deletion action of the specified traffic target is described in the third action in the way of DeleteEntityAction, and the addition action of the specified traffic target is described in the fourth action in the way of AddEntityAction; The second action, the third action and the fourth action are the actions added to the second Event, the third Event and the fourth Event respectively.
6. A device for generating a traffic scenario, characterized in that, the device includes: An acquisition unit, configured to acquire road acquisition data within a specified time period collected by a road acquisition vehicle, where the road acquisition data includes the first pose information of the road acquisition vehicle carrying a first timestamp and the second pose information of a specified traffic target carrying a second timestamp, the specified traffic target is any traffic target sensed by a sensing sensor disposed on the road acquisition vehicle, the first pose information is acquired by an inertial navigation sensor disposed on the road acquisition vehicle, and the second pose information is acquired by the sensing sensor; The first transformation unit is configured to transform the first pose information into a preset global coordinate system to obtain third pose information, where the coordinate origin of the global coordinate system is located at: the vehicle's inertial navigation position in the first pose information corresponding to the first of the first timestamps; The determination unit is configured to use the installation position of the inertial navigation sensor in the vehicle coordinate system of the road sampling vehicle to determine the second vehicle origin position corresponding to the first vehicle origin position of the road sampling vehicle at each of the first timestamps in the global coordinate system; The second transformation unit is configured to transform the second pose information into the global coordinate system according to the second vehicle origin position to obtain fourth pose information for each of the second timestamps; The first generation unit is configured to generate an entity part of the OpenSCENARIO scenario based on the road sampling vehicle and the specified traffic target; The conversion unit is configured to use the first of the second timestamps as the initial simulation time and convert the first timestamp and other second timestamps into a first simulation timestamp and a second simulation timestamp respectively based on the initial simulation time; The second generation unit is configured to generate an initialization part of the storyboard of the OpenSCENARIO scenario by using the third pose information and the fourth pose information corresponding to the initial simulation time; The third generation unit defines a first Act for composing a story part based on the third pose information corresponding to each of the first simulation timestamps, and defines a second Act for composing a story part based on the fourth pose information corresponding to each of the second simulation timestamps, so as to generate the story part of the storyboard to obtain the final OpenSCENARIO scenario; an Act in the story part is used to define a conditional action group ManeuverGroup, the ManeuverGroup is described by specifying an entity as an actor of the action, at least one Maneuver is included under the ManeuverGroup, the Maneuver is a container for an event Event, and the Event contains a specific action action and a trigger condition Trigger for the specific action; wherein, the action describes the simulation timestamp and its corresponding pose information of the road sampling vehicle or the specified traffic target in the form of a FollowTrajectoryAction.
7. The apparatus according to claim 6, wherein, the first pose information includes first position information and first attitude information; the first transformation unit includes: a first transformation module configured to transform the vehicle's inertial navigation longitude and latitude in the first position information into a UTM coordinate system to obtain a UTM coordinate; a second transformation module configured to transform the UTM coordinate and the altitude in the first position information into the global coordinate system to obtain third position information for composing the third pose information; A first determination module, configured to determine the first pose information corresponding to the first timestamp in the global coordinate system as the initial pose; A second determination module, configured to determine the pose information of the first pose information corresponding to each of the first timestamps relative to the initial pose, so as to obtain third pose information for forming third pose information.
8. The apparatus according to claim 6, wherein, the second pose information includes second position information and second pose information; the second transformation unit includes: A first transformation module, configured to transform the second position information to the vehicle coordinate system based on the installation position of the perception sensor in the vehicle coordinate system; A calculation module, configured to calculate the second vehicle origin positions corresponding to each of the second timestamps by interpolation based on the second vehicle origin positions corresponding to each of the first timestamps; A second transformation module, configured to use the second vehicle origin positions corresponding to each of the second timestamps to transform the second position information in the vehicle coordinate system to the global coordinate system, so as to obtain fourth position information; A composition module, configured to combine the fourth position information and the second pose information to form fourth pose information in the global coordinate system.
9. The apparatus according to claim 6, wherein, the second generation unit is specifically configured to: perform linear interpolation based on the third pose information corresponding to each first simulation timestamp, and calculate the third pose information corresponding to the initial simulation moment; define the third pose information corresponding to the initial simulation moment and the fourth pose information in the initialization part of the storyboard of the OpenSCENARIO scenario.
10. The apparatus according to claim 6, wherein, the third generation unit includes: A first addition module, configured to add a description of the first ManeuverGroup corresponding to the road-sampled vehicle to the first Act and specify the road-sampled vehicle as an actor, where the first Act is used to define the first ManeuverGroup; A first processing module, configured to add a first Event to the first Maneuver under the first ManeuverGroup, and add a first action and a trigger condition for triggering the first action to the first Event, so as to define the first Act that completes the story part for forming the storyboard, where the first action describes each of the first simulation timestamps and the corresponding third pose information in the form of a FollowTrajectoryAction; A second addition module, configured to add a description of the second ManeuverGroup corresponding to the specified traffic target to the second Act and specify the specified traffic target as an actor, where the second Act is used to define the second ManeuverGroup; The second processing module is used to add at least one Event to the second Maneuver under the second ManeuverGroup, add an action to each of the at least one Event, and add a trigger condition for triggering the action, so as to define the second Act that completes the story part for composing the storyboard, and obtain the final OpenSCENARIO scenario; Wherein, the at least one Event includes a second Event, or the at least one Event includes a second Event and a third Event, or the at least one Event includes a second Event and a fourth Event, or the at least one Event includes a second Event, a third Event and a fourth Event; The second action describes each of the second simulation timestamps of the specified traffic target and its corresponding fourth pose information in the manner of FollowTrajectoryAction, the third action describes the deletion action of the specified traffic target in the manner of DeleteEntityAction, and the fourth action describes the addition action of the specified traffic target in the manner of AddEntityAction; The second action, the third action and the fourth action are the actions added to the second Event, the third Event and the fourth Event respectively.
Citation Information
Patent Citations
Automatic driving simulation scene generation method and device
CN112069643A
Simulation traffic scene file generation method and device
CN112567374A