Path optimization method and device, electronic equipment and storage medium

By constructing a directed graph and using a variety of optimization algorithms, the problem of insufficient adaptability of path planning algorithms to complex traffic environments in the existing technology is solved, path optimization and trajectory information generation for multiple motion modes are realized, and application flexibility is improved. and data adaptability.

CN118776582APending Publication Date: 2024-10-15BEIJING SAIMO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410898322.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing path planning algorithms lack optimization for specific business scenarios, cannot fully adapt to diverse driving environment needs, and usually can only support a single movement mode, limiting their application flexibility and adaptability in complex traffic environments.

Method used

By constructing a directed graph based on the high-precision map, the initial motion data of the target motion mode is obtained, and the corresponding optimization algorithm is used to optimize the way points, determine the target path and motion trajectory information, support multiple motion modes, and use the quintic polynomial algorithm and cubic spline interpolation methods for path tuning.

Benefits of technology

It effectively solves complex trajectory information generation scenarios such as lane changing and lane changing in path planning, improves application flexibility and adaptability in complex traffic environments, supports multiple motion modes, and the generated data can be directly used in commonly used simulation software .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118776582A_ABST
    Figure CN118776582A_ABST
Patent Text Reader

Abstract

The invention provides a path optimization method and device, electronic equipment and a storage medium, and the method comprises the steps: planning an initial path from a starting point to a terminal point and passing through all preset path points from a directed graph determined according to a high-precision map according to a path planning algorithm; acquiring initial motion data of the target motion mode; based on the initial motion data, optimizing each initial path point in the initial path by adopting an optimization algorithm corresponding to the target motion mode, and determining a target path point corresponding to each optimized initial path point and target motion information on each target path point; and sequentially connecting all the target path points, determining an optimized target path, and determining motion track information according to the target motion information on all the target path points. In this way, the corresponding target path and the motion trail information are optimized according to different motion modes, and therefore the application flexibility and adaptability in the complex traffic environment can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of path planning, and in particular to a path optimization method, device, electronic device and storage medium. Background Art

[0002] In the field of autonomous driving, path planning is a crucial link. It is to model the environment based on real-time sensor data and known environmental information, and then apply corresponding algorithms to plan a walking path based on the environmental modeling.

[0003] However, the current path planning algorithms are usually not optimized for specific business scenarios and fail to fully adapt to the diverse driving environment requirements. More importantly, these algorithms can only support a single movement mode, which limits their application flexibility and adaptability in complex traffic environments. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a path optimization method, device, electronic device and storage medium, which optimize the corresponding target path and motion trajectory information according to different motion modes, thereby effectively improving the application flexibility and adaptability in complex traffic environments.

[0005] The present application provides a path optimization method, the method comprising:

[0006] According to the path planning algorithm, an initial path from the starting point to the end point and passing through all preset waypoints is planned from the directed graph determined according to the high-precision map;

[0007] Acquiring initial motion data of the target motion mode;

[0008] Based on the initial motion data, each initial path point in the initial path is optimized using an optimization algorithm corresponding to the target motion mode, and a target path point corresponding to each optimized initial path point and target motion information on each target path point are determined;

[0009] All target path points are connected in sequence to determine the optimized target path, and the motion trajectory information when driving along the target path is determined based on the target motion information on all target path points.

[0010] Optionally, when the target motion mode is a non-uniformly accelerated motion mode, based on the initial motion data, each initial path point in the initial path is optimized using an optimization algorithm corresponding to the target motion mode, and a target path point corresponding to each optimized initial path point and target motion information on each target path point are determined, including:

[0011] Constructing an objective function according to the position information of each initial path point and the initial motion data in the non-uniformly accelerated motion mode; the objective function includes a displacement error, a velocity error, and an acceleration error;

[0012] Based on the optimization requirements of the objective function, a quintic polynomial algorithm is used to optimize each initial path point in the initial path, and the target path point corresponding to each optimized initial path point and the target motion information on each target path point are determined.

[0013] Optionally, when the target motion mode is a uniformly variable speed motion mode, based on the initial motion data, each initial path point in the initial path is optimized using an optimization algorithm corresponding to the target motion mode, and a target path point corresponding to each optimized initial path point and target motion information on each target path point are determined, including:

[0014] Constructing motion constraints based on the position information of each initial path point and the initial motion data in the uniformly variable speed motion mode; the motion constraints include the time and speed to reach each initial path point;

[0015] Based on the motion constraint conditions, each initial path point in the initial path is optimized using a cubic spline interpolation method to determine the target path point corresponding to each optimized initial path point and the target motion information on each target path point.

[0016] Optionally, determine the directed graph by:

[0017] Acquire a target map including the preset waypoints;

[0018] Determine at least one lane segment corresponding to each lane of the target map;

[0019] Determine at least one driving direction of a node corresponding to each lane segment of each lane at a preset position according to the lane direction of each lane and the road markings of each lane segment of each lane;

[0020] A directed graph corresponding to the target map is constructed according to the connection relationship between the lanes in the target map and at least one driving direction corresponding to each node.

[0021] Optionally, after determining an optimized target path by sequentially connecting all target path points, and determining motion track information when traveling along the target path according to target motion information on the target path points, the method further includes:

[0022] The target path and motion trajectory information are stored in mat format.

[0023] Optionally, the acquiring initial motion data of the target motion mode includes:

[0024] In response to a mode selection operation by a target user on the graphical user interface, displaying at least one motion data selection input box corresponding to the selected target motion mode;

[0025] The selection operation or input operation of the target user on each motion data selection input box is identified to obtain the initial motion data of the target motion mode.

