Path generation method and device, electronic equipment and storage medium

The initial path is generated and optimized through neural networks, which solves the problem of high and inaccurate calculation cost in unstructured scenarios, and improves the accuracy of paths and obstacle avoidance accuracy while reducing calculation costs.

CN119027773AInactive Publication Date: 2024-11-26SHENZHEN INTELLIGENCE ALLY TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411486313.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2024-11-26
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In unstructured scenarios, when the path generation calculation cost is high, the path calculation is inaccurate and it is difficult to make a trade-off between rapid planning and accuracy.

Method used

By inputting the initial position and obstacle position into the neural network, the initial path is generated, and based on the acceleration, steering angular velocity, obstacle avoidance constraints and motion state parameters of the path point, the cost function is calculated to optimize the path to ensure that the path complies with kinematic constraints and obstacle avoidance. Require.

Benefits of technology

Reduces the computational cost of path generation, while improving the accuracy of paths and obstacle avoidance accuracy, ensuring high accuracy of path generation when computational costs are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119027773A_ABST
    Figure CN119027773A_ABST
Patent Text Reader

Abstract

The invention discloses a path generation method and device, electronic equipment and a storage medium, and the method comprises the steps: inputting an initial position and a plurality of obstacle positions into a neural network, and obtaining an initial path; determining a plurality of path points meeting a predetermined obstacle avoidance constraint according to the initial path; determining a first standard coefficient based on the accelerations and steering angular velocities corresponding to the plurality of path points; determining a second standard coefficient based on the distances between the plurality of path points and the central point of the set formed by the plurality of obstacles; wherein the distance is negatively correlated with the second standard coefficient; performing weighted calculation based on the first standard coefficient and the second standard coefficient to determine a cost function; and optimizing the initial path based on a cost function to obtain a target path. Therefore, the calculation cost is reduced through the neural network, and the obstacle avoidance accuracy is improved by combining the obstacle avoidance constraint and the cost function related to the motion state and the obstacle distance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent driving technology, and in particular to a path generation method, device, electronic device and storage medium. Background Art

[0002] In unstructured scenarios such as parking lots, current path generation solutions often have high computational costs. Reducing the computational costs often leads to inaccurate path calculations. It is necessary to make a trade-off between planning efficiency and path quality. It is difficult to ensure path accuracy while planning quickly. Summary of the invention

[0003] The embodiments of the present application provide a path generation method, device, electronic device and storage medium to solve the technical problem of poor accuracy when the path generation calculation cost is low.

[0004] According to one aspect of an embodiment of the present application, a path generation method is provided, comprising: inputting an initial position and multiple obstacle positions into a neural network to obtain an initial path; determining multiple path points that satisfy predetermined obstacle avoidance constraints based on the initial path; wherein the predetermined obstacle avoidance constraints are determined by a first area of ​​a triangle formed by the path point and each two obstacles, and a second area of ​​a polygon formed by multiple obstacles; determining a first standard coefficient based on accelerations and steering angular velocities corresponding to the multiple path points; determining a second standard coefficient based on distances between the multiple path points and center points of a set formed by multiple obstacles; wherein the distance is negatively correlated with the second standard coefficient; determining a cost function based on weighted calculation of the first standard coefficient and the second standard coefficient; and optimizing the initial path based on the cost function to obtain a target path.

[0005] Further, determining multiple path points that satisfy predetermined obstacle avoidance constraints based on the initial path includes: determining multiple path points that satisfy predetermined obstacle avoidance constraints, predetermined motion constraints, and predetermined state constraints based on the initial path; wherein the predetermined motion constraints are determined by motion state parameters corresponding to each path point in the initial path; and the predetermined state constraints are determined by the initial position and the target position.

[0006] Furthermore, the initial position and multiple obstacle positions are input into a neural network to obtain an initial path, including: generating multiple subgraphs based on multiple obstacle positions; wherein one obstacle position corresponds to one subgraph, and multiple subgraphs constitute a task graph in the neural network; performing feature fusion on the subgraphs; performing a maximum pooling operation on the subgraphs after feature fusion to obtain position parameters and motion state parameters corresponding to each path point in the initial path; and determining the initial path based on the position parameters and motion state parameters corresponding to each path point.

[0007] Further, before determining the first standard coefficient based on the acceleration and steering angular velocity corresponding to the multiple path points, the method also includes: determining the acceleration and steering angular velocity corresponding to the multiple path points based on the motion state parameters corresponding to the multiple path points; the motion state parameters include at least one of the following: heading angle, speed and steering speed.

