Automatic parking track optimization method and device, equipment and storage medium

By calculating the safe driving area and designing the optimization target cost function and constraints, the optimized parking trajectory is generated and optimized parking trajectory is solved, and the problem of rough generation and insufficient safety of automatic parking trajectory in the existing technology is improved, and the accuracy and stability of parking is improved. .

CN119160168APending Publication Date: 2024-12-20VOYAH AUTOMOBILE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411460198.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing automatic parking path generation algorithm generates trajectories in complex and changeable parking environments with rough trajectories, with large curvature jumps, and the smoothing method ignores safety and constraints, resulting in trajectories that cannot be used by vehicles in some scenarios. Effective tracking.

Method used

By obtaining vehicle parameters and obstacle information, calculating safe driving areas, designing and optimizing target cost functions and constraint equations, generating and optimizing parking trajectory, ensuring the accuracy and stability of the trajectory in various automatic parking scenarios.

Benefits of technology

It improves the accuracy and stability of parking, enhances the safety and reliability during parking, and the generated trajectory can better adapt to different parking scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119160168A_ABST
    Figure CN119160168A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic parking track optimization method and device, equipment and a storage medium, and relates to the technical field of automatic driving, and the method comprises the steps: obtaining vehicle parameters, an original parking track and obstacle information; performing coordinate conversion according to the vehicle parameters to obtain relative vehicle coordinates; obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information; performing optimization according to a preset optimization strategy and the original parking track to obtain a target cost function; condition constraint is carried out according to the safe driving area and the original parking track to obtain a constraint equation; and calculating according to the target cost function and the constraint equation to obtain an optimized parking track, thereby improving the accuracy and stability of parking, and enhancing the safety and reliability in the parking process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of autonomous driving, and in particular to an automatic parking trajectory optimization method, device, equipment and storage medium. Background Art

[0002] In the development of automatic parking technology, trajectory planning and optimization is one of the key technologies. At present, parking planning is mainly divided into two methods: path generation and trajectory optimization. In order to meet the complex and changeable parking environment, such as dead-end parking spaces and extremely narrow channel parking spaces, the existing parking path generation algorithms mostly use graph-based random generation algorithms, such as Dijkstra (graph search algorithm) and GBFS (Greedy Best-First Search, heuristic graph search algorithm). These random generation algorithms can generate corresponding parking paths according to different parking environments. However, the paths generated by these algorithms are often rough trajectories, especially at the connection between arcs and straight lines, where the curvature jump is large, and direct use for vehicle control tracking may cause difficulties. Existing smoothing methods often only focus on the smoothness of the trajectory, while ignoring the safety and constraints during the parking process. At the same time, in the design of collision detection and curvature constraints, there is also a lack of adaptability to different parking scenarios, resulting in the generated trajectory may not be effectively tracked by the vehicle in some scenarios.

[0003] Therefore, how to optimize the accuracy of automatic parking trajectory generation is a problem that needs to be solved urgently. Summary of the invention

[0004] The main purpose of this application is to provide an automatic parking trajectory optimization method, device, equipment and storage medium, aiming to solve the technical problem of how to optimize the accuracy of automatic parking trajectory generation.

[0005] To achieve the above objectives, the present application proposes an automatic parking trajectory optimization method, the method comprising:

[0006] Obtain vehicle parameters, original parking trajectory and obstacle information;

[0007] Performing coordinate transformation according to the vehicle parameters to obtain relative vehicle coordinates;

[0008] Obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information;

[0009] Optimizing the target cost function according to the preset optimization strategy and the original parking trajectory;

[0010] Conditioning the safe driving area and the original parking trajectory to obtain a constraint equation;

[0011] The optimized parking trajectory is calculated according to the target cost function and the constraint equation.

[0012] In one embodiment, the step of optimizing the target cost function according to the preset optimization strategy and the original parking trajectory comprises:

[0013] Determining a target parking trajectory point and an original parking trajectory point according to a preset optimization strategy and the original parking trajectory;

[0014] A smoothness cost, a length cost, and an offset cost are constructed according to the target parking trajectory point and the original parking trajectory to obtain a target cost function.

[0015] In one embodiment, the step of obtaining a constraint equation by conditionally constraining the safe driving area and the original parking trajectory comprises:

[0016] Obtaining the terminal heading and the original trajectory starting point according to the original parking trajectory;

[0017] Constructing a collision constraint according to the safe driving area to obtain a collision constraint equation;

[0018] Constructing the curvature constraint according to the preset slack variables to obtain the curvature constraint equation;

[0019] Constructing a position constraint according to the starting point of the original trajectory to obtain a position constraint equation;

[0020] Constructing an angle constraint according to the endpoint heading to obtain an angle constraint equation;

[0021] The collision constraint equation, the curvature constraint equation, the position constraint equation and the angle constraint equation are used as constraint equations.

[0022] In one embodiment, the step of obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information includes:

[0023] Calculating a target obstacle point according to the relative vehicle coordinates and the obstacle information;

[0024] A vertical line equation is constructed according to the target obstacle point, and an affine constraint is performed to obtain a safe driving area.

[0025] In one embodiment, the step of performing coordinate conversion according to the vehicle parameters to obtain relative vehicle coordinates includes:

[0026] According to the vehicle parameters, the front overhang length, wheelbase, width, vehicle length and rear overhang length of the vehicle are obtained;

[0027] Calculating the vertex coordinates and the midpoint coordinates according to the front overhang length, the wheelbase, the width, the vehicle length, and the rear overhang length;

