Closed loop testing method for vehicle control algorithms
Patent Information
- Application Number
- CN202510570882.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]然而,实车测试存在一些局限性
[0017]本申请的实施例的闭环测试方法通过将仿真软件中的车辆当前位置与实车数据进行匹配,可以获取实车数据中对应的环境信息,如停车位线、障碍物边界等。这些环境信息能够真实反映车辆在实际环境中的感知和行为,从而生成更真实的测试场景。相比传统的仿真测试方法,这种方法能够提供更接近实际运行环境的测试场景,有助于更准确地评估车辆控制算法的性能和鲁棒性。
Smart Images

Figure CN123010696A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of algorithm testing for autonomous vehicles, and more specifically, to a closed-loop testing method for vehicle control algorithms, a computer program product, and a computing device. Background Technology
[0002] With the continuous development of autonomous driving technology, the testing and verification of vehicle control algorithms has become increasingly important. Traditional testing methods mainly rely on virtual scenarios generated by simulation software. While these scenarios can provide a certain testing basis, they often differ from the actual environment and cannot fully and realistically reflect the behavior and performance of vehicles during actual parking processes.
[0003] Furthermore, existing testing methods typically use parking space lines and obstacle information generated by simulation software. This information is relatively simple and differs significantly from the data output by actual perception modules. This makes it difficult to accurately evaluate the algorithm's performance and robustness in real-world environments during testing.
[0004] In recent years, real-vehicle testing has gradually become an important testing method. Through real-vehicle testing, a large amount of real-world environmental data can be obtained, including vehicle sensor data, vehicle status, and environmental information. This data can realistically reflect the vehicle's perception and behavior in actual operation, providing a more reliable basis for algorithm development and testing.
[0005] However, real-vehicle testing has some limitations. For example, it is costly and subject to real-world conditions such as weather and traffic. Furthermore, during real-vehicle testing, changes in the control algorithm can alter the vehicle's position and state, making the testing process complex and unpredictable. Summary of the Invention
[0006] The inventors of this application recognized that more realistic test scenarios could be generated using real vehicle data, while closed-loop testing could be performed using vehicle models from simulation software, thereby more comprehensively evaluating the performance and robustness of vehicle control algorithms (such as parking planning and control algorithms). In one or more embodiments, this application proposes a parking (scenario) closed-loop testing scheme that combines data recorded from real vehicles (such as rosbag data) and simulation software (such as CarMaker).
[0007] According to one aspect of this application, a closed-loop testing method for a vehicle control algorithm is provided. The method includes: during testing, obtaining the current position of a vehicle from simulation software; matching the current position with real vehicle data to obtain corresponding environmental information from the real vehicle data; and providing the environmental information to a control module, causing the control module to generate control commands to the simulation software to control the movement of the vehicle in the simulation software, wherein the control module includes the vehicle control algorithm.
[0008] As a supplement or replacement to the above scheme, in the above method, the vehicle control algorithm is a parking planning and control algorithm, and the control module is a parking planning and control module.
[0009] As a supplement or replacement to the above scheme, in the above method, the real vehicle data is pre-recorded actual vehicle data, and the method further includes: at the start of the test, obtaining the initial position and orientation of the vehicle in the real vehicle data so as to serve as the initial position and orientation of the vehicle in the simulation software.
[0010] As a supplement or replacement to the above solution, in the above method, matching the current location with real vehicle data to obtain the corresponding environmental information in the real vehicle data includes: finding the point closest to the current location in the real vehicle data; obtaining the timestamp corresponding to the point; and finding the corresponding parking space and obstacle information from the real vehicle data based on the obtained timestamp.
[0011] As a supplement or replacement to the above scheme, in the above method, the test includes a parking space search phase and a parking phase, and in the parking space search phase, the simulation software controls the movement of the vehicle and sets different vehicle speeds and steering angles in the simulation software to achieve different parking space search trajectories.
[0012] As a supplement or replacement to the above scheme, in the above method, when the vehicle reaches the end of the parking space search trajectory, it enters the parking phase of the test, and in the parking phase, the parking planning and control module controls the movement of the vehicle in the simulation software.
[0013] As a supplement or replacement to the above scheme, in the above method, the simulation software is also used to provide vehicle status, which includes speed, gear and acceleration.
[0014] As a supplement or replacement to the above solution, in the above method, the real vehicle data is rosbag data, and the method further includes: before performing the closed-loop test, acquiring the rosbag data recorded by the real vehicle, the rosbag data containing environmental information, wherein the environmental information includes the vehicle's trajectory, parking space lines, and obstacle boundaries.
[0015] According to another aspect of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the method described above.
[0016] According to another aspect of this application, a computing device is provided, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to perform the following steps: performing the closed-loop test method as described above.
[0017] The closed-loop testing method of this application matches the current vehicle position in the simulation software with real vehicle data to obtain corresponding environmental information from the real vehicle data, such as parking space lines and obstacle boundaries. This environmental information can realistically reflect the vehicle's perception and behavior in the actual environment, thereby generating a more realistic test scenario. Compared with traditional simulation testing methods, this method can provide a test scenario that is closer to the actual operating environment, which helps to more accurately evaluate the performance and robustness of the vehicle control algorithm.
[0018] Furthermore, during closed-loop testing, the control module generates control commands based on the acquired environmental information. These commands are sent back to the simulation software to control the vehicle's movement within the simulation. This real-time feedback mechanism forms a closed loop, allowing the control algorithm's output to influence the vehicle's state in real time, while changes in the vehicle's state are fed back to the control algorithm. Therefore, closed-loop testing can more realistically simulate the vehicle's behavior in actual operation, evaluate the algorithm's performance and robustness in dynamic environments, and help identify and resolve potential problems that the algorithm may encounter in practical applications.
[0019] Furthermore, in one or more embodiments, by changing parameters such as vehicle speed and steering angle in the simulation software, various different parking space search trajectories can be generated. These trajectories can cover different search scenarios, such as narrow streets and open parking lots. This helps to test the performance and adaptability of parking planning and control algorithms under different conditions. Attached Figure Description
[0020] The above and other objects and advantages of this application will become more fully clear from the following detailed description taken in conjunction with the accompanying drawings, wherein the same or similar elements are indicated by the same reference numerals.
[0021] Figure 1 A flowchart illustrating a closed-loop testing method for a vehicle control algorithm according to an embodiment of this application is shown.
[0022] Figure 2 A schematic diagram of a parking scenario according to an embodiment of this application is shown;
[0023] Figure 3 A schematic diagram of the structure of a computing device according to an embodiment of this application is shown. Detailed Implementation
[0024] In the following, a closed-loop test scheme for the vehicle control algorithm according to various exemplary embodiments of the present application will be described in detail with reference to the accompanying drawings.
[0025] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the embodiments of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In addition, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples, without contradiction.
[0026] Figure 1 A flowchart illustrating a closed-loop testing method 1000 for a vehicle control algorithm according to an embodiment of this application is shown. Figure 1 As shown, the closed-loop test method 1000 includes the following steps:
[0027] In step S110, during the test, the current position of the vehicle is obtained from the simulation software;
[0028] In step S120, the current location is matched with the real vehicle data to obtain the corresponding environmental information from the real vehicle data; and
[0029] In step S130, the environmental information is provided to the control module, which generates control commands for the simulation software to control the movement of the vehicle in the simulation software. The control module includes the vehicle control algorithm.
[0030] In the context of this application, the term "closed-loop testing" refers to a testing process where the output of the vehicle control algorithm is fed back to the simulation software in real time, affecting the vehicle's state. Changes in the vehicle's state, in turn, feed back to the vehicle control algorithm, forming a closed loop. This testing method can more realistically simulate the behavior of a vehicle in actual operation, evaluating the algorithm's performance and robustness. It is understood that if the vehicle control algorithm changes, the vehicle's state (including its position) in the simulation software may also change accordingly.
[0031] In step S110, the vehicle's current position is obtained from the simulation software during the test. This step is fundamental to closed-loop testing; by obtaining the vehicle's current position in the simulation environment, necessary data can be provided for subsequent environmental information matching. In the closed-loop testing method 1000 for vehicle control algorithms, the "simulation environment" provides a virtual platform for simulating the vehicle's behavior and interactions under various conditions. It is typically built and run by professional simulation software (such as CarMaker, CarSim, etc.). In one embodiment, the simulation environment may include a vehicle model, which provides a physical model of the vehicle, including simulations of dynamics, kinematics, and control systems. Of course, those skilled in the art will understand that the simulation environment may also include other models, such as sensor models, environmental models, etc. Testing in a simulation environment can avoid potential safety risks that may occur in real-vehicle testing, such as vehicle collisions and personal injuries. Moreover, the simulation environment can easily simulate various complex test scenarios, such as different road conditions, traffic flow, and weather conditions, and has strong flexibility and scalability. In other words, through the simulation environment, closed-loop testing of vehicle control algorithms can be effectively carried out, improving testing efficiency and safety, reducing testing costs, and providing more realistic testing scenarios to help developers better evaluate and optimize algorithm performance.
[0032] In step S120, the acquired vehicle's current location is matched with real-vehicle data to obtain corresponding environmental information from the real-vehicle data. In one or more embodiments, the real-vehicle data may contain rich environmental information, such as parking space lines and obstacle boundaries, which can realistically reflect the vehicle's perception and behavior in the actual environment. By matching the current location with the real-vehicle data, environmental information corresponding to the current test scenario can be obtained, thereby enhancing the realism of the test.
[0033] In closed-loop testing of vehicle control algorithms, "current vehicle position" refers to the simulated position of the vehicle at a given moment in the simulation software. This position information is obtained through interfaces or data output functions provided by the simulation software. In one or more embodiments, this position information includes the vehicle's coordinates (such as latitude and longitude or relative position), direction (such as orientation angle), etc.
[0034] The term "real-world vehicle data" refers to data recorded and / or collected by various sensors, devices, and systems during actual vehicle operation. This data encompasses the vehicle's own state, surrounding environmental information, and interactions between the vehicle and its environment, realistically reflecting the vehicle's performance and environment in real-world usage scenarios. In one or more embodiments, this data includes vehicle sensor data (such as LiDAR, cameras, IMU, etc.), vehicle state (such as speed, steering angle, gear position, etc.), and environmental information (such as parking space lines, obstacle positions, etc.). For example, real-world vehicle data can be rosbag data, where rosbag is a tool in ROS (Robot Operating System) used to record and replay messages. rosbag data files (usually with the .bag extension) record the timestamps and content of these messages and can be used for offline analysis and testing. In one embodiment, before performing closed-loop testing, real-world rosbag data is acquired, containing environmental information including the vehicle's trajectory, parking space lines, obstacle boundaries, etc.
[0035] In one embodiment, step S120 includes: finding the point closest to the current location in the real vehicle data; obtaining the timestamp corresponding to the point; and finding the corresponding parking space and obstacle information from the real vehicle data based on the obtained timestamp. Specifically, the purpose of finding the point closest to the current location in the real vehicle data is to accurately locate the data point closest to the current simulated vehicle position within a large set of real vehicle data. Real vehicle data typically contains the vehicle's location information at different points in time. Using spatial matching algorithms or data indexing techniques, the point closest to the current vehicle position is found. In this embodiment, in addition to location information, the real vehicle data also records a timestamp corresponding to each location data point. Obtaining the timestamp is to determine the time point to which the location information belongs in the real vehicle data record. The timestamp provides a temporal reference, which helps in the subsequent extraction of dynamic environmental information. Based on the timestamp, the environmental information corresponding to the timestamp is queried from the real vehicle data, including the specific location and shape of the parking space lines, and the boundaries and size of obstacles. This environmental information is real-world scene data captured from the actual operating environment of the real vehicle, providing a more realistic test scenario for closed-loop testing.
[0036] In step S130, the matched environmental information is provided to the control module, enabling the control module to generate control commands for the simulation software to control the movement of the vehicle within the simulation software. The control module contains a vehicle control algorithm. Based on the provided environmental information, the control module can generate corresponding control commands, which are sent back to the simulation software to control the movement of the vehicle within the simulation software. This step forms a closed loop, allowing the output of the control algorithm to influence the vehicle's state in real time, while changes in the vehicle's state are fed back to the control algorithm, thus achieving closed-loop control.
[0037] although Figure 1 As not shown in the figure, in one embodiment, the closed-loop test method 1000 further includes acquiring the initial position and orientation of the vehicle in the real vehicle data at the start of the test so as to serve as the initial position and orientation of the vehicle in the simulation software.
[0038] In the context of this application, a vehicle control algorithm refers to an algorithm used to control vehicle behavior and make decisions. In one embodiment, the vehicle control algorithm can be applied to a parking scenario, specifically referring to an algorithm for parking planning and control. Similarly, a control module refers to a software or hardware module that contains a vehicle control algorithm. In one embodiment, the control module can be applied to a parking scenario, specifically referring to a module for parking planning and control.
[0039] Taking a parking scenario as an example, the test includes a parking space search phase and a parking phase. In the parking space search phase, simulation software controls vehicle movement and sets different parameters such as vehicle speed and steering angle to achieve different parking space search trajectories. By changing the vehicle's initial position, speed, and steering angle parameters in the simulation software, various test scenarios can be generated to test the algorithm's performance and adaptability under different conditions.
[0040] When the vehicle reaches the end of the parking space search trajectory, the test enters the parking phase, during which the parking planning and control module controls the vehicle's movement in the simulation software. In other words, during this phase, the parking planning and control module takes over control of the vehicle's movement in the simulation software. Specifically, the parking planning and control module generates control commands based on received environmental information. These commands may include:
[0041] (1) Speed control command: Adjust the vehicle speed so that it can smoothly enter the parking space;
[0042] (2) Steering Angle Control Command: Controls the vehicle's steering angle so that the vehicle can accurately adjust its direction of travel and align with the parking space; and
[0043] (3) Braking control command: When necessary, control the vehicle’s braking system so that the vehicle can stop or decelerate safely.
[0044] In one or more embodiments, the simulation software may also provide vehicle status, which may include speed (including longitudinal and lateral speed), gear (such as drive, reverse, or neutral), and acceleration (including longitudinal and lateral acceleration).
[0045] refer to Figure 2 It illustrates a parking scenario diagram according to an embodiment of this application. Figure 2 Taking the parking scenario shown as an example, O is the starting point, curve OB is the vehicle trajectory recorded by the actual vehicle, and curves OA and AC are the parking space search trajectory and parking trajectory in the closed-loop test, respectively. Initial settings are required at the start of the test. In one embodiment, the initial position and orientation of the vehicle in the actual vehicle data are obtained, and the same initial position and orientation are set in the simulation software (e.g., CarMaker) scenario. This simplifies subsequent calculations and ensures that the starting point of the simulation test is consistent with the starting point of the actual vehicle test. Furthermore, in one embodiment, it is necessary to record the points of the actual vehicle trajectory OB in the recorded data, as well as the timestamp corresponding to each point.
[0046] The entire closed-loop test can be divided into two phases: the parking space search phase and the parking phase. In the parking space search phase, the vehicle's movement is controlled by the simulation software CarMaker. By setting different parameters such as vehicle speed and steering angle in CarMaker, different parking space search trajectories can be achieved. Furthermore, testing whether the vehicle can park normally at different terminal positions and directions can generalize to different test scenarios.
[0047] When the vehicle reaches the end of the parking space search trajectory OA, it enters the parking phase. During the parking phase, the parking planning and control module controls the vehicle's movement in the simulation software CarMaker. Furthermore, CarMaker sends vehicle status information, such as speed, gear, and acceleration.
[0048] exist Figure 2In this embodiment, the environmental information sent to the planning and control module can be obtained as follows: First, the current position of the vehicle is obtained, i.e., during the test, the current position of the vehicle is obtained from the simulation software CarMaker; next, the nearest point is matched, i.e., the point closest to the current position of the vehicle is found in the recorded vehicle trajectory OB; finally, the corresponding environmental information is obtained, i.e., based on the timestamp corresponding to the nearest point, the corresponding parking space and obstacle information are found in the recorded data, and this information (i.e., environmental information) is sent to the planning and control module. In this embodiment, the real vehicle data is combined with the simulation software CarMaker, and the corresponding environmental information (such as parking space and obstacle information) is sent to the planning and control algorithm module using a position matching method to provide control commands to the simulation software. In this way, only the vehicle model in the simulation software CarMaker needs to be used, without using its environmental model.
[0049] Furthermore, those skilled in the art will readily understand that the closed-loop testing method 1000 for the vehicle control algorithm provided in one or more embodiments of this application can be implemented by a computer program. For example, the computer program is included in a computer program product, and when executed by a processor, it implements the closed-loop testing method 1000 of one or more embodiments of this application. As another example, when a computer-readable storage medium (e.g., a USB flash drive) containing the computer program is connected to a computer, running the computer program executes the closed-loop testing method 1000 of one or more embodiments of this application.
[0050] refer to Figure 3 It shows a structural schematic diagram of an electronic device 3000 according to an embodiment of this application. For example... Figure 3 As shown, the electronic device 3000 includes a memory 310 and a processor 320, on which a computer program is stored. In one embodiment, the processor 320 executes the computer program to perform the following function or step: executing the closed-loop test method 1000 as described above. In one or more embodiments, the electronic device may be a domain controller, a camera, or a radar.
[0051] In summary, the closed-loop testing scheme of this application matches the current vehicle position in the simulation software with real vehicle data to obtain corresponding environmental information from the real vehicle data, such as parking space lines and obstacle boundaries. This environmental information can realistically reflect the vehicle's perception and behavior in the actual environment, thereby generating a more realistic test scenario. Compared with traditional simulation testing methods, the scheme of this application can provide a test scenario that is closer to the actual operating environment, which helps to more accurately evaluate the performance and robustness of the vehicle control algorithm.
[0052] Furthermore, during closed-loop testing, the control module generates control commands based on the acquired environmental information. These commands are sent back to the simulation software to control the vehicle's movement within the simulation. This real-time feedback mechanism forms a closed loop, allowing the control algorithm's output to influence the vehicle's state in real time, while changes in the vehicle's state are fed back to the control algorithm. Therefore, closed-loop testing can more realistically simulate the vehicle's behavior in actual operation, evaluate the algorithm's performance and robustness in dynamic environments, and help identify and resolve potential problems that the algorithm may encounter in practical applications.
[0053] Furthermore, in one or more embodiments, by changing parameters such as vehicle speed and steering angle in the simulation software, various different parking space search trajectories can be generated. These trajectories can cover different search scenarios, such as narrow streets and open parking lots. This helps to test the performance and adaptability of parking planning and control algorithms under different conditions.
[0054] The above examples primarily illustrate the closed-loop testing scheme of embodiments of this application. Although only some implementations of this application have been described, those skilled in the art should understand that this application can be implemented in many other forms without departing from its spirit and scope. Therefore, the examples and implementations shown are considered illustrative rather than restrictive, and this application may cover various modifications and substitutions without departing from the spirit and scope of this application as defined in the claims.
Claims
1. A closed-loop testing method for a vehicle control algorithm, characterized in that, The method includes: During the test, the vehicle's current location is obtained from the simulation software; The current location is matched with real vehicle data to obtain the corresponding environmental information from the real vehicle data; and The environmental information is provided to the control module, which then generates control commands for the simulation software to control the movement of the vehicle within the simulation software. The control module includes the vehicle control algorithm.
2. The method as described in claim 1, wherein, The vehicle control algorithm is a parking planning and control algorithm, and the control module is a parking planning and control module.
3. The method as described in claim 1, wherein, The actual vehicle data is pre-recorded actual vehicle data, and the method further includes: At the start of the test, the initial position and orientation of the vehicle in the real vehicle data are obtained so as to serve as the initial position and orientation of the vehicle in the simulation software.
4. The method of claim 2, wherein, Matching the current location with real vehicle data to obtain the corresponding environmental information from the real vehicle data includes: Find the point closest to the current location in the real vehicle data; Get the timestamp corresponding to this point; and Based on the obtained timestamp, the corresponding parking space and obstacle information are retrieved from the real vehicle data.
5. The method of claim 2, wherein, The test includes a parking space search phase and a parking phase, wherein in the parking space search phase, the simulation software controls the movement of the vehicle and sets different vehicle speeds and steering angles in the simulation software to achieve different parking space search trajectories.
6. The method of claim 5, wherein, When the vehicle reaches the end of the parking space search trajectory, it enters the parking phase of the test, and during the parking phase, the parking planning and control module controls the movement of the vehicle in the simulation software.
7. The method of claim 6, wherein, The simulation software is also used to provide vehicle status, including speed, gear, and acceleration.
8. The method of claim 1, wherein the real vehicle data is rosbag data, and the method further comprises: Before performing the closed-loop test, rosbag data recorded by the actual vehicle is acquired. This rosbag data contains environmental information, including the vehicle's trajectory, parking space lines, and obstacle boundaries.
9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 8.
10. A computing device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to perform the following steps: Perform the closed-loop test method as described in any one of claims 1 to 8.