[0008] Further, optimizing the initial path based on the cost function to obtain the target path includes: optimizing the initial path based on the cost function; if the target path cannot be obtained based on the initial path optimization, generating the target path based on a predetermined rule algorithm and a speed planner.

[0009] Further, the predetermined obstacle avoidance constraint indicates that the sum of first areas of all triangles formed by the path points is greater than the second area.

[0010] Furthermore, the method also includes: processing the task data consisting of the initial position and environmental data based on a predetermined rule algorithm and a speed planner to obtain path data; the environmental data at least includes the position of obstacles; training the neural network based on multiple sets of task data and path data; the task data is used as input, and the path data corresponding to the task data is used as output.

[0011] According to another aspect of an embodiment of the present application, a path generation device is also provided, including: a processing module, used to input an initial position and multiple obstacle positions into a neural network to obtain an initial path; a constraint module, used to determine multiple path points that meet predetermined obstacle avoidance constraints based on the initial path; wherein the predetermined obstacle avoidance constraints are determined by a first area of ​​a triangle formed by the path point and each two obstacles, and a second area of ​​a polygon formed by multiple obstacles; a calculation module, used to determine a first standard coefficient based on the acceleration and steering angular velocity corresponding to the multiple path points; determine a second standard coefficient based on the distance between the multiple path points and the center point of a set formed by multiple obstacles; wherein the distance is negatively correlated with the second standard coefficient; determine a cost function based on weighted calculation of the first standard coefficient and the second standard coefficient; an optimization module, used to optimize the initial path based on the cost function to obtain a target path.

[0012] Furthermore, the constraint module is specifically used to: determine multiple path points that satisfy predetermined obstacle avoidance constraints, predetermined motion constraints and predetermined state constraints based on the initial path; wherein the predetermined motion constraints are determined by the motion state parameters corresponding to each path point in the initial path; and the predetermined state constraints are determined by the initial position and the target position.

[0013] Furthermore, the processing module is specifically used to: generate multiple sub-graphs based on multiple obstacle positions; wherein one obstacle position corresponds to one sub-graph, and multiple sub-graphs constitute a task graph in the neural network; perform feature fusion on the sub-graphs; perform maximum pooling operation on the sub-graphs after feature fusion to obtain position parameters and motion state parameters corresponding to each path point in the initial path; determine the initial path based on the position parameters and motion state parameters corresponding to each path point.

[0014] Furthermore, the calculation module is also used to: determine the acceleration and steering angular velocity corresponding to the multiple path points based on the motion state parameters corresponding to the multiple path points; the motion state parameters include at least one of the following: heading angle, speed and steering speed.

[0015] Furthermore, the optimization module is specifically used to: optimize the initial path based on the cost function; if the target path cannot be obtained based on the initial path optimization, generate the target path based on a predetermined rule algorithm and a speed planner.

[0016] Furthermore, the processing module is also used to: process the task data consisting of the initial position and environmental data based on a predetermined rule algorithm and a speed planner to obtain path data; the environmental data at least includes the position of obstacles; train the neural network based on multiple sets of task data and path data; the task data is used as input, and the path data corresponding to the task data is used as output.

[0017] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the steps in the above method are executed when the program is run.

[0018] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; and the processor is used to execute the steps in the above method by running the program stored in the memory.

[0019] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.

