Risk assessment methods, devices, and electronic equipment for obstacle areas
By acquiring the feature data of the target vehicle, determining the obstacle description area, and calculating the risk value based on the intersection of the area line segment and the obstacle set, the problem of the inability to accurately describe the state and risk of obstacles and lane boundaries in the existing technology is solved, thus improving the obstacle avoidance capability of autonomous vehicles.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA INTELLIGENT & CONNECTED VEHICLES (BEIJING) RES INST CO LTD
- Filing Date
- 2022-12-19
- Publication Date
- 2026-05-26
Smart Images

Figure CN116070903B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving technology, and in particular to a method, apparatus, and electronic device for determining the risk of passing through an obstacle zone. Background Technology
[0002] In autonomous driving technology, autonomous vehicles, based on an autonomous driving simulation environment, utilize deep reinforcement learning for trial-and-error training based on input external obstacles, map boundary states, and a reward function, fully leveraging the vehicle's advantages in passage. Using existing obstacle perception and recognition technologies, inputting the identified obstacle data into a reinforcement learning neural network can significantly improve the convergence efficiency of the network training. However, the input to the reinforcement learning neural network requires both uniformity of external data dimensions and the ability to reflect the variable states of the number and shape of external obstacles. Therefore, refining the obstacle representation method under lane map boundary constraints is of great significance for deep reinforcement learning obstacle avoidance training.
[0003] Existing obstacle description methods generally employ grid mapping, which involves rasterizing the map. When a corresponding obstacle exists within a grid cell, the current grid cell is considered occupied; otherwise, it is considered unoccupied. Larger grid sizes result in higher accuracy in describing the external environment, but require more computational resources. Conversely, smaller grid sizes lead to lower accuracy, only providing a rough description of the external environment. While grid mapping can uniformly describe obstacle states within a certain range, its accuracy is pre-set and cannot be adaptively adjusted based on actual conditions. Furthermore, grid mapping requires prior knowledge of the map and obstacle states. In reality, obstacle information obtained by vehicles is acquired through sensors, which can lead to incomplete obstacle descriptions due to occlusion, thus hindering timely grid map updates. Another approach is the fixed-number method, which pre-sets a large number of obstacles. As long as the actual number of obstacles is within the maximum range, its state can be described. However, this method can only represent obstacle states within a certain range and cannot effectively describe the constantly changing external environment dynamically. In addition, neither of the above two methods can accurately describe the number and shape of external obstacles based on the vehicle's speed, nor can they reflect the risk of the vehicle passing through an obstacle area.
[0004] Therefore, existing technologies have the problem of being unable to accurately describe the state of external obstacles and lane boundaries that are not fixed in number and shape, and being unable to determine the risks of passing through obstacle areas. Summary of the Invention
[0005] This application provides a method, apparatus, and electronic device for determining the risk of passing through an obstacle area, in order to at least solve the problems in the related art where the state of external obstacles and lane boundaries with varying numbers and shapes cannot be accurately described, and the risk of passing through an obstacle area cannot be determined.
[0006] According to one aspect of the embodiments of this application, a method for determining the risk of traversing an obstacle region is provided, the method comprising:
[0007] Obtain the characteristic data of the target vehicle;
[0008] Based on the feature data, the obstacle description region of the target vehicle is determined;
[0009] Obtain the region line segments of the obstacle description area;
[0010] Based on the intersection of the region line segment and the obstacle set, the state vector of the obstacle description region is obtained, wherein the state vector is used to describe the state of the obstacle set;
[0011] Based on the state vector, bias vector, and weight vector, a risk value for passing through the obstacle region is obtained, wherein the bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle.
[0012] According to another aspect of the embodiments of this application, a risk determination device for passing through an obstacle area is also provided, the device comprising:
[0013] The first acquisition module is used to acquire feature data of the target vehicle;
[0014] The determination module is used to determine the obstacle description region of the target vehicle based on the feature data;
[0015] The second acquisition module is used to acquire the region line segments of the obstacle description area;
[0016] The first obtaining module is used to obtain a state vector of the obstacle description region based on the intersection of the region line segment and the obstacle set, wherein the state vector is used to describe the state of the obstacle set;
[0017] The second obtaining module is used to obtain a risk value for passing through the obstacle region based on the state vector, bias vector, and weight vector, wherein the bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle.
[0018] Optionally, the first acquisition module includes:
[0019] The first acquisition unit is used to acquire the maximum sideslip angle of the front wheels of the target vehicle, the width of the vehicle frame, and the vehicle speed.
[0020] As a unit, it is used to use the maximum side slip angle of the front wheel, the width of the vehicle frame, and the vehicle speed as the feature data.
[0021] Optionally, the obstacle description region includes a fan-shaped obstacle description region and a rectangular obstacle description region, and the determination module includes:
[0022] The first obtaining unit is used to obtain the sector radius and the rectangle length based on the vehicle speed;
[0023] The second obtaining unit is used to take the center of the target vehicle as the center of a circle and obtain the fan-shaped obstacle description area based on the maximum side slip angle of the front wheel and the fan-shaped radius.
[0024] The third obtaining unit is used to obtain a rectangular obstacle description area based on the length of the rectangle and the width of the vehicle border.
[0025] Optionally, the region segment includes a fan-shaped region segment and a rectangular region segment, and the second acquisition module includes:
[0026] The second acquisition unit is used to acquire the number of sector segments and the number of rectangular segments;
[0027] The first determining unit is used to determine the sector angle interval and the rectangle distance interval based on the number of sector segments and the number of rectangle segments;
[0028] The second determining unit is used to determine a first preset number of sector area line segments of the sector obstacle description area according to the sector angle interval;
[0029] The third determining unit is used to determine a second preset number of rectangular region line segments of the rectangular obstacle description area based on the rectangular distance interval.
[0030] Optionally, the state vector includes a sector-shaped state vector and a rectangular state vector, and the first obtaining module includes:
[0031] The first calculation unit is used to calculate the first distance from the intersection point of the sector line segment and the obstacle set to the center of the circle when the sector line segment intersects with the obstacle set.
[0032] The fourth obtaining unit is used to obtain the initial sector state vector of the sector obstacle description region based on the first distance;
[0033] The second calculation unit is used to calculate the second distance from the intersection point of the rectangular area line segment and the obstacle set to the forward reference line of the target vehicle when the rectangular area line segment intersects with the obstacle set.
[0034] The fifth obtaining unit is used to obtain the initial rectangular state vector of the rectangular obstacle description region based on the second distance;
[0035] The sixth obtaining unit is used to normalize the initial sector state vector according to a preset method to obtain a sector state vector, and to normalize the initial rectangular state vector according to the preset method to obtain a rectangular state vector.
[0036] Optionally, the risk values include sector-shaped risk values and rectangular risk values, the bias vectors include sector-shaped bias vectors and rectangular bias vectors, the weight vectors include sector-shaped weight vectors and rectangular weight vectors, and the second obtaining module includes:
[0037] The seventh obtaining unit is used to subtract the sector bias vector from the sector state vector to obtain the adjusted sector state vector;
[0038] The eighth obtaining unit is used to obtain the sector risk value corresponding to the sector obstacle description area based on the adjusted sector state vector, sector weight vector and the first preset formula.
[0039] The ninth unit is used to subtract the rectangular offset vector from the rectangular state vector to obtain the adjusted rectangular state vector;
[0040] The tenth obtaining unit is used to obtain the rectangular risk value corresponding to the rectangular obstacle description area based on the adjusted rectangular state vector, the rectangular weight vector and the second preset formula.
[0041] Optionally, the sixth unit includes:
[0042] The first submodule is used to divide the first distance in the initial sector state vector by the sector radius to obtain the sector state vector;
[0043] The second submodule is used to divide the second distance in the initial rectangular state vector by the length of the rectangle to obtain the rectangular state vector.
[0044] According to another aspect of the embodiments of this application, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps of any of the above embodiments by running the computer program stored in the memory.
[0045] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to execute the method steps of any of the above embodiments when running.
[0046] In this embodiment, feature data of the target vehicle is acquired; based on the feature data, the obstacle description region of the target vehicle is determined; the region line segments of the obstacle description region are acquired; based on the intersection points of the region line segments and the obstacle set, a state vector of the obstacle description region is obtained, wherein the state vector is used to describe the state of the obstacle set; based on the state vector, bias vector, and weight vector, a risk value for passing through the obstacle region is obtained, wherein the bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle. Through this method, on the one hand, the obstacle description region is determined based on the feature data of the target vehicle, and the state vector is obtained based on the intersection points of the region line segments and the obstacles, thus accurately describing the state of external obstacles and lane boundaries. On the other hand, by dividing different obstacle description regions, based on the weight vectors and bias vectors of different regions, and combined with the state vector, the risk of the target vehicle passing through the obstacle region is calculated, dynamically describing the number and shape of external obstacles. This solves the problems in related technologies where the state of external obstacles and lane boundaries with variable numbers and shapes cannot be accurately described, and the risk of passing through obstacle regions cannot be determined. Attached Figure Description
[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0048] To more clearly illustrate the technical solutions in the 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, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is a flowchart illustrating an optional risk determination method for traversing an obstacle area according to an embodiment of this application;
[0050] Figure 2 This is a schematic diagram of an optional obstacle description area according to an embodiment of this application;
[0051] Figure 3 This is a structural block diagram of an optional risk determination device for traversing an obstacle area according to an embodiment of this application;
[0052] Figure 4 This is a structural block diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation
[0053] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0054] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0055] Traditional obstacle avoidance methods typically define an inflated region of the obstacle to plan a safer obstacle avoidance trajectory before generating the trajectory. Reinforcement learning methods can improve the traffic efficiency of autonomous vehicles and truly unleash their obstacle avoidance potential. However, due to challenges such as narrow passable areas, variable obstacle shapes and numbers, high obstacle avoidance response requirements, and the need for reinforcement learning methods to maintain a fixed dimension for describing the external obstacle's state variables, it is difficult to accurately describe the vehicle's external environment and determine the risks of the vehicle traversing obstacle areas.
[0056] Based on the above, according to one aspect of the embodiments of this application, a method for determining the risk of passing through an obstacle area is provided, such as... Figure 1 As shown, the process of this method may include the following steps:
[0057] Step S101: Obtain the feature data of the target vehicle.
[0058] Optionally, characteristic data of the target vehicle can be obtained. The characteristic data can represent the current structural condition and performance condition of the target vehicle, or reflect the driving status of the target vehicle.
[0059] Step S102: Determine the obstacle description area of the target vehicle based on the feature data.
[0060] Optionally, the obstacle description area is used to describe obstacles and road boundaries in front of or near the target vehicle. The shape of the obstacle description area can be set according to requirements, such as rectangle, circle, or fan shape. The shape, location, and size of the obstacle description area are determined based on the characteristic data of the target vehicle.
[0061] Step S103: Obtain the region line segments of the obstacle description area.
[0062] Optionally, obstacle description areas are divided using region segments, where the region segments can be used to describe obstacles. The number and distribution of region segments are determined based on the number of obstacle description areas divided, and the length of the region segments is determined based on the size of the obstacle description areas.
[0063] Step S104: Based on the intersection of the region line segment and the obstacle set, obtain the state vector of the obstacle description region, where the state vector is used to describe the state of the obstacle set.
[0064] Optionally, multiple obstacles and lane boundaries can be combined into an obstacle set. When a region line segment encounters and intersects with obstacles and lane boundary lines, the data of intersections between region line segments and obstacles at different intervals are stored in a list as a state vector to characterize the state of the obstacle set within the obstacle description area. Based on the state vector, the sequence number of each region line segment, whether the region line segment intersects with the obstacle set, and the position of the intersection point within the obstacle description area can be determined.
[0065] In order to reflect the obstacle state at different vehicle speeds and to calculate the reward function in the relevant state more accurately, the state vector can be normalized.
[0066] Step S105: Based on the state vector, bias vector, and weight vector, obtain the risk value of passing through the obstacle area. The bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle.
[0067] Optionally, a weight vector is set based on the distance of the intersection point of the region line segment and the obstacle and boundary from the central axis. The weight vector reflects the importance of the obstacle and boundary at different locations to the target vehicle. To make the reinforcement learning neural network more likely to converge, a bias vector is introduced based on the symmetry of the obstacle description region, so that the values in the state vector are evenly distributed around the target value.
[0068] Add the state vector and bias vector together, and then multiply them by the weight vector to obtain the cost, i.e., the risk value, of the target vehicle passing through the obstacle area in its current posture.
[0069] In this embodiment, feature data of the target vehicle is acquired; based on the feature data, the obstacle description region of the target vehicle is determined; the region line segments of the obstacle description region are acquired; based on the intersection points of the region line segments and the obstacle set, the state vector of the obstacle description region is obtained, where the state vector is used to describe the state of the obstacle set; based on the state vector, bias vector, and weight vector, the risk value of passing through the obstacle region is obtained, where the bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle. Through this method, on the one hand, the obstacle description region is determined based on the feature data of the target vehicle, and the state vector is obtained based on the intersection points of the region line segments and the obstacles, accurately describing the state of external obstacles and lane boundaries. On the other hand, by dividing different obstacle description regions, based on the weight vectors and bias vectors of different regions, and combined with the state vector, the risk of the target vehicle passing through the obstacle region in its current posture is calculated, dynamically describing the number and shape of external obstacles. This solves the problems in related technologies where the state of external obstacles and lane boundaries with variable numbers and shapes cannot be accurately described, and the risk of passing through obstacle regions cannot be determined.
[0070] As an optional embodiment, acquiring feature data of the target vehicle includes:
[0071] Obtain the target vehicle's maximum front wheel slip angle, vehicle frame width, and vehicle speed;
[0072] The maximum slip angle of the front wheels, the width of the vehicle frame, and the vehicle speed are used as feature data.
[0073] Optionally, acquire feature data of the target vehicle, such as: maximum front wheel slip angle, vehicle border width, vehicle speed, etc. Determine the opening angle of the sector region based on the maximum front wheel slip angle from the feature data. Determine the length of the rectangular region based on the vehicle border width from the feature data. Determine the radius of the sector region and the length of the rectangular region (i.e., the forward extension length) based on the vehicle speed from the feature data.
[0074] In this embodiment of the application, feature data of the target vehicle is collected to provide a basis for the subsequent generation of obstacle description regions.
[0075] As an optional embodiment, the obstacle description region includes: a fan-shaped obstacle description region and a rectangular obstacle description region. The obstacle description region is determined based on feature data, including:
[0076] The radius of the sector and the length of the rectangle are obtained based on the vehicle speed;
[0077] Using the center of the target vehicle as the center, and based on the maximum side slip angle of the front wheels and the radius of the sector, the sector-shaped obstacle description area is obtained;
[0078] The rectangular obstacle description area is obtained based on the rectangle length and the vehicle border width.
[0079] Optionally, this application provides two obstacle description areas: a fan-shaped obstacle description area (hereinafter referred to as the fan-shaped area) and a rectangular obstacle description area (hereinafter referred to as the rectangular area). The rectangular area is a rectangle extending from the front reference surface of the vehicle in the direction of vehicle movement. The opening angle of the fan-shaped area is determined based on the maximum sideslip angle of the front wheels in the feature data. The length of the rectangular area is determined based on the vehicle frame width in the feature data. The radius of the fan-shaped area and the length of the rectangular area (i.e., the forward extension length) are determined based on the vehicle speed in the feature data.
[0080] The radius of the sector and the length of the rectangular region are directly proportional to the vehicle speed. The higher the vehicle speed, the larger the area represented by the obstacle, as shown in formula (1).
[0081] r = k3 × v ego
[0082] l = k4 × v ego (1)
[0083] Where k3 and k4 are preset parameters, v ego Let r be the vehicle speed, r be the radius of the sector, and l be the length of the rectangle.
[0084] Using the center of the target vehicle as the center, the opening angle of the fan-shaped region is determined based on the maximum sideslip angle of the front wheels in the feature data. The length of the rectangular region is determined based on the width of the vehicle's border in the feature data. The radius of the fan-shaped region and the length of the rectangular region (i.e., the forward extension length) are determined based on the vehicle speed in the feature data. Thus, the fan-shaped region and the rectangular region are determined.
[0085] In this embodiment, the obstacle description area, which describes obstacles and boundaries, is generated based on the characteristic data of the target vehicle, and the obstacle description area can be adjusted in real time according to the firing rate, so as to reflect the external state at the current vehicle speed in real time.
[0086] As an optional embodiment, the region segments include: fan-shaped region segments and rectangular region segments. The region segments used to obtain the obstacle description region include:
[0087] Get the number of sector segments and the number of rectangle segments;
[0088] Determine the sector angle interval and the rectangle distance interval based on the number of sector segments and the number of rectangle segments;
[0089] Based on the fan-shaped angle interval, determine the first preset number of fan-shaped region line segments of the fan-shaped obstacle description area;
[0090] Based on the rectangular distance interval, determine a second preset number of rectangular area segments for the rectangular obstacle description area.
[0091] Optionally, the number N of sectors and rectangles to be divided can be obtained from the parameter list. sector (i.e., the number of sector divisions) and N rectangle (i.e., the number of rectangular divisions), and thereby determine the sector angle interval θ and the rectangular distance interval ζ. Then, based on θ and ζ, determine the number of region line segments and the number of region line segments in the obstacle description area. For example, a sector area is divided by a cluster of equally spaced line segments with a length equal to the sector radius (i.e., the region line segments of the sector area), and a rectangular area is also divided by a cluster of equally spaced line segments (i.e., the region line segments of the rectangular area). The first preset number is calculated based on the opening angle of the sector area and θ, and the second preset number is calculated based on the width of the rectangular area and ζ.
[0092] The above content is as follows Figure 2 As shown, the proposed obstacle description region includes a fan-shaped region centered on the target vehicle's structural center and a rectangular region extending in the target vehicle's direction of travel. The target vehicle is represented by a solid-line border, with the right side of the solid-line border serving as the target vehicle's forward baseline. Obstacle vehicles are represented by dashed-line borders, lane boundaries are represented by long straight lines, and S-arrows indicate the vehicle's direction of travel. The angle of the fan-shaped region is determined by the maximum sideslip angle of the front wheels on both sides of the vehicle, and the width of the extended rectangular region is determined by the width of the vehicle's border. Both regions are centered on the centerline of the vehicle's direction of travel. The fan-shaped region is divided by a cluster of equally spaced line segments (i.e., the region segments of the fan-shaped region) with a length equal to the radius of the fan-shaped region. Upon encountering an obstacle or lane boundary line, the corresponding region segments intersect with it. The data of intersections between line segments and obstacles at different angles are then stored in a list as the state vector of the fan-shaped region, representing the obstacle state within the fan-shaped area. Similarly, the rectangular region is also divided by a cluster of equally spaced line segments (i.e., the region segments of the rectangular region).
[0093] In this embodiment, the obstacle description area is segmented and the area line segment is generated. The state vector is determined based on the intersection of the area line segment and the obstacle set. This can accurately describe the state of external obstacles and lane boundaries, solving the problem that the prior art cannot accurately describe the state of external obstacles and lane boundaries with variable numbers and shapes.
[0094] As an optional embodiment, the state vector includes: a sector-shaped state vector and a rectangular state vector. The state vector is obtained based on the intersection points of the region line segments and the obstacle set, and includes:
[0095] When a sector-shaped line segment intersects with a set of obstacles, calculate the first distance from the intersection point of the sector-shaped line segment and the set of obstacles to the center of the circle;
[0096] The initial sector-shaped state vector of the sector-shaped obstacle description region is obtained based on the first distance;
[0097] When a line segment of a rectangular area intersects with a set of obstacles, calculate the second distance from the intersection point of the line segment of the rectangular area and the set of obstacles to the forward reference line of the target vehicle.
[0098] The initial rectangular state vector of the rectangular obstacle description region is obtained based on the second distance;
[0099] The initial sector state vector is normalized according to the preset method to obtain the sector state vector, and the initial rectangular state vector is normalized according to the preset method to obtain the rectangular state vector.
[0100] Optionally, multiple obstacles and lane boundaries can be combined into a single obstacle set. The state vector of the sector region is defined as S. sector =[[β1,r],...,[β i Let the state vector of the rectangular region be S. rectangle =[[w1,l],...,[w j ,l]], where β i Let r represent the i-th line segment in the sector region, r represent the radius of the sector, and w represent the line segment in the sector region. j Let l represent the j-th line segment in the rectangular region, and l represent the length of the rectangle.
[0101] The state vector is determined based on the intersection of the region line segment and the set of obstacles. For example, for a sector-shaped region, the state vector is determined by the intersection of the region line segment β. i When intersecting with an obstacle or boundary, calculate the distance from the intersection point to the center of the sector region, and replace [β] with this distance. i In the region r, ,r]. Similarly, for a rectangular region, in the region line segment w j When intersecting with an obstacle or boundary, calculate the distance from the intersection point to the forward reference line of the target vehicle, and replace [w] with this distance. jThe l in ,l].
[0102] The specific algorithm is as follows:
[0103] for N sector do within each loop:
[0104] If the current line segment intersects with the set of obstacles:
[0105] Calculate the intersection point of the current line segment and the obstacle, and calculate the distance y from the intersection point to the center of the circle (i.e., the first distance), then update the corresponding S. sector
[0106] else:
[0107] Current S sector The corresponding part will not be updated.
[0108] for N rectangle do within each loop:
[0109] If the current line segment intersects with the set of obstacles:
[0110] Calculate the intersection point of the current line segment and the obstacle, and calculate the distance from the intersection point to the front of the corresponding target vehicle.
[0111] Update the corresponding S at the distance d from the baseline (i.e., the second distance). rectangle
[0112] else:
[0113] Current S rectangle The corresponding part will not be updated.
[0114] end for
[0115] In actual training, the number of sector and rectangle segments is pre-set in the parameter file, and the interval size is the same, therefore S sector β1 to β i and S rectangle w1 to w j The order is the same in each round, so it can be omitted.
[0116] The algorithm described above yields an unnormalized initial sector state vector, for example: And the unnormalized initial rectangular state vector, for example:
[0117] In order to reflect the obstacle state at different vehicle speeds and to calculate the reward function under the relevant state more accurately, it is necessary to normalize the representation list in the region.
[0118] The unnormalized S is determined by a preset method. sector and Srectangle Normalization can be performed, and the preset methods can be: linear normalization, standard deviation normalization, nonlinear normalization using a function, normalization using the radius r of the sector and the length l of the rectangle, etc.
[0119] by Figure 2 Taking the positional relationship between the target vehicle and obstacle vehicles as an example, if the number of sector regions and rectangular regions in the parameter list are divided into 10 during the initialization process, after the above algorithm and normalization, the normalized sector state vector is, for example: S sector = [0.75, 0.61, 0.73, 0.82, 1, 1, 1, 1, 0.52, 0.39, 0.35]. The normalized rectangular state vector, for example: S rectangle =[1,1,1,1,1,1,1,1,1,1,1].
[0120] It can be seen that within the left and right sides of the fan-shaped area, there is intersection with the obstacle, and the corresponding state list element is not 1. Near the center of the fan-shaped axis of symmetry, there is no intersection with the obstacle, and the corresponding state list element is 1. Within the rectangular area, there is no intersection between the rectangular area and the obstacle in the current round, and all state list elements are 1. From the current scene diagram and this representation, it is easy to deduce that in the current round, the target vehicle can move forward straight at its current posture.
[0121] In this embodiment, the state vector can be used to describe the state of external obstacles and lane boundaries with varying numbers and shapes, thereby reducing the computational resources consumed in parsing the external states. The state vector unifies the obstacle input states, facilitating the generation of more complex obstacle scenarios during training. It unifies the obstacle vehicles and lane boundary lines to be considered at each moment into a single obstacle set, simplifying the consideration process for obstacle and lane boundary modules during obstacle avoidance.
[0122] As an optional embodiment, the risk values include: sector-shaped risk values and rectangular risk values. Based on the state vector, bias vector, and weight vector, the risk value for traversing the obstacle region is obtained, including:
[0123] The adjusted sector state vector is obtained by subtracting the sector bias vector from the sector state vector. The bias vector includes the sector bias vector and the rectangular bias vector.
[0124] Based on the adjusted sector state vector, sector weight vector, and the first preset formula, the sector risk value corresponding to the sector obstacle description area is obtained, wherein the weight vector includes a sector weight vector and a rectangular weight vector.
[0125] The adjusted rectangular state vector is obtained by subtracting the rectangular offset vector from the rectangular state vector.
[0126] Based on the adjusted rectangular state vector, rectangular weight vector, and the second preset formula, the rectangular risk value corresponding to the rectangular obstacle description area is obtained.
[0127] Optionally, a weight vector is set based on the distance of the intersection point of the region line segment, obstacle, and boundary from the central axis. This weight vector reflects the importance of obstacles and boundaries at different locations to the target vehicle. To make the reinforcement learning neural network converge more easily, a bias vector is introduced based on the symmetry of the fan-shaped and rectangular regions.
[0128] The specific values in formulas (2) and (3) are set according to actual needs. As shown in formulas (2) and (3), B sector B is the state bias vector for the sector region. rectangle The state bias vector for the sector region is used to translate and adjust the state vectors of obstacles and lane boundaries, ensuring that the values in the state vectors are evenly distributed around the target values. The normalized sector state vector S... sector Taking [0.75, 0.61, 0.73, 0.82, 1, 1, 1, 1, 0.52, 0.39, 0.35] as an example, let's assume... Both are 0.7, and the target value is set to 0. At this time, S sector -B sector = [0.05, -0.09, 0.03, 0.12, 0.3, 0.3, 0.3, 0.3, -0.18, -0.31, -0.35] (i.e., the adjusted sector-shaped state vector). The adjusted sector-shaped state vector is more uniformly distributed than the target value of 0. The adjusted rectangular state vector S rectangle -B rectangle Similarly.
[0129] As shown in formulas (2) and (3), W sector For the sector-shaped weight vector, in w s_1 to Among these weight values, the closer to the center, the greater the weight, indicating that the distance of obstacles or boundaries at that position has a greater impact on the target vehicle's driving. The target vehicle should ideally drive in a direction free of obstacles and boundaries in its forward direction. Rectangular weight vector W rectangle With W sector The distributions are different, W rectangle This represents the weight vector of the vehicle's forward direction. If an obstacle or lane boundary appears anywhere within this area, the vehicle will either collide with the obstacle or cross the lane boundary if it continues to travel straight. Therefore, the weight value w' of the rectangular area is... s_1 to The differences between them are not significant.
[0130] First, subtract the sector bias vector from the sector state vector to obtain the adjusted sector state vector, for example... The product of the adjusted sector state vector and the transpose of the sector weight vector is then used as the cost for obstacles and lane boundaries within the sector region. sector (i.e., sector risk value), as shown in formula (4), which is the first preset formula, where T represents matrix transpose.
[0131] First, subtract the rectangular offset vector from the rectangular state vector to obtain the adjusted rectangular state vector, for example... The product of the adjusted rectangular state vector and the transpose of the rectangular weight vector is then used as the cost for the obstacles and lane boundaries within the rectangular region. rectangle (i.e., rectangular risk value), as shown in formula (5), which is the second preset formula. Where T represents matrix transpose.
[0132]
[0133]
[0134]
[0135]
[0136] In this embodiment, the number and shape of external obstacles are described based on the vehicle's speed, and weight vectors and bias vectors are preset relative to different positions of the target vehicle. This reflects the risk required for the target vehicle to pass through the obstacle area in its current posture, so that the neural network can make further obstacle avoidance adjustments. This solves the problem in the prior art that the risk of passing through the obstacle area cannot be determined.
[0137] As an optional embodiment, the initial sector state vector is normalized according to a preset method to obtain a sector state vector, and the initial rectangular state vector is normalized according to a preset method to obtain a rectangular state vector, including:
[0138] Divide the first distance in the initial sector state vector by the sector radius to obtain the sector state vector;
[0139] Divide the second distance in the initial rectangular state vector by the length of the rectangle to obtain the rectangular state vector.
[0140] Alternatively, the normalization method using the radius r of the sector and the length l of the rectangle is shown in formula (6):
[0141]
[0142] The soon-to-be-unnormalized S sector The first distance y in iDivide each by r. The unnormalized S rectangle The second distance d in j Divide by l, i, and j respectively to get the ordinal numbers.
[0143] In this embodiment, the initial sector state vector and the initial rectangular state vector are normalized by the radius r of the sector and the length l of the rectangle, respectively. The method is simple, easy to implement, and conducive to reflecting the obstacle state at different vehicle speeds, and more accurately calculating the reward function under the relevant state.
[0144] According to another aspect of the embodiments of this application, a risk determination apparatus for passing through an obstacle area is also provided for implementing the above-described risk determination method for passing through an obstacle area. Figure 3 This is a structural block diagram of an optional risk determination device for traversing an obstacle area according to an embodiment of this application, such as... Figure 3 As shown, the device may include:
[0145] The first acquisition module 301 is used to acquire feature data of the target vehicle;
[0146] The determination module 302 is used to determine the obstacle description area of the target vehicle based on the feature data;
[0147] The second acquisition module 303 is used to acquire the region line segments of the obstacle description area;
[0148] The first obtaining module 304 is used to obtain the state vector of the obstacle description region based on the intersection of the region line segment and the obstacle set, wherein the state vector is used to describe the state of the obstacle set;
[0149] The second obtaining module 305 is used to obtain the risk value of passing through the obstacle area based on the state vector, bias vector and weight vector, wherein the bias vector is used to adjust the state vector and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle.
[0150] It should be noted that the first acquisition module 301 in this embodiment can be used to execute the above step S101, the determination module 302 in this embodiment can be used to execute the above step S102, the second acquisition module 303 in this embodiment can be used to execute the above step S103, the first obtaining module 304 in this embodiment can be used to execute the above step S104, and the second obtaining module 305 in this embodiment can be used to execute the above step S105.
[0151] Through the aforementioned modules, on the one hand, obstacle description regions are determined based on the target vehicle's feature data, and then state vectors are obtained based on the intersections of the region's line segments and the obstacles. These state vectors accurately describe the states of external obstacles and lane boundaries. On the other hand, by dividing different obstacle description regions, and based on the weight and bias vectors of different regions, combined with the state vectors, the risk of the target vehicle passing through the obstacle region in its current posture is calculated, dynamically describing the number and shape of external obstacles. This solves the problems in related technologies where it is impossible to accurately describe the state of external obstacles and lane boundaries with varying numbers and shapes, and where the risk of passing through obstacle regions cannot be determined.
[0152] As an optional embodiment, the first acquisition module includes:
[0153] The first acquisition unit is used to acquire the target vehicle's maximum front wheel slip angle, vehicle frame width, and vehicle speed.
[0154] As a unit, it is used to take the maximum front wheel slip angle, vehicle frame width, and vehicle speed as feature data.
[0155] As an optional embodiment, the obstacle description region includes a fan-shaped obstacle description region and a rectangular obstacle description region, and the determination module includes:
[0156] The first unit is used to obtain the sector radius and rectangle length based on the vehicle speed;
[0157] The second obtaining unit is used to take the center of the target vehicle as the center of the circle and obtain the fan-shaped obstacle description area based on the maximum side slip angle of the front wheel and the fan-shaped radius.
[0158] The third unit is used to obtain the rectangular obstacle description area based on the rectangle length and the vehicle border width.
[0159] As an optional embodiment, the region segments include fan-shaped region segments and rectangular region segments, and the second acquisition module includes:
[0160] The second acquisition unit is used to acquire the number of sector segments and the number of rectangular segments;
[0161] The first determining unit is used to determine the sector angle interval and the rectangle distance interval based on the number of sector segments and the number of rectangle segments;
[0162] The second determining unit is used to determine a first preset number of sector area line segments of the sector obstacle description area according to the sector angle interval;
[0163] The third determining unit is used to determine a second preset number of rectangular area line segments of the rectangular obstacle description area based on the rectangular distance interval.
[0164] As an optional embodiment, the state vector includes a sector-shaped state vector and a rectangular state vector, and the first obtaining module includes:
[0165] The first calculation unit is used to calculate the first distance from the intersection point of the sector-shaped region line segment and the obstacle set to the center of the circle when the sector-shaped region line segment intersects with the obstacle set.
[0166] The fourth unit is used to obtain the initial sector state vector of the sector obstacle description region based on the first distance;
[0167] The second calculation unit is used to calculate the second distance from the intersection point of the rectangular area line segment and the obstacle set to the forward reference line of the target vehicle when the rectangular area line segment intersects with the obstacle set.
[0168] The fifth unit is used to obtain the initial rectangular state vector of the rectangular obstacle description region based on the second distance;
[0169] The sixth unit is used to normalize the initial sector state vector according to a preset method to obtain the sector state vector, and to normalize the initial rectangular state vector according to a preset method to obtain the rectangular state vector.
[0170] As an optional embodiment, the risk values include sector-shaped risk values and rectangular risk values, the bias vectors include sector-shaped bias vectors and rectangular bias vectors, the weight vectors include sector-shaped weight vectors and rectangular weight vectors, and the second obtaining module includes:
[0171] The seventh unit is used to subtract the sector bias vector from the sector state vector to obtain the adjusted sector state vector, wherein the bias vector includes the sector bias vector and the rectangular bias vector.
[0172] The eighth unit is used to obtain the sector risk value corresponding to the sector obstacle description area based on the adjusted sector state vector, sector weight vector and the first preset formula, wherein the weight vector includes a sector weight vector and a rectangular weight vector.
[0173] The ninth unit is used to subtract the rectangular offset vector from the rectangular state vector to obtain the adjusted rectangular state vector.
[0174] The tenth unit is used to obtain the rectangular risk value corresponding to the rectangular obstacle description area based on the adjusted rectangular state vector, the rectangular weight vector, and the second preset formula.
[0175] As an optional embodiment, the sixth obtaining unit includes:
[0176] The first submodule is used to divide the first distance in the initial sector state vector by the sector radius to obtain the sector state vector;
[0177] The second submodule is used to divide the second distance in the initial rectangular state vector by the length of the rectangle to obtain the rectangular state vector.
[0178] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in the above embodiments.
[0179] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described risk determination method for passing through an obstacle area is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0180] Figure 4 This is a structural block diagram of an optional electronic device according to an embodiment of this application, such as... Figure 4 As shown, it includes a processor 401, a communication interface 402, a memory 403, and a communication bus 404. The processor 401, communication interface 402, and memory 403 communicate with each other via the communication bus 404.
[0181] Memory 403 is used to store computer programs;
[0182] When processor 401 executes a computer program stored in memory 403, it performs the following steps:
[0183] Obtain the characteristic data of the target vehicle;
[0184] Based on the feature data, determine the obstacle description area of the target vehicle;
[0185] Obtain the region line segments describing the obstacle;
[0186] Based on the intersection of the region line segment and the obstacle set, the state vector of the obstacle description region is obtained, where the state vector is used to describe the state of the obstacle set;
[0187] Based on the state vector, bias vector, and weight vector, the risk value of passing through the obstacle area is obtained. The bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle.
[0188] Optionally, in this embodiment, the communication bus can be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0189] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0190] The memory may include RAM, or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0191] As an example, such as Figure 4 As shown, the memory 403 may include, but is not limited to, the first acquisition module 301, the determination module 302, the second acquisition module 303, the first obtaining module 304, and the second obtaining module 305 of the aforementioned risk determination device for passing through an obstacle area. Furthermore, it may include, but is not limited to, other module units of the aforementioned risk determination device for passing through an obstacle area, which will not be elaborated upon in this example.
[0192] The processors mentioned above can be general-purpose processors, including but not limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; they can also be DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0193] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated here.
[0194] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. The device that implements the above-described method for determining the risk of passing through an obstacle area can be a terminal device, such as a smartphone (e.g., an Android phone, an iOS phone), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic devices. For example, the terminal device may also include components that are more advanced than those described above. Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4The different configurations shown.
[0195] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, ROM, RAM, disk or optical disk, etc.
[0196] According to another aspect of the embodiments of this application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to store program code for executing a risk determination method for passing through an obstacle region.
[0197] Optionally, in this embodiment, the storage medium may be located on at least one of the network devices in the network shown in the above embodiment.
[0198] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
[0199] Obtain the characteristic data of the target vehicle;
[0200] Based on the feature data, determine the obstacle description area of the target vehicle;
[0201] Obtain the region line segments describing the obstacle;
[0202] Based on the intersection of the region line segment and the obstacle set, the state vector of the obstacle description region is obtained, where the state vector is used to describe the state of the obstacle set;
[0203] Based on the state vector, bias vector, and weight vector, the risk value of passing through the obstacle area is obtained. The bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle.
[0204] Optionally, specific examples in this embodiment can refer to the examples described in the above embodiments, and will not be repeated in this embodiment.
[0205] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.
[0206] In the description of this specification, the references to terms such as "this embodiment," "an embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to specific features, structures, materials, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples. In the description of this disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0207] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A risk determination method through an obstacle region, characterized by, The method includes: Obtain the characteristic data of the target vehicle; Based on the feature data, the obstacle description region of the target vehicle is determined; Obtain the region line segments of the obstacle description area; Based on the intersection of the region line segment and the obstacle set, the state vector of the obstacle description region is obtained, wherein the state vector is used to describe the state of the obstacle set; Based on the state vector, bias vector, and weight vector, a risk value for passing through the obstacle area is obtained, wherein the bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle. The obstacle description region includes a fan-shaped obstacle description region and a rectangular obstacle description region; the state vector includes a fan-shaped state vector and a rectangular state vector; the risk value includes a fan-shaped risk value and a rectangular risk value; the bias vector includes a fan-shaped bias vector and a rectangular bias vector; and the weight vector includes a fan-shaped weight vector and a rectangular weight vector. Obtaining the risk value for passing through the obstacle region based on the state vector, bias vector, and weight vector includes: The adjusted sector state vector is obtained by subtracting the sector bias vector from the sector state vector; the sector risk value corresponding to the sector obstacle description region is obtained based on the adjusted sector state vector, the sector weight vector, and the first preset formula. The first preset formula satisfies: wherein, represents the sector risk value, represents the sector state vector, represents the sector bias vector, represents a sector weight vector, represents the adjusted sector state vector; The adjusted rectangular state vector is obtained by subtracting the rectangular offset vector from the rectangular state vector; the rectangular risk value corresponding to the rectangular obstacle description area is obtained based on the adjusted rectangular state vector, the rectangular weight vector, and the second preset formula. The second preset formula satisfies: ,in, This represents the risk value of the rectangle. This represents the rectangular state vector. This represents the rectangular offset vector. This represents the rectangular weight vector. This represents the adjusted rectangular state vector; The region segments include fan-shaped region segments and rectangular region segments. Obtaining the region segments of the obstacle description region includes: obtaining the number of fan-shaped segments and the number of rectangular segments; determining the fan-shaped angle interval and the rectangular distance interval based on the number of fan-shaped segments and the number of rectangular segments; determining a first preset number of fan-shaped region segments for the fan-shaped obstacle description region based on the fan-shaped angle interval; and determining a second preset number of rectangular region segments for the rectangular obstacle description region based on the rectangular distance interval.
2. The method according to claim 1, characterized in that, The acquisition of the target vehicle's feature data includes: Obtain the maximum front wheel slip angle, vehicle frame width, and vehicle speed of the target vehicle; The maximum slip angle of the front wheel, the width of the vehicle frame, and the vehicle speed are used as the feature data.
3. The method according to claim 2, characterized in that, The step of determining the obstacle description region based on the feature data includes: The radius of the sector and the length of the rectangle are obtained based on the vehicle speed. Using the center of the target vehicle as the center, and based on the maximum sideslip angle of the front wheels and the radius of the sector, the sector-shaped obstacle description area is obtained. The rectangular obstacle description area is obtained based on the length of the rectangle and the width of the vehicle border.
4. The method according to claim 3, characterized in that, The step of obtaining the state vector based on the intersection points of the region line segment and the obstacle set includes: When the sector-shaped region line segment intersects with the set of obstacles, calculate the first distance from the intersection point of the sector-shaped region line segment and the set of obstacles to the center of the circle; The initial sector state vector of the sector obstacle description region is obtained based on the first distance; When the rectangular area line segment intersects with the set of obstacles, calculate the second distance from the intersection point of the rectangular area line segment and the set of obstacles to the forward reference line of the target vehicle; The initial rectangular state vector of the rectangular obstacle description region is obtained based on the second distance; The initial sector state vector is normalized according to a preset method to obtain the sector state vector, and the initial rectangular state vector is normalized according to the preset method to obtain the rectangular state vector.
5. The method according to claim 4, characterized in that, The steps of normalizing the initial sector state vector according to a preset method to obtain a sector state vector and normalizing the initial rectangular state vector according to the preset method to obtain a rectangular state vector include: Divide the first distance in the initial sector state vector by the sector radius to obtain the sector state vector; The rectangle state vector is obtained by dividing the second distance in the initial rectangle state vector by the rectangle length.
6. A risk device for traversing an obstacle zone, characterized in that, include: The first acquisition module is used to acquire feature data of the target vehicle; The determination module is used to determine the obstacle description region of the target vehicle based on the feature data; The second acquisition module is used to acquire the region line segments of the obstacle description area; The first obtaining module is used to obtain a state vector of the obstacle description region based on the intersection of the region line segment and the obstacle set, wherein the state vector is used to describe the state of the obstacle set; The second obtaining module is used to obtain a risk value for passing through the obstacle area based on the state vector, bias vector, and weight vector, wherein the bias vector is used to adjust the state vector, and the weight vector is used to determine the impact of different obstacles in the obstacle set on the target vehicle. The obstacle description region includes a fan-shaped obstacle description region and a rectangular obstacle description region; the state vector includes a fan-shaped state vector and a rectangular state vector; the risk value includes a fan-shaped risk value and a rectangular risk value; the bias vector includes a fan-shaped bias vector and a rectangular bias vector; the weight vector includes a fan-shaped weight vector and a rectangular weight vector; and the second obtaining module includes: The seventh obtaining unit is used to obtain the adjusted sector state vector by subtracting the sector bias vector from the sector state vector; the eighth obtaining unit is used to obtain the sector risk value corresponding to the sector obstacle description area based on the adjusted sector state vector, the sector weight vector and the first preset formula. The first preset formula satisfies: ,in, This represents the sector-shaped risk value. This represents the sector-shaped state vector. This represents the sector bias vector. Represents the sector weight vector. This represents the adjusted sector state vector; The ninth obtaining unit is used to subtract the rectangular offset vector from the rectangular state vector to obtain the adjusted rectangular state vector; the tenth obtaining unit is used to obtain the rectangular risk value corresponding to the rectangular obstacle description area according to the adjusted rectangular state vector, the rectangular weight vector and the second preset formula. The second preset formula satisfies: ,in, This represents the risk value of the rectangle. This represents the rectangular state vector. This represents the rectangular offset vector. This represents the rectangular weight vector. This represents the adjusted rectangular state vector; The region segments include fan-shaped region segments and rectangular region segments. The second acquisition module includes: a second acquisition unit for acquiring the number of fan-shaped segments and the number of rectangular segments; a first determination unit for determining the fan-shaped angle interval and the rectangular distance interval based on the number of fan-shaped segments and the number of rectangular segments; a second determination unit for determining a first preset number of fan-shaped region segments for the fan-shaped obstacle description region based on the fan-shaped angle interval; and a third determination unit for determining a second preset number of rectangular region segments for the rectangular obstacle description region based on the rectangular distance interval.
7. An electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein, The processor, the communication interface, and the memory communicate with each other via the communication bus, characterized in that... The memory is used to store computer programs; The processor is configured to perform the steps of the method described in any one of claims 1 to 5 by running the computer program stored in the memory.
8. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method described in any one of claims 1 to 5.