[0026] Optionally, the method of planning an initial path from a starting point to an end point and passing through all preset waypoints from a directed graph determined according to a high-precision map according to a path planning algorithm includes:

[0027] Configure the search step size according to the simulation frequency;

[0028] According to the path planning algorithm, multiple initial path points are determined from the directed graph according to the search step length requirement, and an initial path from the starting point to the end point and passing through all preset way points is planned based on the determined multiple initial path points; wherein the distance between adjacent initial path points is determined according to the search step length.

[0029] The present application also provides a path optimization device, the device comprising:

[0030] A planning module is used to plan an initial path from the starting point to the end point and passing through all preset waypoints from a directed graph determined according to a high-precision map according to a path planning algorithm;

[0031] An acquisition module, used for acquiring initial motion data of a target motion mode;

[0032] An optimization module, configured to optimize each initial path point in the initial path based on the initial motion data by using an optimization algorithm corresponding to the target motion mode, and determine a target path point corresponding to each optimized initial path point, as well as target motion information on each target path point;

[0033] The determination module is used to connect all target path points in sequence to determine the optimized target path, and determine the motion trajectory information when driving along the target path based on the target motion information on all target path points.

[0034] Optionally, when the target motion mode is a non-uniformly accelerated motion mode, the optimization module is used to optimize each initial path point in the initial path based on the initial motion data using an optimization algorithm corresponding to the target motion mode, and determine a target path point corresponding to each optimized initial path point, as well as target motion information on each target path point, the optimization module is used to:

[0035] Constructing an objective function according to the position information of each initial path point and the initial motion data in the non-uniformly accelerated motion mode; the objective function includes a displacement error, a velocity error, and an acceleration error;

[0036] Based on the optimization requirements of the objective function, a quintic polynomial algorithm is used to optimize each initial path point in the initial path, and the target path point corresponding to each optimized initial path point and the target motion information on each target path point are determined.

[0037] Optionally, when the target motion mode is a uniformly variable speed motion mode, the optimization module is used to optimize each initial path point in the initial path based on the initial motion data using an optimization algorithm corresponding to the target motion mode, and determine the target path point corresponding to each optimized initial path point, as well as the target motion information on each target path point, the optimization module is used to:

[0038] Constructing motion constraints based on the position information of each initial path point and the initial motion data in the uniformly variable speed motion mode; the motion constraints include the time and speed to reach each initial path point;

[0039] Based on the motion constraint conditions, each initial path point in the initial path is optimized using a cubic spline interpolation method to determine the target path point corresponding to each optimized initial path point and the target motion information on each target path point.

[0040] Optionally, the device further comprises a building module, wherein the building module is used to:

[0041] Acquire a target map including the preset waypoints;

[0042] Determine at least one lane segment corresponding to each lane of the target map;

[0043] Determine at least one driving direction of a node corresponding to each lane segment of each lane at a preset position according to the lane direction of each lane and the road markings of each lane segment of each lane;

[0044] A directed graph corresponding to the target map is constructed according to the connection relationship between the lanes in the target map and at least one driving direction corresponding to each node.

[0045] Optionally, the device also includes a storage module, which is used to: after connecting all target path points in sequence to determine the optimized target path, and determining the motion trajectory information when traveling along the target path based on the target motion information on the target path points, the target path and motion trajectory information are stored in a mat format.

[0046] Optionally, when the acquisition module is used to acquire initial motion data of the target motion mode, the acquisition module is used to:

[0047] In response to a mode selection operation by a target user on the graphical user interface, displaying at least one motion data selection input box corresponding to the selected target motion mode;

[0048] The selection operation or input operation of the target user on each motion data selection input box is identified to obtain the initial motion data of the target motion mode.

[0049] Optionally, when the planning module is used to plan an initial path from a starting point to an end point and passing through all preset waypoints from a directed graph determined according to a high-precision map according to a path planning algorithm, the planning module is used to:

[0050] Configure the search step size according to the simulation frequency;

[0051] According to the path planning algorithm, multiple initial path points are determined from the directed graph according to the search step length requirement, and an initial path from the starting point to the end point and passing through all preset way points is planned based on the determined multiple initial path points; wherein the distance between adjacent initial path points is determined according to the search step length.

[0052] An embodiment of the present application also provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the path optimization method as described above are performed.

[0053] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the path optimization method described above are executed.

[0054] A path optimization method, device, electronic device and storage medium provided in an embodiment of the present application include: planning an initial path from a starting point to an end point and passing through all preset waypoints from a directed graph determined according to a high-precision map according to a path planning algorithm; obtaining initial motion data of a target motion mode; based on the initial motion data, optimizing each initial path point in the initial path using an optimization algorithm corresponding to the target motion mode, determining a target path point corresponding to each optimized initial path point, and target motion information on each target path point; connecting all target path points in sequence to determine an optimized target path, and determining motion trajectory information when traveling along the target path based on the target motion information on all target path points.

[0055] In this way, the following technical effects can be achieved through the technical solution of this application:

[0056] 1. By parsing the road markings and establishing a directed graph, it can effectively solve complex trajectory information generation scenarios such as lane changes in path planning;

[0057] 2. Targeted path optimization and motion trajectory information determination are carried out according to different operation modes, so as to be compatible with multiple motion modes and improve application flexibility and adaptability in complex traffic environments;

[0058] 3. Configure the simulation step length according to the simulation frequency to meet the diversity of usage requirements;