[0020] The present application proposes a path generation method, device, electronic device and storage medium. The method inputs an initial position and multiple obstacle positions into a neural network to obtain an initial path; determines multiple path points that meet a predetermined obstacle avoidance constraint based on the initial path; wherein the predetermined obstacle avoidance constraint is determined by the first area of ​​a triangle formed by the path point and each two obstacles, and the second area of ​​a polygon formed by multiple obstacles; determines a first standard coefficient based on the acceleration and steering angular velocity corresponding to the multiple path points; determines a second standard coefficient based on the distance between the multiple path points and the center point of a set formed by multiple obstacles; wherein the distance is negatively correlated with the second standard coefficient; determines a cost function based on a weighted calculation of the first standard coefficient and the second standard coefficient; optimizes the initial path based on the cost function to obtain a target path. In this way, predicting the initial path based on a neural network can greatly reduce the computational cost of path generation. On this basis, the obstacle avoidance accuracy of the initial path is further optimized through obstacle avoidance constraints and a cost function based on motion state and obstacle position, so that the target path is more in line with kinematic constraints and obstacle avoidance requirements, and the high accuracy of path generation can be guaranteed when the computational cost is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 is a flow chart of a path generation method according to an embodiment of the present application; Figure 2 is a schematic diagram of an obstacle avoidance constraint based on a triangle area method according to an embodiment of the present application; Figure 3 is a flow chart of a path generation method according to an embodiment of the present application; Figure 4 is a structural diagram of a path generation device according to an embodiment of the present application; Figure 5 It is a structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the present application, the technical solutions 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 embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0024] In this embodiment, a path generation method is provided. Figure 1 is a flow chart of a path generation method according to an embodiment of the present application, such as Figure 1 As shown, the process includes the following steps: S10: inputting the initial position and multiple obstacle positions into the neural network to obtain an initial path; S20: determining a plurality of path points satisfying a predetermined obstacle avoidance constraint according to the initial path; wherein the predetermined obstacle avoidance constraint is determined by a first area of ​​a triangle formed by each path point and each two obstacles, and a second area of ​​a polygon formed by the plurality of obstacles; S30: determining a first standard coefficient based on the accelerations and steering angular velocities corresponding to the plurality of path points; S40: determining a second standard coefficient based on the distances between the plurality of path points and the center point of the set formed by the plurality of obstacles, wherein the distance is negatively correlated with the second standard coefficient; S50: Determine a cost function based on a weighted calculation of the first standard coefficient and the second standard coefficient; S60: Optimize the initial path based on the cost function to obtain the target path.

[0025] In this embodiment, the above-mentioned path generation method can be applied to target devices that need to plan automatic driving routes, such as vehicles, robots or other movable devices. This method can be applied in unstructured scenarios of vehicles. Here, unstructured scenarios can refer to scenarios such as parking lots other than roads.

[0026] In one embodiment, the neural network may be a graph neural network (GNN), etc. Inputting the initial position and multiple obstacle positions into the neural network may refer to inputting the initial position and environmental data including multiple obstacle positions into the neural network. Here, the initial position and environmental data may constitute task data, that is, step S110 may refer to inputting the task data into the neural network to obtain an initial path. The neural network is used to output the corresponding initial path for the task data.

[0027] In one embodiment, the initial position and the obstacle position may be relative positions in a Cartesian coordinate system. For example, before step S10, the method may further include: converting the initial position and the positions of multiple obstacles from absolute positions in a Cartesian coordinate system to relative positions. This may standardize the initial state of each task, which is beneficial to improving computational efficiency.

[0028] In one embodiment, obtaining the initial path may include: obtaining position parameters and motion state parameters corresponding to each path point included in the initial path. Here, all path points are combined to obtain the initial path, the position parameter may refer to the coordinate data of the path point, and the motion state parameter may refer to at least one of the predicted heading angle, speed, and steering speed of the target device at the path point, and here, the steering speed may refer to the steering speed of the front wheels of the target device.

[0029] Here, the path can be defined as The initial state of the path at the initial position is set to , the final state at the target location is The path generation problem can be expressed in the following constraint form: , , , ,

[0030] in, represents the set of all feasible trajectories, represents the best trajectory, represents the free space for obstacle avoidance, represents all variables t, Indicates the moment of reaching the target location or final state.

[0031] In one embodiment, the final target path needs to satisfy the optimal control problem (OCP) for optimizing the initial path, which can be expressed as:

[0032]

[0033] in, Represents the cost function including control variables and state variables. Represents state variables The derivative with respect to time. It is the control variable of the target device input. It represents the relationship between the motion change state and the current control input variable, also known as the dynamic equation. and represent the initial state and the final state respectively. and represents the maximum and minimum control inputs. The working space for path generation is defined as ,in Represents the obstacle space. Function Indicates that the state and input of the target device are mapped into the workspace and is a path that does not intersect with any obstacles, that is, , Refers to the space X except Outside space.

[0034] In one embodiment, the predetermined obstacle avoidance constraint may refer to a distance constraint between a path point and an obstacle position. For example, it may be expressed as a distance from a path point to each obstacle and a distance below a predetermined value. Exemplarily, the predetermined obstacle avoidance constraint may be expressed using a triangle area method to determine whether a path point is located within a polygon formed by multiple obstacles.

[0035] In one embodiment, the triangle formed by the path point and each two obstacles may refer to the triangle formed by the path point and the two vertices on each edge of the polygon, and the polygon is a polygon formed by multiple obstacles. For example, the obstacles include A, B, C and D, then the path point P and the two vertices on the sides AB, BC, CD, AD respectively form triangles, that is, triangles PAB, PBC, PCD, PAD.

