Method and device for processing projection information of obstacles
By processing obstacle information and optimizing reference lines, the problem of inaccurate projection of obstacles on high curvature roads is solved, and higher projection accuracy is achieved.
Patent Information
- Application Number
- CN202111676682.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2041-12-31
AI Technical Summary
The prior art has high accuracy in the projection of obstacles when dealing with low curvature roads, but in high curvature roads such as U-shaped bends, there is a large error between the margins of obstacles and the actual scene, resulting in inaccurate projection.
By collecting information about obstacles, determining the vehicle's reference lines and processing them in segments, projecting each obstacle vertex, and recording projection data. Based on the projection data, determine whether the vertex is projected to the starting line segment and the terminating line segment of the reference line. If it is not projected, the positional relationship between the obstacle and the reference line is obtained and the reference line is optimized.
By optimizing the reference line, real-time perception of the curvature of the reference line and the spatial relationship between the obstacles and the environment, adaptive expansion and contraction of the head and tail parts of the reference line, improving the accuracy of obstacle projection.
Smart Images

Figure CN114359867B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information processing, and in particular to a method and device for processing projection information of an obstacle. Background Art
[0002] At present, the projection method of obstacles in the existing technology can ensure a small error when facing a low-curvature road. When the road curvature is too large, especially a U-turn, the projection method has major defects, and there is a large error between the edge of the represented obstacle and the actual scene.
[0003] Currently, no effective solution has been proposed for the above-mentioned technical problem of low accuracy in obstacle projection. Summary of the invention
[0004] The embodiments of the present invention provide a method and device for processing projection information of an obstacle, so as to at least solve the technical problem of low accuracy of obstacle projection.
[0005] According to one aspect of an embodiment of the present invention, a method for processing projection information of an obstacle is provided, comprising: if an obstacle is sensed during vehicle driving, collecting obstacle information of the obstacle, wherein the obstacle information comprises: vertex coordinates of at least one vertex of the obstacle; determining a reference line of the vehicle, and segmenting the reference line to obtain a plurality of sequentially connected reference line segments, wherein the reference line is a lane center line on a lane currently being driven by the vehicle; projecting each vertex of the obstacle onto all reference line segments in the reference line in sequence, and recording projection data after each projection; determining, based on the projection data of each vertex, whether each vertex is projected onto a starting line segment and an ending line segment of the reference line; if any vertex is not projected onto the starting line segment or the ending line segment, obtaining a positional relationship between the obstacle and the reference line; and optimizing the reference line based on the positional relationship between the obstacle and the reference line.
[0006] Optionally, after obtaining multiple reference line segments connected in sequence, the method also includes: obtaining the segment direction of each reference line segment; comparing the segment direction of the first reference line segment with the segment direction of any other reference line segment in the reference line; if any difference exceeds a predetermined angle, keeping the reference line unchanged; otherwise, executing the step of projecting any vertex of the obstacle to the corresponding reference line segment in the reference line.
[0007] Optionally, the projection data at least includes: a line segment number of the reference line segment projected to, and a distance between the vertex and the projection point falling on the reference line segment, wherein, based on the projection data of each vertex, determining whether each vertex is projected to the starting line segment and the ending line segment of the reference line, includes: based on the projection data of each vertex, determining the target reference line segment after each vertex is projected in the reference line, and obtaining the line segment direction of the target reference line segment; comparing the line segment direction of each target reference line segment with the line segment direction of the starting line segment to obtain multiple first comparison results, and counting the number of target reference line segments whose direction difference is less than a first angle as the first comparison result, to obtain a first statistical value; comparing the line segment direction of each target reference line segment with the line segment direction of the ending line segment to obtain multiple second comparison results, and counting the number of target reference line segments whose direction difference is less than a second angle as the second comparison result, to obtain a second statistical value; determining whether each vertex is projected to the starting line segment and the ending line segment of the reference line by judging whether the first statistical value and the second statistical value are empty.
[0008] According to another aspect of an embodiment of the present invention, a device for processing projection information of an obstacle is provided, comprising: a collection module, for collecting obstacle information of the obstacle if an obstacle is sensed during vehicle driving, wherein the obstacle information comprises: vertex coordinates of at least one vertex of the obstacle; a processing module, for determining a reference line of the vehicle and performing segmentation processing on the reference line to obtain a plurality of sequentially connected reference line segments, wherein the reference line is a lane center line on a lane currently being driven by the vehicle; a projection module, for projecting each vertex of the obstacle onto all reference line segments in the reference line in sequence, and recording projection data after each projection; a determination module, for determining whether each vertex is projected onto a starting line segment and an ending line segment of the reference line based on the projection data of each vertex; an acquisition module, for obtaining a positional relationship between the obstacle and the reference line if any vertex is not projected onto the starting line segment or the ending line segment; and an optimization module, for optimizing the reference line based on the positional relationship between the obstacle and the reference line.
[0009] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the method for processing projection information of an obstacle according to an embodiment of the present invention.
[0010] According to another aspect of an embodiment of the present invention, a processor is further provided. The processor is used to run a program. When the program is run, the method for processing projection information of an obstacle of an embodiment of the present invention is executed.
[0011] According to another aspect of an embodiment of the present invention, a vehicle is provided, including: a method for processing projection information of an obstacle according to an embodiment of the present disclosure.
[0012] In an embodiment of the present invention, during the driving process of a vehicle, if an obstacle is sensed, obstacle information of the obstacle is collected, wherein the obstacle information includes: vertex coordinates of at least one vertex of the obstacle; determining a reference line of the vehicle, and segmenting the reference line to obtain a plurality of sequentially connected reference line segments, wherein the reference line is a lane center line on a lane where the vehicle is currently driving; projecting each vertex of the obstacle onto all reference line segments in the reference line in sequence, and recording projection data after each projection; determining whether each vertex is projected onto a starting line segment and an ending line segment of the reference line based on the projection data of each vertex; if any vertex is not projected onto the starting line segment or the ending line segment, obtaining a positional relationship between the obstacle and the reference line; optimizing the reference line based on the positional relationship between the obstacle and the reference line, realizing real-time perception of the curvature of the reference line and the spatial relationship between the obstacle and the surrounding environment, and adaptively scaling the head and tail parts of the reference line, thereby solving the technical problem of low accuracy of obstacle projection, and achieving the technical effect of improving the accuracy of obstacle projection.
[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0015] Figure 1 is a flow chart of a method for processing projection information of an obstacle according to an embodiment of the present disclosure;
[0016] Figure 2 is a schematic diagram of the overall process of a polygonal obstacle projection method based on the Frenet coordinate system according to an embodiment of the present disclosure;
[0017] Figure 3 is a schematic diagram of a method for obstacle vertex projection according to an embodiment of the present disclosure;
[0018] Figure 4 is a schematic diagram of a reference line filling method according to an embodiment of the present disclosure;
[0019] Figure 5 is a schematic diagram of a reference line cutting method according to an embodiment of the present disclosure;
[0020] Figure 6 is a flow chart of a polygonal obstacle projection method based on the Frenet coordinate system according to an embodiment of the present disclosure;
[0021] Figure 7 It is a schematic diagram of a device for processing projection information of an obstacle according to a method for processing projection information of an obstacle in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof 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 necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] Example 1
[0025] The following is an introduction to a method for processing projection information of an obstacle in an embodiment of the present disclosure.
[0026] In the prior art, the vertices of the polygon are extracted as feature points, and the feature points are sequentially projected onto the reference line, i.e., the Frenet coordinate system. The feature points are then connected according to the original spatial relationship to be reassembled into a polygon. To ensure safety, the polygon can be expanded and the circumscribed rectangle of the polygon is used as the new obstacle outline. Since the traditional method only uses vertices as feature points, the original spatial relationship will be destroyed after projection. When the curvature of the reference line is too large, the reassembled polygon will be expanded several times, resulting in no solution for subsequent decisions.
[0027] The present invention analyzes the positional relationship between the obstacle and the reference line through vector operations, summarizes the situations of obstacle projection errors into two categories, and proposes corresponding solutions, reference line filling and reference line clipping. Reference line filling can ensure that all vertices of the obstacle are projected to the same side of the reference line during projection, preventing the obstacle outline from occupying the entire lane after projection. Reference line clipping can ensure that the obstacle will not be overstretched due to the excessive curvature of the reference line during projection.
[0028] Figure 1 is a flow chart of a method for processing projection information of an obstacle according to an embodiment of the present disclosure. Figure 1 As shown, the method may include the following steps:
[0029] Step S101: When a vehicle is traveling, if an obstacle is sensed, obstacle information of the obstacle is collected, wherein the obstacle information includes: vertex coordinates of at least one vertex of the obstacle.
[0030] In the technical solution provided in the above step S101 of the present disclosure, if an obstacle is sensed during vehicle driving, obstacle information of the obstacle is collected. For example, during vehicle driving, the coordinates and contour information of the obstacle are collected through the high-precision map module and the perception module.
[0031] In this embodiment, the obstacle may be a polygon occupying a certain space, and the obstacle information includes vertex coordinates of at least one vertex of the polygon.
[0032] In this embodiment, the collected obstacle information may be information based on a Cartesian coordinate system. To ensure the efficiency of the algorithm, the collected obstacle information based on a Cartesian coordinate system may be projected into a Frenet coordinate system.
[0033] Step S102, determining a reference line of the vehicle, and segmenting the reference line to obtain a plurality of sequentially connected reference line segments, wherein the reference line is the center line of the lane on which the vehicle is currently traveling.
[0034] In the technical solution provided in the above step S102 of the present disclosure, the reference line of the vehicle is determined. Optionally, after the collected obstacle information based on the Cartesian coordinate system is projected into the Frenet coordinate system, the center line of the lane on which the vehicle is currently traveling is determined as the reference line of the vehicle based on the Frenet coordinate system.
[0035] In this embodiment, the reference line is segmented to obtain multiple reference line segments that are connected in sequence. For example, based on the Frenet coordinate system, the reference line is uniformly sampled, and two adjacent sampling points can be connected as a line segment. In this way, the continuous and smooth reference line is discretized into multiple line segments, and the starting point coordinates, end point coordinates, and line segment direction of each line segment are calculated and stored.
[0036] Step S103: Project each vertex of the obstacle onto all reference line segments in the reference line in sequence, and record projection data after each projection.
[0037] In the technical solution provided in the above step S103 of the present disclosure, each vertex of the obstacle is projected onto all reference line segments in the reference line in turn. For example, the Frenet coordinate system uses the center line of the lane as the reference line, and the reference line can be an arbitrary curve. The coordinates of the obstacle in the Cartesian coordinate system are (x, y). The projection is made from the obstacle position to the reference line, and the projection point is F. The distance between point F and the vehicle position (x, y) is the lateral distance d. The curve distance from the starting point of the reference line to the projection point F is the longitudinal distance s. (s, d) is the coordinate of point F in the Frenet coordinate system.
[0038] In this embodiment, before projecting each vertex of the obstacle onto all reference line segments in the reference line in sequence, the line segment direction of the first line segment can be preset as θ1, the line segment direction of the i-th line segment can be preset as θ i , if there exists ||θ i If -θ1||>90°, the vertices of the polygonal obstacle are projected onto the reference line one by one; otherwise, the reference line remains unchanged.
[0039] In this embodiment, the projection data after each projection is recorded, and optionally, the line segment number i, line segment distances s and d at each projection point are recorded.
[0040] Step S104: determining whether each vertex is projected onto a start line segment and an end line segment of the reference line based on the projection data of each vertex.
[0041] In this embodiment, based on the projection data of each vertex, it is determined whether each vertex is projected to the starting segment and the ending segment of the reference line. Optionally, the direction of the segment to which each vertex of the obstacle is projected is recorded, and the recorded direction is compared with the direction of the starting segment and the ending segment of the reference line.
[0042] In this embodiment, based on the projection data of each vertex, it is determined whether each vertex is projected to the starting line segment and the ending line segment of the reference line. Optionally, the method includes: defining two counters count1 and count2, and initializing them to 0; recording the direction of the line segment to which each vertex of the obstacle is projected, and comparing the recorded direction with the direction of the starting line segment and the ending line segment of the reference line. If the difference with the direction of the starting line segment is less than 5°, the value of count1 is increased by 1. If the difference with the direction of the ending line segment is less than 5°, the value of count2 is increased by 1; performing the above operation on all vertices, after the execution is completed, if both count1 and count2 are greater than 0 and the sum of the two is the total number of vertices, it means that the obstacle has a projection error, and step S105 is executed.
[0043] Step S105: If any vertex is not projected onto the starting line segment or the ending line segment, the positional relationship between the obstacle and the reference line is obtained.
[0044] In this embodiment, if any vertex is not projected to the starting line segment or the ending line segment, the positional relationship between the obstacle and the reference line is obtained. For example, if any vertex is not projected to the starting line segment or the ending line segment, it indicates that the obstacle has a projection error, and the positional relationship between the obstacle and the reference line can be further determined.
[0045] In this embodiment, the positional relationship between the obstacle and the reference line is obtained, and optionally, the positional relationship of the reference line convex to the obstacle is obtained. The method includes: projecting the vertices of the obstacle onto all line segments in the reference line in turn, recording two vectors that appear in each projection, which are the vector pointing from the projection point to the vertex, and the direction vector of the corresponding line segment; cross-producting the two vectors, and if there are different signs in the cross-product result, it means that the reference line is convex to the obstacle.
[0046] In this embodiment, the positional relationship between the obstacle and the reference line is obtained, and optionally, the positional relationship of the reference line concave toward the obstacle is obtained. The method includes: projecting the vertices of the obstacle onto all line segments in the reference line in turn, recording two vectors that appear in each projection, which are the vector from the projection point to the vertex, and the direction vector of the corresponding line segment; performing a cross product on the two vectors, traversing all the cross product results, and when the results are all of the same sign, it means that the reference line is concave toward the obstacle.
[0047] Step S106: optimizing the reference line based on the positional relationship between the obstacle and the reference line.
[0048] In this embodiment, the reference line is optimized based on the positional relationship between the obstacle and the reference line. Optionally, after the positional relationship between the obstacle and the reference line is acquired, the reference line may be filled or clipped.
[0049] In this embodiment, optionally, after obtaining the positional relationship of the reference line convex to the obstacle, the reference line is filled in, and the method includes: drawing a perpendicular line through the vertex to the extension line of the starting line segment, recording the length d′ of the perpendicular line and the distance s′ of the foot of the perpendicular on the reference line, if the s′ value is not within the reference line length range, and d′ is less than d, updating the coordinates of the projection point to (s′, d′); drawing a perpendicular line through the vertex to the extension line of the ending line segment, recording the length d′ of the perpendicular line and the curve distance s′ of the foot of the perpendicular on the reference line, if the s′ value is not within the reference line length range, and d′ is less than d, changing the coordinates of the projection point to (s′, d′).
[0050] In this embodiment, optionally, after obtaining the positional relationship of the reference line concave to the obstacle, the reference line is clipped, and the method includes: starting from the starting line segment and traversing all line segments backwards, if the angle difference between the i-th line segment and the initial line segment is greater than 5°, stopping the traversal and recording the line segment sequence number i; if the line segment where the vehicle is located is after the line segment i, using the line segment i as the new starting line segment of the reference line, and projecting the vertices on the newly generated reference line, sequentially connecting the vertices to obtain the obstacle projection in the Frenet coordinate system; if the line segment where the vehicle is located is before the line segment i, no additional clipping is performed. External operation: traverse all line segments from the termination line segment forward. If the angle difference between the i-th line segment and the termination line segment is greater than 5°, stop traversal and update the line segment number i. If the line segment where the vehicle is located is before line segment i, use line segment i as the new termination line segment of the reference line, and project the vertices on the newly generated reference line, and connect the vertices in sequence to obtain the obstacle projection in the Frenet coordinate system. If the line segment where the vehicle is located is after line segment i, no additional operation is performed, and the vertices are projected on the newly generated reference line, and the vertices are connected in sequence to obtain the obstacle projection in the Frenet coordinate system.
[0051] Through the above steps S101 to S106, during the driving process of the vehicle, if an obstacle is sensed, obstacle information of the obstacle is collected, wherein the obstacle information includes: vertex coordinates of at least one vertex of the obstacle; determining the reference line of the vehicle, and segmenting the reference line to obtain multiple reference line segments connected in sequence, wherein the reference line is the lane center line of the lane on which the vehicle is currently driving; projecting each vertex of the obstacle to all reference line segments in the reference line in sequence, and recording the projection data after each projection; determining whether each vertex is projected to the starting line segment and the ending line segment of the reference line based on the projection data of each vertex; if any vertex is not projected to the starting line segment or the ending line segment, obtaining the positional relationship between the obstacle and the reference line; optimizing the reference line based on the positional relationship between the obstacle and the reference line, realizing real-time perception of the curvature of the reference line and the spatial relationship between the obstacle and the surrounding environment, and adaptively scaling the head and tail parts of the reference line, thereby solving the technical problem of low accuracy of obstacle projection and achieving the technical effect of improving the accuracy of obstacle projection.
[0052] The above method of this embodiment is further described in detail below.
[0053] As an optional implementation, in step S102, after obtaining a plurality of sequentially connected reference line segments, the method further includes: obtaining the segment direction of each reference line segment; performing a difference comparison between the segment direction of the first reference line segment and the segment direction of any other reference line segment in the reference line; if any difference exceeds a predetermined angle, keeping the reference line unchanged; otherwise, executing the step of projecting any vertex of the obstacle to the corresponding reference line segment in the reference line.
[0054] In this embodiment, the line segment direction of each reference line segment is obtained, and the line segment direction of the first reference line segment is compared with the line segment direction of any other reference line segment in the reference line. For example, the reference line is uniformly sampled, and two adjacent sampling points can be connected as a line segment, thereby discretizing the continuous and smooth reference line into multiple line segments, and calculating the starting point coordinates, end point coordinates, and line segment direction of each line segment, and storing them. Let the line segment direction of the first line segment be θ1, and the line segment direction of the i-th line segment be θ i , to determine whether there is θ i -θ1||>90°.
[0055] In this embodiment, if any difference exceeds the predetermined angle, the reference line is kept unchanged. Otherwise, the step of projecting any vertex of the obstacle to the corresponding reference line segment in the reference line is performed. Optionally, if there is no ||θ iIf -θ1||>90°, the reference line is kept unchanged, otherwise the step of projecting any vertex of the obstacle to the corresponding reference line segment in the reference line is performed.
[0056] As an optional implementation, the projection data in step S104 at least includes: the line segment number of the reference line segment projected to, and the distance between the vertex and the projection point falling on the reference line segment, wherein, based on the projection data of each vertex, determining whether each vertex is projected to the starting line segment and the ending line segment of the reference line, includes: based on the projection data of each vertex, determining the target reference line segment after each vertex is projected in the reference line, and obtaining the line segment direction of the target reference line segment; comparing the line segment direction of each target reference line segment with the line segment direction of the starting line segment to obtain multiple first comparison results, and counting the number of target reference line segments whose direction difference is less than the first angle as the first comparison result, to obtain a first statistical value; comparing the line segment direction of each target reference line segment with the line segment direction of the ending line segment to obtain multiple second comparison results, and counting the number of target reference line segments whose direction difference is less than the second angle as the second comparison result, to obtain a second statistical value; determining whether each vertex is projected to the starting line segment and the ending line segment of the reference line by judging whether the first statistical value and the second statistical value are empty.
[0057] In this embodiment, based on the projection data of each vertex, the target reference line segment after each vertex is projected into the reference line is determined, and the segment direction of the target reference line segment is obtained. For example, based on the projection data of each vertex, the direction of the line segment to which each vertex of the obstacle is projected is recorded.
[0058] In this embodiment, before obtaining the line segment direction of the target reference line segment, two counters count1 and count2 may be defined and initialized to 0.
[0059] In this embodiment, the segment direction of each target reference line segment is compared with the segment direction of the starting line segment to obtain multiple first comparison results, and the number of target reference line segments whose first comparison results have a direction difference less than a first angle is counted to obtain a first statistic. For example, after obtaining the segment direction of the target reference line segment, the recorded direction is compared with the directions of the starting line segment and the ending line segment of the reference line. If the direction difference with the starting line segment is less than 5°, the count1 value is increased by 1.
[0060] In this embodiment, the segment direction of each target reference line segment is compared with the segment direction of the termination segment to obtain multiple second comparison results, and the number of target reference line segments whose second comparison results have a direction difference less than a second angle is counted to obtain a second statistical value. For example, after obtaining the segment direction of the target reference line segment, the recorded direction is compared with the directions of the starting line segment and the termination line segment of the reference line. If the direction difference with the termination line segment is less than 5°, the count2 value is increased by 1.
[0061] In this embodiment, by judging whether the first statistical value and the second statistical value are empty, it is determined whether each vertex is projected to the starting segment and the ending segment of the reference line. For example, the directions of all recorded vertices are compared with the directions of the starting segment and the ending segment of the reference line. After execution, it is determined whether count1 and count2 are both greater than 0 and their sum is the total number of vertices.
[0062] As an optional implementation, if both the first statistic and the second statistic are not empty, it is determined that no vertex is projected onto the starting line segment or the ending line segment; if both the first statistic and the second statistic are empty, it is determined that there is no error in the obstacle projection.
[0063] In this embodiment, if both the first statistical value and the second statistical value are not empty, it is determined that any vertex is not projected to the starting line segment or the ending line segment. If both the first statistical value and the second statistical value are empty, it is determined that there is no error in the obstacle projection. For example, if count1 and count2 are both greater than 0 and the sum of the two is the total number of vertices, it indicates that there is an error in the obstacle projection. Otherwise, it indicates that there is no error in the obstacle projection.
[0064] As an optional implementation, the positional relationship between the obstacle and the reference line is obtained, including: obtaining from the projection data the projection point on the reference line segment when each vertex is projected onto the corresponding reference line segment; obtaining the pointing vector of the projection point pointing to the vertex, and the direction vector of the corresponding reference line segment; performing a cross product calculation based on the pointing vector and the direction vector to obtain multiple cross product results; if any of the cross product results have different signs, it is determined that the direction of the reference line is convex toward the obstacle; if the cross product results are all of the same sign, it is determined that the direction of the reference line is concave toward the obstacle.
[0065] In this embodiment, the projection point that falls on the reference line segment when each vertex is projected onto the corresponding reference line segment is obtained from the projection data; the pointing vector from the projection point to the vertex and the direction vector of the corresponding reference line segment are obtained. For example, when it is determined that an error occurs in the obstacle projection, the obstacle vertex is projected onto all the line segments in the reference line in turn, and the two vectors that appear in each projection are recorded, namely the vector from the projection point to the vertex and the direction vector of the corresponding line segment.
[0066] In this embodiment, a cross product calculation is performed based on the pointing vector and the direction vector to obtain multiple cross product results. For example, a cross product calculation is performed on the vector pointing from the projection point to the vertex and the direction vector of the corresponding line segment to obtain multiple cross product results.
[0067] In this embodiment, if any cross product result has different signs, it is determined that the direction of the reference line is convex toward the obstacle. For example, if two vectors are cross-producted and the cross product result has different signs, it means that the reference line is convex toward the obstacle.
[0068] In this embodiment, if all cross product results have the same sign, it is determined that the direction of the reference line is concave toward the obstacle. For example, when two vectors are cross-producted and all cross product results are traversed and the results have the same sign, it means that the reference line is concave toward the obstacle.
[0069] As an optional implementation, the reference line is optimized based on the positional relationship between the obstacle and the reference line, including: if the positional relationship is that the reference line is convex toward the obstacle, the reference line is padded; if the positional relationship is that the reference line is concave toward the obstacle, the reference line is cropped.
[0070] In this embodiment, if the positional relationship is that the reference line is convex toward the obstacle, the reference line is padded. Optionally, the method includes: drawing perpendicular lines through the vertex to the extension lines of the starting line segment and the ending line segment respectively.
[0071] In this embodiment, if the positional relationship is that the reference line is a concave obstacle, the reference line is clipped. Optionally, the method includes: traversing all line segments backwards from the starting line segment and traversing all line segments forwards from the ending line segment.
[0072] As an optional implementation, the reference line is padded, including: extending one end of the starting line segment and / or the ending line segment of the reference line until the projection point of the vertex onto the starting line segment and / or the ending line segment falls on the extension line.
[0073] In this embodiment, one end of the starting line segment and / or the ending line segment of the reference line is extended until the projection point when the vertex is projected onto the starting line segment and / or the ending line segment falls on the extension line. For example, after determining that the reference line is convex to the obstacle, the reference line is padded, and a perpendicular line is drawn through the vertex to the extension line of the starting line segment and / or the ending line segment. The length d′ of the perpendicular line and the distance s′ of the foot of the perpendicular on the reference line are recorded. If the value of s′ is not within the length range of the reference line and d′ is less than d, the coordinates of the projection point are updated to (s′, d′).
[0074] As an optional implementation, the reference line is cropped, including: traversing all reference line segments in sequence starting from the starting line segment of the reference line; if the angle difference between any reference line segment and the starting line segment is greater than an angle threshold, the reference line segment is used as a new starting line segment of the reference line, and the vertex is reprojected onto the newly generated reference line.
[0075] In this embodiment, all reference line segments are traversed in sequence starting from the starting line segment of the reference line. If the angle difference between any reference line segment and the starting line segment is greater than the angle threshold, the reference line segment is used as the new starting line segment of the reference line, and the vertex is re-projected on the newly generated reference line. For example, after determining that the reference line is concave toward the obstacle, the reference line is cropped, and all line segments are traversed backward from the starting line segment. If the angle difference between the i-th line segment and the initial line segment is greater than 5°, the traversal is stopped and the line segment number i is recorded. If the line segment where the vehicle is located is after line segment i, line segment i is used as the new starting line segment of the reference line, and the vertex is projected on the newly generated reference line. The vertices are connected in sequence to obtain the obstacle projection in the Frenet coordinate system. If the line segment where the vehicle is located is before line segment i, no additional operation is performed.
[0076] As an optional implementation, the reference line is cropped, including: starting from the termination segment of the reference line, traversing all reference line segments in sequence; if the angle difference between any reference line segment and the termination segment is greater than an angle threshold, the reference line segment is used as the new termination segment of the reference line, and the vertex is reprojected onto the newly generated reference line.
[0077] In this embodiment, all reference line segments are traversed in sequence starting from the termination line segment of the reference line. If the angle difference between any reference line segment and the termination line segment is greater than the angle threshold, the reference line segment is used as the new termination line segment of the reference line, and the vertex is re-projected on the newly generated reference line. For example, after determining that the reference line is a concave obstacle, the reference line is clipped, and all line segments are traversed forward from the termination line segment. If the angle difference between the i-th line segment and the termination line segment is greater than 5°, the traversal is stopped and the line segment sequence i is updated. If the line segment where the vehicle is located is before line segment i, line segment i is used as the new termination line segment of the reference line, and the vertex is projected on the newly generated reference line, and the vertices are connected in sequence to obtain the obstacle projection in the Frenet coordinate system. If the line segment where the vehicle is located is located after line segment i, no additional operation is performed, and the vertex is projected on the newly generated reference line, and the vertices are connected in sequence to obtain the obstacle projection in the Frenet coordinate system.
[0078] This embodiment obtains the segment direction of each reference line segment; compares the segment direction of the first reference line segment with the segment direction of any other reference line segment in the reference line; if any difference exceeds a predetermined angle, keeps the reference line unchanged; otherwise, executes the step of projecting any vertex of the obstacle to the corresponding reference line segment in the reference line; determines whether each vertex is projected to the starting segment and the ending segment of the reference line; obtains the positional relationship between the obstacle and the reference line; determines that the reference line is a convex obstacle and fills the reference line; determines that the reference line is a concave obstacle and crops the reference line, thereby realizing real-time perception of the curvature of the reference line and the spatial relationship between the obstacle and the surrounding environment, adaptively scaling the first and last parts of the reference line, thereby solving the technical problem of low accuracy of obstacle projection and achieving the technical effect of improving the accuracy of obstacle projection.
[0079] Example 2
[0080] The method for processing projection information of obstacles disclosed in the present invention is further introduced below in conjunction with preferred embodiments.
[0081] Figure 2 is a schematic diagram of the overall process of a projection method for polygonal obstacles based on the Frenet coordinate system according to an embodiment of the present disclosure, such as Figure 2 As shown, the method may include the following steps:
[0082] S201, calculating the maximum deflection angle of the reference line;
[0083] S202, determining whether the reference line deflection angle is greater than 90 degrees;
[0084] S203, if the reference line deflection angle is greater than 90 degrees, projecting the vertices of the obstacle in sequence;
[0085] S204, determining whether the obstacle vertex is projected onto the starting and ending sections of the reference line;
[0086] S205, if the obstacle vertex is projected onto the starting and ending sections of the reference line, further determining whether the reference line is convex toward the obstacle;
[0087] S206: If the reference line is convex toward the obstacle, a reference line padding process is performed; if the reference line is concave toward the obstacle, a reference line clipping process is performed.
[0088] Through steps S201 to S206 in this embodiment, the maximum deflection angle of the reference line is calculated, and when it is determined that the deflection angle of the reference line is greater than 90 degrees, the vertices of the obstacle are projected in sequence. When the vertices of the obstacle are projected onto the starting and ending sections of the reference line, the reference line is filled and clipped according to whether the reference line is convex toward the obstacle, respectively. This achieves real-time perception of the curvature of the reference line and the spatial relationship between the obstacle and the surrounding environment, and adaptively scales the head and tail parts of the reference line, thereby solving the technical problem of low accuracy of obstacle projection and achieving the technical effect of improving the accuracy of obstacle projection.
[0089] Figure 3 is a schematic diagram of a method for obstacle vertex projection according to an embodiment of the present disclosure, such as Figure 3 As shown, the method may include the following:
[0090] The reference line in the figure is composed of several line segments. The rectangular block represents the geometric outline of the obstacle. A vertex A of the obstacle is projected onto the reference line, and the projection point is F. The line segment AF is perpendicular to the line segment i. The length of the line segment AF is d. The total length of the line segments from the starting point of the reference line to point F is s. The coordinates of point A in the Frenet coordinate system are (s, d).
[0091] Figure 4 is a schematic diagram of a reference line filling method according to an embodiment of the present disclosure, such as Figure 4 As shown, the method may include the following:
[0092] Draw a perpendicular line through the vertex to the extension line of the starting segment and / or the ending segment, record the length d′ of the perpendicular line and the distance s′ of the foot of the perpendicular on the reference line. If the value of s′ is not within the length range of the reference line and d′ is less than d, update the coordinates of the projection point to (s′, d′).
[0093] Figure 5 is a schematic diagram of a reference line cutting method according to an embodiment of the present disclosure, such as Figure 5 As shown, the method may include the following:
[0094] Traverse all line segments backward from the starting line segment and / or the ending line segment. If the angle difference between the i-th line segment and the initial line segment is greater than 5°, stop traversal and record the line segment number i. If the line segment where the vehicle is located is after line segment i, use line segment i as the new starting line segment of the reference line, and project the vertices on the newly generated reference line, and connect the vertices in sequence to obtain the obstacle projection in the Frenet coordinate system. If the line segment where the vehicle is located is before line segment i, no additional operation is performed; if the line segment where the vehicle is located is before line segment i, use line segment i as the new ending line segment of the reference line, and project the vertices on the newly generated reference line, and connect the vertices in sequence to obtain the obstacle projection in the Frenet coordinate system. If the line segment where the vehicle is located is after line segment i, no additional operation is performed, and the vertices are projected on the newly generated reference line, and the vertices are connected in sequence to obtain the obstacle projection in the Frenet coordinate system.
[0095] Figure 6 is a flowchart of a polygonal obstacle projection method based on the Frenet coordinate system according to an embodiment of the present disclosure, such as Figure 6 As shown, the method may include the following steps:
[0096] Step S601, collecting, processing and storing reference line data.
[0097] In the above technical solution provided in step S601 of the embodiment of the present disclosure, the reference line is uniformly sampled, and two adjacent sampling points can be connected as a line segment, thereby discretizing the continuous and smooth reference line into multiple line segments, and calculating the starting point coordinates, end point coordinates, and line segment direction of each line segment and storing them.
[0098] Step S602, determining that the maximum deflection angle of the reference line is greater than 90 degrees.
[0099] In the above technical solution provided in step S602 of the embodiment of the present disclosure, the line segment direction of the first line segment is θ1, the line segment direction of the i-th line segment is θ i , if there exists ||θ i -θ1||>90°, execute step S603, otherwise exit the algorithm.
[0100] Step S603: Project the vertices of the polygonal obstacle onto the reference line in sequence, and record the projection results.
[0101] In the above technical solution provided in step S603 of the embodiment of the present disclosure, the projection result is as follows: Figure 3 As shown, the projection result includes the line segment number i, line segment distance s and d of each projection point, where s is the total length of the line segment from the starting point of the reference line to the vertex of the obstacle, and d is the length of the line segment from the vertex of the obstacle projected onto the reference line.
[0102] Step S604: determine that each obstacle vertex is projected to the starting area and the ending area of the reference line respectively.
[0103] In the above technical solution provided in step S604 of the embodiment of the present disclosure, it is determined that each obstacle vertex is projected to the starting area and the ending area of the reference line respectively, and the specific steps are as follows:
[0104] First, define two counters count1 and count2 and initialize them to 0;
[0105] Secondly, record the direction of the line segment projected onto each vertex of the obstacle, and compare the recorded direction with the direction of the starting and ending segments of the reference line. If the direction difference with the starting segment is less than 5°, count1 increases by 1; if the direction difference with the ending segment is less than 5°, count2 increases by 1;
[0106] Finally, the above operation is performed on all vertices. After the execution is completed, if count1 and count2 are both greater than 0 and the sum of the two is the total number of vertices, it means that the obstacle has a projection error, and step S605 is continued.
[0107] Step S605: determine the positional relationship between the obstacle and the reference line.
[0108] In the above technical solution provided in step S605 of the embodiment of the present disclosure, the positional relationship between the obstacle and the reference line is determined, and the specific steps are as follows:
[0109] First, project the obstacle vertices onto all line segments in the reference line in turn, and record the two vectors that appear in each projection, namely the vector from the projection point to the vertex and the direction vector of the corresponding line segment;
[0110] Next, the two vectors are cross-producted. If the cross-product result has different signs, it means that the reference line is convex toward the obstacle, and step S606 is executed;
[0111] Finally, all cross product results are traversed. When the results are all of the same sign, it means that the reference line is concave toward the obstacle, and step S607 is executed.
[0112] Step S606, performing reference line filling.
[0113] In the above technical solution provided in step S606 of the embodiment of the present disclosure, reference line filling is performed, and the specific steps are as follows:
[0114] Draw a perpendicular line through the vertex to the extension line of the starting line segment, record the length d′ of the perpendicular line and the distance s′ of the foot of the perpendicular on the reference line. If the value of s′ is not within the length range of the reference line and d′ is less than d, update the coordinates of the projection point to (s′, d′);
[0115] Draw a perpendicular line through the vertex to the extension line of the terminal segment, record the length d′ of the perpendicular line and the curve distance s′ of the foot of the perpendicular on the reference line. If the value of s′ is not within the length range of the reference line and d′ is less than d, change the coordinates of the projection point to (s′, d′).
[0116] Step S607, executing reference line cutting.
[0117] In the above technical solution provided in step S607 of the embodiment of the present disclosure, reference line clipping is performed, and the specific steps are as follows:
[0118] Traverse all line segments backward from the starting line segment. If the angle difference between the i-th line segment and the initial line segment is greater than 5°, stop traversing and record the line segment number i;
[0119] If the line segment where the vehicle is located is after line segment i, line segment i is used as a new starting line segment of the reference line and the process jumps to step S608. If the line segment where the vehicle is located is before line segment i, no additional operation is performed.
[0120] Traverse all line segments forward from the end line segment. If the angle difference between the i-th line segment and the end line segment is greater than 5°, stop traversal and update the line segment number i.
[0121] If the line segment where the vehicle is located is before line segment i, line segment i is used as the new termination line segment of the reference line and the process jumps to step S608. If the line segment where the vehicle is located is after line segment i, no additional operation is performed and step S608 is executed.
[0122] Step S608: Project the vertices onto the newly generated reference line, and connect the vertices in sequence to obtain the obstacle projection in the Frenet coordinate system.
[0123] In this embodiment, by collecting, processing and storing reference line data; determining that the maximum deflection angle of the reference line is greater than 90 degrees; projecting the vertices of the polygonal obstacle onto the reference line in sequence, and recording the projection results; determining that each obstacle vertex is projected onto the starting area and the ending area of the reference line respectively; judging the positional relationship between the obstacle and the reference line; performing reference line filling; performing reference line clipping; projecting the vertices onto the newly generated reference line, and sequentially connecting the vertices to obtain the obstacle projection in the Frenet coordinate system, real-time perception of the reference line curvature and the spatial relationship between the obstacle and the surrounding environment is achieved, and the first and last parts of the reference line are adaptively expanded and contracted, thereby solving the technical problem of low accuracy of obstacle projection and achieving the technical effect of improving the accuracy of obstacle projection.
[0124] It should be noted that the steps in the above embodiments of the present disclosure do not have to be executed in the above step order. For example, the order of executing the above step S606 and step S607 can be interchanged.
[0125] Example 3
[0126] The present disclosure also provides a method for executing Figure 1 The method for obtaining projection information of an obstacle and the device for processing projection information of an obstacle of the illustrated embodiment.
[0127] Figure 7 is a schematic diagram of an obstacle projection information processing device according to a method for processing obstacle projection information according to an embodiment of the present disclosure, such as Figure 7 As shown, the device 70 for processing the projection information of the obstacle may include: a collection module 71 , a processing module 72 , a projection module 73 , a determination module 74 , an acquisition module 75 and an optimization module 76 .
[0128] The acquisition module 71 is used to acquire obstacle information of the obstacle if an obstacle is sensed during the driving process of the vehicle, wherein the obstacle information includes: vertex coordinates of at least one vertex of the obstacle;
[0129] The processing module 72 is used to determine the reference line of the vehicle and perform segment processing on the reference line to obtain a plurality of sequentially connected reference line segments, wherein the reference line is the center line of the lane on which the vehicle is currently traveling;
[0130] The projection module 73 is used to project each vertex of the obstacle onto all reference line segments in the reference line in sequence, and record the projection data after each projection;
[0131] A determination module 74, for determining whether each vertex is projected onto a starting line segment and an ending line segment of a reference line based on the projection data of each vertex;
[0132] An acquisition module 75, for acquiring a positional relationship between an obstacle and a reference line if any vertex is not projected onto a starting line segment or an ending line segment;
[0133] The optimization module 76 is used to optimize the reference line based on the positional relationship between the obstacle and the reference line.
[0134] Optionally, the processing module 72 includes: a first processing unit, a second processing unit, a third processing unit, and a fourth processing unit. The first processing unit is used to obtain the line segment direction of each reference line segment; the second processing unit is used to compare the line segment direction of the first reference line segment with the line segment direction of any other reference line segment in the reference line; the third processing unit is used to keep the reference line unchanged if any difference exceeds a predetermined angle; the fourth processing unit is used to perform the step of projecting any vertex of the obstacle to the corresponding reference line segment in the reference line if no difference exceeds a predetermined angle.
[0135] Optionally, the determination module 74 includes: a first determination unit, a second determination unit, a third determination unit, a fourth determination unit, a fifth determination unit and a sixth determination unit. The first determining unit is used to determine the target reference line segment after each vertex is projected in the reference line based on the projection data of each vertex, and obtain the line segment direction of the target reference line segment; the second determining unit is used to compare the line segment direction of each target reference line segment with the line segment direction of the starting line segment, obtain multiple first comparison results, and count the number of target reference line segments whose direction difference is less than the first angle in the first comparison result, to obtain a first statistical value; the third determining unit is used to compare the line segment direction of each target reference line segment with the line segment direction of the ending line segment, obtain multiple second comparison results, and count the number of target reference line segments whose direction difference is less than the second angle in the second comparison result, to obtain a second statistical value; the fourth determining unit is used to determine whether the first statistical value and the second statistical value are empty, and determine whether each vertex is projected to the starting line segment and the ending line segment of the reference line; the fifth determining unit is used to determine that any vertex is not projected to the starting line segment and the ending line segment if both the first statistical value and the second statistical value are empty; the sixth determining unit is used to determine that there is no error in the obstacle projection if both the first statistical value and the second statistical value are empty.
[0136] Optionally, the acquisition module 75 includes: a first acquisition unit, a second acquisition unit, a third acquisition unit, a fourth acquisition unit and a fifth acquisition unit. The first acquisition unit is used to acquire from the projection data the projection point on the reference line segment when each vertex is projected onto the corresponding reference line segment; the second acquisition unit is used to acquire the pointing vector of the projection point pointing to the vertex and the direction vector of the corresponding reference line segment; the third acquisition unit is used to perform a cross multiplication operation based on the pointing vector and the direction vector to obtain a plurality of cross multiplication results; the fourth acquisition unit is used to acquire the positional relationship of the reference line convex to the obstacle if any vertex does not project the starting line segment or the ending line segment; the fifth acquisition unit is used to acquire the positional relationship of the reference line concave to the obstacle if any vertex does not project onto the starting line segment or the ending line segment.
[0137] Optionally, the optimization module 76 includes: a first optimization unit and a second optimization unit, wherein the first optimization unit includes a first optimization first submodule, and the second optimization unit includes a second optimization first submodule, a second optimization second submodule, a second optimization third submodule and a second optimization fourth submodule. The first optimization unit is used to perform reference line filling processing based on the positional relationship of the reference line convex to the obstacle; the first optimization first submodule is used to extend one end of the starting line segment and / or the ending line segment of the reference line until the projection point when the vertex is projected onto the starting line segment and / or the ending line segment falls on the extension line; the second optimization unit is used to perform reference line filling and clipping processing based on the positional relationship of the reference line concave to the obstacle; the second optimization first submodule is used to traverse all reference line segments in sequence starting from the starting line segment of the reference line; the second optimization second submodule is used to use the reference line segment as the new starting line segment of the reference line segment if the angle difference between any line segment and the starting line segment is greater than the angle threshold, and reproject the vertex on the newly generated reference line segment; the second optimization third submodule is used to traverse all reference line segments in sequence starting from the ending line segment of the reference line; the second optimization fourth submodule is used to use the reference line segment as the new ending line segment of the reference line segment if the angle difference between any line segment and the ending line segment is greater than the angle threshold, and reproject the vertex on the newly generated reference line segment.
[0138] In the device for processing projection information of obstacles in this embodiment, obstacle information of obstacles is collected by the collection module 71, the processing module 72 determines the reference line of the vehicle, and performs segmentation processing on the reference line to obtain multiple reference line segments connected in sequence, the projection module 73 projects each vertex of the obstacle to all reference line segments in the reference line in sequence, and records the projection data after each projection, the determination module 74 determines whether each vertex is projected to the starting line segment and the ending line segment of the reference line based on the projection data of each vertex, the acquisition module 75 obtains the positional relationship between the obstacle and the reference line if any vertex is not projected to the starting line segment or the ending line segment, and the optimization module 76 optimizes the reference line based on the positional relationship between the obstacle and the reference line, thereby realizing real-time perception of the curvature of the reference line and the spatial relationship between the obstacle and the surrounding environment, and adaptively scaling the head and tail parts of the reference line, thereby solving the technical problem of low accuracy of obstacle projection and achieving the technical effect of improving the accuracy of obstacle projection.
[0139] Example 4
[0140] According to an embodiment of the present invention, a computer-readable storage medium is also provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the device where the computer-readable storage medium is located is controlled to execute the method for processing projection information of an obstacle according to an embodiment of the present invention.
[0141] Example 5
[0142] According to an embodiment of the present invention, a processor is further provided. The processor is used to run a program. When the program is run, the method for processing projection information of an obstacle according to an embodiment of the present invention is executed.
[0143] Example 6
[0144] According to an embodiment of the present disclosure, the present disclosure also provides a vehicle, including a method for processing projection information of an obstacle according to an embodiment of the present disclosure.
[0145] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0146] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0147] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, units or models, which can be electrical or other forms.
[0148] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0149] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0150] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0151] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for processing projection information of an obstacle, characterized in that: include: During the driving process of the vehicle, if an obstacle is sensed, obstacle information of the obstacle is collected, wherein the obstacle information includes: vertex coordinates of at least one vertex of the obstacle; Determine a reference line of the vehicle, and segment the reference line to obtain a plurality of sequentially connected reference line segments, wherein the reference line is a lane centerline of a lane in which the vehicle is currently traveling; Projecting each vertex of the obstacle onto all reference line segments in the reference line in sequence, and recording projection data after each projection; Based on the projection data of each vertex, determining whether each vertex is projected to the starting line segment and the ending line segment of the reference line; If any vertex is not projected onto the starting line segment or the ending line segment, obtaining a positional relationship between the obstacle and the reference line; Based on the positional relationship between the obstacle and the reference line, the reference line is optimized, wherein the optimization includes padding and clipping; Among them, obtaining the positional relationship between the obstacle and the reference line includes: obtaining from the projection data the projection point that falls on the reference line segment when each vertex is projected to the corresponding reference line segment; obtaining the pointing vector of the projection point pointing to the vertex, and the direction vector of the corresponding reference line segment; performing a cross multiplication calculation based on the pointing vector and the direction vector to obtain a plurality of cross multiplication results; and determining the positional relationship based on the plurality of cross multiplication results.
2. The method according to claim 1, characterized in that After obtaining a plurality of sequentially connected reference line segments, the method further includes: Obtaining the line segment direction of each reference line segment; Compare the line segment direction of the first reference line segment with the line segment direction of any other reference line segment in the reference line; If any of the differences exceeds a predetermined angle, the reference line is kept unchanged; Otherwise, the step of projecting any vertex of the obstacle to a corresponding reference line segment in the reference line is performed.
3. The method according to claim 1, characterized in that The projection data at least includes: a line segment number of a reference line segment projected to, and a distance between a vertex and a projection point falling on the reference line segment, wherein, based on the projection data of each vertex, determining whether each vertex is projected to a starting line segment and an ending line segment of the reference line includes: Based on the projection data of each vertex, determine the target reference line segment after each vertex is projected on the reference line, and obtain the line segment direction of the target reference line segment; Compare the line segment direction of each target reference line segment with the line segment direction of the starting line segment to obtain a plurality of first comparison results, and count the number of target reference line segments whose direction difference in the first comparison result is less than the first angle to obtain a first statistical value; Compare the line segment direction of each target reference line segment with the line segment direction of the termination line segment to obtain a plurality of second comparison results, and count the number of target reference line segments whose direction difference in the second comparison result is less than the second angle to obtain a second statistical value; By judging whether the first statistical value and the second statistical value are empty, it is determined whether each vertex is projected to the starting line segment and the ending line segment of the reference line.
4. The method according to claim 3, characterized in that If both the first statistical value and the second statistical value are not empty, it is determined that any vertex is not projected onto the starting line segment or the ending line segment; If both the first statistical value and the second statistical value are empty, it is determined that no error occurs in the obstacle projection.
5. The method according to any one of claims 1 to 4, characterized in that: Determining the positional relationship based on the plurality of cross product results includes: If any of the cross product results has different signs, determining that the direction of the reference line is convex toward the obstacle; If all the cross product results have the same sign, it is determined that the direction of the reference line is concave toward the obstacle.
6. The method according to claim 5, characterized in that Based on the positional relationship between the obstacle and the reference line, optimizing the reference line includes: If the positional relationship is that the reference line is convex toward the obstacle, the reference line is padded; If the positional relationship is that the reference line is concave toward the obstacle, the reference line is clipped.
7. The method according to claim 6, characterized in that The reference line is filled, including: One end of the starting line segment and / or the ending line segment of the reference line is extended until the projection point of the vertex onto the starting line segment and / or the ending line segment falls on the extension line of the reference line.
8. The method according to claim 6, characterized in that The reference line is clipped, including: Starting from the starting line segment of the reference line, traverse all reference line segments in sequence; If the angle difference between any reference line segment and the starting line segment is greater than the angle threshold, the reference line segment is used as the new starting line segment of the reference line, and the vertex is reprojected on the newly generated reference line.
9. The method according to claim 6, characterized in that The reference line is clipped, including: Starting from the end segment of the reference line, traverse all reference line segments in sequence; If the angle difference between any reference line segment and the termination line segment is greater than the angle threshold, the reference line segment is used as the new termination line segment of the reference line, and the vertex is reprojected on the newly generated reference line.
10. A device for processing projection information of an obstacle, characterized in that: include: A collection module, used for collecting obstacle information of an obstacle if an obstacle is sensed during the driving process of the vehicle, wherein the obstacle information includes: vertex coordinates of at least one vertex of the obstacle; A processing module, used to determine a reference line of the vehicle, and perform segment processing on the reference line to obtain a plurality of sequentially connected reference line segments, wherein the reference line is a lane center line of a lane on which the vehicle is currently traveling; A projection module, used to project each vertex of the obstacle onto all reference line segments in the reference line in sequence, and record projection data after each projection; A determination module, configured to determine, based on the projection data of each vertex, whether each vertex is projected onto a starting line segment and an ending line segment of the reference line; An acquisition module, configured to acquire a positional relationship between the obstacle and the reference line if any vertex is not projected onto the starting line segment or the ending line segment; An optimization module, configured to optimize the reference line based on the positional relationship between the obstacle and the reference line, wherein the optimization includes padding and clipping; The acquisition module can also be used to obtain the positional relationship between the obstacle and the reference line, including: obtaining from the projection data the projection point on the reference line segment when each vertex is projected onto the corresponding reference line segment; obtaining the pointing vector from the projection point to the vertex, and the direction vector of the corresponding reference line segment; A cross product calculation is performed based on the pointing vector and the direction vector to obtain multiple cross product results.
Citation Information
Patent Citations
Collision detection method and system, readable storage medium, and computer device
CN108959753A
Reference line smoothing method using piecewise spiral curves with weighted geometry costs
US20200003564A1