[0059] 4. Design an easy-to-operate graphical user interface to improve the convenience of data configuration, and the generated data can be directly saved as a .mat file, which can be directly used in SimPro or other simulation software, thereby improving the adaptability of the solution.

[0060] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0062] Figure 1 A flow chart of a path optimization method provided in an embodiment of the present application;

[0063] Figure 2 A schematic diagram of a directed graph provided in an embodiment of the present application;

[0064] Figure 3 A schematic diagram of a graphical user interface provided for this application;

[0065] Figure 4 An example diagram of the field name comparison table of a mat format file provided for this application;

[0066] Figure 5 One of the structural schematic diagrams of a path optimization device provided in an embodiment of the present application;

[0067] Figure 6 A second structural diagram of a path optimization device provided in an embodiment of the present application;

[0068] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0069] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0070] In the field of autonomous driving, path planning is a crucial link. It is to model the environment based on real-time sensor data and known environmental information, and then apply corresponding algorithms to plan a walking path based on the environmental modeling.

[0071] However, the current path planning algorithms are usually not optimized for specific business scenarios and fail to fully adapt to the diverse driving environment requirements. More importantly, these algorithms can only support a single movement mode, which limits their application flexibility and adaptability in complex traffic environments.

[0072] In addition, the following technical problems still exist in the prior art: when establishing road topological relationships, taking OpenDrive high-precision map data as an example, generally only the lane level is entered. Therefore, when changing lanes, there will be unreasonable situations such as changing lanes in non-lane-changing areas or not changing lanes in lane-changing areas. For path generation, there will be problems such as not fitting the actual road conditions and inaccuracy; the search step length for generating trajectory information cannot be configured; the trajectory information storage structure is generally saved in the form of serialized data such as json, and the usage threshold is too high. It cannot be directly used for simulation in common simulation software such as Carla, Matlab, etc., and secondary development and conversion are required before it can be used.

[0073] Based on this, the embodiments of the present application provide a path optimization method, device, electronic device and storage medium to solve the above technical problems.

[0074] See also Figure 1 , Figure 1 A flow chart of a path optimization method provided in an embodiment of the present application. Figure 1 As shown in, the method provided in the embodiment of the present application includes:

[0075] S101. According to a path planning algorithm, an initial path from a starting point to an end point and passing through all preset waypoints is planned from a directed graph determined according to a high-precision map.

[0076] S102, obtaining initial motion data of the target motion mode;

[0077] S103, based on the initial motion data, optimizing each initial path point in the initial path using an optimization algorithm corresponding to the target motion mode, and determining a target path point corresponding to each optimized initial path point, and target motion information on each target path point;

[0078] S104: Use all target path points to connect in sequence to determine the optimized target path, and determine the motion trajectory information when traveling along the target path based on the target motion information on all target path points.

[0079] For step S101, the path planning algorithm is predetermined, and by way of example, the path planning algorithm includes but is not limited to A* algorithm (Astar Algorithm), Dijkstra algorithm (Dijkstra), and RRT algorithm (rapidly exploring random tree).

[0080] The high-precision map specifically refers to high-precision map data, which usually includes road topology, traffic rules, lane level information, traffic lights, obstacle locations and other data. The above data can come from existing map providers or be created in real time through sensors such as lidar.

[0081] The starting point and the end point are preset waypoints, and all preset waypoints can be determined by user selection or input through a graphical user interface, and the number of preset waypoints is greater than or equal to 2.

[0082] The initial path includes a plurality of initial path points, and the initial path points include all preset path points.

[0083] Continuing with step S101, in one implementation provided in the present application, a directed graph is determined by the following steps:

[0084] S201: Acquire a target map including the preset waypoints.

[0085] S202: Determine at least one lane segment corresponding to each lane of the target map.

[0086] S203, determining at least one driving direction of a node corresponding to each lane segment of each lane at a preset position according to the lane direction of each lane and the road markings of each lane segment of each lane;

[0087] S204: construct a directed graph corresponding to the target map according to the connection relationship between lanes in the target map and at least one driving direction corresponding to each node.

[0088] With respect to step S201, the target map includes all preset waypoints.

[0089] For example, the target map is obtained by: determining a regional map including all preset waypoints; determining unavailable lanes in the regional map according to preset feasibility conditions; and obtaining the target map after deleting the unavailable lanes in the regional map.

[0090] Here, the preset feasibility conditions refer to abnormal lanes, physical obstacles and / or road traffic signs. Specifically, according to the preset feasibility conditions, the unavailable lanes in the area map are determined, including: determining the lanes containing physical obstacles in the area map, and / or determining the abnormal lanes in the area map, and / or determining the current unavailable lanes through the road traffic signs of each lane in the area map, thereby determining the unavailable lanes in the area map. The abnormal lanes can be lanes with the same lane direction and adjacent but not connected lanes, and lanes with different lane directions but connected.

[0091] The unavailable lanes include lanes with physical obstacles and / or lanes with different current traffic determined by road traffic signs. For example, the road traffic signs mainly used in this method are the relevant descriptions of road traffic signs and road markings and rules on road physical connections specified in the national standard GB5768.

[0092] In this way, deleting the unavailable lanes in the area map can reduce the search space of the subsequent path search, thereby improving the search efficiency and reducing the number of candidate paths to be considered as much as possible without affecting the quality of the final path.

[0093] For step S202, a lane refers to at least one lane between two road intersections, that is, a lane in this application can be understood as a lane that allows one vehicle to travel. It can also be understood as a lane level in the OpenDRIVE file.