[0036] In one embodiment, the predetermined obstacle avoidance constraint indicates that the sum of the first areas of all triangles formed by the path points is greater than the second area. Figure 2 As shown, for a triangle formed by the path point P and the vertices of the polygon ABCD formed by multiple obstacles, the predetermined obstacle avoidance constraint is expressed as: , i=1...n. Among them, the sum of the first areas of all triangles , the second area is .

[0037] When P is outside polygon ABCD: , i=1...n; otherwise: , i=1...n. In this way, the predetermined obstacle avoidance constraint is represented by the area size of the polygon formed by the path point and the obstacle, which can ensure complete obstacle avoidance and improve the obstacle avoidance accuracy of the path point.

[0038] In one embodiment, the acceleration and steering angular velocity corresponding to the multiple path points can be determined based on the motion state parameters of the multiple path points, for example, based on at least one of the heading angle, velocity, and steering speed corresponding to the multiple path points.

[0039] In one embodiment, the first standard coefficient may also be a first cost coefficient, which may be expressed as: , in, Indicates acceleration is the steering angular velocity, Indicates the time corresponding to reaching the target position. In this way, the sudden changes in speed and front wheel steering angle can be reduced, and the smoothness of the path can be improved.

[0040] In one embodiment, the distances between the multiple path points and the center points of the set formed by the multiple obstacles may refer to the distances between the multiple path points and the center points of the polygons formed by the multiple obstacles.

[0041] In one embodiment, the second standard coefficient may also be a second cost coefficient, which may be expressed as

[0042] Here, represents the square distance between the vehicle and the obstacle center, is Euler's constant, represents the maximum coordinate point in the obstacle space. Assume that the center of each obstacle set is The larger the distance, the smaller the second standard coefficient and the smaller the cost function. Assuming that each planned task consumes the same time, that is, As a constant, the cost function ensures that the target device maintains a safe distance from obstacles and improves the safety of the path.

[0043] In one embodiment, determining the cost function by weighted calculation based on the first standard coefficient and the second standard coefficient may refer to: ,in, and Represent the weights of the first standard coefficient and the second standard coefficient respectively.

[0044] In one embodiment, the first standard coefficient and the second standard coefficient are weighted to determine the cost function, wherein the weights corresponding to the first standard coefficient and the second standard coefficient can be determined according to the values ​​of the first standard coefficient and the second standard coefficient, or can also be fixed values.

[0045] In one embodiment, the weights corresponding to the first standard coefficient and the second standard coefficient may be positively correlated with the values ​​of the first standard coefficient and the second standard coefficient. For example, the first weight corresponding to the first standard coefficient is positively correlated with the value of the first standard coefficient. The larger the first standard coefficient, the larger the corresponding first weight. The second weight corresponding to the second standard coefficient is positively correlated with the value of the second standard coefficient. The larger the second standard coefficient, the larger the corresponding second weight, etc. In this way, between the two standards of avoiding sudden turns and precise obstacle avoidance, the one with higher accuracy can be reasonably selected as the one with greater weight, thereby improving the optimization effect of the cost function on the initial path.

[0046] In one embodiment, optimizing the initial path based on the cost function to obtain the target path may include: solving the optimization control problem of the initial path based on the cost function by an open source solver (Interior Point OPTimizer, IPOPT) to obtain the target path.

[0047] In this way, predicting the initial path based on a neural network can greatly reduce the computational cost of path generation. On this basis, the obstacle avoidance accuracy of the initial path can be further optimized through obstacle avoidance constraints and cost functions based on motion state and obstacle position, so that the target path is more in line with kinematic constraints and obstacle avoidance requirements, and the high accuracy of path generation can be guaranteed while reducing the computational cost.

[0048] In some embodiments, the step S20 of determining a plurality of path points satisfying a predetermined obstacle avoidance constraint according to the initial path includes: Determine multiple path points that satisfy predetermined obstacle avoidance constraints, predetermined motion constraints, and predetermined state constraints based on the initial path; wherein the predetermined motion constraints are determined by motion state parameters corresponding to each path point in the initial path; and the predetermined state constraints are determined by the initial position and the target position.

[0049] In this embodiment, the predetermined motion constraint can be expressed as a numerical range of the motion state parameters corresponding to the path point. For example, the motion state parameters may include at least one of heading angle, speed, acceleration, steering angle, steering speed and steering angular velocity.

