Path processing method and apparatus, electronic device, computer-readable storage medium, and computer program product
By generating and adjusting multiple initial paths in the road grid map, the problems of excessive time consumption and local optima in the existing technology are solved, realizing the rationality and global optimization of autonomous driving path planning, and improving the safety and efficiency of path planning.
Patent Information
- Application Number
- CN202511359921.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2045-09-22
AI Technical Summary
In existing technologies for autonomous driving, lateral path planning is time-consuming and prone to local optima, making it difficult to meet the response frequency requirements of path planning in navigation scenarios and affecting the safety and smoothness of autonomous driving.
Multiple initial paths are generated in the road grid map. Reasonable paths are selected based on preset kinematic conditions and cost thresholds. Adjusted paths are generated through iterative adjustments to ensure the global optimality of the paths.
By generating multiple initial paths and iteratively adjusting them, the limitations of local optima are reduced, the rationality and quality of path planning are improved, and the safety and efficiency of vehicle routes are ensured.
Smart Images

Figure CN121323671B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle technology, and in particular to a path processing method, apparatus, electronic device, computer-readable storage medium, and computer program product. Background Technology
[0002] With the rapid development of intelligent transportation technology, autonomous driving has become an important direction for improving traffic efficiency and reducing traffic accidents. In the field of autonomous driving, path planning, as the core link connecting environmental perception and vehicle control, directly determines the safety, comfort, and efficiency of vehicle operation. Lateral path planning is responsible for determining the vehicle's trajectory in the lateral dimension of the road (i.e., perpendicular to the road centerline), such as staying centered within the lane, lane changes, and obstacle avoidance, and is a key support for accurate navigation in complex road scenarios. Therefore, how to perform reasonable road planning for vehicles during autonomous driving is an urgent problem to be solved. Summary of the Invention
[0003] This application provides a route processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the rationality of vehicle route planning.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] This application provides a path processing method, the method comprising:
[0006] Based on the vehicle's position, a first grid point corresponding to the vehicle is determined in the road grid map, and multiple initial paths are generated in the road grid map using the first grid point as the starting point of the path. The cost value of each initial path is determined, and a first initial path with a cost value lower than a preset threshold and a second initial path with a cost value not lower than the preset threshold are determined among the multiple initial paths. Based on preset kinematic conditions and the first initial path, the grid points traversed by the second initial path are iteratively adjusted to obtain an adjusted path corresponding to the second initial path. A target path is determined based on the first initial path and the adjusted path, and the vehicle is guided to move based on the target path.
[0007] This application provides a path processing apparatus, including:
[0008] The path generation module is used to determine the first grid point corresponding to the vehicle in the road grid map based on the vehicle's location, and to generate multiple initial paths in the road grid map using the first grid point as the starting point of the path.
[0009] The first determining module is used to determine the cost value of each of the initial paths, and to determine, among the plurality of initial paths, a first initial path whose cost value is lower than a preset threshold, and a second initial path whose cost value is not lower than the preset threshold;
[0010] The adjustment module is used to iteratively adjust the grid points traversed by the second initial path based on preset kinematic conditions and the first initial path, so as to obtain the adjusted path corresponding to the second initial path.
[0011] The second determining module is used to determine a target path based on the first initial path and the adjusted path, and to guide the vehicle to move based on the target path.
[0012] In the above scheme, the path generation module is further configured to: use the first grid point as the starting point of the path; randomly select multiple second grid points in the road grid map along the path direction of the road centerline of the road where the vehicle is located; for each second grid point, detect the path segment between the first grid point and the second grid point based on preset kinematic conditions to obtain a first detection result; if the first detection result indicates that the path segment meets the preset kinematic conditions, continue to iteratively select a third grid point that meets the preset kinematic conditions in the road grid along the path direction until there are no grid points along the path direction and stop iterating; connect the first grid point, the second grid point, and the third grid point to obtain the initial path.
[0013] In the above scheme, the first determining module is further configured to: determine the offset between the initial path and the centerline of the road where the vehicle is located for each initial path, and determine a first-generation value of the initial path based on the offset; if there are obstacles in the road, determine a second-generation value of the initial path based on the distance between the initial path and the location of the obstacle in the road grid map; determine the smoothness of the initial path at each grid point it passes through, and determine a third-generation value of the initial path based on each smoothness; determine a fourth-generation value of the initial path based on preset road rules, the fourth-generation value being used to characterize the traffic compliance of the initial path; and determine the generation value of the initial path based on the first-generation value, the second-generation value, the third-generation value, and the fourth-generation value.
[0014] In the above scheme, the first determining module is further configured to determine multiple grid point pairs located on the same horizontal line among the multiple fourth grid points along the initial path and the multiple fifth grid points along the road centerline of the road where the vehicle is located; wherein, the horizontal line is perpendicular to the road centerline, and a grid point pair includes one fourth grid point and one fifth grid point; for each grid point pair, the distance between the fourth grid point and the fifth grid point included in the grid point pair is determined as the point offset of the grid point pair; the point offsets of each grid point pair are summed to obtain the offset between the initial path and the road centerline of the road where the vehicle is located.
[0015] In the above scheme, the first determining module is further configured to determine the distance between the path segment and the position of the obstacle in the road grid map for each two adjacent grid points in the multiple grid points of the initial path; if the distance is less than a distance threshold, determine the distance cost value corresponding to the path segment based on a preset mapping relationship between distance and cost value and the distance of the path segment; and determine the sum of the distance cost values corresponding to each path segment as the second generation value of the initial path.
[0016] In the above scheme, the first determining module is further configured to determine the first weight of the first generation value, the second weight of the second generation value, the third weight of the third cost value, and the fourth weight of the fourth cost value, wherein the second weight is greater than the first weight, the first weight is greater than the third weight, and the third weight is greater than the fourth weight; based on the first weight, the second weight, the third weight, and the fourth weight, the first generation value, the second generation value, the third generation value, and the fourth generation value are weighted and summed to obtain the cost value of the initial path.
[0017] In the above scheme, the adjustment module is further configured to: randomly select a first path segment in the second initial path; and, if the first path segment is not the last path segment, determine a first starting grid point and a first ending grid point of the first path segment; on a reference line passing through the first ending grid point and perpendicular to the road centerline of the road where the vehicle is located, determine a sixth grid point of the path segment between the first starting grid point and the first ending grid point that satisfies the preset kinematic conditions, and adjust the first ending grid point in the first path segment to the sixth grid point, thereby obtaining a second path segment between the first starting grid point and the sixth grid point; if the sixth grid point is a grid point passed through by the first initial path, take the remaining path segment in the first initial path after the sixth grid point as the remaining path segment in the second initial path after the sixth grid point; and connect the path segment in the second initial path before the first starting grid point, the second path segment, and the remaining path segment to obtain the adjusted path corresponding to the second initial path.
[0018] In the above scheme, the adjustment module is further configured to, when the sixth grid point is not a grid point along the first initial path, use the sixth grid point as the second starting path point of the third path segment in the first initial path, and continue iteratively selecting the second ending grid point of the path segment between the second starting grid point that satisfies the preset kinematic conditions, until the iteration stops when the iteration stop condition is met; and connect the path segment in the second initial path that is before the first starting grid point, the first path segment, and the path segment formed by connecting the grid points reached in each iteration to obtain the adjusted path corresponding to the second initial path.
[0019] In the above scheme, the second determining module is further configured to determine the cost value of each of the adjusted paths, and determine the target path with the minimum cost value among the first initial path and the adjusted paths; or, select any one of the first initial path and the adjusted paths as the target path.
[0020] This application provides an electronic device, the electronic device comprising:
[0021] Memory is used to store executable instructions or computer programs.
[0022] The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the path processing method provided in the embodiments of this application.
[0023] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the path processing method provided in this application when executed by a processor.
[0024] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the path processing method provided in this application.
[0025] The embodiments of this application have the following beneficial effects:
[0026] By using the above method, when processing vehicle paths, the first grid point corresponding to the vehicle is determined in the road grid map based on the vehicle's location. Using the first grid point as the starting point, multiple initial paths are generated in the road grid map, and the cost value of each initial path is determined. Among the multiple initial paths, the first initial path with a cost value lower than a preset threshold and the second initial path with a cost value higher than the preset threshold are determined. Based on preset kinematic conditions and the first initial path, the grid points along the path of the second initial path are iteratively adjusted to obtain the adjusted path corresponding to the second initial path. In this way, by pre-generating multiple initial paths and then adjusting the second initial paths that do not meet the conditions (i.e., the cost value is lower than the preset threshold), the limitations of a single path can be reduced, thereby reducing the limitation of local optima. Furthermore, the adjustment method based on preset kinematic conditions and the first initial path can ensure that the adjustment process moves towards a better direction, thereby improving the rationality of path planning and improving path quality. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the architecture of the path processing system provided in the embodiments of this application;
[0028] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0029] Figure 3A This is a first flowchart illustrating the path processing method provided in an embodiment of this application;
[0030] Figure 3B This is a flowchart illustrating the method for generating the initial path provided in an embodiment of this application;
[0031] Figure 3C This is a flowchart illustrating the method for determining the cost value provided in an embodiment of this application;
[0032] Figure 3D This is a flowchart illustrating the path adjustment method provided in an embodiment of this application;
[0033] Figure 4 This is a schematic diagram of the road grid map provided in an embodiment of this application;
[0034] Figure 5 This is a schematic diagram illustrating the selection of the second grid points provided in an embodiment of this application;
[0035] Figure 6 This is a schematic diagram of the method for determining the offset according to an embodiment of this application;
[0036] Figure 7A This is a schematic diagram of the second initial path provided in the embodiments of this application;
[0037] Figure 7B This is a first schematic diagram of the adjustment path provided in the embodiments of this application;
[0038] Figure 7C This is a third schematic diagram of the adjustment path provided in the embodiments of this application;
[0039] Figure 8 This is a second flowchart illustrating the path processing method provided in the embodiments of this application.
[0040] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0042] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0043] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0044] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0045] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0046] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0047] In the field of lateral path planning for autonomous driving, many related technologies are based on the Frenet coordinate system for path processing. This method typically requires sampling on the acquired road map to generate a cost grid for evaluating path quality, and then performing path planning and processing based on the cost grid. However, when processing paths based on the cost grid, it is often necessary to iterate through all grid points (i.e., sampling points) to determine the optimal path. For lane navigation in autonomous driving, this traversal method is too time-consuming and cannot meet the high response frequency requirements of path planning in navigation scenarios. On the other hand, some related technologies also use dynamic programming algorithms to perform path retrieval within the cost grid. While this method can shorten the processing time to some extent, it is prone to local optima, meaning the planned path is only optimal within a local range and cannot guarantee global optimality, affecting the safety and smoothness of autonomous driving.
[0048] Here, lateral path refers to the planning of a vehicle's trajectory in the lateral dimension of the road (the direction perpendicular to the road centerline). Its core is determining the lateral offset of the vehicle at different longitudinal positions (the distance traveled along the road centerline) to meet lateral movement requirements such as lane keeping, lane changing, and obstacle avoidance.
[0049] Therefore, embodiments of this application provide a route processing method, apparatus, electronic device, computer-readable storage medium, and computer program product, which provide a method for rationally planning routes based on road maps, thereby improving the rationality of vehicle route planning.
[0050] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of the path processing system 100 provided in the embodiments of this application. In order to support a path processing application, the terminal 401 (e.g., a vehicle terminal) connects to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0051] In some embodiments, the path processing method provided in this application can be executed collaboratively by a terminal 401 and a server 200. For example, in response to a path processing command triggered during vehicle movement, the terminal 401 acquires a road image in front of the vehicle and generates a road grid map based on the road image. Then, the terminal 401 sends a path processing request carrying the road grid map and the vehicle's position to the server 200. In response to the path processing request, the server 200 determines a first grid point corresponding to the vehicle in the road grid map based on the vehicle's position, and uses the first grid point as the starting point of the path to generate multiple initial paths in the road grid map. It determines the cost value of each initial path and identifies a first initial path with a cost value lower than a preset threshold and a second initial path with a cost value not lower than the preset threshold among the multiple initial paths. Based on preset kinematic conditions and the first initial path, iteratively adjusts the grid points traversed by the second initial path to obtain an adjusted path corresponding to the second initial path. Finally, it determines a target path based on the first initial path and the adjusted path. The server 200 then sends the target path to the terminal 401, so that the terminal 401 guides the vehicle to move based on the target path.
[0052] In some embodiments, the path processing method provided in this application can also be executed by the terminal 401 alone. For example, in response to a path processing command triggered during vehicle travel, the terminal 401 acquires a road image in front of the vehicle and generates a road grid map based on the road image. Based on the vehicle's position, it determines a first grid point corresponding to the vehicle in the road grid map and uses the first grid point as the starting point of the path to generate multiple initial paths in the road grid map. It determines the cost value of each initial path and determines a first initial path with a cost value lower than a preset threshold and a second initial path with a cost value not lower than the preset threshold among the multiple initial paths. Based on preset kinematic conditions and the first initial path, iteratively adjusts the grid points traversed by the second initial path to obtain an adjusted path corresponding to the second initial path. Based on the first initial path and the adjusted path, it determines a target path and guides the vehicle to move based on the target path.
[0053] In some embodiments, terminal 401 can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, smartphones, smart speakers, smartwatches, smart TVs, and vehicle terminals, or it can be implemented as a server.
[0054] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals and servers can be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment.
[0055] See Figure 2 , Figure 2 This is a schematic diagram of the structure of the electronic device 400 provided in the embodiments of this application. Figure 2 The illustrated electronic device 400 includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the electronic device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 440.
[0056] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0057] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0058] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.
[0059] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.
[0060] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0061] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0062] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.
[0063] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;
[0064] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.
[0065] In some embodiments, the path processing apparatus provided in this application can be implemented in software. Figure 2 A path processing device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a path generation module 4551, a first determination module 4552, an adjustment module 4553, and a second determination module 4554. These modules are logically linked and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.
[0066] In other embodiments, the path processing device provided in this application can be implemented in hardware. As an example, the path processing device provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the path processing method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0067] The path processing method provided in the embodiments of this application will now be described in conjunction with the accompanying drawings. As mentioned above, the electronic device implementing the path processing method of the embodiments of this application can be a terminal 401, a server 200, or a combination of both. Therefore, the executing entity of each step will not be described again below.
[0068] This explanation will take terminal 401 as the executing entity as an example. See [link / reference] Figure 3A , Figure 3A This is a first flowchart illustrating the path processing method provided in this application embodiment, which will be combined with... Figure 3A The steps shown are explained.
[0069] In step 101, based on the vehicle's location, the first grid point corresponding to the vehicle is determined in the road grid map, and multiple initial paths are generated in the road grid map using the first grid point as the starting point of the path.
[0070] In practice, vehicles can acquire road images of the road ahead at any given moment. These images can include multiple sampling points, which can be regularly distributed. Then, based on the Frenet coordinate system, the road images are mapped into a road map, and the positions of the sampling points in the road images are mapped onto the road map, generating a road grid map. In other words, the road grid map is a path planning reference map constructed based on the Frenet coordinate system. The road grid map has an S-axis and an L-axis. The S-axis represents the longitudinal distance from the road centerline, i.e., the distance the vehicle travels along the road; the L-axis represents the lateral offset, i.e., the left and right offset distance of the vehicle relative to the road centerline. The sampling points are discretized samples of the lateral drivable area of the real road. The path planned in the road grid map is a specific driving trajectory planned from the grid points corresponding to these sampling points and mapped onto the real road.
[0071] In practice, when planning a route for a vehicle, the current position of the vehicle is usually used as the starting point. Therefore, the actual position of the vehicle in the road image can be mapped onto the road grid map, and the first grid point corresponding to the vehicle can be determined in the road grid map.
[0072] As an example, Figure 4 This is a schematic diagram of the road grid map provided in the embodiments of this application. See also: Figure 4 The road grid map consists of multiple regular grid points, each corresponding to a sampling point on the actual road, mapped from the actual location of the sampling point. The road grid map has an S-axis and an L-axis, where the S-axis is parallel to the road centerline.
[0073] In some embodiments, Figure 3B This is a flowchart illustrating the initial path generation method provided in this application embodiment. See also... Figure 3B The step 101, "using the first grid point as the starting point of the path, generating multiple initial paths in the road grid map", can be achieved through steps 1011 to 1014.
[0074] In step 1011, taking the first grid point as the starting point of the path, multiple second grid points are randomly selected in the road grid map along the path direction of the road centerline of the road where the vehicle is located.
[0075] In actual implementation, after determining the first grid point corresponding to the vehicle's location as the starting point of the path, the path direction is taken as the direction of the extension of the road centerline of the road where the vehicle is currently located (that is, the direction of the S-axis in the road grid diagram). Within a column of grid points following the first grid point in the path direction, multiple non-overlapping grid points are selected by random sampling, and these selected grid points are defined as the second grid points.
[0076] As an example, Figure 5 This is a schematic diagram of the selection of the second grid points provided in an embodiment of this application. See also... Figure 5 Assuming the coordinates of the first grid point in the road grid diagram are (S1, L3), then the path direction along the road centerline (i.e., the direction of increasing S-axis) is within the range of the next column of grid points of the first grid point. Two grid points are randomly selected, namely (S2, L4) and (S2, L2), and these two grid points are the second grid points.
[0077] In step 1012, for each second grid point, based on preset kinematic conditions, the path segment between the first grid point and the second grid point is detected to obtain the first detection result.
[0078] Here, the preset kinematic conditions may include the curvature of the path segment not exceeding the vehicle's maximum steering curvature, the rate of change of curvature not exceeding the vehicle's maximum steering speed, and the length of the path segment not less than the arc length corresponding to the vehicle's minimum turning radius, etc. The specific conditions can be set according to the actual situation, and no specific limitations are made here.
[0079] In actual implementation, for each selected second grid point, the first grid point and the second grid point are connected respectively to obtain the path segment between the first grid point and the second grid point. Then, the path segment is checked to see if it meets the preset kinematic conditions, and the first detection result of "meets" or "does not meet" is obtained.
[0080] As an example, continuing from the previous example, see [link to previous example]. Figure 5 For the second grid point (S2, L4), the curvature of the path segment from (S1, L3) to (S2, L4) is calculated to be 0.02 radians / meter, while the maximum permissible curvature for vehicles is 0.05 radians / meter, and the rate of change of curvature is 0.01 radians / meter. 2 Less than the vehicle's maximum turning rate by 0.03 radians / meter. 2 Therefore, the first detection result is "meets the preset kinematic conditions". The second grid point (S2, L2) is detected in the same way, which will not be described again.
[0081] In step 1013, if the first detection result indicates that the path segment meets the preset kinematic conditions, the iteration continues to select a third grid point that meets the preset kinematic conditions in the road grid map along the path direction until there are no grid points along the path direction and the iteration stops.
[0082] In actual implementation, the second grid points selected from multiple second grid points whose corresponding first detection results indicate that the path segment does not meet the preset kinematic conditions can be deleted. In other words, these second grid points with the first detection result of "does not meet" are not suitable for planning vehicle paths.
[0083] For each second grid point indicating that the path segment meets the preset kinematic conditions, the next grid point (defined as the third grid point) can be selected in the road grid map along the path direction. The path segment between the third grid point and the second grid point is then checked to see if it meets the preset kinematic conditions. If it does, the above process is repeated, that is, the third grid point is used as the new starting point of the path segment, and the next third grid point is selected and checked to see if it meets the preset kinematic conditions, until there are no more selectable grid points along the path direction (such as reaching the end of the road or the boundary of the road grid map), at which point the iteration stops.
[0084] Understandably, for each second grid point whose first detection result is "compliant", multiple third grid points can be randomly selected within a column of grid points after the second grid point. Then, the third grid points that meet the preset kinematic conditions are selected, and for each third grid point that meets the preset kinematic conditions, the next third grid point is selected along the path direction.
[0085] In step 1014, the first grid point, the second grid point, and the third grid point are connected to obtain the initial path.
[0086] In actual implementation, the first grid point, any second grid point whose first detection result is "compliant", and the third grid point that meets the preset kinematic conditions determined for the second grid point are connected sequentially according to the path direction to form a continuous trajectory, which is an initial path.
[0087] As an example, continuing from the previous example, see [link to example]. Figure 5 Taking the second grid point (S2, L4) as an example, suppose that within the next column of grid points after the second grid point (S2, L4), two third grid points that meet the preset kinematic conditions are selected, namely (S3, L3) and (S3, L5); continuing, for the third grid point (S3, L3), within the next column of grid points after the third grid point (S3, L3), a third grid point (S4, L3) that meets the preset kinematic conditions is selected, as well as the third grid point (S5, L4) after the third grid point (S4, L3). Then, connecting the first grid point (S1, L3), the second grid point (S2, L4), the third grid point (S3, L3), the third grid point (S4, L3), and the third grid point (S5, L4) yields an initial path. The connection methods for other initial paths are similar. Figure 5 As can be seen, there can be multiple initial paths through each second grid point, meaning a second grid point can be on multiple initial paths. Similarly, a third grid point can also be on multiple initial paths.
[0088] By randomly selecting the second grid point, the diversity of the initial path is ensured, providing a richer search foundation for subsequent optimization. Each path segment is tested through preset kinematic conditions to ensure the physical feasibility of the initial path and avoid generating trajectories that vehicles cannot execute. The iterative selection of the third grid point can automatically generate a complete path covering the entire road without manual intervention at the path endpoint. The process is clear and repeatable, and can efficiently generate multiple initial paths, laying the foundation for subsequent selection of target paths. Furthermore, the random point selection method can increase global exploration capabilities and reduce the impact of local optima.
[0089] In step 102, the cost value of each initial path is determined, and among the multiple initial paths, a first initial path with a cost value lower than a preset threshold and a second initial path with a cost value not lower than the preset threshold are determined.
[0090] The cost value is used to characterize the quality of the initial path. There can be one or more initial paths.
[0091] In practical applications, the calculation of the cost value usually takes into account multiple factors, such as lateral offset distance (cost of deviating from the center of the lane), distance to obstacles (obstacle avoidance cost), and path smoothness (cost of driving comfort). The lower the cost value of the initial path, the more suitable the initial path is for guiding vehicle movement, and the higher the safety of the vehicle when moving based on the initial path.
[0092] In some embodiments, Figure 3C This is a flowchart illustrating the method for determining the cost value provided in an embodiment of this application. See also... Figure 3C The "determining the cost of each initial path" in step 102 can be achieved through steps 1021 to 1025.
[0093] In step 1021, for each initial path, the offset between the initial path and the center line of the road where the vehicle is located is determined, and the first generation value of the initial path is determined based on the offset.
[0094] In some embodiments, the "determining the offset between the initial path and the centerline of the road where the vehicle is located" in step 1021 can be implemented as follows: among the multiple fourth grid points along the initial path and the multiple fifth grid points along the centerline of the road where the vehicle is located, multiple grid point pairs located on the same horizontal line are determined; wherein, the horizontal line is perpendicular to the centerline of the road, and a grid point pair includes a fourth grid point and a fifth grid point; for each grid point pair, the distance between the fourth grid point and the fifth grid point included in the grid point pair is determined as the point offset of the grid point pair; the point offsets of each grid point pair are summed to obtain the offset between the initial path and the centerline of the road where the vehicle is located.
[0095] Here, the first-generation value is used to characterize the lateral offset distance between the initial path and the road centerline.
[0096] In practice, for each initial path, all grid points along the initial path are defined as fourth grid points, and all grid points along the road centerline are defined as fifth grid points. Since the coordinates of each grid point are known, the offset between the paths can be determined by the point offset between the fourth and fifth grid points. Specifically, using the direction perpendicular to the road centerline as the horizontal line (i.e., the horizontal line is parallel to the L-axis), fourth and fifth grid points on the same horizontal line are identified on both the initial path and the road centerline, forming multiple grid point pairs. Each grid point pair contains one fourth grid point and one fifth grid point. For each grid point pair, the absolute value of the distance between the fourth and fifth grid points in the pair is calculated, and this absolute value is determined as the point offset of the grid point pair. The point offsets of all grid point pairs are accumulated, and the accumulated result is the offset between the initial path and the road centerline.
[0097] As an example, Figure 6 This is a schematic diagram of the offset determination method according to an embodiment of this application. See also... Figure 6 The initial path passes through five fourth grid points: (S1, L4), (S2, L4), (S3, L4), (S4, L4), and (S5, L5); the road centerline passes through five fifth grid points: (S1, L3), (S2, L3), (S3, L3), (S4, L3), and (S5, L3). Specifically, fourth grid points (S1, L4) and fifth grid points (S1, L3) are on the same horizontal line; fourth grid points (S2, L4) and fifth grid points (S2, L3) are on the same horizontal line; fourth grid points (S3, L4) and fifth grid points (S3, L3) are on the same horizontal line; fourth grid points (S4, L4) and fifth grid points (S4, L3) are on the same horizontal line; and fourth grid points (S5, L5) and fifth grid points (S5, L3) are on the same horizontal line. The point offsets for each grid point pair are |L4-L3|, |L4-L3|, |L4-L3|, |L4-L3|, and |L5-L3|, respectively. The sum of these offsets is |L4-L3|+|L4-L3|+|L4-L3|+|L4-L3|+|L5-L3|. In other words, the offset between the initial path and the road centerline can be denoted as ∑|Li-Lj|, where Li represents the coordinates of the fourth grid point on the L-axis, and Lj represents the coordinates of the fifth grid point, which is on the same horizontal line as the fourth grid point, on the L-axis.
[0098] By using the above method, grid point pairs are selected through a "horizontal line" (perpendicular to the road centerline), ensuring the consistency of the offset calculation direction and avoiding errors caused by angular deviations. Using the distance between grid point pairs as the point offset directly quantifies the degree of deviation between the initial path and the centerline in a local position, with a clear calculation logic. Summing up the offsets of all points comprehensively reflects the overall offset of the initial path, providing a quantitative basis for subsequent evaluation of whether the path is centered and meets lane constraints, thus improving the rationality of path planning.
[0099] In step 1022, if there are obstacles in the road, the second-generation value of the initial path is determined based on the distance between the initial path and the location of the obstacle in the road grid map.
[0100] Here, the second-generation value is used to characterize the distance between the initial path and the obstacle. The smaller the second-generation value, the farther the initial path is from the obstacle, and the safer the vehicle is.
[0101] In some embodiments, the "distance between the initial path and the location of the obstacle in the road grid map" in step 1022 can be implemented as follows: for each path segment between two adjacent grid points in the multiple grid points traversed by the initial path, determine the distance between the path segment and the location of the obstacle in the road grid map; if the distance is less than a distance threshold, determine the distance cost value corresponding to the path segment based on a preset mapping relationship between distance and cost value, and the distance of the path segment; and determine the sum of the distance cost values corresponding to each path segment as the second generation value of the initial path.
[0102] In actual implementation, from the multiple grid points traversed by the initial path, a path segment is extracted consisting of every two adjacent grid points. For each path segment, the distance between the path segment and the location of the obstacle in the road grid map is calculated. A distance threshold (which can be considered a safety threshold) is set. If the distance between the path segment and the obstacle is less than the threshold, the distance cost value corresponding to the path segment is determined based on the preset mapping relationship between distance and cost value (e.g., the closer the distance, the greater the cost value), combined with the distance of the path segment. If the distance is not less than the threshold, the distance cost value of the path segment is defaulted to 0. The distance cost values corresponding to all path segments are accumulated, and the sum is the second-generation value of the initial path.
[0103] As an example, the distance between a path segment and an obstacle's location in the road grid can be calculated as follows: Assume the two endpoints (adjacent grid points) of the path segment are (S1, L1) and (S2, L2), and the obstacle's location coordinates in the road grid are (S3, L3). Calculate the length of the perpendicular segment from the obstacle's location (S3, L3) to the line containing the path segment. If the foot of the perpendicular falls on the path segment, then the length of this perpendicular segment is the distance between the path segment and the obstacle. If the foot of the perpendicular is not on the path segment (i.e., the foot is outside (S1, L1) or outside (S2, L2), then take the smaller value between the distance from the obstacle's location (S3, L3) to (S1, L1) or to (S2, L2) as the distance between the path segment and the obstacle.
[0104] By using the above method, the distance to obstacles is calculated on a path segment basis between adjacent grid points, which refines the evaluation granularity and can accurately reflect the obstacle avoidance situation of each part of the path. Furthermore, by using a distance threshold to distinguish whether a path segment needs to be calculated for distance cost, the over-evaluation of path segments far from obstacles is avoided, and the calculation logic is simplified. Based on the preset distance-cost mapping relationship, the distance is converted into a quantified distance cost, so that the impact of obstacles on the path can be directly compared. This provides a clear basis for subsequent selection of paths with better obstacle avoidance performance and improves the rationality of path planning.
[0105] In step 1023, the smoothness of the initial path at each grid point along the path is determined, and the third-generation value of the initial path is determined based on each smoothness.
[0106] In practical implementation, all grid points along the initial path can be extracted and sorted sequentially according to the path direction. For each grid point, the curvature at that grid point is calculated as the smoothness of that grid point. The directional angle between the two path segments formed by the grid point and the previous grid point, and the grid point and the next grid point, is determined (the smaller the angle, the higher the smoothness; the larger the angle, the lower the smoothness). Based on the preset mapping relationship between smoothness and cost value (e.g., a 5° angle corresponds to a cost value of 1, a 30° angle corresponds to a cost value of 5, and a 60° angle corresponds to a cost value of 10), the smoothness of each grid point is converted into the corresponding smoothness cost value. The smoothness costs of all grid points are accumulated to obtain the third-generation value of the initial path.
[0107] By quantifying the smoothness of each grid point and converting it into smoothness cost, the driving comfort of the path can be accurately reflected (high smoothness means low cost, and the path is easier for the vehicle to execute), providing a basis for selecting smoother paths and improving the rationality of path planning.
[0108] In step 1024, the fourth-generation value of the initial path is determined based on preset road rules. The fourth-generation value is used to characterize the traffic compliance of the initial path.
[0109] In actual implementation, road rules can be preset based on the actual situation, such as determining preset road rules (e.g., prohibiting driving over the line, prohibiting driving in the opposite direction, prohibiting driving into the non-motorized vehicle lane, etc.); check whether the initial path violates the preset road rules: judge each segment of the path whether it crosses the lane boundary, whether it is opposite to the direction of travel, whether it enters the prohibited area, etc.; for each violation, determine the corresponding rule value according to the preset rules (e.g., crossing the line once corresponds to a rule value of 20, driving in the opposite direction for a segment corresponds to a rule value of 50); sum up the rule values of all violations to obtain the fourth value of the initial path (if no rules are violated, the fourth cost value is 0).
[0110] By using the above methods, the cost value is calculated based on preset road rules, directly quantifying the traffic compliance of the route, ensuring that the planning results comply with traffic regulations, reducing the risk of violations, and improving the rationality of route planning.
[0111] In step 1025, the generation value of the initial path is determined based on the first generation value, the second generation value, the third generation value, and the fourth generation value.
[0112] In some embodiments, step 1025 can be implemented as follows: determine the first weight of the first generation value, the second weight of the second generation value, the third weight of the third cost value, and the fourth weight of the fourth cost value, wherein the second weight is greater than the first weight, the first weight is greater than the third weight, and the third weight is greater than the fourth weight; based on the first weight, the second weight, the third weight, and the fourth weight, perform a weighted summation of the first generation value, the second generation value, the third generation value, and the fourth generation value to obtain the cost value of the initial path.
[0113] In practice, the first-generation value is multiplied by the first weight, the second-generation value by the second weight, the third-generation value by the third weight, and the fourth-generation value by the fourth weight, respectively, to obtain four weighted values. The sum of the four weighted values is the value of the initial path.
[0114] In practice, different factors have different effects on vehicle travel paths. For example, vehicle safety is more important than comfort. Therefore, the weight of the cost value that affects safety can be set higher than the weight of the cost value that affects comfort.
[0115] Here, it can be configured such that the second weight is greater than the first weight, the first weight is greater than the third weight, and the third weight is greater than the fourth weight, i.e., the second weight > the first weight > the third weight > the fourth weight. In this way, the priority distinction of different cost values is reflected through the clear weight relationship, making the path evaluation more in line with actual needs (such as paying more attention to the safety impact of obstacle distance). The weighted summation method integrates the multi-dimensional cost value into a single quantitative result, which makes it easy to directly compare the overall advantages and disadvantages of different initial paths, providing a simple and clear judgment standard for subsequent selection of the optimal path and improving the rationality of path planning.
[0116] In step 103, based on preset kinematic conditions and the first initial path, the grid points traversed by the second initial path are iteratively adjusted to obtain the adjusted path corresponding to the second initial path.
[0117] In some embodiments, Figure 3D This is a flowchart illustrating the path adjustment method provided in an embodiment of this application. See also... Figure 3D Step 103 can be achieved through steps 1031 to 1034.
[0118] In step 1031, a first path segment is randomly selected from the second initial path, and if the first path segment is not the last path segment, the first starting grid point and the first ending grid point of the first path segment are determined.
[0119] In actual implementation, a path segment is randomly selected from all path segments (path segments composed of adjacent grid points) included in the second initial path and defined as the first path segment; it is determined whether the first path segment is the last path segment of the second initial path (i.e., the end grid point of the path segment is the end point of the second initial path); if the first path segment is not the last path segment, the starting point of the path segment is determined as the first starting grid point and the ending point is determined as the first ending grid point.
[0120] In step 1032, on a reference line that passes through the first end grid point and is perpendicular to the road centerline of the road where the vehicle is located, a sixth grid point is determined that satisfies the preset kinematic conditions for the path segment between the first starting grid point and the first starting grid point. The first end grid point in the first path segment is then adjusted to the sixth grid point to obtain the second path segment between the first starting grid point and the sixth grid point.
[0121] In actual implementation, with the first ending grid point as the foot of the perpendicular, a straight line perpendicular to the center line of the road where the vehicle is located is drawn, and this straight line is defined as the reference line; multiple candidate grid points are selected on the reference line, and the path segment between each candidate grid point and the first starting grid point is checked to see if it meets the preset kinematic conditions (such as curvature and rate of change of curvature within the allowable range of the vehicle); one grid point is selected from the candidate grid points that meet the conditions as the sixth grid point; the first path segment (from the first starting grid point to the first ending grid point) is replaced with the path segment from the first starting grid point to the sixth grid point, and the new path segment is defined as the second path segment.
[0122] In actual implementation, if the first path segment is the last path segment of the second initial path, then after obtaining the second path segment, the path before the first starting grid point in the second initial path and the second path segment can be connected to obtain the adjusted path after this adjustment of the second initial path. That is, the adjustment of the second initial path has ended. If the iteration end condition is not met, the second initial path can continue to be iteratively adjusted based on steps 1031 to 1034.
[0123] In step 1033, if the sixth grid point is a grid point along the first initial path, the remaining path segment in the first initial path after the sixth grid point is taken as the remaining path segment in the second initial path after the sixth grid point.
[0124] In actual implementation, check whether the determined sixth grid point is a grid point passed through by the first initial path; if the sixth grid point is a grid point passed through by the first initial path, extract all path segments from the sixth grid point to the end point in the first initial path, and define these path segments as the remaining path segments; use the remaining path segments as the remaining path segments after the sixth grid point in the second initial path after the adjustment based on the second path segments.
[0125] In step 1034, the path segment before the first starting grid point, the second path segment, and the remaining path segment in the second initial path are connected to obtain the adjusted path corresponding to the second initial path.
[0126] In actual implementation, all path segments in the second initial path that are before the first starting grid point (i.e., the path segments from the starting point to the first starting grid point) are retained; the path segments before the first starting grid point, the second path segment, and the remaining path segments are connected in sequence; the continuous trajectory formed after connection is the adjusted path corresponding to the second initial path.
[0127] Subsequently, if the cost of the adjusted path corresponding to the second initial path is higher than the preset threshold, the adjusted path is adjusted based on steps 1031 to 1034 until the iteration stops when the iteration stop condition is met, and the final adjusted path of the second initial path is obtained.
[0128] Here, the iteration stopping condition can be set based on actual needs. For example, the iteration stopping condition may include the cost value of the adjusted paths of the first initial path and all second initial paths being lower than a preset threshold, the difference in cost value of the adjusted paths of all second initial paths being less than a preset difference in three consecutive iterations, and the number of iterations reaching at least one of the preset number of iterations.
[0129] By employing the above methods, the diversity of path optimization is increased through the random selection and adjustment of path segments, thus avoiding getting trapped in local optima. The sixth grid point is selected based on preset kinematic conditions to ensure that the adjusted path segments are physically feasible and meet the driving capabilities of vehicles. Subsequent segments of the first initial path (which may be a low-cost path) are reused to reduce invalid computations and improve optimization efficiency. The complete adjusted path is formed by segmented connection to ensure path continuity. The iterative adjustment mechanism continuously optimizes the cost value of the path, ultimately resulting in a better adjusted path.
[0130] In some embodiments, if the sixth grid point is not a grid point along the first initial path, the adjusted path can be obtained in the following manner: if the sixth grid point is not a grid point along the first initial path, the sixth grid point is taken as the second starting point of the third path segment in the first initial path, and the iteration continues to select the second ending grid point of the path segment between the second starting grid point that satisfies the preset kinematic conditions, until the iteration stops when the iteration stop condition is met; the path segment before the first starting grid point, the first path segment, and the path segment formed by connecting the grid points reached in each iteration in the second initial path are connected to obtain the adjusted path corresponding to the second initial path.
[0131] In actual implementation, if the sixth grid point is determined not to be a grid point passed through by the first initial path, the sixth grid point can be defined as the second starting grid point of the third path segment; a candidate grid point is selected as the second ending grid point along the path direction, and it is checked whether the path segment between the second starting grid point and the candidate grid point satisfies the preset kinematic conditions; if it satisfies, the candidate grid point is determined as the second ending grid point, and it is determined whether the second ending grid point is a grid point passed through by the first initial path; if not, the second ending grid point is used as the new second starting grid point, and the above process is repeated to continue iterating to select the next second ending grid point; when the iteration reaches the stopping condition, the iteration stops; the path segment in the second initial path located before the first starting grid point is retained, and it is connected sequentially with the second path segment obtained in step 1032 (from the first starting grid point to the sixth grid point), and all path segments formed by connecting each second starting grid point and the second ending grid point during the iteration process. The resulting continuous trajectory is the adjustment path corresponding to the second initial path.
[0132] In actual implementation, during the iterative selection of the second end grid point, it is determined whether each second end grid point is a grid point passed by the first initial path. If it is determined that the second end grid point is a grid point passed by the first initial path, then the adjusted path of the second initial path is generated based on the above steps 1033 and 1034.
[0133] In a specific example Figure 7A This is a schematic diagram of the second initial path provided in the embodiments of this application. Figure 7B This is a first schematic diagram of the adjustment path provided in the embodiments of this application. Figure 7C This is a third schematic diagram illustrating the adjustment path provided in an embodiment of this application. See also... Figure 7A , Figure 7A The diagram shows a first initial path and a second initial path, following... Figure 7A , Figure 7B The diagram shows the adjustment path determined based on steps 1031 to 1034. Figure 7C The diagram shows the adjusted path determined based on steps 1031 and 1032, as well as the handling method in the case where the sixth grid point is not a grid point traversed by the first initial path.
[0134] See Figure 7A Assuming that when adjusting the second initial path, the randomly selected first path segment is the path segment between the first starting grid point (S2, L4) and the first ending grid point (S3, L4), see [reference needed]. Figure 7BIf the sixth grid point determined on the reference line where the first ending grid point (S3, L4) is located is (S3, L3), then the path segment between the first starting grid point (S2, L4) and the sixth grid point (S3, L3) is the second path segment. Furthermore, the sixth grid point (S3, L3) is a grid point traversed by the first initial path. Therefore, the remaining path segment in the first initial path after the sixth grid point (S3, L3), i.e., the path segment from the sixth grid point (S3, L3) to the grid point (S4, L2), can be considered as follows: The remaining path segment connected to grid point (S5, L2) is used as the remaining path segment after the sixth grid point in the second initial path. That is, the second initial path segment follows the remaining path segment after the sixth grid point (S3, L3) in the first initial path segment, resulting in the adjusted path of the second initial path. This adjusted path passes through grid point (S1, L4), the first starting grid point (S2, L4), the sixth grid point (S3, L3), grid point (S4, L2), and grid point (S5, L2).
[0135] See Figure 7A If the second initial path is adjusted, the randomly selected first path segment is the path segment between the first starting grid point (S3, L4) and the first ending grid point (S4, L4), see [link / reference]. Figure 7C If the sixth grid point determined on the reference line where the first ending grid point (S4, L4) is located is (S4, L3), then the path segment between the first starting grid point (S3, L4) and the sixth grid point (S4, L3) is the second path segment. And the sixth grid point (S4, L3) is not a grid point passed by the first initial path. Then, the second ending grid point is selected. Assuming that the selected second ending grid point is (S5, L2), since the second ending grid point is the last grid point in the path direction, the adjustment of the second initial path can be ended, and the adjusted path of the second initial path is obtained. This adjusted path passes through grid point (S1, L4), grid point (S2, L4), the first starting grid point (S3, L4), the sixth grid point (S4, L3), and the second ending grid point (S5, L2).
[0136] Understandable, Figures 7A to 7C Only one second initial path and one first initial path are shown schematically. In general, there can be multiple second initial paths and multiple first initial paths, but the iterative adjustment method for each second initial path is the same, so it will not be described in detail.
[0137] In step 104, a target path is determined based on the first initial path and the adjusted path, and the vehicle is guided to move based on the target path.
[0138] In some embodiments, the "determining the target path based on the first initial path and the adjusted path" in step 104 can be determined in any of the following ways: determining the cost value of each adjusted path and determining the target path with the minimum cost value among the first initial path and the adjusted path; or, arbitrarily selecting one path among the first initial path and the adjusted path as the target path.
[0139] In practice, since the lower the cost of a path, the more suitable the path is for guiding vehicle movement, the path with the lowest cost can be directly determined from the first initial path and the adjusted path as the target path for guiding vehicle movement.
[0140] In actual implementation, if the iterative adjustment of the second initial path ends based on the iteration termination condition "the cost of the first initial path and all adjusted paths of the second initial path are lower than the preset threshold", it means that the first initial path and all adjusted paths are paths that meet the requirements. Alternatively, one path can be selected from the first initial path and the adjusted paths as the target path.
[0141] In one example Figure 8 This is a second flowchart illustrating the path processing method provided in this application embodiment. See also... Figure 8 Terminal 401 can perform path processing through the following procedure.
[0142] S201, Generate road grid map.
[0143] S202, randomly generate multiple initial paths.
[0144] S203, calculate the cost of each initial path.
[0145] S204, determine whether the iteration termination condition is met.
[0146] The iteration termination condition may include whether the minimum cost value in the initial path is lower than a preset threshold, or whether all paths overlap.
[0147] S205, if not satisfied, then randomly determine an initial path with a cost value higher than the preset threshold;
[0148] S206, extract a portion of the path from the initial path whose cost value is lower than a preset threshold, and splice it into the initial path whose cost value is higher than the preset threshold.
[0149] Repeat steps S204 to S206 until the iteration termination condition is met, then end the iteration adjustment.
[0150] By using the above method, when processing vehicle paths, the first grid point corresponding to the vehicle is determined in the road grid map based on the vehicle's location. Using the first grid point as the starting point, multiple initial paths are generated in the road grid map, and the cost value of each initial path is determined. Among the multiple initial paths, the first initial path with a cost value lower than a preset threshold and the second initial path with a cost value higher than the preset threshold are determined. Based on preset kinematic conditions and the first initial path, the grid points along the path of the second initial path are iteratively adjusted to obtain the adjusted path corresponding to the second initial path. In this way, by pre-generating multiple initial paths and then adjusting the second initial paths that do not meet the conditions (i.e., the cost value is lower than the preset threshold), the limitations of a single path can be reduced, thereby reducing the limitation of local optima. Furthermore, the adjustment method based on preset kinematic conditions and the first initial path can ensure that the adjustment process moves towards a better direction, thereby improving the rationality of path planning and improving path quality.
[0151] The following description continues to illustrate the exemplary structure of the path processing device 455 provided in the embodiments of this application as a software module. In some embodiments, such as... Figure 2 As shown, the software modules stored in the path processing device 455 of the memory 450 may include:
[0152] The path generation module 4551 is used to determine the first grid point corresponding to the vehicle in the road grid map based on the vehicle's location, and to generate multiple initial paths in the road grid map using the first grid point as the starting point of the path.
[0153] The first determining module 4552 is used to determine the cost value of each initial path, and to determine the first initial path with a cost value lower than a preset threshold and the second initial path with a cost value not lower than the preset threshold among multiple initial paths.
[0154] The adjustment module 4553 is used to iteratively adjust the grid points passed by the second initial path based on preset kinematic conditions and the first initial path, so as to obtain the adjusted path corresponding to the second initial path.
[0155] The second determining module 4554 is used to determine the target path based on the first initial path and the adjusted path, and guide the vehicle to move based on the target path.
[0156] In some embodiments, the path generation module 4551 is further configured to: use a first grid point as the starting point of the path; randomly select multiple second grid points in the road grid map along the path direction of the road centerline of the road where the vehicle is located; for each second grid point, detect the path segment between the first grid point and the second grid point based on preset kinematic conditions to obtain a first detection result; if the first detection result indicates that the path segment meets the preset kinematic conditions, continue to iteratively select a third grid point that meets the preset kinematic conditions in the road grid along the path direction until there are no grid points along the path direction and stop iterating; connect the first grid point, the second grid point, and the third grid point to obtain the initial path.
[0157] In some embodiments, the first determining module 4552 is further configured to: determine the offset between the initial path and the centerline of the road where the vehicle is located for each initial path, and determine a first-generation value of the initial path based on the offset; determine a second-generation value of the initial path based on the distance between the initial path and the location of the obstacle in the road grid map when there is an obstacle in the road; determine the smoothness of the initial path at each grid point along the path, and determine a third-generation value of the initial path based on each smoothness; determine a fourth-generation value of the initial path based on preset road rules, the fourth-generation value being used to characterize the traffic compliance of the initial path; and determine the generation value of the initial path based on the first-generation value, the second-generation value, the third-generation value, and the fourth-generation value.
[0158] In some embodiments, the first determining module 4552 is further configured to determine multiple grid point pairs located on the same horizontal line among multiple fourth grid points along the initial path and multiple fifth grid points along the road centerline of the road where the vehicle is located; wherein the horizontal line is perpendicular to the road centerline, and a grid point pair includes a fourth grid point and a fifth grid point; for each grid point pair, the distance between the fourth grid point and the fifth grid point included in the grid point pair is determined as the point offset of the grid point pair; and the point offsets of each grid point pair are summed to obtain the offset between the initial path and the road centerline of the road where the vehicle is located.
[0159] In some embodiments, the first determining module 4552 is further configured to: determine the distance between the path segment and the location of the obstacle in the road grid map for each path segment between every two adjacent grid points in the multiple grid points of the initial path path; if the distance is less than a distance threshold, determine the distance cost value corresponding to the path segment based on a preset mapping relationship between distance and cost value and the distance of the path segment; and determine the sum of the distance cost values corresponding to each path segment as the second generation value of the initial path.
[0160] In some embodiments, the first determining module 4552 is further configured to determine the first weight of the first generation value, the second weight of the second generation value, the third weight of the third cost value, and the fourth weight of the fourth cost value, wherein the second weight is greater than the first weight, the first weight is greater than the third weight, and the third weight is greater than the fourth weight; and based on the first weight, the second weight, the third weight, and the fourth weight, the first generation value, the second generation value, the third generation value, and the fourth generation value are weighted and summed to obtain the cost value of the initial path.
[0161] In some embodiments, the adjustment module 4553 is further configured to: randomly select a first path segment in the second initial path; and, if the first path segment is not the last path segment, determine a first starting grid point and a first ending grid point of the first path segment; on a reference line that passes through the first ending grid point and is perpendicular to the road centerline of the road where the vehicle is located, determine a sixth grid point that satisfies a preset kinematic condition for the path segment between the first starting grid point and the first ending grid point, and adjust the first ending grid point in the first path segment to the sixth grid point to obtain a second path segment between the first starting grid point and the sixth grid point; if the sixth grid point is a grid point passed through by the first initial path, take the remaining path segment after the sixth grid point in the first initial path as the remaining path segment after the sixth grid point in the second initial path; and connect the path segment before the first starting grid point, the second path segment, and the remaining path segment in the second initial path to obtain the adjusted path corresponding to the second initial path.
[0162] In some embodiments, the adjustment module 4553 is further configured to, when the sixth grid point is not a grid point along the first initial path, take the sixth grid point as the second starting path point of the third path segment in the first initial path, continue iteratively selecting the second ending grid point of the path segment between the second starting grid point that satisfies the preset kinematic conditions, until the iteration stops when the iteration stop condition is met; and connect the path segment in the second initial path that is before the first starting grid point, the first path segment, and the path segment formed by connecting the grid points reached in each iteration to obtain the adjusted path corresponding to the second initial path.
[0163] In some embodiments, the second determining module 4554 is further configured to determine the cost value of each adjustment path and determine the target path with the minimum cost value among the first initial path and the adjustment path; or, to select any one of the first initial path and the adjustment path as the target path.
[0164] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the path processing method described above in this application.
[0165] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the path processing method provided in this application. For example, ... Figure 3A The path processing method is shown.
[0166] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0167] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0168] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0169] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0170] In summary, through the embodiments of this application, when processing vehicle paths, the first grid point corresponding to the vehicle is first determined in the road grid map based on the vehicle's location. Using the first grid point as the starting point, multiple initial paths are generated in the road grid map, and the cost value of each initial path is determined. Among the multiple initial paths, a first initial path with a cost value lower than a preset threshold and a second initial path with a cost value higher than the preset threshold are determined. Based on preset kinematic conditions and the first initial path, the grid points along the path of the second initial path are iteratively adjusted to obtain the adjusted path corresponding to the second initial path. In this way, by pre-generating multiple initial paths and then adjusting the second initial paths that do not meet the conditions (i.e., the cost value is lower than the preset threshold), the limitations of a single path can be reduced, thereby reducing the limitation of local optima. Furthermore, the adjustment method based on preset kinematic conditions and the first initial path can ensure that the adjustment process moves towards a better direction, thereby improving the rationality of path planning and improving path quality.
[0171] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A path processing method, characterized in that, The method includes: Based on the vehicle's location, a first grid point corresponding to the vehicle is determined in the road grid map, and multiple initial paths are generated in the road grid map using the first grid point as the starting point of the path. Determine the cost value of each initial path, and among the plurality of initial paths, determine a first initial path whose cost value is lower than a preset threshold, and a second initial path whose cost value is not lower than the preset threshold; On a reference line that passes through the grid points of the second initial path and is perpendicular to the center line of the road where the vehicle is located, a sixth grid point that meets the preset kinematic conditions is determined to adjust the path segment in the second initial path. If the sixth grid point is a grid point along the first initial path, the remaining path segments in the first initial path that are located after the sixth grid point are connected as the remaining path segments of the second initial path to obtain the adjusted path corresponding to the second initial path. If the sixth grid point is not a grid point along the first initial path, the system continues to iterate and select grid points whose path segments between the sixth grid point and the first grid point satisfy the preset kinematic conditions, so as to adjust the second initial path and obtain the adjusted path corresponding to the second initial path. A target path is determined based on the first initial path and the adjusted path, and the vehicle is guided to move based on the target path.
2. The method according to claim 1, characterized in that, The step of generating multiple initial paths in the road grid map, using the first grid point as the starting point of the path, includes: Using the first grid point as the starting point of the path, multiple second grid points are randomly selected in the road grid map along the path direction of the road centerline of the road where the vehicle is located; For each of the second grid points, based on preset kinematic conditions, the path segment between the first grid point and the second grid point is detected to obtain a first detection result; If the first detection result indicates that the path segment meets the preset kinematic conditions, the iteration continues to select a third grid point that meets the preset kinematic conditions in the road grid map along the path direction until there are no grid points along the path direction and the iteration stops. The initial path is obtained by connecting the first grid point, the second grid point, and the third grid point.
3. The method according to claim 1, characterized in that, Determining the cost of each of the initial paths includes: For each of the initial paths, the offset between the initial path and the centerline of the road where the vehicle is located is determined, and a first-generation value of the initial path is determined based on the offset. In the case of obstacles in the road, a second-generation value of the initial path is determined based on the distance between the initial path and the location of the obstacle in the road grid map; Determine the smoothness of the initial path at each grid point along the path, and determine the third-generation value of the initial path based on each smoothness. The fourth-generation value of the initial path is determined based on preset road rules, and the fourth-generation value is used to characterize the traffic compliance of the initial path. The generation value of the initial path is determined based on the first generation value, the second generation value, the third generation value, and the fourth generation value.
4. The method according to claim 3, characterized in that, Determining the offset between the initial path and the centerline of the road where the vehicle is located includes: Among the multiple fourth grid points along the initial path and the multiple fifth grid points along the road centerline of the road where the vehicle is located, multiple grid point pairs located on the same horizontal line are identified. The horizontal line is perpendicular to the road centerline, and a grid point pair includes a fourth grid point and a fifth grid point; For each of the grid point pairs, the distance between the fourth grid point and the fifth grid point included in the grid point pair is determined as the point offset of the grid point pair; The offsets of each pair of grid points are summed to obtain the offset between the initial path and the centerline of the road where the vehicle is located.
5. The method according to claim 3, characterized in that, The determination of the second-generation value of the initial path based on the distance between the initial path and the position of the obstacle in the road grid map includes: For each path segment between two adjacent grid points in the multiple grid points along the initial path, determine the distance between the path segment and the location of the obstacle in the road grid map; If the distance is less than a distance threshold, the distance cost of the path segment is determined based on a preset mapping relationship between distance and cost, and the distance of the path segment. The sum of the distance cost values corresponding to each of the path segments is determined as the second-generation value of the initial path.
6. The method according to claim 3, characterized in that, Determining the generation value of the initial path based on the first generation value, the second generation value, the third generation value, and the fourth generation value includes: Determine the first weight of the first generation value, the second weight of the second generation value, the third weight of the third cost value, and the fourth weight of the fourth cost value, wherein the second weight is greater than the first weight, the first weight is greater than the third weight, and the third weight is greater than the fourth weight; Based on the first weight, the second weight, the third weight, and the fourth weight, the first generation value, the second generation value, the third generation value, and the fourth generation value are weighted and summed to obtain the generation value of the initial path.
7. The method according to claim 1, characterized in that, The step of determining a sixth grid point that satisfies the preset kinematic conditions on a reference line passing through the grid points of the second initial path and perpendicular to the road centerline of the road where the vehicle is located, in order to adjust the path segment in the second initial path, includes: In the second initial path, a first path segment is randomly selected, and if the first path segment is not the last path segment, the first starting grid point and the first ending grid point of the first path segment are determined. On a reference line that passes through the first end grid point and is perpendicular to the road centerline of the road where the vehicle is located, a sixth grid point is determined that satisfies the preset kinematic conditions for the path segment between the first start grid point and the first end grid point in the first path segment. The first end grid point in the first path segment is then adjusted to the sixth grid point to obtain the second path segment between the first start grid point and the sixth grid point. When the sixth grid point is a grid point along the first initial path, the remaining path segments in the first initial path located after the sixth grid point are connected as the remaining path segments of the second initial path to obtain the adjusted path corresponding to the second initial path, including: If the sixth grid point is a grid point along the first initial path, the remaining path segment in the first initial path after the sixth grid point is taken as the remaining path segment in the second initial path after the sixth grid point. Connect the path segment before the first starting grid point, the second path segment, and the remaining path segment in the second initial path to obtain the adjusted path corresponding to the second initial path.
8. The method according to claim 7, characterized in that, If the sixth grid point is not a grid point along the first initial path, the process iteratively selects grid points whose path segments between the sixth grid point and the first grid point satisfy the preset kinematic conditions to adjust the second initial path, thereby obtaining an adjusted path corresponding to the second initial path, including: If the sixth grid point is not a grid point along the first initial path, the sixth grid point is used as the second starting grid point of the third path segment in the second initial path. The iteration continues to select the second ending grid point of the path segment between the second starting grid point and the second starting grid point that satisfies the preset kinematic conditions until the iteration stops when the iteration stop condition is met. Connect the path segments in the second initial path that are before the first starting grid point, the second path segment, and the path segments formed by connecting the grid points reached in each iteration to obtain the adjusted path corresponding to the second initial path.
9. The method according to claim 1, characterized in that, The step of determining the target path based on the first initial path and the adjusted path includes: Determine the cost of each of the adjusted paths, and identify the target path with the minimum cost among the first initial path and the adjusted paths; or, Choose either the first initial path or the adjusted path as the target path.
10. A path processing device, characterized in that, The device includes: The path generation module is used to determine the first grid point corresponding to the vehicle in the road grid map based on the vehicle's location, and to generate multiple initial paths in the road grid map using the first grid point as the starting point of the path. The first determining module is used to determine the cost value of each of the initial paths, and to determine, among the plurality of initial paths, a first initial path whose cost value is lower than a preset threshold, and a second initial path whose cost value is not lower than the preset threshold; The adjustment module is used to determine a sixth grid point that satisfies the preset kinematic conditions on a reference line that passes through the grid points of the second initial path and is perpendicular to the road centerline of the road where the vehicle is located, so as to adjust the path segment in the second initial path; if the sixth grid point is a grid point passed through by the first initial path, the remaining path segments in the first initial path located after the sixth grid point are connected as the remaining path segments of the second initial path to obtain the adjusted path corresponding to the second initial path; if the sixth grid point is not a grid point passed through by the first initial path, the module continues to iteratively select grid points whose path segments between the sixth grid point and the second initial path satisfy the preset kinematic conditions, so as to adjust the second initial path to obtain the adjusted path corresponding to the second initial path. The second determining module is used to determine a target path based on the first initial path and the adjusted path, and to guide the vehicle to move based on the target path.
11. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the path processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, the path processing method according to any one of claims 1 to 9 is implemented.
13. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, the path processing method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Path planning method and device, equipment and storage medium
CN115615449A
Path planning method and device, computer equipment, readable storage medium and program product
CN118687586A