[0094] Each lane corresponds to at least one lane segment. Specifically, each lane contains at least one set of road markings (RoadMark), and a set of road markings corresponds to a lane segment, or in other words, each lane contains at least one lane offset (LaneSection), and a lane offset corresponds to a lane segment. A set of road markings includes road markings located on both sides or one side of a lane segment.

[0095] In this way, the analysis of the OpenDrive road topology structure is realized, and when constructing a directed graph, the RoadMark within the Lane is analyzed, including the RoadMark differences caused by different offsets. Therefore, global planning of lane change and non-lane change areas can be achieved from the data structure, making the generated trajectory and motion information closer to the real scene.

[0096] For step S203, the lane direction of the lane may be preset. If the lane is a right lane, the lane direction of the lane is to the right, so that the lane direction of at least one lane segment corresponding to the lane is to the right. If the lane is a left lane, the lane direction of the lane is to the left, so that the lane direction of at least one lane segment corresponding to the lane is to the left.

[0097] The road markings of at least one lane segment corresponding to each lane may be the same or different. For example, the road markings of a lane segment on a lane may be solid lines, and the road markings of another lane segment on the same lane may be dashed lines.

[0098] The starting position of the lane segment is the starting road segment cutoff surface of the lane segment, and the ending position of the lane segment is the ending road segment cutoff surface of the lane segment. The starting road segment cutoff surface of the lane segment is perpendicular to the lane direction of the starting position, and the ending road segment cutoff surface of the lane segment is perpendicular to the lane direction of the ending position.

[0099] The preset position of each lane segment is the midpoint of the target road segment cutoff surface corresponding to the lane direction of each lane segment, wherein the lane direction includes a first direction and a second direction opposite to the first direction, the target road segment cutoff surface corresponding to the first direction is one of the starting road segment cutoff surface and the ending road segment cutoff surface, and the target road segment cutoff surface corresponding to the second direction is the other of the starting road segment cutoff surface and the ending road segment cutoff surface.

[0100] Each lane segment corresponds to a node. Since a lane corresponds to at least one lane segment, a lane corresponds to at least one node.

[0101] The method of determining at least one driving direction of a node corresponding to each lane segment of each lane at a preset position based on the lane direction of each lane and the road markings of each lane segment of each lane includes: determining lane change information of each lane segment under each lane based on the road markings of each lane segment; for each lane segment of each lane, determining the lane change direction of the node corresponding to the lane segment at the preset position based on the lane change information of the lane segment; for each lane segment of each lane, using the lane direction of the lane where the lane segment is located and the lane change direction of the node corresponding to the lane segment at the preset position as the at least one driving direction of the node.

[0102] The lane change information refers to whether lanes can be changed within a lane segment and the corresponding lane change direction, that is, whether each lane segment is allowed to change lanes to the left and / or to the right is determined based on the road markings corresponding to each lane segment; for each lane segment, if the lane segment is allowed to change lanes to the left and allowed to change lanes to the right, the lane change direction of the node corresponding to the lane segment is the direction of the node pointing to the node of the left adjacent lane segment of the lane segment, and the direction of the node pointing to the node of the right adjacent lane segment; if the lane segment is only allowed to change lanes to the left, the lane change direction of the node corresponding to the lane segment is the direction of the node pointing to the node of the left adjacent lane segment of the lane segment; if the lane segment is only allowed to change lanes to the right, the lane change direction of the node corresponding to the lane segment is the direction of the node pointing to the node of the right adjacent lane segment.

[0103] That is, at least one driving direction corresponding to each node is the lane direction of the lane where the node is located and the lane direction of the node. For each lane segment, the left adjacent lane segment of the lane segment refers to the lane segment located on the left side of the lane segment and adjacent to the lane segment, and the right adjacent lane segment of the lane segment refers to the lane segment located on the right side of the lane segment and adjacent to the lane segment.

[0104] With respect to step S204, constructing a directed graph corresponding to the target map based on the connection relationship between lanes in the target map and at least one driving direction corresponding to each node includes: connecting the nodes corresponding to lane segments in the target map based on the connection relationship between lanes in the target map and the connection relationship between at least one lane segment in each lane to obtain a node graph corresponding to the target map; marking at least one driving direction of the node in the node graph to construct a directed graph corresponding to the target map.

[0105] That is to say, through the connection relationship between each lane in the target map and the connection relationship between at least one lane segment in each lane, the target lane segment having a connection relationship with each lane segment is determined; for each lane segment, the node corresponding to the lane segment is connected with the node corresponding to the target lane segment to obtain a node graph corresponding to the target map, thereby marking at least one driving direction corresponding to each node in the node graph to obtain a directed graph.

[0106] For examples, see Figure 2 , Figure 2 A schematic diagram of a directed graph provided by an embodiment of the present application. As shown in the figure, the left lane 1 corresponds to lane segment 11 and lane segment 12, the starting road segment cutoff surface of lane segment 11 is L1, the ending road segment cutoff surface of lane segment 11 is L2, the starting road segment cutoff surface of lane segment 12 is L2, and the ending road segment cutoff surface of lane segment 12 is L3; the left lane 2 corresponds to lane segment 21 and lane segment 22, the starting road segment cutoff surface of lane segment 21 is L1, the ending road segment cutoff surface of lane segment 21 is L2, the starting road segment cutoff surface of lane segment 22 is L2, and the ending road segment cutoff surface of lane segment 22 is L3. If the target road segment cutoff surface corresponding to the left lane is the termination road segment cutoff surface, then node a is the node corresponding to lane segment 11, node b is the node corresponding to lane segment 12, node c is the node corresponding to lane segment 21, node d is the node corresponding to lane segment 22, and the road marking between left lane 1 and the left lane is a dotted line. Furthermore, the driving direction of node a is the lane direction of lane segment 11, that is, node a points in the direction of node b, and points in the direction of node c corresponding to lane segment 21 of the right adjacent lane segment of lane segment 11.