[0050] In one embodiment, It can be expressed as: ,in,

[0051] in, and Represents the coordinate data of the path point where the target device is located in the Cartesian coordinate system. represents the heading angle, and Represents velocity and acceleration. and represent the steering angle and angular velocity respectively. Indicates the wheelbase of the target device. In addition, in actual operation, physical or mechanical constraints should be followed, that is, the predetermined motion constraints are expressed as:

[0052] In one embodiment, the predetermined state constraint can be expressed as the start and end points of the required target path corresponding to the initial position and target position of the target device, respectively, that is, the basic requirements of the initial position and final state of the vehicle are met in the path generation task.

[0053] For example, it is assumed that the vehicle has no input influence at the beginning and end of the path generation task, that is: The predetermined state constraint can be expressed as: .

[0054] In this way, the initial path is constrained and optimized based on obstacle avoidance constraints, motion constraints and state constraints, so that the optimized target path meets the requirements of obstacle avoidance, kinematics and start and end positions, and the accuracy of path generation is further improved.

[0055] In some embodiments, step S10 may include: Generate multiple subgraphs based on multiple obstacle positions; wherein one obstacle position corresponds to one subgraph, and the multiple subgraphs constitute a task graph in the neural network; performing feature fusion on the sub-graphs; Perform the maximum pooling operation on the sub-graph after feature fusion to obtain the position parameters and motion state parameters corresponding to each path point in the initial path; The initial path is determined based on the position parameters and motion state parameters corresponding to each path point.

[0056] In one embodiment, before generating multiple sub-graphs based on multiple obstacle positions, the method may further include: performing vectorization processing on the initial position, the target position, and the obstacle position. For example, the vectorization process includes obtaining a starting vector based on the initial position and the target position. and target vector , each obstacle vertex is connected to form an obstacle vector In order to enable the neural network to effectively obtain information, multiple obstacle vectors can be connected to each other, and each obstacle forms an obstacle subgraph. All subgraphs constitute a task graph.

[0057] In one embodiment, in order to fully utilize the position information contained in each sub-graph, feature fusion is performed on the sub-graph, which may include performing three-layer feature fusion on each sub-graph, wherein the three-layer feature fusion includes a fully connected neural network, a feedforward stage, and graph feature concatenation. The single-layer feature fusion in each sub-graph may be defined as:

[0058] here, Indicates Layer The subgraph features of the subgraphs, It is a multilayer perceptron consisting of three fully connected layers with 128 hidden neurons. represents the feature fusion layer, and Represents a feature concatenation layer.

[0059] In one embodiment, after the three-layer feature fusion, in order to extract important features from the sub-graphs in the task, the following maximum pooling operation is performed on each sub-graph: ,in, Represents the maximum pooling layer. The maximum pooling operation obtains the maximum pooling layer vector of each subgraph, which represents its most significant feature. These features are connected to form a new graph structure, and then three rounds of feature fusion are performed to complete the feature extraction of the task graph.

[0060] In one embodiment, after the feature fusion and extraction of the task graph, in order to reduce the grid size, multiple variables constituting the initial path can be predicted based on the maximum pooling layer vector, namely, the position parameters and motion state parameters corresponding to the path points, for example: , Respectively represent The location coordinates of the path points , heading angle, speed, steering speed, the steering speed may refer to the front wheel steering speed.

[0061] In one embodiment, before determining the first standard coefficient based on the acceleration and steering angular velocity corresponding to the plurality of path points, the method further includes: Based on the motion state parameters corresponding to the multiple path points, the acceleration and steering angular velocity corresponding to the multiple path points are determined; the motion state parameters include at least one of the following: heading angle, speed and steering speed.

[0062] Here, non-predictor variables such as acceleration and steering angular velocity , from the velocity in the motion state parameters and steering speed The steering angular velocity may refer to the front wheel steering angular velocity.

[0063] In this way, based on the feature fusion and pooling in the neural network, the features in the obstacle sub-map can be accurately and efficiently extracted, so that the initial path obtained can more accurately meet the obstacle avoidance requirements.

[0064] In some embodiments, step S60 may include: optimizing the initial path based on the cost function; If the target path cannot be obtained based on the initial path optimization, the target path is generated based on a predetermined rule algorithm and a speed planner.

[0065] In one embodiment, optimizing the initial path based on the cost function may include: solving the optimization control problem of the initial path based on the cost function by an open source solver (Interior Point OPTimizer, IPOPT); if the solution is successful, obtaining the target path based on the solution result.

