Distributed automatic driving software algorithm debugging system and method
By designing a distributed autonomous driving software algorithm debugging system in a distributed autonomous driving system, and using the collaborative work of the main engine and the slave engine, the difficulty in algorithm debugging in the existing system is solved, and efficient multi-chip and multi-module debugging is achieved.
Patent Information
- Application Number
- CN202411401472.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-03-04
AI Technical Summary
In existing distributed autonomous driving systems, algorithm debugging is extremely difficult, mainly due to the complexity of the system and the limitations of a single debugging unit or system simulator.
A distributed autonomous driving software algorithm debugging system is designed, including the algorithm module application layer and the engine layer. The engine layer consists of the main engine and multiple slave engines. The main engine is responsible for obtaining the target debugging task and sending the debugging topic to the slave engine. The slave engine performs the debugging process based on the debugging topic and the timing callback function.
Multi-chip and multi-module distributed autonomous driving software algorithm debugging is realized, which improves debugging efficiency and can more conveniently develop and debug the application of autonomous driving algorithm layer.
Smart Images

Figure CN119557192A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a distributed autonomous driving software algorithm debugging system and method. Background Art
[0002] Due to the limitation of computing power of a single computing chip, existing autonomous driving systems are often composed of distributed systems of multiple computing chips. Each computing module achieves real-time communication through a high-speed local area network (Gigabyte Ethernet) and a data distribution system (DDS).
[0003] In the current field of distributed real-time systems, most systems are often debugged using a single debugging unit or a system simulator when developed at the software level. Due to the complexity of the autonomous driving algorithm itself, algorithm debugging is extremely difficult on existing distributed autonomous driving systems.
[0004] Therefore, there is an urgent need for a debugging method and debugging system for distributed autonomous driving software algorithms to solve the above problems. Summary of the invention
[0005] In view of the problems existing in the prior art, the present invention provides a distributed autonomous driving software algorithm debugging system and method.
[0006] The present invention provides a distributed autonomous driving software algorithm debugging system, comprising an algorithm module application layer and an engine layer, wherein the engine layer is provided with a master engine and a plurality of slave engines, wherein: The algorithm module application layer is composed of multiple algorithm modules, each of which is composed of one or more callback functions, wherein the callback function includes a subject data receiving callback function and a timing callback function, and each of the algorithm modules is connected to a corresponding slave engine; The master engine is used to obtain a target debugging task, and based on the scheduling order of each debugging topic in the target debugging task, send each debugging topic to the corresponding slave engine in sequence; Each of the slave engines is used to obtain a corresponding theme data packet from the master engine according to the debugging theme, and based on the timing callback function and the theme data packet, call the theme data receiving callback function in the correspondingly connected algorithm module.
[0007] According to a distributed autonomous driving software algorithm debugging system provided by the present invention, the system also includes a scheduling layer, which is used to determine the scheduling order of each target scheduler according to the target debugging task, so as to construct the scheduling order of each debugging topic in the target debugging task, and send the scheduling order of each debugging topic to the engine layer through the scheduling interface between the scheduling layer and the engine layer.
[0008] According to a distributed autonomous driving software algorithm debugging system provided by the present invention, the system also includes a user interface layer, which is used to construct the target debugging task according to the debugging operation information input by the user end, and generate corresponding debugging display information through the debugging operation results returned by the engine layer obtained by the scheduling layer.
[0009] According to a distributed autonomous driving software algorithm debugging system provided by the present invention, the main engine of the engine layer is also used to construct a corresponding subject data stream log file according to the transmission status information of the subject data packet, and read the subject data stream log file based on a preset monitoring period.
[0010] According to a distributed autonomous driving software algorithm debugging system provided by the present invention, the master engine and the slave engine are connected via a transmission control protocol link, the master engine is arranged in a main control scheduling unit or a simulation external debugging scheduling unit of the autonomous driving computing system, and each of the slave engines is arranged on a corresponding target function chip, wherein the target function chip is a function chip that meets the operation requirements of the algorithm module; The master engine is also used to obtain the debugging results and algorithm module status information sent by each slave engine based on the transmission control protocol link, so as to perform synchronous debugging across chip platforms.
[0011] According to a distributed autonomous driving software algorithm debugging system provided by the present invention, the algorithm module application layer is further used to obtain a preset subject data packet corresponding to a preset debugging instance, and construct a new algorithm module according to the preset subject data packet, the preset subject data receiving callback function and the preset timing callback function, wherein the preset subject data receiving callback function and the preset timing callback function are determined based on the preset debugging instance; The algorithm module application layer is also used to obtain debugging event record information generated by each algorithm module during the debugging process, and store the debugging event record information in the event record table of the main engine.
[0012] The present invention also provides a distributed autonomous driving software algorithm debugging method based on the above-mentioned distributed autonomous driving software algorithm debugging system, comprising: Obtain a target debugging task through a master engine in the engine layer, and based on the scheduling order of each debugging topic in the target debugging task, the master engine sends each debugging topic to a corresponding slave engine in the engine layer in sequence; The master engine sends corresponding subject data packets to the algorithm module in the algorithm module application layer through each of the slave engines according to the debugging subject and the scheduling order; Based on the built-in theme data receiving callback function and timing callback function of the algorithm module in the algorithm module application layer, each of the slave engines executes the corresponding debugging process through the theme data packet.
[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements any of the above-described distributed autonomous driving software algorithm debugging methods.
[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described distributed autonomous driving software algorithm debugging methods.
[0015] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned distributed autonomous driving software algorithm debugging methods.
[0016] The distributed autonomous driving software algorithm debugging system and method provided by the present invention obtains the target debugging task through the main engine in the system engine layer, and based on the scheduling order of each debugging topic in the target debugging task, sends each debugging topic to the corresponding slave engine in the engine layer in sequence through the main engine, so that each slave engine executes the corresponding debugging process through the topic data packet based on the built-in callback function and callback timing trigger time of the algorithm module in the application layer of the system algorithm module, thereby realizing multi-chip and multi-module distributed autonomous driving software algorithm debugging, thereby improving debugging efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A schematic diagram of the structure of the distributed autonomous driving software algorithm debugging system provided by the present invention; Figure 2A schematic diagram of the startup process of the distributed autonomous driving software algorithm debugging system provided by the present invention; Figure 3 A schematic diagram of the operation flow of the distributed autonomous driving software algorithm debugging system provided by the present invention; Figure 4 A schematic diagram of the process of the distributed autonomous driving software algorithm debugging method provided by the present invention; Figure 5 This is a schematic structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Existing autonomous driving systems are mainly developed using DDS and Robotic Operating System (ROS) as the underlying basic framework. When most systems are developed at the software level, they are debugged separately in a single processor unit or using a system simulator. For this debugging method, there cannot be any associated logic between chips. The problem with using a system simulator is that in autonomous driving, when the algorithm needs to use a specific accelerator of a specific chip, this part of the function cannot be debugged during the debugging process. The autonomous driving system of the existing multi-chip system is difficult to develop and debug at the system level. The present invention provides a distributed autonomous driving software algorithm debugging system.
[0021] A debugging and testing environment (DTE) system (i.e., distributed autonomous driving software algorithm debugging system) based on DDS and real-time operating system (RTOS) architecture to assist application layer development has been designed to achieve debugging of complex distributed systems with multiple chips and modules. For example, a distributed computing platform composed of multiple processors (such as ARM, X86, and ASIC, etc.) can be abstracted into multiple processing subsystems based on the processor as a unit. Each system consists of an independent CPU, memory, and operating system (such as Linux). These subsystems are connected by a main scheduling CPU using a high-speed network bus (ETH). The main scheduling CPU also communicates with external devices and implements system debugging through the debugging interface.
[0022] Figure 1 This is a schematic diagram of the structure of the distributed autonomous driving software algorithm debugging system provided by the present invention, such as Figure 1 As shown, the present invention provides a distributed autonomous driving software algorithm debugging system, including an algorithm module application layer 101 and an engine layer 102, wherein the engine layer 102 is provided with a master engine and a plurality of slave engines, wherein: The algorithm module application layer 101 is composed of a plurality of algorithm modules, each of which is composed of one or more callback functions, wherein the callback function includes a subject data receiving callback function and a timing callback function, and each of the algorithm modules is connected to a corresponding slave engine; The master engine is used to obtain a target debugging task, and based on the scheduling order of each debugging topic in the target debugging task, send each debugging topic to the corresponding slave engine in sequence; Each of the slave engines is used to obtain a corresponding theme data packet from the master engine according to the debugging theme, and based on the timing callback function and the theme data packet, call the theme data receiving callback function in the correspondingly connected algorithm module.
[0023] In the present invention, the distributed autonomous driving software algorithm debugging system is constructed based on the DDS system and RTOS system architecture, and the auxiliary application layer is constructed. The DDS system is a broadcast and listening mechanism that realizes communication through Publish (publishing topic data) and Subscribe (subscribing to topic data). A node in the DDS system can broadcast multiple data streams defined by Topics, and listeners (i.e., subscribers) can listen to multiple groups of data streams through topics. Topics are mechanisms used to identify and distinguish different data streams in the DDS system. Each data stream will be assigned a specific topic. Listeners can receive data streams of interest by subscribing to specific topics. Data streams can be transferred from one node to another through various means, such as memory sharing and network communication.
[0024] In the present invention, an application or an algorithm unit is set in a node. The nodes can send and process information to each other through DDS. The calculation and processing of information are implemented according to the timed scheduling thread pre-defined in the RTOS layer. A complete autonomous driving node includes three definitions, namely what to send, what to receive, and when and how to process. On this basis, the present invention adds a layer of module abstraction, that is, multiple algorithm modules are constructed in the algorithm module application layer 101, so as to better define the functions contained in a complete functional component.
[0025] Specifically, in the present invention, the algorithm module includes one or more callback functions of the monitored topic data streams, one or more definitions of the sent topic data streams, one or more timed callback functions (implemented by processing the algorithm of the input received data to determine the callback timing trigger time corresponding to the callback function), and event records occurring on the module. This event record can be used to subsequently generate a topological diagram of the module's running timing. The event record includes: the time and data ID of receiving (subscribing to topic data callback) a topic data, the time and data ID of sending (publishing topic data), and the time (TimeCall) of triggering a timed callback.
[0026] Furthermore, there are multiple algorithm modules in the algorithm module application layer 101, each module performs a specific algorithm task, and each algorithm module is set with one or more callback functions, which are triggered at a specific time point. The callback function is a programming mechanism used to perform predefined operations when a specific event occurs. In the present invention, the callback function in each algorithm module is set to perform a specific task at a specific callback timing trigger time. Figure 1 As shown, in the present invention, the GDB (GNU Debugger) debugging tool can be used to help developers analyze, monitor and control the execution of programs, such as viewing and modifying variable values during program execution.
[0027] The engine layer 102 (Engine Layer) is the bottom layer of the entire system and is responsible for important underlying functions in the system. The engine layer is mainly composed of two parts: Master and Slave. In a debugging or simulation task, the engine layer will have only one master engine and several slave engines. The master engine and the slave engines communicate and collaborate through a specific mechanism. Figure 2 This is a schematic diagram of the startup process of the distributed autonomous driving software algorithm debugging system provided by the present invention. The startup process of the master engine and the slave engine in the present invention can refer to Figure 2 shown.
[0028] Specifically, in the present invention, the slave engine takes over the resources of the corresponding algorithm module and executes the debugging actions issued by the master engine for the taken-over algorithm module, including: subscribing to a topic data packet, running a timed callback function, and setting the logic time of the module. In the composition of the engine layer, the master engine is responsible for controlling and scheduling the resources of each slave engine, including distributing tasks and data to the slave engines. Therefore, the slave engine subscribes to the required topic data packets from the master engine through communication with the master engine. Figure 3 This is a schematic diagram of the operation flow of the distributed autonomous driving software algorithm debugging system provided by the present invention. The online debugging process of the autonomous driving system provided by the present invention can be referred to Figure 3 shown.
[0029] Specifically, in one embodiment, the master engine is responsible for managing all subject data streams and providing each slave engine with an interface for subscribing to related subjects. When a slave engine needs to subscribe to a subject data packet, it will send a subscription request to the master engine, and the request includes the subject information to be subscribed. After the master engine receives the subscription request from the slave engine, it passes the corresponding subject data packet to the slave engine according to the request content to establish a subscription relationship. After that, the master engine will continue to pass the data packets of the subject to the slave engine, and the slave engine can receive and process these data to complete the corresponding debugging tasks. In one embodiment, a DTE-node instance equivalent to the DDS node (DDS-node) interface is constructed, and this DTE-node interface instance is input when the algorithm module is initialized. The algorithm module will register resources with this node instance in the initialization function, thereby replacing the existing underlying DDS+ROS function through the slave engine. In one embodiment, the functional information of the master engine can be referred to as shown in Table 1: Table 1 Main engine function information
[0030] The function information of the slave engine can be found in Table 2: Table 2 Slave engine function information
[0031] The distributed autonomous driving software algorithm debugging system constructed based on the present invention can more conveniently develop and debug the algorithm layer application of autonomous driving. When the main engine in the engine layer receives the target debugging task, the main engine sends each debugging topic to the corresponding slave engine according to the scheduling order. After the slave engine receives the debugging topic, it obtains the corresponding topic data packet from the main engine. The slave engine calls the callback function in the connected algorithm module according to the preset callback timing trigger time and the topic data packet to perform the corresponding debugging task. In the present invention, the algorithm and information sending and receiving interface in the algorithm module are no longer connected to the DDS+ROS system, but to the API of the engine layer of the DTE. The engine layer will take over all the communication and scheduling of the algorithm module, including publishing topic data, subscribing to topic data and timing threads, etc., and the upper layer of the algorithm module does not need any modification or setting to be seamlessly connected to the DTE system. The user end or scheduling software can control the resources in each algorithm module through the API of the engine layer to make it run as expected, thereby simulating the system operation logic on the actual vehicle. In this way, it can also implement command-by-command system debugging and realize full closed-loop repeatable online simulation of the autonomous driving system (with the assistance of sensor and vehicle modeling; repeatable is defined as multiple simulations producing the same results, which can avoid the randomness caused by distributed system scheduling).
[0032] The distributed autonomous driving software algorithm debugging system provided by the present invention obtains the target debugging task through the main engine in the engine layer of the system, and based on the scheduling order of each debugging topic in the target debugging task, sends each debugging topic to the corresponding slave engine in the engine layer in sequence through the main engine, so that each slave engine executes the corresponding debugging process based on the topic data packet and the callback timing trigger time by calling the built-in callback function of the algorithm module in the application layer of the system algorithm module, thereby realizing multi-chip and multi-module distributed autonomous driving software algorithm debugging, thereby improving debugging efficiency.
[0033] Based on the above embodiment, the system also includes a scheduling layer 103, which is used to determine the scheduling order of each target scheduler according to the target debugging task, so as to construct the scheduling order of each debugging subject in the target debugging task, and send the scheduling order of each debugging subject to the engine layer through the scheduling interface between the scheduling layer and the engine layer.
[0034] In the present invention, the main engine schedules all slave engine resources according to the scheduling order given by the user end or the scheduling layer 103. The scheduling layer 103 can customize the scheduling process in the early stage. The specific scheduling rules vary according to different requirements. When the present invention runs the DTE system, different schedulers can be specified to be loaded. Specifically, the scheduler implements the expected operation of the module by calling the scheduling interface of the main engine. For example, when the scheduler calls the following function: engine_master.module_subscribe(module_id, topic, message_content); At this time, the slave engine corresponding to the algorithm module will execute the subscription topic data callback function of the specified corresponding topic, and use the corresponding information content of the topic as the parameter of the callback function, and then the slave engine will synchronize the status update result generated by the execution to the main engine through the Transmission Control Protocol (TCP), and then obtain the execution result through the scheduler, and then execute the next action. The scheduling layer 103 in the present invention is responsible for parsing and understanding the target debugging task, by determining the scheduling order and communicating with the engine layer to ensure that the debugging task can be executed smoothly as expected.
[0035] Based on the above embodiment, the system also includes a user interface layer 104, which is used to construct the target debugging task according to the debugging operation information input by the user end, and generate corresponding debugging display information based on the debugging operation results returned by the engine layer 102 obtained by the scheduling layer 103.
[0036] In the present invention, the user interface layer 104 is mainly divided into two parts. First, the main engine will forward all messages on the path to the monitoring component (such as monitoring the user's operation on the UI interface) or the UI display to achieve real-time update of the action and display. Second, the main engine can obtain the information input by the user (such as clicking a button, keyboard information, etc.), which can be used as the input of the scheduler, such as step control, clicking the next step, etc.; or as a pre-defined subject data packet implanted into the corresponding computing module. In one embodiment, the user interface layer 104 will encapsulate the user input information, such as clicking a button on the UI, KEY (keyboard) input, etc., into a data packet. This data packet contains the user's operation content and related additional information, such as timestamp, operation type, etc.; then, the user interface layer 104 will define a subject for these data packets to identify and classify different types of user input. The subject can be pre-defined according to business requirements and system design, so that the subsequent computing module can perform corresponding processing according to the subject.
[0037] In the present invention, the user interface layer 104 constructs the corresponding target debugging task according to the debugging operation information input by the user, including determining the debugging subject, setting the debugging order, specifying the task parameters, etc. Once the debugging task is submitted for execution, the user interface layer 104 will obtain the debugging operation result returned by the engine layer through the scheduling layer. Finally, the user interface layer 104 will convert the obtained debugging operation result into user-readable debugging display information and display it to the user, including charts, reports, log records, etc.
[0038] Based on the above embodiment, the main engine of the engine layer is also used to construct a corresponding subject data stream log file according to the transmission status information of the subject data packet, and read the subject data stream log file based on a preset monitoring period.
[0039] In the present invention, in addition to scheduling all slave engine resources according to the scheduling order given by the user end or the scheduling layer, and controlling the flow direction of each subject data stream, the main engine is also responsible for reading (a preset monitoring period can be set to implement the reading operation) and writing the subject data stream log file, forwarding the debugging result data sent by the calculation module to the upper-level display module, and receiving, processing and forwarding the online input of the user end.
[0040] In the present invention, the subject data packet may have various status changes during the transmission process, such as transmission success, transmission failure, and delay, etc. The main engine is responsible for constructing corresponding subject data flow log files based on these transmission status information. These log files record the transmission status of each subject data packet and related information, such as timestamp, transmission delay, etc.
[0041] Furthermore, the main engine will periodically read these subject data stream log files within a preset monitoring period, wherein the length of the monitoring period can be set according to the needs and performance requirements of the system, usually in seconds, minutes or hours. By regularly reading the log files, the main engine can monitor and analyze the status of data transmission in real time, promptly discover transmission anomalies or failures, and take corresponding processing measures to ensure that the system can respond to user-side operations in a timely manner and ensure the stability and reliability of data transmission. The present invention reproduces the problems on the vehicle online through log data, and locates the root cause of the problem using a step-by-step method and a GDB interface.
[0042] On the basis of the above embodiment, the master engine and the slave engine are connected via a transmission control protocol link, the master engine is arranged in a main control scheduling unit or a simulation external debugging scheduling unit of the automatic driving computing system, and each of the slave engines is arranged on a corresponding target function chip, wherein the target function chip is a function chip that meets the operation requirements of the algorithm module; The master engine is also used to obtain the debugging results and algorithm module status information sent by each slave engine based on the transmission control protocol link, so as to perform synchronous debugging across chip platforms.
[0043] In the present invention, the master engine and the slave engine can run on the same system (processor) or on different systems (processors), but all slave engines must be able to access the system where the master engine is located through the network, wherein the master engine and the slave engine communicate in a question-and-answer manner through a TCP link, and all conversations are initiated by the master engine.
[0044] The DTE system provided by the present invention is used for online debugging of distributed autonomous driving software algorithms. The main engine can be run on the central scheduling processor of the ADU (Autonomous Drive Unit). When developing algorithms, online debugging on the ADU hardware can be quickly performed to monitor the outputs from multiple subsystems in real time. The slave engines are set on corresponding functional chips according to the algorithms or applications of each computing module during actual operation, including but not limited to sensor chips (such as lidar sensors, ultrasonic sensors, etc.), communication chips, image processing chips, and security chips. After each debugging action, the slave engine must synchronize the debugging operation results and the current status to the main engine, so that the main engine always ensures that it stores the latest image of the algorithm module corresponding to each slave engine.
[0045] On the basis of the above embodiment, the algorithm module application layer is further used to obtain a preset subject data packet corresponding to a preset debugging instance, and construct a new algorithm module according to the preset subject data packet, the preset subject data receiving callback function and the preset timing callback function, wherein the preset subject data receiving callback function and the preset callback timing trigger time are determined based on the preset debugging instance; The algorithm module application layer is also used to obtain debugging event record information generated by each algorithm module during the debugging process, and store the debugging event record information in the event record table of the main engine.
[0046] In the present invention, each algorithm module registers its own resources to the corresponding slave engine when initialized, so that each algorithm module instance corresponds to a slave engine instance. Specifically, the preset debugging instance refers to a predefined test scenario or test case for simulating different driving conditions and environments, and the preset subject data packet is a data packet associated with the debugging instance, which contains various sensor data, vehicle status information, etc. during the simulated driving process.
[0047] In the present invention, the algorithm module application layer obtains the preset subject data packets corresponding to the preset debugging instance from the system, and the algorithm module application layer constructs a new algorithm module according to these data packets, the preset subject data receiving callback function and the preset timing callback function. Among them, the preset subject data receiving callback function is a function triggered to be executed under specific conditions, which is used to process specific events or perform specific operations; the preset timing callback function is a time point determined based on the preset debugging instance, which is used to control the execution timing of the algorithm module.
[0048] Furthermore, various debugging events may be generated during the debugging process, such as state changes and abnormal conditions during algorithm execution. The algorithm module application layer obtains the debugging event record information generated by each algorithm module and stores this information in the main engine. This debugging event record information can be used to analyze the operating status of the system, the correctness and performance of the debugging algorithm module, and provide a reference for system optimization and improvement.
[0049] Figure 4 A schematic diagram of the process of the distributed autonomous driving software algorithm debugging method provided by the present invention is shown in FIG. Figure 4 As shown, the present invention also provides a distributed autonomous driving software algorithm debugging method based on the distributed autonomous driving software algorithm debugging system described in each of the above embodiments, including: Step 401, obtaining a target debugging task through a main engine in the engine layer, and based on the scheduling order of each debugging topic in the target debugging task, the main engine sends each debugging topic to the corresponding slave engine in the engine layer in sequence; Step 402, the master engine sends the corresponding subject data packet to the algorithm module in the algorithm module application layer through each of the slave engines according to the debugging subject and the scheduling order; Step 403: Based on the built-in theme data receiving callback function and timing callback function of the algorithm module in the algorithm module application layer, each slave engine executes a corresponding debugging process through the theme data packet.
[0050] In the present invention, the main engine loads and starts the corresponding algorithm module and slave engine on the corresponding chip or platform through the debugging task description, and collects the startup results and parameters; further, the main engine controls and schedules the callback function in the algorithm module through the slave engine according to the preset scheduling order to achieve global control of the task, wherein the callback function includes a subject data receiving callback function and a timing callback function; then, the main engine sends the corresponding subject data packet to the algorithm module in sequence according to the preset scheduling order based on the debug data subject through each slave engine; at the same time, according to the time logic of task scheduling, the main engine triggers the timing callback function in each algorithm module through each slave engine, so that each slave engine collects the results generated by the operation after triggering the callback function; finally, after determining that each slave engine has completed the execution of each callback function, the main engine collects and returns the execution results of each algorithm module, and the execution results include the newly generated subject data packet, operation status and time information, etc.
[0051] Specifically, in the present invention, the slave engine takes over the resources of the corresponding algorithm module, and executes the debugging action for the taken-over algorithm module issued by the master engine, including: subscribing to a subject data packet, running a timing callback function, and setting the logic time of the module. In the composition of the engine layer, the master engine is responsible for controlling and scheduling the resources of each slave engine, including distributing tasks and data to the slave engine, so that the slave engine subscribes to the required subject data packet to the master engine by communicating with the master engine. Specifically, the master engine is responsible for managing all subject data streams and providing interfaces for subscribing to related topics to each slave engine. When a slave engine needs to subscribe to a certain subject data packet, it will send a subscription request to the master engine, and the request includes the subject information to be subscribed. After receiving the subscription request from the slave engine, the master engine passes the corresponding subject data packet to the slave engine according to the request content, thereby establishing a subscription relationship.
[0052] Furthermore, the master engine will continue to transfer the data packets of the topic to the slave engine, and the slave engine can receive and process these data to complete the corresponding debugging tasks. In the present invention, the DDS+ROS layer can be set aside to debug the algorithm layer, so that the debugging system is decoupled, so as to determine the source of the problem, and there is no need to make any modifications to the algorithm module. It is only necessary to indicate the DTE compilation switch to be enabled during compilation. The entire multi-processor system can be debugged in a step-by-step manner, and each step only occurs on one processor, avoiding the difficulty of debugging a parallel system. Since the system can be debugged in a step-by-step manner, it is possible to debug the code with GDB; at the same time, the user end can customize a variety of scheduling sequences, such as the module first receives a part of the data, runs a timed callback to process, and then receives the latter part of the data, thereby simulating some small probability situations and verifying the reliability of the algorithm. In one embodiment, the user end can also simulate the impact of extreme situations such as data loss and module restart on the algorithm.
[0053] The distributed autonomous driving software algorithm debugging method provided by the present invention obtains the target debugging task through the main engine in the system engine layer, and based on the scheduling order of each debugging topic in the target debugging task, sends each debugging topic to the corresponding slave engine in the engine layer in sequence through the main engine, so that each slave engine executes the corresponding debugging process based on the topic data packet and the callback timing trigger time by calling the built-in callback function of the algorithm module in the application layer of the system algorithm module, thereby realizing multi-chip and multi-module distributed autonomous driving software algorithm debugging, thereby improving debugging efficiency.
[0054] Figure 5 A schematic diagram of the structure of an electronic device provided by the present invention, such as Figure 5 As shown, the electronic device may include: a processor (Processor) 501, a communication interface (Communications Interface) 502, a memory (Memory) 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 complete mutual communication through the communication bus 504. The processor 501 may call the logic instructions in the memory 503 to execute the distributed automatic driving software algorithm debugging method, the method comprising: obtaining the target debugging task through the main engine in the engine layer, and based on the scheduling order of each debugging topic in the target debugging task, the main engine sends each debugging topic to the corresponding slave engine in the engine layer in sequence; the main engine sends the corresponding topic data packet to the algorithm module in the algorithm module application layer according to the debugging topic and the scheduling order through each slave engine; based on the built-in topic data receiving callback function and timing callback function of the algorithm module in the algorithm module application layer, each slave engine uses the topic data packet as a parameter to execute the corresponding debugging process.
[0055] In addition, the logic instructions in the above-mentioned memory 503 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0056] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by the computer, the computer can execute the distributed autonomous driving software algorithm debugging method provided by the above-mentioned methods, and the method includes: obtaining the target debugging task through the main engine in the engine layer, and based on the scheduling order of each debugging topic in the target debugging task, the main engine sends each of the debugging topics to the corresponding slave engines in the engine layer in sequence; the main engine sends the corresponding topic data packet to the algorithm module in the algorithm module application layer through each of the slave engines according to the debugging topic and the scheduling order; based on the built-in topic data of the algorithm module in the algorithm module application layer, each of the slave engines uses the topic data packet as a parameter to execute the corresponding debugging process.
[0057] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the distributed autonomous driving software algorithm debugging method provided in the above-mentioned embodiments, the method comprising: obtaining a target debugging task through a main engine in the engine layer, and based on the scheduling order of each debugging topic in the target debugging task, the main engine sends each of the debugging topics to the corresponding slave engines in the engine layer in sequence; the main engine sends a corresponding topic data packet to the algorithm module in the algorithm module application layer through each of the slave engines according to the debugging topic and the scheduling order; based on the built-in topic data of the algorithm module in the algorithm module application layer, each of the slave engines uses the topic data packet as a parameter to execute the corresponding debugging process.
[0058] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0059] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0060] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A distributed autonomous driving software algorithm debugging system, characterized in that: It includes an algorithm module application layer and an engine layer, wherein the engine layer is provided with a master engine and multiple slave engines, wherein: The algorithm module application layer is composed of multiple algorithm modules, each of which is composed of one or more callback functions, wherein the callback function includes a subject data receiving callback function and a timing callback function, and each of the algorithm modules is connected to a corresponding slave engine; The master engine is used to obtain a target debugging task, and based on the scheduling order of each debugging topic in the target debugging task, send each debugging topic to the corresponding slave engine in sequence; Each of the slave engines is used to obtain a corresponding theme data packet from the master engine according to the debugging theme, and based on the timing callback function and the theme data packet, call the theme data receiving callback function in the correspondingly connected algorithm module.
2. The distributed autonomous driving software algorithm debugging system according to claim 1, characterized in that: The system also includes a scheduling layer, which is used to determine the scheduling order of each target scheduler according to the target debugging task, so as to construct the scheduling order of each debugging subject in the target debugging task, and send the scheduling order of each debugging subject to the engine layer through the scheduling interface between the scheduling layer and the engine layer.
3. The distributed autonomous driving software algorithm debugging system according to claim 2, characterized in that: The system also includes a user interface layer, which is used to construct the target debugging task according to the debugging operation information input by the user end, and generate corresponding debugging display information based on the debugging operation result returned by the engine layer obtained by the scheduling layer.
4. The distributed autonomous driving software algorithm debugging system according to claim 1, characterized in that: The main engine of the engine layer is also used to construct a corresponding subject data stream log file according to the transmission status information of the subject data packet, and read the subject data stream log file based on a preset monitoring period.
5. The distributed autonomous driving software algorithm debugging system according to claim 1, characterized in that: The master engine and the slave engine are connected via a transmission control protocol link, the master engine is arranged in a main control scheduling unit or a simulation external debugging scheduling unit of the autonomous driving computing system, and each of the slave engines is arranged on a corresponding target function chip, wherein the target function chip is a function chip that meets the operation requirements of the algorithm module; The master engine is also used to obtain the debugging results and algorithm module status information sent by each slave engine based on the transmission control protocol link, so as to perform synchronous debugging across chip platforms.
6. The distributed autonomous driving software algorithm debugging system according to claim 1, characterized in that: The algorithm module application layer is further used to obtain a preset subject data packet corresponding to a preset debugging instance, and construct a new algorithm module according to the preset subject data packet, the preset subject data receiving callback function and the preset timing callback function, wherein the preset subject data receiving callback function and the preset timing callback function are determined based on the preset debugging instance; The algorithm module application layer is also used to obtain debugging event record information generated by each algorithm module during the debugging process, and store the debugging event record information in the event record table of the main engine.
7. A distributed autonomous driving software algorithm debugging method based on the distributed autonomous driving software algorithm debugging system according to any one of claims 1 to 6, characterized in that: include: Obtain a target debugging task through a master engine in the engine layer, and based on the scheduling order of each debugging topic in the target debugging task, the master engine sends each debugging topic to the corresponding slave engine in the engine layer in sequence; The master engine sends corresponding subject data packets to the algorithm module in the algorithm module application layer through each of the slave engines according to the debugging subject and the scheduling order; Based on the built-in theme data receiving callback function and timing callback function of the algorithm module in the algorithm module application layer, each of the slave engines executes the corresponding debugging process through the theme data packet.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the distributed autonomous driving software algorithm debugging method as described in claim 7 is implemented.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, the distributed autonomous driving software algorithm debugging method as described in claim 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by the processor, the distributed autonomous driving software algorithm debugging method as described in claim 7 is implemented.
Citation Information
Cited By
Model-based chip debugging system
CN120124550A