Obstacle collision detection method and device and unmanned vehicle
By constructing the hierarchical spatial index structure and normal detection range of obstacle data, the misjudgment problem of obstacle detection in mine unmanned driving is solved, and accurate collision detection of irregular-shaped obstacles is achieved, which improves the driving safety and space utilization efficiency of unmanned vehicles.
Patent Information
- Application Number
- CN202510764286.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-06-10
AI Technical Summary
The existing obstacle collision detection methods cannot accurately detect irregular obstacles in mine unmanned driving scenarios, resulting in misjudgment or waste of space and unable to effectively utilize the passage space.
By constructing a hierarchical spatial index structure of obstacle data, such as kd-tree, combined with the first detection range and spatial overlap judgment in the normal direction, it is determined whether the unmanned vehicle and the obstacle will collide.
Accurate collision detection of obstacles of various shapes is achieved, avoiding misjudgment, maximizing the use of pass space, and improving the driving smoothness and safety of unmanned vehicles.
Smart Images

Figure CN120270240A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of driverless technologies, and in particular, to a method and device for collision detection of obstacles and a driverless vehicle. Background Art
[0002] The operation scenarios of driverless mining are relatively complex, and there are often various obstacles with irregular shapes, such as large falling rocks, soil piles, retaining walls, etc. In the traditional method, methods such as sphere envelope, AABB box envelope, OBB box envelope, and constructing a grid map are used for collision detection of obstacles. However, using the sphere envelope method will cause areas where there is actually no collision to be misdetected as having a collision, resulting in the vehicle being unable to pass. Using the AABB box envelope method will generate a large area of non-drivable areas in narrow scenarios in mines, resulting in waste of space. Using the OBB box envelope method for concave polygon irregular obstacles cannot obtain effective collision detection results. Using the method of constructing a grid map has a huge computational amount and does not have attributes such as tracking, which is not convenient for other modules to use.
[0003] Based on the above problems, there is an urgent need to provide a method for obstacle collision detection to accurately and effectively detect collisions of obstacles with various shapes. Summary of the Invention
[0004] Embodiments of the present disclosure provide a method and device for collision detection of obstacles and a driverless vehicle to solve the problem that existing methods cannot effectively detect collisions with irregularly shaped obstacles.
[0005] Based on the above problems, in a first aspect, a method for collision detection of obstacles provided by an embodiment of the present disclosure includes: During the driving process, the driverless vehicle detects obstacles and stores the detected obstacle data according to a preset data structure; Traverse the trajectory points on the driving trajectory in front of the driverless vehicle. For each trajectory point, determine the normal direction of the driving trajectory at this trajectory point and the first detection range along the normal direction corresponding to this trajectory point; According to the first detection ranges respectively corresponding to each trajectory point, search for the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that overlaps with any first detection range in space; In the case of spatial overlap, determine whether the driverless vehicle and the obstacle will collide according to the position of the spatial overlap.
[0006] In combination with the first aspect, in a possible implementation manner, the step of, for each trajectory point, determining the normal direction of the driving trajectory at this trajectory point and the first detection range along the normal direction corresponding to this trajectory point includes: For each trajectory point, determine the normal direction of the driving trajectory at this trajectory point and the first detection segment of this trajectory point along the normal direction; wherein, the length of the first detection segment is related to a preset detection boundary; Searching for the obstacle data in the storage space of the obstacle data according to the first detection ranges respectively corresponding to the trajectory points to determine whether there is any obstacle data that spatially overlaps with any of the first detection ranges includes: Discretize the first detection segments respectively corresponding to the trajectory points to determine a plurality of first detection points located on each first detection segment; For each first detection point, search for the obstacle data in the storage space of the obstacle data based on the hierarchical spatial index structure of the obstacle data to determine whether there is a spatial overlap between this first detection point and the obstacle data; Wherein, the hierarchical spatial index structure of the obstacle data is related to the preset data structure based on which the obstacles are stored.
[0007] Combined with the first aspect, in a possible implementation manner, the searching for the obstacle data in the storage space of the obstacle data based on the hierarchical spatial index structure of the obstacle data for each first detection point to determine whether there is a spatial overlap between this first detection point and the obstacle data includes: Traverse the first detection points of each first detection segment. For each first detection point, determine the regional position coordinates of the area covered by this first detection point; According to the hierarchical spatial index structure of the obstacle data, search for the position coordinates of the obstacles included in the obstacle data in the storage space of the obstacle data by means of range search to determine whether there is any obstacle data within the range of the regional position coordinates; If so, determine that there is a spatial overlap between this first detection point and the obstacle data.
[0008] Combined with the first aspect, in a possible implementation manner, the searching for the obstacle data in the storage space of the obstacle data based on the hierarchical spatial index structure of the obstacle data for each first detection point to determine whether there is a spatial overlap between this first detection point and the obstacle data includes: Traverse the first detection points of each first detection segment. For each first detection point, search for the position coordinates of the obstacles included in the obstacle data in the storage space of the obstacle data by means of nearest neighbor search according to the hierarchical spatial index structure of the obstacle data; When the first distance between the position coordinates of the first detection point and the position coordinates of any obstacle is less than the first threshold, it is determined that there is a spatial overlap between the first detection point and the obstacle data.
[0009] Combined with the first aspect, in a possible implementation manner, when there is a spatial overlap, determining whether the driverless vehicle and the obstacle will collide according to the position of the spatial overlap includes: When there is a spatial overlap between the first detection point and the obstacle data, determine a second detection point in the first detection point that has a spatial overlap with the obstacle data; According to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory, determine whether the driverless vehicle and the obstacle will collide.
[0010] Combined with the first aspect, in a possible implementation manner, determining whether the driverless vehicle and the obstacle will collide according to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory includes: Determine the second distance between the second detection point and the corresponding trajectory point of the first detection line segment; When the second distances are all less than the second threshold, it is determined that there is a collision risk between the driverless vehicle and the obstacle; Wherein, the second threshold is related to the body width of the driverless vehicle.
[0011] Combined with the first aspect, in a possible implementation manner, determining whether the driverless vehicle and the obstacle will collide according to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory includes: Aggregate the second detection points to determine a second line segment formed by the second detection points; According to the positional relationship between the determined second line segments, determine the first coverage area representing the obstacle; Determine whether there is a spatial overlap between the first coverage area and the second coverage area of the driverless vehicle on the driving trajectory; When there is a spatial overlap, it is determined that there is a collision risk between the driverless vehicle and the obstacle.
[0012] Combined with the first aspect, in a possible implementation manner, when there is a spatial overlap, determining whether the driverless vehicle and the obstacle will collide according to the position of the spatial overlap includes: In the case where there is a spatial overlap between the first detection point and the obstacle data, determine a third detection point that meets the following conditions from the first detection points: there is a spatial overlap between the first detection point and the obstacle data, and there is a first detection point adjacent to the first detection point that has no spatial overlap with the obstacle data; Determine the boundary of the first coverage area of the obstacle according to the third detection point; Determine whether the unmanned vehicle will collide with the obstacle according to the positional relationship between the boundary of the first coverage area and the second coverage area of the unmanned vehicle on the driving trajectory.
[0013] Combined with the first aspect, in a possible implementation manner, the obstacle includes: a static irregular obstacle.
[0014] Combined with the first aspect, in a possible implementation manner, in the case of detecting multiple obstacles, the searching for obstacle data in the storage space of the obstacle data to determine whether there is obstacle data that has a spatial overlap with any first detection range according to the first detection ranges respectively corresponding to each trajectory point includes: Search for the obstacle data in the storage space of the obstacle data to determine the corner position coordinates of the geometric figure formed by each obstacle coverage area; According to the first detection ranges overlapped by the respective corner position coordinates, determine the third distance from each corner position coordinate to the trajectory point corresponding to the overlapped first detection range; For each obstacle, determine the shortest distance among the corresponding third distances; Sort the shortest distances corresponding to the respective obstacles in ascending order to obtain the detection order of each obstacle; According to the detection order of each obstacle, sequentially search for the corresponding obstacle data in the storage space of the corresponding obstacle data to determine whether the currently detected obstacle data has a spatial overlap with any first detection range.
[0015] In a second aspect, a collision detection device for an obstacle is provided, including: An obstacle data storage module, configured to detect obstacles during the driving process of the unmanned vehicle and store the detected obstacle data according to a preset data structure; An obstacle data search module, configured to traverse the trajectory points on the driving trajectory in front of the unmanned vehicle, and for each trajectory point, determine the normal direction of the driving trajectory at this trajectory point, and a first detection range along the normal direction corresponding to this trajectory point; according to the first detection ranges respectively corresponding to the trajectory points, search for the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that has a spatial overlap with any first detection range; A collision detection module, configured to, when there is a spatial overlap, determine whether the unmanned vehicle and the obstacle will collide according to the position of the spatial overlap.
[0016] In a third aspect, a unmanned vehicle is provided, including: the collision detection device for obstacles as described in the second aspect.
[0017] The beneficial effects of the embodiments of the present disclosure include: The collision detection method, device and unmanned vehicle for obstacles provided by the embodiments of the present disclosure include: the unmanned vehicle performs obstacle detection during driving and stores the detected obstacle data according to a preset data structure; traverses the trajectory points on the driving trajectory in front of the unmanned vehicle, and for each trajectory point, determines the normal direction of the driving trajectory at this trajectory point, and a first detection range along the normal direction corresponding to this trajectory point; according to the first detection ranges respectively corresponding to the trajectory points, searches for the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that has a spatial overlap with any first detection range; when there is a spatial overlap, determines whether the unmanned vehicle and the obstacle will collide according to the position of the spatial overlap. The collision detection method for obstacles provided by the embodiments of the present disclosure stores obstacle data by constructing a preset data structure, and constructs a first detection range corresponding to the normal direction of the driving trajectory at each trajectory point on the driving trajectory in front of the unmanned vehicle to detect whether there is an actual geometric collision between the driving lane of the unmanned vehicle on the driving trajectory and irregular obstacles. Compared with the prior art, accurate and effective collision detection can be performed on obstacles of various shapes, and while ensuring safety, the passing space can be effectively utilized, and vehicle misstop caused by incorrect collision detection results can be avoided. Description of the Drawings
[0018] Figure 1 It is one of the flowcharts of the collision detection method for obstacles provided by the embodiments of the present disclosure; Figure 2 It is a schematic diagram of using a sphere envelope method to perform collision detection on an obstacle provided by the embodiments of the present disclosure; Figure 3 It is a schematic diagram of using an AABB box envelope method to perform collision detection on an obstacle provided by the embodiments of the present disclosure; Figure 4One of the schematic diagrams of using the OBB box envelope method to detect collisions with obstacles provided by the embodiments of the present disclosure; Figure 5 Another schematic diagram of using the OBB box envelope method to detect collisions with obstacles provided by the embodiments of the present disclosure; Figure 6 Schematic diagram of the method for detecting collisions with obstacles provided by the embodiments of the present disclosure; Figure 7 Another flowchart of the method for detecting collisions with obstacles provided by the embodiments of the present disclosure; Figure 8 Structural diagram of the device for detecting collisions with obstacles provided by the embodiments of the present disclosure. Detailed implementation manners
[0019] The embodiments of the present disclosure provide a method, a device, and an autonomous vehicle for detecting collisions with obstacles. The preferred embodiments of the present disclosure will be described below with reference to the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present disclosure, and are not used to limit the present disclosure. And without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0020] The embodiments of the present disclosure provide a method for detecting collisions with obstacles, as Figure 1 shown, including: S101. During the driving process, the autonomous vehicle detects obstacles and stores the detected obstacle data according to a preset data structure; S102. Traverse the trajectory points on the driving trajectory in front of the autonomous vehicle. For each trajectory point, determine the normal direction of the driving trajectory at this trajectory point, and the first detection range along the normal direction corresponding to this trajectory point; S103. According to the first detection ranges respectively corresponding to the trajectory points, search for obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that has a spatial overlap with any of the first detection ranges; S104. In the case of a spatial overlap, determine whether the autonomous vehicle and the obstacle will collide according to the position of the spatial overlap.
[0021] In the embodiments of the present disclosure, the driverless vehicle can be a mining vehicle with driverless transportation in mines. In the mine operation environment, the operation scenarios of the driverless vehicle are relatively complex, and there are often various obstacles with irregular shapes, such as large falling rocks, soil piles, retaining walls, etc. The driverless vehicle is usually equipped with advanced sensors for obstacle detection during driving to obtain obstacle data. Such sensors can include: lidar, cameras, millimeter-wave radars, etc. For example, the lidar can measure the time or phase difference of the laser round-trip by emitting laser beams and receiving the reflected signals, so as to calculate the distance to the obstacle and the position coordinates of the obstacle, and obtain the obstacle data. The camera can capture the images and videos around the vehicle, and use image processing and deep learning algorithms to identify and classify the objects in the images, so as to detect the obstacles and obtain the obstacle data. The millimeter-wave radar uses electromagnetic waves in the millimeter-wave band to measure the distance between the driverless vehicle and the obstacle by emitting and receiving the reflected waves, and obtains the obstacle data. The millimeter-wave radar can assist the lidar and the camera in obstacle detection. In the traditional method, after obtaining the obstacle data, the methods such as spherical envelope, AABB box envelope, OBB box envelope and constructing a grid map are usually used for collision detection of obstacles. Exemplarily, as Figure 2 shown, the basic idea of the spherical envelope method is to construct the circumcircle of the obstacle based on the geometric shape of the obstacle, and construct the circumcircle of the driverless vehicle based on the geometric shape of the driverless vehicle. a and c represent the driverless vehicle, and b and d represent the obstacles. Then, the distance between the centers of the circumcircles of the obstacles and the center of the circumcircle of the driverless vehicle, and the sum of the radius of the circumcircle of the obstacle and the radius of the circumcircle of the driverless vehicle are calculated respectively. If the distance between the centers of the circumcircles of the obstacles and the center of the circumcircle of the driverless vehicle is less than the sum of the radius of the circumcircle of the obstacle and the radius of the circumcircle of the driverless vehicle, it is determined that a collision occurs between the driverless vehicle and the obstacle, otherwise no collision occurs. However, as Figure 2 shown, the situation where there is actually no collision between the driverless vehicle c and the obstacle d will be misdetected as a collision, which will lead to problems such as the vehicle stopping incorrectly. Therefore, using the spherical envelope method will cause the area where there is actually no collision to be misdetected as a collision, resulting in the vehicle being unable to pass. As Figure 3As shown in the figure, the basic idea of the AABB box envelope method is to construct a rectangular coordinate system, construct the circumscribed rectangle of the obstacle (i.e., the AABB box) based on the geometric shape of the obstacle, and construct the circumscribed rectangle of the unmanned vehicle based on the geometric shape of the unmanned vehicle. e and g represent the unmanned vehicle, and f and h represent the obstacles. Determine whether there is an overlap in the projections of the circumscribed rectangle of the obstacle and the circumscribed rectangle of the unmanned vehicle in the x-axis and y-axis directions of the rectangular coordinate system. If there is an overlap, it is determined that a collision occurs between the unmanned vehicle and the obstacle; otherwise, no collision occurs. For example, the AABB box envelope method is used for collision detection between the unmanned vehicle e and the obstacle f. This method has a relatively fast detection rate. However, for the overlapping part between the circumscribed rectangle of the unmanned vehicle g and the circumscribed rectangle of the obstacle h, a large area of non-drivable area is generated. In narrow scenarios in mines, it will cause waste of space and is not conducive to the normal operation of unmanned vehicles. As Figure 4 shown in the figure, i represents the unmanned vehicle and j represents the obstacle. Compared with the AABB box envelope method, the circumscribed rectangle constructed by the OBB box envelope method can rotate following the orientation of the unmanned vehicle or the obstacle, and the size of the circumscribed rectangle does not change. Combining with the separating axis theorem to judge whether there is an overlap is more accurate than the AABB box envelope method, but the computational complexity is greater. However, as Figure 5 shown in the figure, for irregular obstacles such as concave polygons, the OBB box envelope method cannot obtain effective collision detection results. For example, there are a large number of concave polygon irregular retaining walls in the mine operation environment. In the narrow area of the concave polygon, the OBB box envelope method cannot fully utilize the space for collision detection. The method of constructing a grid map can express the obstacle in the form of grid scatter points, but this method has a huge amount of calculation, and this expression form of the obstacle does not have attributes such as tracking, poor compatibility, and is not convenient for other modules to use.
[0022] In the embodiments of the present disclosure, during the driving process of the driverless vehicle, obstacle detection is performed, and the obstacle data can be point cloud data obtained by scanning the traveling direction of the vehicle using a lidar. These obstacle data include the position coordinates of the obstacles. The detected obstacle data is stored according to a preset data structure. The preset data structure can include a kd-tree data structure. A kd-tree can be a data structure used to organize multi-dimensional space data, such as point cloud data on a two-dimensional plane, point cloud data in a three-dimensional space, etc. A kd-tree is a special binary tree, and each node represents a point in a k-dimensional space. During the construction of the kd-tree, an axis is selected according to certain rules. For example, in a two-dimensional space, first divide along the x-axis, then divide along the y-axis, and then cycle to divide the space. For example, project the obstacle data onto the ground to obtain the obstacle position coordinate data in the two-dimensional space. Build a kd-tree in the two-dimensional space. First, select the x-axis as the dividing axis, sort all the points according to the x coordinate, and take the median point as the root node. Then, for the left subtree of the root node, select the y-axis as the dividing axis, sort the points in the left subtree according to the y coordinate, and take the median point as the root node of the left subtree, and so on. As Figure 6 shown, the driverless vehicle k travels forward along the x direction, l represents an obstacle, and there are multiple trajectory points on the forward driving trajectory of the driverless vehicle k. For each trajectory point, determine the normal direction of the driving trajectory at this trajectory point. For example, at the trajectory point B, the normal direction of the driving trajectory at point B is the AC direction. The first detection range along the normal direction corresponding to this trajectory point B can be the line segment AC, or other shapes. For example, a quadrilateral area formed by the line segments of the normal directions corresponding to two adjacent trajectory points. Exemplarily, Figure 6 the quadrilateral AEFD area in
[0023] Further, traverse the trajectory points on the driving trajectory in front of the driverless vehicle. According to the first detection range corresponding to each trajectory point, search for obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that spatially overlaps with any first detection range. For example, all the obstacle data detected by the driverless vehicle during driving is stored in a k-d tree. Each piece of obstacle data can be the position coordinates of a point, and the k-d tree can efficiently organize this data by recursively dividing the space. Traverse the first detection range corresponding to each trajectory point. For the first detection range corresponding to each trajectory point, perform a range query in the k-d tree to find the obstacle data that spatially overlaps with the current first detection range. Starting from the root node of the k-d tree, compare according to the division dimension of the current node and the first detection range to determine whether the first detection range spatially overlaps with the spatial region divided by the current node. If there is a spatial overlap, recursively continue the range query in the left and right subtrees of the current node until reaching the leaf node. During the query process, record the position coordinates of all the points within the first detection range that spatially overlap with the obstacle data. During the range query process, if at least one piece of obstacle data is found to spatially overlap with the current first detection range, it can be determined that there is an obstacle within the current first detection range. If no case of spatial overlap with the obstacle data is found within all the first detection ranges, it can be determined that there is no obstacle within the first detection range of the current trajectory point. In the case of spatial overlap, determine whether the driverless vehicle and the obstacle will collide based on the position of the spatial overlap. For example, in the case of spatial overlap, according to the position coordinates of all the points within the first detection range that spatially overlap with the obstacle data, the coverage area of the obstacle can be obtained from the position coordinates of these points. It can be determined whether the driverless vehicle and the obstacle will collide based on the coverage area of the obstacle and the coverage area of the driving lane of the driverless vehicle on the driving trajectory.
[0024] In the embodiment of the present application, by constructing a preset data structure, various types of obstacle data are stored. For the driving trajectory in the driving direction planned by the driverless vehicle, for each trajectory point on the trajectory, a first detection range in its normal direction is constructed. This first detection range can accurately capture the potential risks of the driverless vehicle within the driving lane. By determining whether there is a geometric spatial overlap between the first detection range and the obstacle, effective collision detection of the obstacle is realized. It can accurately adapt to obstacles of different shapes. For example, concave polygon obstacles such as walls can all be accurately collision-detected. On the premise of ensuring driving safety, the road passage space is maximally utilized, effectively avoiding abnormal vehicle parking caused by misjudgment, and significantly improving the smoothness and reliability of the driverless vehicle driving.
[0025] In yet another embodiment of the present disclosure, in the above step S102, for each trajectory point, determining the normal direction of the driving trajectory at the trajectory point and a first detection range along the normal direction corresponding to the trajectory point includes: Step 1: For each trajectory point, determining the normal direction of the driving trajectory at the trajectory point and a first detection line segment along the normal direction of the trajectory point; wherein, the length of the first detection line segment is related to a preset detection boundary; In the above step S103, according to the first detection ranges respectively corresponding to the trajectory points, searching for obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that spatially overlaps with any of the first detection ranges includes: Step 2: Discretizing the first detection line segments respectively corresponding to the trajectory points to determine a plurality of first detection points located on each of the first detection line segments; Step 3: For each first detection point, based on the hierarchical spatial index structure of the obstacle data, searching for the obstacle data in the storage space of the obstacle data to determine whether there is a spatial overlap between the first detection point and the obstacle data; Wherein, the hierarchical spatial index structure of the obstacle data is related to the preset data structure based on which the obstacles are stored.
[0026] In the embodiment of the present disclosure, by determining the normal direction of the trajectory point and its first detection line segment, discretizing the first detection line segment to obtain a plurality of first detection points, and searching for the obstacle data based on the hierarchical spatial index structure, an efficient detection of whether there is a spatial overlap between the first detection point and the obstacle data is achieved. As Figure 6 shown, for the above step 1, according to the tangent direction of the driving trajectory at the trajectory point, the perpendicular normal direction is determined by a geometric method (such as the vector perpendicular principle). Starting from the trajectory point, extend in both directions along the normal direction to obtain the first detection line segment. For example, at the trajectory point B, extend in both directions along the normal direction to obtain the first detection line segment AC. The length of the first detection line segment is determined by the preset detection boundary. The preset detection boundary can be set according to the actual application scenario, such as the vehicle driving speed, safety distance requirement, vehicle body width, etc., for limiting the detection range. For the above step 2, discretize the first detection line segment corresponding to each trajectory point to determine a plurality of first detection points on the first detection line segment. The discretization method can adopt an equally spaced sampling method to divide the first detection line segment into several sub-segments of equal length, and the endpoints or specific positions of each sub-segment are used as the first detection points. Alternatively, according to the detection accuracy requirement, a plurality of first detection points can be set at the key positions of the first detection line segment.
[0027] For the above step 3, for each first detection point, based on the hierarchical spatial index structure of the obstacle data, search for the obstacle data in the storage space of the obstacle data to determine whether there is a spatial overlap between the first detection point and the obstacle data. Traversing each first detection point can start from the first detection point at one end of the first detection line segment and end at the first detection point at the other end of the first detection line segment. It can also be on the first detection line segment, starting from the first detection point adjacent to the trajectory point and traversing each first detection point along the direction away from the trajectory point. Based on the hierarchical spatial index structure of the obstacle data, search for the obstacle data in the storage space of the obstacle data and determine one by one whether there is a spatial overlap between each first detection point and the obstacle data. The hierarchical spatial index structure of the obstacle data is related to the preset data structure based on which the obstacles are stored. For example, when the preset data structure is the k-d tree data structure, the hierarchical spatial index structure of the obstacle data realizes the orderly organization and management of the obstacle data by recursively dividing the space into sub-spaces at different levels. According to the position coordinates of the first detection point, use the hierarchical spatial index structure to quickly locate the sub-space area including the obstacles and search for the obstacle data only within this area instead of traversing all the obstacle data, thereby improving the search efficiency. It can be determined whether there is a spatial overlap by judging whether the distance between the position coordinates of the first detection point and the position coordinates in the obstacle data is less than the preset distance. By setting the first detection line segment in the normal direction for each trajectory point, the area within the preset detection boundary of the driving trajectory can be comprehensively covered to avoid missing potential obstacles. Using the hierarchical spatial index structure of the obstacle data, the obstacle data can be quickly located, the search range can be reduced, and the detection efficiency can be improved. And it can adapt to various shapes of obstacles and can accurately locate irregular obstacles.
[0028] In another embodiment of the present disclosure, in the above step 3, for each first detection point, based on the hierarchical spatial index structure of the obstacle data, search for the obstacle data in the storage space of the obstacle data to determine whether there is a spatial overlap between the first detection point and the obstacle data, including: Step 1: Traverse the first detection points of each first detection line segment. For each first detection point, determine the area position coordinates of the area covered by the first detection point; Step 2: According to the hierarchical spatial index structure of the obstacle data, use the range search method to search for the position coordinates of the obstacles included in the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data within the area position coordinates; Step 3: In the case where there is, determine that there is a spatial overlap between the first detection point and the obstacle data.
[0029] In the embodiments of the present disclosure, by traversing the first detection points and determining the regional position coordinates of their coverage areas, and performing range search in combination with the hierarchical spatial index structure of obstacle data, it is finally determined whether there is spatial overlap between the first detection points and the obstacles, achieving efficient positioning of the obstacles. For the above step 1, the first detection points of each first detection line segment are traversed. For each first detection point, its "coverage area" is defined, and the position coordinates of this coverage area are determined. Exemplarily, a rectangular area constructed with each first detection point as the center and the distance between adjacent first detection points as the side length is used as the coverage area. The position coordinates of the four vertices of the rectangular area are used as the regional position coordinates of the coverage area. For the above step 2, using the hierarchical spatial index structure of obstacle data, with the position coordinates of the coverage area of the first detection point as the query condition, a range search method is used to determine whether there is obstacle data within the range of the regional position coordinates. Range search can be to give a query condition, usually a rectangular area in a multi-dimensional space, and find the position coordinates of the points in the obstacle data that fall within this range. For the above step 3, if there is obstacle data within the range of the regional position coordinates, it is determined that there is spatial overlap between this first detection point and the obstacle data. Record the position coordinates of the first detection points with spatial overlap, so that the position of the obstacle can be located. By determining the position coordinates of the coverage area of the first detection point, single-point detection is extended to regional detection, which is more in line with the spatial occupancy characteristics of actual obstacles, thus avoiding missed detection caused by single-point errors.
[0030] In another embodiment of the present disclosure, in the above step 3, for each first detection point, based on the hierarchical spatial index structure of obstacle data, search for obstacle data in the storage space of the obstacle data to determine whether there is spatial overlap between this first detection point and the obstacle data, including: Step 1: Traverse the first detection points of each first detection line segment. For each first detection point, according to the hierarchical spatial index structure of obstacle data, use the nearest neighbor search method to search for the position coordinates of the obstacles included in the obstacle data in the storage space of the obstacle data; Step 2: When the first distance between the position coordinates of this first detection point and the position coordinates of any obstacle is less than the first threshold, it is determined that there is spatial overlap between this first detection point and the obstacle data.
[0031] In the embodiments of the present disclosure, by traversing the first detection points and performing nearest neighbor search in combination with the hierarchical spatial index structure of obstacle data, and judging whether there is spatial overlap according to the distance between the first detection points and the position coordinates of the obstacles, fast positioning of the obstacles is achieved. For the above-mentioned step 1, the first detection points on each first detection line segment are traversed one by one. With the position coordinates of each first detection point as the query center, using the hierarchical spatial index structure of obstacle data, the obstacle closest to the position coordinates of the first detection point is searched. The goal of the nearest neighbor search is to find the data point closest to the position coordinates of the given first detection point. Exemplarily, for the k-d tree data structure, the nearest neighbor search can select the left subtree or the right subtree to continue the search according to the comparison result between the position coordinates of the first detection point and the current node in the current dimension until reaching the leaf node. At the leaf node, the distance between the position coordinates of the first detection point and the node is calculated, and the node is set as the current nearest neighbor point. Starting from the leaf node, backtrack upwards to check whether the other subtree of each node may contain a closer point. If the distance from the position coordinates of the first detection point to the hyperplane where the current node is located is less than the distance of the current nearest neighbor point, it is necessary to enter the other subtree to continue the search. After backtracking to the root node, the current nearest neighbor point is the position coordinates of the finally searched nearest obstacle. For the above-mentioned step 2, the distance between the position coordinates of the first detection point and the position coordinates of the nearest obstacle searched is calculated as the first distance. If the first distance is less than a preset first threshold, it is determined that there is spatial overlap between the first detection point and the obstacle data. The first threshold can be determined according to the sensor detection error range, such as the ranging error of a lidar. By directly judging whether there is spatial overlap through the first distance and the first threshold, complex geometric intersection calculations are not required, reducing the calculation overhead and improving the real-time performance. The first threshold can be adjusted according to the detection accuracy of the sensor and is applicable to scenarios with high real-time requirements such as autonomous driving.
[0032] In another embodiment of the present disclosure, in step S104 above, in the case of spatial overlap, determining whether the driverless vehicle and the obstacle will collide according to the position of the spatial overlap includes: Step 1, in the case of spatial overlap between the first detection point and the obstacle data, determine the second detection point among the first detection points that has spatial overlap with the obstacle data; Step 2, determine whether the driverless vehicle and the obstacle will collide according to the positional relationship between the first coverage area of the obstacle represented by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory.
[0033] In the embodiments of the present disclosure, second detection points in the first detection points that have spatial overlap with the obstacle data are determined, and based on the positional relationship between the first coverage area of the obstacle characterized by the second detection points and the second coverage area of the driving lane of the driverless vehicle, the collision risk between the driverless vehicle and the obstacle is determined. For the above-mentioned step 1, based on determining whether there is spatial overlap between the first detection points and the obstacle data, if there is spatial overlap, all the detection points in the first detection points that have spatial overlap with the obstacle data are selected as the second detection points, such as Figure 6 in which, point G and point H are used as the second detection points. For the above-mentioned step 2, the area formed by all the second detection points can be used as the first coverage area of the obstacle. The second coverage area of the driverless vehicle on the driving trajectory can be calculated according to the physical dimensions (such as length and width) of the driverless vehicle and its driving trajectory. The projected area of the vehicle body contour of the driverless vehicle on the trajectory can be used as the second coverage area of the driverless vehicle on the driving trajectory. According to the positional relationship between the first coverage area and the second area, it can be determined whether the driverless vehicle and the obstacle will collide. For example, at a certain moment, if the first coverage area and the second coverage area intersect in space, it is determined that there is a collision risk. Combining with the second coverage area of the driverless vehicle on the driving trajectory, the available space can be maximized, which is applicable to real-time collision warning with irregular obstacles.
[0034] Such as Figure 7 shown Figure 7 is a schematic flow chart of a collision detection method for an obstacle, including the following steps; S701. Obtain the detected obstacle data and the trajectory points on the driving trajectory in front of the driverless vehicle; enter step S702; S702. Store the detected obstacle data according to a preset data structure; enter step S703; S703. For each trajectory point, determine the normal direction of the driving trajectory at this trajectory point, and the first detection line segment along the normal direction of this trajectory point; enter step S704; S704. Discretize the first detection line segments corresponding to each trajectory point respectively, and determine a plurality of first detection points located on each first detection line segment; enter step S705; S705. For each first detection point, based on the hierarchical spatial index structure of the obstacle data, search for the obstacle data in the storage space of the obstacle data, and determine whether there is spatial overlap between this first detection point and the obstacle data; if so, enter step S706; otherwise, enter step S701; S706. Determine the second detection points in the first detection points that have spatial overlap with the obstacle data; enter step S707; S707. Determine whether the collision will occur between the driverless vehicle and the obstacle according to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory; this process ends.
[0035] In another embodiment of the present disclosure, in step 2 above, determining whether the collision will occur between the driverless vehicle and the obstacle according to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory includes: Step 1. Determine the second distance between the second detection point and the corresponding trajectory point of the first detection line segment where it is located; Step 2. When the second distances are all less than the second threshold, determine that there is a collision risk between the driverless vehicle and the obstacle; wherein, the second threshold is related to the body width of the driverless vehicle.
[0036] In the embodiment of the present disclosure, by calculating the second distance between the second detection point and the corresponding trajectory point, and combining the second threshold related to the body width, it is judged whether there is a collision risk between the driverless vehicle and the obstacle. For step 1 above, the second detection point comes from the first detection line segment, and the first detection line segment is the extension of the trajectory point along the normal direction. Therefore, each second detection point has a corresponding trajectory point of the first detection line segment where it is located. Determine the second distance between the second detection point and the corresponding trajectory point of the first detection line segment where it is located. Exemplarily, starting from the first detection point at one end of the first detection line segment and ending at the first detection point at the other end, based on the hierarchical spatial index structure of the obstacle data, search for the obstacle data in the storage space of the obstacle data, and determine one by one whether there is a spatial overlap between each first detection point and the obstacle data. During the process of determining one by one whether there is a spatial overlap between each first detection point and the obstacle data, the first detection point that has a spatial overlap with the obstacle data is determined as the second detection point. And determine the second distance between the second detection point and the corresponding trajectory point of the first detection line segment where it is located. For step 2 above, when the second distances are all less than the second threshold, determine that there is a collision risk between the driverless vehicle and the obstacle. The second threshold is related to the body width of the driverless vehicle and can be used to measure the second coverage area of the driving lane where the vehicle travels on the driving trajectory. By directly associating the second distance with the second threshold to the physical size of the driverless vehicle body, it indirectly represents the second coverage area of the driving lane where the vehicle travels on the driving trajectory, converts the complex spatial relationship into a simple numerical comparison, has a small calculation overhead, is suitable for real-time scenarios, can accurately reflect the closeness between the obstacle and the driverless vehicle, and thus adapts to the collision detection and safe driving of the driverless vehicle in the narrow scenarios in the mine.
[0037] In yet another embodiment of the present disclosure, in step 2 above, based on the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory, determining whether the driverless vehicle will collide with the obstacle includes: Step 1: Aggregate the second detection points to determine the second line segment formed by the second detection points; Step 2: Determine the first coverage area representing the obstacle based on the positional relationship between the determined second line segments; Step 3: Determine whether there is a spatial overlap between the first coverage area and the second coverage area of the driverless vehicle on the driving trajectory; Step 4: In the case of a spatial overlap, determine that there is a collision risk between the driverless vehicle and the obstacle.
[0038] In the embodiment of the present disclosure, by determining the first coverage area of the obstacle from points to lines and from lines to surfaces, and then performing a spatial overlap judgment with the second coverage area where the driverless vehicle travels, the collision risk analysis from discrete points to the overall area is realized. For step 1 above, for each trajectory point, aggregating the second detection points, the second line segment formed by these second detection points can be determined by point set fitting or connecting adjacent points. For example, on the first detection line segment, these second detection points show a regular ordered distribution. Connect the second detection points with close distances to form the second detection line segment. For step 2 above, analyze the spatial positional relationship between the second line segments. For example, if multiple second line segments are parallel and adjacent, these second line segments can be used to form the first coverage area representing the obstacle. For step 3 above, perform a spatial relationship analysis on the first coverage area of the obstacle and the second coverage area of the driverless vehicle on the driving trajectory to determine whether there is an overlapping part between the two. For example, for the first coverage area and the second coverage area, it can be determined whether there is a spatial overlap by judging whether there is an intersection between the sides or whether the vertices are within the other area. For step 4 above, in the case of a spatial overlap, determine that there is a collision risk between the driverless vehicle and the obstacle. By aggregating the second detection points to form the second line segment and determining the first coverage area, the contour and extension direction of the obstacle can be more accurately characterized, making the collision judgment more in line with the actual physical form of the obstacle. Combining with the second coverage area of the driverless vehicle's driving trajectory, the spatial occupancy conflict between the driverless vehicle and the obstacle can be determined, which is applicable to real-time obstacle avoidance in complex environments.
[0039] In yet another embodiment of the present disclosure, in step S104 above, in the case of a spatial overlap, determining whether the driverless vehicle will collide with the obstacle based on the position of the spatial overlap includes: Step 1: When there is spatial overlap between the first detection points and the obstacle data, determine third detection points that meet the following conditions from the first detection points: there is spatial overlap between the first detection point and the obstacle data, and there is a first detection point adjacent to the first detection point that has no spatial overlap with the obstacle data; Step 2: Determine the boundary of the first coverage area of the obstacle based on the third detection points; Step 3: Determine whether the unmanned vehicle will collide with the obstacle based on the position relationship between the boundary of the first coverage area and the second coverage area of the unmanned vehicle on the driving trajectory.
[0040] In the embodiments of the present disclosure, first, third detection points with boundary features are screened out, the boundary of the first coverage area of the obstacle is determined based on the third detection points, and finally, the collision risk is judged according to the positional relationship between the boundary of the first coverage area and the second coverage area of the driverless vehicle on the driving trajectory, realizing the accurate extraction of the obstacle contour and collision analysis. For the above step 1, in the case where there is spatial overlap between the first detection points and the obstacle data, third detection points are screened out from the first detection points. The third detection points have the following characteristics: there is spatial overlap between the third detection points and the obstacle data, and there is a first detection point adjacent to the third detection point that has no spatial overlap with the obstacle data. In a possible implementation manner, starting from the first detection point at one end of the first detection line segment and ending with the first detection point at the other end, based on the hierarchical spatial index structure of the obstacle data, the obstacle data is searched in the storage space of the obstacle data, and it is determined one by one whether there is spatial overlap between each first detection point and the obstacle data. In the process of determining one by one whether there is spatial overlap between each first detection point and the obstacle data, if it is determined that there is a first detection point with spatial overlap with the obstacle data, and the previous first detection point adjacent to the first detection point has no spatial overlap with the obstacle data, or the next first detection point adjacent to the first detection point has no spatial overlap with the obstacle data, then the first detection point is determined as the third detection point. By screening the third detection points with boundary features, the edge of the obstacle on the first detection line segment is accurately located. For the above step 2, the boundary of the first coverage area of the obstacle is determined according to the third detection points. The third detection points are arranged in an orderly manner on each first detection line segment. According to the traversal order of each first detection line segment corresponding to each trajectory point on the driving trajectory of the driverless vehicle, the third detection points are connected to determine the boundary of the first coverage area of the obstacle. For the above step 3, the positional relationship between the boundary of the first coverage area of the obstacle and the second coverage area of the driverless vehicle on the driving trajectory is analyzed to determine whether the driverless vehicle and the obstacle will collide. For example, it is judged whether there is geometric intersection between the boundary of the first coverage area of the obstacle and the second coverage area to determine whether the driverless vehicle and the obstacle will collide. By screening the third detection points, the edge features of the obstacle can be accurately captured, avoiding misjudging non-boundary points as contour points, and improving the restoration degree of the obstacle shape. Only using the third detection points with boundary features to construct the boundary of the first coverage area can reduce the number of points participating in the calculation, be more efficient in processing, focus on the key contour information of the obstacle, have higher real-time performance, and can more accurately reflect the actual spatial conflict between the driverless vehicle and the obstacle, avoiding unnecessary obstacle avoidance and parking actions caused by misjudgment of non-boundary areas of the obstacle.
[0041] In another embodiment of the present disclosure, the obstacle includes: a static irregular obstacle.
[0042] In an embodiment of the present disclosure, a static irregular obstacle may refer to an obstacle with a fixed position and shape and various shapes in the operation scenario of driverless mining, such as a convex polygon or a concave polygon obstacle. Exemplarily, large falling rocks, soil piles, retaining walls, etc. in the operation scenario of driverless mining.
[0043] In another embodiment of the present disclosure, in the case of detecting multiple obstacles, in the above step S103, according to the first detection ranges respectively corresponding to the trajectory points, searching for obstacle data in the storage space of the obstacle data to determine whether there is obstacle data that spatially overlaps with any of the first detection ranges includes: Step 1: Search for obstacle data in the storage space of the obstacle data to determine the corner position coordinates of the geometric figure formed by the coverage areas of the obstacles. Step 2: Determine the third distance from each corner position coordinate to the trajectory point corresponding to the first detection range that the corner position coordinate overlaps with, according to the first detection ranges respectively overlapped by the corner position coordinates. Step 3: Determine the shortest distance among the corresponding third distances for each obstacle. Step 4: Sort the shortest distances respectively corresponding to the obstacles in ascending order to obtain the detection order of the obstacles. Step 5: According to the detection order of the obstacles, sequentially search for the corresponding obstacle data in the storage space of the corresponding obstacle data to determine whether the currently detected obstacle data spatially overlaps with any of the first detection ranges.
[0044] In the embodiments of the present disclosure, during the driving process of the driverless vehicle, obstacle detection is performed. When multiple obstacles are detected, the obstacles are sorted, and it is preferentially determined whether a collision will occur between the obstacle with the highest collision risk and the driverless vehicle. For the above-mentioned step 1, in the storage space of the obstacle data, the corner position coordinates of the geometric figure formed by the coverage areas of each obstacle are searched through a hierarchical spatial index structure (such as a k-d tree), and the corner position coordinates are recorded. The obstacle coverage areas are mostly polygons, such as convex polygons and concave polygons, and the corners can refer to the vertices of the polygons. If the obstacle coverage area is a curved figure such as a circle, it can be discretized and converted into a polygon, and then the corner position coordinates are searched. For the above-mentioned step 2, if there is a spatial overlap between the corner position coordinates of the obstacle and the first detection range, the third distance from each corner position coordinate to the trajectory point corresponding to the overlapped first detection range is determined. For the above-mentioned step 3, since there can be multiple corner position coordinates of the obstacle, there are also multiple third distances from each corner position coordinate to the trajectory point corresponding to the overlapped first detection range. For multiple obstacles, for each obstacle, the shortest distance among the corresponding third distances is determined. This shortest distance represents the shortest distance from the obstacle to the trajectory point on the driving trajectory of the driverless vehicle. For the above-mentioned step 4, the shortest distances corresponding to each obstacle are sorted in ascending order to obtain the detection order of each obstacle, so as to realize sorting the obstacles according to the decreasing risk of collision between the obstacles and the driverless vehicle. For the above-mentioned step 5, according to the detection order of each obstacle, the corresponding obstacle data is searched in the storage space of the corresponding obstacle data in turn to determine whether the currently detected obstacle data has a spatial overlap with any of the first detection ranges. The detection of whether a collision occurs between the driverless vehicle and the obstacle is performed according to the decreasing risk of collision between the obstacle and the driverless vehicle. Based on the distance sorting from the corner to the trajectory point, the obstacles with a short distance are preferentially detected, which conforms to the safety logic of "near first" and improves the emergency response efficiency. After sorting by the shortest distance, the detection can be terminated in advance. For example, the detection is terminated after it is found that there is a collision risk for the obstacle at a short distance, avoiding invalid calculations for the obstacles at a long distance and reducing the computing power consumption.
[0045] Based on the same inventive concept, the embodiments of the present disclosure also provide an obstacle collision detection device and a driverless vehicle. Since the principles of the problems solved by these devices and the driverless vehicle are similar to those of the aforementioned obstacle collision detection method, the implementation of these devices and the driverless vehicle can refer to the implementation of the aforementioned method, and the repeated parts will not be described again.
[0046] The embodiments of the present disclosure provide an obstacle collision detection device, as Figure 8 shown, including: An obstacle data storage module 801, configured to perform obstacle detection during the driving process of the driverless vehicle and store the detected obstacle data according to a preset data structure; An obstacle data search module 802 is configured to traverse the trajectory points on the driving trajectory in front of the unmanned vehicle. For each trajectory point, determine the normal direction of the driving trajectory at this trajectory point, and a first detection range along the normal direction corresponding to this trajectory point; according to the first detection ranges respectively corresponding to the trajectory points, search for the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that has a spatial overlap with any of the first detection ranges. A collision detection module 803 is configured to, in the case of a spatial overlap, determine whether the unmanned vehicle and the obstacle will collide according to the position of the spatial overlap.
[0047] In another embodiment of the present disclosure, the obstacle data search module 802 is configured to, for each trajectory point, determine the normal direction of the driving trajectory at this trajectory point, and a first detection line segment along the normal direction of this trajectory point; wherein, the length of the first detection line segment is related to a preset detection boundary. Perform a discretization process on the first detection line segments respectively corresponding to the trajectory points to determine a plurality of first detection points located on each first detection line segment. For each first detection point, based on the hierarchical spatial index structure of the obstacle data, search for the obstacle data in the storage space of the obstacle data to determine whether there is a spatial overlap between this first detection point and the obstacle data. Wherein, the hierarchical spatial index structure of the obstacle data is related to the preset data structure based on which the obstacle is stored.
[0048] In another embodiment of the present disclosure, the obstacle data search module 802 is configured to traverse the first detection points of each first detection line segment. For each first detection point, determine the regional position coordinates of the area covered by this first detection point. According to the hierarchical spatial index structure of the obstacle data, use a range search method to search for the position coordinates of the obstacles included in the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data located within the range of the regional position coordinates. In the case of existence, determine that there is a spatial overlap between this first detection point and the obstacle data.
[0049] In another embodiment of the present disclosure, the obstacle data search module 802 is configured to traverse the first detection points of each first detection line segment. For each first detection point, according to the hierarchical spatial index structure of the obstacle data, use a nearest neighbor search method to search for the position coordinates of the obstacles included in the obstacle data in the storage space of the obstacle data. When the first distance between the position coordinates of the first detection point and the position coordinates of any obstacle is less than the first threshold, it is determined that there is a spatial overlap between the first detection point and the obstacle data.
[0050] In another embodiment of the present disclosure, the collision detection module 803 is configured to determine a second detection point in the first detection point that has a spatial overlap with the obstacle data when there is a spatial overlap between the first detection point and the obstacle data. According to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory, it is determined whether the driverless vehicle and the obstacle will collide.
[0051] In another embodiment of the present disclosure, the collision detection module 803 is configured to determine a second distance between the second detection point and the corresponding trajectory point of the first detection line segment where the second detection point is located. When the second distances are all less than the second threshold, it is determined that there is a collision risk between the driverless vehicle and the obstacle. Wherein, the second threshold is related to the body width of the driverless vehicle.
[0052] In another embodiment of the present disclosure, the collision detection module 803 is configured to aggregate the second detection points to determine a second line segment formed by the second detection points. According to the positional relationship between the determined second line segments, the first coverage area representing the obstacle is determined. It is determined whether there is a spatial overlap between the first coverage area and the second coverage area of the driverless vehicle on the driving trajectory. When there is a spatial overlap, it is determined that there is a collision risk between the driverless vehicle and the obstacle.
[0053] In another embodiment of the present disclosure, the collision detection module 803 is configured to, when there is a spatial overlap between the first detection point and the obstacle data, determine a third detection point from the first detection points that meets the following conditions: the first detection point has a spatial overlap with the obstacle data, and there is a first detection point adjacent to the first detection point that has no spatial overlap with the obstacle data. According to the third detection point, the boundary of the first coverage area of the obstacle is determined. According to the positional relationship between the boundary of the first coverage area and the second coverage area of the driverless vehicle on the driving trajectory, it is determined whether the driverless vehicle and the obstacle will collide.
[0054] In another embodiment of the present disclosure, the obstacle includes: a static irregular obstacle.
[0055] In yet another embodiment of the present disclosure, when multiple obstacles are detected, the obstacle data search module 802 is configured to search for the obstacle data in the storage space of the obstacle data to determine the corner position coordinates of the geometric figure formed by the coverage areas of the respective obstacles; According to the first detection ranges respectively overlapped by the respective corner position coordinates, determine the third distances from the respective corner position coordinates to the trajectory points corresponding to the overlapped first detection ranges; For each obstacle, determine the shortest distance among the corresponding third distances; Sort the shortest distances corresponding to the respective obstacles in ascending order to obtain the detection order of the respective obstacles; According to the detection order of the respective obstacles, sequentially search for the corresponding obstacle data in the storage space of the corresponding obstacle data to determine whether the currently detected obstacle data has a spatial overlap with any of the first detection ranges.
[0056] An embodiment of the present disclosure provides an autonomous vehicle, including: a collision detection device for obstacles as described in any of the above embodiments.
[0057] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments of the present disclosure can be implemented by hardware or by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solutions of the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the respective embodiments of the present disclosure.
[0058] Those skilled in the art can understand that the drawings are only schematic diagrams of a preferred embodiment, and the modules or processes in the drawings are not necessarily essential for implementing the present disclosure.
[0059] Those skilled in the art can understand that the modules in the device in the embodiments can be distributed in the device in the embodiments according to the description of the embodiments, or can be correspondingly changed to be located in one or more devices different from the present embodiment. The modules in the above embodiments can be combined into one module, or can be further split into multiple sub-modules.
[0060] The serial numbers of the above embodiments of the present disclosure are only for description and do not represent the advantages and disadvantages of the embodiments.
[0061] Obviously, those skilled in the art can make various changes and modifications to the present disclosure without departing from the spirit and scope of the present disclosure. Thus, if these modifications and variations of the present disclosure fall within the scope of the claims of the present disclosure and their equivalent technologies, the present disclosure also intends to include these changes and modifications.
Claims
1. A method for detecting collisions of obstacles, characterized in that, Including: During the driving process, the driverless vehicle performs obstacle detection and stores the detected obstacle data according to a preset data structure. Traverse the trajectory points on the driving trajectory in front of the driverless vehicle. For each trajectory point, determine the normal direction of the driving trajectory at this trajectory point and the first detection range along the normal direction corresponding to this trajectory point. According to the first detection ranges respectively corresponding to the trajectory points, search for the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that has a spatial overlap with any first detection range. In the case of a spatial overlap, determine whether the driverless vehicle and the obstacle will collide according to the position of the spatial overlap.
2. The method according to claim 1, wherein The step of, for each trajectory point, determining the normal direction of the driving trajectory at this trajectory point and the first detection range along the normal direction corresponding to this trajectory point includes: For each trajectory point, determine the normal direction of the driving trajectory at this trajectory point and the first detection line segment along the normal direction corresponding to this trajectory point; wherein, the length of the first detection line segment is related to a preset detection boundary. The step of, according to the first detection ranges respectively corresponding to the trajectory points, searching for the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that has a spatial overlap with any first detection range includes: Discretize the first detection line segments respectively corresponding to the trajectory points to determine a plurality of first detection points located on each first detection line segment. For each first detection point, based on the hierarchical spatial index structure of the obstacle data, search for the obstacle data in the storage space of the obstacle data to determine whether there is a spatial overlap between this first detection point and the obstacle data. Wherein, the hierarchical spatial index structure of the obstacle data is related to the preset data structure based on which the obstacle data is stored.
3. The method according to claim 2, wherein The step of, for each first detection point, based on the hierarchical spatial index structure of the obstacle data, searching for the obstacle data in the storage space of the obstacle data to determine whether there is a spatial overlap between this first detection point and the obstacle data includes: Traverse the first detection points of each first detection line segment. For each first detection point, determine the regional position coordinates of the area covered by this first detection point. According to the hierarchical spatial index structure of the obstacle data, use the range search method to search for the position coordinates of the obstacles included in the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data located within the range of the regional position coordinates. In the case of existence, determine that there is a spatial overlap between this first detection point and the obstacle data.
4. The method according to claim 2, wherein The step of, for each first detection point, based on the hierarchical spatial index structure of the obstacle data, searching for the obstacle data in the storage space of the obstacle data to determine whether there is a spatial overlap between this first detection point and the obstacle data includes: Traverse the first detection points of each first detection line segment. For each first detection point, according to the hierarchical spatial index structure of the obstacle data, search for the position coordinates of the obstacles included in the obstacle data in the storage space of the obstacle data by means of nearest neighbor search; When the first distance between the position coordinates of this first detection point and the position coordinates of any obstacle is less than the first threshold, it is determined that there is a spatial overlap between this first detection point and the obstacle data.
5. The method according to claim 2, wherein In the case of spatial overlap, determining whether the driverless vehicle and the obstacle will collide according to the position of the spatial overlap includes: When there is a spatial overlap between the first detection point and the obstacle data, determine the second detection point in the first detection point that has a spatial overlap with the obstacle data; Determine whether the driverless vehicle and the obstacle will collide according to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory.
6. The method according to claim 5, wherein Determining whether the driverless vehicle and the obstacle will collide according to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory includes: Determine the second distance between the second detection point and the corresponding trajectory point of the first detection line segment where it is located; When all the second distances are less than the second threshold, it is determined that there is a collision risk between the driverless vehicle and the obstacle; Wherein, the second threshold is related to the body width of the driverless vehicle.
7. The method according to claim 5, characterized in that Determining whether the driverless vehicle and the obstacle will collide according to the positional relationship between the first coverage area of the obstacle characterized by the second detection point and the second coverage area of the driverless vehicle on the driving trajectory includes: Aggregate the second detection points to determine the second line segment formed by the second detection points; Determine the first coverage area representing the obstacle according to the positional relationship between the determined second line segments; Determine whether there is a spatial overlap between the first coverage area and the second coverage area of the driverless vehicle on the driving trajectory; When there is a spatial overlap, it is determined that there is a collision risk between the driverless vehicle and the obstacle.
8. The method according to claim 2, wherein In the case of spatial overlap, determining whether the driverless vehicle and the obstacle will collide according to the position of the spatial overlap includes: When there is a spatial overlap between the first detection point and the obstacle data, determine the third detection point that meets the following conditions from the first detection points: there is a spatial overlap between this first detection point and the obstacle data, and there is a first detection point adjacent to this first detection point that has no spatial overlap with the obstacle data; Determine the boundary of the first coverage area of the obstacle according to the third detection point; Determine whether the driverless vehicle and the obstacle will collide according to the positional relationship between the boundary of the first coverage area and the second coverage area of the driverless vehicle on the driving trajectory.
9. The method according to claim 1, wherein The obstacle includes: static irregular obstacles.
10. The method according to claim 1, characterized in that, In the case of detecting multiple obstacles, searching for the obstacle data in the storage space of the obstacle data according to the first detection ranges respectively corresponding to the respective trajectory points to determine whether there is any obstacle data that spatially overlaps with any of the first detection ranges includes: Searching for the obstacle data in the storage space of the obstacle data to determine the corner position coordinates of the geometric figure formed by the coverage areas of the respective obstacles; Determining the third distance from each corner position coordinate to the trajectory point corresponding to the first detection range with which it overlaps according to the first detection ranges respectively overlapped by the respective corner position coordinates; Determining the shortest distance among the corresponding third distances for each obstacle; Sorting the shortest distances respectively corresponding to the respective obstacles in ascending order to obtain the detection order of the respective obstacles; According to the detection order of the respective obstacles, successively searching for the corresponding obstacle data in the storage space of the corresponding obstacle data to determine whether the currently detected obstacle data spatially overlaps with any of the first detection ranges.
11. A collision detection device for an obstacle, characterized in that, Includes: An obstacle data storage module, configured to perform obstacle detection during the driving of the unmanned vehicle and store the detected obstacle data according to a preset data structure; An obstacle data search module, configured to traverse the trajectory points on the driving trajectory in front of the unmanned vehicle, and for each trajectory point, determine the normal direction of the driving trajectory at this trajectory point and the first detection range along the normal direction corresponding to this trajectory point; according to the first detection ranges respectively corresponding to the respective trajectory points, search for the obstacle data in the storage space of the obstacle data to determine whether there is any obstacle data that spatially overlaps with any of the first detection ranges; A collision detection module, configured to determine whether the unmanned vehicle and the obstacle will collide according to the position of the spatial overlap in the case of a spatial overlap.
12. An autonomous vehicle, characterized in that, Includes the collision detection device for an obstacle as described in claim 11.
Citation Information
Patent Citations
Trajectory prediction anti-collision method for unmanned vehicle
CN114103893A
Unmanned vehicle real-time collision detection method and related device
CN114235441A
Efficient collision detection method and system based on track primitive segmentation
CN115237928A
Method for predicting and quantifying collision risk of road ahead of unmanned mine truck
CN116215518A
Collision detection method and device, equipment and storage medium
CN117698708A
Cited By
Intelligent baby carriage control method with active obstacle avoidance function
CN122064086A