[0028] Coordinate transformation is performed according to the vertex coordinates and the midpoint coordinates to obtain relative vehicle coordinates.

[0029] In one embodiment, the step of performing coordinate conversion according to the vertex coordinates and the midpoint coordinates to obtain relative vehicle coordinates includes:

[0030] Get the vehicle heading angle;

[0031] Obtaining a coordinate rotation matrix according to the vehicle heading angle;

[0032] Coordinate transformation is performed according to the vertex coordinates, the midpoint coordinates and the coordinate rotation matrix to obtain relative vehicle coordinates.

[0033] In one embodiment, after calculating the optimized parking trajectory according to the target cost function and the constraint equation, the method further includes:

[0034] Obtaining an optimized heading angle according to the optimized parking trajectory;

[0035] The optimized parking trajectory is split according to the optimized heading angle to update the optimized parking trajectory.

[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes an automatic parking trajectory optimization device, the device comprising:

[0037] A data acquisition module, used to obtain vehicle parameters, original parking trajectory and obstacle information;

[0038] A coordinate conversion module, used for performing coordinate conversion according to the vehicle parameters to obtain relative vehicle coordinates;

[0039] A data processing module, used for obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information;

[0040] A cost construction module, used for optimizing according to a preset optimization strategy and the original parking trajectory to obtain a target cost function;

[0041] A constraint building module, used for obtaining a constraint equation by conditionally constraining the safe driving area and the original parking trajectory;

[0042] The parking optimization module is used to calculate the optimized parking trajectory according to the target cost function and the constraint equation.

[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes an automatic parking trajectory optimization device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the automatic parking trajectory optimization method as described above.

[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the automatic parking trajectory optimization method described above are implemented.

[0045] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the automatic parking trajectory optimization method as described above are implemented.

[0046] The present application provides an automatic parking trajectory optimization method, the method of the present application includes: obtaining vehicle parameters, original parking trajectory and obstacle information; performing coordinate transformation according to the vehicle parameters to obtain relative vehicle coordinates; obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information; optimizing according to a preset optimization strategy and the original parking trajectory to obtain a target cost function; performing conditional constraints according to the safe driving area and the original parking trajectory to obtain a constraint equation; calculating an optimized parking trajectory according to the target cost function and the constraint equation. In summary, the present application generates a parking trajectory that meets various automatic parking scenarios by calculating the safe driving area, designing and optimizing the target cost equation and constraint conditions, thereby improving the accuracy and stability of parking and enhancing the safety and reliability of the parking process. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0048] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0049] Figure 1 A flowchart diagram of the first embodiment of the automatic parking trajectory optimization method of the present application;

[0050] Figure 2This is a schematic diagram of a safe driving area in an embodiment of the automatic parking trajectory optimization method of this application;

[0051] Figure 3 This is a schematic diagram of coordinate mapping in an embodiment of the automatic parking trajectory optimization method of the present application;

[0052] Figure 4 A flowchart diagram of the second embodiment of the automatic parking trajectory optimization method of the present application;

[0053] Figure 5 A flowchart diagram of the third embodiment of the automatic parking trajectory optimization method of the present application;

[0054] Figure 6 This is a schematic diagram of the module structure of the automatic parking trajectory optimization device according to an embodiment of the present application;

[0055] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the automatic parking trajectory optimization method in the embodiment of the present application.

[0056] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0059] The main solution of the embodiment of the present application is: by acquiring vehicle parameters, original parking trajectory and obstacle information; performing coordinate transformation according to the vehicle parameters to obtain relative vehicle coordinates; obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information; optimizing according to a preset optimization strategy and the original parking trajectory to obtain a target cost function; performing conditional constraints according to the safe driving area and the original parking trajectory to obtain a constraint equation; and calculating an optimized parking trajectory according to the target cost function and the constraint equation.

[0060] In the development of automatic parking technology, trajectory planning and optimization is one of the key technologies. At present, parking planning is mainly divided into two methods: path generation and trajectory optimization. In order to meet the complex and changeable parking environment, such as dead-end parking spaces and extremely narrow channel parking spaces, the existing parking path generation algorithms mostly use graph-based random generation algorithms, such as Dijkstra and GBFS. These random generation algorithms can generate corresponding parking paths according to different parking environments. However, the paths generated by these algorithms are often rough trajectories, especially at the connection between arcs and straight lines, where the curvature jump is large, and direct use for vehicle control tracking may cause difficulties. Existing smoothing methods often only focus on the smoothness of the trajectory, while ignoring the safety and constraints during the parking process. At the same time, in the design of collision detection and curvature constraints, there is also a lack of adaptability to different parking scenarios, resulting in the fact that the generated trajectory may not be effectively tracked by the vehicle in some scenarios. Therefore, how to optimize the accuracy of automatic parking trajectory generation is a problem that needs to be solved urgently.

[0061] This application generates a parking trajectory that meets various automatic parking scenarios by calculating the safe driving area, designing and optimizing the target cost equation and constraints, thereby improving the accuracy and stability of parking and enhancing the safety and reliability of the parking process.

[0062] It should be noted that the execution subject of this embodiment may be an automatic parking trajectory optimization system, or a computing service device with data processing, network communication and program running functions, or an electronic device capable of realizing the above-mentioned automatic parking trajectory optimization function, etc., and this embodiment does not specifically limit this. The following takes the automatic parking trajectory optimization system as an example to illustrate this embodiment and the following embodiments.

[0063] Based on this, the present application embodiment provides an automatic parking trajectory optimization method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the automatic parking trajectory optimization method of the present application.

