Disclosure of Invention
In order to solve the above problems, the present invention provides a vehicle line pressing detection method, including:
the method comprises the steps of firstly, obtaining vehicle position coordinates of a vehicle to be analyzed, wherein the vehicle position coordinates represent coordinates of a specified point in a vehicle contour;
secondly, determining vehicle contour coordinates according to the vehicle position coordinates;
and thirdly, judging whether intersection points exist between the vehicle contour and the lane lines in the test site or not according to the vehicle contour coordinates and the lane line coordinates, wherein if the intersection points exist, judging that the vehicle to be analyzed currently has a line pressing behavior, and if not, judging that the vehicle to be analyzed currently does not have the line pressing behavior.
According to one embodiment of the invention, in the second step, the vertex coordinates of the vehicle contour are determined according to the vehicle position coordinates based on the relative distance relationship between the vertex of the vehicle contour and the designated point in the vehicle contour.
According to one embodiment of the present invention, in the second step,
constructing a first linear equation according to the position coordinates and the course angle of the vehicle;
respectively constructing a linear equation of a straight line formed by two adjacent vertexes in the four vertexes of the vehicle contour according to the first linear equation based on the relative distance relationship between the vertexes of the vehicle contour and the designated point in the vehicle contour, and correspondingly obtaining four vertex linear equations;
and respectively calculating the intersection points of the four vertex linear equations to obtain the vertex coordinates of the vehicle contour.
According to an embodiment of the invention, in the second step, the vertex coordinates of the vehicle contour are determined according to the vehicle position coordinates and the heading angle of the vehicle based on the preset quantitative relation between the vertex of the vehicle contour and the designated point and the heading angle in the vehicle contour.
According to an embodiment of the invention, in said step three,
the method comprises the steps of calling coordinates of lane line acquisition points from a map database of a preset site, and judging whether a line segment formed by a vehicle contour and a line segment formed by two adjacent lane line acquisition points in the lane line have an intersection point or not according to the coordinates of the lane line acquisition points and the coordinates of the vehicle contour, wherein if the intersection point exists, the current line pressing behavior of the vehicle to be analyzed is judged, and if not, the current line pressing behavior of the vehicle to be analyzed is judged.
According to one embodiment of the present invention, when determining whether two line segments have an intersection,
determining a linear equation of a first line segment according to coordinates of two end points of the first line segment in the two line segments;
determining a linear equation of a second line segment according to the coordinates of two end points of the second line segment;
and simultaneously establishing the linear equation of the first line segment and the linear equation of the second line segment, and judging whether the simultaneous equations have solutions or not, wherein if no solutions exist, the two line segments are judged not to have intersection points.
According to an embodiment of the invention, if the simultaneous equation has a solution, further judging whether the longitude or latitude of the solution of the simultaneous equation is within the longitude intersection or the latitude intersection of two line segments, if so, judging that the two line segments have an intersection, otherwise, judging that the two line segments do not have an intersection;
if the simultaneous equation has infinite solution, two end points of one line segment are taken, and whether the longitude or the latitude of the two end points is within the longitude range or the latitude range of the other line segment is judged, if the longitude or the latitude of at least one point of the two end points is within the longitude range or the latitude range of the other line segment, the two line segments are judged to have intersection, otherwise, the two line segments are judged not to have intersection.
According to an embodiment of the present invention, the coordinates of the lane line collection points stored in the preset site map library are divided according to road segment partitions, and in the third step, before the coordinates of the lane line collection points are retrieved from the preset site map database, the road segment partition where the vehicle to be analyzed is located in the site is determined according to the vehicle position coordinates, and the coordinates of the lane line collection points corresponding to the road segment partition where the vehicle to be analyzed is located are retrieved from the preset site map library.
According to one embodiment of the invention, when determining the section of the road segment where the vehicle to be analyzed is located in the field,
and respectively judging whether the vehicle to be analyzed is positioned in each polygon formed by point connecting lines of the outermost periphery of each road section partition according to the vehicle position coordinates, and determining the road section partition corresponding to the polygon containing the vehicle to be analyzed inside, thereby obtaining the road section partition where the vehicle to be analyzed is positioned in the field.
According to one embodiment of the present invention, it is determined whether the vehicle to be analyzed is always on the left side of the line segment constituting the polygon in the counterclockwise direction from the vehicle position coordinates and the vertex coordinates of the polygon, wherein if so, it is determined that the vehicle to be analyzed is within the polygon.
The vehicle line-pressing detection method provided by the invention can be used for automatically detecting whether the vehicle is pressed on the line in real time based on the geometric outline of the vehicle. Compared with the existing detection method, the detection method provided by the invention has higher detection precision and better real-time property, can be suitable for the test evaluation of the unmanned vehicles of different vehicle types, has high transportability, and can be widely applied to the test of the intelligent level of the unmanned vehicles and the quantitative evaluation thereof, thereby being beneficial to promoting the rapid development of the unmanned technology and ensuring that the unmanned vehicles can safely run under the real traffic environment.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Detailed Description
The following detailed description of the embodiments of the present invention will be provided with reference to the drawings and examples, so that how to apply the technical means to solve the technical problems and achieve the technical effects can be fully understood and implemented. It should be noted that, as long as there is no conflict, the embodiments and the features of the embodiments of the present invention may be combined with each other, and the technical solutions formed are within the scope of the present invention.
In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details or with other methods described herein.
Additionally, the steps illustrated in the flow charts of the figures may be performed in a computer system such as a set of computer-executable instructions and, although a logical order is illustrated in the flow charts, in some cases, the steps illustrated or described may be performed in an order different than here.
The existing method for judging whether the intelligent vehicle presses the lane line and violates the traffic rules is usually judged manually by a judge. However, the observation of the referees has a great subjectivity and tendency, and the test results may lose fairness and objectivity due to the tension of the game progress and the influence of factors such as the angle and visibility of the observation of the referees.
Aiming at the problems in the prior art, the invention provides a novel vehicle line pressing detection method which is particularly suitable for detecting the lane line pressing in the intelligent vehicle testing process. The method can detect whether the vehicle has the behavior of pressing the lane solid line in the driving process in real time by combining the geometric parameters of the vehicle, the vehicle position data and the high-precision map. Of course, according to actual needs, the method can also be applied to lane line pressing detection scenes for other reasonable vehicles.
Fig. 1 shows a schematic implementation flow chart of the vehicle line pressing detection method provided by the embodiment.
As shown in fig. 1, the vehicle line pressing detection method provided by the present embodiment first obtains vehicle position coordinates of a vehicle to be analyzed in step S101. Wherein the vehicle position coordinates characterize coordinates of a specified point within the vehicle contour.
Specifically, in the present embodiment, the method preferably acquires the vehicle position coordinates by a GPS positioning device provided on the vehicle. The outline of the vehicle is regarded as a rectangle, the height of the vehicle is ignored, a point is randomly found on the roof of the vehicle to be analyzed before the vehicle to be analyzed is tested, and the vehicle-mounted GPS positioning equipment is fixedly placed on the point, so that the GPS data acquired by the vehicle-mounted GPS positioning equipment is the coordinate of the point, and the vehicle position coordinate of the vehicle to be analyzed is obtained.
In the embodiment, the method can acquire the heading angle of the vehicle to be analyzed while acquiring the position coordinates of the vehicle.
It should be noted that in other embodiments of the present invention, the device for acquiring the position coordinates of the vehicle may also be other reasonable devices (for example, a Beidou satellite data receiving device, etc.), and the present invention is not limited thereto.
After obtaining the vehicle position coordinates, the method determines the vehicle contour coordinates according to the vehicle position coordinates in step S102, as shown in fig. 1. Specifically, in the present embodiment, it is preferable that the vertex coordinates of the vehicle contour be determined from the vehicle position coordinates in step S102 according to the relative distance relationship between the vertex of the vehicle contour and a specified point within the vehicle contour.
In order to more clearly illustrate the principle and process of determining the vehicle contour coordinates according to the vehicle position coordinates, the following is further described with reference to the implementation flow chart of the method for determining the vehicle contour coordinates in the embodiment shown in fig. 2 and the vehicle contour diagram shown in fig. 3.
As shown in fig. 2 and 3, the vehicle position coordinates (i.e., coordinates (x) of point a) are acquired0,y0) And a heading angle theta (e.g. the angle between the direction of travel of the vehicle and true north),the method can construct a first linear equation (i.e. a straight line L) according to the vehicle position coordinates and the heading angle theta in step S2011Equation (c).
For the vehicle to be analyzed, since the position of the point a in the vehicle contour is relatively constant, and the geometric parameters of the vehicle contour are also constant, the lengths of the line segment a, the line segment B, the line segment C, and the line segment D in fig. 3 are also constant, that is, the relative distance relationship between the four vertices (i.e., the point B, the point C, the point D, and the point E) of the vehicle contour and the point a is constant and known. In this way, the method can construct a linear equation of a straight line formed by two adjacent vertexes of the four vertexes in the vehicle contour according to the first linear equation constructed in step S201 based on the relative distance relationship between the vertexes of the vehicle contour and the specified point (i.e., the point a) in the vehicle contour in step S202, and correspondingly obtain four vertex linear equations (i.e., equations of a straight line formed by the point B and the point C, a straight line formed by the point C and the point D, a straight line formed by the point D and the point E, and a straight line formed by the point B and the point E).
After obtaining the four vertex line equations, the method may calculate the intersection points of the four vertex line equations in step S203, so as to obtain the vertex coordinates of the four vertices of the vehicle contour.
It should be noted that in other embodiments of the present invention, the method may also use other reasonable ways to determine the vehicle contour coordinates according to the vehicle position coordinates according to the actual needs, and the present invention is not limited thereto. For example, in one embodiment of the present invention, the method may further determine the vertex coordinates of the vehicle contour from the current vehicle position coordinates and the current heading angle of the vehicle based on a predetermined quantitative relationship between the vertices of the vehicle contour and the designated points and heading angles within the vehicle contour.
In this embodiment, the preset quantitative relationship between the vertex of the vehicle contour and the designated point and the heading angle in the vehicle contour is constructed in advance, and the coordinates of the point a, the heading angle and the coordinates of the vertex of the vehicle contour at different moments can be accurately measured by using the vehicle-mounted GPS device, so that the quantitative relationship between each vertex of the vehicle contour and the coordinates of the point a and the heading angle can be respectively determined.
As shown in fig. 1 again, in this embodiment, after obtaining the vehicle contour coordinates (i.e., the vertex coordinates of the vehicle contour), the method determines whether there is an intersection between the vehicle contour and the lane line in the test site in step S103 according to the vehicle contour coordinates and the lane line coordinates. If the intersection exists, the method determines that the vehicle to be analyzed currently has the line pressing behavior in step S104, otherwise, determines that the vehicle to be analyzed currently does not have the line pressing behavior in step S105.
Specifically, as shown in fig. 4, in this embodiment, the method may extract coordinates of the lane line collection points from the preset-site map database in step S401, and determine whether an intersection exists between a line segment formed by the vehicle contour and a line segment formed by two adjacent lane line collection points in the lane line based on the coordinates of the vehicle contour and the coordinates of the lane line collection points in step S402. If the intersection points exist (namely, for all line segments formed by two adjacent lane line acquisition points in the lane lines, the line segments intersected with the line segments formed by the vehicle outline exist), the method can judge that the line pressing behavior of the vehicle to be analyzed currently exists; and if the intersection point does not exist, the method can judge that the vehicle to be analyzed does not have the line pressing behavior currently.
In this embodiment, the coordinates of the lane line collection points stored in the preset site map library are divided according to road segment partitions, as shown in fig. 5, before the coordinates of the lane line collection points are retrieved from the preset site map database, the method further determines the road segment partition where the vehicle to be analyzed is located in the site according to the vehicle position coordinates in step S501, and retrieves the coordinates of the lane line collection points corresponding to the road segment partition where the vehicle to be analyzed is located determined in step S501 from the preset site map library in step S502.
Specifically, in this embodiment, when constructing the site map library, the method preferably draws a lane line map of the entire test site, and partitions the test site according to road segments, where the numbers are: region 1, region 2, region 3, region … …, region N. Wherein, two driving direction numbers of the same road section are: region 1a, region 2a, … …, region Na; zone 1b, zone 2b, … …, Nb zone.
Subsequently, the method collects all the solid lane lines (including the stop lines) in the test site by using an RTK device or the like. Wherein the straight lane line collects the GPS coordinates of one point every a first preset distance (e.g., 5.0 m). The curvature of the curve of the lane line of the curve in the actual road is small, so the method uses a straight line between two points to approximate the curve, and the GPS coordinates of one point are acquired at a second preset distance (for example, 0.5m) between the lane lines of the curve to smoothly fit the arc shape.
The coordinate points acquired by the method are named according to the modes of 1, 2, … … and N and classified under the road section partition numbers, namely the coordinate points of the lane lines under each road section partition Na and Nb are numbered as 1, 2, 3, … … and N.
It should be noted that, in different embodiments of the present invention, the first preset distance and the second preset distance may also be configured to be other reasonable values according to actual needs, wherein the second preset distance is preferably smaller than the first preset distance to ensure the accuracy of the curve lane line.
According to the method, two adjacent coordinate points in the same subarea are connected, a high-precision map of the whole test site is constructed according to an actual road structure and a lane line connection mode, and the precision reaches the level (such as centimeter level) of a lane line. Wherein, the point connecting line of the outermost periphery of each region can form a polygon.
When the road section partition of the vehicle to be analyzed in the field is determined according to the vehicle position coordinate, the method preferably judges whether the vehicle to be analyzed is located in each polygon formed by point connecting lines on the outermost periphery of each road section partition according to the vehicle position coordinate, so that the road section partition corresponding to the polygon containing the vehicle to be analyzed inside can be determined, and the road section partition of the vehicle to be analyzed in the field is obtained.
Specifically, in the present embodiment, the method preferably determines, in the counterclockwise direction, whether the vehicle to be analyzed is always on the left side of the line segment constituting the polygon, based on the vehicle position coordinates and the fixed point coordinates of the polygon, wherein, if so, it is determined that the vehicle to be analyzed is within the polygon.
For example, as shown in fig. 6, assume that there are two points P1 (coordinates (x) in the polygon6,y6) P2 (coordinates (x)7,y7) If it is determined whether the target point a (coordinates (x, y)) is within the polygon, then in this embodiment the method preferably first calculates the parameter T according to the following expression:
T=(y-y6)(x7-x6)-(x-x6)(y7-y6) (1)
subsequently, the method determines whether the value of the parameter T is greater than or equal to zero. If the value of the parameter T is greater than zero, the target point A is located on the line segment P1-P2Left side of (i.e. from point P)1To point P2To the left of the directional line segment); if the value of the parameter T is equal to zero, the target point A is located on the line segment P1-P2The above step (1); if the value of the parameter T is less than zero, the target point A is located in the line segment P1-P2To the right of (a).
For the line segments forming the polygon, the method can respectively judge the target point A and the line segment P according to the anticlockwise sequence and by the same principle1-P2Line segment P2-P3… …, line segment Pn-1-PnThe positional relationship of (a). If the point a is always on the left side of the line segment (included on the line segment), that is, the value of the parameter T is always greater than or equal to zero, the method may also consider that the target point is in the polygon. However, as long as there is a line segment that makes the value of the parameter T smaller than zero, the method can also consider that the target point is outside the polygon.
The lane line map of the whole test site can be divided into a plurality of road section partitions, the outermost point of each road section partition can form a polygon, and any two adjacent points can be connected into a line segment, so that the method can determine the road section partition of the vehicle to be analyzed in the site by using the method.
It should be noted that, because the driving track of the vehicle has continuity, when the method determines the section of the road where the vehicle to be analyzed is located in the field, the method may determine the section of the road where the vehicle to be analyzed is located in the field in combination with the section of the road where the vehicle to be analyzed is located in the field at the previous moment, thereby reducing the data processing amount.
Specifically, if the road segment in which the vehicle was located at the previous time is the 3a zone, the road segment in which the vehicle was located at the current time may be the 3a zone, the 4a zone, or the 3b zone because the driving track of the vehicle has continuity. This reduces the amount of unnecessary data processing and thus improves the efficiency of the method.
Of course, in other embodiments of the present invention, the method may also determine the road segment section where the vehicle to be analyzed is located in other reasonable manners, and the present invention is not limited thereto.
In this embodiment, after the coordinates of the lane line collection points are retrieved from the map database of the preset site, in step S402, it is determined whether an intersection exists between a line segment formed by the vehicle contour and a line segment formed by two adjacent lane line collection points in the lane line based on the coordinates of the vehicle contour and the coordinates of the lane line collection points.
Fig. 7 is a schematic flow chart illustrating an implementation process of determining whether two line segments intersect with each other in the method of the present embodiment, and the process is further described below with reference to the two line segments illustrated in fig. 8, where a line segment KT may represent one side of a vehicle contour, and a line segment MR may represent one side of a polygon formed by connecting points at the outermost periphery of a road segment in which a vehicle to be analyzed is located in a field.
As shown in fig. 7 and fig. 8, in the present embodiment, when determining whether there is an intersection between the line KT and the line MR, the method first determines a straight line equation of a first line segment (e.g., the line KT) according to coordinates of two endpoints (i.e., the endpoint K and the endpoint T) of the first line segment in step S701.
The method has determined the coordinates of the vertices of the vehicle contour in the above steps, and the line KT characterizes one side of the vehicle contour, so that the coordinates of two endpoints of the line KT, i.e. two adjacent vertices of the vehicle contour, are obviously known. According to the coordinates of the two end points, the method can construct a straight line equation of the straight line where the first line segment is located.
Likewise, the method may also determine a straight-line equation of a second line segment of the two line segments according to coordinates of two end points of the second line segment in step S702. In the method, the coordinates of the lane line acquisition points of the road section of the vehicle to be analyzed in the field are extracted in the steps, the second line segment represents one side of a polygon formed by connecting points of the outermost periphery of the road section of the vehicle to be analyzed in the field, and therefore the coordinates of two end points of the second line segment are also known. According to the coordinates of the two end points, the method can also construct a straight line equation for obtaining the straight line where the second line segment is located.
In step S703, the method combines the two linear equations and determines whether the combined equation has a solution. If the simultaneous equation is not solved, it means that there is no intersection point between the two straight lines (i.e. the two straight lines in the plane are parallel), and therefore there is no intersection point between the first line segment and the second line segment.
If the simultaneous equation has a solution, the method further determines whether the number of solutions of the simultaneous equation is one (i.e., whether the simultaneous equation has only one solution) in step S705. If the simultaneous equation has only one solution, it indicates that there is an intersection between the two lines. However, the existence of an intersection of two straight lines does not necessarily mean that two line segments of the two straight lines also have an intersection. Therefore, in this embodiment, the method determines in step S706 whether the longitude or latitude of the solution of the simultaneous equation is within the longitude intersection or the latitude intersection of the two line segments. If so, the method may determine in step S709 that there is an intersection of the two line segments, otherwise it may determine in step S704 that there is no intersection of the two line segments.
If there is an infinite solution to the simultaneous equations, as shown in fig. 7, in this embodiment, the method will take two end points of one line segment in step S707, and determine whether the longitude or latitude of the two end points is within the longitude range or latitude range of the other line segment in step S708. If at least one of the two end points is within the longitude range or the latitude range of another line segment, the method may determine that there is an intersection between the two line segments in step S709, otherwise, it may determine that there is no intersection between the two line segments in step S704.
Of course, in other embodiments of the present invention, according to actual needs, the method may also determine whether there is an intersection between the line segment formed by the vehicle contour and the line segment formed by two adjacent lane line collection points in the lane lines in other reasonable manners, which is not limited in the present invention.
Based on the principle, the method can judge whether the line segments forming the vehicle outline have intersection points with the line segments formed by two adjacent lane line acquisition points in the lane lines.
As shown in fig. 4 again, in this embodiment, as long as an intersection point exists between a line segment formed by the vehicle contour and one of line segments formed by two adjacent lane line collection points in the lane lines, the method can determine that a line pressing behavior currently exists in the vehicle to be analyzed; and if the line segment formed by the vehicle outline and each line segment formed by two adjacent lane line acquisition points in the lane lines do not have an intersection point, the method can judge that the vehicle to be analyzed does not have the line pressing behavior at present.
From the above description, it can be seen that the vehicle line-pressing detection method provided by the invention automatically detects whether the vehicle presses a line in real time based on the geometric profile of the vehicle. Compared with the existing detection method, the detection method provided by the invention has higher detection precision and better real-time property, can be suitable for the test evaluation of the unmanned vehicles of different vehicle types, has high transportability, and can be widely applied to the test of the intelligent level of the unmanned vehicles and the quantitative evaluation thereof, thereby being beneficial to promoting the rapid development of the unmanned technology and ensuring that the unmanned vehicles can safely run under the real traffic environment.
It is to be understood that the disclosed embodiments of the invention are not limited to the particular structures or process steps disclosed herein, but extend to equivalents thereof as would be understood by those skilled in the relevant art. It is also to be understood that the terminology used herein is for the purpose of describing particular embodiments only, and is not intended to be limiting.
Reference in the specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the invention. Thus, the appearances of the phrase "one embodiment" or "an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment.
While the above examples are illustrative of the principles of the present invention in one or more applications, it will be apparent to those of ordinary skill in the art that various changes in form, usage and details of implementation can be made without departing from the principles and concepts of the invention. Accordingly, the invention is defined by the appended claims.