[0107] In other words, the present application refines the analysis to the level where the road markings are located and establishes a directed graph, which can effectively solve the complex trajectory information generation scenarios such as lane changes and lane changes in path planning, thereby realizing global planning for lane changes and non-lane changes, so that the generated global path and trajectory information are closer to the real scene.

[0108] Continuing with step S101, in one embodiment provided in the present application, the initial path from the starting point to the end point and passing through all preset waypoints is planned from the directed graph determined according to the high-precision map according to the path planning algorithm, including:

[0109] S1011. Configure the search step size according to the simulation frequency.

[0110] S1012. According to the path planning algorithm, multiple initial path points are determined from the directed graph according to the search step length requirement, and an initial path from the starting point to the end point and passing through all preset waypoints is planned based on the determined multiple initial path points.

[0111] With respect to step S1011, the simulation frequency may specifically be the operating frequency of the simulator used.

[0112] When configuring the search step length according to the simulation frequency, the following two methods can be used as examples: 1. Based on a preset frequency-step length correspondence, the search step length is configured according to the simulation frequency. 2. In response to the step length operation performed by the target user according to the simulation frequency, the configured search step length is determined.

[0113] Here, the search compensation can also be understood as a simulation step or a time step.

[0114] For step S1012, the distance between adjacent initial path points is determined according to the search step length. The initial path points include all preset waypoints.

[0115] For example, the A* algorithm is used to determine the initial path.

[0116] With respect to step S102, the target motion mode at least includes: a non-uniformly accelerated motion mode and a uniformly accelerated motion mode.

[0117] The initial motion data may include at least one of the following: heading angle, speed, acceleration, and time.

[0118] The initial motion data of different motion modes are generally different.

[0119] Continuing with step S102, in one implementation provided in the present application, the obtaining of initial motion data of the target motion mode includes:

[0120] S1021. In response to a mode selection operation of a target user on a graphical user interface, display at least one motion data selection input box corresponding to the selected target motion mode.

[0121] S1022: Identify the selection operation or input operation of the target user on each motion data selection input box, and obtain initial motion data of the target motion mode.

[0122] With respect to step S1021 , the exercise data selection input boxes displayed on the graphical user interface for different exercise modes may be the same or different.

[0123] With respect to step S1022, the initial motion data of the target motion mode includes: in the target motion mode, responding to data determined by the user for each waypoint, and determining the initial motion data of the target motion mode based on the data of all waypoints.

[0124] For examples, see Figure 3 , Figure 3 A graphical user interface diagram provided for this application. Figure 3 As shown, the graphical user interface may include a menu bar, a toolbar, a control selection bar, a display editing window, a data selection input area, and a data storage and import area. The menu bar may include controls such as file, edit, resource, view, and help. The toolbar may include controls such as new, open, save, map, traffic light, search box, zoom in, zoom out, show all, simulation connection, and switch. The control selection bar may include motion model selection controls, vehicle selection controls, pedestrian selection controls, obstacle selection controls, road selection controls, and waypoint selection controls. Depending on the selected controls, different data selection input boxes are displayed in the data selection input area; the display editing window may display maps and paths; and the data storage and import area may import trajectory curves.

[0125] In this way, an easy-to-operate graphical user interface is designed to improve the convenience of data configuration.

[0126] For step S103, in an implementation manner provided in the present application, when the target motion mode is a non-uniformly accelerated motion mode, based on the initial motion data, each initial path point in the initial path is optimized using an optimization algorithm corresponding to the target motion mode, and a target path point corresponding to each optimized initial path point and target motion information on each target path point are determined, including:

[0127] S10311. Construct an objective function based on the position information of each initial path point and the initial motion data in the non-uniformly accelerated motion mode.

[0128] S10312. Based on the optimization requirements of the objective function, each initial path point in the initial path is optimized using a quintic polynomial algorithm to determine the target path point corresponding to each optimized initial path point and the target motion information on each target path point.

[0129] Here, the objective function includes displacement error, velocity error and acceleration error.

[0130] By way of example, the following content describes the process of path optimization and target motion information determination using a quintic polynomial algorithm in a non-uniformly accelerated motion mode.

[0131] First, define a quintic polynomial. For example, the form of defining a quintic polynomial is:

[0132] s(t)=a0+a1t+a2t 2 +a3t 3 +a4t 4 +a5t 5

[0133] Here, t represents time, s represents position (distance), and a represents acceleration.

[0134] Initialize all the initial path points in the initial path. Assume that there are n initial path points (t i ,s i ), these points can be represented as: (t1, s1), (t2, s2), ..., (t n ,s n ).

[0135] Setting the optimization goal is to construct the objective function. The objective function constructed in this solution is as follows:

[0136]

[0137] s′ i is the optimized path point; is the speed at the i-th initial path point; is the acceleration at the i-th initial path point; λ1 and λ2 are weight coefficients used to balance the smoothness of displacement error, velocity and acceleration. For example, the weight coefficients can all be 1, or can be adaptively selected according to actual conditions.

[0138] Here, the above formula indicates that the optimization goal is: the result of the quintic polynomial is as close to the discrete point as possible; and the continuity of the velocity and acceleration is maintained.

[0139] Then, solve the coefficients of the fifth-order polynomial. By constructing a linear equation system and using the least squares method to solve the coefficients of the fifth-order polynomial, assuming that there are n initial path points (t i ,s i ), we can construct a matrix A and vector b to represent these initial path points.