[0066] In one embodiment, failure to obtain the target path based on the initial path optimization may refer to the above-mentioned solution failure, for example, failure to obtain the optimal solution.

[0067] In one embodiment, the predetermined rule algorithm may be a rule-based hybrid A* algorithm, or other algorithms.

[0068] In this way, when the optimal solution cannot be obtained directly based on the cost function optimization, the optimal path can be quickly obtained by switching to a fixed algorithm and speed planner, avoiding the inability to plan the path when the optimal control problem cannot be solved.

[0069] like Figure 3 As shown, this embodiment provides a path generation method, which may specifically include: S01: Processing the task data consisting of the initial position and the environmental data based on the predetermined rule algorithm and the speed planner to obtain the path data; the environmental data at least includes the obstacle position; S02: training a neural network based on multiple sets of task data and path data; the task data is used as input, and the path data corresponding to the task data is used as output; S11: inputting the initial position and multiple obstacle positions into the neural network to obtain an initial path; S21: determining a plurality of path points satisfying a predetermined obstacle avoidance constraint according to the initial path; wherein the predetermined obstacle avoidance constraint is determined by a first area of ​​a triangle formed by each path point and each two obstacles, and a second area of ​​a polygon formed by the plurality of obstacles; S31: determining a first standard coefficient based on the accelerations and steering angular velocities corresponding to the plurality of path points; S41: determining a second standard coefficient based on the distances between the plurality of path points and the center points of the set formed by the plurality of obstacles, wherein the distance is negatively correlated with the second standard coefficient; S51: Determine a cost function based on a weighted calculation of the first standard coefficient and the second standard coefficient; S61: Optimize the initial path based on the cost function to obtain the target path.

[0070] In one embodiment, step S01 and step S02 may be performed before step S10, or may be performed before or after any step, so as to perform real-time training and updating of the neural network.

[0071] In one embodiment, the starting point, ie, the initial position, and the end point, ie, the target position, of the vehicle may be randomly set based on multiple environmental maps, and each set of starting point and environmental data may generate task data corresponding to a task.

[0072] In one embodiment, the predetermined rule algorithm may be a Hybrid A* algorithm, and a feasible trajectory, namely an initial path, is obtained by the predetermined rule algorithm and a speed planner. The initial path and task data may constitute training data for training a neural network.

[0073] In one embodiment, training the neural network based on multiple sets of task data and path data may include: optimizing the path data based on an optimization control problem, and training the neural network based on the multiple sets of task data and the optimized path data.

[0074] Here, optimizing the path data based on the optimization control problem may include performing an optimization step of steps S21 - S61 on the path data.

[0075] In this way, by training the neural network with batches of training sample data, the neural network can be equipped with the ability to handle path generation tasks, so that the output initial path meets the basic obstacle avoidance requirements and improves the obstacle avoidance accuracy.

[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0077] In this embodiment, a path generation device is also provided to implement the above-mentioned embodiments and preferred implementation modes, which have been described and will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0078] Figure 4 is a structural block diagram of a path generation device according to an embodiment of the present application, such as Figure 4 As shown, the device includes: a processing module 100, used to input an initial position and multiple obstacle positions into a neural network to obtain an initial path; a constraint module 200, used to determine multiple path points that meet predetermined obstacle avoidance constraints based on the initial path; wherein the predetermined obstacle avoidance constraints are determined by a first area of ​​a triangle formed by the path point and each two obstacles, and a second area of ​​a polygon formed by multiple obstacles; a calculation module 300, used to determine a first standard coefficient based on accelerations and steering angular velocities corresponding to the multiple path points; determine a second standard coefficient based on distances between the multiple path points and the center points of a set formed by multiple obstacles; wherein the distance is negatively correlated with the second standard coefficient; determine a cost function based on weighted calculation of the first standard coefficient and the second standard coefficient; an optimization module 400, used to optimize the initial path based on the cost function to obtain a target path.

[0079] Furthermore, the constraint module 200 is specifically used to: determine multiple path points that satisfy predetermined obstacle avoidance constraints, predetermined motion constraints and predetermined state constraints based on the initial path; wherein the predetermined motion constraints are determined by the motion state parameters corresponding to each path point in the initial path; and the predetermined state constraints are determined by the initial position and the target position.