[0064] In this embodiment, the automatic parking trajectory optimization method includes steps S10 to S60:

[0065] Step S10: Obtain vehicle parameters, original parking trajectory and obstacle information.

[0066] It should be noted that in this step, the system will obtain the specific parameters of the current vehicle pre-set in the system, including but not limited to key dimensional information such as the vehicle's front overhang length, vehicle wheelbase, vehicle width, and vehicle rear overhang length. At the same time, the system will obtain the original parking trajectory through the vehicle's navigation or parking assistance function. The trajectory is usually generated by the vehicle's path planning module and is an approximate driving path based on the vehicle's current position and the target parking space. In addition, the system will also obtain real-time obstacle information around the vehicle through environmental perception sensors, including the location and shape of the obstacles.

[0067] It can be understood that vehicle parameters are the basis for calculating the ego vehicle box area and performing coordinate transformation, the original parking trajectory is the reference basis for subsequent optimization, and obstacle information is the key to constructing a safe driving corridor and collision constraints.

[0068] Step S20: performing coordinate transformation according to the vehicle parameters to obtain relative vehicle coordinates.

[0069] It should be noted that in this step, the system will calculate the coordinates of the four corresponding vertices and the midpoints of the two long sides of the ego vehicle in the ego vehicle coordinate system according to the acquired vehicle parameters. Then, according to the trajectory point set in the original parking trajectory, these points in the ego vehicle coordinate system are rotated to the DR (Driving Reference) coordinate system to obtain the relative vehicle coordinates.

[0070] In addition, it should be noted that the DR coordinate system is a commonly used vehicle motion reference coordinate system, which takes the center of mass of the vehicle as the origin, the direction of the vehicle's travel as the positive direction of the X axis, and the vertical direction of the vehicle as the positive direction of the Y axis. By converting the position information of the vehicle and obstacles into the DR coordinate system, subsequent trajectory optimization and collision detection can be performed more conveniently.

[0071] In a feasible implementation manner, the step S20 specifically includes:

[0072] Step S201: Obtain the front overhang length, wheelbase, width, vehicle length and rear overhang length of the vehicle according to the vehicle parameters.

[0073] It should be noted that in this step, the system will obtain the parameters set when the vehicle leaves the factory, including the vehicle's front overhang length, wheelbase, width, vehicle length and rear overhang length. In addition, it should be noted that the front overhang length refers to the distance from the front end of the vehicle to the center of the front axle, the wheelbase refers to the distance between the centers of the front and rear axles, the width refers to the distance between the outermost edges of both sides of the vehicle, the vehicle length refers to the overall length of the vehicle, and the rear overhang length refers to the distance from the center of the rear axle of the vehicle to the end of the vehicle.

[0074] Step S202: Calculating vertex coordinates and midpoint coordinates according to the front overhang length, the wheelbase, the width, the vehicle length, and the rear overhang length.

[0075] It should be noted that if Figure 2 As shown, the system will calculate the coordinates (H and I) of the four vertices (i.e., front left D, front right G, rear left E, and rear right F) of the vehicle in the self-vehicle coordinate system and the midpoints of the two long sides (i.e., the left and right sides between the front axle and the rear axle) according to the vehicle parameters obtained in step S201. For example, in the self-vehicle coordinate system, we can set the center point of the vehicle as the origin, the forward direction of the vehicle as the positive direction of the x-axis, and the width direction of the vehicle as the y-axis direction. Then, based on the front overhang length, wheelbase, width, and rear overhang length, the vertex coordinates and midpoint coordinates can be calculated. Specifically, as shown in Formula 1:

[0076]

[0077] Among them, FrontEdge is the front overhang length of the vehicle, WheelBase is the wheelbase of the vehicle, CarWidth is the vehicle width, CarLength is the vehicle length, and RearEdge is the rear overhang length of the vehicle.

[0078] Step S203: performing coordinate transformation according to the vertex coordinates and the midpoint coordinates to obtain relative vehicle coordinates.

[0079] It should be noted that the purpose of this step is to convert the vertex coordinates and midpoint coordinates of the vehicle in the ego-vehicle coordinate system to the DR coordinate system (i.e., the trajectory coordinate system of the vehicle). The DR coordinate system is a coordinate system with the starting point of the vehicle as the origin, the vehicle's driving direction as the positive direction of the x-axis, and the left side perpendicular to the driving direction as the positive direction of the y-axis.

[0080] In addition, it should be noted that the DR coordinate system is relative to the vehicle's driving trajectory, which changes continuously as the vehicle moves. Through coordinate transformation, the system can transform the vehicle's position and posture in the ego-vehicle coordinate system to the DR coordinate system, thereby facilitating subsequent trajectory optimization and control tracking.

[0081] In a feasible implementation manner, the step S203 specifically includes:

[0082] Step A10: Obtain the vehicle heading angle.

[0083] It should be noted that the vehicle heading angle refers to the angle between the vehicle's current driving direction and the positive direction of the X-axis of the global coordinate system (such as the world coordinate system). The angle can be obtained by real-time measurement of the vehicle's sensor system (such as GPS, gyroscope, etc.). In addition, it should be noted that the vehicle heading angle is a dynamically changing value, which will change continuously as the vehicle's driving direction changes. Therefore, in practical applications, it is necessary to continuously update the heading angle information in real time to ensure the accuracy of coordinate conversion.

[0084] Step A20: Obtain a coordinate rotation matrix according to the vehicle heading angle.