[0140]

[0141]

[0142] Each row of the matrix A corresponds to an initial path point t i The polynomial value of; each element S of the vector b f Corresponding to the initial path point t i The actual vertical coordinate value.

[0143] In this way, by solving the linear equation system Ax=b by the least squares method, the coefficient vector x of the quintic polynomial can be found: x=(A T A) -1 A T b.

[0144] Then, the initial path points are optimized and adjusted. In order to further optimize the initial path points and optimize the continuity of velocity and acceleration, the adjusted discrete points s′ are optimized by an iterative method. i , the steps are as follows:

[0145] S11, initialization: s′ i Initialized to s i ;

[0146] S12. Define velocity and acceleration functions:

[0147]

[0148]

[0149] Here, the velocity and acceleration of the quintic polynomial are its first and second derivatives, respectively:

[0150] S13, define the objective function; here, the objective function is the same as the function formula of the optimization target set above, that is:

[0151]

[0152] S14. Use an optimization algorithm to adjust the initial path point.

[0153] In this way, the optimization of the initial path points can be completed and the target path points can be determined.

[0154] Finally, the target motion information is calculated. i (target path point) and the solved fifth-order polynomial coefficients, calculate the target motion information (displacement, velocity and acceleration) of each target path point.

[0155] s(t)=a0+a1t+a2t 2 +a3t 3 +a4t 4 +a5t 5

[0156]

[0157]

[0158] In this way, the target path points in the non-uniform speed motion mode and the target motion information on each target path point can be determined.

[0159] Continuing with step S103, in another embodiment provided by the present application, when the target motion mode is a uniformly variable speed motion mode, based on the initial motion data, each initial path point in the initial path is optimized using an optimization algorithm corresponding to the target motion mode, and a target path point corresponding to each optimized initial path point and target motion information on each target path point are determined, including:

[0160] S10321. Construct motion constraint conditions according to the position information of each initial path point and the initial motion data in the uniformly accelerated motion mode.

[0161] S10322 Based on the motion constraint conditions, each initial path point in the initial path is optimized using a cubic spline interpolation method to determine the target path point corresponding to each optimized initial path point and the target motion information on each target path point.

[0162] Here, the motion constraints include the time and speed to reach each initial path point.

[0163] The initial motion data in the uniformly accelerated motion mode include: the speed and time of each approach point, and the acceleration value throughout the entire process.

[0164] The optimization goal in the uniformly accelerated motion mode is generally set to: redistribute the positions of the path points on the basis of minimizing the change of the initial path points to meet the speed and time requirements under constant acceleration, and increase the trajectory smoothness constraint.

[0165] By way of example, the process of determining motion constraints is described through the following content.

[0166] Before constructing the motion constraint conditions, the calculation formulas for each motion parameter are explained:

[0167] (1) Based on the known conditions, the acceleration formula is determined as: a = v2-v1 / t2-t1.

[0168] (2) Determine the total displacement formula:

[0169] (3) Calculate the cumulative displacement of each path point.

[0170] Here, the coordinates of the path points are used to calculate the cumulative displacement s of each path point relative to the starting point i .

[0171]

[0172] Among them, (x k ,y k) represents the coordinates of the kth initial path point. In addition, in order to ensure the consistency of the cumulative displacement and the total displacement, the scaling factor a is introduced i , a i =s i / s.

[0173] The time for each initial path point in constructing the motion constraint is calculated using the following formula:

[0174] Using the displacement formula of uniformly accelerated motion, calculate the time t of each path point i .

[0175] because Can be organized into Solve the quadratic equation using the root-finding formula to get the time

[0176] The speed of each initial path point in constructing motion constraints can be calculated using the following formula:

[0177] Use the velocity formula for uniformly accelerated motion to calculate the velocity of each path point.

[0178] v i =v1+a(t i -t1)

[0179] In this way, the motion constraints can be determined.

[0180] By way of example, the following content will illustrate the process of using the cubic spline interpolation method to perform path optimization and determine target motion information.

[0181] Prerequisite: There are N+1 initial path points (x0, y0), (x1, y1), ..., (x N ,y N )

[0182] First, parameterize the path points. Parameterize the initial path points to t.

[0183] Then, construct the spline function. The cubic spline function s(t) can be expressed as:

[0184] s i (t) = a i +b i (tt i )+c i (tt i ) 2 +d i (tt i ) 3 , where t i ≤t≤ti+1

[0185] Among them, the coefficient a i , b i , c i , d i It is determined by the path point coordinates and continuity conditions. The continuity conditions include: at each path point, the value of the spline function is equal to the value of the path point; at each path point, the first and second derivatives of the spline function are continuous; at the endpoints, natural boundary conditions (i.e., the second derivative is zero) or other boundary conditions can be used.

[0186] After the preparation is completed, fine-tune the initial path points through spline interpolation to make the adjusted path points as close to the initial path points as possible. The specific steps are as follows:

[0187] Fine-tune the waypoint process:

[0188] S21, initialize the path point. Assume that the initial path point is (x i ,y i ), the cumulative displacement is s i .

[0189] S22, reallocate the path points. Use the smooth path function S generated by spline interpolation x (t) and S y (t), recalculate the position of each path point. The calculation formula is as follows:

[0190]

[0191] s total is the total displacement.

[0192] S23, fine-tune the path points. Use the spline interpolation function to adjust the parameter t i Calculate the new path point position (x i ′,y i ′).

