A snowy weather simulation method, system and medium for autonomous driving testing
By building an autonomous driving snow-day simulation environment on the CARLA platform, combining the simulation of lidar and cameras, the problem that existing systems cannot effectively simulate the reduced sensor performance in snow-day weather is solved, and high-fidelity autonomous driving system simulation test is realized. Improved the safety and performance evaluation capabilities of autonomous driving systems.
Patent Information
- Application Number
- CN202411162658.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-23
AI Technical Summary
The existing autonomous driving simulation test system cannot effectively simulate the performance reduction of sensors in snowy weather, especially the impact of lidar and cameras, and lacks a system-level high-fidelity simulation test platform, so it is impossible to fully evaluate the autonomous driving system in complex environments. Overall performance.
CARLA is used to build an autonomous snow-driving simulation environment, simulate snowflakes through 360° panoramic scanning lidar and Niagara particle system, accurately calculate the laser reception intensity and camera visual effect, and build a high-fidelity snow-driving simulation test system, combining lidar and camera Comprehensive analysis of the data.
It realizes a more realistic simulation of the autonomous driving environment in snowy days, simulates the working principle of lidar and cameras in snowy weather, and improves the safety and performance evaluation capabilities of the autonomous driving system.
Smart Images

Figure CN118673736B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a snowy weather simulation method, system and medium for autonomous driving testing. Background Art
[0002] In recent years, with the rapid development and commercialization of autonomous driving technology, its safety issues have become particularly prominent. In order to ensure that the autonomous driving system can maintain a high degree of stability and reliability in various complex and unpredictable driving scenarios, comprehensive and in-depth testing is essential.
[0003] Snowy weather can greatly reduce the performance of sensors. LiDAR, cameras and other sensors may be less accurate or even fail due to interference from snow or snow cover, which in turn affects the vehicle's accurate judgment of the surrounding environment. Therefore, snowy weather poses a severe test to the perception and decision-making capabilities of the autonomous driving system.
[0004] Although current autonomous driving simulation tests can evaluate and verify the basic functions and performance of autonomous driving systems to a certain extent, they do not have snow simulation modules and cannot test the safety of autonomous driving systems in snowy weather conditions.
[0005] Although the current snow simulation test simulates the snow noise phenomenon in the point cloud data captured by the LiDAR in a snowy environment, the simulation method is not accurate. For example, the invention patents with publication numbers CN116338651B and CN117910195A calculate the attenuation of the laser beam energy caused by each snowflake particle based on the distance, particle size and reflectivity of the snowflake example, but this method ignores the influence of the reflectivity of the surface of environmental objects (such as the ground, buildings, trees or other vehicles) on the LiDAR echo, which leads to inaccurate simulation results.
[0006] Although the invention patents with publication numbers CN116338651B, CN117910195A and CN116879883A have successfully simulated the phenomenon of snow noise in the point cloud data captured by the lidar in a snowy environment, they have not deeply simulated the possible impact of snow on other visual sensors, such as cameras. Specifically, snowflakes will not only interfere with the lidar signal, resulting in a large number of false positive noise points in the point cloud data, but also significantly reduce the image quality of the camera, including but not limited to occlusion, scattered light, and reduced contrast and clarity. Therefore, in order to fully simulate and test the performance of the autonomous driving system under snowy weather conditions, it is necessary to further study how to accurately simulate the impact of snow on the camera imaging process, and combine the data of the lidar and camera for comprehensive analysis and processing.
[0007] The invention patents with publication numbers CN116338651B, CN117910195A and CN116879883A only simulate the impact of snowy weather on a single sensor, and are not integrated into a high-fidelity autonomous driving simulator, and cannot provide a system-level autonomous driving simulation test platform. It is not enough to only simulate the impact of snowy weather on sensors, because the autonomous driving system relies on a highly integrated sensor suite and complex perception, decision-making, planning, and control modules, and there are close interactions between the sensors and between the modules. Without a system-level simulation test platform, it is impossible to fully evaluate the overall performance of autonomous driving vehicles in complex environments, especially in snowy environments, how vehicles can make obstacle avoidance decisions by integrating multiple information sources, intelligent decision-making, and precise control when sensor performance degrades. Therefore, it is necessary to establish a high-fidelity autonomous driving simulator that can simulate snowy environments.
[0008] The invention patent with publication number CN118313246A uses Unity3D to build an autonomous driving snowy weather simulation environment, which is not very realistic. Summary of the invention
[0009] The main purpose of the present invention is to propose a snowy weather simulation method, system and medium for autonomous driving testing, aiming to simulate a snowy weather autonomous driving environment more realistically.
[0010] To achieve the above object, the present invention provides a snowy weather simulation method for autonomous driving testing, the method comprising the following steps:
[0011] Step S10, using CARLA to build an autonomous driving snowy weather simulation environment;
[0012] Step S20, simulating the snowy laser radar and the snowy camera in the snowy simulation environment;
[0013] Step S30, constructing a snow simulation test system based on the snow simulation environment and the snow laser radar and snow camera;
[0014] Step S40: connecting the autonomous driving system to be tested to the snowy weather simulation test system, and testing the snowy weather simulation test system.
[0015] A further technical solution of the present invention is that in step S20, the step of simulating the snowy laser radar includes:
[0016] Step S201, in the laser emission phase, the laser radar is driven to perform a 360° panoramic scan through the rotating mechanism to ensure that the emitted laser rays fully cover the surrounding environment;
[0017] Step S202, in the laser propagation stage, judging whether the laser beam hits the snowflakes in the simulation environment according to a preset strategy, if hit, recording the hit snowflake data, if not hit, recording the obstacle data, the snowflake data including the three-dimensional coordinates, radius and reflectivity of the snowflake;
[0018] Step S203, in the calculation result stage, the laser receiving intensity is calculated according to the hit snowflake data or obstacle data.
[0019] A further technical solution of the present invention is that step S202 comprises:
[0020] Step S2021, generating snowflake data in the simulation environment;
[0021] Step S2022, based on the horizontal and vertical angles of the laser radar, calculate the emission direction of each laser ray, and identify and screen out snowflakes that will intersect with the laser ray according to the three-dimensional coordinates of the snowflakes and the emission direction of the laser ray.
[0022] A further technical solution of the present invention is that step S2022 includes:
[0023] According to the horizontal angle θ and vertical angle φ of the laser radar, the direction vector of the laser ray is calculated using formula 1:
[0024] Formula 1
[0025] Wherein, dx represents the component of the direction vector in the x-axis direction; dy represents the component of the direction vector in the y-axis direction; dz represents the component of the direction vector in the z-axis direction;
[0026] Define the parametric equation of the laser ray: Assume the emission point of the laser radar as the origin , and the direction of the laser ray is given by the unit vector Given, the parametric equation of the laser ray can be expressed as:
[0027] Formula 2;
[0028] For each snowflake within the detection range of the LiDAR, a spherical equation is constructed using its center coordinates and radius to determine its position and volume in space. The snowflake sphere equation is:
[0029] Formula 3
[0030] Among them, a, b, c are the coordinates of the center of the snowflake sphere in three-dimensional space, and r is the radius of the snowflake;
[0031] Substitute the parametric equation of the laser ray into the equation of the snowflake sphere, solve the simultaneous equations of the laser ray and the sphere equation, and obtain a quadratic equation about the parameter t. By solving the quadratic equation, it is determined whether the laser ray intersects the sphere. The quadratic equation is:
[0032] Formula 4
[0033] Among them, a, b and c are constants calculated based on the parameters of the ray and the sphere. By calculating the discriminant of the quadratic equation , determine whether there is a solution:
[0034] If D < 0, then the equation has no real solutions, which means that the laser ray does not intersect the sphere;
[0035] If D = 0, then the equation has a real solution, which means that the laser ray just grazes the surface of the sphere;
[0036] If D > 0, then the equation has two real solutions, which means that the laser ray passes through the sphere and forms two intersection points.
[0037] A further technical solution of the present invention is that step S203 comprises:
[0038] Step S2031, when the laser ray is reflected from the surface of the object and captured by the lidar receiver, the autonomous driving simulator CARLA calculates the point cloud coordinates and the laser reception intensity.
[0039] A further technical solution of the present invention is that step S2031 includes:
[0040] The arrival time of the reflected laser signal is measured by the lidar receiver;
[0041] The round-trip flight distance of the laser beam is calculated according to the arrival time of the reflected laser signal and the speed of light, and the distance between the target object and the laser radar is inferred;
[0042] The coordinates of the point cloud are calculated based on the distance between the target object and the lidar, as well as the emission direction of the laser ray.
[0043] A further technical solution of the present invention is that after the step of calculating the coordinates of the point cloud according to the distance between the target object and the laser radar and the emission direction of the laser ray, the step further includes:
[0044] If the laser beam hits a snowflake, the point cloud coordinates and laser receiving intensity are calculated based on the snowflake data. The calculation formula for the laser receiving intensity is as follows:
[0045] ,
[0046] Among them, C A P0 is the system parameter of the lidar sensor, ρ s is the surface reflectivity of the snowflake, R s is the distance from the snowflake to the lidar origin, ξ(R) is the overlap, cτ H is a system parameter;
[0047] If the laser beam does not hit the snowflake, the point cloud coordinates and laser receiving intensity are calculated based on the obstacle data. The calculation formula for the laser receiving intensity is as follows:
[0048] ;
[0049] Among them, C A P0 is the system parameter of the lidar sensor, ξ(R) is the overlap, cτ H is the system parameter, ρ o is the surface reflectivity of the target, R o is the distance from the target object to the lidar origin.
[0050] A further technical solution of the present invention is that in step S20, the step of simulating the snow camera includes:
[0051] Use the Niagara particle system to create the visual effect of snowflakes falling in the air: Use the Niagara particle system to generate snowflakes of different sizes and shapes, and then use the physics engine to simulate gravity and air resistance to make the snowflakes fall in a natural way.
[0052] To achieve the above-mentioned objectives, the present invention also proposes a snow weather simulation system for autonomous driving testing, the system comprising a memory, a processor, and a snow weather simulation program for autonomous driving testing stored on the processor, the snow weather simulation program for autonomous driving testing executing the steps of the method described above when run by the processor.
[0053] To achieve the above objectives, the present invention also proposes a computer-readable storage medium, which stores a snowy weather simulation program for autonomous driving testing, and the snowy weather simulation program for autonomous driving testing executes the steps of the method described above when run by a processor.
[0054] The beneficial effects of the snow simulation method, system and medium for autonomous driving testing of the present invention are:
[0055] The present invention uses the above-mentioned technical scheme to build an autonomous driving snowy day simulation environment using CARLA; simulates the snowy day laser radar and snowy day camera in the snowy day simulation environment; constructs a snowy day simulation test system based on the snowy day simulation environment and the snowy day laser radar and snowy day camera; connects the autonomous driving system to be tested to the snowy day simulation test system, and tests the snowy day simulation test system, which can simulate the snowy day autonomous driving environment more realistically, simulate the working principles of the laser radar and camera in snowy weather, and then simulate the impact of snow on the laser propagation process and the camera, thereby improving the safety of autonomous driving. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0057] Figure 1 It is a flow chart of a preferred embodiment of a snowy weather simulation method for autonomous driving testing of the present invention;
[0058] Figure 2 It is a high-fidelity snow lidar simulation flow chart;
[0059] Figure 3 It is a high-fidelity snow camera simulation flow chart;
[0060] Figure 4 It is a system-level snow simulation test flow chart;
[0061] Figure 5 This is the architecture diagram of the snow simulation test system.
[0062] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0063] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] Snowy weather can greatly reduce the performance of sensors. LiDAR, cameras and other sensors may be less accurate or even fail due to interference from snow or snow cover, which in turn affects the vehicle's accurate judgment of the surrounding environment. Therefore, snowy weather poses a severe test to the perception and decision-making capabilities of the autonomous driving system.
[0065] The application scenario of the autonomous driving snowy weather simulation test of the present invention, based on the existing advanced autonomous driving simulator CARLA, innovatively proposes an autonomous driving snowy weather simulation method, which can simulate the working principles of lidar and camera in snowy weather, and finally form a simulation test system. The present invention uses CARLA to build an autonomous driving snowy weather simulation environment, and on this basis, increases the reflectivity of environmental objects. The reflectivity of different objects is different. Compared with the prior art, the present invention can build a more realistic autonomous driving snowy weather simulation environment.
[0066] Please refer to Figure 1 The preferred embodiment of the snowy weather simulation method for autonomous driving testing of the present invention comprises the following steps:
[0067] Step S10, using CARLA to build an autonomous driving snowy weather simulation environment.
[0068] Step S20, simulating the snowy lidar and the snowy camera in the snowy simulation environment.
[0069] Step S30, constructing a snow simulation test system based on the snow simulation environment and the snow lidar and snow camera.
[0070] Step S40: connecting the autonomous driving system to be tested to the snowy weather simulation test system, and testing the snowy weather simulation test system.
[0071] Specifically, in step S20, the step of simulating the snowy laser radar includes:
[0072] Step S201, during the laser emission phase, the laser radar is driven to perform a 360° panoramic scan through a rotating mechanism to ensure that the emitted laser beam fully covers the surrounding environment.
[0073] Step S202, in the laser propagation stage, determine whether the laser beam hits the snowflakes in the simulation environment according to a preset strategy. If it hits, the data of the snowflakes hit is recorded. If it does not hit, the obstacle data is recorded. The snowflake data includes the three-dimensional coordinates, radius and reflectivity of the snowflakes.
[0074] Step S203, in the calculation result stage, the laser receiving intensity is calculated according to the hit snowflake data or obstacle data.
[0075] Wherein, the step S202 specifically includes:
[0076] Step S2021, generating snowflake data in the simulation environment;
[0077] Step S2022, based on the horizontal and vertical angles of the laser radar, calculate the emission direction of each laser ray, and identify and screen out snowflakes that will intersect with the laser ray according to the three-dimensional coordinates of the snowflakes and the emission direction of the laser ray.
[0078] Wherein, the step S2022 specifically includes:
[0079] According to the horizontal angle θ and vertical angle φ of the laser radar, the direction vector of the laser ray is calculated using formula 1:
[0080] Formula 1
[0081] Wherein, dx represents the component of the direction vector in the x-axis direction; dy represents the component of the direction vector in the y-axis direction; dz represents the component of the direction vector in the z-axis direction;
[0082] Define the parametric equation of the laser ray: Assume the emission point of the laser radar as the origin , and the direction of the laser ray is given by the unit vector Given, the parametric equation of the laser ray can be expressed as:
[0083] Formula 2;
[0084] For each snowflake within the detection range of the LiDAR, a spherical equation is constructed using its center coordinates and radius to determine its position and volume in space. The snowflake sphere equation is:
[0085] Formula 3
[0086] Among them, a, b, c are the coordinates of the center of the snowflake sphere in three-dimensional space, and r is the radius of the snowflake;
[0087] Substitute the parametric equation of the laser ray into the equation of the snowflake sphere, solve the simultaneous equations of the laser ray and the sphere equation, and obtain a quadratic equation about the parameter t. By solving the quadratic equation, it is determined whether the laser ray intersects the sphere. The quadratic equation is:
[0088] Formula 4
[0089] Among them, a, b and c are constants calculated based on the parameters of the ray and the sphere. By calculating the discriminant of the quadratic equation , determine whether there is a solution:
[0090] If D < 0, then the equation has no real solutions, which means that the laser ray does not intersect the sphere;
[0091] If D = 0, then the equation has a real solution, which means that the laser ray just grazes the surface of the sphere;
[0092] If D > 0, then the equation has two real solutions, which means that the laser ray passes through the sphere and forms two intersection points.
[0093] In this embodiment, step S203 specifically includes:
[0094] Step S2031, when the laser ray is reflected from the surface of the object and captured by the lidar receiver, the autonomous driving simulator CARLA calculates the point cloud coordinates and the laser reception intensity.
[0095] Specifically, the step S2031 includes:
[0096] The arrival time of the reflected laser signal is measured by the lidar receiver;
[0097] The round-trip flight distance of the laser beam is calculated according to the arrival time of the reflected laser signal and the speed of light, and the distance between the target object and the laser radar is inferred;
[0098] The coordinates of the point cloud are calculated based on the distance between the target object and the lidar, as well as the emission direction of the laser ray.
[0099] After the step of calculating the coordinates of the point cloud according to the distance between the target object and the laser radar and the emission direction of the laser ray, the following steps are further included:
[0100] If the laser beam hits a snowflake, the point cloud coordinates and laser receiving intensity are calculated based on the snowflake data. The calculation formula for the laser receiving intensity is as follows:
[0101] ,
[0102] Among them, C A P0 is the system parameter of the lidar sensor, ρ s is the surface reflectivity of the snowflake, R s is the distance from the snowflake to the lidar origin, ξ(R) is the overlap, cτ H is a system parameter;
[0103] If the laser beam does not hit the snowflake, the point cloud coordinates and laser receiving intensity are calculated based on the obstacle data. The calculation formula for the laser receiving intensity is as follows:
[0104] ;
[0105] Among them, C A P0 is the system parameter of the lidar sensor, ξ(R) is the overlap, cτ H is the system parameter, ρ o is the surface reflectivity of the target, R o is the distance from the target object to the lidar origin.
[0106] In this embodiment, in step S20, the step of simulating the snow camera includes:
[0107] Use the Niagara particle system to create the visual effect of snowflakes falling in the air: Use the Niagara particle system to generate snowflakes of different sizes and shapes, and then use the physics engine to simulate gravity and air resistance to make the snowflakes fall in a natural way.
[0108] The following combination Figures 1 to 5 The snowy weather simulation method for autonomous driving testing of the present invention is further elaborated in detail.
[0109] 1. High-fidelity snow lidar simulation:
[0110] LiDAR simulation is divided into three stages: laser emission, laser propagation, and calculation results. In the laser emission stage, the LiDAR transmitter emits multiple laser beams at each moment and records the emission time, emission position, and emission direction of each laser beam. In the laser propagation stage, the laser beam propagates along a straight path in the simulation environment. After the laser beam hits an obstacle, a reflection effect occurs, and part of the laser returns along the original path and is eventually received by the LiDAR receiver. In the calculation result stage, combined with the position and direction of the laser emission, the LiDAR calculates the distance to the obstacle and the receiving intensity of the laser according to the flight time of the laser beam.
[0111] The present invention simulates the working principle of LiDAR in snowy weather with high fidelity and simulates the influence of snow on the laser propagation process. Specifically, the present invention accurately simulates the influence of snow on LiDAR signals. Snow has two main effects on laser rays: 1) the original point cloud position will be deviated, and 2) the receiving intensity of laser rays will be significantly reduced.
[0112] The high-fidelity snow lidar simulation process is as follows Figure 2 shown.
[0113] Laser emission stage:
[0114] During the laser emission stage, the LiDAR usually achieves 360-degree panoramic scanning through a rotating mechanism to ensure full coverage of the surrounding environment. The emission direction of each laser beam of the LiDAR is strictly restricted by its horizontal and vertical angular resolution. The horizontal angular resolution defines the angular interval between two adjacent laser beams of the LiDAR on the horizontal plane, while the vertical angular resolution determines the angular difference between the laser beams in the vertical direction. When the LiDAR rotates to a specific horizontal angle, it will emit multiple laser beams at the same time, aiming to cover the entire vertical field of view, forming a fan-shaped scanning area. The fineness of the vertical angular resolution directly affects the scanning density and data resolution of the LiDAR in the vertical direction, which in turn affects the quality and detail richness of the three-dimensional point cloud data.
[0115] Laser propagation stage:
[0116] The laser propagation phase refers to the process in which the laser beam travels through space from the laser radar transmitter until it contacts an object. In this phase, the laser beam follows the law of rectilinear propagation of light and passes through the air or other media until it encounters an obstacle. During this period, the laser beam may be affected by falling snowflakes in the air.
[0117] In the laser propagation stage, snowflake data is first generated, and these snowflakes are evenly distributed in the simulation environment. Each snowflake not only has precise three-dimensional coordinates to locate its position in space, but also has different radii and specific reflectivities to simulate the reflection characteristics of different materials to lasers. The distribution of snowflakes in space follows objective laws. Secondly, the emission direction of the laser ray is calculated. Based on the horizontal and vertical angles of the laser radar, the emission direction of each laser ray is accurately calculated. Then, based on the three-dimensional coordinates of the snowflake and the emission direction of the laser ray, those snowflakes that will intersect with the laser ray are accurately identified and screened out from the massive snowflake data. Specifically:
[0118] (1) Based on the horizontal angle of the laser radar (the angle of the laser ray on the horizontal plane relative to the true north direction, usually represented by the symbol θ) and the vertical angle (the angle between the laser ray and the horizontal plane, usually represented by the symbol φ), calculate the direction vector of the laser ray:
[0119] (Formula 1)
[0120] The dx parameter represents the component of the direction vector in the x-axis direction; the dy parameter represents the component of the direction vector in the y-axis direction; and the dz parameter represents the component of the direction vector in the z-axis direction.
[0121] (2) Define the parametric equation of the ray, which can accurately describe the direction of the ray in three-dimensional space. The laser ray can be regarded as a straight line extending infinitely in a certain direction from a point. If we assume that the emission point of the laser radar is the origin , and the direction of the laser ray is given by the unit vector Given, the parametric equation of the laser ray can be expressed as:
[0122] (Formula 2)
[0123] (3) For each snowflake within the detection range of the laser radar, the sphere equation is constructed using its center coordinates and radius to determine its position and volume in space. The snowflake sphere equation is:
[0124] (Formula 3)
[0125] Among them, a, b, c are the coordinates of the center of the snowflake sphere in three-dimensional space, and r is the radius of the snowflake.
[0126] (4) Substituting the parametric equation of the laser ray into the equation of the snowflake sphere and solving the system of simultaneous equations of the ray and sphere, we can obtain a quadratic equation about the parameter t. By solving this quadratic equation, we can determine whether the ray and the sphere intersect. The general form of the quadratic equation is:
[0127] (Formula 4)
[0128] In this equation, a, b, and c are constants calculated based on the parameters of the ray and the sphere. By calculating the discriminant of this quadratic equation , we can determine whether there is a solution:
[0129] If D < 0, then the equation has no real solutions, which means that the ray does not intersect the sphere;
[0130] If D = 0, then the equation has a real solution, which means that the ray just grazes the surface of the sphere (the tangent case);
[0131] If D > 0, then the equation has two real solutions, which means that the ray passes through the sphere and forms two intersection points.
[0132] The first case indicates that the laser beam does not hit the snowflake, and the latter two cases indicate that the laser beam hits the snowflake. If the laser beam hits the snowflake, the data of the snowflake is recorded, otherwise the data of hitting the target obstacle is recorded.
[0133] Calculation result stage:
[0134] When the laser beam is reflected from the surface of an object and captured by the LiDAR receiver, the autonomous driving simulator CARLA calculates the point cloud coordinates and the laser reception intensity. First, the LiDAR receiver measures the arrival time of the reflected laser signal, that is, the total time from the laser emission to the reception of the reflected signal. With the known speed of light, the round-trip flight distance of the laser beam can be calculated, thereby inferring the distance between the target object and the LiDAR. Based on the distance and emission direction, the coordinates of the point cloud can be calculated. In addition, the receiver also records the intensity of the reflected signal.
[0135] According to the results of the laser propagation stage, if the laser beam hits the snowflake, the point cloud coordinates and laser receiving intensity are calculated based on the snowflake data. The laser receiving intensity is as follows:
[0136] ;
[0137] Among them, C A P0 is the system parameter of the lidar sensor, ρ s is the surface reflectivity of the snowflake, R s is the distance from the snowflake to the lidar origin, ξ(R) is the overlap, cτ H is a system parameter.
[0138] If the laser beam does not hit the snowflake, the point cloud coordinates and laser reception intensity are calculated based on the obstacle data.
[0139]
[0140] Among them, C A P0 is the system parameter of the lidar sensor, ξ(R) is the overlap, cτ H is the system parameter, ρ o is the surface reflectivity of the target, R o is the distance from the target object to the lidar origin.
[0141] 2. High-fidelity snow camera simulation:
[0142] The present invention uses the Niagara particle system to create the visual effect of snowflakes falling in the air. The Niagara particle system is used to generate snowflakes of different sizes and shapes, and then the gravity and air resistance are simulated by the physical engine to make the snowflakes fall in a natural way.
[0143] The high-fidelity snow camera simulation process is as follows Figure 3 shown.
[0144] (1) Preset environment and snowfall rate configuration: Set the snowfall rate, which determines the number of snowflakes per unit time and can be adjusted according to weather conditions (such as light snow, moderate snow, and heavy snow).
[0145] (2) Snowflake shape and size design: Use the Niagara Particle System Editor to create multiple particle materials, each representing a snowflake shape. Adjust the texture and color of the particle material to reflect the appearance of natural snowflakes. Set the distribution range of particle size to ensure that the snowflake size is random and increase the realism of the simulation.
[0146] (3) Snowflake particle emitter settings: Create a Niagara particle emitter and define the initial speed, direction, and position of the particles. Configure the life cycle of the particle emitter to determine the survival time of the snowflakes. Adjust the triggering method of the particle emitter, and you can choose to emit continuously or according to specific events.
[0147] (4) Particle emitter binding and spatial positioning: Bind the snowflake particle emitter to a suitable location in the scene, such as above the self-driving car in the simulator. It may be necessary to bind multiple emitters and dynamically adjust the position and direction of each emitter to achieve the desired effect.
[0148] (5) Simulate the physical falling behavior of snowflakes: Add physical influencers, such as gravity and air resistance, to ensure that snowflakes fall in a natural way.
[0149] Through the above steps, a high-fidelity camera snow simulation visual effect can be constructed, providing an autonomous driving simulator with a snow camera simulation environment that is close to the real world.
[0150] 3. System-level snow simulation test:
[0151] In order to test the safety and robustness of the autonomous driving system, the autonomous driving system to be tested must first be connected to a simulation test system that can simulate snowfall with high fidelity. The simulation test system implements a snowy lidar model and a snowy camera model. Secondly, test cases must be designed. Then the test is executed, and the simulation test platform runs the preset scenario to record the response and behavior of the autonomous driving system. Finally, the behavior of the autonomous driving system is analyzed to evaluate its safety.
[0152] Snow simulation test system Figure 4 shown.
[0153] (1) The autonomous driving system under test is connected to the snowy weather simulation test system: This is the starting point of the test, which involves connecting the autonomous driving system to be tested to a simulation platform that can simulate the snowy weather environment. This step ensures the compatibility of the test environment with the actual system and is the basis for subsequent tests. The architecture diagram of the snowy weather simulation test system is shown in the figure. Figure 5 shown.
[0154] The snow simulator includes the autonomous driving car under test, traffic infrastructure, traffic participants, traffic roads, and weather conditions (including sunny and snowy days). The snow simulator collects sensor data at every moment and sends it to the autonomous driving system under test through a bridge. The autonomous driving system under test inputs the sensor data to the perception module. After calculations by the perception, planning, and control modules, the control instructions for the next moment are obtained and sent to the snow simulator through a bridge, and the cycle repeats.
[0155] (2) Design test cases: At this stage, we need to create a series of complex and varied snowy scenarios, including different snowfall conditions, snowfall rates, and behaviors of traffic participants. We designed a series of snowy test cases to simulate the sudden braking, acceleration, and lane changing behaviors of the leading, trailing, and parallel vehicles under different snowfall rates, aiming to comprehensively evaluate the response capabilities and adaptability of the autonomous driving system.
[0156] (3) Test execution: In this phase, simulations are run according to the designed test cases to record the system’s performance in a virtual snowy environment. This step may need to be repeated to ensure that all pre-set test scenarios are covered and sufficient data is collected for subsequent analysis.
[0157] (4) Result analysis: Finally, the test results are analyzed for safety to identify whether the autonomous driving system has caused a traffic accident under snowy conditions. Based on the analysis results, the safety of the system is evaluated and it is determined whether system tuning or correction is needed to improve its performance in bad weather.
[0158] In summary, the beneficial effects of the snowy weather simulation method for autonomous driving testing of the present invention are:
[0159] The present invention uses the above-mentioned technical scheme to build an autonomous driving snowy day simulation environment using CARLA; simulates the snowy day laser radar and snowy day camera in the snowy day simulation environment; constructs a snowy day simulation test system based on the snowy day simulation environment and the snowy day laser radar and snowy day camera; connects the autonomous driving system to be tested to the snowy day simulation test system, and tests the snowy day simulation test system, which can simulate the snowy day autonomous driving environment more realistically, simulate the working principles of the laser radar and camera in snowy weather, and then simulate the impact of snow on the laser propagation process and the camera, thereby improving the safety of autonomous driving.
[0160] To achieve the above-mentioned objectives, the present invention also proposes a snow weather simulation system for autonomous driving testing, the system comprising a memory, a processor, and a snow weather simulation program for autonomous driving testing stored on the processor, the snow weather simulation program for autonomous driving testing being executed by the processor to execute the steps of the method described in the above embodiment, which will not be repeated here.
[0161] To achieve the above-mentioned objectives, the present invention also proposes a computer-readable storage medium, which stores a snow weather simulation program for autonomous driving testing. When the snow weather simulation program for autonomous driving testing is run by a processor, the steps of the method described above are executed, which will not be repeated here.
[0162] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A snowy weather simulation method for autonomous driving testing, characterized in that: The method comprises the following steps: Step S10, using CARLA to build an autonomous driving snowy weather simulation environment; Step S20, simulating the snowy laser radar and the snowy camera in the snowy simulation environment; Step S30, constructing a snow simulation test system based on the snow simulation environment and the snow laser radar and snow camera; Step S40, connecting the tested automatic driving system to the snowy weather simulation test system, and testing the snowy weather simulation test system; In step S20, the steps of simulating the snowy laser radar include: Step S201, in the laser emission phase, the laser radar is driven to perform a 360° panoramic scan through the rotating mechanism to ensure that the emitted laser rays fully cover the surrounding environment; Step S202, in the laser propagation stage, judging whether the laser beam hits the snowflakes in the simulation environment according to a preset strategy, if hit, recording the hit snowflake data, if not hit, recording the obstacle data, the snowflake data including the three-dimensional coordinates, radius and reflectivity of the snowflake; Step S203, in the calculation result stage, the laser receiving intensity is calculated according to the hit snowflake data or obstacle data; The step S203 includes: Step S2031, when the laser ray is reflected from the surface of the object and captured by the laser radar receiver, the autonomous driving simulator CARLA calculates the point cloud coordinates and the laser receiving intensity; The step S2031 includes: The arrival time of the reflected laser signal is measured by the lidar receiver; The round-trip flight distance of the laser beam is calculated according to the arrival time of the reflected laser signal and the speed of light, and the distance between the target object and the laser radar is inferred; The coordinates of the point cloud are calculated based on the distance between the target object and the laser radar, as well as the emission direction of the laser ray; After the step of calculating the coordinates of the point cloud according to the distance between the target object and the laser radar and the emission direction of the laser ray, the following steps are further included: If the laser beam hits a snowflake, the point cloud coordinates and laser receiving intensity are calculated based on the snowflake data. The calculation formula for the laser receiving intensity is as follows: Among them, C A P0 is the system parameter of the lidar sensor, ρ s is the surface reflectivity of the snowflake, R s is the distance from the snowflake to the lidar origin, ξ(R s ) is the distance R s When the laser overlap, cτ H is a system parameter; If the laser beam does not hit the snowflake, the point cloud coordinates and laser receiving intensity are calculated based on the obstacle data. The calculation formula of the laser receiving intensity is as follows: Among them, C A P0 is the system parameter of the lidar sensor, ξ(R o ) is the distance R o When the laser overlap, cτ H is the system parameter, ρ o is the surface reflectivity of the target, R o is the distance from the target object to the lidar origin.
2. The snowy weather simulation method for autonomous driving testing according to claim 1, characterized in that: The step S202 includes: Step S2021, generating snowflake data in the simulation environment; Step S2022, based on the horizontal and vertical angles of the laser radar, calculate the emission direction of each laser ray, and identify and screen out snowflakes that will intersect with the laser ray according to the three-dimensional coordinates of the snowflakes and the emission direction of the laser ray.
3. The snowy weather simulation method for autonomous driving testing according to claim 2, characterized in that: The step S2022 includes: According to the horizontal angle θ and vertical angle φ of the laser radar, the direction vector of the laser ray is calculated using formula 1: Wherein, dx represents the component of the direction vector in the x-axis direction; dy represents the component of the direction vector in the y-axis direction; dz represents the component of the direction vector in the z-axis direction; Define the parametric equation of the laser ray: Assume the emission point of the laser radar as the origin O(x0, y0, z0), and the direction of the laser ray is given by the unit vector Given, then the parametric equation of the laser ray is expressed as: x=x0+t·d x y=y0+t·d y z=z0+t·d z Formula 2; For each snowflake within the detection range of the LiDAR, a spherical equation is constructed using its center coordinates and radius to determine its position and volume in space. The snowflake sphere equation is: (x - x s ) 2 +(y - y s ) 2 +(z - z s ) 2 = r 2 Formula 3 Among them, x s ,y s ,z s is the coordinate of the center of the snowflake sphere in three-dimensional space, and r is the radius of the snowflake; Substitute the parametric equation of the laser ray into the equation of the snowflake sphere, solve the simultaneous equations of the laser ray and the sphere equation, and obtain a quadratic equation about the parameter t. By solving the quadratic equation, it is determined whether the laser ray intersects the sphere. The quadratic equation is: at 2 +bt+c=0 Formula 4 Among them, a, b and c are constants calculated based on the parameters of the ray and the sphere. By calculating the discriminant of the quadratic equation D = b 2 -4ac, determine whether there is a solution: If D < 0, then the equation has no real solutions, which means that the laser ray does not intersect the sphere; If D = 0, then the equation has a real solution, which means that the laser ray just grazes the surface of the sphere; If D > 0, then the equation has two real solutions, which means that the laser ray passes through the sphere and forms two intersection points.
4. The snowy weather simulation method for autonomous driving testing according to claim 1, characterized in that: In step S20, the step of simulating the snow camera includes: Use the Niagara particle system to create the visual effect of snowflakes falling in the air: Use the Niagara particle system to generate snowflakes of different sizes and shapes, and then use the physics engine to simulate gravity and air resistance to make the snowflakes fall in a natural way.
5. A snowy weather simulation system for autonomous driving testing, characterized in that: The system includes a memory, a processor, and a snowy weather simulation program for autonomous driving testing stored on the processor. When the snowy weather simulation program for autonomous driving testing is executed by the processor, the steps of the method described in any one of claims 1 to 4 are executed.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a snowy weather simulation program for autonomous driving testing, and the snowy weather simulation program for autonomous driving testing executes the steps of the method described in any one of claims 1 to 4 when executed by a processor.
Citation Information
Patent Citations
A method and related apparatus for simulating snow noise in point clouds of lidar in snowy weather.
CN116338651B
Laser radar noisy point data acquisition and processing method and device, medium and vehicle
CN116879883A
Physics-based rain and snow effect modeling in virtual laser radar
CN117910195A
Snowy day simulation test site for automatic driving test and construction method of snowy day simulation test site
CN118313246A
Increased Dynamic Range for Time-of-Flight (ToF) Lidar Systems
CN113917486A