[0085] It should be noted that during the automatic parking process, the vehicle will travel along a preset trajectory. The system will rotate the vertex coordinates and midpoint coordinates in the ego-vehicle coordinate system to the DR coordinate system based on the points in the trajectory point set (i.e. the position of the vehicle at each time point). The rotation process requires the use of the coordinate rotation matrix A and the heading angle of the current point The coordinate rotation matrix A is a 2x2 matrix that can be used to rotate the heading angle Calculate the direction vectors of the rotated x-axis and y-axis.

[0086] Step A30: performing coordinate transformation according to the vertex coordinates, the midpoint coordinates and the coordinate rotation matrix to obtain relative vehicle coordinates.

[0087] It should be noted that if Figure 3 As shown in the figure, after obtaining the vehicle heading angle and coordinate rotation matrix, the system will perform coordinate transformation based on the vertex coordinates, midpoint coordinates and coordinate rotation matrix. In this step, the vertex coordinates and midpoint coordinates refer to the coordinates of the four vertices (D, G, E, F) and the midpoints of the two long sides (H and I) of the vehicle in the vehicle coordinate system, that is, Where D k 、E k 、F k , G k , H k ,I k represents the coordinates of the vehicle's endpoints at the kth point, D' k , E' k 、F k ', G' k , H' k , I' k represents the coordinates of each endpoint of the vehicle in the DR coordinate system at the kth point; A represents the coordinate rotation matrix, that is Represents the heading angle of the kth point.

[0088] Step S30: obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information.

[0089] It should be noted that in this step, the system constructs the vertical line equation based on the relative vehicle coordinates and obstacle information in the DR coordinate system to generate an affine constraint. Then, all trajectory point sets are traversed to obtain the affine constraints of each position point, and a safe driving area is constructed based on these constraints. The safe driving area is the area within which the vehicle must remain during driving to ensure that it does not collide with surrounding obstacles.

[0090] It is understandable that the construction of the safe driving area is one of the important prerequisites for trajectory optimization, which ensures that the optimized trajectory is fully guaranteed in terms of safety. At the same time, the introduction of affine constraints also makes the calculation of the safe driving area more accurate and efficient.

[0091] In a feasible implementation manner, the step S30 specifically includes:

[0092] Step S301: Calculate a target obstacle point according to the relative vehicle coordinates and the obstacle information.

[0093] It should be noted that in this step, the system will determine the specific position and direction of the vehicle on the current path based on the relative vehicle coordinates of the vehicle. This is generally information provided by the vehicle's own positioning system (such as GPS, radar or camera, etc.) and the path planning algorithm. Next, the system will use the obstacle information to calculate its relative distance and direction to the vehicle's current position. Then, one or more points closest to the vehicle are selected from these obstacles as target obstacle points. These points represent the closest possible obstacle locations during the vehicle's travel.

[0094] Step S302: construct a vertical line equation according to the target obstacle point, and perform affine constraints to obtain a safe driving area.

[0095] It should be noted that for each target obstacle point, the system constructs a vertical line equation. This vertical line equation represents the boundary of the area that the vehicle should avoid contacting during driving. Specifically, the slope of the vertical line equation can be determined based on the coordinates of the target obstacle point and the driving direction of the vehicle. Then, the system uses these vertical line equations for affine constraints. Affine constraints are a mathematical tool that allows operations such as translation, rotation, or scaling while keeping the shape of the figure unchanged. Safe area. In the automatic parking system, affine constraints can be used to ensure that the vehicle does not exceed the safe area determined by the vertical line equation during driving. Through affine constraints, the system will obtain a safe driving area, which consists of a series of parallel straight lines (or curves), which represent the obstacle boundaries that the vehicle should avoid contacting when it is in different positions. Specifically, the system calculates the obstacle points closest to the coordinates of the four vertices (D, G, E, F) and the midpoints of the two long sides (H and I), constructs the vertical line equation, and generates the affine constraint. Traversing all trajectory point sets can derive 6*k constraints, as shown in Formula 2:

[0096]

[0097] where k∈0,1,2,3...N, x kd ,y kd represents the coordinates of the kth point, p d represents the slope of the spindle line closest to the D endpoint of the vehicle at the kth point, x d ,y d Represents the coordinates of the obstacle point closest to endpoint D. The same is true for other endpoints, so I will not go into details here.

[0098] Step S40: Optimizing according to a preset optimization strategy and the original parking trajectory to obtain a target cost function.

[0099] It should be noted that in this step, the system will construct multiple cost functions based on the preset optimization strategy and the original parking trajectory, and construct the target cost function based on these cost functions. The target cost function is the core of trajectory optimization, which reflects the comprehensive performance of the optimized trajectory in terms of smoothness, length and offset. By solving the optimal solution of the target cost function, a parking trajectory that meets the constraints and has the best performance can be obtained. In addition, it should be noted that the preset optimization strategy includes smoothness cost construction, length cost construction and offset cost construction, which together constitute the target cost function.

[0100] Step S50: Conditional constraints are performed according to the safe driving area and the original parking trajectory to obtain a constraint equation.

[0101] It should be noted that in this step, the system will determine the obstacle avoidance constraints (i.e., constraint equations) that the vehicle must comply with during driving based on the previously calculated safe driving area. These include but are not limited to curvature constraints (ensuring that the steering action is within the physical limitations of the vehicle), position constraints (ensuring the accuracy of the starting point and the end point), and end point angle constraints (ensuring the correct orientation after parking is completed). For example, when the vehicle needs to park in a narrow passage, the system will first calculate the safe driving area based on the width of the passage and the position of the obstacle. Then, combined with the preliminary planning of the original parking trajectory, the system will add curvature constraints to prevent excessive steering actions in narrow spaces. At the same time, the system will also accurately constrain the positions of the starting and end points based on the precise position of the parking space to ensure the accuracy of parking. Finally, the system will also constrain the end point angle to ensure that the vehicle can correctly face the parking space after parking is completed.

