Collision detection method and device based on laser radar
By calculating the distance between the obstacle contour point cloud obtained by lidar scanning and the local trajectory of the vehicle, the problem of misjudgment in collision detection in the existing technology is solved and the accuracy of collision detection is improved.
Patent Information
- Application Number
- CN202411385050.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-21
AI Technical Summary
In the prior art, the collision detection information between an obstacle and a vehicle may be misjudged as having a collision due to the angle of the three-dimensional enclosure frame, resulting in the vehicle's misoperation.
By obtaining the local trajectory of the preset distance and the contour point cloud of the obstacles, the first distance and the second distance are calculated, and the vehicle is determined whether the vehicle collides with the obstacles according to these distances. Specific steps include the establishment of a flat coordinate system, the construction of a two -dimensional binary tree, the first distance through the two -point search -back retrospective rules, and calculate the second distance based on the location relationship between the obstacles and the local trajectory.
It improves the accuracy of detecting whether obstacles collide with vehicles and avoids vehicle malfunctions due to misjudgments.
Smart Images

Figure CN119335559A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of autonomous driving technology, and specifically to a laser radar-based collision detection method and device. Background Art
[0002] The collision detection between obstacles and vehicles is mainly calculated based on the overlap relationship between the position and length, width and height of the obstacle and the ego vehicle. The three-dimensional bounding box coordinate information of the obstacle is restored based on the position and length, width and height information of the obstacle. According to the scale of the ego vehicle, it is judged whether the vehicle bounding box overlaps with the obstacle bounding box in the future local driving trajectory. If there is overlap, there is a collision with the obstacle, and the vehicle makes corresponding parking or obstacle avoidance actions.
[0003] The bounding box information of the obstacle is greatly affected by the posture angle. Even at a precise posture angle, its collision detection information may be affected by the corners of the three-dimensional bounding box and misjudged as a collision, resulting in vehicle malfunction.
[0004] Therefore, how to improve the accuracy of detecting whether an obstacle collides with a vehicle has become an urgent problem to be solved. Summary of the invention
[0005] The present application provides a laser radar-based collision detection method and device, which can solve the technical problem in the prior art that the collision detection information may be affected by the corners of the three-dimensional bounding box and misjudged as a collision, thereby causing the vehicle to malfunction.
[0006] In a first aspect, an embodiment of the present application provides a laser radar-based collision detection method, comprising:
[0007] Obtaining a local trajectory and an obstacle contour point cloud in a preset distance, wherein the obstacle contour point cloud is obtained by scanning a preset laser radar;
[0008] Calculating a first distance based on the local trajectory and the contour point cloud of the obstacle, wherein the first distance is a shortest distance between the local trajectory and the contour point cloud of the obstacle;
[0009] Based on the local trajectory, determine a bounding box contour sweep trajectory of the vehicle, and calculate a second distance, wherein the second distance is a shortest distance between the bounding box contour sweep trajectory and the local trajectory;
[0010] It is determined whether the vehicle collides with the obstacle within the preset distance according to the first distance and the second distance.
[0011] In combination with the first aspect, in one implementation, calculating the first distance based on the local trajectory and the contour point cloud of the obstacle includes:
[0012] Establish a plane coordinate system parallel to the ground;
[0013] Determine the coordinates of each point in the local trajectory in the plane coordinate system;
[0014] Construct a two-dimensional binary tree according to the coordinates as elements;
[0015] The two-dimensional binary tree is calculated by using a preset binary search-backtracking rule to calculate a first distance.
[0016] In combination with the first aspect, in one implementation, based on the acquired preset size and preset positioning center, a left and right sweep trajectory of the bounding box contour of the vehicle in the local trajectory posture is acquired;
[0017] Determine a positional relationship between the obstacle and the local trajectory, wherein the positional relationship includes the obstacle being on the left side, the right side, and the front of the local trajectory;
[0018] If the obstacle is on the left side of the local trajectory, the second distance is calculated according to the left sweep trajectory of the bounding box contour of the vehicle and the local trajectory;
[0019] If the obstacle is on the right side of the local trajectory, the second distance is calculated according to the sweep trajectory on the right side of the bounding box contour of the vehicle and the local trajectory;
[0020] In combination with the first aspect, in one implementation, determining the positional relationship between the obstacle and the local trajectory line includes:
[0021] Acquire a first vector, wherein the first vector is a vector from a preset center point of the vehicle to any point cloud in a contour point cloud of the obstacle;
[0022] Acquire a second vector, wherein the second vector is a vector of the vehicle traveling in the direction of the local trajectory;
[0023] Perform a cross multiplication operation on the first vector and the second vector to obtain a calculation result;
[0024] According to the calculation result, the positional relationship between the obstacle and the local trajectory is determined.
[0025] In combination with the first aspect, in one implementation, determining the positional relationship between the obstacle and the local trajectory line according to the calculation result includes:
[0026] If it is determined that the calculation result is a positive number, it is determined that the obstacle is on the left side of the local trajectory;
[0027] If it is determined that the calculation result is a negative number, it is determined that the obstacle is on the right side of the local trajectory;
[0028] If it is determined that the calculation result is zero, it is determined that the obstacle is directly in front of the local trajectory.
[0029] In combination with the first aspect, in one implementation, determining whether the vehicle collides with the obstacle within the preset distance according to the first distance and the second distance includes:
[0030] If the first distance is greater than the second distance, it is determined that the vehicle collides with the obstacle within the preset distance;
[0031] If the first distance is less than or equal to the second distance, it is determined that the vehicle does not collide with the obstacle within the preset distance.
[0032] In combination with the first aspect, in one implementation, the step of obtaining a local trajectory and a contour point cloud of an obstacle in a preset distance includes:
[0033] Obtaining a pre-stored driving trajectory route;
[0034] Predicting based on the driving trajectory route and the preset distance, obtaining a local trajectory within the preset distance;
[0035] The laser radar is preset to emit a laser signal to the preset distance in real time or at a fixed time, and a feedback signal corresponding to the laser signal is received;
[0036] Based on the laser intensity and coordinate information in the feedback signal, a plurality of point clouds are generated, and a height value of each of the point clouds is obtained;
[0037] Determining a plurality of target point clouds according to the height values of the point clouds and a preset height threshold;
[0038] Clustering the plurality of target point clouds to obtain a contour point cloud of each obstacle, wherein the number of the obstacle is at least one.
[0039] In a second aspect, an embodiment of the present application provides a laser radar-based collision detection device, wherein the laser radar-based collision detection device includes:
[0040] Data acquisition module: obtains the local trajectory and the outline point cloud of the obstacle in the preset distance, wherein the outline point cloud of the obstacle is obtained by scanning the preset laser radar;
[0041] A first calculation module, configured to calculate a first distance based on the local trajectory and the contour point cloud of the obstacle, wherein the first distance is a shortest distance between the local trajectory and the contour point cloud of the obstacle;
[0042] A second calculation module is used to determine a bounding box contour sweep trajectory of the vehicle based on the local trajectory, and calculate a second distance, wherein the second distance is a shortest distance between the bounding box contour sweep trajectory and the local trajectory;
[0043] An analysis module is used to determine whether the vehicle collides with the obstacle within the preset distance according to the first distance and the second distance.
[0044] In a third aspect, an embodiment of the present application provides a laser radar-based collision detection device, which includes a processor, a memory, and a laser radar-based collision detection program stored in the memory and executable by the processor, wherein the above-mentioned method steps are implemented when the laser radar-based collision detection program is executed by the processor.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a laser radar-based collision detection program is stored, wherein when the laser radar-based collision detection program is executed by a processor, the steps of the above method are implemented.
[0046] The beneficial effects brought about by the technical solution provided by the embodiment of the present application include: improving the accuracy of detecting collision between obstacles and vehicles.
[0047] By acquiring a local trajectory and a contour point cloud of an obstacle in a preset distance, wherein the contour point cloud of the obstacle is obtained by scanning a preset laser radar; calculating a first distance based on the local trajectory and the contour point cloud of the obstacle, wherein the first distance is the closest distance between the local trajectory and the contour point cloud of the obstacle; determining a bounding box contour sweep trajectory of the vehicle based on the local trajectory, and calculating a second distance, wherein the second distance is the closest distance between the bounding box contour sweep trajectory and the local trajectory; determining whether the vehicle collides with the obstacle in the preset distance based on the first distance and the second distance, thereby solving the technical problem in the related art that the collision detection information may be affected by the corners of the three-dimensional bounding box and misjudged as a collision, thereby causing the vehicle to malfunction, and the present application improves the accuracy of detecting whether the obstacle collides with the vehicle by determining whether the vehicle collides with the obstacle based on the acquired local trajectory and the contour point cloud of the obstacle in the preset distance. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 This is a flow chart of an embodiment of a laser radar-based collision detection method of the present application;
[0049] Figure 2 For this application Figure 1 Detailed flow chart of step S20;
[0050] Figure 3 For this application Figure 1 Detailed flow chart of step S30;
[0051] Figure 4 This is a functional module diagram of an embodiment of a laser radar-based collision detection device of the present application;
[0052] Figure 5 This is a schematic diagram of the hardware structure of a laser radar-based collision detection device involved in the embodiment of the present application. DETAILED DESCRIPTION
[0053] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0054] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0055] In a first aspect, an embodiment of the present application provides a collision detection method based on laser radar.
[0056] In one embodiment, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the laser radar-based collision detection method of this application. Figure 1 As shown, the laser radar-based collision detection method includes:
[0057] Step S10: obtaining a local track and an obstacle contour point cloud in a preset distance, wherein the obstacle contour point cloud is obtained by scanning a preset laser radar;
[0058] Exemplarily, the driving data of the driver driving the vehicle on the predetermined trajectory is obtained, and the driving data includes but is not limited to the driving speed, direction, steering wheel steering angle, and throttle opening of the vehicle at each position on the predetermined trajectory. The driving data is then uploaded to a cloud database or other storage device, and the driving trajectory of the unmanned vehicle is predicted based on the driving data; the local trajectory refers to a part of the entire trajectory detected by a preset laser radar at a certain moment, and the preset distance can be 50 meters, 100 meters, 150 meters, etc.; the starting point and end point of the local trajectory are both located at the center of the vehicle, so it is necessary to extend the local trajectory in the preset distance by one vehicle length to ensure that the collision between the rear end of the vehicle, the front end of the vehicle and the obstacle is detected at the starting and ending positions of the local trajectory in the preset distance.
[0059] The preset laser radar emits a laser signal to a preset distance in real time or at a fixed time, and receives a feedback signal corresponding to the laser signal; based on the laser intensity and coordinate information in the feedback signal, multiple point clouds can be generated, and the height value of each point cloud can be obtained; according to the height value of each point cloud and the preset height threshold, multiple target point clouds are determined; multiple target point clouds are clustered to obtain the contour point cloud of each obstacle.
[0060] Specifically, the obtaining of the local trajectory and the outline point cloud of the obstacle in the preset distance, wherein the outline point cloud of the obstacle is obtained by scanning by a preset laser radar, includes: obtaining a pre-stored driving trajectory route; making a prediction based on the driving trajectory route and the preset distance to obtain the local trajectory in the preset distance; emitting a laser signal to the preset distance in real time or at a fixed time by a preset laser radar, and receiving a feedback signal corresponding to the laser signal; based on the laser intensity and coordinate information in the feedback signal, a plurality of point clouds can be generated, and the height value of each point cloud can be obtained; a plurality of target point clouds can be determined based on the height value of each point cloud and a preset height threshold; and a plurality of target point clouds can be clustered to obtain the outline point cloud of each obstacle, wherein the number of the obstacles is at least one.
[0061] Exemplarily, for example, when a vehicle travels to a certain location, the current local trajectory is predicted based on the travel data obtained at this location.
[0062] For example, the contour point cloud is not obtained by shooting with an ordinary camera, but is generally obtained through a 3D imaging sensor, including a binocular camera, a 3D scanner, and an RGB-D camera. The current mainstream RGB-D cameras include Microsoft's Kinect series, Intel's realsense series, and structure sensor (need to be used in conjunction with iPad). The point cloud can be created from the scanned RGB-D image and the intrinsic parameters of the scanning camera by calibrating the camera and using the camera's intrinsic parameters to calculate the real-world points.
[0063] Point cloud refers to a data set of spatial points scanned by a lidar device. Each point cloud contains three-dimensional coordinates (XYZ) and laser reflection intensity (Intensity), where the X-axis is the direction of vehicle travel, the Y-axis is parallel to the ground and perpendicular to the X-axis, and the Z-axis is perpendicular to the ground. The intensity information is related to the surface material and roughness of the target object, the laser incident angle, the laser wavelength, and the energy density of the lidar.
[0064] The height value of each point cloud is obtained according to the coordinate information of the Z axis. The height value in each point cloud is higher than the preset height threshold and is determined as the target point cloud. The preset height threshold can be set to 20 cm, 30 cm, etc. according to the actual situation.
[0065] Clustering is to divide a data set into different clusters according to a certain standard, so that the data in the same cluster are as similar as possible, and the data in different clusters are as different as possible. This embodiment adopts the Euclidean clustering algorithm, which is relatively simple to implement and uses kd-tree to search spatial points, and has relatively high computational efficiency.
[0066] Step S20: calculating a first distance based on the local trajectory and the contour point cloud of the obstacle, wherein the first distance is the shortest distance between the local trajectory and the contour point cloud of the obstacle;
[0067] For example, the contour point cloud includes many point clouds, and the distance values from each point to each point on the local trajectory are calculated based on the coordinate information contained in the point cloud, and then the distance values are compared to find the minimum distance value as the first distance. When the vehicle is in a straight-line driving condition, only one minimum distance value can be found as the first distance. When the vehicle is in a non-straight-line driving condition, two minimum distance values can be found at the turn, and only one of them needs to be taken as the first distance.
[0068] Step S30: determining a bounding box contour sweep trajectory of the vehicle based on the local trajectory, and calculating a second distance, wherein the second distance is a shortest distance between the bounding box contour sweep trajectory and the local trajectory;
[0069] Exemplarily, the distance value from each point of the sweep trajectory of the bounding box contour of the vehicle to the local trajectory is calculated, and then the magnitudes of the distance values are compared to find the minimum value, which is the second distance;
[0070] In addition, the local trajectory can be sampled and interpolated at equal intervals to ensure that all trajectory points on the local trajectory have a smooth distance to the left and right contours of the vehicle's bounding box.
[0071] Step S40: Determine whether the vehicle collides with the obstacle within the preset distance based on the first distance and the second distance.
[0072] Exemplarily, the first distance is compared with the first preset distance, and the second distance is compared with the second preset distance. If the first distance is less than the first preset distance, and the second distance is less than the second preset distance, it is determined that the vehicle does not collide with the obstacle within the preset distance; if the first distance is less than the first preset distance, and the second distance is greater than or equal to the second preset distance, it is determined that the vehicle collides with the obstacle within the preset distance; if the first distance is greater than or equal to the first preset distance, and the second distance is greater than or equal to the second preset distance, it is determined that the vehicle collides with the obstacle within the preset distance.
[0073] Specifically, if the first distance is greater than the second distance, it is determined that the vehicle does not collide with the obstacle within the preset distance; if the first distance is less than or equal to the second distance, it is determined that the vehicle collides with the obstacle within the preset distance.
[0074] Exemplarily, the first distance is the shortest distance between the local trajectory and the contour point cloud of the obstacle, and the second distance is the shortest distance between the bounding box contour sweep trajectory and the local trajectory. If the first distance is greater than the second distance, the obstacle is outside the bounding box contour sweep trajectory, and the obstacle does not collide with the vehicle. If the first distance is less than or equal to the second distance, the obstacle is within the bounding box contour sweep trajectory, and the obstacle collides with the vehicle.
[0075] In this embodiment, a local trajectory and a contour point cloud of an obstacle in a preset distance are obtained, wherein the contour point cloud of the obstacle is obtained by scanning a preset laser radar; based on the local trajectory and the contour point cloud of the obstacle, a first distance is calculated, wherein the first distance is the closest distance between the local trajectory and the contour point cloud of the obstacle; based on the local trajectory, a bounding box contour sweep trajectory of the vehicle is determined, and a second distance is calculated, wherein the second distance is the closest distance between the bounding box contour sweep trajectory and the local trajectory; based on the first distance and the second distance, it is determined whether the vehicle collides with the obstacle in the preset distance, thereby solving the technical problem in the related art that the collision detection information may be affected by the corners of the three-dimensional bounding box and misjudged as a collision, thereby causing the vehicle to malfunction.
[0076] Further, in one embodiment, referring to Figure 2 , Figure 2 For this application Figure 1 Detailed flow chart of step S20 in FIG. Figure 2As shown, the first distance is calculated based on the local trajectory and the contour point cloud of the obstacle, including:
[0077] Step S21: establishing a plane coordinate system parallel to the ground;
[0078] Exemplarily, based on the coordinate information in the point cloud obtained by the laser radar scanning, a plane coordinate system parallel to the ground is established with the vehicle as the origin or with other points within the scanning range as the origin.
[0079] Step S22: determining the coordinates of each point in the local trajectory in the plane coordinate system;
[0080] Step S23: constructing a two-dimensional binary tree using the plurality of coordinates as elements;
[0081] For example, binary tree is an important type of tree structure. The data structures abstracted from many practical problems are often in the form of binary trees. Even ordinary trees can be easily converted into binary trees, and the storage structure and algorithm of binary trees are relatively simple. Therefore, binary trees are particularly important. The characteristic of binary trees is that each node can have at most two subtrees, and they are divided into left and right. A binary tree is a set of n finite elements. The set is either empty or consists of an element called the root and two non-intersecting binary trees, which are called left subtrees and right subtrees. It is an ordered tree. When the set is empty, the binary tree is called an empty binary tree. In a binary tree, an element is also called a node.
[0082] Exemplarily, in this embodiment, the coordinates of each point in the contour point cloud of a single obstacle can also be used as elements for constructing a single two-dimensional binary tree.
[0083] Step S24: Calculate the two-dimensional binary tree using a preset binary search-backtracking rule to calculate a first distance.
[0084] Demonstratively, take any point in the obstacle's contour point cloud as the search target point, first use binary search to start searching downward from the root node of the two-dimensional binary tree until a leaf node is found, during which all visited nodes are added to a stack, and the shortest distance is recorded at the same time; after finding the leaf node, start backtracking, pop the previously visited nodes from the stack in turn, and determine whether a circle with the search target point as the center and the current shortest distance as the radius intersects with the dividing line. If so, enter another branch of the node and continue to perform binary search until a leaf node is found, and repeat this cycle until the circle does not intersect with the dividing line; take each point in the obstacle's contour point cloud as the search target point, calculate each point according to the above method, and obtain the closest distance from each point in the obstacle's contour point cloud to the local trajectory, compare the closest distance from each point in the obstacle's contour point cloud to the local trajectory, and find the minimum value, which is the first distance;
[0085] In addition, any point in the local trajectory can be used as the search target point, and the coordinates of each point in the obstacle contour point cloud can be used as elements to construct a two-dimensional binary tree, and the first distance can be calculated in the above manner.
[0086] In this embodiment, the first distance is calculated by constructing a two-dimensional binary tree using the coordinates of each target point in the obstacle's contour point cloud as elements, thereby achieving the technical effect of saving calculation amount and improving the speed of the entire collision detection process.
[0087] Further, in one embodiment, referring to Figure 3 , Figure 3 For this application Figure 1 Detailed flow chart of step S30 in FIG. Figure 3 As shown, the method of determining the sweep trajectory of the vehicle's bounding box contour based on the local trajectory and calculating the second distance includes:
[0088] Step S31: obtaining the left and right sweeping trajectory of the bounding box contour of the vehicle in the local trajectory posture according to the acquired preset size and preset positioning center;
[0089] Exemplarily, the sweeping trajectory is two parallel lines, the width of the sweeping trajectory is the width of the vehicle, and the symmetry axis of the sweeping trajectory is on the preset positioning center. The width of the front and rear of many vehicles is slightly smaller than the width of the middle part of the body. If the width of the front and rear of the vehicle is used to obtain the sweeping trajectory of the bounding box contour, the result is that the front and rear of the vehicle will not collide with the obstacle but the body of the vehicle will collide with the obstacle, so the sweeping trajectory of the bounding box contour is determined by the width of the middle part of the body.
[0090] Step S32: determining the positional relationship between the obstacle and the local trajectory line, wherein the positional relationship includes the obstacle being on the left side, the right side and the front of the local trajectory line;
[0091] Exemplarily, a first vector is obtained, wherein the first vector is a vector from a preset center point of the vehicle to any point cloud in a contour point cloud of an obstacle; a second vector is obtained, wherein the second vector is a vector of a direction in which the vehicle travels along a local trajectory; a cross multiplication operation is performed on the first vector and the second vector to obtain a calculation result; based on the calculation result, a positional relationship between the obstacle and the local trajectory line is determined; if the calculation result is determined to be a positive number, the obstacle is determined to be on the left side of the local trajectory; if the calculation result is determined to be a negative number, the obstacle is determined to be on the right side of the local trajectory; if the calculation result is determined to be zero, the obstacle is determined to be directly in front of the local trajectory.
[0092] The specific method of the cross product operation in this embodiment is: the first vector is recorded as a, the second vector is recorded as b, the angle between a and b is recorded as θ, and the calculation result is recorded as y. Taking the vehicle's driving direction as the starting direction, rotate counterclockwise, and the counterclockwise rotation angle is recorded as θ, then y=|a|×|b|×sin(θ). When the obstacle is on the left side of the local trajectory, when 0°<θ<180°, then sin(θ)>0, y>0; when the obstacle is on the right side of the local trajectory, 180°<θ<360°, then sin(θ)<0, y<0; when the obstacle is directly in front of the local trajectory, θ=0°, then y=0. Therefore, the positional relationship between the obstacle and the local trajectory line can be determined based on the cross product calculation result.
[0093] Step S33: if the obstacle is on the left side of the local trajectory, the second distance is calculated according to the left sweep trajectory of the bounding box contour of the vehicle and the local trajectory;
[0094] Exemplarily, the distance values from each point on the left sweep trajectory of the vehicle's bounding box contour to each point on the local trajectory are calculated, and a minimum distance value is determined by comparing the sizes of the distance values. The minimum distance value is the second distance.
[0095] Step S34: If the obstacle is on the right side of the local trajectory, the second distance is calculated according to the sweep trajectory on the right side of the bounding box contour of the vehicle and the local trajectory.
[0096] Exemplarily, the distance values from each point on the sweeping trajectory of the right side of the vehicle's bounding box contour to each point on the local trajectory are calculated, and a minimum distance value is determined by comparing the sizes of the distance values. The minimum distance value is the second distance.
[0097] In this embodiment, by respectively calculating the shortest distance between the sweeping trajectory of the right side of the enclosing box of the vehicle and the local trajectory, necessary data basis is provided for the subsequent collision detection process.
[0098] In a second aspect, an embodiment of the present application also provides a collision detection device based on laser radar.
[0099] In one embodiment, referring to Figure 4 , Figure 4 This is a functional module diagram of an embodiment of a laser radar-based collision detection device of the present application. Figure 4 As shown, the laser radar-based collision detection device includes:
[0100] The acquisition module 01 is used to obtain the local trajectory and the outline point cloud of the obstacle in a preset distance, wherein the outline point cloud of the obstacle is obtained by scanning a preset laser radar;
[0101] A first calculation module 02 is used to calculate a first distance based on the local trajectory and the contour point cloud of the obstacle, wherein the first distance is the shortest distance between the local trajectory and the contour point cloud of the obstacle;
[0102] A second calculation module 03 is used to determine the sweep trajectory of the bounding box contour of the vehicle based on the local trajectory, and calculate a second distance, wherein the second distance is the shortest distance between the sweep trajectory of the bounding box contour and the local trajectory;
[0103] The analysis module 04 is used to determine whether the vehicle collides with the obstacle within the preset distance according to the first distance and the second distance.
[0104] Furthermore, in one embodiment, the first calculation module 02 is further used for:
[0105] Establish a plane coordinate system parallel to the ground;
[0106] Determine the coordinates of each point in the local trajectory in the plane coordinate system;
[0107] Using the plurality of said coordinates as elements, constructing a two-dimensional binary tree;
[0108] The two-dimensional binary tree is calculated by using a preset binary search-backtracking rule to calculate a first distance.
[0109] Furthermore, in one embodiment, the second calculation module 03 is also used for:
[0110] According to the preset size and the preset positioning center, the left and right sweeping trajectory of the bounding box contour of the vehicle in the local trajectory posture is obtained;
[0111] Determine a positional relationship between the obstacle and the local trajectory, wherein the positional relationship includes the obstacle being on the left side, the right side, and the front of the local trajectory;
[0112] If the obstacle is on the left side of the local trajectory, the second distance is calculated according to the left sweep trajectory of the bounding box contour of the vehicle and the local trajectory;
[0113] If the obstacle is on the right side of the local trajectory, the second distance is calculated according to the sweep trajectory on the right side of the bounding box contour of the vehicle and the local trajectory.
[0114] Furthermore, in one embodiment, the laser radar-based collision detection device further includes a new module for:
[0115] Acquire a first vector, wherein the first vector is a vector from a preset center point of the vehicle to any point cloud in a contour point cloud of the obstacle;
[0116] Acquire a second vector, wherein the second vector is a vector of the vehicle traveling in the direction of the local trajectory;
[0117] Perform a cross multiplication operation on the first vector and the second vector to obtain a calculation result;
[0118] According to the calculation result, the positional relationship between the obstacle and the local trajectory is determined.
[0119] Furthermore, in one embodiment, the laser radar-based collision detection device further includes a new module for:
[0120] If it is determined that the calculation result is a positive number, it is determined that the obstacle is on the left side of the local trajectory;
[0121] If it is determined that the calculation result is a negative number, it is determined that the obstacle is on the right side of the local trajectory;
[0122] If it is determined that the calculation result is zero, it is determined that the obstacle is directly in front of the local trajectory.
[0123] Furthermore, in one embodiment, the analysis module 04 is also used for:
[0124] If the first distance is greater than the second distance, it is determined that the vehicle collides with the obstacle within the preset distance;
[0125] If the first distance is less than or equal to the second distance, it is determined that the vehicle does not collide with the obstacle within the preset distance.
[0126] Furthermore, in one embodiment, the acquisition module 01 is also used for:
[0127] Obtaining a pre-stored driving trajectory route;
[0128] Predicting based on the driving trajectory route and the preset distance, obtaining a local trajectory within the preset distance;
[0129] The laser radar is preset to emit a laser signal to the preset distance in real time or at a fixed time, and a feedback signal corresponding to the laser signal is received;
[0130] Based on the laser intensity and coordinate information in the feedback signal, a plurality of point clouds are generated, and a height value of each of the point clouds is obtained;
[0131] Determining a plurality of target point clouds according to the height values of the point clouds and a preset height threshold;
[0132] Clustering the plurality of target point clouds to obtain a contour point cloud of each obstacle, wherein the number of the obstacle is at least one.
[0133] Furthermore, in one embodiment, the acquisition module 01 is also used for:
[0134] Acquire a pre-stored driving trajectory route; make a prediction based on the driving trajectory route and a preset distance, and acquire a local trajectory within the preset distance;
[0135] The laser radar is preset to emit a laser signal to the preset distance in real time or at a fixed time, and a feedback signal corresponding to the laser signal is received;
[0136] Based on the laser intensity and coordinate information in the feedback signal, a plurality of point clouds are generated, and a height value of each of the point clouds is obtained;
[0137] Determining a plurality of target point clouds according to the height values of the point clouds and a preset height threshold;
[0138] Clustering the plurality of target point clouds to obtain a contour point cloud of each obstacle, wherein the number of the obstacle is at least one.
[0139] Furthermore, in one embodiment, the first calculation module 02 is used to:
[0140] Establishing a plane coordinate system parallel to the ground; determining the coordinates of each point in the local trajectory in the plane coordinate system;
[0141] Using the plurality of said coordinates as elements, constructing a two-dimensional binary tree;
[0142] The two-dimensional binary tree is calculated by using a preset binary search-backtracking rule to calculate a first distance.
[0143] Furthermore, in one embodiment, the second calculation module 03 is also used for:
[0144] According to the preset size and the preset positioning center, the left and right sweeping trajectory of the bounding box contour of the vehicle in the local trajectory posture is obtained;
[0145] Determine a positional relationship between the obstacle and the local trajectory, wherein the positional relationship includes the obstacle being on the left side, the right side, and the front of the local trajectory;
[0146] If the obstacle is on the left side of the local trajectory, the second distance is calculated according to the left sweep trajectory of the bounding box contour of the vehicle and the local trajectory;
[0147] If the obstacle is on the right side of the local trajectory, the second distance is calculated according to the sweep trajectory on the right side of the bounding box contour of the vehicle and the local trajectory.
[0148] Furthermore, in one embodiment, the analysis module 04 is used to:
[0149] If the first distance is greater than the second distance, it is determined that the vehicle collides with the obstacle within the preset distance;
[0150] If the first distance is less than or equal to the second distance, it is determined that the vehicle does not collide with the obstacle within the preset distance.
[0151] Among them, the functional implementation of each module in the above-mentioned laser radar-based collision detection device corresponds to the various steps in the above-mentioned laser radar-based collision detection method embodiment, and its functions and implementation processes will not be repeated here one by one.
[0152] In a third aspect, an embodiment of the present application provides a laser radar-based collision detection device, which may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0153] Reference Figure 5 , Figure 5 The hardware structure diagram of the laser radar-based collision detection device involved in the embodiment of the present application is shown in FIG. In the embodiment of the present application, the laser radar-based collision detection device may include a processor, a memory, a communication interface, and a communication bus.
[0154] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0155] The communication interface includes input / output (I / O) interface, physical interface and logical interface, etc., which are used to realize the interconnection of devices inside the laser radar-based collision detection device, and the interface used to realize the interconnection between the laser radar-based collision detection device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.
[0156] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0157] The processor may be a general-purpose processor, which may call a laser radar-based collision detection program stored in a memory and execute the laser radar-based collision detection method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the laser radar-based collision detection program is called may refer to the various embodiments of the laser radar-based collision detection method of the present application, which will not be described in detail here.
[0158] Those skilled in the art will understand that Figure 5 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0159] In a fourth aspect, an embodiment of the present application also provides a computer-readable storage medium.
[0160] The computer-readable storage medium of the present application stores a laser radar-based collision detection program, wherein when the laser radar-based collision detection program is executed by a processor, the steps of the laser radar-based collision detection method as described above are implemented.
[0161] Among them, the method implemented when the laser radar-based collision detection program is executed can refer to the various embodiments of the laser radar-based collision detection method of the present application, and will not be repeated here.
[0162] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0163] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0164] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0165] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, 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” refers to two or more than two.
[0166] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0167] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0168] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A laser radar-based collision detection method, characterized in that: include: Obtaining a local trajectory and an obstacle contour point cloud in a preset distance, wherein the obstacle contour point cloud is obtained by scanning a preset laser radar; Calculating a first distance based on the local trajectory and the contour point cloud of the obstacle, wherein the first distance is a shortest distance between the local trajectory and the contour point cloud of the obstacle; Based on the local trajectory, determine a bounding box contour sweep trajectory of the vehicle, and calculate a second distance, wherein the second distance is a shortest distance between the bounding box contour sweep trajectory and the local trajectory; It is determined whether the vehicle collides with the obstacle within the preset distance according to the first distance and the second distance.
2. The laser radar-based collision detection method according to claim 1, characterized in that: The calculating a first distance based on the local trajectory and the contour point cloud of the obstacle includes: Establish a plane coordinate system parallel to the ground; Determine the coordinates of each point in the local trajectory in the plane coordinate system; Using the plurality of said coordinates as elements, constructing a two-dimensional binary tree; The two-dimensional binary tree is calculated by using a preset binary search-backtracking rule to calculate a first distance.
3. The laser radar-based collision detection method according to claim 1, characterized in that: The step of determining a sweep trajectory of a bounding box contour of the vehicle based on the local trajectory and calculating a second distance includes: According to the preset size and the preset positioning center, the left and right sweeping trajectory of the bounding box contour of the vehicle in the local trajectory posture is obtained; Determine a positional relationship between the obstacle and the local trajectory, wherein the positional relationship includes the obstacle being on the left side, the right side, and the front of the local trajectory; If the obstacle is on the left side of the local trajectory, the second distance is calculated according to the left sweep trajectory of the bounding box contour of the vehicle and the local trajectory; If the obstacle is on the right side of the local trajectory, the second distance is calculated according to the sweep trajectory on the right side of the bounding box contour of the vehicle and the local trajectory.
4. The laser radar-based collision detection method according to claim 3, characterized in that: Determining the positional relationship between the obstacle and the local trajectory line includes: Acquire a first vector, wherein the first vector is a vector from a preset center point of the vehicle to any point cloud in a contour point cloud of the obstacle; Acquire a second vector, wherein the second vector is a vector of the vehicle traveling in the direction of the local trajectory; Perform a cross multiplication operation on the first vector and the second vector to obtain a calculation result; According to the calculation result, the positional relationship between the obstacle and the local trajectory is determined.
5. The laser radar-based collision detection method according to claim 4, characterized in that: Determining the positional relationship between the obstacle and the local trajectory line according to the calculation result includes: If it is determined that the calculation result is a positive number, it is determined that the obstacle is on the left side of the local trajectory; If it is determined that the calculation result is a negative number, it is determined that the obstacle is on the right side of the local trajectory; If it is determined that the calculation result is zero, it is determined that the obstacle is directly in front of the local trajectory.
6. The laser radar-based collision detection method according to claim 1, characterized in that: The determining, based on the first distance and the second distance, whether the vehicle collides with the obstacle within the preset distance comprises: If the first distance is greater than the second distance, it is determined that the vehicle collides with the obstacle within the preset distance; If the first distance is less than or equal to the second distance, it is determined that the vehicle does not collide with the obstacle within the preset distance.
7. The laser radar-based collision detection method according to claim 1, characterized in that: The step of obtaining the local trajectory and the outline point cloud of the obstacle in the preset distance comprises: Obtaining a pre-stored driving trajectory route; Predicting based on the driving trajectory route and the preset distance, obtaining a local trajectory within the preset distance; The laser radar is preset to emit a laser signal to the preset distance in real time or at a fixed time, and a feedback signal corresponding to the laser signal is received; Based on the laser intensity and coordinate information in the feedback signal, a plurality of point clouds are generated, and a height value of each of the point clouds is obtained; Determining a plurality of target point clouds according to the height values of the point clouds and a preset height threshold; Clustering the plurality of target point clouds to obtain a contour point cloud of each obstacle, wherein the number of the obstacle is at least one.
8. A laser radar-based collision detection device, characterized in that: The laser radar-based collision detection device comprises: A data acquisition module, used to obtain a local track and a contour point cloud of an obstacle in a preset distance, wherein the contour point cloud of the obstacle is obtained by scanning a preset laser radar; A first calculation module, configured to calculate a first distance based on the local trajectory and the contour point cloud of the obstacle, wherein the first distance is a shortest distance between the local trajectory and the contour point cloud of the obstacle; A second calculation module is used to determine a bounding box contour sweep trajectory of the vehicle based on the local trajectory, and calculate a second distance, wherein the second distance is a shortest distance between the bounding box contour sweep trajectory and the local trajectory; An analysis module is used to determine whether the vehicle collides with the obstacle within the preset distance according to the first distance and the second distance.
9. A laser radar-based collision detection device, characterized in that: The laser radar-based collision detection device includes a processor, a memory, and a laser radar-based collision detection program stored in the memory and executable by the processor, wherein when the laser radar-based collision detection program is executed by the processor, the steps of the laser radar-based collision detection method as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a laser radar-based collision detection program, wherein when the laser radar-based collision detection program is executed by a processor, the steps of the laser radar-based collision detection method as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Nearest site searching method and device based on geographic position
CN108268493A
Collision distance determination method and system, vehicle and storage medium
CN111309013A
Grid and bounding box-based collision detection method
CN112669434A
Collision prediction and judgment method and device for autonomous vehicle
CN113119964A
Method for processing point cloud data acquired by laser radar
CN114488073A