[0193] In addition, in order to further smooth the path, secondary programming optimization is performed, including:

[0194] S31, define optimization variables. Assume that the new path point is the point (x i ′,y i ′).

[0195] S32, set the optimization objective function. Minimize the sum of squares of the second-order derivatives of the path to ensure the smoothness of the path. The corresponding formula is

[0196] S33, setting constraints. Specifically including: keeping the target path point as close as possible to the initial path point, (xi ′-x i ) 2 +(y i ′-y i ) 2 ; The starting point and end point remain unchanged.

[0197] S34. Solve using quadratic programming method.

[0198] In this way, through the above calculation process, it is possible to optimize each initial path point in the initial path using the cubic spline interpolation method, determine the target path point corresponding to each optimized initial path point, and the target motion information on each target path point.

[0199] In this way, the target path points in the uniformly variable speed motion mode and the target motion information on each target path point can be determined.

[0200] With respect to step S104, after the target path is determined, the target path may be displayed on a graphical user interface.

[0201] In another embodiment provided by the present application, after determining an optimized target path by connecting all target path points in sequence, and determining motion trajectory information when traveling along the target path based on the target motion information on the target path points, the method further includes: storing the target path and motion trajectory information in a mat format.

[0202] For examples, see Figure 4 , Figure 4 This is an example diagram of the field name comparison table of a mat format file provided in this application. Figure 4 As shown in the figure, multiple field names, multiple field types and corresponding field description information included in the data are listed. This data structure design can provide detailed and comprehensive information about the path, speed, acceleration and other parameters of the moving object. And it can be directly used for simulation in common simulation software without the need for secondary development, thereby improving the adaptability of the solution.

[0203] Therefore, the following technical effects can be achieved through the technical solution of this application:

[0204] 1. By parsing the road markings and establishing a directed graph, it can effectively solve complex trajectory information generation scenarios such as lane changes in path planning;

[0205] 2. Targeted path optimization and motion trajectory information determination are carried out according to different operation modes, so as to be compatible with multiple motion modes and improve application flexibility and adaptability in complex traffic environments;

[0206] 3. Configure the simulation step length according to the simulation frequency to meet the diversity of usage requirements;

[0207] 4. Design an easy-to-operate graphical user interface to improve the convenience of data configuration, and the generated data can be directly saved as a .mat file, which can be directly used in SimPro or other simulation software, thereby improving the adaptability of the solution.

[0208] Based on the same application concept, the embodiments of the present application also provide a path optimization device corresponding to the path optimization method provided in the above embodiments.

[0209] See also Figure 5 , Figure 6 , Figure 5 This is one of the structural schematic diagrams of a path optimization device provided in an embodiment of the present application. Figure 6 This is a second structural diagram of a path optimization device provided in an embodiment of the present application. Figure 5 As shown in , the path optimization device 500 includes:

[0210] A planning module 510 is used to plan an initial path from a starting point to an end point and passing through all preset waypoints from a directed graph determined according to a high-precision map according to a path planning algorithm;

[0211] An acquisition module 520 is used to acquire initial motion data of a target motion mode;

[0212] The optimization module 530 is used to optimize each initial path point in the initial path based on the initial motion data by using the optimization algorithm corresponding to the target motion mode, and determine the target path point corresponding to each optimized initial path point, as well as the target motion information on each target path point;

[0213] The determination module 540 is used to connect all the target path points in sequence to determine the optimized target path, and determine the motion trajectory information when traveling along the target path according to the target motion information on all the target path points.

[0214] Optionally, when the target motion mode is a non-uniformly accelerated motion mode, the optimization module 530 is used to optimize each initial path point in the initial path based on the initial motion data using an optimization algorithm corresponding to the target motion mode, and determine a target path point corresponding to each optimized initial path point, as well as target motion information on each target path point, the optimization module 530 is used to:

[0215] Constructing an objective function according to the position information of each initial path point and the initial motion data in the non-uniformly accelerated motion mode; the objective function includes a displacement error, a velocity error, and an acceleration error;

[0216] Based on the optimization requirements of the objective function, a quintic polynomial algorithm is used to optimize each initial path point in the initial path, and the target path point corresponding to each optimized initial path point and the target motion information on each target path point are determined.

[0217] Optionally, when the target motion mode is a uniformly variable speed motion mode, the optimization module 530 is used to optimize each initial path point in the initial path based on the initial motion data using an optimization algorithm corresponding to the target motion mode, and determine a target path point corresponding to each optimized initial path point, as well as target motion information on each target path point, the optimization module 530 is used to:

[0218] Constructing motion constraints based on the position information of each initial path point and the initial motion data in the uniformly variable speed motion mode; the motion constraints include the time and speed to reach each initial path point;

[0219] Based on the motion constraint conditions, each initial path point in the initial path is optimized using a cubic spline interpolation method to determine the target path point corresponding to each optimized initial path point and the target motion information on each target path point.

[0220] Optional, such as Figure 6 As shown, the device further includes a building module 550, and the building module 550 is used to:

[0221] Acquire a target map including the preset waypoints;

[0222] Determine at least one lane segment corresponding to each lane of the target map;

[0223] Determine at least one driving direction of a node corresponding to each lane segment of each lane at a preset position according to the lane direction of each lane and the road markings of each lane segment of each lane;

[0224] A directed graph corresponding to the target map is constructed according to the connection relationship between the lanes in the target map and at least one driving direction corresponding to each node.

[0225] Optionally, the device also includes a storage module 560, which is used to: after connecting all target path points in sequence to determine the optimized target path, and determining the motion trajectory information when traveling along the target path based on the target motion information on the target path points, the target path and motion trajectory information are stored in a mat format.