[0102] In addition, it should be noted that the safe driving area is a dynamic area calculated based on obstacle information and the physical size of the vehicle, which is constantly updated as the vehicle moves and obstacles change. The original parking trajectory is the path initially planned by the parking path generation algorithm. These paths often have problems such as large curvature jumps and lack of smoothness, which need to be improved through subsequent trajectory optimization steps.

[0103] Step S60: Calculate and obtain an optimized parking trajectory according to the target cost function and the constraint equation.

[0104] It should be noted that in this step, the system will evaluate the possible parking trajectory according to the previously constructed target cost function (including smoothness cost, length cost and offset cost, etc.). Then, the system will use the constraint equation obtained in step S50 as the solution condition, construct an optimization algorithm (such as a sequential quadratic programming equation), and then use the OSQP solver to iteratively solve. Specifically, as shown in Formula 3:

[0105]

[0106] in, Pi is the optimization variable, that is, the pose point (x n ,y n ), Q0 is the Hessian matrix of the cost function W x , W y , W z are the weights of curvature constraint, position constraint and angle constraint respectively; P ref0 and P ref_end are the starting and ending points of the reference point; I is the identity matrix Collosioni is the collision point in the safe driving area.

[0107] In a feasible implementation manner, after step S60, the method further includes:

[0108] Step S70: obtaining an optimized heading angle according to the optimized parking trajectory.

[0109] It should be noted that the optimized heading angle refers to the angle between the vehicle's driving direction at the current driving trajectory point and the X-axis direction in the relative coordinate system. In this step, the system will calculate the heading angle of each trajectory point through a geometric formula based on the coordinate information of two adjacent trajectory points. Specifically, as shown in Formula 4:

[0110] θ i =arctan((y i+1 -y i ) / (x i+1 -x i ))(Formula 4)

[0111] Where (x i+1 ,y i+1 ), (x i ,y i ) are two points on the optimization trajectory, θ i is the heading angle corresponding to the point.

[0112] Step S80: splitting the optimized parking trajectory according to the optimized heading angle to update the optimized parking trajectory.

[0113] It should be noted that in this step, the system will obtain a heading angle change threshold (such as π / 2). This threshold is used to determine whether the vehicle's driving direction has changed significantly. When the difference in heading angles between two adjacent trajectory points is greater than this threshold, the system will determine that the current vehicle's driving direction has changed significantly and the trajectory needs to be split. Then, the system will traverse each trajectory point in the optimized parking trajectory and split the trajectory according to the change in heading angle. Specifically, when it is found that the difference in heading angles between two adjacent trajectory points is greater than the threshold, the system splits the trajectory segment between the two points as an independent trajectory segment. In this way, the system can split the optimized parking trajectory into multiple continuous trajectory segments, and the heading angle change in each trajectory segment is small, which is convenient for control and tracking.

[0114] In addition, it should be noted that the split trajectory segments can be further assigned attributes and processed as needed. For example, the system can assign values ​​to each point on the trajectory segment, such as coordinate position, heading angle and direction, to meet the control requirements of the subsequent parking process. At the same time, the split trajectory segments are also convenient for subsequent path planning and control tracking algorithm processing.

[0115] The present embodiment provides an automatic parking trajectory optimization method, and the method of the present embodiment includes: obtaining vehicle parameters, original parking trajectory and obstacle information; performing coordinate transformation according to the vehicle parameters to obtain relative vehicle coordinates; obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information; optimizing according to a preset optimization strategy and the original parking trajectory to obtain a target cost function; performing conditional constraints according to the safe driving area and the original parking trajectory to obtain a constraint equation; and calculating an optimized parking trajectory according to the target cost function and the constraint equation. In summary, the present embodiment generates a parking trajectory that meets various automatic parking scenarios by calculating the safe driving area, designing and optimizing the target cost equation and constraint conditions, thereby improving the accuracy and stability of parking and enhancing the safety and reliability of the parking process.

[0116] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can refer to the above introduction, and will not be repeated later. Figure 4 , Figure 4 This is a flow chart of the second embodiment of the automatic parking trajectory optimization method of the present application, wherein step S50 specifically includes:

[0117] Step S501: obtaining the destination heading and the original trajectory starting point according to the original parking trajectory.

[0118] It should be noted that in this step, the system will extract the starting position and the end heading of the trajectory based on the original parking data. It can be understood that the role of this step is to determine the initial position of the vehicle when it starts parking and the desired heading at the end of parking, providing a benchmark for subsequent trajectory optimization. In addition, it should be noted that the starting point of the original trajectory refers to the position coordinates when the vehicle starts parking, and the end heading refers to the orientation angle of the vehicle body when the vehicle ends parking.

[0119] Step S502: constructing a collision constraint according to the safe driving area to obtain a collision constraint equation.

[0120] It should be noted that in this step, the system determines the coordinates of the six collision points based on the safe driving area (i.e., the area where the vehicle will not collide with obstacles during driving), and constructs the collision constraint equation accordingly. Specifically, as shown in Formula 5:

[0121]