[0080] Furthermore, the processing module 100 is specifically used to: generate multiple subgraphs based on multiple obstacle positions; wherein one obstacle position corresponds to one subgraph, and multiple subgraphs constitute a task graph in the neural network; perform feature fusion on the subgraphs; perform maximum pooling operation on the subgraphs after feature fusion to obtain position parameters and motion state parameters corresponding to each path point in the initial path; determine the initial path based on the position parameters and motion state parameters corresponding to each path point.

[0081] Furthermore, the calculation module 300 is also used to determine the acceleration and steering angular velocity corresponding to the multiple path points based on the motion state parameters corresponding to the multiple path points; the motion state parameters include at least one of the following: heading angle, speed and steering speed.

[0082] Furthermore, the optimization module 400 is specifically used to: optimize the initial path based on the cost function; if the target path cannot be obtained based on the initial path optimization, generate the target path based on a predetermined rule algorithm and a speed planner.

[0083] Furthermore, the processing module 100 is also used to: process the task data consisting of the initial position and the environmental data based on a predetermined rule algorithm and a speed planner to obtain path data; the environmental data at least includes the obstacle position; train the neural network based on multiple sets of task data and path data; the task data is used as input, and the path data corresponding to the task data is used as output.

[0084] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0085] An embodiment of the present application also provides an electronic device, which may be a robot or used in a robot. Figure 5 is a structural diagram of an electronic device according to an embodiment of the present application, such as Figure 5As shown, it includes a processor 41, a communication interface 42, a memory 43 and a communication bus 44, wherein the processor 41, the communication interface 42 and the memory 43 communicate with each other through the communication bus 44, and the memory 43 is used to store computer programs; the processor 41 is used to implement the following steps when executing the program stored in the memory 43: inputting the initial position and the positions of multiple obstacles into the neural network to obtain an initial path; determining multiple path points that meet the predetermined obstacle avoidance constraints according to the initial path; wherein the predetermined obstacle avoidance constraints are determined by the first area of ​​the triangle formed by the path point and each two obstacles, and the second area of ​​the polygon formed by the multiple obstacles; determining a first standard coefficient based on the acceleration and steering angular velocity corresponding to the multiple path points; determining a second standard coefficient based on the distance between the multiple path points and the center point of the set formed by the multiple obstacles; wherein the distance is negatively correlated with the second standard coefficient; determining a cost function based on the weighted calculation of the first standard coefficient and the second standard coefficient; optimizing the initial path based on the cost function to obtain a target path.

[0086] Further, determining multiple path points that satisfy predetermined obstacle avoidance constraints based on the initial path includes: determining multiple path points that satisfy predetermined obstacle avoidance constraints, predetermined motion constraints, and predetermined state constraints based on the initial path; wherein the predetermined motion constraints are determined by motion state parameters corresponding to each path point in the initial path; and the predetermined state constraints are determined by the initial position and the target position.

[0087] Furthermore, the initial position and multiple obstacle positions are input into a neural network to obtain an initial path, including: generating multiple subgraphs based on multiple obstacle positions; wherein one obstacle position corresponds to one subgraph, and multiple subgraphs constitute a task graph in the neural network; performing feature fusion on the subgraphs; performing a maximum pooling operation on the subgraphs after feature fusion to obtain position parameters and motion state parameters corresponding to each path point in the initial path; and determining the initial path based on the position parameters and motion state parameters corresponding to each path point.

[0088] Further, before determining the first standard coefficient based on the acceleration and steering angular velocity corresponding to the multiple path points, the method also includes: determining the acceleration and steering angular velocity corresponding to the multiple path points based on the motion state parameters corresponding to the multiple path points; the motion state parameters include at least one of the following: heading angle, speed and steering speed.

[0089] Further, optimizing the initial path based on the cost function to obtain the target path includes: optimizing the initial path based on the cost function; if the target path cannot be obtained based on the initial path optimization, generating the target path based on a predetermined rule algorithm and a speed planner.

[0090] Further, the predetermined obstacle avoidance constraint indicates that the sum of first areas of all triangles formed by the path points is greater than the second area.

[0091] Furthermore, the method also includes: processing the task data consisting of the initial position and environmental data based on a predetermined rule algorithm and a speed planner to obtain path data; the environmental data at least includes the position of obstacles; training the neural network based on multiple sets of task data and path data; the task data is used as input, and the path data corresponding to the task data is used as output.

[0092] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0093] The communication interface is used for communication between the above terminal and other devices.

[0094] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0095] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0096] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is executed on a computer, the computer executes the path generation method described in any one of the above embodiments.

[0097] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the path generation method described in any one of the above embodiments.

