Simulation method, device, medium and system of unmanned agricultural machine
By standardizing the test case data and using simulation software to simulate the working scenario of unmanned agricultural machinery, combining sensor failure data to generate control parameter values, the problem of low accuracy of simulation results in the existing technology is solved, and more accurate unmanned agricultural machinery simulation is achieved test.
Patent Information
- Application Number
- CN202411374804.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-10
AI Technical Summary
In the existing unmanned agricultural machinery simulation test, virtual simulation tests or hardware in-loop simulation tests cannot accurately simulate the entire working conditions of unmanned agricultural machinery, resulting in low accuracy of simulation results and cannot cover all possible actual scenarios and boundaries. condition.
By obtaining test case data, standardized processing is performed to generate test case files, and the simulation software is used to load the target scene according to the target scene number. Test cases are executed when receiving the automatic driving command, and control parameter values are generated based on multiple sensor failure data to adjust the simulation The parameters in the process are used to simulate the working scenario of unmanned agricultural machinery, and a test report is generated to compare the simulation results with the preset threshold.
The accuracy of the simulation results is improved to make it more in line with the actual working conditions, solve the problem that the simulation results are inconsistent with the actual working conditions, and enhance the reliability and accuracy of the test results.
Smart Images

Figure CN119105315A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of simulation of unmanned agricultural machinery, and in particular to a simulation method, device, medium and system of unmanned agricultural machinery. Background Art
[0002] As for the testing of unmanned agricultural machinery, existing technologies mostly conduct simulation tests on the unmanned driving control algorithms of passenger cars, including two types of testing methods: virtual simulation testing and hardware-in-the-loop simulation testing.
[0003] Using only virtual simulation tests cannot accurately simulate all working conditions of unmanned agricultural machinery, such as hardware failures, equipment characteristics, etc., which will affect the authenticity and effectiveness of the test results. Using only hardware-in-the-loop simulation tests has limitations in simulating the complex working environment of unmanned agricultural machinery and cannot cover all possible actual scenarios and boundary conditions.
[0004] This means that the existing solutions only use virtual simulation testing or only use hardware-in-the-loop simulation testing, which will result in low accuracy of the simulation results, thereby making the simulation results inconsistent with actual working conditions. Summary of the invention
[0005] The main purpose of the present application is to provide a simulation method, device, medium and system for unmanned agricultural machinery, so as to at least solve the problem that the existing solutions only use virtual simulation testing or only use hardware-in-the-loop simulation testing, which will result in low accuracy of simulation results and thus make the simulation results inconsistent with actual working conditions.
[0006] In order to achieve the above object, according to one aspect of the present application, a simulation method for an unmanned agricultural machine is provided, the method comprising:
[0007] Acquire test case data, and perform standardization processing on the test case data to obtain a test case file, wherein the test case data is a description statement of the test case, and the test case file represents a mapping relationship between a parameter name and a corresponding parameter value;
[0008] The simulation software is used to load the target scene corresponding to the target scene number in the test case file according to the target scene number, and upon receiving the automatic driving instruction sent by the simulation test system, the simulation software is used to execute at least one test case in the test case file, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system also generates a control parameter value in the automatic driving instruction according to a variety of sensor fault data, and the control parameter value is used to adjust the parameters of the simulation software during the simulation process, and the simulation process represents the simulation of the working scene of the unmanned agricultural machinery;
[0009] A test report is generated at least according to a first comparison result, wherein the first comparison result represents a comparison result between each parameter value of the simulation result and a corresponding preset threshold value.
[0010] Optionally, upon receiving the autonomous driving instruction sent by the simulation test system, using the simulation software to execute at least one test case in the test case file includes:
[0011] Each time the autonomous driving instruction sent by the simulation test system is received, the simulation software is used to execute one of the test cases in the test case file, and the default setting of the simulation software is restored;
[0012] Wait for the next new autonomous driving instruction sent by the simulation test system until all the test cases have been executed.
[0013] Optionally, after executing a test case in the test case file using the simulation software, the method further includes:
[0014] Update the current execution count to n+1, 0≤n≤m;
[0015] When the current execution number is m, determining that the simulation work is finished;
[0016] When the current number of executions is less than m, the processing steps are repeated until the current number of executions is m. The processing steps represent that, upon receiving the autonomous driving instruction sent by the simulation test system, the simulation software is used to execute one of the test cases in the test case file, and the default settings of the simulation software are restored.
[0017] Optionally, the test case data is standardized to obtain a test case file, including:
[0018] Extracting test case parameters from the test case data;
[0019] After the use case parameters are extracted, the test case file in JSON format is generated, and the target scenario number in the test case file is extracted.
[0020] Optionally, in the process of executing at least one test case in the test case file using the simulation software, the method further includes:
[0021] Acquire planning control algorithm quality data in real time, wherein the planning control algorithm quality data is parameter data of the unmanned agricultural machinery during the simulation process;
[0022] When an end signal sent by the simulation test system is received, it is determined that the simulation work is completed.
[0023] Optionally, a test report is generated at least according to a first comparison result, wherein the first comparison result represents a comparison result of each parameter value of the simulation result with a corresponding preset threshold value, including:
[0024] In a case where the first comparison result indicates that at least one of all parameter values in the simulation result is greater than or equal to the corresponding preset threshold, generating the test report according to the first comparison result;
[0025] When the first comparison result represents that all parameter values in the simulation result are less than the corresponding preset threshold value, a second comparison result is obtained, and the test report is generated based on the second comparison result, wherein the second comparison result represents the comparison results of each parameter value of the simulation result with the corresponding standard value, the standard value is the standard value set in the industry, and the preset threshold value is a value set by the user.
[0026] Optionally, the method further includes: performing data interaction with the simulation test system in the form of a DBC file.
[0027] According to another aspect of the present application, a simulation device for an unmanned agricultural machine is provided, the device comprising:
[0028] An acquisition unit, used to acquire test case data and perform standardization processing on the test case data to obtain a test case file, wherein the test case data represents a description statement of the test case, and the test case file represents a mapping relationship between a parameter name and a corresponding parameter value;
[0029] A loading unit, configured to use simulation software to load a target scene corresponding to the target scene number in the test case file, and, upon receiving an automatic driving instruction sent by a simulation test system, use the simulation software to execute at least one test case in the test case file, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system further generates a control parameter value in the automatic driving instruction based on a plurality of sensor fault data, the control parameter value being used to adjust a parameter of the simulation software during a simulation process, and the simulation process represents a simulation of a working scene of an unmanned agricultural machinery;
[0030] The generating unit is used to generate a test report at least according to a first comparison result, wherein the first comparison result represents a comparison result between each parameter value of the simulation result and a corresponding preset threshold value.
[0031] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.
[0032] According to another aspect of the present application, a simulation system for an unmanned agricultural machinery is provided, the system comprising: a simulation device for the unmanned agricultural machinery and a simulation test system, the simulation device for the unmanned agricultural machinery and the simulation test system communicate with each other, and the simulation device for the unmanned agricultural machinery is used to execute any one of the simulation methods for the unmanned agricultural machinery.
[0033] By applying the technical solution of the present application, the test case data is standardized to obtain a test case file, and the simulation software is used to load the target scene corresponding to the target scene number in the test case file, and upon receiving the autonomous driving instruction sent by the simulation test system, the simulation software is used to execute at least one test case in the test case file. Compared with the existing scheme, the control parameter values in the autonomous driving instruction can be generated according to a variety of sensor fault data, thereby achieving the purpose of injecting faults to simulate more scenarios. Finally, a test report is generated based on at least the comparison results of each parameter value of the simulation result with the corresponding preset threshold value, thereby improving the accuracy and being more in line with the actual working conditions than the existing scheme, thereby solving the problem that the existing scheme only uses virtual simulation testing or only uses hardware-in-the-loop simulation testing, which will result in low accuracy of the simulation results, thereby making the simulation results inconsistent with the actual working conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0035] Figure 1 A schematic flow chart of a simulation method for an unmanned agricultural machine provided according to an embodiment of the present application is shown;
[0036] Figure 2 A schematic diagram of a process for obtaining a test case file by standardizing test case data provided in accordance with an embodiment of the present application is shown;
[0037] Figure 3 A schematic diagram of a process of executing at least one test case in a test case file using simulation software provided according to an embodiment of the present application is shown;
[0038] Figure 4 A schematic diagram of a process for determining the end of a simulation work according to an embodiment of the present application is shown;
[0039] Figure 5 A schematic flow chart of another method for simulating an unmanned agricultural machine provided according to an embodiment of the present application is shown;
[0040] Figure 6 A structural block diagram of a simulation device for an unmanned agricultural machine provided according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0041] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] For the convenience of description, some nouns or terms involved in the embodiments of the present application are explained below:
[0045] Planning and control algorithm: The planning and control algorithm calculates and outputs the vehicle's driving trajectory and corresponding control instructions based on the vehicle's current state, environmental perception information, and preset driving goals and rules to achieve autonomous navigation and driving of the vehicle.
[0046] Unmanned agricultural machinery: high-tech modern agricultural machinery that uses computer, information, artificial intelligence and other technologies to achieve unmanned driving and operation of agricultural machinery.
[0047] UDP: User Datagram Protocol. User Datagram Protocol, a method for sending encapsulated IP data packets without establishing a connection.
[0048] HIL: Hardware-In-the-Loop. Hardware-in-the-Loop simulation is a testing technology that integrates actual hardware into a simulation environment.
[0049] DBC: Database CAN. A database file that describes CAN communication information. It contains information decoded from the original CAN bus into physical values, which can help identify data within a CAN frame.
[0050] As introduced in the background technology, the existing technology only uses virtual simulation testing and cannot accurately simulate all working conditions of unmanned agricultural machinery, such as hardware failure, equipment characteristics, etc., which will affect the authenticity and effectiveness of the test results. Only using hardware-in-the-loop simulation testing has limitations in simulating the complex working environment of unmanned agricultural machinery and cannot cover all possible actual scenarios and boundary bars. In order to solve the problem that the existing solutions only use virtual simulation testing or only use hardware-in-the-loop simulation testing, which will make the simulation results less accurate and thus make the simulation results inconsistent with the actual working conditions, the embodiments of the present application provide a simulation method, device, medium and system for unmanned agricultural machinery.
[0051] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0052] In this embodiment, a simulation method for unmanned agricultural machinery is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0053] Figure 1 FIG. 1 is a flow chart of a simulation method for an unmanned agricultural machine provided according to an embodiment of the present application. Figure 1 As shown, the method comprises the following steps:
[0054] Step S101, acquiring test case data, and performing standardization processing on the test case data to obtain a test case file, wherein the test case data is a description statement of the test case, and the test case file represents a mapping relationship between a parameter name and a corresponding parameter value;
[0055] like Figure 2 As shown, the step S101 of standardizing the test case data to obtain a test case file includes the following steps:
[0056] Step S201, extracting test case parameters from the test case data;
[0057] Step S202, after the above-mentioned use case parameters are extracted, the above-mentioned test case file in JSON format is generated, and the above-mentioned target scenario number in the above-mentioned test case file is extracted.
[0058] Specifically, the test data management platform performs multi-layer processing on the test case descriptive text, converts the descriptive text into standard variable parameters, generates a test case file with a fixed format, extracts the serial number of the test scenario, and determines whether the test case parameters have been extracted. If the extraction is successful, the simulation software and the hardware-in-the-loop simulation test system host software are started. If the extraction is not successful, it is extracted again until the parameter extraction is completed.
[0059] Step S102, using simulation software to load the target scene corresponding to the target scene number in the test case file, and upon receiving the automatic driving instruction sent by the simulation test system, using the simulation software to execute at least one test case in the test case file, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system also generates a control parameter value in the automatic driving instruction according to a variety of sensor fault data, and the control parameter value is used to adjust the parameters of the simulation software during the simulation process, and the simulation process represents the simulation of the working scene of the unmanned agricultural machinery;
[0060] In one embodiment of the present application, in the process of executing at least one test case in the test case file using the simulation software, the method further includes:
[0061] Acquire planning and control algorithm quality data in real time, where the planning and control algorithm quality data is parameter data of the unmanned agricultural machinery during the simulation process;
[0062] When the end signal sent by the simulation test system is received, it is determined that the simulation work is completed.
[0063] Specifically, by acquiring the planning control algorithm quality data in real time, it is ensured that the subsequent test report is generated based on complete data to avoid the omission of messages.
[0064] In one embodiment of the present application, Figure 3 As shown, when receiving the automatic driving instruction sent by the simulation test system, the simulation software is used to execute at least one test case in the test case file, including the following steps:
[0065] Step S301, each time the autonomous driving instruction sent by the simulation test system is received, the simulation software is used to execute one of the test cases in the test case file, and the default setting of the simulation software is restored;
[0066] Step S302, waiting for the next new autonomous driving instruction sent by the above-mentioned simulation test system until all the above-mentioned test cases have been executed.
[0067] Specifically, one test case or multiple test cases can be executed. During the automatic execution of the test cases, the planning control quality data (i.e., autonomous driving instructions) fed back by the algorithm to be tested from the on-board unit is received in real time, and the simulation software is monitored in real time to see whether it sends an end signal. The end signal indicates that all the above test cases have been executed.
[0068] In one embodiment of the present application, Figure 4 As shown, after executing a test case in the test case file using the simulation software, the method further includes:
[0069] Update the current execution count to n+1, 0≤n≤m;
[0070] When the current execution number is m, it is determined that the simulation work is finished;
[0071] When the current number of executions is less than m, the processing steps are repeated until the current number of executions is m. The processing steps represent that upon receiving the autonomous driving instruction sent by the simulation test system, the simulation software is used to execute one of the test cases in the test case file, and the default settings of the simulation software are restored.
[0072] Specifically, it is determined whether all the above test cases have been executed based on whether the number of loop test executions is exceeded. The test case mainly includes the following aspects (not limited to the following aspects): requirement number / scenario name / case ID / test case name / test preparation / test initial condition / test step / expected result / test end condition / test result / test method / test tool / priority / version / logic test case status, automatic test case status / test executor / automatic conversion person in charge / platform.
[0073] Load the corresponding test scene and agricultural machinery according to the received scene serial number. Parse the test case parameter file through the custom executable file that comes with or is embedded in the simulation software, and send the operation task data to the on-board computing unit to be tested algorithm. Extract the current scene, agricultural machinery and sensor data in real time, mainly including the plot coordinate data in the scene, obstacle coordinate data, agricultural machinery vehicle status data, vehicle parameter data, sensor (lidar, camera, millimeter wave radar, GPS) data. Then start the automated execution of the test case.
[0074] The program built into or embedded in the simulation software is initialized, enters the waiting state, parses the test case parameter file, obtains and sets the number of times the test case is executed in this loop, and sets the nth test state of the agricultural machinery (0≤n≤m). At this time, the agricultural machinery has not started running, and it is determined whether the automatic driving command is received. In the case of receiving the automatic driving command, the agricultural machinery follows the vehicle control data, starts running, and executes the nth test case; in the case of not receiving the automatic driving command, the agricultural machinery continues to maintain the nth test state and waits for the automatic driving command. When the end condition of the nth test case is reached, the agricultural machinery stops running, the scene and the agricultural machinery are restored to the default settings, and it is determined whether the test case loop execution number m is exceeded. In the case of exceeding the test case loop execution number m, the simulation software sends an end signal to the test data management system. In the case of not exceeding the test case loop execution number m, the test number n is incremented by 1, and the next test case automatic execution begins.
[0075] Step S103: generating a test report at least according to the first comparison result, wherein the first comparison result represents the comparison result between each parameter value of the simulation result and the corresponding preset threshold value.
[0076] In the above steps, the above test case data is standardized to obtain a test case file, and the simulation software is used to load the target scene corresponding to the target scene number in the above test case file, and when the autonomous driving instruction sent by the simulation test system is received, the above simulation software is used to execute at least one test case in the above test case file. Compared with the existing scheme, it is possible to generate the control parameter values in the above autonomous driving instruction according to a variety of sensor fault data, so as to achieve the purpose of injecting faults to simulate more scenarios. Finally, a test report is generated based on at least the comparison results of each parameter value of the simulation result with the corresponding preset threshold value, thereby improving the accuracy and being more in line with the actual working conditions than the existing scheme, thereby solving the problem that the existing scheme only uses virtual simulation testing or only uses hardware-in-the-loop simulation testing, which will make the accuracy of the simulation results low, thereby making the simulation results inconsistent with the actual working conditions.
[0077] The simulation test system includes a HIL integrated cabinet and an on-board computing unit. The on-board computing unit stores the algorithm to be tested. The HIL integrated cabinet can inject various sensor faults into the on-board computing unit and allow the on-board computing unit to use the algorithm to be tested to generate corresponding autonomous driving instructions based on these faults.
[0078] Using simulation software to build agricultural machinery vehicle models and simulate the complex working scenes of agricultural machinery can provide more accurate and comprehensive simulation data for the unmanned agricultural machinery control algorithm, greatly improving the reliability and accuracy of the test results. At the same time, by generating a test report based on at least the first comparison result, the full automation of the unmanned agricultural machinery control algorithm test is achieved, which greatly improves the test efficiency and reduces the interference of human factors on the test results. In addition, the test evaluation can be customized, and the test report is more targeted and scalable. The hardware uses a real-time machine to complete data interaction in the simulation test system, ensuring the real-time and stability of data transmission; the HIL integrated cabinet has sensor data re-injection and fault injection functions, which can meet a variety of test tasks.
[0079] Step S103, i.e. generating a test report based at least on the first comparison result, wherein the first comparison result represents the comparison result of each parameter value of the simulation result with the corresponding preset threshold value, including:
[0080] In the case where the first comparison result indicates that at least one of all parameter values in the simulation result is greater than or equal to the corresponding preset threshold, generating the test report according to the first comparison result;
[0081] When the above-mentioned first comparison result represents that all parameter values in the above-mentioned simulation results are smaller than the corresponding above-mentioned preset threshold value, a second comparison result is obtained, and the above-mentioned test report is generated based on the above-mentioned second comparison result, and the above-mentioned second comparison result represents the comparison results of each parameter value of the simulation result with the corresponding standard value, the above-mentioned standard value is the standard value set in the industry, and the above-mentioned preset threshold value is a value set by the user.
[0082] Specifically, for example, if there are three parameter values in the first comparison result, and two of the parameter values are greater than or equal to the corresponding above-mentioned preset thresholds, the fault conditions corresponding to the two parameter values greater than or equal to the corresponding above-mentioned preset thresholds will be used as the results of the test report. When all three parameter values are less than the corresponding above-mentioned preset thresholds, it is necessary to compare the three parameter values with the corresponding standard values. When two of the parameter values are greater than or equal to the corresponding above-mentioned standard values, the fault conditions corresponding to the two parameter values greater than or equal to the corresponding above-mentioned standard values will be used as the results of the test report. When all three parameter values are less than the corresponding above-mentioned standard values, it is determined to be a normal situation and there is no fault.
[0083] In one embodiment of the present application, the method further includes: performing data interaction with the simulation test system in the form of a DBC file.
[0084] Receive the simulation data of scenes, agricultural machinery and sensors extracted in real time from the simulation software through UDP communication, record and process the data, and send the data to the real-time simulator through UDP communication after DBC file parsing. The real-time simulator transmits the data to the algorithm to be tested in the on-board computing unit of the simulation test system through the CAN bus. The algorithm to be tested of the on-board computing unit calculates the input simulation data and operation task data, outputs the data of automatic driving instructions, planning path, vehicle control, and planning control algorithm quality, and transmits it to the real-time simulator through the CAN bus. The real-time simulator sends it to the host computer software through UDP communication, and obtains the target data after DBC file parsing. It is sent to the simulation software through UDP communication to control the unmanned agricultural machinery to complete a test case automatic execution test. The simulation software can use software that can simulate the operation scene of unmanned agricultural machinery.
[0085] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the simulation method of the unmanned agricultural machinery of the present application will be described in detail below in combination with specific embodiments.
[0086] This embodiment relates to a specific simulation method of unmanned agricultural machinery, such as Figure 5 As shown, including:
[0087] Obtain test case data and extract case parameters from the test case data; after extracting the case parameters, generate a test case file in JSON format and extract the target scenario number in the test case file. The test case data is a description statement of the test case, and the test case file represents the mapping relationship between the parameter name and the corresponding parameter value.
[0088] Using simulation software to load the target scene corresponding to the target scene number according to the target scene number in the test case file;
[0089] Each time an automatic driving instruction is received from the simulation test system, a test case in the test case file is executed using the simulation software, and the default settings of the simulation software are restored; waiting for the next new automatic driving instruction sent by the simulation test system until all test cases have been executed, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system also generates control parameter values in the automatic driving instruction according to a variety of sensor fault data, and the control parameter values are used to adjust the parameters of the simulation software during the simulation process, and the simulation process represents the simulation of the working scene of the unmanned agricultural machinery;
[0090] In a case where the first comparison result indicates that at least one of all parameter values in the simulation result is greater than or equal to a corresponding preset threshold, generating a test report according to the first comparison result;
[0091] When the first comparison result represents that all parameter values in the simulation result are less than the corresponding preset threshold value, a second comparison result is obtained, and a test report is generated based on the second comparison result. The second comparison result represents the comparison results of each parameter value of the simulation result with the corresponding standard value, the standard value is the standard value set in the industry, and the preset threshold value is a value set by the user.
[0092] The test case data is standardized to obtain a test case file, and the simulation software is used to load the target scene corresponding to the target scene number in the test case file, and when the autonomous driving instruction sent by the simulation test system is received, the simulation software is used to execute at least one test case in the test case file. Compared with the existing scheme, the control parameter value in the autonomous driving instruction can be generated according to a variety of sensor fault data, so as to achieve the purpose of injecting faults to simulate more scenarios. Finally, a test report is generated based on at least the comparison results of each parameter value of the simulation result with the corresponding preset threshold value, which improves the accuracy and is more in line with the actual working conditions than the existing scheme, thereby solving the problem that the existing scheme only uses virtual simulation testing or only uses hardware-in-the-loop simulation testing, which will make the accuracy of the simulation results low, thereby making the simulation results inconsistent with the actual working conditions.
[0093] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0094] The embodiment of the present application also provides a simulation device for an unmanned agricultural machinery. It should be noted that the simulation device for the unmanned agricultural machinery of the embodiment of the present application can be used to execute the simulation method for the unmanned agricultural machinery provided by the embodiment of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0095] The following is an introduction to the simulation device for the unmanned agricultural machinery provided in the embodiment of the present application.
[0096] Figure 6 1 is a structural block diagram of a simulation device for unmanned agricultural machinery provided according to an embodiment of the present application. Figure 6 As shown, the device comprises:
[0097] The acquisition unit 61 is used to acquire test case data and perform standardization processing on the test case data to obtain a test case file, wherein the test case data represents a description statement of the test case, and the test case file represents a mapping relationship between a parameter name and a corresponding parameter value;
[0098] A loading unit 62 is used to use simulation software to load a target scene corresponding to the target scene number in the test case file, and to use the simulation software to execute at least one test case in the test case file when receiving an automatic driving instruction sent by the simulation test system, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system also generates a control parameter value in the automatic driving instruction according to a variety of sensor fault data, and the control parameter value is used to adjust the parameters of the simulation software during the simulation process, and the simulation process represents the simulation of the working scene of the unmanned agricultural machinery;
[0099] The generating unit 63 is used to generate a test report at least according to the first comparison result, where the first comparison result represents the comparison result between each parameter value of the simulation result and the corresponding preset threshold value.
[0100] The above-mentioned test case data is standardized to obtain a test case file, and the simulation software is used to load the target scene corresponding to the target scene number in the test case file, and when the autonomous driving instruction sent by the simulation test system is received, the simulation software is used to execute at least one test case in the test case file. Compared with the existing scheme, it is possible to generate the control parameter values in the above-mentioned autonomous driving instructions according to a variety of sensor fault data, thereby achieving the purpose of injecting faults to simulate more scenarios. Finally, a test report is generated based on at least the comparison results of each parameter value of the simulation result with the corresponding preset threshold value, thereby improving the accuracy. Compared with the existing scheme, it is more in line with the actual working conditions, thereby solving the problem that the existing scheme only uses virtual simulation testing or only uses hardware-in-the-loop simulation testing, which will make the accuracy of the simulation results low, thereby making the simulation results inconsistent with the actual working conditions.
[0101] In one embodiment of the present application, the loading unit includes a first processing module and a second processing module.
[0102] The first processing module is used for executing one of the test cases in the test case file using the simulation software each time the automatic driving instruction sent by the simulation test system is received, and restoring the default setting of the simulation software;
[0103] The second processing module is used to wait for the next new autonomous driving instruction sent by the above-mentioned simulation test system until all the above-mentioned test cases have been executed.
[0104] In one embodiment of the present application, the loading unit includes a third processing module, a fourth processing module and a fifth processing module. After executing a test case in the test case file using the simulation software, the method further includes:
[0105] The third processing module is used to update the current execution times to n+1, 0≤n≤m;
[0106] The fourth processing module is used for determining the end of the simulation work when the current execution number is m;
[0107] The fifth processing module is used to repeatedly execute the processing steps when the current execution number is less than m until the current execution number is m. The processing steps represent that when the automatic driving instruction sent by the simulation test system is received, the simulation software is used to execute one of the test cases in the test case file, and the default settings of the simulation software are restored.
[0108] In one embodiment of the present application, the acquisition unit includes a sixth processing module and a seventh processing module.
[0109] The sixth processing module is used to extract the test case parameters from the test case data;
[0110] The seventh processing module is used to generate the test case file in JSON format after extracting the test case parameters, and extract the target scenario number in the test case file.
[0111] In one embodiment of the present application, the loading unit includes an acquisition module and an eighth processing module, and in the process of executing at least one test case in the test case file using the simulation software;
[0112] The acquisition module is used to acquire the planning control algorithm quality data in real time, and the planning control algorithm quality data is the parameter data of the unmanned agricultural machinery during the simulation process;
[0113] The eighth processing module is used to determine that the simulation work is completed when receiving the end signal sent by the above-mentioned simulation test system.
[0114] In one embodiment of the present application, the generating unit includes a first generating module and a second generating module.
[0115] The first generating module is used to generate the test report according to the first comparison result when the first comparison result indicates that at least one of all parameter values in the simulation result is greater than or equal to the corresponding preset threshold value;
[0116] The second generation module is used to obtain the second comparison result when the first comparison result represents that all parameter values in the simulation result are less than the corresponding preset threshold value, and generate the test report based on the second comparison result. The second comparison result represents the comparison result of each parameter value of the simulation result with the corresponding standard value, the standard value is the standard value set in the industry, and the preset threshold value is a value set by the user.
[0117] In one embodiment of the present application, the above-mentioned device also includes a processing unit, and the processing unit is used to perform data exchange with the above-mentioned simulation test system in the form of a DBC file.
[0118] The above-mentioned unmanned agricultural machinery simulation device includes a processor and a memory, and the above-mentioned acquisition unit, loading unit and generation unit are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize the corresponding functions. The above-mentioned modules are all located in the same processor; or, the above-mentioned modules are located in different processors in any combination.
[0119] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the kernel parameters can be adjusted to solve the problem that the existing solutions only use virtual simulation tests or only use hardware-in-the-loop simulation tests, which will make the simulation results less accurate and thus make the simulation results inconsistent with the actual working conditions.
[0120] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0121] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the simulation method of the unmanned agricultural machinery.
[0122] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the simulation method of the unmanned agricultural machinery is executed when the program is run.
[0123] The embodiment of the present invention provides a device, the device includes a processor, a memory and a program stored in the memory and can be run on the processor, and the processor implements at least the following steps when executing the program: obtaining test case data, and performing standardization processing on the test case data to obtain a test case file, wherein the test case data is a description statement of the test case, and the test case file represents the mapping relationship between the parameter name and the corresponding parameter value; using simulation software according to the target scene number in the test case file, loading the target scene corresponding to the target scene number, and using the simulation software to execute at least one test case in the test case file when receiving the automatic driving instruction sent by the simulation test system, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system also generates the control parameter value in the automatic driving instruction according to multiple sensor fault data, and the control parameter value is used to adjust the parameters of the simulation software during the simulation process, and the simulation process represents the simulation of the working scene of the unmanned agricultural machinery; generating a test report at least according to the first comparison result, and the first comparison result represents the comparison result of each parameter value of the simulation result with the corresponding preset threshold value. The device in this article can be a server, a PC, a PAD, a mobile phone, etc.
[0124] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with at least the following method steps: obtaining test case data, and standardizing the test case data to obtain a test case file, wherein the test case data is a description statement of the test case, and the test case file represents a mapping relationship between a parameter name and a corresponding parameter value; using simulation software to load a target scene corresponding to the target scene number in the test case file according to the target scene number in the test case file, and upon receiving an automatic driving instruction sent by a simulation test system, using the simulation software to execute at least one test case in the test case file, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system also generates a control parameter value in the automatic driving instruction based on multiple sensor fault data, and the control parameter value is used to adjust the parameters of the simulation software during the simulation process, and the simulation process represents the simulation of the working scene of the unmanned agricultural machinery; generating a test report at least based on a first comparison result, and the first comparison result represents the comparison result of each parameter value of the simulation result with the corresponding preset threshold value.
[0125] The present application also provides a simulation system for unmanned agricultural machinery, which includes: a simulation device for unmanned agricultural machinery and a simulation test system, wherein the simulation device for unmanned agricultural machinery communicates with the simulation test system, and the simulation device for unmanned agricultural machinery is used to execute any of the above-mentioned simulation methods for unmanned agricultural machinery. The above-mentioned test case data is standardized to obtain a test case file, and the simulation software is used to load the target scene corresponding to the target scene number in the above-mentioned test case file according to the target scene number in the above-mentioned test case file, and when the automatic driving instruction sent by the simulation test system is received, the above-mentioned simulation software is used to execute at least one test case in the above-mentioned test case file, so that compared with the existing scheme, the control parameter value in the above-mentioned automatic driving instruction can be generated according to a variety of sensor fault data, so as to achieve the purpose of injecting faults to simulate more scenes, and finally, at least according to the comparison results of each parameter value of the simulation result with the corresponding preset threshold value, a test report is generated, the accuracy is improved, and it is more in line with the actual working conditions than the existing scheme, thereby solving the problem that the existing scheme only uses virtual simulation test or only uses hardware-in-the-loop simulation test, which will make the accuracy of the simulation result low, so that the simulation result does not match the actual working conditions.
[0126] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0127] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0128] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0129] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0130] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0131] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0132] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0133] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0134] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0135] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0136] 1) The simulation method of unmanned agricultural machinery of the present application performs standardized processing on the above test case data to obtain a test case file, uses simulation software to load the target scene corresponding to the target scene number in the above test case file, and upon receiving the automatic driving instruction sent by the simulation test system, uses the above simulation software to execute at least one test case in the above test case file. Compared with the existing scheme, it can generate the control parameter values in the above automatic driving instruction according to a variety of sensor fault data, so as to achieve the purpose of injecting faults to simulate more scenarios. Finally, a test report is generated based on at least the comparison results of each parameter value of the simulation result with the corresponding preset threshold value, thereby improving the accuracy and being more in line with the actual working conditions than the existing scheme, thereby solving the problem that the existing scheme only uses virtual simulation testing or only uses hardware-in-the-loop simulation testing, which will make the accuracy of the simulation results low, thereby making the simulation results inconsistent with the actual working conditions.
[0137] 2) The simulation device of the unmanned agricultural machinery of the present application performs standardized processing on the above test case data to obtain a test case file, uses simulation software to load the target scene corresponding to the target scene number in the above test case file, and upon receiving the automatic driving instruction sent by the simulation test system, uses the above simulation software to execute at least one test case in the above test case file. Compared with the existing scheme, it can generate the control parameter values in the above automatic driving instruction according to a variety of sensor fault data, so as to achieve the purpose of injecting faults to simulate more scenarios. Finally, a test report is generated based on at least the comparison results of each parameter value of the simulation result with the corresponding preset threshold value, thereby improving the accuracy and being more in line with the actual working conditions than the existing scheme, thereby solving the problem that the existing scheme only uses virtual simulation testing or only uses hardware-in-the-loop simulation testing, which will make the accuracy of the simulation results low, thereby making the simulation results inconsistent with the actual working conditions.
[0138] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A simulation method for unmanned agricultural machinery, characterized in that: include: Acquire test case data, and perform standardization processing on the test case data to obtain a test case file, wherein the test case data is a description statement of the test case, and the test case file represents a mapping relationship between a parameter name and a corresponding parameter value; Using simulation software to load a target scene corresponding to the target scene number in the test case file, and upon receiving an automatic driving instruction sent by a simulation test system, using the simulation software to execute at least one test case in the test case file, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system also generates a control parameter value in the automatic driving instruction based on a variety of sensor fault data, and the control parameter value is used to adjust the parameters of the simulation software during the simulation process, and the simulation process represents the simulation of the working scene of the unmanned agricultural machinery; A test report is generated at least according to a first comparison result, wherein the first comparison result represents a comparison result between each parameter value of the simulation result and a corresponding preset threshold value.
2. The method according to claim 1, characterized in that In the case of receiving the automatic driving instruction sent by the simulation test system, using the simulation software to execute at least one test case in the test case file, including: Each time the autonomous driving instruction sent by the simulation test system is received, the simulation software is used to execute one of the test cases in the test case file, and the default setting of the simulation software is restored; Wait for the next new autonomous driving instruction sent by the simulation test system until all the test cases have been executed.
3. The method according to claim 2, characterized in that After executing a test case in the test case file using the simulation software, the method further includes: Update the current execution count to n+1, 0≤n≤m; When the current execution number is m, determining that the simulation work is finished; When the current number of executions is less than m, the processing steps are repeated until the current number of executions is m. The processing steps represent that, upon receiving the autonomous driving instruction sent by the simulation test system, the simulation software is used to execute one of the test cases in the test case file, and the default settings of the simulation software are restored.
4. The method according to claim 1, characterized in that The test case data is standardized to obtain a test case file, including: Extracting test case parameters from the test case data; After the use case parameters are extracted, the test case file in JSON format is generated, and the target scenario number in the test case file is extracted.
5. The method according to claim 1, characterized in that In the process of executing at least one test case in the test case file using the simulation software, the method further includes: Acquire planning control algorithm quality data in real time, wherein the planning control algorithm quality data is parameter data of the unmanned agricultural machinery during the simulation process; When an end signal sent by the simulation test system is received, it is determined that the simulation work is completed.
6. The method according to claim 5, characterized in that A test report is generated based at least on the first comparison result, wherein the first comparison result represents the comparison result of each parameter value of the simulation result with the corresponding preset threshold value, including: In a case where the first comparison result indicates that at least one of all parameter values in the simulation result is greater than or equal to the corresponding preset threshold, generating the test report according to the first comparison result; When the first comparison result represents that all parameter values in the simulation result are less than the corresponding preset threshold value, a second comparison result is obtained, and the test report is generated based on the second comparison result, wherein the second comparison result represents the comparison results of each parameter value of the simulation result with the corresponding standard value, the standard value is the standard value set in the industry, and the preset threshold value is a value set by the user.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: The DBC file is used to perform data interaction with the simulation test system.
8. A simulation device for unmanned agricultural machinery, characterized in that: include: An acquisition unit is used to acquire test case data and perform standardization processing on the test case data to obtain a test case file, wherein the test case data represents a description statement of the test case, and the test case file represents a mapping relationship between a parameter name and a corresponding parameter value; A loading unit, configured to use simulation software to load a target scene corresponding to the target scene number in the test case file, and, upon receiving an automatic driving instruction sent by a simulation test system, use the simulation software to execute at least one test case in the test case file, wherein before receiving the automatic driving instruction sent by the simulation test system, the simulation test system further generates a control parameter value in the automatic driving instruction based on a plurality of sensor fault data, the control parameter value being used to adjust a parameter of the simulation software during a simulation process, and the simulation process represents a simulation of a working scene of an unmanned agricultural machinery; The generating unit is used to generate a test report at least according to a first comparison result, wherein the first comparison result represents a comparison result between each parameter value of the simulation result and a corresponding preset threshold value.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. A simulation system for unmanned agricultural machinery, characterized in that: include: A simulation device and a simulation test system for an unmanned agricultural machine, wherein the simulation device for the unmanned agricultural machine and the simulation test system communicate with each other, and the simulation device for the unmanned agricultural machine is used to execute the simulation method for the unmanned agricultural machine described in any one of claims 1 to 7.