[0122] where x c ,y cis the collision point coordinate. It can be understood that the role of the collision constraint equation is to ensure that the optimized trajectory will not collide with obstacles at any time, thereby ensuring the safety of the parking process.

[0123] Step S503: constructing a curvature constraint according to preset slack variables to obtain a curvature constraint equation.

[0124] It should be noted that in this step, in order to further improve the rationality and traceability of the parking trajectory, slack variables are introduced to construct the curvature constraint equation. For example, in the automatic parking scenario, the vehicle often needs to perform large curvature turns and curvature jumps. If the curvature of the trajectory is strictly constrained directly, it may lead to difficulties in solving or obtain an unreasonable trajectory. Therefore, slack variables are introduced in the curvature constraint to allow the trajectory to have a certain range of fluctuations in curvature. Specifically, the curvature constraint equation can be constructed by setting the curvature threshold and the range of slack variables, and the optimized trajectory is required to be as close to the ideal smooth curve as possible while satisfying the collision constraint and other constraints. Specifically, as shown in Formula 6:

[0125]

[0126] Where (x i ,y i ), (x i-1 ,y i-1 ), (x i+1 ,y i+1 ) are three consecutive points on the optimized trajectory point set, slack i is the slack variable, Δs is the minimum metric distance between two points, Cur cstr The curvature represented by the minimum turning radius.

[0127] In addition, it should be noted that slack variables are a technical means for increasing the solution space and improving the adaptability of trajectories. By introducing slack variables, the optimized trajectory can be made more in line with the needs of actual parking scenarios while ensuring safety.

[0128] It can be understood that the role of this step is to allow the trajectory to deviate from the ideal smooth curve to a certain extent, so as to increase the solution space and improve the adaptability of the trajectory.

[0129] Step S504: constructing a position constraint according to the starting point of the original trajectory to obtain a position constraint equation.

[0130] It should be noted that the construction of the position constraint equation is to ensure that the optimized parking trajectory can accurately start from the starting point of the original trajectory. In this step, the system will use the starting point coordinates to construct the position constraint equation to ensure that the first point of the optimized trajectory is consistent with the starting point of the original trajectory. Specifically, as shown in Formula 7:

[0131]

[0132] in To optimize the starting point of the trajectory point set, To optimize the end point of the trajectory point set, is the starting point of the original trajectory point set, is the end point of the original trajectory point set.

[0133] Step S505: constructing an angle constraint according to the endpoint heading to obtain an angle constraint equation.

[0134] It should be noted that in this step, the angle constraint equation is constructed to ensure that the optimized parking trajectory has the correct heading angle when it reaches the end point. This is because during the parking process, the vehicle not only needs to be parked accurately at the specified location, but also needs to be parked in the correct direction for subsequent operations or driving. Specifically, as shown in Formula 8:

[0135]

[0136] Among them, (x n-1 ,y n-1 ), (x n ,y n ) are the last two points on the optimization trajectory. is the heading angle of the last point on the original trajectory.

[0137] Step S506: taking the collision constraint equation, the curvature constraint equation, the position constraint equation and the angle constraint equation as constraint equations.

[0138] It should be noted that in this step, the system will combine the collision constraint equation, curvature constraint equation, position constraint equation and angle constraint equation obtained in the previous step to form the final constraint equation. This constraint equation will be used in the subsequent optimization solution process to ensure that the optimized parking trajectory achieves the best parking effect while satisfying various constraints.

[0139] In this embodiment, by comprehensively considering the terminal heading, safe driving area, curvature constraint, position constraint and angle constraint, a comprehensive constraint equation is provided for solving subsequent problems, ensuring the performance of the optimized parking trajectory in terms of safety, rationality and traceability.

[0140] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and second embodiments can be referred to the above description, and will not be described in detail later. Figure 5 , Figure 5 This is a flowchart of the third embodiment of the automatic parking trajectory optimization method of the present application, wherein step S40 specifically includes:

[0141] Step S401: determining a target parking trajectory point and an original parking trajectory point according to a preset optimization strategy and the original parking trajectory.

[0142] It should be noted that in this step, the system will determine the target parking trajectory points and the corresponding original parking trajectory points that need to be optimized according to the preset optimization strategy. The purpose of this step is to clarify the object of optimization, that is, which trajectory points need to be optimized and their correspondence with the original trajectory points. For example, in the process of automatic parking, the original parking trajectory may be composed of a series of discrete points, which represent the position of the vehicle during the parking process. The preset optimization strategy includes goals such as reducing the curvature jump of the trajectory, shortening the trajectory length, and maintaining the smoothness of the trajectory. Based on these goals, the system will select a part of the original trajectory points as the starting point for optimization, and obtain a series of new target parking trajectory points through optimization.

[0143] Step S402: constructing a smoothness cost, a length cost and an offset cost according to the target parking trajectory point and the original parking trajectory to obtain a target cost function.

[0144] It should be noted that the construction of the target cost function is the core of the optimization process. It combines multiple factors such as smoothness cost, length cost and offset cost to comprehensively evaluate the quality of the optimized trajectory.

[0145] It can be understood that the construction of the smoothness cost aims to reduce the curvature jump of the trajectory and make the trajectory smoother. The system will achieve this by calculating the curvature difference between adjacent trajectory points. Specifically, a smoothness cost function can be set, which is proportional to the curvature difference of the trajectory points. By minimizing this function, a smoother trajectory can be expected. The smoothness cost is constructed as shown in Formula 9:

[0146]

[0147] Where (x i ,y i ), (x i-1 ,y i-1 ), (x i+1 ,y i+1 ) are three consecutive points on the optimized trajectory point set.