[0226] Optionally, when the acquisition module 520 is used to acquire the initial motion data of the target motion mode, the acquisition module 520 is used to:

[0227] In response to a mode selection operation by a target user on the graphical user interface, displaying at least one motion data selection input box corresponding to the selected target motion mode;

[0228] The selection operation or input operation of the target user on each motion data selection input box is identified to obtain the initial motion data of the target motion mode.

[0229] Optionally, when the planning module 510 is used to plan an initial path from a starting point to an end point and passing through all preset waypoints from a directed graph determined according to a high-precision map according to a path planning algorithm, the planning module 510 is used to:

[0230] Configure the search step size according to the simulation frequency;

[0231] According to the path planning algorithm, multiple initial path points are determined from the directed graph according to the search step length requirement, and an initial path from the starting point to the end point and passing through all preset way points is planned based on the determined multiple initial path points; wherein the distance between adjacent initial path points is determined according to the search step length.

[0232] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown in , the electronic device 700 includes a processor 710 , a memory 720 and a bus 730 .

[0233] The memory 720 stores machine-readable instructions executable by the processor 710. When the electronic device 700 is running, the processor 710 communicates with the memory 720 via the bus 730. When the machine-readable instructions are executed by the processor 710, the above-mentioned Figures 1 to 4 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0234] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figures 1 to 4 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0235] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0236] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0237] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0238] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0239] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or in other words, the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0240] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A path optimization method, characterized in that: The method comprises: According to the path planning algorithm, an initial path from the starting point to the end point and passing through all preset waypoints is planned from the directed graph determined according to the high-precision map; Acquiring initial motion data of the target motion mode; Based on the initial motion data, each initial path point in the initial path is optimized using an optimization algorithm corresponding to the target motion mode, and a target path point corresponding to each optimized initial path point and target motion information on each target path point are determined; All target path points are connected in sequence to determine the optimized target path, and the motion trajectory information when driving along the target path is determined based on the target motion information on all target path points.

2. The method according to claim 1, characterized in that When the target motion mode is a non-uniformly accelerated motion mode, the optimization algorithm corresponding to the target motion mode is used to optimize each initial path point in the initial path based on the initial motion data, and the target path point corresponding to each optimized initial path point and the target motion information on each target path point are determined, including: Constructing an objective function according to the position information of each initial path point and the initial motion data in the non-uniformly accelerated motion mode; the objective function includes a displacement error, a velocity error, and an acceleration error; Based on the optimization requirements of the objective function, a quintic polynomial algorithm is used to optimize each initial path point in the initial path, and the target path point corresponding to each optimized initial path point and the target motion information on each target path point are determined.

3. The method according to claim 1, characterized in that: When the target motion mode is a uniformly variable speed motion mode, based on the initial motion data, each initial path point in the initial path is optimized using an optimization algorithm corresponding to the target motion mode, and a target path point corresponding to each optimized initial path point and target motion information on each target path point are determined, including: Constructing motion constraints based on the position information of each initial path point and the initial motion data in the uniformly variable speed motion mode; the motion constraints include the time and speed to reach each initial path point; Based on the motion constraint conditions, each initial path point in the initial path is optimized using a cubic spline interpolation method to determine the target path point corresponding to each optimized initial path point and the target motion information on each target path point.

4. The method according to claim 1, characterized in that: Determine the directed graph by following these steps: Acquire a target map including the preset waypoints; Determine at least one lane segment corresponding to each lane of the target map; Determine at least one driving direction of a node corresponding to each lane segment of each lane at a preset position according to the lane direction of each lane and the road markings of each lane segment of each lane; A directed graph corresponding to the target map is constructed according to the connection relationship between the lanes in the target map and at least one driving direction corresponding to each node.

5. The method according to claim 1, characterized in that After all target path points are connected in sequence to determine the optimized target path, and the motion track information when traveling along the target path is determined according to the target motion information on the target path points, the method further includes: The target path and motion trajectory information are stored in mat format.

6. The method according to claim 1, characterized in that The step of obtaining the initial motion data of the target motion mode includes: In response to a mode selection operation by a target user on the graphical user interface, displaying at least one motion data selection input box corresponding to the selected target motion mode; The selection operation or input operation of the target user on each motion data selection input box is identified to obtain the initial motion data of the target motion mode.

7. The method according to claim 1, characterized in that The path planning algorithm is used to plan an initial path from the starting point to the end point and passing through all preset waypoints from the directed graph determined according to the high-precision map, including: Configure the search step size according to the simulation frequency; According to the path planning algorithm, multiple initial path points are determined from the directed graph according to the search step length requirement, and an initial path from the starting point to the end point and passing through all preset way points is planned based on the determined multiple initial path points; wherein the distance between adjacent initial path points is determined according to the search step length.

8. A path optimization device, characterized in that: The device comprises: A planning module is used to plan an initial path from the starting point to the end point and passing through all preset waypoints from a directed graph determined according to a high-precision map according to a path planning algorithm; An acquisition module, used for acquiring initial motion data of a target motion mode; An optimization module, configured to optimize each initial path point in the initial path based on the initial motion data by using an optimization algorithm corresponding to the target motion mode, and determine a target path point corresponding to each optimized initial path point, as well as target motion information on each target path point; The determination module is used to connect all target path points in sequence to determine the optimized target path, and determine the motion trajectory information when driving along the target path based on the target motion information on all target path points.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the path optimization method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the path optimization method according to any one of claims 1 to 7 are executed.