Self-defined virtual obstacle automatic driving real vehicle-in-the-loop test method and system
Patent Information
- Application Number
- CN202210198137.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-01
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-03-01
AI Technical Summary
[0003]实车测试对自动驾驶车辆测试来说是最精确的环境,但是实车测试的存在测试时间、人力、场地等成本高、变换不同场景费时费力、有人参与的情况下安全较难保证等问题,随机因素多,可重复性低
[0066]This invention discloses a method and system for real-vehicle-in-the-loop (V2L) testing of autonomous driving systems with customizable virtual obstacles. The system uses points on the autonomous driving route during V2L testing as the trigger origin for the test scenario. The GPS coordinates of the trigger origin are known. When the test vehicle reaches the trigger origin, the corresponding test scenario is triggered, and testing begins. By using the trigger origin as the coordinate system origin, the system defines the forward trajectories of several virtual obstacles. Through two coordinate transformations of the virtual obstacles, it simulates the trajectory of the virtual obstacles within the decision controller during V2L testing. The system allows for customization of obstacle trajectories, number, speed, etc., and can flexibly construct various different test scenarios, especially for testing dangerous critical scenarios. Furthermore, this testing method can shield the influence of the perception system during V2L testing, more accurately testing the performance of the decision controller. It enables customization of test scenarios, repeatable test conditions, and the creation of a test scenario library, thus improving testing efficiency.
Smart Images