[0148] The construction of the length cost aims to shorten the length of the trajectory, thereby improving parking efficiency. This can be achieved by calculating the total length of the trajectory. Specifically, the system sets a length cost function that is proportional to the total length of the trajectory. By minimizing this function, a shorter trajectory can be expected. The length cost is constructed as shown in Formula 10:

[0149]

[0150] Where (x i ,y i ), (x i+1 ,y i+1 ) are two consecutive points on the optimized trajectory point set.

[0151] The construction of the offset cost aims to maintain the similarity between the optimized trajectory and the original trajectory to avoid excessive deviation. This can be achieved by calculating the offset between the optimized trajectory points and the original trajectory points. Specifically, an offset cost function can be set that is proportional to the square of the offset. By minimizing this function, it is expected to obtain an optimized trajectory that is closer to the original trajectory. The offset cost is constructed as shown in Formula 11:

[0152]

[0153] Where (x i ,y i ) is a point on the optimized trajectory point set, (x i_ref ,y i_ref ) is the corresponding reference point on the original trajectory point set.

[0154] In this embodiment, by determining the target parking trajectory point and the original parking trajectory point, and constructing the smoothness cost, length cost and offset cost accordingly, an optimized target cost function is obtained, which effectively improves the smoothness, accuracy and efficiency of the parking trajectory.

[0155] This application also provides an automatic parking trajectory optimization device, please refer to Figure 6 , the automatic parking trajectory optimization device comprises:

[0156] The data acquisition module 10 is used to acquire vehicle parameters, original parking trajectory and obstacle information;

[0157] A coordinate conversion module 20, used for performing coordinate conversion according to the vehicle parameters to obtain relative vehicle coordinates;

[0158] A data processing module 30, configured to obtain a safe driving area according to the relative vehicle coordinates and the obstacle information;

[0159] A cost construction module 40, configured to optimize the original parking trajectory according to a preset optimization strategy to obtain a target cost function;

[0160] A constraint building module 50, configured to obtain a constraint equation by conditionally constraining the safe driving area and the original parking trajectory;

[0161] The parking optimization module 60 is used to calculate an optimized parking trajectory according to the target cost function and the constraint equation.

[0162] The automatic parking trajectory optimization device provided by the present application adopts the automatic parking trajectory optimization method in the above embodiment, which can solve the technical problem of how to optimize the accuracy of automatic parking trajectory generation. Compared with the prior art, the beneficial effects of the automatic parking trajectory optimization device provided by the present application are the same as the beneficial effects of the automatic parking trajectory optimization method provided by the above embodiment, and the other technical features in the automatic parking trajectory optimization device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0163] In one embodiment, the coordinate conversion module 20 is further used to obtain the front overhang length, wheelbase, width, vehicle length and rear overhang length of the vehicle according to the vehicle parameters; to calculate the vertex coordinates and the midpoint coordinates according to the front overhang length, the wheelbase, the width, the vehicle length and the rear overhang length; and to perform coordinate conversion according to the vertex coordinates and the midpoint coordinates to obtain relative vehicle coordinates.

[0164] In one embodiment, the coordinate conversion module 20 is further used to obtain the vehicle heading angle; obtain a coordinate rotation matrix according to the vehicle heading angle; and perform coordinate conversion according to the vertex coordinates, the midpoint coordinates and the coordinate rotation matrix to obtain relative vehicle coordinates.

[0165] In one embodiment, the data processing module 30 is further used to calculate the target obstacle point according to the relative vehicle coordinates and the obstacle information; construct a vertical line equation according to the target obstacle point, and perform affine constraints to obtain a safe driving area.

[0166] In one embodiment, the cost construction module 40 is further used to determine the target parking trajectory point and the original parking trajectory point according to the preset optimization strategy and the original parking trajectory; and to construct the smoothness cost, the length cost and the offset cost according to the target parking trajectory point and the original parking trajectory to obtain a target cost function.

[0167] In one embodiment, the cost construction module 50 is further used to obtain the terminal heading and the original trajectory starting point according to the original parking trajectory; construct a collision constraint according to the safe driving area to obtain a collision constraint equation; construct a curvature constraint according to a preset slack variable to obtain a curvature constraint equation; construct a position constraint according to the original trajectory starting point to obtain a position constraint equation; construct an angle constraint according to the terminal heading to obtain an angle constraint equation; and use the collision constraint equation, the curvature constraint equation, the position constraint equation and the angle constraint equation as constraint equations.

[0168] In one embodiment, the parking optimization module 60 is further configured to obtain an optimized heading angle according to the optimized parking trajectory; and split the optimized parking trajectory according to the optimized heading angle to update the optimized parking trajectory.

[0169] The present application provides an automatic parking trajectory optimization device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the automatic parking trajectory optimization method in the above-mentioned embodiment 1.

[0170] Reference below Figure 7 , which shows a schematic diagram of the structure of an automatic parking trajectory optimization device suitable for implementing the embodiment of the present application. The automatic parking trajectory optimization device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The automatic parking trajectory optimization device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0171] like Figure 7As shown, the automatic parking trajectory optimization device may include a processing device 1001 (such as a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the automatic parking trajectory optimization device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the automatic parking trajectory optimization device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows an automatic parking trajectory optimization device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have alternatively.

[0172] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0173] The automatic parking trajectory optimization device provided by the present application adopts the automatic parking trajectory optimization method in the above embodiment, which can solve the technical problem of how to optimize the accuracy of automatic parking trajectory generation. Compared with the prior art, the beneficial effects of the automatic parking trajectory optimization device provided by the present application are the same as the beneficial effects of the automatic parking trajectory optimization method provided by the above embodiment, and the other technical features in the automatic parking trajectory optimization device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0174] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0175] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0176] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the automatic parking trajectory optimization method in the above-mentioned embodiment.