[0098] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0099] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

[0100] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. A path generation method, characterized in that: include: Input the initial position and multiple obstacle positions into the neural network to obtain the initial path; Determine a plurality of path points satisfying a predetermined obstacle avoidance constraint according to the initial path; wherein the predetermined obstacle avoidance constraint is determined by a first area of ​​a triangle formed by each of the path points and each two obstacles, and a second area of ​​a polygon formed by the plurality of obstacles; Determining a first standard coefficient based on the accelerations and steering angular velocities corresponding to the plurality of path points; Determine a second standard coefficient based on the distances between the plurality of path points and the center points of the set formed by the plurality of obstacles, wherein the distance is negatively correlated with the second standard coefficient; Determine a cost function by weighted calculation based on the first standard coefficient and the second standard coefficient; The initial path is optimized based on the cost function to obtain a target path.

2. The method according to claim 1, characterized in that The step of determining a plurality of path points satisfying a predetermined obstacle avoidance constraint according to the initial path includes: Determine multiple path points that satisfy predetermined obstacle avoidance constraints, predetermined motion constraints, and predetermined state constraints based on the initial path; wherein the predetermined motion constraints are determined by motion state parameters corresponding to each path point in the initial path; and the predetermined state constraints are determined by the initial position and the target position.

3. The method according to claim 1, characterized in that The initial position and the positions of multiple obstacles are input into the neural network to obtain the initial path, including: Generate multiple subgraphs based on multiple obstacle positions; wherein one obstacle position corresponds to one subgraph, and the multiple subgraphs constitute a task graph in the neural network; performing feature fusion on the sub-graphs; Perform the maximum pooling operation on the sub-graph after feature fusion to obtain the position parameters and motion state parameters corresponding to each path point in the initial path; The initial path is determined based on the position parameters and motion state parameters corresponding to each path point.

4. The method according to claim 3, characterized in that Before determining the first standard coefficient based on the accelerations and steering angular velocities corresponding to the plurality of path points, the method further includes: Based on the motion state parameters corresponding to the multiple path points, the acceleration and steering angular velocity corresponding to the multiple path points are determined; the motion state parameters include at least one of the following: heading angle, speed and steering speed.

5. The method according to claim 1, characterized in that The step of optimizing the initial path based on the cost function to obtain a target path includes: optimizing the initial path based on the cost function; If the target path cannot be obtained based on the initial path optimization, the target path is generated based on a predetermined rule algorithm and a speed planner.

6. The method according to claim 1, characterized in that The predetermined obstacle avoidance constraint indicates that the sum of the first areas of all triangles formed by the path points is greater than the second area.

7. The method according to claim 1, characterized in that The method further comprises: Processing the task data consisting of the initial position and the environmental data based on the predetermined rule algorithm and the speed planner to obtain the path data; the environmental data at least includes the obstacle position; The neural network is trained based on multiple sets of task data and path data; the task data is used as input, and the path data corresponding to the task data is used as output.

8. A path generation device, characterized in that: include: A processing module, used for inputting the initial position and the positions of multiple obstacles into the neural network to obtain an initial path; A constraint module, used to determine a plurality of path points satisfying a predetermined obstacle avoidance constraint according to the initial path; wherein the predetermined obstacle avoidance constraint is determined by a first area of ​​a triangle formed by each of the path points and each two obstacles, and a second area of ​​a polygon formed by the plurality of obstacles; A calculation module, configured to determine a first standard coefficient based on the acceleration and steering angular velocity corresponding to the plurality of path points; determine a second standard coefficient based on the distances between the plurality of path points and the center points of a set of obstacles respectively; wherein the distance is negatively correlated with the second standard coefficient; and determine a cost function by weighted calculation based on the first standard coefficient and the second standard coefficient; The optimization module is used to optimize the initial path based on the cost function to obtain a target path.

9. An electronic device, characterized in that: The electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program implements the steps of the path generation method according to any one of claims 1 to 7 when executed by the processor.

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

Citation Information

Patent Citations

  • Heuristic item determination and model training method, electronic equipment and computer storage medium

    CN115019275A

  • Self-adaptive obstacle avoidance four-wheel Ackerman steering vehicle and motion planning method thereof

    CN118012076A

  • Obstacle avoidance processing and analyzing system based on forklift image data acquisition

    CN118314310A

  • AGV multi-stage path planning method and system based on moss mouse algorithm

    CN118394092A

  • Trajectory generation

    WO2020092500A1