Figure CN116736735B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of autonomous vehicle testing technology, specifically relating to an autonomous vehicle-in-the-loop testing method and system with custom virtual obstacles. Background Technology
[0002] In recent years, autonomous driving has become an important development trend in the automotive industry. With the improvement of autonomous driving levels, how to efficiently test and verify the stability of autonomous vehicle system performance and how to realize intelligent algorithms for fully autonomous driving have become a crucial link in the development of autonomous vehicles.
[0003] Real-vehicle testing provides the most accurate environment for testing autonomous vehicles. However, it suffers from drawbacks such as high costs in terms of testing time, manpower, and facilities; the time and effort required to change different scenarios; difficulty in ensuring safety when human involvement is involved; and numerous random factors, resulting in low repeatability. Currently, a testing method that lies between hardware-in-the-loop (HIL) testing and real-vehicle testing—vehicle-in-the-loop (VIL) testing—can help solve these problems. Existing methods for simulating obstacles in VIL testing include random generation and generation through instance scenario extraction. In VIL testing, if the number and routes of virtual obstacles can be customized, various test scenarios can be simulated through custom configuration combinations. This achieves repeatable test conditions, customizable test scenarios, and the ability to build a test scenario library, saving time and costs, reducing the probability of dangerous events, and significantly improving the efficiency of autonomous driving scenario testing. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a method and system for real vehicle-in-the-loop testing of autonomous driving with custom virtual obstacles that greatly improves the testing efficiency of autonomous driving scenarios. By simulating a variety of test scenarios through custom configuration combinations, the test scenarios can be customized and the test conditions can be repeated.
[0005] To achieve the above objectives, based on one aspect of the present invention, a method for real-vehicle-in-the-loop testing of autonomous driving systems with custom virtual obstacles is provided, the method comprising:
[0006] A test scenario is established, which includes a trigger origin and several virtual obstacles. The trigger origin is a point with known GPS coordinates determined according to the test route. The forward trajectory, initial velocity, and acceleration of the virtual obstacles are set with the trigger origin as the coordinate origin.
[0007] When the test vehicle travels to the trigger origin, the corresponding test scenario is triggered. The virtual obstacles in the test scenario move forward according to the set forward trajectory point, initial velocity and acceleration.
[0008] The GPS coordinates and heading angle of the test vehicle are acquired once every preset time period. At the same time, the relative coordinates of the virtual obstacle relative to the trigger origin are acquired. Then, the GPS coordinates of the virtual obstacle are calculated based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin.
[0009] Based on the calculated GPS coordinates of the virtual obstacle and the GPS coordinates and heading angle of the test vehicle at the same moment, the vehicle body coordinates of the virtual obstacle relative to the test vehicle at the current moment are calculated, and then the vehicle body coordinates of the virtual obstacle are sent to the decision controller of the test vehicle.
[0010] The decision controller simulates the trajectory of the virtual obstacle within the decision controller based on the received vehicle coordinates of the virtual obstacle, and makes a decision based on the received vehicle coordinates of the virtual obstacle to control the movement of the test vehicle.
[0011] Record the motion data of the test vehicle in the test scenario and then analyze it.
[0012] In one embodiment, the performance of the decision controller of the test vehicle is evaluated based on the motion data of the test vehicle in the test scenario.
[0013] In one embodiment, the step of simultaneously acquiring the relative coordinates of the virtual obstacle with respect to the trigger origin at the same moment, and then calculating the GPS coordinates of the virtual obstacle based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin, includes:
[0014] Obtain the GPS coordinates of the trigger origin;
[0015] Obtain the relative coordinates of the virtual obstacle trajectory points at the current moment;
[0016] Convert the relative coordinates of the virtual obstacle trajectory points to GPS coordinates:
[0017] S31: Calculate the angle between the relative coordinates of the virtual obstacle trajectory points and the line connecting the Earth's center and the equatorial plane.
[0018]
[0019] S32: Iterative calculation of latitude angle
[0020] S321: Calculation value,
[0021]
[0022] Where X, Y, and Z represent the x-axis coordinates, y-axis coordinates, and z-axis coordinates of the virtual obstacle trajectory point in the coordinate system with the trigger origin as the coordinate origin, respectively, and e represents the square of the first eccentricity, 0.0066943799013.
[0023] S322: Calculation and If the absolute value of the difference is less than 1.0e-10, the iteration calculation ends; otherwise, it ends. The value is used Replace the value and proceed to step S321 to continue the calculation;
[0024] S33. Calculate the final GPS coordinates of the virtual obstacle trajectory points:
[0025]
[0026] Blon = arctan(Y / X) * 180 / π
[0027] Wherein, Blat represents the latitude coordinate of the GPS coordinate of the virtual obstacle trajectory point, and Blon represents the longitude coordinate of the GPS coordinate of the virtual obstacle trajectory point.
[0028] In one embodiment, calculating the coordinates of the virtual obstacle relative to the test vehicle at the current moment, based on the calculated GPS coordinates of the virtual obstacle and the obtained GPS coordinates and heading angle of the test vehicle at the same time, includes:
[0029] S41: Convert the GPS coordinates of the virtual obstacle trajectory points and the GPS coordinates of the test vehicle at the same time into ECEF coordinates; where ECEF (Earth-Centered, Earth-Fixed) is an abbreviation for the Earth-Centered, Earth-Fixed coordinate system.
[0030] S411: Obtain the GPS coordinates of the virtual obstacle trajectory points and the GPS coordinates of the actual test vehicle at the same time;
[0031] S412: Calculate the ECEF coordinates corresponding to the GPS coordinates of the virtual obstacle trajectory points and the ECEF coordinates corresponding to the GPS coordinates of the actual test vehicle at the same time.
[0032] a=6378137, b=6356752.31414, e=0.0818191910428,
[0033]
[0034] XB=N1*cos(Blat*π / 180)*cos(Blon*π / 180),
[0035] YB=N1*cos(Blat*π / 180)*sin(Blon*π / 180),
[0036] ZB=(N1-e*e*N1)*sin(Blat*π / 180);
[0037]
[0038] XA=N2*cos(Alat*π / 180)*cos(Alon*π / 180),
[0039] YA=N2*cos(Alat*π / 180)*sin(Alon*π / 180),
[0040] ZA=(N2-e*e*N2)*sin(Alat*π / 180),
[0041] Wherein, Blat represents the latitude coordinate of the GPS coordinate of the virtual obstacle trajectory point, Blon represents the longitude coordinate of the GPS coordinate of the virtual obstacle trajectory point, XB, YB, and ZB represent the x-axis, y-axis, and z-axis coordinates of the ECEF coordinate of the virtual obstacle trajectory point, respectively; Alat represents the latitude coordinate of the GPS coordinate of the test vehicle, Alon represents the longitude coordinate of the GPS coordinate of the test vehicle, and XA, YA, and ZA represent the x-axis, y-axis, and z-axis coordinates of the ECEF coordinate of the test vehicle, respectively.
[0042] S42: Convert the ECEF coordinates of the virtual obstacle trajectory points to ENU coordinates; where ENU is the abbreviation for the station-centered rectangular coordinate system;
[0043] S421: Obtain the GPS coordinates and corresponding ECEF coordinates of the virtual obstacle trajectory points, and obtain the GPS coordinates and corresponding ECEF coordinates of the test vehicle at the same time.
[0044] S422: Calculate the ENU coordinates of the virtual obstacle trajectory points.
[0045] ENX=-sin(Alon*π / 180)*(XB-XA)+cos(Alon*π / 180)*(YB-YA),
[0046] ENY=-sin(Alat*π / 180)*cos(Alon*π / 180)*(XB-XA)-sin(Alat*π / 180)*sin(Alon*π / 180)*(YB-YA)+cos(Alat*π / 180)*(ZB-ZA),
[0047] ENZ=0,
[0048] Wherein, ENX, ENY, and ENZ represent the x-axis, y-axis, and z-axis coordinates of the ENU coordinates of the virtual obstacle trajectory point, respectively;
[0049] S43: Convert the ENU coordinates of the virtual obstacle trajectory points to vehicle body coordinates.
[0050] S431: Obtain the ENU coordinates of the virtual obstacle trajectory points and the heading angle (yaw) of the test vehicle at the same time;
[0051] S432: Calculate the final vehicle coordinates corresponding to the GPS coordinates of the virtual obstacle trajectory points.
[0052] LocalX=ENX*cos(yaw*π / 180)-ENY*sin(yaw*π / 180);
[0053] LocalY=ENY*cos(yaw*π / 180)+ENX*sin(yaw*π / 180),
[0054] Wherein, LocalX and LocalY represent the x-axis and y-axis coordinates of the virtual obstacle trajectory point in the vehicle coordinate system with the centroid of the test vehicle as the origin, respectively.
[0055] In one embodiment, the perception system of the test vehicle is controlled to be turned off during the test scenario triggering.
[0056] In one embodiment, the method further includes collecting test scenarios that include a trigger origin and several virtual obstacles to form a test scenario library.
[0057] Based on another aspect of the present invention, an autonomous driving vehicle-in-the-loop testing system with custom virtual obstacles is provided, comprising a test scenario construction module, a test scenario triggering module, a GPS coordinate transformation module, a vehicle coordinate transformation module, a decision controller module, and a recording and analysis module.
[0058] The test scenario construction module is used to establish a test scenario that includes a trigger origin and several virtual obstacles. The trigger origin is a point with fixed GPS coordinates. The forward trajectory point, initial velocity and acceleration of the virtual obstacles are set with the trigger origin as the coordinate origin.
[0059] The test scenario triggering module is used to control the test vehicle to drive to the trigger origin point and trigger the corresponding test scenario. The virtual obstacles in the test scenario move forward according to the set forward trajectory point, initial velocity and acceleration.
[0060] The GPS coordinate conversion module is used to acquire the GPS coordinates and heading angle of the test vehicle once every preset time period, and at the same time acquire the relative coordinates of the virtual obstacle relative to the trigger origin. Then, the GPS coordinates of the virtual obstacle are calculated based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin.
[0061] The vehicle body coordinate transformation module is used to calculate the vehicle body coordinates of the virtual obstacle relative to the test vehicle at the current moment based on the calculated GPS coordinates of the virtual obstacle and the GPS coordinates and heading angle of the test vehicle at the same moment, and then send the vehicle body coordinates of the virtual obstacle to the decision controller of the test vehicle.
[0062] The decision controller module is used to simulate the trajectory of the virtual obstacle within the decision controller based on the received vehicle body coordinates of the virtual obstacle. The decision controller makes a decision based on the received vehicle body coordinates of the virtual obstacle and controls the movement of the test vehicle.
[0063] The recording and analysis module is used to record and analyze the motion data of the test vehicle in the test scenario.
[0064] In one embodiment, a decision controller evaluation module is further included, which is used to evaluate the performance of the decision controller of the test vehicle based on the motion data of the test vehicle in the test scenario. According to another aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any of the above embodiments.
[0065] According to another aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described in any of the preceding claims.
[0066] This invention discloses a method and system for real-vehicle-in-the-loop (V2L) testing of autonomous driving systems with customizable virtual obstacles. The system uses points on the autonomous driving route during V2L testing as the trigger origin for the test scenario. The GPS coordinates of the trigger origin are known. When the test vehicle reaches the trigger origin, the corresponding test scenario is triggered, and testing begins. By using the trigger origin as the coordinate system origin, the system defines the forward trajectories of several virtual obstacles. Through two coordinate transformations of the virtual obstacles, it simulates the trajectory of the virtual obstacles within the decision controller during V2L testing. The system allows for customization of obstacle trajectories, number, speed, etc., and can flexibly construct various different test scenarios, especially for testing dangerous critical scenarios. Furthermore, this testing method can shield the influence of the perception system during V2L testing, more accurately testing the performance of the decision controller. It enables customization of test scenarios, repeatable test conditions, and the creation of a test scenario library, thus improving testing efficiency. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in one or more embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only one or more embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0068] Figure 1 This is a flowchart illustrating an embodiment of the autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles according to the present invention.
[0069] Figure 2 This is a schematic diagram of a test scenario triggered by a test vehicle in an embodiment of the autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles according to the present invention.
[0070] Figure 3 This is a schematic diagram of the virtual obstacle trajectory in a test scenario of an embodiment of the autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles according to the present invention.
[0071] Figure 4 A schematic diagram of the ENU coordinate system and the ECEF coordinate system;
[0072] Figure 5 This is a schematic diagram of an embodiment of the autonomous driving vehicle-in-the-loop testing system with custom virtual obstacles according to the present invention.
[0073] Figure 6 This is an internal structural diagram of a computer device according to an embodiment of the present invention. Detailed Implementation
[0074] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0075] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the element or object listed following the word and its equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0076] like Figure 1 As shown, this invention provides a method for real-world vehicle-in-the-loop testing of autonomous driving systems using custom virtual obstacles. The method includes:
[0077] S11: Establish a test scenario that includes a trigger origin and several virtual obstacles. The trigger origin is a point with known GPS coordinates determined according to the test route. Set the forward trajectory, initial velocity, and acceleration of the virtual obstacles with the trigger origin as the coordinate origin.
[0078] S12: When the test vehicle travels to the trigger origin, the corresponding test scenario is triggered. The virtual obstacles in the test scenario move forward according to the set trajectory point, initial velocity and acceleration.
[0079] like Figure 2 and Figure 3 As shown, points A1 and A2 represent virtual obstacles, car represents the test vehicle, and point O represents the trigger origin (0, 0, 0). When the test vehicle reaches the trigger origin, the corresponding test scenario is triggered. The test scenario consists of several virtual obstacles with different forward trajectories. These virtual obstacles move along predetermined trajectory points, and the coordinates of each trajectory point are relative to the trigger origin.
[0080] Specifically, the trigger origin is selected based on the test route of the actual test vehicle for autonomous driving. The GPS coordinates of the trigger origin are known. Using the trigger origin as the origin of the coordinate system, the forward trajectory points, initial velocity, and acceleration of the virtual obstacle are defined. After the test scenario begins, the virtual obstacle will move forward along the trajectory points in sequence according to the defined initial velocity and acceleration, forming a forward trajectory. This method allows for the customization of several virtual obstacles within a single test scenario, achieving greater diversity in the test scenarios.
[0081] S13: Obtain the GPS coordinates and heading angle of the test vehicle at preset time intervals, and at the same time obtain the relative coordinates of the virtual obstacle relative to the trigger origin. Then, calculate the GPS coordinates of the virtual obstacle based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin.
[0082] Specifically, the preset time period is determined based on the frequency at which the vehicle perception system receives obstacle information. Assuming the receiving frequency is once every 100ms, the preset time period is set to 100ms. Based on the previously set initial velocity, acceleration, and forward trajectory points, the position of the virtual obstacle after every 100ms from its initial position is calculated. The coordinates of this position are the relative coordinates of the virtual obstacle with respect to the trigger origin. Then, based on the GPS coordinates of the trigger origin, the calculated relative coordinates of the virtual obstacle every 100ms are all converted into GPS coordinates, thus obtaining the GPS coordinates of the virtual obstacle every 100ms, i.e., the GPS trajectory of the virtual obstacle.
[0083] Simultaneously, the relative coordinates of the virtual obstacle with respect to the trigger origin are obtained at the same moment. Then, the GPS coordinates of the virtual obstacle are calculated based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin, including:
[0084] Obtain the GPS coordinates (latitude, longitude) of the trigger origin;
[0085] Obtain the relative coordinates (X, Y, Z) of the virtual obstacle trajectory point at the current moment;
[0086] Convert the relative coordinates of the virtual obstacle trajectory points to GPS coordinates:
[0087] S31: Calculate the angle between the relative coordinates (X, Y, Z) and the line connecting the Earth's center and the equatorial plane.
[0088]
[0089] S32: Iterative calculation of latitude angle
[0090] S321: Calculation value,
[0091]
[0092] Where e represents the square of the first eccentricity, 0.0066943799013;
[0093] S322: Calculation and If the absolute value of the difference is less than 1.0e-10, the iteration calculation ends; otherwise, it ends. The value is used Replace the value and proceed to step S321 to continue the calculation;
[0094] S33. Calculate the final GPS coordinates (Blat, Blon) of the virtual obstacle trajectory points:
[0095]
[0096] Blon = arctan(Y / X) * 180 / π.
[0097] S14: Based on the calculated GPS coordinates of the virtual obstacle and the GPS coordinates and heading angle of the test vehicle at the same time, calculate the vehicle body coordinates of the virtual obstacle relative to the test vehicle at the current time, and then send the vehicle body coordinates of the virtual obstacle to the decision controller of the test vehicle.
[0098] Specifically, after obtaining the GPS trajectory of the virtual obstacle, it cannot be directly sent to the decision controller of the test vehicle. This is because the decision controller receives and determines the position of the obstacle based on the vehicle body coordinate system. Therefore, it is necessary to first obtain the GPS coordinates and heading angle of the test vehicle every 100ms. Based on the obtained GPS coordinates and heading angle of the test vehicle, and then based on the GPS coordinates of the virtual obstacle at the same moment, the vehicle body coordinates of the virtual obstacle based on the vehicle body coordinate system at the current moment are calculated, and then sent to the decision controller of the test vehicle.
[0099] See also Figures 2-4 Based on the calculated GPS coordinates of the virtual obstacle and the obtained GPS coordinates and heading angle of the test vehicle at the same moment, the vehicle body coordinates of the virtual obstacle relative to the test vehicle at the current moment are calculated as follows:
[0100] S41: Convert the GPS coordinates of the virtual obstacle trajectory points and the GPS coordinates of the test vehicle at the same time into ECEF coordinates; where ECEF (Earth-Centered, Earth-Fixed) is an abbreviation for the Earth-Centered, Earth-Fixed coordinate system.
[0101] S411: Obtain the GPS coordinates (Blat, Blon) of the virtual obstacle trajectory points and the GPS coordinates (Alat, Alon) of the test vehicle at the same time;
[0102] S412: Calculate the ECEF coordinates (XB, YB, ZB) corresponding to the GPS coordinates of the virtual obstacle trajectory points and the ECEF coordinates (XA, YA, ZA) corresponding to the GPS coordinates of the actual test vehicle at the same time.
[0103] a=6378137, b=6356752.31414, e=0.0818191910428,
[0104]
[0105] XB=N1*cos(Blat*π / 180)*cos(Blon*π / 180),
[0106] YB=N1*cos(Blat*π / 180)*sin(Blon*π / 180),
[0107] ZB=(N1-e*e*N1)*sin(Blat*π / 180);
[0108]
[0109] XA=N2*cos(Alat*π / 180)*cos(Alon*π / 180),
[0110] YA=N2*cos(Alat*π / 180)*sin(Alon*π / 180),
[0111] ZA=(N2-e*e*N2)*sin(Alat*π / 180);
[0112] S42: Convert the ECEF coordinates of the virtual obstacle trajectory points to ENU coordinates; where ENU is the abbreviation for the station-centered rectangular coordinate system.
[0113] S421: Obtain the GPS coordinates (Blat, Blon) and corresponding ECEF coordinates (XB, YB, ZB) of the virtual obstacle trajectory points, and obtain the GPS coordinates (Alat, Alon) and corresponding ECEF coordinates (XA, YA, ZA) of the test vehicle at the same time.
[0114] S422: Calculate the ENU coordinates (ENX, ENY, ENZ) of the virtual obstacle trajectory points.
[0115] ENX=-sin(Alon*π / 180)*(XB-XA)+cos(Alon*π / 180)*(YB-YA),
[0116] ENY=-sin(Alat*π / 180)*cos(Alon*π / 180)*(XB-XA)-sin(Alat*π / 180)*sin(Alon*π / 180)*(YB-YA)+cos(Alat*π / 180)*(ZB-ZA),
[0117] ENZ = 0;
[0118] S43: Convert the ENU coordinates of the virtual obstacle trajectory points to vehicle body coordinates (LocalX, LocalY).
[0119] S431: Obtain the ENU coordinates (ENX, ENY, ENZ) of the virtual obstacle trajectory points and the heading angle yaw of the test vehicle at the same time;
[0120] S432: Calculate the final vehicle body coordinates (LocalX, LocalY) corresponding to the GPS coordinates of the virtual obstacle trajectory points.
[0121] LocalX=ENX*cos(yaw*π / 180)-ENY*sin(yaw*π / 180);
[0122] LocalY=ENY*cos(yaw*π / 180)+ENX*sin(yaw*π / 180).
[0123] S15: Based on the vehicle body coordinates of the received virtual obstacle, the trajectory of the virtual obstacle in the decision controller is simulated. The decision controller makes a decision based on the vehicle body coordinates of the received virtual obstacle and controls the movement of the test vehicle.
[0124] S16: Record and analyze the motion data of the test vehicle in the test scenario.
[0125] In this embodiment, the performance of the decision controller of the test vehicle is evaluated based on the motion data of the test vehicle in the test scenario. Motion data of the test vehicle's autonomous driving during the test and the distance between the test vehicle and virtual obstacles are obtained from the decision controller. After the corresponding test scenario ends, this data will be used to analyze the performance of the decision controller under different test scenarios.
[0126] In this embodiment, the method also includes collecting test scenarios containing a trigger origin and several virtual obstacles to form a test scenario library. In this embodiment, the virtual obstacles are editable; their trajectory points, initial velocities, accelerations, and other parameters are compiled into editable files, which can be imported during testing. These editable files allow for the creation of a test scenario library for real-vehicle-in-the-loop testing, enabling customizable and repeatable test conditions, thus improving testing efficiency and reliability.
[0127] In this embodiment, the perception system of the test vehicle is shut down during the test scenario triggering period. With the perception system off during scenario triggering, the test vehicle only receives input of the virtual obstacle vehicle coordinates within each preset time period. This eliminates errors and influences that the perception system might cause, removes irrelevant variables, and allows for a focused test of the decision controller's performance.
[0128] like Figure 5 As shown, the present invention also provides an autonomous driving vehicle-in-the-loop testing system with custom virtual obstacles, including a test scenario construction module, a test scenario triggering module, a GPS coordinate transformation module, a vehicle coordinate transformation module, a decision controller module, and a recording and analysis module.
[0129] The test scenario construction module is used to create a test scenario that includes a trigger origin and several virtual obstacles. The trigger origin is a point with fixed GPS coordinates. The forward trajectory, initial velocity, and acceleration of the virtual obstacles are set with the trigger origin as the coordinate origin.
[0130] The test scenario triggering module is used to control the test vehicle to trigger the corresponding test scenario when it travels to the trigger origin. The virtual obstacles in the test scenario move forward according to the set forward trajectory point, initial velocity and acceleration.
[0131] The GPS coordinate conversion module is used to obtain the GPS coordinates and heading angle of the test vehicle at preset time intervals, and at the same time obtain the relative coordinates of the virtual obstacle relative to the trigger origin. Then, the GPS coordinates of the virtual obstacle are calculated based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin.
[0132] The vehicle body coordinate transformation module is used to calculate the vehicle body coordinates of the virtual obstacle relative to the test vehicle at the current moment based on the calculated GPS coordinates of the virtual obstacle and the GPS coordinates and heading angle of the test vehicle at the same time. Then, the vehicle body coordinates of the virtual obstacle are sent to the decision controller of the test vehicle.
[0133] The decision controller module is used to simulate the trajectory of the virtual obstacle within the decision controller based on the vehicle body coordinates of the received virtual obstacle. The decision controller makes decisions based on the vehicle body coordinates of the received virtual obstacle and controls the movement of the test vehicle.
[0134] The recording and analysis module is used to record and analyze the motion data of the test vehicle in the test scenario.
[0135] In this embodiment, a decision controller evaluation module is also included. The decision controller evaluation module is used to evaluate the performance of the decision controller of the test vehicle based on the motion data of the test vehicle in the test scenario.
[0136] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, an embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles described in any of the above embodiments.
[0137] Figure 6 The illustration shows a more specific hardware diagram of an electronic device provided in this embodiment. The device may include: a processor 100, a memory 200, an input / output interface 300, a communication interface 400, and a bus 500. The processor 100, memory 200, input / output interface 300, communication interface 400, and bus 500 are interconnected within the device.
[0138] The processor 100 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0139] The memory 200 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 200 can store the operating system and other application programs. When the technical solutions provided in the embodiments of the present invention are implemented by software or firmware, the relevant program code is stored in the memory 200 and is called and executed by the processor 100.
[0140] The input / output interface 300 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0141] The communication interface 400 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (e.g., USB, Ethernet cable) or wireless means (e.g., mobile network, Wi-Fi, Bluetooth).
[0142] Bus 500 includes a pathway for transmitting information between various components of the device (e.g., processor 100, memory 200, input / output interface 300, and communication interface 400).
[0143] It should be noted that although the above-described device only shows the processor 100, memory 200, input / output interface 300, communication interface 400, and bus 500, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0144] Based on the same inventive concept, corresponding to the methods of the above embodiments, an embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles as described in any of the above embodiments.
[0145] The computer-readable storage medium of this embodiment includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information; the information may be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transfer medium that can be used to store information that can be accessed by computer devices.
[0146] The computer program stored in the computer storage medium of the above embodiments is used to enable the computer to execute the autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0147] The present invention discloses a method and system for real-vehicle-in-the-loop testing of autonomous driving systems using custom virtual obstacles. The system uses points on the autonomous driving route during real-vehicle-in-the-loop testing as the test scenario trigger origin. The GPS coordinates of the trigger origin are known. When the test vehicle reaches the trigger origin, the corresponding test scenario is triggered and testing begins. By using the trigger origin as the coordinate system origin, the system defines the forward trajectories of several virtual obstacles. Through two coordinate transformations of the virtual obstacles, the system simulates the trajectory of the virtual obstacles within the decision controller during real-vehicle-in-the-loop testing. The system allows for customization of obstacle trajectories, number, speed, etc., and can flexibly construct various different test scenarios, especially for testing dangerous critical scenarios. Furthermore, this testing method can shield the influence of the perception system during real-vehicle-in-the-loop testing, more accurately testing the performance of the decision controller. It enables customization of test scenarios, repeatable test conditions, and the creation of a test scenario library, thus improving testing efficiency.
[0148] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of protection of this application is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.
[0149] One or more embodiments in this application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of this application. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments in this application should be included within the protection scope of this application.
Claims
1. A method for real-vehicle-in-the-loop testing of autonomous driving systems using custom virtual obstacles, characterized in that, The method includes: A test scenario is established, which includes a trigger origin and several virtual obstacles. The trigger origin is a point with known GPS coordinates determined according to the test route. The forward trajectory, initial velocity, and acceleration of the virtual obstacles are set with the trigger origin as the coordinate origin. When the test vehicle travels to the trigger origin, the corresponding test scenario is triggered. The virtual obstacles in the test scenario move forward according to the set forward trajectory point, initial velocity and acceleration. The GPS coordinates and heading angle of the test vehicle are acquired once every preset time period. At the same time, the relative coordinates of the virtual obstacle relative to the trigger origin are acquired. Then, the GPS coordinates of the virtual obstacle are calculated based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin. Based on the calculated GPS coordinates of the virtual obstacle and the GPS coordinates and heading angle of the test vehicle at the same moment, the vehicle body coordinates of the virtual obstacle relative to the test vehicle at the current moment are calculated. Specifically, this includes: converting the GPS coordinates of the virtual obstacle trajectory points and the GPS coordinates of the test vehicle at the same moment into ECEF coordinates, converting the ECEF coordinates of the virtual obstacle trajectory points into ENU coordinates, and converting the ENU coordinates of the virtual obstacle trajectory points into vehicle body coordinates; then sending the vehicle body coordinates of the virtual obstacle to the decision controller of the test vehicle. The decision controller simulates the trajectory of the virtual obstacle within the decision controller based on the received vehicle coordinates of the virtual obstacle, and makes a decision based on the received vehicle coordinates of the virtual obstacle to control the movement of the test vehicle. Record the motion data of the test vehicle in the test scenario and then analyze it.
2. The autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles as described in claim 1, characterized in that, It also includes evaluating the performance of the decision controller of the test vehicle based on the motion data of the test vehicle in the test scenario.
3. The autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles as described in claim 1 or 2, characterized in that, The step of simultaneously acquiring the relative coordinates of the virtual obstacle with respect to the trigger origin at the same moment, and then calculating the GPS coordinates of the virtual obstacle based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin, includes: Obtain the GPS coordinates of the trigger origin; Obtain the relative coordinates of the virtual obstacle trajectory points at the current moment; Convert the relative coordinates of the virtual obstacle trajectory points to GPS coordinates: S31: Calculate the angle φ between the relative coordinates of the virtual obstacle trajectory points and the line connecting the Earth's center and the equatorial plane. φ = arctan(Z / ); S32: Iteratively calculate the latitude angle φ′; S321: Calculate the value of φ′. φ′= arctan(Z + 6378137 / ) * e * sin(φ) / ), Where X, Y, and Z represent the x-axis coordinates, y-axis coordinates, and z-axis coordinates of the virtual obstacle trajectory point in the coordinate system with the trigger origin as the coordinate origin, respectively, and e represents the square of the first eccentricity, 0.0066943799013. S322: Calculate whether the absolute value of the difference between φ′ and φ is less than 1.0e-10. If it is less, end the iterative calculation; otherwise, replace the value of φ with the value of φ′ and go to step S321 to continue the calculation. S33. Calculate the final GPS coordinates of the virtual obstacle trajectory points: Blat = φ′ * 180 / π Blon= arctan(Y / X)* 180 / π, Wherein, Blat represents the latitude coordinate of the GPS coordinate of the virtual obstacle trajectory point, and Blon represents the longitude coordinate of the GPS coordinate of the virtual obstacle trajectory point.
4. The autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles as described in claim 3, characterized in that, The process of converting the GPS coordinates of the virtual obstacle trajectory points and the GPS coordinates of the test vehicle at the same time into ECEF coordinates includes: S411: Obtain the GPS coordinates of the virtual obstacle trajectory points and the GPS coordinates of the actual test vehicle at the same time; S412: Calculate the ECEF coordinates corresponding to the GPS coordinates of the virtual obstacle trajectory points and the ECEF coordinates corresponding to the GPS coordinates of the actual test vehicle at the same time. a = 6378137, b = 6356752.31414, e = 0.0818191910428, XB = N1*cos(Blat*π / 180)*cos(Blon*π / 180), YB = N1*cos(Blat*π / 180)*sin(Blon*π / 180), ZB = (N1-e*e*N1)*sin(Blat*π / 180); XA = N2*cos(Alat*π / 180)*cos(Alon*π / 180), YA = N2*cos(Alat*π / 180)*sin(Alon*π / 180), ZA = (N2-e*e*N2)*sin(Alat*π / 180), Wherein, Blat represents the latitude coordinate of the GPS coordinate of the virtual obstacle trajectory point, Blon represents the longitude coordinate of the GPS coordinate of the virtual obstacle trajectory point, XB, YB, and ZB represent the x-axis, y-axis, and z-axis coordinates of the ECEF coordinate of the virtual obstacle trajectory point, respectively; Alat represents the latitude coordinate of the GPS coordinate of the test vehicle, Alon represents the longitude coordinate of the GPS coordinate of the test vehicle, and XA, YA, and ZA represent the x-axis, y-axis, and z-axis coordinates of the ECEF coordinate of the test vehicle, respectively. The process of converting the ECEF coordinates of virtual obstacle trajectory points to ENU coordinates includes: S421: Obtain the GPS coordinates and corresponding ECEF coordinates of the virtual obstacle trajectory points, and obtain the GPS coordinates and corresponding ECEF coordinates of the test vehicle at the same time. S422: Calculate the ENU coordinates of the virtual obstacle trajectory points. ENX =-sin(Alon*π / 180)*(XB-XA)+cos(Alon*π / 180)*(YB-YA), ENY=-sin(Alat*π / 180)*cos(Alon*π / 180)*(XB-XA)-sin(Alat*π / 180)*sin(Alon*π / 180)* (YB-YA)+cos(Alat*π / 180)*(ZB-ZA), ENZ = 0, Wherein, ENX, ENY, and ENZ represent the x-axis, y-axis, and z-axis coordinates of the ENU coordinates of the virtual obstacle trajectory point, respectively; The process of converting the ENU coordinates of virtual obstacle trajectory points into vehicle body coordinates includes: S431: Obtain the ENU coordinates of the virtual obstacle trajectory points and the heading angle (yaw) of the test vehicle at the same time; S432: Calculate the final vehicle coordinates corresponding to the GPS coordinates of the virtual obstacle trajectory points. LocalX =ENX*cos(yaw*π / 180)-ENY*sin(yaw*π / 180); LocalY =ENY*cos(yaw*π / 180)+ENX*sin(yaw*π / 180), Wherein, LocalX and LocalY represent the x-axis and y-axis coordinates of the virtual obstacle trajectory point in the vehicle coordinate system with the centroid of the test vehicle as the origin, respectively.
5. The autonomous driving vehicle-in-the-loop testing method with custom virtual obstacles as described in claim 1, characterized in that, The perception system of the test vehicle is turned off during the test scenario triggering.
6. The method for real-vehicle-in-the-loop testing of autonomous driving with custom virtual obstacles as described in claim 1, characterized in that, It also includes collecting test scenarios that contain trigger points and several virtual obstacles to form a test scenario library.
7. An autonomous driving vehicle-in-the-loop testing system with custom virtual obstacles, characterized in that, include: The test scenario construction module is used to establish a test scenario that includes a trigger origin and several virtual obstacles. The trigger origin is a point with fixed GPS coordinates. The forward trajectory point, initial velocity and acceleration of the virtual obstacles are set with the trigger origin as the coordinate origin. The test scenario triggering module is used to control the test vehicle to trigger the corresponding test scenario when it travels to the trigger origin. The virtual obstacles in the test scenario move forward according to the set forward trajectory point, initial velocity and acceleration. The GPS coordinate conversion module is used to acquire the GPS coordinates and heading angle of the test vehicle once every preset time period, and at the same time acquire the relative coordinates of the virtual obstacle relative to the trigger origin. Then, the GPS coordinates of the virtual obstacle are calculated based on the relative coordinates of the virtual obstacle and the GPS coordinates of the trigger origin. The vehicle body coordinate transformation module is used to calculate the vehicle body coordinates of the virtual obstacle relative to the test vehicle at the current moment based on the calculated GPS coordinates of the virtual obstacle and the GPS coordinates of the test vehicle at the same moment. Specifically, it includes: converting the GPS coordinates of the virtual obstacle trajectory points and the GPS coordinates of the test vehicle at the same moment into ECEF coordinates, converting the ECEF coordinates of the virtual obstacle trajectory points into ENU coordinates, and converting the ENU coordinates of the virtual obstacle trajectory points into vehicle body coordinates; and then sending the vehicle body coordinates of the virtual obstacle to the decision controller of the test vehicle. The decision controller module is used to simulate the trajectory of the virtual obstacle within the decision controller based on the received vehicle body coordinates of the virtual obstacle. The decision controller makes a decision based on the received vehicle body coordinates of the virtual obstacle and controls the movement of the test vehicle. The recording and analysis module is used to record and analyze the motion data of the test vehicle in the test scenario.
8. The autonomous driving vehicle-in-the-loop testing system with custom virtual obstacles as described in claim 7, characterized in that, It also includes a decision controller evaluation module, which is used to evaluate the performance of the decision controller of the test vehicle based on the motion data of the test vehicle in the test scenario.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Test method and device, and equipment and medium
CN109557904A
Spatial synchronization method and device for performance test data of vehicle-mounted sensor and storage medium
CN112781893A