[0177] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0178] The computer-readable storage medium may be included in the automatic parking trajectory optimization device; or may exist independently without being assembled into the automatic parking trajectory optimization device.

[0179] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the automatic parking trajectory optimization device, the automatic parking trajectory optimization device: obtains vehicle parameters, original parking trajectory and obstacle information; performs coordinate transformation according to the vehicle parameters to obtain relative vehicle coordinates; obtains a safe driving area according to the relative vehicle coordinates and the obstacle information; optimizes according to a preset optimization strategy and the original parking trajectory to obtain a target cost function; performs conditional constraints according to the safe driving area and the original parking trajectory to obtain a constraint equation; and calculates an optimized parking trajectory according to the target cost function and the constraint equation.

[0180] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0181] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0182] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0183] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned automatic parking trajectory optimization method, and can solve the technical problem of how to optimize the accuracy of automatic parking trajectory generation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the automatic parking trajectory optimization method provided in the above-mentioned embodiment, and will not be repeated here.

[0184] The present application also provides a computer program product, including a computer program, which implements the steps of the automatic parking trajectory optimization method as described above when executed by a processor.

[0185] The computer program product provided in this application can solve the technical problem of how to optimize the accuracy of automatic parking trajectory generation. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the automatic parking trajectory optimization method provided in the above embodiment, which will not be repeated here.

[0186] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. An automatic parking trajectory optimization method, characterized in that: The method comprises: Obtain vehicle parameters, original parking trajectory and obstacle information; Performing coordinate transformation according to the vehicle parameters to obtain relative vehicle coordinates; Obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information; Optimizing the target cost function according to the preset optimization strategy and the original parking trajectory; Conditioning the safe driving area and the original parking trajectory to obtain a constraint equation; The optimized parking trajectory is calculated according to the target cost function and the constraint equation.

2. The method according to claim 1, characterized in that The step of optimizing the target cost function according to the preset optimization strategy and the original parking trajectory comprises: Determining a target parking trajectory point and an original parking trajectory point according to a preset optimization strategy and the original parking trajectory; A smoothness cost, a length cost, and an offset cost are constructed according to the target parking trajectory point and the original parking trajectory to obtain a target cost function.

3. The method according to claim 1, characterized in that The step of obtaining a constraint equation by conditionally constraining the safe driving area and the original parking trajectory comprises: Obtaining the terminal heading and the original trajectory starting point according to the original parking trajectory; Constructing a collision constraint according to the safe driving area to obtain a collision constraint equation; Constructing the curvature constraint according to the preset slack variables to obtain the curvature constraint equation; Constructing a position constraint according to the starting point of the original trajectory to obtain a position constraint equation; Constructing an angle constraint according to the endpoint heading to obtain an angle constraint equation; The collision constraint equation, the curvature constraint equation, the position constraint equation and the angle constraint equation are used as constraint equations.

4. The method according to claim 1, characterized in that The step of obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information comprises: Calculating a target obstacle point according to the relative vehicle coordinates and the obstacle information; A vertical line equation is constructed according to the target obstacle point, and an affine constraint is performed to obtain a safe driving area.

5. The method according to claim 1, characterized in that The step of performing coordinate conversion according to the vehicle parameters to obtain relative vehicle coordinates comprises: According to the vehicle parameters, the front overhang length, wheelbase, width, vehicle length and rear overhang length of the vehicle are obtained; Calculating the vertex coordinates and the midpoint coordinates according to the front overhang length, the wheelbase, the width, the vehicle length, and the rear overhang length; Coordinate transformation is performed according to the vertex coordinates and the midpoint coordinates to obtain relative vehicle coordinates.

6. The method according to claim 5, characterized in that The step of performing coordinate conversion according to the vertex coordinates and the midpoint coordinates to obtain relative vehicle coordinates comprises: Get the vehicle heading angle; Obtaining a coordinate rotation matrix according to the vehicle heading angle; Coordinate transformation is performed according to the vertex coordinates, the midpoint coordinates and the coordinate rotation matrix to obtain relative vehicle coordinates.

7. The method according to any one of claims 1 to 6, characterized in that After the step of calculating the optimized parking trajectory according to the target cost function and the constraint equation, the method further includes: Obtaining an optimized heading angle according to the optimized parking trajectory; The optimized parking trajectory is split according to the optimized heading angle to update the optimized parking trajectory.

8. An automatic parking trajectory optimization device, characterized in that: The device comprises: A data acquisition module, used to obtain vehicle parameters, original parking trajectory and obstacle information; A coordinate conversion module, used for performing coordinate conversion according to the vehicle parameters to obtain relative vehicle coordinates; A data processing module, used for obtaining a safe driving area according to the relative vehicle coordinates and the obstacle information; A cost construction module, used for optimizing according to a preset optimization strategy and the original parking trajectory to obtain a target cost function; A constraint building module, used for obtaining a constraint equation by conditionally constraining the safe driving area and the original parking trajectory; The parking optimization module is used to calculate the optimized parking trajectory according to the target cost function and the constraint equation.

9. An automatic parking trajectory optimization device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the automatic parking trajectory optimization method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the automatic parking trajectory optimization method according to any one of claims 1 to 7 are implemented.