Obstacle detection method and device, vehicle and storage medium
By combining the obstacle profile points obtained by the first and second sensors, using projection principle and dot product calculations, the real outline points of the obstacle are corrected, and the problem of low accuracy in obstacle recognition in severe weather by autonomous driving vehicles is solved, and the problem of low obstacle recognition accuracy is improved. Path planning and driving safety.
Patent Information
- Application Number
- CN202411369414.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
AI Technical Summary
In severe weather conditions such as rain and snow, radar sensors reduce the accuracy of obstacle identification of autonomous vehicles, affecting vehicle path planning and driving safety.
The initial contour point of the target obstacle is obtained through the first sensor in the vehicle, and the corresponding more accurate contour point is obtained by using the second sensor. Combining the projection principle and dot product operation, the initial contour point is corrected to determine the true contour point of the obstacle. Improve the accuracy of obstacle detection.
It improves the accuracy of obstacle detection and the accuracy of path planning, and enhances the driving safety of the vehicle, especially in severe weather conditions.
Smart Images

Figure CN119270257A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicles, and more specifically, to a method, a device, a vehicle and a storage medium for obstacle detection in the field of vehicles. Background Art
[0002] With the development of vehicle technology, autonomous vehicles are gradually entering people's lives. However, behind its booming development, autonomous vehicles still face a series of problems that need to be solved. Among them, the obstacle recognition problem of autonomous vehicles.
[0003] In an autonomous driving system, accurately identifying and avoiding obstacles is the key to ensuring driving safety. At present, obstacle identification methods in related technologies often rely solely on radar sensors in vehicles, which have limited accuracy and coverage. For example, in rainy and snowy weather, rain and snow will affect the propagation of electromagnetic wave signals, reduce the accuracy of radar sensors in identifying obstacles, and thus affect the vehicle's path planning and driving safety.
[0004] Therefore, there is an urgent need for a method for obstacle detection to improve the accuracy of obstacle detection, thereby improving the accuracy of vehicle path planning and the safety of vehicle driving. Summary of the invention
[0005] The present application provides a method, device, vehicle and storage medium for obstacle detection, which can improve the accuracy of vehicle path planning and the safety of vehicle driving.
[0006] In a first aspect, a method for obstacle detection is provided, the method comprising: acquiring a first contour point and a second contour point of a target obstacle around the vehicle through a first sensor in the vehicle, and acquiring a third contour point corresponding to the first contour point and a fourth contour point corresponding to the second contour point through a second sensor in the vehicle, the first contour point being a boundary point on the target obstacle on a side close to a driving direction of the vehicle, and the second contour point being a boundary point on the target obstacle on a side away from a driving direction of the vehicle; determining a first projection distance of the third contour point in a target direction, and determining a second projection distance of the fourth contour point in the target direction, the target direction being a direction from the first contour point to the second contour point; correcting the first contour point based on the first projection distance and the first contour point, and correcting the second contour point based on the second projection distance and the second contour point, so as to determine a true contour point of the target obstacle.
[0007] In the above technical solution, two initial contour points (first contour point and second contour point) of the target obstacle around the vehicle are obtained by the first sensor in the vehicle, and contour points (third contour point and fourth contour point) corresponding to the two initial contour points are respectively obtained by the second sensor. That is to say, multiple contour points of the same obstacle are obtained by two sensors in the vehicle. Further, the first projection distance of the third contour point in the target direction and the second projection distance of the fourth contour point in the target direction are determined. The first projection distance of the line between the third contour point and the first contour point in the direction of the obstacle edge contour and the second projection distance of the line between the fourth contour point and the second contour point in the direction of the obstacle edge contour are determined by the projection principle. Among them, the relative position between the third contour point and the first contour point and the relative position between the fourth contour point and the second contour point can be determined by the first projection distance and the second projection distance. Therefore, the method corrects the first contour point by the first projection distance and the first contour point, and corrects the second contour point by the second projection distance and the second contour point. That is to say, the method uses the projection principle, combines the obstacle information obtained by the second sensor, and adjusts the initial contour points based on the projection distance of the obstacle contour data of the second sensor in the direction of the contour points of the target obstacle to obtain the real contour points of the target obstacle. The real contour points can effectively describe the real boundaries of the target obstacle, improve the detection accuracy of the target obstacle, and thus improve the accuracy of the vehicle's path planning and the safety of vehicle driving.
[0008] In combination with the first aspect, in some possible implementations, determining a first projection distance of the third contour point in a target direction, and determining a second projection distance of the fourth contour point in the target direction, includes: determining a first horizontal axis offset and a first vertical axis offset of the third contour point relative to the first contour point, the first horizontal axis offset being a displacement deviation of the third contour point relative to the first contour point along the horizontal axis, and the first vertical axis offset being a displacement deviation of the third contour point relative to the first contour point along the vertical axis; determining a second horizontal axis offset and a second vertical axis offset of the fourth contour point relative to the second contour point, the second horizontal axis offset being a displacement deviation of the fourth contour point relative to the second contour point along the horizontal axis, and the second vertical axis offset being a displacement deviation of the fourth contour point relative to the second contour point. The displacement is the displacement deviation of the fourth contour point relative to the second contour point along the vertical axis; determine the first unit vector and the second unit vector between the first contour point and the second contour point in the horizontal axis direction and the vertical axis direction respectively, the first unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the horizontal direction, and the second unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the vertical direction; based on the first horizontal axis offset, the first vertical axis offset, the first unit vector and the second unit vector, determine the first projection distance; based on the second horizontal axis offset, the second vertical axis offset, the first unit vector and the second unit vector, determine the second projection distance.
[0009] In the above technical solution, the horizontal axis offset and the vertical axis offset can determine the positional relationship between the third contour point and the fourth contour point and the first contour point and the second contour point on the two-dimensional plane. Therefore, the method determines the first horizontal axis offset and the first vertical axis offset of the third contour point relative to the first contour point in the horizontal axis direction and the vertical axis direction, and the second horizontal axis offset and the second vertical axis offset of the fourth contour point relative to the second contour point in the horizontal axis direction and the vertical axis direction. In addition, the target direction in the method is used to indicate the direction from the first contour point to the second contour point. The unit vector is used to represent the direction from the first point to the second point, which is used to standardize the direction and help to scale the offset according to the accurate ratio. Therefore, the method can accurately determine the first projection distance of the third contour point in the target direction and the second projection distance of the fourth contour point in the target direction through the offset and the unit vector.
[0010] In combination with the first aspect and the above implementation manner, in some possible implementation manners, determining the first projection distance based on the first horizontal axis offset, the first vertical axis offset, the first unit vector and the second unit vector includes: determining the first projection distance based on the following formula;
[0011]
[0012] Wherein, d1 is the first projection distance, is the first unit vector, x'1 is the first horizontal axis offset, is the second unit vector, y'1 is the first longitudinal axis offset;
[0013] And, determining the second projection distance based on the second horizontal axis offset, the second vertical axis offset, the first unit vector and the second unit vector includes: determining the second projection distance based on the following formula;
[0014]
[0015] Wherein, d2 is the second projection distance, x'2 is the second horizontal axis offset, and y'2 is the second vertical axis offset.
[0016] In the above technical solution, the first projection distance and the second projection distance of the third contour point and the fourth contour point in the target direction are determined directly by the dot product method between the offset and the unit vector. Compared with the Pythagorean theorem calculation, this dot product operation method can simplify the calculation and is more efficient. Furthermore, the dot product operation method can avoid the accumulation of errors that may be introduced in the middle of the calculation steps, thereby improving the accuracy of the projection distance. In addition, this dot product operation method is implemented in a geometric way, which is easier to understand. It is not only applicable to two-dimensional space, but also to three-dimensional and even higher-dimensional space, and can provide flexibility for processing complex scenes.
[0017] In combination with the first aspect and the above implementation manner, in some possible implementation manners, determining a first unit vector and a second unit vector between the first contour point and the second contour point in the horizontal axis direction and the vertical axis direction respectively includes: determining the first unit vector based on the following formula;
[0018]
[0019] Based on the following formula, the second unit vector is determined;
[0020]
[0021] in,
[0022] Wherein, (x1, y1) is the first target coordinate value of the first contour point, (x2, y2) is the second target coordinate value of the second contour point, and d0 is the distance between the first contour point and the second contour point.
[0023] In combination with the first aspect and the above-mentioned implementation manner, in some possible implementation manners, based on the first projection distance and the first contour point, the first contour point is corrected, including: when the first projection distance is less than a first distance threshold, based on the first unit vector in the horizontal direction between the first contour point and the second contour point, the first projection distance and the horizontal axis coordinate value of the first contour point, the horizontal axis coordinate value of the first contour point is corrected; and based on the second unit vector in the vertical direction between the first contour point and the second contour point, the first projection distance and the vertical axis coordinate value of the first contour point, the vertical axis coordinate value of the first contour point is corrected; and based on the second projection distance and the second contour point, the second contour point is corrected, including: when the second projection distance is greater than a second distance threshold, based on the first unit vector, the second projection distance and the horizontal axis coordinate value of the second contour point, the horizontal axis coordinate value of the second contour point is corrected; and based on the second unit vector, the second projection distance and the vertical axis coordinate value of the second contour point, the vertical axis coordinate value of the second contour point is corrected.
[0024] In the above technical solution, the first unit vector between the first contour point and the second contour point in the horizontal direction, and the first projection distance can describe the error between the first contour point and the third contour point in the horizontal direction. Therefore, the method can accurately correct the horizontal axis coordinate value of the first contour point based on the first unit vector, the first projection distance and the horizontal axis coordinate value of the first contour point. The second unit vector between the first contour point and the second contour point in the vertical direction, and the first projection distance can describe the error between the first contour point and the third contour point in the vertical direction. Therefore, the method can accurately correct the vertical axis coordinate value of the first contour point based on the second unit vector, the first projection distance and the vertical axis coordinate value of the first contour point. Similarly, the method can correct the horizontal axis coordinate value of the second contour point based on the first unit vector, the second projection distance and the horizontal axis coordinate value of the second contour point; and can correct the vertical axis coordinate value of the second contour point based on the second unit vector, the second projection distance and the vertical axis coordinate value of the second contour point.
[0025] In combination with the first aspect and the above implementation manner, in some possible implementation manners, based on the first unit vector between the first contour point and the second contour point in the horizontal axis direction, the first projection distance and the horizontal axis coordinate value of the first contour point, correcting the horizontal axis coordinate value of the first contour point includes: correcting the horizontal axis coordinate value of the first contour point based on the following formula;
[0026]
[0027] in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the first contour point is corrected;
[0028] And, based on the second unit vector between the first contour point and the second contour point in the longitudinal direction, the first projection distance and the longitudinal coordinate value of the first contour point, correcting the longitudinal coordinate value of the first contour point comprises: correcting the longitudinal coordinate value of the first contour point based on the following formula;
[0029]
[0030] in, is the vertical axis coordinate value after the vertical axis coordinate value of the first contour point is corrected;
[0031] And, based on the first unit vector, the second projection distance and the horizontal axis coordinate value of the second contour point, correcting the horizontal axis coordinate value of the second contour point includes: correcting the horizontal axis coordinate value of the second contour point based on the following formula;
[0032]
[0033] in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the second contour point is corrected;
[0034] And, based on the second unit vector, the second projection distance and the longitudinal coordinate value of the second contour point, correcting the longitudinal coordinate value of the second contour point comprises: correcting the longitudinal coordinate value of the second contour point based on the following formula;
[0035]
[0036] in, is the vertical axis coordinate value after the vertical axis coordinate value of the second contour point is corrected.
[0037] In the above technical solution, when the first projection distance is less than zero, it indicates that the third contour point is before the first contour point, and the third contour point should coincide with the first contour point or be after the first contour point. Therefore, in this method, x1 and y1 in the first contour point (x1, y1) are increased by a certain value, that is, x1 is increased by And add y1 Get accurately Similarly, when the second projection distance is greater than the second distance threshold, the method increases x2 and y2 in the second contour point (x2, y2) by a certain value, that is, x2 is increased by And add y2 Get accurately That is the sixth contour point.
[0038] In combination with the first aspect and the above-mentioned implementation methods, in some possible implementation methods, the method also includes: determining the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point based on the fifth contour point corrected by the first contour point, the sixth contour point corrected by the second contour point, the position of the first sensor in the vehicle and the world coordinate value of the vehicle; constructing an environmental map around the vehicle based on the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point; and performing path planning for the vehicle based on the environmental map and a preset path planning algorithm to obtain a driving path of the vehicle.
[0039] In the above technical solution, the corrected fifth contour point and the corrected sixth contour point can accurately describe the boundary of the target obstacle. The method constructs an environmental map around the vehicle through the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point, and can simulate the complex environment around the vehicle. Therefore, through the accurate environmental map, the path planning algorithm can more accurately determine the safe distance between the vehicle and the target obstacle, select the optimal driving path, reduce unnecessary detours or sharp turns and unnecessary acceleration and deceleration, and improve driving efficiency and safety.
[0040] In a second aspect, an obstacle detection device is provided, the device comprising: an acquisition module, used to acquire a first contour point and a second contour point of a target obstacle around the vehicle through a first sensor in the vehicle, and to acquire a third contour point corresponding to the first contour point and a fourth contour point corresponding to the second contour point through a second sensor in the vehicle, the first contour point being a boundary point on the target obstacle on a side close to a driving direction of the vehicle, and the second contour point being a boundary point on the target obstacle on a side away from a driving direction of the vehicle; a determination module, used to determine a first projection distance of the third contour point in a target direction, and to determine a second projection distance of the fourth contour point in the target direction, the target direction being a direction from the first contour point to the second contour point; and a correction module, used to correct the first contour point based on the first projection distance and the first contour point, and to correct the second contour point based on the second projection distance and the second contour point, so as to determine a true contour point of the target obstacle.
[0041] In combination with the second aspect, in some possible implementations, the determination module is specifically used to: determine a first horizontal axis offset and a first vertical axis offset of the third contour point relative to the first contour point, the first horizontal axis offset being a displacement deviation of the third contour point relative to the first contour point along the horizontal axis, and the first vertical axis offset being a displacement deviation of the third contour point relative to the first contour point along the vertical axis; determine a second horizontal axis offset and a second vertical axis offset of the fourth contour point relative to the second contour point, the second horizontal axis offset being a displacement deviation of the fourth contour point relative to the second contour point along the horizontal axis, and the second vertical axis offset being a displacement deviation of the fourth contour point relative to the second contour point along the vertical axis. The displacement deviation of the vertical axis; determining the first unit vector and the second unit vector between the first contour point and the second contour point in the horizontal axis direction and the vertical axis direction respectively, the first unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the horizontal direction, and the second unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the vertical direction; based on the first horizontal axis offset, the first vertical axis offset, the first unit vector and the second unit vector, determining the first projection distance; based on the second horizontal axis offset, the second vertical axis offset, the first unit vector and the second unit vector, determining the second projection distance.
[0042] In combination with the second aspect and the above implementations, in some possible implementations, the determination module is further configured to: determine the first projection distance based on the following formula;
[0043]
[0044] Wherein, d1 is the first projection distance, is the first unit vector, x'1 is the first horizontal axis offset, is the second unit vector, y'1 is the first longitudinal axis offset;
[0045] The determination module is further specifically used to: determine the second projection distance based on the following formula;
[0046]
[0047] Wherein, d2 is the second projection distance, x'2 is the second horizontal axis offset, and y'2 is the second vertical axis offset.
[0048] In combination with the second aspect and the above implementation manner, in some possible implementation manners, the determination module is further specifically used to: determine the first unit vector based on the following formula;
[0049]
[0050] Based on the following formula, the second unit vector is determined;
[0051]
[0052] in,
[0053] Wherein, (x1, y1) is the first target coordinate value of the first contour point, (x2, y2) is the second target coordinate value of the second contour point, and d0 is the distance between the first contour point and the second contour point.
[0054] In combination with the second aspect and the above-mentioned implementation manner, in some possible implementation manners, the correction module is specifically used to: when the first projection distance is less than a first distance threshold, based on the first unit vector between the first contour point and the second contour point in the horizontal axis direction, the first projection distance and the horizontal axis coordinate value of the first contour point, correct the horizontal axis coordinate value of the first contour point; and based on the second unit vector between the first contour point and the second contour point in the vertical axis direction, the first projection distance and the vertical axis coordinate value of the first contour point, correct the vertical axis coordinate value of the first contour point; and the correction module is also specifically used to: when the second projection distance is greater than a second distance threshold, based on the first unit vector, the second projection distance and the horizontal axis coordinate value of the second contour point, correct the horizontal axis coordinate value of the second contour point; and based on the second unit vector, the second projection distance and the vertical axis coordinate value of the second contour point, correct the vertical axis coordinate value of the second contour point.
[0055] In combination with the second aspect and the above implementations, in some possible implementations, the correction module is further configured to correct the horizontal axis coordinate value of the first contour point based on the following formula:
[0056]
[0057] in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the first contour point is corrected;
[0058] And, the correction module is specifically used to correct the vertical axis coordinate value of the first contour point based on the following formula;
[0059]
[0060] in, is the vertical axis coordinate value after the vertical axis coordinate value of the first contour point is corrected;
[0061] And, the correction module is specifically used to correct the horizontal axis coordinate value of the second contour point based on the following formula;
[0062]
[0063] in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the second contour point is corrected;
[0064] And, the correction module is specifically used to correct the longitudinal coordinate value of the second contour point based on the following formula;
[0065]
[0066] in, is the vertical axis coordinate value after the vertical axis coordinate value of the second contour point is corrected.
[0067] In combination with the second aspect and the above-mentioned implementation methods, in some possible implementation methods, the determination module is also used to determine the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point based on the fifth contour point corrected by the first contour point, the sixth contour point corrected by the second contour point, the position of the first sensor in the vehicle and the world coordinate value of the vehicle; the device also includes: a construction module, which is used to construct an environmental map around the vehicle based on the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point; the device also includes: a path planning module, which is used to perform path planning for the vehicle based on the environmental map and a preset path planning algorithm to obtain the driving path of the vehicle.
[0068] In a third aspect, a vehicle is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the vehicle executes the method in the first aspect or any possible implementation of the first aspect.
[0069] In a fourth aspect, a computer-readable storage medium is provided, which stores an executable program code. When the executable program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 is a schematic diagram of a scenario of using a vehicle provided in an embodiment of the present application;
[0071] Figure 2 is a schematic flow chart of a method for obstacle detection provided in an embodiment of the present application;
[0072] Figure 3 is a schematic diagram of a target obstacle provided in an embodiment of the present application;
[0073] Figure 4 is a schematic diagram of another target obstacle provided in an embodiment of the present application;
[0074] Figure 5 is a structural schematic diagram of an obstacle detection device provided in an embodiment of the present application;
[0075] Figure 6 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0077] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0078] Figure 1 It is a schematic diagram of a scenario of using a vehicle provided in an embodiment of the present application.
[0079] For example, Figure 1 As shown, vehicle A is moving forward in the direction indicated by a, and there are multiple vehicles around vehicle A, including vehicles in parking spaces, vehicles traveling in the same lane as vehicle A, and vehicles in adjacent lanes of vehicle A. These multiple vehicles will affect the driving safety of vehicle A, and these multiple vehicles can be regarded as obstacle vehicles of vehicle A.
[0080] Vehicle A is equipped with an automatic driving system. Accurately identifying and avoiding obstacles is the key to ensuring the driving safety of vehicle A. The obstacle identification method in the related art often relies only on the radar sensor in vehicle A, which has limited accuracy and coverage. For example, in rainy and snowy weather, rain and snow will affect the propagation of electromagnetic wave signals, reduce the accuracy of radar sensor in identifying obstacles, and thus affect the path planning and driving safety of vehicle A.
[0081] In order to solve the above problems, this application proposes a method for obstacle detection to improve the accuracy of obstacle detection, thereby improving the accuracy of vehicle path planning and the safety of vehicle driving. The specific implementation steps can be found in Figure 2 .
[0082] Figure 2 It is a schematic flow chart of a method for obstacle detection provided in an embodiment of the present application.
[0083] It should be understood that the obstacle detection method provided in the embodiment of the present application can be applied to Figure 1 The vehicle shown (e.g., vehicle A). Specifically, the obstacle detection method can be applied to a target controller in the vehicle. The target controller is any one of a vehicle controller and a body domain controller. The body domain controller is used to control various vehicle components in an autonomous driving system in the vehicle.
[0084] For example, Figure 2 As shown, the method 200 includes:
[0085] In step 201, the vehicle obtains a first contour point and a second contour point of a target obstacle around the vehicle through a first sensor in the vehicle, and obtains a third contour point corresponding to the first contour point and a fourth contour point corresponding to the second contour point through a second sensor in the vehicle, wherein the first contour point is a boundary point on the target obstacle on a side close to the vehicle's driving direction, and the second contour point is a boundary point on the target obstacle on a side away from the vehicle's driving direction.
[0086] It should be understood that the "first sensor" and "second sensor" in the above step 201 are two different sensors in the vehicle. In some embodiments, the first sensor is a radar sensor, and the second sensor is a camera.
[0087] It should also be understood that the "target obstacle" in the above step 201 refers to an obstacle around the vehicle that affects the vehicle's travel. In some embodiments, the target obstacle is a vehicle or pedestrian in front of the vehicle. The "first contour point" in the above step 201 is a boundary point on the target obstacle close to the vehicle, and the "second contour point" is a boundary point on the target obstacle away from the vehicle. In some embodiments, when the target obstacle is an obstacle vehicle in front of the vehicle, the first contour point is the upper left corner endpoint of the left taillight of the obstacle vehicle, and the second contour point is the upper right corner endpoint of the right taillight of the obstacle vehicle. It should also be understood that the contour points can be represented by coordinate values.
[0088] It should also be understood that the "third contour point corresponding to the first contour point" in the above step 201 is used to indicate that the third contour point and the first contour point both refer to boundary points on the same part of the target obstacle. In some embodiments, the third contour point and the first contour point are both the upper left corner endpoints of the left taillight of the obstacle vehicle. The "fourth contour point corresponding to the second contour point" in the above step 201 is used to indicate that the second contour point and the fourth contour point both refer to boundary points on the same part of the target obstacle.
[0089] It should also be understood that the first contour point is obtained by the first sensor and the third contour point is obtained by the second sensor. Although the boundary points on the same part of the target obstacle are obtained, the two sensors obtain coordinate values through different working principles. The two sensors are affected by the environment to different degrees, and the obtained coordinate values are also different. When the first sensor is a radar sensor, the radar sensor detects the coordinates of the upper left corner of the left taillight of the obstacle vehicle by emitting electromagnetic waves and receiving their reflected signals. However, the performance of the radar sensor is reduced under certain environmental conditions (such as rainy and snowy weather and traffic congestion scenes). When the second sensor is a camera, the camera can capture images through an optical system to determine the coordinates of the upper left corner of the left taillight of the obstacle vehicle. However, the visual perception ability of the camera decreases under extreme weather conditions (insufficient light environment and foggy weather, etc.). Therefore, under normal circumstances, the first contour point is different from the third contour point, and the second contour point is different from the fourth contour point. However, the first target coordinate value of the first contour point, the second target coordinate value of the second contour point, the third target coordinate value of the third contour point, and the fourth target coordinate value of the fourth contour point should be converted into coordinate values under the same coordinate system.
[0090] In some embodiments, the first sensor is a radar sensor, and the vehicle in step 201 obtains a first contour point of a target obstacle around the vehicle through the first sensor in the vehicle, including: the vehicle controls the first sensor to transmit an electromagnetic wave signal to the first contour point and receives a reflected signal, and determines the time difference between the reception time of the reflected signal and the transmission time of the electromagnetic wave signal as the propagation time of the electromagnetic wave signal; the vehicle determines the distance between the first sensor and the first contour point based on the product of the propagation time and the propagation speed of the electromagnetic wave signal, and then the ratio to a preset value; the vehicle detects the emission angle information of the electromagnetic wave signal, and determines the first target coordinates of the first contour point in the coordinate system of the first sensor based on the emission angle information and the distance between the first sensor and the first contour point.
[0091] It should be understood that the preset value in the above scheme is 2. The emission angle information in the above scheme includes the first angle between the electromagnetic wave signal and the vertical direction, and the second angle between the electromagnetic wave signal and the horizontal direction. The first target coordinate of the first contour point is B1 (x1, y1). It should also be understood that the process of obtaining the second contour point through the first sensor in the vehicle and the process of obtaining the first contour point through the first sensor in the vehicle are not repeated here. The second target coordinate of the second contour point is B2 (x2, y2).
[0092] In some embodiments, the vehicle determines the first target coordinates of the first contour point in the coordinate system of the first sensor based on the emission angle information and the distance between the first sensor and the first contour point, including: the vehicle determines the first target coordinates based on the following formula (1) and formula (2);
[0093]
[0094] Wherein, d is the distance between the first sensor and the first contour point, θ is the first angle in the emission angle information, is the second included angle in the emission angle information.
[0095] It should be understood that the second sensor is a camera, and the third coordinate B"3 (x"3, y"3) of the third contour point is obtained by the second sensor in the coordinate system of the second sensor, and the third coordinate is converted into the coordinate in the coordinate system of the first sensor to obtain the third target coordinate B3 (x3, y3) of the third contour point. The fourth coordinate of the fourth contour point is B"4 (x"4, y"4), and the fourth target coordinate of the fourth contour point is B4 (x4, y4).
[0096] Figure 3 It is a schematic diagram of a target obstacle provided in an embodiment of the present application.
[0097] For example, taking vehicle A as an example, target obstacles around the vehicle are described. Figure 3 As shown in (a), vehicle A is traveling in the direction indicated by a, and the obstacle vehicle on the left side of vehicle A is traveling in the direction indicated by b. As vehicle A is traveling in the direction indicated by a, point B is closer to vehicle A than point C. Therefore, the first contour point and the second contour point on the vertical obstacle vehicle are point B and point C, respectively.
[0098] like Figure 3 As shown in (b), vehicle A is traveling in the direction indicated by a, and the obstacle vehicle on the left side of vehicle A is traveling in the direction indicated by c. When vehicle A is traveling in the direction indicated by a, point D is closer to vehicle A than point E. Therefore, the first contour point and the second contour point on the parallel obstacle vehicle are point D and point E, respectively.
[0099] like Figure 3 As shown in (c), vehicle A is traveling in the direction indicated by a, and the obstacle vehicle on the left side of vehicle A is traveling in the direction indicated by d. When vehicle A is traveling in the direction indicated by a, point F is closer to vehicle A than point G. Therefore, the first contour point and the second contour point on the oblique obstacle vehicle are point F and point G, respectively.
[0100] Step 202 : The vehicle determines a first projection distance of the third contour point in a target direction, and determines a second projection distance of the fourth contour point in the target direction, where the target direction is a direction from the first contour point to the second contour point.
[0101] It should be understood that the "projected distance of the contour point in the target direction" in the above step 202 is used to describe the linear position of the contour point relative to the target direction. The projected distance indicates how close the contour point is to the linear distance corresponding to the target direction when considering the route from the first contour point to the second contour point.
[0102] It should also be understood that the relative position between the third contour point and the first contour point, and the relative position between the fourth contour point and the second contour point can be determined by the first projection distance and the second projection distance.
[0103] In a possible implementation, the vehicle in step 202 determines a first projection distance of the third contour point in a target direction, and determines a second projection distance of the fourth contour point in the target direction, including: the vehicle determines a first transverse axis offset and a first longitudinal axis offset of the third contour point relative to the first contour point, the first transverse axis offset being a displacement deviation of the third contour point relative to the first contour point along the horizontal axis, and the first longitudinal axis offset being a displacement deviation of the third contour point relative to the first contour point along the vertical axis; the vehicle determines a second transverse axis offset and a second longitudinal axis offset of the fourth contour point relative to the second contour point, the second transverse axis offset being a displacement deviation of the fourth contour point relative to the second contour point along the horizontal axis, and the second longitudinal axis offset being a displacement deviation of the fourth contour point relative to the second contour point along the vertical axis. The displacement is the displacement deviation of the fourth contour point relative to the second contour point along the vertical axis; the vehicle determines the first unit vector and the second unit vector between the first contour point and the second contour point in the horizontal axis direction and the vertical axis direction respectively, the first unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the horizontal direction, and the second unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the vertical direction; the vehicle determines the first projection distance based on the first horizontal axis offset, the first vertical axis offset, the first unit vector and the second unit vector; the vehicle determines the second projection distance based on the second horizontal axis offset, the second vertical axis offset, the first unit vector and the second unit vector.
[0104] It should be understood that the "first unit vector and the second unit vector in the horizontal and vertical directions between the first contour point and the second contour point" in the above scheme are used to describe the relative position and direction of the first contour point and the second contour point in the horizontal direction, and to describe the relative position and direction of the first contour point and the second contour point in the vertical direction. The relative position refers to the height difference (or horizontal difference) between the two contour points in the vertical direction (or horizontal direction). The direction refers to the arrangement order of the two contour points in the vertical direction (or horizontal direction). In some embodiments, the first contour point is above the second contour point.
[0105] In the above technical solution, the horizontal axis offset and the vertical axis offset can determine the positional relationship between the third contour point and the fourth contour point and the first contour point and the second contour point on the two-dimensional plane. Therefore, the method determines the first horizontal axis offset and the first vertical axis offset of the third contour point relative to the first contour point in the horizontal axis direction and the vertical axis direction, and the second horizontal axis offset and the second vertical axis offset of the fourth contour point relative to the second contour point in the horizontal axis direction and the vertical axis direction. In addition, the target direction in the method is used to indicate the direction from the first contour point to the second contour point. The unit vector is used to represent the direction from the first point to the second point, which is used to standardize the direction and help to scale the offset according to the accurate ratio. Therefore, the method can accurately determine the first projection distance of the third contour point in the target direction and the second projection distance of the fourth contour point in the target direction through the offset and the unit vector.
[0106] In a possible implementation, the vehicle determines a first unit vector and a second unit vector between the first contour point and the second contour point in the horizontal axis direction and the vertical axis direction respectively, including: the vehicle determines the first unit vector based on the following formula (3);
[0107]
[0108] The vehicle determines the second unit vector based on the following formula (4);
[0109]
[0110] Wherein, (x1, y1) is the first target coordinate value of the first contour point, (x2, y2) is the second target coordinate value of the second contour point, and d0 is the distance between the first contour point and the second contour point.
[0111] In a possible implementation, the vehicle determines the first projection distance based on the first transverse axis offset, the first longitudinal axis offset, the first unit vector and the second unit vector, including: the vehicle determines the first projection distance based on the following formula (6);
[0112]
[0113] Wherein, d1 is the first projection distance, is the first unit vector, x'1 is the first horizontal axis offset, is the second unit vector, y'1 is the first longitudinal axis offset;
[0114] And, the vehicle determines the second projection distance based on the second transverse axis offset, the second longitudinal axis offset, the first unit vector and the second unit vector, including: the vehicle determines the second projection distance based on the following formula (7);
[0115]
[0116] Wherein, d2 is the second projection distance, x'2 is the second horizontal axis offset, and y'2 is the second vertical axis offset.
[0117] It should be understood that in the above solution, the projection distance is determined by the dot product between the offset and the unit vector. It should also be understood that the first projection distance d1 in the above solution is The dot product between (x'1, y'1), that is Similarly,
[0118] In the above technical solution, the first projection distance and the second projection distance of the third contour point and the fourth contour point in the target direction are determined directly by the dot product method between the offset and the unit vector. Compared with the Pythagorean theorem calculation, this dot product operation method can simplify the calculation and is more efficient. In actual driving scenarios, this can enable the vehicle to quickly process large amounts of data and reduce processing delays, which is especially useful in emergency obstacle avoidance scenarios. It can provide the vehicle with more sufficient preparation time and significantly improve driving safety. Furthermore, the dot product operation method can avoid the accumulation of errors that may be introduced in the middle of the calculation steps, thereby improving the accuracy of the projection distance. In actual vehicle use scenarios, the perception accuracy of the position of the target obstacle can be improved to ensure that the vehicle can more accurately identify the surrounding environment. In addition, this dot product operation is implemented in a geometric way, which is easier to understand. It is not only applicable to two-dimensional space, but also to three-dimensional or even higher-dimensional space. In complex driving scenarios (such as narrow streets or complex intersections), the vehicle can accurately judge the relative spatial position between the target obstacle through precise obstacle detection and distance judgment, providing more accurate data for obstacle avoidance and path planning, helping the vehicle to quickly adapt to the current driving scenario and enhance the reliability of driving decisions.
[0119] Figure 4 It is a schematic diagram of another target obstacle provided in an embodiment of the present application.
[0120] For example, taking vehicle A as an example, target obstacles around the vehicle are described. Figure 4 As shown in (a) in the figure, vehicle A is traveling in the direction indicated by a, and the obstacle vehicle on the left side of vehicle A is traveling in the direction indicated by b. As vehicle A is traveling in the direction indicated by a, point B is closer to vehicle A than point C. Therefore, the first contour point and the second contour point on the vertical obstacle vehicle are point B and point C, respectively. In addition, the unit vector between the first contour point and the second contour point is The left direction of the vertical obstacle vehicle is a first direction away from the driving direction of vehicle A, and the right direction of the vertical obstacle vehicle is a second direction close to the driving direction of vehicle A.
[0121] like Figure 4 As shown in (b), vehicle A is traveling in the direction indicated by a, and the obstacle vehicle on the left side of vehicle A is traveling in the direction indicated by c. When vehicle A is traveling in the direction indicated by a, point D is closer to vehicle A than point E. Therefore, the first contour point and the second contour point on the parallel obstacle vehicle are point D and point E, respectively. In addition, the unit vector between the first contour point and the second contour point is The rear direction of the parallel obstacle vehicle is a second direction away from the driving direction of vehicle A, and the front direction of the parallel obstacle vehicle is a first direction close to the driving direction of vehicle A.
[0122] like Figure 4 As shown in (c), vehicle A is traveling in the direction indicated by a, and the obstacle vehicle on the left side of vehicle A is traveling in the direction indicated by d. When vehicle A is traveling in the direction indicated by a, point F is closer to vehicle A than point G. Therefore, the first contour point and the second contour point on the oblique obstacle vehicle are point F and point G, respectively. In addition, the unit vector between the first contour point and the second contour point is The left direction of the oblique obstacle vehicle is the second direction away from the driving direction of vehicle A, and the right direction of the oblique obstacle vehicle is the first direction close to the driving direction of vehicle A.
[0123] In step 203, the vehicle corrects the first contour point based on the first projection distance and the first contour point, and corrects the second contour point based on the second projection distance and the second contour point to determine the real contour point of the target obstacle.
[0124] It should be understood that in the above step 203, the "first projection distance" can determine the relative position between the third contour point and the first contour point. When the first projection distance is less than zero, it indicates that the third contour point is before the first contour point. The third contour point should coincide with the first contour point or be after the first contour point precisely because the first contour point is a boundary point on the target obstacle close to the driving direction of the vehicle. During the driving process of the vehicle, the third contour point collected by the second sensor may fall on the first contour point or may fall after the first contour point. Therefore, the first contour point should be corrected based on the first projection distance and the first contour point. The "second projection distance" can determine the relative position between the fourth contour point and the second contour point. When the second projection distance is greater than the first distance, it indicates that the fourth contour point is after the second contour point. The third contour point should coincide with the first contour point or be after the first contour point precisely because the second contour point is a boundary point on the target obstacle away from the driving direction of the vehicle. During the driving process of the vehicle, the fourth contour point collected by the second sensor may fall on the second contour point or may fall before the second contour point. Therefore, the second contour point should be corrected based on the second projection distance and the second contour point. The first distance is the straight-line distance between the first contour point and the second contour point. Therefore, after correcting the first contour point and the second contour point, the true contour points of the target obstacle (hereinafter referred to as the fifth contour point and the sixth contour point) can be obtained.
[0125] In a possible implementation, the vehicle in step 203 corrects the first contour point based on the first projection distance and the first contour point, including: when the first projection distance is less than a first distance threshold, the vehicle corrects the horizontal coordinate value of the first contour point based on the first unit vector in the horizontal direction between the first contour point and the second contour point, the first projection distance and the horizontal coordinate value of the first contour point; and corrects the vertical coordinate value of the first contour point based on the second unit vector in the vertical direction between the first contour point and the second contour point, the first projection distance and the vertical coordinate value of the first contour point; and, the vehicle corrects the second contour point based on the second projection distance and the second contour point in step 203, including: when the second projection distance is greater than a second distance threshold, the vehicle corrects the horizontal coordinate value of the second contour point based on the first unit vector, the second projection distance and the horizontal coordinate value of the second contour point; and corrects the vertical coordinate value of the second contour point based on the second unit vector, the second projection distance and the vertical coordinate value of the second contour point.
[0126] It should be understood that the "first distance threshold" in the above solution is 0 in the above solution. The "second distance threshold" in the above solution is the first distance in the above solution, specifically the straight-line distance between the first contour point and the second contour point.
[0127] In the above technical solution, the first unit vector between the first contour point and the second contour point in the horizontal direction, and the first projection distance can describe the error between the first contour point and the third contour point in the horizontal direction. Therefore, the method can accurately correct the horizontal axis coordinate value of the first contour point based on the first unit vector, the first projection distance and the horizontal axis coordinate value of the first contour point. The second unit vector between the first contour point and the second contour point in the vertical direction, and the first projection distance can describe the error between the first contour point and the third contour point in the vertical direction. Therefore, the method can accurately correct the vertical axis coordinate value of the first contour point based on the second unit vector, the first projection distance and the vertical axis coordinate value of the first contour point. Similarly, the method can correct the horizontal axis coordinate value of the second contour point based on the first unit vector, the second projection distance and the horizontal axis coordinate value of the second contour point; and can correct the vertical axis coordinate value of the second contour point based on the second unit vector, the second projection distance and the vertical axis coordinate value of the second contour point.
[0128] In a possible implementation, the vehicle corrects the horizontal axis coordinate value of the first contour point based on the first unit vector between the first contour point and the second contour point in the horizontal axis direction, the first projection distance and the horizontal axis coordinate value of the first contour point, including: the vehicle corrects the horizontal axis coordinate value of the first contour point based on the following formula (8);
[0129]
[0130] in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the first contour point is corrected;
[0131] And, the vehicle corrects the longitudinal coordinate value of the first contour point based on the second unit vector between the first contour point and the second contour point in the longitudinal direction, the first projection distance and the longitudinal coordinate value of the first contour point, including: the vehicle corrects the longitudinal coordinate value of the first contour point based on the following formula (9);
[0132]
[0133] in, is the vertical axis coordinate value after the vertical axis coordinate value of the first contour point is corrected;
[0134] And, the vehicle corrects the horizontal axis coordinate value of the second contour point based on the first unit vector, the second projection distance and the horizontal axis coordinate value of the second contour point, including: the vehicle corrects the horizontal axis coordinate value of the second contour point based on the following formula (10);
[0135]
[0136] in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the second contour point is corrected;
[0137] And, the vehicle corrects the longitudinal coordinate value of the second contour point based on the second unit vector, the second projection distance and the longitudinal coordinate value of the second contour point, including: the vehicle corrects the longitudinal coordinate value of the second contour point based on the following formula (11);
[0138]
[0139] in, is the vertical axis coordinate value after the vertical axis coordinate value of the second contour point is corrected.
[0140] In the above technical solution, when the first projection distance is less than zero, it indicates that the third contour point is before the first contour point, and the third contour point should coincide with the first contour point or be after the first contour point. Therefore, in this method, x1 and y1 in the first contour point (x1, y1) are increased by a certain value, that is, x1 is increased by And add y1 Get accurately Similarly, when the second projection distance is greater than the second distance threshold, the method increases x2 and y2 in the second contour point (x2, y2) by a certain value, that is, x2 is increased by And add y2 Get accurately That is the sixth contour point.
[0141] In a possible implementation, after step 203, the method 200 further includes: the vehicle determines the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point based on the fifth contour point corrected by the first contour point, the sixth contour point corrected by the second contour point, the position of the first sensor in the vehicle, and the world coordinate value of the vehicle; the vehicle constructs an environmental map around the vehicle based on the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point; the vehicle performs path planning on the vehicle based on the environmental map and a preset path planning algorithm to obtain a driving path of the vehicle.
[0142] It should be understood that in the above technical solution, the coordinate value of the first sensor can be determined based on the position of the first sensor in the vehicle and the world coordinate value of the vehicle. The coordinate value of the fifth contour point and the coordinate value of the sixth contour point are the coordinates in the coordinate system of the first sensor. Among them, the horizontal axis value of the coordinate value of the fifth contour point is The vertical axis value is The vertical axis value may be determined based on the distance between the first sensor and the first contour point, the first angle, and the second angle. Optionally, the vertical axis value in the coordinate value of the fifth contour point is That is, the coordinate value of the fifth contour point is The horizontal axis value of the coordinate value of the sixth contour point is The vertical axis value is The vertical axis value can be determined based on the distance between the first sensor and the first contour point, the third angle β and the fourth angle γ, the third angle refers to the angle between the electromagnetic wave signal and the vertical direction when the first sensor transmits the electromagnetic wave signal to the second contour point, the fourth angle refers to the angle between the electromagnetic wave signal and the horizontal direction when the first sensor transmits the electromagnetic wave signal to the second contour point, and the vertical axis value in the coordinate value of the sixth contour point is That is, the coordinate value of the sixth contour point is
[0143] In the above technical solution, the corrected fifth contour point and the corrected sixth contour point can accurately describe the boundary of the target obstacle. The method constructs an environmental map around the vehicle through the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point, and can simulate the complex environment around the vehicle. Therefore, through the accurate environmental map, the path planning algorithm can more accurately determine the safe distance between the vehicle and the target obstacle, select the optimal driving path, reduce unnecessary detours or sharp turns and unnecessary acceleration and deceleration, and improve driving efficiency and safety.
[0144] In some embodiments, the vehicle determines the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point based on the fifth contour point corrected by the first contour point, the sixth contour point corrected by the second contour point, the position of the first sensor in the vehicle and the world coordinate value of the vehicle, including: the vehicle determines the world coordinate value of the first sensor based on the position of the first sensor in the vehicle and the world coordinate value of the vehicle; the vehicle determines the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point based on the world coordinate value of the first sensor, the coordinate value of the fifth contour point and the coordinate value of the sixth contour point.
[0145] It should be understood that the "world coordinate value of the vehicle" in the above solution specifically refers to the world coordinate value of the target reference point in the vehicle, and the target reference point is usually the center of the rear axle of the vehicle. The "position of the first sensor in the vehicle" in the above solution specifically refers to the position of the first sensor relative to the target reference point.
[0146] It should also be understood that the “coordinate value of the fifth contour point” and the “coordinate value of the sixth contour point” in the above solution refer to the coordinate values in the coordinate system of the first sensor.
[0147] In some embodiments, the vehicle determines the world coordinate value of the fifth contour point based on the world coordinate value of the first sensor and the coordinate value of the fifth contour point, including: the vehicle determines the world coordinate value of the fifth contour point based on the following formula (12);
[0148]
[0149] in, is the world coordinate value of the fifth contour point, R is the rotation matrix of the coordinate system of the first sensor relative to the world coordinate system, is the translation vector from the coordinate system of the first sensor to the world coordinate system, specifically the world coordinate value of the first sensor, is the coordinate value of the fifth contour point in the coordinate system of the first sensor. It should be understood that the process of determining the world coordinate value of the sixth contour point based on the world coordinate value of the first sensor and the coordinate value of the sixth contour point is similar to the process of determining the world coordinate value of the fifth contour point based on the world coordinate value of the first sensor and the coordinate value of the fifth contour point by the vehicle, and will not be repeated here.
[0150] In some embodiments, the vehicle constructs an environmental map around the vehicle based on the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point, including: the vehicle obtains a target map of preset accuracy around the vehicle, and divides the target map according to preset areas to obtain a grid map, and the preset area indicates a grid in the grid map; the vehicle projects the fifth contour point and the sixth contour point in the grid map based on the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point, and determines the grid corresponding to the projection position as an obstacle grid; the vehicle increases the height of the corresponding obstacle grid based on the vertical axis value in the world coordinate value of the fifth contour point and the vertical axis value in the world coordinate value of the sixth contour point to obtain the environmental map around the vehicle.
[0151] It should be understood that the “environment map” in the above scheme can be regarded as a voxel map.
[0152] In some embodiments, the vehicle performs path planning on the vehicle based on the environmental map and a preset path planning algorithm to obtain a driving path of the vehicle, including: the vehicle determines multiple candidate paths to the end point through the free space in the environmental map starting from a starting point based on the path planning algorithm; the vehicle determines the driving costs corresponding to the multiple candidate paths based on the path planning algorithm; the vehicle determines the candidate path corresponding to the lowest driving cost as the driving path of the vehicle.
[0153] It should be understood that the "free space in the environment map" in the above scheme refers to the area in the environment map that is not marked as an obstacle grid. The "travel cost" in the above scheme includes the time cost, energy cost, distance cost, environmental cost and travel expenses corresponding to the candidate path. Among them, the environmental cost refers to the impact of environmental factors such as air quality and noise pollution in the environment of the candidate path when the vehicle passes through the candidate path on the vehicle user.
[0154] Figure 5 It is a structural schematic diagram of an obstacle detection device provided in an embodiment of the present application.
[0155] For example, Figure 5 As shown, the device 500 includes:
[0156] Acquisition module 501: used to acquire a first contour point and a second contour point of a target obstacle around the vehicle through a first sensor in the vehicle, and acquire a third contour point corresponding to the first contour point and a fourth contour point corresponding to the second contour point through a second sensor in the vehicle, wherein the first contour point is a boundary point on the target obstacle close to the driving direction of the vehicle, and the second contour point is a boundary point on the target obstacle away from the driving direction of the vehicle;
[0157] Determining module 502: used to determine a first projection distance of the third contour point in a target direction, and determine a second projection distance of the fourth contour point in the target direction, where the target direction is a direction from the first contour point to the second contour point;
[0158] Correction module 503: used to correct the first contour point based on the first projection distance and the first contour point, and to correct the second contour point based on the second projection distance and the second contour point, so as to determine the real contour point of the target obstacle.
[0159] Optionally, the determination module 502 is specifically used to: determine a first horizontal axis offset and a first vertical axis offset of the third contour point relative to the first contour point, the first horizontal axis offset being the displacement deviation of the third contour point relative to the first contour point along the horizontal axis, and the first vertical axis offset being the displacement deviation of the third contour point relative to the first contour point along the vertical axis; determine a second horizontal axis offset and a second vertical axis offset of the fourth contour point relative to the second contour point, the second horizontal axis offset being the displacement deviation of the fourth contour point relative to the second contour point along the horizontal axis, and the second vertical axis offset being the displacement deviation of the fourth contour point relative to the second contour point along the vertical axis. Deviation; determine the first unit vector and the second unit vector between the first contour point and the second contour point in the horizontal direction and the vertical direction respectively, the first unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the horizontal direction, and the second unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the vertical direction; based on the first horizontal axis offset, the first vertical axis offset, the first unit vector and the second unit vector, determine the first projection distance; based on the second horizontal axis offset, the second vertical axis offset, the first unit vector and the second unit vector, determine the second projection distance.
[0160] Optionally, the determination module 502 is further configured to: determine the first projection distance based on the following formula;
[0161]
[0162] Wherein, d1 is the first projection distance, is the first unit vector, x'1 is the first horizontal axis offset, is the second unit vector, y'1 is the first longitudinal axis offset;
[0163] The determination module 502 is further specifically configured to: determine the second projection distance based on the following formula;
[0164]
[0165] Wherein, d2 is the second projection distance, x'2 is the second horizontal axis offset, and y'2 is the second vertical axis offset.
[0166] Optionally, the determination module 502 is further specifically configured to: determine the first unit vector based on the following formula;
[0167]
[0168] Based on the following formula, the second unit vector is determined;
[0169]
[0170] in,
[0171] Wherein, (x1, y1) is the first target coordinate value of the first contour point, (x2, y2) is the second target coordinate value of the second contour point, and d0 is the distance between the first contour point and the second contour point.
[0172] Optionally, the correction module 503 is specifically used to: when the first projection distance is less than a first distance threshold, based on the first unit vector between the first contour point and the second contour point in the horizontal direction, the first projection distance and the horizontal coordinate value of the first contour point, correct the horizontal coordinate value of the first contour point; and based on the second unit vector between the first contour point and the second contour point in the vertical direction, the first projection distance and the vertical coordinate value of the first contour point, correct the vertical coordinate value of the first contour point; and, the correction module 503 is also specifically used to: when the second projection distance is greater than a second distance threshold, based on the first unit vector, the second projection distance and the horizontal coordinate value of the second contour point, correct the horizontal coordinate value of the second contour point; and based on the second unit vector, the second projection distance and the vertical coordinate value of the second contour point, correct the vertical coordinate value of the second contour point.
[0173] Optionally, the correction module 503 is further configured to correct the horizontal axis coordinate value of the first contour point based on the following formula:
[0174]
[0175] in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the first contour point is corrected;
[0176] And, the correction module 503 is further specifically used to correct the vertical axis coordinate value of the first contour point based on the following formula;
[0177]
[0178] in, is the vertical axis coordinate value after the vertical axis coordinate value of the first contour point is corrected;
[0179] And, the correction module 503 is further specifically used to correct the horizontal axis coordinate value of the second contour point based on the following formula;
[0180]
[0181] in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the second contour point is corrected;
[0182] And, the correction module 503 is further specifically used to correct the vertical axis coordinate value of the second contour point based on the following formula;
[0183]
[0184] in, is the vertical axis coordinate value after the vertical axis coordinate value of the second contour point is corrected.
[0185] Optionally, the determination module 502 is also used to determine the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point based on the fifth contour point corrected by the first contour point, the sixth contour point corrected by the second contour point, the position of the first sensor in the vehicle and the world coordinate value of the vehicle; the device 500 also includes: a construction module, which is used to construct an environmental map around the vehicle based on the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point; the device 500 also includes: a path planning module, which is used to perform path planning for the vehicle based on the environmental map and a preset path planning algorithm to obtain the driving path of the vehicle.
[0186] Figure 6 It is a structural schematic diagram of a vehicle provided in an embodiment of the present application.
[0187] For example, Figure 6 As shown, the vehicle 600 includes: a memory 601 and a processor 602, wherein the memory 601 stores an executable program code 603, and the processor 602 is used to call and execute the executable program code 603 to perform an obstacle detection method.
[0188] In addition, an embodiment of the present application also protects a device, which may include a memory and a processor, wherein the memory stores an executable program code, and the processor is used to call and execute the executable program code to perform an obstacle detection method provided in an embodiment of the present application.
[0189] In this embodiment, the functional modules of the device can be divided according to the above method example. For example, each functional module can be corresponded, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0190] In the case of dividing each functional module according to each function, the device may also include an acquisition module, a determination module, a correction module, a construction module, and a path planning module, etc. It should be noted that all relevant contents involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.
[0191] It should be understood that the device provided in this embodiment is used to execute the above-mentioned obstacle detection method, and thus can achieve the same effect as the above-mentioned implementation method.
[0192] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a vehicle, the processing module may be used to control and manage the actions of the vehicle. The storage module may be used to support the vehicle in executing related executable program codes, etc.
[0193] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits shown in conjunction with the disclosure of the present application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.
[0194] In addition, the device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the chip may include a connected processor and a memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a method for obstacle detection provided in the above embodiments.
[0195] This embodiment also provides a computer-readable storage medium, in which an executable program code is stored. When the executable program code is run on a computer, the computer executes the above-mentioned related method steps to implement an obstacle detection method provided in the above embodiment.
[0196] This embodiment further provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute the above-mentioned related steps to implement an obstacle detection method provided by the above-mentioned embodiment.
[0197] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be repeated here.
[0198] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0199] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0200] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for obstacle detection, characterized in that: The method comprises: Acquire a first contour point and a second contour point of a target obstacle around the vehicle through a first sensor in the vehicle, and acquire a third contour point corresponding to the first contour point and a fourth contour point corresponding to the second contour point through a second sensor in the vehicle, wherein the first contour point is a boundary point on the target obstacle on a side close to the vehicle's driving direction, and the second contour point is a boundary point on the target obstacle on a side away from the vehicle's driving direction; Determine a first projection distance of the third contour point in a target direction, and determine a second projection distance of the fourth contour point in the target direction, wherein the target direction is a direction from the first contour point to the second contour point; The first contour points are corrected based on the first projection distance and the first contour points, and the second contour points are corrected based on the second projection distance and the second contour points to determine the true contour points of the target obstacle.
2. The method according to claim 1, characterized in that The determining of the first projection distance of the third contour point in the target direction and the determining of the second projection distance of the fourth contour point in the target direction include: Determine a first horizontal axis offset and a first vertical axis offset of the third contour point relative to the first contour point, wherein the first horizontal axis offset is a displacement deviation of the third contour point relative to the first contour point along the horizontal axis, and the first vertical axis offset is a displacement deviation of the third contour point relative to the first contour point along the vertical axis; Determine a second horizontal axis offset and a second vertical axis offset of the fourth contour point relative to the second contour point, wherein the second horizontal axis offset is a displacement deviation of the fourth contour point relative to the second contour point along the horizontal axis, and the second vertical axis offset is a displacement deviation of the fourth contour point relative to the second contour point along the vertical axis; Determine a first unit vector and a second unit vector between the first contour point and the second contour point in the horizontal direction and the vertical direction, respectively, wherein the first unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the horizontal direction, and the second unit vector is used to describe the relative position and direction of the first contour point and the second contour point in the vertical direction; Determine the first projection distance based on the first horizontal axis offset, the first vertical axis offset, the first unit vector, and the second unit vector; The second projection distance is determined based on the second transverse axis offset, the second longitudinal axis offset, the first unit vector, and the second unit vector.
3. The method according to claim 2, characterized in that The determining the first projection distance based on the first horizontal axis offset, the first vertical axis offset, the first unit vector, and the second unit vector includes: Based on the following formula, determine the first projection distance; Wherein, d1 is the first projection distance, is the first unit vector, x ’ 1 is the first horizontal axis offset, is the second unit vector, y ’ 1 is the first longitudinal axis offset; And, determining the second projection distance based on the second horizontal axis offset, the second vertical axis offset, the first unit vector and the second unit vector includes: Based on the following formula, the second projection distance is determined; Wherein, d2 is the second projection distance, x ’ 2 is the second horizontal axis offset, y ’ 2 is the second longitudinal axis offset.
4. The method according to claim 2, characterized in that: The determining of a first unit vector and a second unit vector in the horizontal axis direction and the vertical axis direction respectively between the first contour point and the second contour point comprises: Based on the following formula, determine the first unit vector; Based on the following formula, determine the second unit vector; in, Among them, (x1, y1) is the first target coordinate value of the first contour point, (x2, y2) is the second target coordinate value of the second contour point, and d0 is the distance between the first contour point and the second contour point.
5. The method according to claim 1, characterized in that The correcting the first contour point based on the first projection distance and the first contour point includes: When the first projection distance is less than a first distance threshold, based on a first unit vector in the horizontal direction between the first contour point and the second contour point, the first projection distance and the horizontal coordinate value of the first contour point, the horizontal coordinate value of the first contour point is corrected; and based on a second unit vector in the vertical direction between the first contour point and the second contour point, the first projection distance and the vertical coordinate value of the first contour point, the vertical coordinate value of the first contour point is corrected; And, the correcting the second contour point based on the second projection distance and the second contour point includes: When the second projection distance is greater than a second distance threshold, the horizontal axis coordinate value of the second contour point is corrected based on the first unit vector, the second projection distance and the horizontal axis coordinate value of the second contour point; and the vertical axis coordinate value of the second contour point is corrected based on the second unit vector, the second projection distance and the vertical axis coordinate value of the second contour point.
6. The method according to claim 5, characterized in that The correcting the horizontal axis coordinate value of the first contour point based on the first unit vector between the first contour point and the second contour point in the horizontal axis direction, the first projection distance and the horizontal axis coordinate value of the first contour point includes: Based on the following formula, the horizontal axis coordinate value of the first contour point is corrected; in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the first contour point is corrected; And, the correcting the longitudinal coordinate value of the first contour point based on the second unit vector between the first contour point and the second contour point in the longitudinal direction, the first projection distance and the longitudinal coordinate value of the first contour point comprises: Based on the following formula, the vertical axis coordinate value of the first contour point is corrected; in, is the longitudinal coordinate value after the longitudinal coordinate value of the first contour point is corrected; And, the correcting the horizontal axis coordinate value of the second contour point based on the first unit vector, the second projection distance and the horizontal axis coordinate value of the second contour point includes: Based on the following formula, the horizontal axis coordinate value of the second contour point is corrected; in, is the horizontal axis coordinate value after the horizontal axis coordinate value of the second contour point is corrected; And, the correcting the longitudinal coordinate value of the second contour point based on the second unit vector, the second projection distance and the longitudinal coordinate value of the second contour point comprises: Based on the following formula, the vertical axis coordinate value of the second contour point is corrected; in, is the longitudinal coordinate value after the longitudinal coordinate value of the second contour point is corrected.
7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Determine the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point based on a fifth contour point corrected by the first contour point, a sixth contour point corrected by the second contour point, a position of the first sensor in the vehicle, and a world coordinate value of the vehicle; constructing an environment map around the vehicle based on the world coordinate value of the fifth contour point and the world coordinate value of the sixth contour point; Based on the environment map and a preset path planning algorithm, a path planning is performed on the vehicle to obtain a driving path of the vehicle.
8. An obstacle detection device, characterized in that: The device comprises: an acquisition module, configured to acquire a first contour point and a second contour point of a target obstacle around the vehicle through a first sensor in the vehicle, and to acquire a third contour point corresponding to the first contour point and a fourth contour point corresponding to the second contour point through a second sensor in the vehicle, wherein the first contour point is a boundary point on the target obstacle on a side close to a driving direction of the vehicle, and the second contour point is a boundary point on the target obstacle on a side away from a driving direction of the vehicle; a determination module, configured to determine a first projection distance of the third contour point in a target direction, and determine a second projection distance of the fourth contour point in the target direction, wherein the target direction is a direction from the first contour point to the second contour point; A correction module is used to correct the first contour point based on the first projection distance and the first contour point, and to correct the second contour point based on the second projection distance and the second contour point, so as to determine the real contour point of the target obstacle.
9. A vehicle, characterized in that: The vehicle comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the vehicle executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores an executable program code, and when the executable program code is executed, the method according to any one of claims 1 to 7 is implemented.