Occupancy grid-based predicted trajectory correction method and device, and autonomous vehicle
By dividing and clustering the raster map, occupies the raster polyline and fits the correlation curve with the lane boundary, solving the problems of large computation and low efficiency in the existing technology, and realizing efficient and accurate prediction trajectory correction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN DEEPROUTE AI CO LTD
- Filing Date
- 2022-12-01
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies correct the predicted trajectory by judging the relationship between the grid where the obstacle is located and the predicted trajectory one by one when a stationary obstacle is occluded. This process is computationally intensive and inefficient.
By dividing and clustering the raster map, occupied raster polylines are generated, and curves are fitted based on the correlation between the occupied raster polylines and the boundaries of lanes in the same direction to correct the predicted trajectory.
It achieves accurate correction of predicted trajectories with low computational load and high computational efficiency.
Smart Images

Figure CN115933654B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of autonomous driving technology, and in particular to a method, apparatus, smart terminal, and computer-readable storage medium for predictive trajectory correction based on an occupied grid. Background Technology
[0002] With the development of artificial intelligence technology, autonomous driving technology is gradually emerging. Trajectory prediction for autonomous driving is a core part of the autonomous driving process, which involves predicting the trajectory of the autonomous vehicle (referred to as the "autonomous vehicle") based on obstacles around it.
[0003] When a stationary obstacle is obstructed or other reasons prevent the vehicle's LiDAR from illuminating the obstacle, the generated predicted trajectory will assume that the grid cell containing the obstacle is not occupied, misclassifying the area containing these grid cells as a passable area, resulting in an inaccurate predicted trajectory. Therefore, the predicted trajectory needs to be corrected.
[0004] Currently, the main method to correct the predicted trajectory is to determine the relationship between the grid where the obstacle is located and the predicted trajectory one by one. This method involves a large amount of computation and low computational efficiency.
[0005] Therefore, existing technologies need to be improved and enhanced. Summary of the Invention
[0006] The main objective of this invention is to provide a method, apparatus, autonomous vehicle, smart terminal, and computer-readable storage medium for predictive trajectory correction based on an occupied grid, aiming to solve the problems of high computational load and low computational efficiency in the prior art when correcting predicted trajectories.
[0007] To achieve the above objectives, a first aspect of the present invention provides a method for predicting trajectory correction based on an occupied grid, comprising:
[0008] Acquire the perception information of the current frame, and generate a grid map of the current frame based on the perception information, wherein the grid where a stationary obstacle is located is represented as an occupied grid in the grid map;
[0009] The raster map is divided into multiple grids based on a preset size;
[0010] The grid is filtered according to preset matching conditions to obtain a first grid set;
[0011] Based on the proximity relationships between the grids, the grids in the first grid set are clustered to obtain multiple second grid sets;
[0012] Based on the occupied grid in each grid of the second grid set, generate multiple occupied grid polylines that correspond one-to-one with the second grid set;
[0013] Based on the correlation between the occupied grid polyline and the boundary of the lane in the same direction, the occupied grid polyline is fitted to obtain multiple fitted curves;
[0014] The predicted trajectory is corrected in response to the intersection of the predicted trajectory with any of the fitted curves.
[0015] Optionally, the step of generating multiple occupied grid lines corresponding one-to-one with the second grid set based on the occupied grid in each grid of the second grid set includes:
[0016] For each occupied grid in each of the second grid sets, fit the occupied grid cells to obtain multiple fitting curves that correspond one-to-one with the second grid set;
[0017] Each fitted curve that corresponds one-to-one with the second grid set is converted into a curve segment to obtain the occupied grid polyline.
[0018] Optionally, based on the correlation between the occupied grid polyline and the boundary of the lane in the same direction, the occupied grid polyline is fitted to obtain multiple fitted curves, including:
[0019] Determine the relationship between the occupied grid polyline and the boundary of the lane in the same direction;
[0020] The fitted curve is obtained by fitting all the occupied grid polylines associated with the same boundary.
[0021] Optionally, the lane boundaries in the same direction include at least one of the following: the left and right boundaries of the lane, the left and right boundaries of the preceding lane, and the left and right boundaries of the following lane.
[0022] Optionally, determining the association between the occupied grid polyline and the boundary of the lane in the same direction includes:
[0023] Calculate the lateral coordinates of all nodes on the occupied grid line relative to the boundary in the Frenet coordinate system;
[0024] When the lateral coordinate values of all nodes on the occupied grid line are less than a set threshold, the occupied grid line is associated with the boundary.
[0025] Optionally, the correction of the predicted trajectory includes:
[0026] Establish a Frenet coordinate system along the fitted curve;
[0027] The velocity of the predicted trajectory in the lateral direction is attenuated by a preset acceleration to obtain a corrected predicted trajectory.
[0028] Optionally, the step of filtering the grid according to preset matching conditions to obtain a first grid set includes:
[0029] Calculate the number of grid cells occupied in each of the aforementioned grids;
[0030] Add a number of grids greater than the set threshold to the first network set.
[0031] Optionally, after generating the raster map of the current frame based on the perceived information, the method further includes:
[0032] Retrieve historical raster maps for a preset number of frames;
[0033] The historical raster map is overlaid with the generated raster map of the current frame, and the raster map of the current frame is updated with the overlaid raster map.
[0034] Optionally, after generating the raster map of the current frame and / or obtaining the fitted curve, the occupied raster holes are also corrected, where the occupied raster holes are raster cells that cannot be illuminated by the lidar.
[0035] Optionally, the correction of occupied grid holes includes:
[0036] When an object is detected passing through the occupied grid hole, the properties of the occupied grid hole are corrected.
[0037] Optionally, after correcting the holes occupying the grid, the following also applies:
[0038] Based on the occupied grid holes, the fitted curve is extended or corrected.
[0039] A second aspect of the present invention provides a predicted trajectory correction apparatus based on an occupied grid, wherein the apparatus comprises:
[0040] The grid map module is used to acquire the perception information of the current frame and generate a grid map of the current frame based on the perception information, wherein the grid where the stationary obstacle is located is represented as an occupied grid in the grid map;
[0041] A grid division module is used to divide the grid map into multiple grids based on a preset size;
[0042] The filtering module is used to filter the grid according to preset matching conditions to obtain a first grid set;
[0043] A clustering module is used to cluster the grids in the first grid set based on the proximity relationship between the grids to obtain multiple second grid sets;
[0044] The occupying grid polyline module is used to generate multiple occupying grid polylines that correspond one-to-one with the second grid set based on the occupying grid in each grid of each second grid set;
[0045] The curve fitting module is used to fit the occupied grid polyline based on the relationship between the occupied grid polyline and the boundary of the lane in the same direction, and obtain multiple fitted curves.
[0046] A trajectory correction module is used to correct the predicted trajectory in response to the intersection of the predicted trajectory with any of the fitted curves.
[0047] A third aspect of the present invention provides an autonomous vehicle, the autonomous vehicle including a memory, a processor, and an occupation-grid-based predicted trajectory correction program stored in the memory and executable on the processor, wherein the occupation-grid-based predicted trajectory correction program, when executed by the processor, implements any of the steps of the occupation-grid-based predicted trajectory correction method.
[0048] A fourth aspect of the present invention provides a computer-readable storage medium storing a prediction trajectory correction program based on an occupied grid, wherein the prediction trajectory correction program based on an occupied grid, when executed by a processor, implements any of the steps of the prediction trajectory correction method based on an occupied grid.
[0049] As can be seen from the above, this invention first divides and clusters the raster map, then generates occupied raster polylines based on the occupied rasters of the same type of grid. Based on the association between the occupied raster polylines and the boundaries of lanes in the same direction, the occupied raster polylines associated with the same boundary are fitted into curves. The predicted trajectory is corrected based on whether the fitted curve intersects with the predicted trajectory. Compared with existing technologies, this invention not only accurately corrects the predicted trajectory but also requires less computation and has higher computational efficiency. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 This is a schematic diagram of the predicted trajectory correction method based on occupied grid provided in an embodiment of the present invention;
[0052] Figure 2 yes Figure 1 A detailed flowchart of step S600 in the embodiment is shown below;
[0053] Figure 3 yes Figure 1 A schematic diagram illustrating the specific process of the method for correcting grid jitter in the embodiment;
[0054] Figure 4 This is a schematic diagram of the structure of the predicted trajectory correction device based on the occupied grid provided in an embodiment of the present invention;
[0055] Figure 5 This is a block diagram illustrating the internal structure of a smart terminal provided in an embodiment of the present invention. Detailed Implementation
[0056] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0057] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0058] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0059] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0060] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0061] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0063] When a stationary obstacle is obstructed or otherwise prevents the vehicle's LiDAR from illuminating it, the generated predicted trajectory may misclassify the grid cell containing the obstacle as an unoccupied area, leading to inaccurate trajectory prediction. Therefore, trajectory correction is necessary. However, current methods that correct the predicted trajectory by individually determining the relationship between the obstacle's grid cell and the predicted trajectory are computationally intensive and inefficient.
[0064] To address the aforementioned technical problems, this invention provides a method for correcting predicted trajectories based on an occupancy grid. This method can be integrated into devices with driving trajectory prediction or predictive trajectory functionality, such as autonomous vehicles, robots, and AGVs. It generates occupancy grid polylines based on the occupancy grid, filters these polylines based on their correlation with the vehicle's boundary, and fits the polylines related to the same boundary to a curve. The predicted trajectory is then corrected based on the intersection of the fitted curve and the predicted trajectory. Compared to existing methods that correct predicted trajectories by individually determining the relationship between the grid containing obstacles and the predicted trajectory, this method requires less computation and is more efficient.
[0065] Exemplary methods
[0066] This embodiment provides a predicted trajectory correction method based on an occupied grid, which is deployed as a module of an autonomous navigation device on the vehicle's intelligent terminal. Figure 1 As shown, this embodiment specifically includes the following steps:
[0067] Step S100: Obtain the perception information of the current frame, and generate a grid map of the current frame based on the perception information, wherein the grid where the stationary obstacle is located is represented as an occupied grid in the grid map;
[0068] Specifically, a grid map refers to a gridded map of the surrounding environment when a vehicle is traveling. Stationary obstacles are those that remain stationary in the surrounding environment when the vehicle is moving. Common examples include green belts, guardrails, stationary vehicles, median barriers, trees, and road shoulders. In a grid map, the grid cells occupied by stationary obstacles are called occupied grid cells, and a grid map containing occupied grid cells is called an occupancy grid map. Each grid cell is filled with binary values 0 and 1, where 1 indicates that the grid cell is occupied by a stationary obstacle, and 0 indicates that the grid cell has no stationary obstacles. An occupancy grid map describes the static environment within the road travel area, meaning that dynamic objects (vehicles, pedestrians, etc.) must be removed when generating an occupancy grid map. Generally, a grid map contains multiple stationary obstacles, and all grid cells in the grid map have the same size, such as 0.3 meters * 0.3 meters.
[0069] The vehicle's LiDAR system collects static environmental information about the surrounding environment while the vehicle is in motion, obtains perception information about stationary obstacles in the current frame, and generates a grid map of the current moment, i.e., the grid map of the current frame, using statistical methods or deep learning algorithms based on the perception information.
[0070] Currently, the LiDAR on the vehicle can only acquire grid maps within 80 meters in front of the vehicle. Additionally, if there is a taller object next to a green belt, or if the vehicle is driving close to a green belt or guardrail, the LiDAR's illumination may be blocked, causing the green belt next to the object to not be detected as occupying a grid. These situations will create occupied grid holes, indicating that it is uncertain whether there is a stationary obstacle on the corresponding grid. Therefore, occupied grid holes may also exist on the grid map.
[0071] In one embodiment, the vehicle's automatic navigation device can automatically construct an environmental map in real time using a grid method, that is, automatically generate a grid map, so that the grid map of the current frame can be directly obtained from the interface of the automatic navigation device.
[0072] Step S200: Divide the raster map into multiple grids based on a preset size;
[0073] Step S300: Filter the grids according to preset matching conditions to obtain the first grid set;
[0074] Specifically, based on a preset grid size, such as 5 meters by 5 meters, the occupied raster map is divided into multiple grids. Each grid includes multiple graticles, and may also include multiple occupied graticles. Since the number of occupied graticles in each frame of the raster map is relatively large, and existing technologies directly use occupied graticles to calculate the relationship between occupied graticles and trajectories, the computational load is high and the efficiency is low. This invention, by dividing the raster map into grids, allows for subsequent classification and calculations at the grid granularity, improving computational efficiency.
[0075] The preset matching conditions are determined based on the requirements for grid filtering and are not specifically limited. Based on the preset matching conditions, grids irrelevant to the corrected predicted trajectory can be filtered out. For example, in this embodiment, the number of occupied grid cells in each grid is counted. If the number of occupied grid cells is less than a set threshold, such as 10, the grid is removed and not included in subsequent calculations and processing; if the number of occupied grid cells exceeds the set threshold, the grid is added to the grid set to obtain the first grid set, which includes the filtered grid cells.
[0076] The specific method for counting the number of occupied grid cells in each grid is as follows: determine the boundary area of each grid, and if the center coordinates of the occupied grid cell are located within the boundary area of grid A, then increment the number of occupied grid cells in grid A by one, until the relationship between all occupied grid cells and grid cells on the grid map is determined.
[0077] Step S400: Based on the proximity relationship between grids, cluster the grids in the first grid set to obtain multiple second grid sets;
[0078] Specifically, taking a single grid as an example, its surrounding grid may have multiple proximity relationships, such as three or four grids. For instance, a grid on the edge of a road, with grids to its left, top, bottom, and left, is classified as a three-nearest neighbor; a grid in the middle of the road, with grids to its top, bottom, left, and right, is classified as a four-nearest neighbor; and even in a grid forming a nine-square grid, the grid in the center of the nine-square grid is classified as an eight-nearest neighbor. After clustering the grids in the first grid set according to proximity relationships such as four-nearest neighbors, we can obtain M types of grids. All grids in each type form a second grid set, and the second grid set contains more than one grid of the same type. Corresponding to the M types of grids, there are M second grid sets. The specific number of M is related to the complexity of the raster map and the shape and size of the raster map obtained by LiDAR scanning.
[0079] Step S500: Based on the occupied grid in each grid of each second grid set, generate multiple occupied grid polylines that correspond one-to-one with the second grid set;
[0080] Specifically, based on the grid clustering performed in step S400, a third-order or higher-order curve is used to perform least-squares fitting on all grids in each second grid set, that is, on the occupied grids in the same type of grid. Each second grid set yields one fitted curve after fitting, and all second grid sets yield M fitted curves. The fitting method can be as follows: first, obtain the coordinates of each occupied grid in the same type of grid, and then perform least-squares fitting based on these coordinates. It should be noted that various existing techniques in the art can be used to fit the grids to curves, which will not be elaborated upon here.
[0081] Then, based on the start and end points of the fitted curve, the occupying grids corresponding to the start and end points are determined. Next, the occupying grids intersecting the first fitted curve are selected. Based on the center points of these occupying grids, the fitted curve is transformed into a curve segment represented by multiple line segments composed of these center points. For ease of description, these curve segments are referred to as occupying grid polylines. Each occupying grid polyline corresponds one-to-one with the second grid set. The aforementioned center points are the nodes of the occupying grid polylines. This transformation step is also called occupying grid vectorization. In one embodiment, by segmenting and averaging the coordinates of all occupying grids in each second grid set, and then connecting the occupying grids adjacent to the average point, an occupying grid polyline is obtained.
[0082] Step S600: Based on the relationship between the occupied grid polyline and the boundary of the lane in the same direction, fit the occupied grid polyline to obtain multiple fitted curves;
[0083] Specifically, the boundaries of autonomous driving refer to the left and right boundaries of the lane relative to the driving trajectory. For continuous driving trajectories, this typically involves the current lane, the preceding lane, and the following lane. The preceding lane is the forward part of the current lane, and the following lane is the subsequent part. Lanes and intersections can also serve as preceding or following parts, connecting the current lane to other lanes on the same or different roads. Level 4 autonomous driving uses high-precision maps, while Level 3 autonomous driving uses perception maps. Using structured data information from the left and right sides of the lanes along the driving trajectory, the left and right boundaries of the lanes can be obtained on a grid map. These boundaries are parallel to and extend along the driving trajectory.
[0084] There are M occupied grid polylines, each corresponding to a different grid category. In the grid map, occupied grids under some categories will not affect the corrected predicted trajectory. For example, when the green belts on both sides of the road are wide, the occupied grids located in the center of the green belt can be ignored. Furthermore, since the occupied grids in the center of the green belt belong to a certain type of grid, a corresponding occupied grid polyline will be fitted. Therefore, to improve computational efficiency, it is necessary to determine the association status between the occupied grid polylines and the boundaries of lanes in the same direction according to preset association rules. Thus, occupied grid polylines that are not associated with the boundaries of lanes in the same direction are not considered when correcting the trajectory. These lane boundaries include at least one of the following: the left and right boundaries of the current lane, the left and right boundaries of the preceding lane, and the left and right boundaries of the following lane. For example, considering the relationship between the occupied grid line and the left and right boundaries of the current lane can be used to correct the driving trajectory of the current lane; considering the relationship between the occupied grid line and the left and right boundaries of the subsequent lane can be used to correct the driving trajectory of the subsequent lane.
[0085] In this embodiment, as Figure 2 As shown, determining the relationship between the occupied grid polyline and the boundary of the lane in the same direction specifically includes the following steps:
[0086] Step S610: Calculate the lateral coordinates of all nodes on the occupied grid polyline relative to the boundary in the Frenet coordinate system;
[0087] Specifically, since using the Cartesian coordinate system is inconvenient in applications such as autonomous driving and trajectory planning, the Frenet coordinate system is usually used instead. The method for calculating the lateral coordinates of a node occupying a grid line relative to the boundary in the Frenet coordinate system is as follows: project the node onto the nearest boundary to obtain the projection point; the lateral coordinate value is the distance between the projection point and the node. This method is used to calculate the lateral coordinates of each node occupying a grid line relative to the boundary in the Frenet coordinate system.
[0088] Step S620: When the horizontal coordinate values of all nodes on the occupied grid line are less than the set threshold, the occupied grid line is associated with the boundary.
[0089] Specifically, the lateral coordinate value of each node on the occupied grid line is compared with a set threshold. When the lateral coordinate values of all nodes on the occupied grid line are less than the set threshold, the occupied grid line is considered to be associated with the boundary. In other words, it is equivalent to the occupied grid line being close to the boundary, and the occupied grid corresponding to the occupied grid line needs to be considered when correcting the predicted trajectory.
[0090] In this embodiment, if the lateral coordinates of nodes occupying a grid line relative to a certain boundary are all within 3 meters, then the grid line is considered to be associated with the boundary.
[0091] By vectorizing the occupied grid, it is possible to more efficiently determine whether the occupied grid polyline is associated with the boundary.
[0092] Then, all occupied grid lines associated with the same boundary are fitted to obtain fitted curves. Specifically, since a vehicle's lane includes its own lane, the preceding lane, and the following lane, and each lane has left and right boundaries, there are multiple boundaries, such as the left and right boundaries of the current lane, the preceding lane, and the following lane. Occupied grid lines are associated with different boundaries; for example, some are associated with the left boundary of the current lane, some with the right boundary, and some with the left boundary of the following lane, etc. Occupied grid lines associated with the same boundary are grouped into the same class, and then third-order or higher-order least-squares fitting is performed again on the same class of occupied grid lines to obtain K fitted curves (K <= M). These fitted curves are also called extended vectorized occupied grid curves.
[0093] The specific method of fitting the occupied grid polyline into a curve is a conventional technique in this field and will not be elaborated here.
[0094] Step S700: Correct the predicted trajectory in response to the intersection of the predicted trajectory with any fitted curve.
[0095] Specifically, after the vehicle's automatic navigation system acquires the predicted trajectory, it calculates whether the predicted trajectory intersects with the fitted curve, i.e., whether the predicted trajectory crosses the curve. If it does not cross the curve, the predicted trajectory is normal and no action is taken; if it crosses the curve, it indicates that the predicted trajectory is unreasonable and needs to be corrected. This system can correct the trajectory of the vehicle's lane, the roadside, and many veers from the opposite lane into the same direction as the vehicle, thus mitigating the problem of sudden braking.
[0096] The specific method for correcting the predicted trajectory in this embodiment is as follows: establish a Frenet coordinate system along the points of the fitted curve; attenuate the speed of the predicted trajectory in the lateral direction with a preset acceleration to obtain the corrected predicted trajectory, and feed it back to the vehicle's automatic navigation device or vehicle control terminal.
[0097] As described above, this embodiment first divides and clusters the raster map, then generates occupied raster polylines based on the occupied rasters of the same type of grid. Occupied raster polylines unrelated to the autonomous driving boundary are filtered out. All occupied raster polylines associated with the same boundary are fitted to form a fitted curve. The predicted trajectory is then corrected based on whether the fitted curve intersects with the predicted trajectory. This method can efficiently and accurately correct the predicted trajectory.
[0098] When the LiDAR line count is low or due to environmental factors, the occupied grid may jitter between frames, resulting in grid instability, such as the occupied grid jumping between two adjacent grids. To solve the above problem, this embodiment obtains the grid map generated in real time during autonomous driving, such as... Figure 3 As shown, it also includes the following steps:
[0099] Step S110: Obtain a historical raster map with a preset number of frames;
[0100] Step S120: Overlay the historical raster map with the generated raster map of the current frame, and update the raster map of the current frame with the overlaid raster map.
[0101] Specifically, after obtaining the raster map of the current frame during autonomous driving, the raster image is compared with the saved raster map of the previous frame. If a raster jitter is found, the raster map of the previous frame is overlaid with the raster map of the current frame, and the overlaid raster map is used to update the real-time generated raster map for subsequent calculations. Optionally, the historical raster map can be a predetermined number of frames prior to the current time point, or it can be an overlay of raster maps of all frames within a preset time period before the current time point.
[0102] Generally, the lidar on a vehicle can only acquire a grid map within 80 meters in front of the vehicle. Furthermore, if there is a taller object next to a green belt, or if the vehicle is driving close to a green belt or guardrail, the lidar's illumination may be blocked, causing the green belt next to the object to not be detected as occupying a grid. These situations will create occupied grid holes. Generally, occupied grid holes can be set to occupied grid by default to improve driving safety.
[0103] In one embodiment, after generating the grid map of the current frame and / or obtaining the fitted curve, the occupied grid holes are also corrected in real time. Specific correction methods include: in one scene, when an object (such as a pedestrian or vehicle) is detected crossing an occupied grid hole, the attribute of the occupied grid hole is modified; that is, the "occupying grid" attribute setting of the occupied grid hole is canceled, and the grid containing the occupied grid hole is set as a lane grid. In another scene, when the object blocking the LiDAR's illumination disappears, the LiDAR can normally illuminate the occupied grid hole. The attribute of the occupied grid hole is corrected based on the LiDAR's detection data. For example, if the LiDAR detects a stationary obstacle on the grid containing the occupied grid hole, the attribute of the occupied grid hole is set to "occupying grid"; otherwise, the grid containing the occupied grid hole is set as a lane grid.
[0104] Furthermore, after correcting for occupied grid holes, the fitted curve can be further modified or extended based on its relationship with neighboring fitted curves. If the occupied grid hole is adjacent to the endpoint of the fitted curve, the fitted curve is extended so that, after extension, the occupied grid hole can be removed from the occupied grid map, resulting in a more accurate correction of the predicted trajectory. If the occupied grid hole is located between the fitted curve and the boundary of a lane in the same direction, and the occupied grid hole is corrected from an occupied grid to a lane grid (for example, if there was originally a lane on the right side of this lane, which was blocked by a large truck for a period of time and then restored), then the original fitted curve may be located within the lane and needs to be corrected.
[0105] Exemplary device
[0106] like Figure 4 As shown, corresponding to the above-described prediction trajectory correction method based on occupied grids, this embodiment of the invention also provides a prediction trajectory correction device based on occupied grids, the prediction trajectory correction device based on occupied grids comprising:
[0107] The grid map module 600 is used to acquire the perception information of the current frame and generate a grid map of the current frame based on the perception information, wherein the grid where the stationary obstacle is located is represented as an occupied grid in the grid map.
[0108] The grid division module 610 is used to divide the grid map into multiple grids based on a preset size;
[0109] The filtering module 620 is used to filter the grid according to preset matching conditions to obtain a first grid set;
[0110] Clustering module 630 is used to cluster the grids in the first grid set based on the proximity relationship between the grids to obtain multiple second grid sets;
[0111] The occupying grid polyline module 640 is used to generate multiple occupying grid polylines that correspond one-to-one with the second grid set based on the occupying grid in each grid of each second grid set;
[0112] The fitting curve module 650 is used to fit the occupied grid polyline based on the correlation between the occupied grid polyline and the boundary of the lane in the same direction, and obtain multiple fitting curves.
[0113] The trajectory correction module 660 is used to correct the predicted trajectory in response to the intersection of the predicted trajectory with any of the fitted curves.
[0114] Specifically, in this embodiment, the specific functions of each module of the above-mentioned prediction trajectory correction device based on the occupied grid can be referred to the corresponding description in the above-mentioned prediction trajectory correction method based on the occupied grid, and will not be repeated here.
[0115] Based on the above embodiments, the present invention also provides an autonomous driving vehicle, which includes a processor and a memory. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a grid-based predicted trajectory correction program. The internal memory provides an environment for the operation of the operating system and the grid-based predicted trajectory correction program in the non-volatile storage medium. When the grid-based predicted trajectory correction program is executed by the processor, it implements the steps of any of the above-described grid-based predicted trajectory correction methods.
[0116] Based on the above embodiments, the present invention also provides a smart terminal, the principle block diagram of which can be as follows: Figure 5 As shown. The aforementioned smart terminal includes a processor, memory, network interface, and display screen connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and a grid-based prediction trajectory correction program. The internal memory provides an environment for the operation of the operating system and the grid-based prediction trajectory correction program stored in the non-volatile storage medium. The network interface of the smart terminal is used for communication with external terminals via a network connection. When the grid-based prediction trajectory correction program is executed by the processor, it implements the steps of any of the aforementioned grid-based prediction trajectory correction methods. The display screen of the smart terminal can be a liquid crystal display (LCD) or an e-ink display.
[0117] Those skilled in the art will understand that Figure 5 The block diagram shown is merely a partial structural diagram related to the present invention and does not constitute a limitation on the smart terminal to which the present invention is applied. A specific smart terminal may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0118] In one embodiment, a smart terminal is provided, the smart terminal including a memory, a processor, and a grid-based predicted trajectory correction program stored in the memory and executable on the processor, wherein the grid-based predicted trajectory correction program performs the following operation instructions when executed by the processor:
[0119] Acquire the perception information of the current frame, and generate a grid map of the current frame based on the perception information, wherein the grid where a stationary obstacle is located is represented as an occupied grid in the grid map;
[0120] The raster map is divided into multiple grids based on a preset size;
[0121] The grid is filtered according to preset matching conditions to obtain a first grid set;
[0122] Based on the proximity relationships between the grids, the grids in the first grid set are clustered to obtain multiple second grid sets;
[0123] Based on the occupied grid in each grid of the second grid set, generate multiple occupied grid polylines that correspond one-to-one with the second grid set;
[0124] Based on the correlation between the occupied grid polyline and the boundary of the lane in the same direction, the occupied grid polyline is fitted to obtain multiple fitted curves;
[0125] The predicted trajectory is corrected in response to the intersection of the predicted trajectory with any of the fitted curves.
[0126] Optionally, the step of generating multiple occupied grid lines corresponding one-to-one with the second grid set based on the occupied grid in each grid of the second grid set includes:
[0127] For each occupied grid in each of the second grid sets, fit the occupied grid cells to obtain multiple fitting curves that correspond one-to-one with the second grid set;
[0128] Each fitted curve that corresponds one-to-one with the second grid set is converted into a curve segment to obtain the occupied grid polyline.
[0129] Optionally, based on the correlation between the occupied grid polyline and the boundary of the lane in the same direction, the occupied grid polyline is fitted to obtain multiple fitted curves, including:
[0130] Determine the relationship between the occupied grid polyline and the boundary of the lane in the same direction;
[0131] The fitted curve is obtained by fitting all the occupied grid polylines associated with the same boundary.
[0132] Optionally, the lane boundaries in the same direction include at least one of the following: the left and right boundaries of the lane, the left and right boundaries of the preceding lane, and the left and right boundaries of the following lane.
[0133] Optionally, determining the association between the occupied grid polyline and the boundary of the lane in the same direction includes:
[0134] Calculate the lateral coordinates of all nodes on the occupied grid line relative to the boundary in the Frenet coordinate system;
[0135] When the lateral coordinate values of all nodes on the occupied grid line are less than a set threshold, the occupied grid line is associated with the boundary.
[0136] Optionally, the correction of the predicted trajectory includes:
[0137] Establish a Frenet coordinate system along the fitted curve;
[0138] The velocity of the predicted trajectory in the lateral direction is attenuated by a preset acceleration to obtain a corrected predicted trajectory.
[0139] Optionally, the step of filtering the grid according to preset matching conditions to obtain a first grid set includes:
[0140] Calculate the number of grid cells occupied in each of the aforementioned grids;
[0141] Add a number of grids greater than the set threshold to the first network set.
[0142] Optionally, after generating the raster map of the current frame based on the perceived information, the method further includes:
[0143] Retrieve historical raster maps for a preset number of frames;
[0144] The historical raster map is overlaid with the generated raster map of the current frame, and the raster map of the current frame is updated with the overlaid raster map.
[0145] Optionally, after generating the raster map of the current frame and / or obtaining the fitted curve, the occupied raster holes are also corrected, where the occupied raster holes are raster cells that cannot be illuminated by the lidar.
[0146] Optionally, the correction of occupied grid holes includes:
[0147] When an object is detected passing through the occupied grid hole, the properties of the occupied grid hole are corrected.
[0148] Optionally, after correcting the holes occupying the grid, the following also applies:
[0149] Based on the occupied grid holes, the fitted curve is extended or corrected.
[0150] This invention also provides a computer-readable storage medium storing a prediction trajectory correction program based on an occupied grid. When executed by a processor, the prediction trajectory correction program based on an occupied grid implements the steps of any of the prediction trajectory correction methods based on an occupied grid provided in this invention.
[0151] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0152] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the above device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this invention. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0153] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0154] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0155] In the embodiments provided by this invention, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / terminal device embodiments described above are merely illustrative. For instance, the division of the above modules or units is merely a logical functional division, and in actual implementation, it can be divided in other ways. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0156] If the integrated modules / units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0157] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not mean that the essence of the corresponding technical solutions deviates from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for trajectory correction based on predicted occupancy grid, characterized in that, include: Acquire the perception information of the current frame, and generate a grid map of the current frame based on the perception information, wherein the grid where a stationary obstacle is located is represented as an occupied grid in the grid map; The raster map is divided into multiple grids based on a preset size; The grid is filtered according to preset matching conditions to obtain a first grid set; Based on the proximity relationships between the grids, the grids in the first grid set are clustered to obtain multiple second grid sets; Based on the occupied grid in each grid of the second grid set, generate multiple occupied grid polylines that correspond one-to-one with the second grid set; Based on the correlation between the occupied grid polyline and the boundary of the lane in the same direction, the occupied grid polyline is fitted to obtain multiple fitted curves; The predicted trajectory is corrected in response to the intersection of the predicted trajectory with any of the fitted curves. After generating the grid map of the current frame based on the perceived information, the method further includes: obtaining a preset number of historical grid maps; overlaying the historical grid maps with the generated grid map of the current frame, and updating the grid map of the current frame with the overlaid grid map. Specifically, after obtaining the grid map of the current frame during automatic driving, the grid image is compared with the saved grid map of the previous frame. If a grid jitter is found, the grid map of the previous frame is overlaid with the grid map of the current frame, and the grid map generated in real time is updated with the overlaid grid map for subsequent calculations. After generating the grid map of the current frame and / or obtaining the fitted curve, the occupied grid holes are grids that cannot be illuminated by the lidar.
2. The occupancy grid based predicted trajectory correction method of claim 1, wherein, The process of generating multiple occupied grid lines corresponding one-to-one with the second grid set, based on the occupied grid within each grid of the second grid set, includes: For each occupied grid in each of the second grid sets, fit the occupied grid cells to obtain multiple fitting curves that correspond one-to-one with the second grid set; Each fitted curve that corresponds one-to-one with the second grid set is converted into a curve segment to obtain the occupied grid polyline.
3. The occupancy grid based predicted trajectory correction method of claim 1, wherein, Based on the correlation between the occupied grid polyline and the boundary of the lane in the same direction, the occupied grid polyline is fitted to obtain multiple fitted curves, including: Determine the relationship between the occupied grid polyline and the boundary of the lane in the same direction; The fitted curve is obtained by fitting all the occupied grid polylines associated with the same boundary.
4. The occupancy grid based predicted trajectory correction method of claim 3, wherein, The boundaries of lanes traveling in the same direction include at least one of the following: the left and right boundaries of this lane, the left and right boundaries of the preceding lane, and the left and right boundaries of the following lane.
5. The occupancy grid based predicted trajectory correction method of claim 3, wherein, Determining the association between the occupied grid polyline and the boundary of the lane in the same direction includes: Calculate the lateral coordinates of all nodes on the occupied grid line relative to the boundary in the Frenet coordinate system; When the lateral coordinate values of all nodes on the occupied grid line are less than a set threshold, the occupied grid line is associated with the boundary.
6. The occupancy grid based predicted trajectory correction method of claim 1, wherein, The correction of the predicted trajectory includes: Establish a Frenet coordinate system along the fitted curve; The velocity of the predicted trajectory in the lateral direction is attenuated by a preset acceleration to obtain a corrected predicted trajectory.
7. The occupancy grid based predicted trajectory correction method of claim 1, wherein, The step of filtering the grids according to preset matching conditions to obtain a first grid set includes: Calculate the number of grid cells occupied in each of the aforementioned grids; Add a number of grids greater than the set threshold to the first grid set.
8. The occupancy grid based predicted trajectory correction method of claim 1, wherein, The correction of occupied grid holes includes: When an object is detected passing through the occupied grid hole, the properties of the occupied grid hole are corrected.
9. The occupancy grid based predicted trajectory correction method of claim 1, wherein, After fixing the holes that occupy the grid, it also includes: Based on the occupied grid holes, the fitted curve is extended or corrected.
10. A device for correcting a predicted trajectory based on an occupancy grid, characterized in that, The device includes: The grid map module is used to acquire the perception information of the current frame and generate a grid map of the current frame based on the perception information, wherein the grid where a stationary obstacle is located is represented as an occupied grid in the grid map; A grid division module is used to divide the grid map into multiple grids based on a preset size; The filtering module is used to filter the grid according to preset matching conditions to obtain a first grid set; A clustering module is used to cluster the grids in the first grid set based on the proximity relationship between the grids to obtain multiple second grid sets; The occupying grid polyline module is used to generate multiple occupying grid polylines that correspond one-to-one with the second grid set based on the occupying grid in each grid of each second grid set; The curve fitting module is used to fit the occupied grid polyline based on the relationship between the occupied grid polyline and the boundary of the lane in the same direction, and obtain multiple fitted curves. A trajectory correction module is used to correct the predicted trajectory in response to the intersection of the predicted trajectory with any of the fitted curves. The predicted trajectory correction device based on occupied grid is also used to obtain a preset number of historical grid maps; and to overlay the historical grid maps with the generated grid map of the current frame, and update the grid map of the current frame with the overlaid grid map. Specifically, after obtaining the grid map of the current frame during automatic driving, the grid image is compared with the saved grid map of the previous frame. If occupancy grid jitter is found, the grid map of the previous frame is overlaid with the grid map of the current frame, and the grid map generated in real time is updated with the overlaid grid map for subsequent calculations. The predicted trajectory correction device based on occupied grids is also used to generate a grid map of the current frame and / or, after obtaining a fitted curve, correct the occupied grid holes, which are grids that cannot be illuminated by the lidar.
11. An autonomous vehicle, characterized by The method includes a memory, a processor, and an occupancy-based predicted trajectory correction program stored in the memory and executable on the processor, wherein the occupancy-based predicted trajectory correction program, when executed by the processor, implements the steps of the occupancy-based predicted trajectory correction method as described in any one of claims 1-9.
12. A computer readable storage medium, characterized in that, The computer-readable storage medium stores a prediction trajectory correction program based on an occupied grid, which, when executed by a processor, implements the steps of the prediction trajectory correction method based on an occupied grid as described in any one of claims 1-9.