CN115542772B - Simulation task control method, device and simulation system - Google Patents

Simulation task control method, device and simulation system Download PDF

Info

Publication number
CN115542772B
CN115542772B CN202211187405.1A CN202211187405A CN115542772B CN 115542772 B CN115542772 B CN 115542772B CN 202211187405 A CN202211187405 A CN 202211187405A CN 115542772 B CN115542772 B CN 115542772B
Authority
CN
China
Prior art keywords
simulation
module
target
message
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211187405.1A
Other languages
Chinese (zh)
Other versions
CN115542772A (en
Inventor
刘钊
郭正东
王成法
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211187405.1A priority Critical patent/CN115542772B/en
Publication of CN115542772A publication Critical patent/CN115542772A/en
Application granted granted Critical
Publication of CN115542772B publication Critical patent/CN115542772B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B17/00Systems involving the use of models or simulators of said systems
    • G05B17/02Systems involving the use of models or simulators of said systems electric

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a simulation task control method, a simulation task control device and a simulation system, relates to the technical field of computers, and particularly relates to the technical field of automatic driving and data simulation. The specific implementation scheme is as follows: determining at least one target algorithm module of an automatic driving system to be accessed; according to the target algorithm module, determining at least one target simulation module of a simulation system to be accessed; determining a simulation propulsion relationship according to the target algorithm module and the target simulation module; and calling a unified interface library according to the propulsion mechanism and the simulation propulsion relation, and controlling the simulation task to run. According to the method, a simulation advancing relation is built according to the target simulation modules and the target algorithm modules required by the simulation tasks, and message conversion is carried out among the modules by utilizing a unified interface library, so that data interaction between the target simulation modules of the simulation system and the target algorithm modules of the different architecture automatic driving systems is realized.

Description

Simulation task control method, device and simulation system
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of autopilot and data simulation technologies.
Background
In order to simulate test of each algorithm module in the automatic driving system, a simulation device for running a simulation test task is required to realize message communication and time synchronization with the algorithm module. There is a certain difference between the solutions of the autopilot systems of different enterprises, especially on the selection of the runtime framework layer, which results in a lack of versatility between the simulation devices of different enterprises.
Disclosure of Invention
The disclosure provides a simulation task control method, a simulation task control device and a simulation system.
According to an aspect of the present disclosure, there is provided a control method of a simulation task, including:
determining at least one target algorithm module of an automatic driving system to be accessed;
determining at least one target simulation module of a simulation system to be accessed according to the target algorithm module;
determining a simulation advancing relation according to the target algorithm module and the target simulation module; the method comprises the steps of,
and calling a unified interface library according to the propulsion mechanism and the simulation propulsion relation, and controlling the simulation task to run.
According to another aspect of the present disclosure, there is provided a control device for a simulation task, including:
the first determining module is used for determining at least one target algorithm module of the automatic driving system to be accessed;
The second determining module is used for determining at least one target simulation module of the simulation system to be accessed according to the target algorithm module;
the third determining module is used for determining a simulation propulsion relationship according to the target algorithm module and the target simulation module; the method comprises the steps of,
and the control module is used for calling the unified interface library according to the propulsion mechanism and the simulation propulsion relation and controlling the running of the simulation task.
According to another aspect of the present disclosure, there is provided a simulation system including: the system comprises a simulation engine, a unified interface library and a plurality of target simulation modules; wherein,
the unified interface library is used for: accessing at least one target simulation module and at least one target algorithm module of an automatic driving system;
the simulation engine is used for: determining a simulation advancing relation according to the target algorithm module and the target simulation module; and calling a unified interface library according to the propulsion mechanism and the simulation propulsion relation to control the operation of the simulation task.
According to another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform a method according to any one of the embodiments of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method according to any of the embodiments of the present disclosure.
According to the method and the system, the simulation advancing relation is built according to the target simulation modules and the target algorithm modules required by the simulation tasks, and the unified interface library is utilized to convert the messages among the modules, so that the data interaction between the target simulation modules of the simulation system and the target algorithm modules of the different architecture automatic driving systems is realized, the difference of the different automatic driving systems can be effectively shielded, and the universality and the portability of the simulation system are improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow diagram of a method of controlling a simulation task in accordance with an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of the relationship of modules accessed by a simulation system in accordance with an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a simulated propulsion relationship according to an embodiment of the present disclosure;
FIG. 4 is a schematic illustration of a propulsion mechanism according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a parse library according to an embodiment of the disclosure;
FIG. 6 is a schematic diagram of a control device for simulation tasks according to an embodiment of the disclosure;
FIG. 7 is a schematic diagram of a simulation system in accordance with an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of a messaging interface according to an embodiment of the present disclosure;
FIG. 9 is a schematic diagram of a time synchronization interface according to an embodiment of the present disclosure;
FIG. 10 is a block diagram of an electronic device for implementing a control method of a simulation task of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the related art, the core architecture of an autopilot system is generally divided into three layers, namely a hardware layer, a software layer and a cloud service layer. The software layer may be subdivided into three layers, namely a real-time operating system layer (Real Time Operation System, RTOS), a runtime framework layer (Runtime Framework), and application algorithm module layers. In order to make up for the defects of automatic driving real vehicle test, the mode widely accepted by each industry is to adopt an automatic driving simulation technology, and along with the improvement of simulation level and popularization of application, the simulation device bears more and more test tasks. In order to realize simulation test of the algorithm module, the simulation device needs to convert scene, map and other data into the input of the algorithm module according to a certain rule, so that message communication between the simulation device and the algorithm module is needed. In order to achieve the message synchronization between the simulation device and the algorithm module, the runtime framework is required to provide a message synchronization mechanism between the modules on the basis of ensuring time synchronization. Therefore, the simulation device is generally built based on a runtime framework layer of the autopilot system, so that the simulation device can simulate the algorithm module on the basis of not changing the implementation of the algorithm module. However, there is a certain variability between autopilot system solutions for different enterprises, especially over the choice of runtime framework layers.
Currently, the main stream runtime framework adopted by each enterprise has a robot operating system ROS (Robot Operating System), LCM (Lightweight Communications and Marshalling) suitable for a high-speed automatic driving scene, cyber RT with hundred-degree self-grinding and the like, and with the progress of automatic driving technology, runtime frameworks with different characteristics are more and more. The interfaces and processing modes between different frameworks have certain differences, especially the interfaces such as message communication, time synchronization and the like, which causes that simulation devices realized based on different runtime frameworks are difficult to be compatible, and even the situation that different simulation devices are maintained for different runtime frameworks can occur. In addition, when the new runtime framework is demanded, the existing simulation device often needs to perform a large amount of adaptation and modification work to achieve the access of the new framework, and the later maintenance and update will be more difficult.
In order to at least partially solve one or more of the above problems and other potential problems, an embodiment of the present disclosure proposes a control method for a simulation task, and by using the technical solution of the embodiment of the present disclosure, simulation tests on algorithm modules of an autopilot system with multiple architectures may be implemented, which has versatility and portability.
FIG. 1 is a flow chart of a method for controlling a simulation task according to an embodiment of the disclosure, as shown in FIG. 1, the method at least includes the following steps:
s101: at least one target algorithm module of the autopilot system to be accessed is determined.
It should be noted that, the test object of the simulation task may be a target algorithm module in different autopilot systems, and the target algorithm module as the test object needs to be connected to a simulation system (may also be referred to as a simulation device). Various autopilot systems are often based on different solutions, in particular, the runtime framework layers of the various autopilot systems may be implemented using different architectures. Thus, there are multiple data protocol types for the target algorithm module of each autopilot system. In one example, the algorithm module may include: at least one of the sensing module, the planning module, the control module and the positioning module may also include any algorithm module in other automatic driving systems, which is not limited herein.
S102: and determining at least one target simulation module of the simulation system to be accessed according to the target algorithm module.
In the embodiment of the disclosure, a target simulation module required to be used by a simulation task is determined according to a target algorithm module to be tested by the simulation task. In one example, the simulation module includes at least one of a data simulation module, a dynamics simulation module, and a sensor simulation module. For example, when the performance of the sensing module needs to be tested, a sensor simulation module and a data simulation module associated with the sensing module need to be accessed at one end of the simulation system to realize the testing of the sensing module.
S103: and determining a simulation advancing relation according to the target algorithm module and the target simulation module.
In the embodiment of the present disclosure, the simulation push relationship can be understood as: the system comprises a topology node formed by each target algorithm module and each target simulation module which are accessed for carrying out simulation tasks, and a topology structure formed by connecting lines among the topology nodes formed by message transmission directions among the modules. The message passing direction can be understood as various message passing paths of the simulation task during the running and advancing process. Either unidirectional or bidirectional.
S104: and calling a unified interface library according to the propulsion mechanism and the simulation propulsion relation, and controlling the simulation task to run.
In the embodiments of the present disclosure, the propulsion mechanism may be understood as: in the running process of the simulation task, under the condition that the preset pushing condition is met, the simulation task is pushed to the next moment or a message and an instruction are sent to the next functional module (at least one of the target algorithm module and the target simulation module) in the message transmission direction, so that the next work is carried out, and the running of the simulation task is controlled.
When the message is transmitted, each functional module transmits the message in the middle through a unified interface library, and the unified interface library can convert the message format.
According to the scheme of the embodiment of the disclosure, the simulation propulsion relationship is constructed according to the target simulation modules and the target algorithm modules required by the simulation task, and the unified interface library is utilized to perform message conversion among the modules, so that the data interaction between the target simulation modules of the simulation system and the target algorithm modules of the different architecture autopilot systems is realized, the difference of the different autopilot systems can be effectively shielded, and the universality and portability of the simulation system are improved.
In one possible implementation, step S103: according to the target algorithm module and the target simulation module, determining a simulation advancing relation, further comprising the steps of:
s201: registration information of the target algorithm module and the target simulation module is obtained.
The registration information may include: at least one of system information, analysis protocol, module parameter file, module input and output, drive test data, scene file, map file and other information. The various registration information organizes data in a data format of Google Protobuf so that the registration information of target algorithm modules from different architecture automatic driving systems is accessed into a simulation system in a unified mode through a unified interface library.
S202: and determining the message passing direction between each target algorithm module and each target simulation module according to the registration information.
Specifically, according to the system information and the module input/output in the registration information, other functional modules which need to perform data interaction for the functional module to realize the simulation test can be determined, so that the message transmission direction between the functional module and the other functional modules which need to perform data interaction is obtained. After receiving the information registered by each functional module, the simulation system stores the information in a mapping table of the configuration management center.
S203: and determining a simulation propulsion relationship according to the target algorithm module, the target simulation module and the message transmission direction.
In an embodiment of the present disclosure, a topology (Topo) structure of an operation process of the simulation system is determined based on registration information of the accessed functional module. In the Topo structure, each functional module is taken as a node, and the message transmission direction among the functional modules is taken as an edge, so that the message transmission path of the simulation task in the running and pushing processes is determined, and the simulation pushing relationship is obtained. It should be noted that, the Topo structure formed by the functional modules is generally a ring, i.e., a Topo loop.
In one example, as shown in fig. 2, the simulation system includes a configurable management center for accessing different algorithm modules of different autopilot systems into the simulation system, enabling distributed access of the modules (module registration). For example, the perception module may be from autopilot system a, the localization module from autopilot system B, and the planning control module from autopilot system C. Similarly, the target simulation modules may also come from different systems. Based on the theoretical basis of Topo analysis, the simulation system adopts theoretical analysis of graph theory, matrix, finite state machine and the like in the prior art to obtain a Topo loop in the simulation operation process, and realizes the module expansion of the simulation task.
According to the scheme of the embodiment of the disclosure, the topological structure formed by each functional module and the message transmission direction among the functional modules are obtained through the registration information of the target algorithm module and the target simulation module, so that the running promotion of the simulation task is realized.
In one possible implementation, step S203: according to the target algorithm module, the target simulation module and the message transmission direction, determining a simulation advancing relation, and further comprising the steps of:
s2031: and respectively determining simulation operation parameters of the target algorithm module and simulation operation parameters of the target simulation module according to the module parameter files contained in the registration information.
S2032: and determining a message analysis mode of each message transmission direction when data interaction occurs according to the data protocol contained in the registration information.
It should be noted that, the message parsing method can be understood as: and determining a data interaction mode between the two functional modules with different analysis protocols according to the analysis protocols contained in the registration information of the different functional modules.
In one example, a certain simulation task is connected to a data simulation module, a planning module, a control module and a dynamics simulation module, and a Topo loop formed by the 4 modules is shown in fig. 3. The message transfer direction includes: the data simulation module needs to send obstacle (obstacle) information and traffic light (traffic_light) information to the planning module. The planning module needs to send path planning (planning) information to the control module. The control module needs to send control (control) information to the dynamics simulation module, which needs to send vehicle status (vehicle) information to the data simulation module and the planning module, respectively. Since the modules may come from different systems, the parsing protocols employed by the modules are not matched with each other. For example, the data simulation module adopts an analysis protocol A, the planning module adopts an analysis protocol B, the control module adopts an analysis protocol C, and the dynamics simulation module adopts an analysis protocol D. Therefore, it is necessary to determine a message parsing scheme for converting from parsing protocol a to parsing protocol B. I.e. the message or data sent by the first functional module based on its own parsing protocol a is converted into a message or data that can be parsed by the parsing protocol B of the second functional module. The analysis mode is recorded in the simulation system, and the conversion of different analysis protocols is completed by the unified interface library.
S2033: based on the target algorithm module, the target simulation module, the message transmission direction, the simulation operation parameters and the message analysis mode, the simulation propulsion relationship is determined.
According to the scheme of the embodiment of the disclosure, the simulation propulsion relation for performing process control on the simulation task is constructed on the basis of the Topo loop by using the registration information of each functional module and taking the simulation operation parameters and the analysis protocol as conditions.
In one possible implementation, step S104: according to the propulsion mechanism and the simulation propulsion relation, a unified interface library is called to control the running of the simulation task, and the method further comprises the following steps:
s301: and determining a target module and a first simulation message to be transmitted according to the propulsion mechanism, wherein the target module comprises at least one target algorithm module and/or at least one target simulation module.
In one example, according to the propulsion mechanism, the sensor emulation module satisfies a preset propulsion condition, for example, new obstacle data is acquired, and a corresponding message or control instruction needs to be sent to the sensing module, so in this example, the target module is the sensing module, and the message or control instruction corresponding to the obstacle data is the first emulation message. In another example, the planning module satisfies a preset advancement condition, e.g., new travel path data is calculated, and a corresponding message or control command needs to be sent to the control module. Thus in this example, the target module is a control module and the message or control instruction corresponding to the travel path data is a first simulation message.
S302: and determining the message transmission direction of the first simulation message according to the simulation advancing relation.
After the target module is determined, the message transfer direction of the first simulation message can be determined according to the message transfer direction on the Topo ring included in the simulation push relationship.
S303: and converting the first simulation message by the unified interface library according to a message analysis mode corresponding to the message transmission direction of the first simulation message to obtain a second simulation message which can be analyzed by the target module.
After the message transmission direction of the first simulation message is determined, calling a unified interface library according to a corresponding message analysis mode, and converting the first simulation message into a second simulation message which can be analyzed by the target module.
S304: and transmitting the second simulation message to the target module by the unified interface library so as to realize the control of the simulation task operation.
According to the scheme of the embodiment of the disclosure, the protocol conversion is carried out on the data sent between the functional modules through the unified interface library, so that the data interaction between the simulation system and the algorithm modules based on different protocols on different automatic driving systems is realized.
In one possible implementation, step S304: according to the propulsion mechanism, determining the target module and the first simulation message to be transferred, further comprising the steps of:
And under the condition that the time pushing condition contained in the pushing mechanism is met, pushing the current moment of the simulation task to the next time stamp.
And determining a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the current time after the pushing.
It should be noted that, the simulation task generally has a plurality of timestamps including preset scene simulation data, where the scene simulation data includes at least one of drive test data, a scene file, and a map file. For example, at 1 minute 21 seconds of the simulation task, driving to the ramp intersection; pedestrians appear in front of the vehicle 2 minutes and 34 seconds in the simulation task; at 3 minutes and 39 seconds of the simulation task, the front intersection is a red light. It can be understood that the simulation task includes a plurality of to-be-processed simulation data with time stamps, and the to-be-processed simulation data is sent to the corresponding functional module, so that the functional module performs corresponding processing, thereby testing the performance of each functional module. As shown in fig. 4, the simulation system sequentially polls each time advance condition of the current time through the clock advance thread (thread 1), and advances the current time of the simulation task to the next time stamp with the simulation data to be processed in the case where at least one time advance condition is satisfied. In the event that the time advance condition is not satisfied, the time thread goes to brief sleep.
According to the scheme of the embodiment of the disclosure, the running of the simulation task is controlled through a time pushing mechanism.
In one possible embodiment, the time advance condition includes: all simulated messaging at the current time is complete.
According to the scheme of the embodiment of the disclosure, after receiving and transmitting all the to-be-processed simulation data at the current moment, the current moment of the simulation task is advanced to the next time stamp, so that the operation of the simulation task is controlled.
In one possible implementation, step S304: according to the propulsion mechanism, determining the target module and the first simulation message to be transferred, further comprising the steps of:
and under the condition that any module operation condition contained in the propulsion mechanism is met, determining a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the module operation condition.
The module operation conditions comprise judgment condition information, target module information and corresponding message information, and the corresponding message is sent to the target module under the condition that the judgment conditions are met. As shown in fig. 4, the simulation system sequentially polls each module operation condition through the module flow control thread (thread 2), and determines a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the target module and the corresponding message information included in the module operation condition when the judgment condition information included in any one of the module operation conditions is satisfied.
According to the scheme of the embodiment of the disclosure, the running of the simulation task is controlled through a module running propulsion mechanism.
In one possible embodiment, the module operating conditions include:
the current moment reaches the preset running moment; or alternatively
And obtaining a preset simulation message.
In one example, after advancing the current time to the next timestamp, the module flow control thread sequentially polls the module operating conditions of each functional module to determine whether a preset operating time of the functional module is reached. In another example, the sensing module acquires a preset simulation message, for example, the preset simulation message may be that a dangerous obstacle is detected, and then a corresponding control message may be sent to the control module.
According to the scheme of the embodiment of the disclosure, whether the operation condition of the module is met is judged by whether the preset operation time is reached or whether the preset simulation message is acquired, so that the operation of the simulation task is controlled.
In one possible embodiment, the above steps: according to the data protocol contained in the registration information, determining a message analysis mode of each message transmission direction when data interaction occurs, and further comprising:
And respectively determining the message analysis modes of the standard drop data analysis library and the drive test data, the standard scene analysis library and the scene file, and the standard map analysis library and the map file according to the data protocol, the drive test data, the user scene file and the map file contained in the registration information.
As shown in fig. 5, according to the data protocol included in the registration information, a standard message protocol between the standard drop data analysis library and the drive test data, a standard scene protocol between the standard scene analysis library and the scene file, and a standard map protocol for labeling between the standard map analysis library and the map file are determined, so that the simulation system can utilize the drive test data, the user scene file and the map file of different protocols to perform scene simulation or scene evaluation.
According to the scheme of the embodiment of the disclosure, the standard drop data analysis library, the standard scene analysis library and the standard map analysis library are used for respectively supporting the access of automatic driving drive test data, user-defined scenes and map files, and the supporting content comprises but is not limited to OpenX series standard protocols, chinese steam-grinding 'Chinese typical scene library', custom formats and standards of various enterprises and the like.
Fig. 6 is a control device for providing a simulation task according to an embodiment of the present disclosure, as shown in fig. 6, the device at least includes:
A first determining module 601, configured to determine at least one target algorithm module of the autopilot system to be accessed.
The second determining module 602 is configured to determine at least one target simulation module of the simulation system to be accessed according to the target algorithm module.
The third determining module 603 is configured to determine a simulation advancing relationship according to the target algorithm module and the target simulation module.
And the control module 604 is used for calling the unified interface library according to the propulsion mechanism and the simulation propulsion relation and controlling the running of the simulation task.
In one possible implementation, the third determining module 603 further includes:
and the acquisition sub-module is used for acquiring the registration information of the target algorithm module and the target simulation module.
And the transmission direction determining submodule is used for determining the message transmission direction between each target algorithm module and each target simulation module according to the registration information.
And the propulsion relation determination submodule is used for determining a simulation propulsion relation according to the target algorithm module, the target simulation module and the message transmission direction.
In one possible implementation, the propulsion relationship determination submodule is further configured to:
and respectively determining simulation operation parameters of the target algorithm module and simulation operation parameters of the target simulation module according to the module parameter files contained in the registration information.
And determining a message analysis mode of each message transmission direction when data interaction occurs according to the data protocol contained in the registration information.
Based on the target algorithm module, the target simulation module, the message transmission direction, the simulation operation parameters and the message analysis mode, the simulation propulsion relationship is determined.
In one possible implementation, the control module 604 includes:
and the first determining submodule is used for determining a target module and a first simulation message to be transmitted according to the propulsion mechanism, wherein the target module comprises at least one target algorithm module and/or at least one target simulation module.
And the second determining submodule is used for determining the message transmission direction of the first simulation message according to the simulation propulsion relation.
And the first calling sub-module is used for calling the unified interface library to convert the first simulation message according to the message analysis mode corresponding to the message transmission direction of the first simulation message so as to obtain a second simulation message which can be analyzed by the target module.
And the second calling sub-module is used for calling the unified interface library to transmit the second simulation message to the target module so as to realize the control of the operation of the simulation task.
In one possible implementation, the first determination submodule is further configured to:
And under the condition that the time pushing condition contained in the pushing mechanism is met, pushing the current moment of the simulation task to the next time stamp.
And determining a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the current time after the pushing.
In one possible implementation, the time advance condition includes: all simulated messaging at the current time is complete.
In one possible implementation, the first determination submodule is further configured to:
and under the condition that any module operation condition contained in the propulsion mechanism is met, determining a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the module operation condition.
In one possible implementation, the module operating conditions include:
the current time reaches a preset running time. Or alternatively
And obtaining a preset simulation message.
In one possible implementation, the propulsion relationship determination submodule is further to:
and respectively determining the message analysis modes of the standard drop data analysis library and the drive test data, the standard scene analysis library and the scene file, and the standard map analysis library and the map file according to the data protocol, the drive test data, the scene file and the map file contained in the registration information.
For descriptions of specific functions and examples of each module and sub-module of the apparatus in the embodiments of the present disclosure, reference may be made to the related descriptions of corresponding steps in the foregoing method embodiments, which are not repeated herein.
FIG. 7 is a diagram illustrating a simulation system, according to an embodiment of the present disclosure, as shown in FIG. 7, the system 700 includes: a simulation engine 701, a unified interface library 703, and a plurality of target simulation modules 702. Wherein,
the unified interface library 703 is used for: at least one target simulation module 702 and at least one target algorithm module of the autopilot system are accessed.
The simulation engine 701 is configured to: the simulation advance relationship is determined based on the target algorithm module and the target simulation module 702. And calling the unified interface library 703 according to the propulsion mechanism and the simulation propulsion relation to control the running of the simulation task.
According to the scheme of the embodiment of the disclosure, a universal simulation system capable of accessing various heterogeneous unmanned vehicles running frames is provided.
In one possible implementation, the unified interface library 703 is further configured to: when the information is transferred between each target algorithm module and the target simulation module 702, format conversion is performed to realize data interaction between the target algorithm modules and the target simulation modules 702 of different data protocols.
According to the scheme of the embodiment of the disclosure, on the basis of the existing unmanned vehicle running frame, a unified interface library of the simulation system is designed and realized, the simulation system developed based on the unified interface library is independent of the running frame and the interface thereof, and when the running frame is changed, a developer does not need to modify the realization of the simulation system, and the migration of the simulation system can be completed only by adapting the unified interface library.
In one possible implementation, the simulation engine 701 further includes a configurable management center for storing registration information of the target algorithm module and the target simulation module in a mapping table.
When the simulation system 700 is connected to a runtime framework of the autopilot system, a user-defined simulation function module is generated according to the requirements of the user simulation task, and the simulation engine 701 is responsible for controlling the simulation module 702 and the flow of the user-defined simulation function module during running. Wherein, a developer of the simulation module 702 can access different simulation modules 702 based on the unified interface library 703, so that the simulation modules are controlled by the simulation engine 701; the simulation system 700 realizes the message communication with the vehicle-end module through the user-defined simulation function module, and the simulation system realizes the control of the vehicle-end module through the control of the user-defined simulation function module. The simulation system exists as an independent runtime object, and the message communication with the simulation module and the user-defined simulation function module is realized based on the data distribution service (Data Distribution Service, DDS) standard.
In one example, the unified interface library includes a messaging interface and a time synchronization interface. The message communication interface is used for providing universal and different types of message read-write capability and can realize one-to-one, one-to-many and many-to-one message communication between the algorithm module and the simulation system. The time synchronization interface is used for providing time operation of the runtime framework, including setting and obtaining time, setting of timing tasks and the like. In the existing autopilot runtime framework, each algorithm module is called a node after being loaded. The message communication interface is responsible for message communication between algorithm module nodes and between the simulation system and the algorithm module nodes. Taking the ROS runtime framework as an example, four communication methods are provided, including Topic communication, service communication, parameter communication, and Action communication. Each communication mode has the characteristics that Topic is the most commonly used asynchronous communication mode among nodes, and the nodes communicate messages in a publish/subscribe mode. Whereas LCM is based mainly on the characteristics of UDP transport, by encapsulating messages in different channels for communication, a publish/subscribe messaging model is implemented, similar to Topic communication in ROS.
In the embodiment of the disclosure, the message communication interface is shown in fig. 8, and includes a read object creation interface, a write object creation interface, a message read registration interface and a message write registration interface. The read object creation interface and the write object creation interface are respectively used for constructing read or write objects of the designated message Channel in the running framework and are used for meeting the read-write operation of the message. And the message reading registration interface message and the message writing registration interface are respectively used for publishing and subscribing abstract messages and supporting message communication between the simulation device and the user algorithm node.
In order to meet the control of the simulation device on the operation of the algorithm module, the time synchronization between the simulation system and the algorithm module is also required to be realized. The general runtime framework provides a Time synchronization interface, taking the ROS runtime framework as an example, which provides the concept of two sets of Time, time and Wall Time, respectively, which are identical in interface, and the data type is identical, but the Time can be modified manually, and the Wall Time cannot. Therefore, in order to meet the requirements of scene reproduction in the simulation device, the Time usually selected for the unmanned vehicle simulation under the ROS frame is Time instead of Wall Time. However, in communication frameworks such as LCM, there is no time synchronization interface provided, and the simulation device itself is required to provide a default simulation time synchronization interface. Thus, the time synchronization interface, as shown in fig. 9, includes initializing the time interface, acquiring the current time interface, and setting the current time interface. The initialization time interface is used for initializing the time before the simulation device starts simulation, and the current time interface is obtained and set to be respectively used for obtaining and updating the simulation time of the current simulation task.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 10 shows a schematic block diagram of an example electronic device 1000 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile apparatuses, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing apparatuses. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 10, the apparatus 1000 includes a computing unit 1001 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a Random Access Memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other by a bus 1004. An input/output (I/O) interface 1005 is also connected to bus 1004.
Various components in device 1000 are connected to I/O interface 1005, including: an input unit 1006 such as a keyboard, a mouse, and the like; an output unit 1007 such as various types of displays, speakers, and the like; a storage unit 1008 such as a magnetic disk, an optical disk, or the like; and communication unit 1009 such as a network card, modem, wireless communication transceiver, etc. Communication unit 1009 allows device 1000 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunications networks.
The computing unit 1001 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 1001 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1001 performs the respective methods and processes described above, for example, a control method of a simulation task. For example, in some embodiments, the control method of the simulation task may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 1008. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 1000 via ROM 1002 and/or communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the control method of the simulation task described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured as a control method to perform the simulation tasks in any other suitable way (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions, improvements, etc. that are within the principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (20)

1. A control method of a simulation task comprises the following steps:
determining at least one target algorithm module of an automatic driving system to be accessed;
according to the target algorithm module, determining at least one target simulation module of a simulation system to be accessed;
acquiring registration information of a plurality of target algorithm modules and a plurality of target simulation modules; wherein the plurality of target algorithm modules correspond to one or more architecture runtime framework layers;
Determining the message transmission directions between a plurality of target algorithm modules and a plurality of target simulation modules according to the registration information;
determining a simulation propulsion relationship according to the plurality of target algorithm modules, the plurality of target simulation modules and the message transmission direction; and
and calling a unified interface library according to the propulsion mechanism and the simulation propulsion relation, and controlling the simulation task to run.
2. The method of claim 1, wherein the determining a simulation advance relationship from a plurality of the target algorithm modules, a plurality of the target simulation modules, and the message passing direction comprises:
according to the module parameter files contained in the registration information, respectively determining simulation operation parameters of a plurality of target algorithm modules and simulation operation parameters of a plurality of target simulation modules;
determining a message analysis mode of the message transmission direction when data interaction occurs between a plurality of target algorithm modules and a plurality of target simulation modules according to a data protocol contained in the registration information;
and determining a simulation propulsion relationship based on the plurality of target algorithm modules, the plurality of target simulation modules, the message transmission direction, the simulation operation parameters and the message analysis mode.
3. The method of claim 1, wherein the invoking a unified interface library to control the running of the simulation task according to the propulsion mechanism and the simulation propulsion relationship comprises:
determining a target module and a first simulation message to be transmitted according to a propulsion mechanism, wherein the target module comprises the target algorithm module and/or the target simulation module;
determining a message transmission direction of the first simulation message according to the simulation advancing relation;
converting the first simulation message by a unified interface library according to a message analysis mode corresponding to the message transmission direction of the first simulation message to obtain a second simulation message which can be analyzed by the target module;
and the unified interface library transmits the second simulation message to the target module so as to realize the control of the simulation task operation.
4. A method according to claim 3, wherein said determining the target module and the first emulated message to be delivered according to a push mechanism comprises:
under the condition that the time pushing condition contained in the pushing mechanism is met, pushing the current moment of the simulation task to the next time stamp;
and determining a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the current time after the pushing, wherein the target module comprises the target algorithm module and/or the target simulation module.
5. The method of claim 4, wherein the time advance condition comprises: and finishing all simulation information receiving and transmitting at the current moment.
6. A method according to claim 3, wherein said determining the target module and the first emulated message to be delivered according to a push mechanism comprises:
and under the condition that any module operation condition contained in the propulsion mechanism is met, determining a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the module operation condition, wherein the target module comprises the target algorithm module and/or the target simulation module.
7. The method of claim 6, wherein the module operating conditions comprise:
the current moment reaches the preset running moment; or alternatively
And obtaining a preset simulation message.
8. The method according to claim 2, wherein the determining a message parsing manner of each message passing direction when data interaction occurs according to the data protocol included in the registration information includes:
and respectively determining a standard landing data analysis library and the drive test data, a standard scene analysis library and the scene file, and a standard map analysis library and a message analysis mode of the map file according to a data protocol, the drive test data, the scene file and the map file contained in the registration information.
9. A control device for simulation tasks, comprising:
the first determining module is used for determining at least one target algorithm module of the automatic driving system to be accessed; wherein the at least one target algorithm module corresponds to a runtime framework layer of at least one architecture;
the second determining module is used for determining at least one target simulation module of the simulation system to be accessed according to the target algorithm module;
a third determination module, comprising:
the acquisition sub-module is used for acquiring registration information of the target algorithm module and the target simulation module;
a transmission direction determining sub-module, configured to determine, according to the registration information, a message transmission direction between each target algorithm module and each target simulation module;
the propulsion relation determining sub-module is used for determining a simulation propulsion relation according to the target algorithm module, the target simulation module and the message transmission direction; and
and the control module is used for calling a unified interface library according to the propulsion mechanism and the simulation propulsion relation and controlling the running of the simulation task.
10. The apparatus of claim 9, wherein the propulsion relationship determination submodule is to:
According to the module parameter file contained in the registration information, respectively determining the simulation operation parameters of the target algorithm module and the simulation operation parameters of the target simulation module;
determining a message analysis mode of each message transmission direction when data interaction occurs according to a data protocol contained in the registration information;
and determining a simulation propulsion relationship based on the target algorithm module, the target simulation module, the message transfer direction, the simulation operation parameters and the message analysis mode.
11. The apparatus of claim 9, wherein the control module comprises:
the first determining submodule is used for determining a target module and a first simulation message to be transmitted according to a propulsion mechanism, wherein the target module comprises the at least one target algorithm module and/or the at least one target simulation module;
a second determining submodule, configured to determine a message transfer direction of the first simulation message according to the simulation push relationship;
the first calling sub-module is used for converting the first simulation message by the unified interface library according to a message analysis mode corresponding to the message transmission direction of the first simulation message to obtain a second simulation message which can be analyzed by the target module;
And the second calling sub-module is used for transmitting the second simulation message to the target module by the unified interface library so as to realize the control of the simulation task operation.
12. The apparatus of claim 11, wherein the first determination submodule is further to:
under the condition that the time pushing condition contained in the pushing mechanism is met, pushing the current moment of the simulation task to the next time stamp;
and determining a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the current time after the pushing.
13. The apparatus of claim 12, wherein the time advance condition comprises: and finishing all simulation information receiving and transmitting at the current moment.
14. The apparatus of claim 11, wherein the first determination submodule is further to:
and under the condition that any module operation condition contained in the propulsion mechanism is met, determining a first simulation message to be transmitted and a target module corresponding to the first simulation message according to the module operation condition.
15. The apparatus of claim 14, wherein the module operating conditions comprise:
The current moment reaches the preset running moment; or alternatively
And obtaining a preset simulation message.
16. The apparatus of claim 9, the propulsion relationship determination submodule further to:
and respectively determining a standard landing data analysis library and the drive test data, a standard scene analysis library and the scene file, and a standard map analysis library and a message analysis mode of the map file according to a data protocol, the drive test data, the scene file and the map file contained in the registration information.
17. A simulation system, comprising: the system comprises a simulation engine, a unified interface library and a plurality of target simulation modules; wherein,
the unified interface library is used for: accessing at least one target simulation module and at least one target algorithm module of an automatic driving system;
the simulation engine is used for: acquiring registration information of a plurality of target algorithm modules and a plurality of target simulation modules; wherein the plurality of target algorithm modules correspond to one or more architecture runtime framework layers;
determining the message transmission directions between a plurality of target algorithm modules and a plurality of target simulation modules according to the registration information;
determining a simulation propulsion relationship according to the plurality of target algorithm modules, the plurality of target simulation modules and the message transmission direction; and calling a unified interface library according to the propulsion mechanism and the simulation propulsion relation to control the operation of the simulation task.
18. The system of claim 17, wherein the unified interface library is further to: and when the information is transmitted between the target algorithm modules and the target simulation modules, format conversion is carried out so as to realize data interaction between the target algorithm modules and the target simulation modules of different data protocols.
19. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
20. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
CN202211187405.1A 2022-09-28 2022-09-28 Simulation task control method, device and simulation system Active CN115542772B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211187405.1A CN115542772B (en) 2022-09-28 2022-09-28 Simulation task control method, device and simulation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211187405.1A CN115542772B (en) 2022-09-28 2022-09-28 Simulation task control method, device and simulation system

Publications (2)

Publication Number Publication Date
CN115542772A CN115542772A (en) 2022-12-30
CN115542772B true CN115542772B (en) 2024-04-16

Family

ID=84730006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211187405.1A Active CN115542772B (en) 2022-09-28 2022-09-28 Simulation task control method, device and simulation system

Country Status (1)

Country Link
CN (1) CN115542772B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345164A (en) * 2013-07-18 2013-10-09 吉林大学 Multi-autonomous-vehicle decision and control real-time simulation experiment system
CN110780608A (en) * 2019-11-26 2020-02-11 北京百度网讯科技有限公司 Simulation test method and device
CN111123728A (en) * 2018-10-30 2020-05-08 百度在线网络技术(北京)有限公司 Unmanned vehicle simulation method, device, equipment and computer readable medium
CN111123727A (en) * 2018-10-30 2020-05-08 百度在线网络技术(北京)有限公司 Unmanned vehicle simulation building method, device, equipment and computer readable medium
CN114415542A (en) * 2022-01-06 2022-04-29 中国第一汽车股份有限公司 Automatic driving simulation system, method, server and medium
CN114660956A (en) * 2022-03-30 2022-06-24 福思(杭州)智能科技有限公司 Intelligent driving simulation test system, method, electronic device and storage medium
CN115113542A (en) * 2022-06-29 2022-09-27 重庆长安汽车股份有限公司 Automatic driving simulation method, system, electronic device and readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103345164A (en) * 2013-07-18 2013-10-09 吉林大学 Multi-autonomous-vehicle decision and control real-time simulation experiment system
CN111123728A (en) * 2018-10-30 2020-05-08 百度在线网络技术(北京)有限公司 Unmanned vehicle simulation method, device, equipment and computer readable medium
CN111123727A (en) * 2018-10-30 2020-05-08 百度在线网络技术(北京)有限公司 Unmanned vehicle simulation building method, device, equipment and computer readable medium
CN110780608A (en) * 2019-11-26 2020-02-11 北京百度网讯科技有限公司 Simulation test method and device
CN114415542A (en) * 2022-01-06 2022-04-29 中国第一汽车股份有限公司 Automatic driving simulation system, method, server and medium
CN114660956A (en) * 2022-03-30 2022-06-24 福思(杭州)智能科技有限公司 Intelligent driving simulation test system, method, electronic device and storage medium
CN115113542A (en) * 2022-06-29 2022-09-27 重庆长安汽车股份有限公司 Automatic driving simulation method, system, electronic device and readable storage medium

Also Published As

Publication number Publication date
CN115542772A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
CN108306804A (en) A kind of Ethercat main station controllers and its communication means and system
CN109347884B (en) Method and device for converting real-time Ethernet to field bus and storage medium
CN110838961B (en) General aviation bus message scheduling system
CN113572815B (en) Cross-heterogeneous-platform communication technical method, system and medium
CN106997414B (en) Multidisciplinary collaborative simulation implementation method based on reflective memory network
CN103713940A (en) Method for reconfigurable distributed real-time simulation based on RTX-HLA reflection storage card
JP2021197153A (en) Method and apparatus for recognizing word slot, electronic apparatus, storage medium and computer program
WO2023093016A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
CN114244821B (en) Data processing method, device, equipment, electronic equipment and storage medium
JP7331178B2 (en) Chassis simulation method, device, server, storage medium and program
JP2022002099A (en) Data labeling method, device, electronic device, storage medium, and computer program
CN112860356A (en) API call control method and device, electronic equipment and storage medium
CN113778644B (en) Task processing method, device, equipment and storage medium
CN114513404B (en) Method and device for configuring time-sensitive network and computer-readable storage medium
CN114036533A (en) Log transmission method and device, electronic equipment and storage medium
CN115542772B (en) Simulation task control method, device and simulation system
CN113791792A (en) Application calling information acquisition method and device and storage medium
CN114170821B (en) Signal machine performance detection method and device and traffic signal lamp control system
CN105468431A (en) Multi-model real-time simulation system
CN113284353B (en) Control method of annunciator, electronic device and system
CN114139605A (en) Distributed model training method, system, device and storage medium
CN106033211B (en) A kind of method and device of control gluing board rubber head cleaning
CN114070889A (en) Configuration method, traffic forwarding method, device, storage medium, and program product
CN112559277A (en) Crash information processing method, system, vehicle-mounted device, server, electronic device and storage medium
US20220126860A1 (en) Method and apparatus for processing autonomous driving simulation data, and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant