Parking track acquisition method, electronic equipment and computer readable storage medium
By obtaining current environmental information in the vehicle parking system and building an initial parking trajectory, and optimizing the trajectory in combination with preset constraints, the problem of inaccurate parking trajectory planning in the existing technology is solved, and higher parking accuracy and safety are achieved.
Patent Information
- Application Number
- CN202510239510.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-24
AI Technical Summary
In the existing vehicle parking trajectory planning methods, the hybrid A* algorithm has high requirements for map accuracy, map errors lead to planning path deviations, and the trajectory is not accurate enough.
By obtaining the current environment information, including the current position and target position of the vehicle, the initial parking trajectory is constructed, and the trajectory is optimized according to preset trajectory constraints, obstacle constraints, steering wheel speed constraints and position constraints, the optimized parking trajectory is obtained.
Improve the accuracy of parking trajectory and ensure the safety and efficiency of the parking process.
Smart Images

Figure CN120191352A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle parking, and in particular to a parking trajectory acquisition method, an electronic device and a computer-readable storage medium. Background Art
[0002] Vehicles are an important means of transportation in today's society. As the number of vehicles continues to increase, parking space is also shrinking, and the parking skills required of drivers are getting higher and higher. Therefore, being able to plan a parking trajectory for the driver can greatly help the driver to achieve safe parking.
[0003] The current method for planning vehicle parking trajectories usually uses the hybrid A* algorithm built into the vehicle control system to plan the trajectory. However, the hybrid A* algorithm has high requirements for map accuracy. Any slight error in the map may cause deviations in the planned path, resulting in inaccurate trajectories. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a parking trajectory acquisition method, an electronic device and a computer-readable storage medium, which can improve the accuracy of parking.
[0005] In order to solve the above technical problems, the present application provides a parking trajectory acquisition method.
[0006] In one embodiment, a parking trajectory acquisition method is applied to a vehicle, the method comprising: acquiring current environment information, the current environment information comprising a first position of the vehicle and a target position of the vehicle, the first position representing the current position of the vehicle; constructing a first parking trajectory corresponding to the first position according to the first position and the target position; optimizing the first parking trajectory according to preset parking constraints to obtain an optimized first parking trajectory, the preset parking constraints comprising a trajectory constraint, an obstacle constraint, a steering wheel speed constraint, and a position constraint.
[0007] In one embodiment, after the step of optimizing the first parking trajectory according to the preset parking constraint conditions to obtain the optimized first parking trajectory, the method further includes: controlling the vehicle to move according to the optimized first parking trajectory until the vehicle reaches a second position; and stopping parking in response to the second position being the same as the target position.
[0008] In one embodiment, after the step of optimizing the first parking trajectory according to the preset parking constraint conditions to obtain the optimized first parking trajectory, the method further includes: in response to the second position being different from the target position, constructing a second parking trajectory corresponding to the second position according to the second position and the target position; optimizing the second parking trajectory according to the preset parking constraint conditions to obtain the optimized second parking trajectory; controlling the vehicle to travel according to the optimized second parking trajectory until the vehicle reaches a third position; in response to the third position being the same as the target position, stopping parking.
[0009] In one embodiment, the step of optimizing the first parking trajectory according to the preset parking constraint conditions to obtain the optimized first parking trajectory includes: performing iterative processing on the first parking trajectory according to a preset trajectory optimization algorithm to obtain the parking trajectory after the current iteration; in response to the parking trajectory after the current iteration satisfying the trajectory constraint, the obstacle constraint, the steering wheel rotation speed constraint, and the position constraint, determining the parking trajectory after the current iteration as the optimized first parking trajectory.
[0010] In one embodiment, the current environmental information includes obstacle information. Before the step of, in response to the parking trajectory after the current iteration satisfying the trajectory constraint, the obstacle constraint, the steering wheel rotation speed constraint, and the position constraint, determining the parking trajectory after the current iteration as the optimized first parking trajectory, the method further includes: determining a trajectory constraint value according to the trajectory difference between the parking trajectory after the current iteration and the obtained reference trajectory; obtaining an obstacle constraint value corresponding to the parking trajectory after the current iteration based on the obstacle information; obtaining a steering wheel rotation speed constraint value corresponding to the parking trajectory after the current iteration according to the curve information of the curve where the parking trajectory after the current iteration is located; determining a position constraint value according to the position difference between the trajectory end point of the parking trajectory after the current iteration and the trajectory end point of the reference trajectory.
[0011] In one embodiment, the step of determining a trajectory constraint value according to the trajectory difference between the parking trajectory after the current iteration and the obtained reference trajectory includes: obtaining the square term of the distance from each trajectory point in the parking trajectory after the current iteration to the reference trajectory; obtaining a first product term between each square term of the distance and a preset trajectory cost weight; determining the sum of each first product term as the trajectory constraint value.
[0012] In one embodiment, the step of obtaining the obstacle constraint value corresponding to the parking trajectory after the current iteration based on the obstacle information includes: obtaining the distance between each obstacle and the parking trajectory after the current iteration according to the obstacle information; obtaining the difference between the distance and a preset safety distance threshold; obtaining a second product term of the square of the difference and a preset weight threshold; and determining the sum of the second product terms as the obstacle constraint value.
[0013] In one embodiment, the curve information includes curvature. The step of obtaining the steering wheel rotation speed constraint value corresponding to the parking trajectory after the current iteration according to the curve information of the curve where the parking trajectory after the current iteration is located includes: obtaining the square term of the first derivative of the curvature of the curve where the parking trajectory after the current iteration is located; and determining a third product term of the square term of the first derivative of the curvature and a preset rotation speed weight as the steering wheel rotation speed constraint value.
[0014] To solve the above technical problems, the present application provides an electronic device, including a memory and a processor. The memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the above parking trajectory acquisition method.
[0015] To solve the above technical problems, the present application provides a computer-readable storage medium, including: storing program data, and the program data is used to implement the above parking trajectory acquisition method when executed by a processor.
[0016] In the above solution, the current environment information is obtained. The current environment information includes the first position of the vehicle and the target position of the vehicle, and the first position represents the current position of the vehicle; a first parking trajectory corresponding to the first position is constructed according to the first position and the target position; the first parking trajectory is optimized according to preset parking constraint conditions to obtain an optimized first parking trajectory. The preset parking constraint conditions include trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint. Thus, by using trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint to optimize the first parking trajectory, the accuracy of the first parking trajectory can be improved, and thus the accuracy of parking can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or in the prior art, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the following described drawings are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to these drawings, where:
[0018] Figure 1 is a schematic flowchart of an exemplary embodiment of the parking trajectory acquisition method shown in the present application;
[0019] Figure 2 is a schematic diagram of an exemplary embodiment of a vehicle model shown in the present application;
[0020] Figure 3 is a schematic diagram of an exemplary embodiment of obtaining alternative trajectories shown in the present application;
[0021] Figure 4 is a schematic diagram of an exemplary embodiment of trajectory expansion shown in the present application;
[0022] Figure 5 is a schematic diagram of the distance between the kth trajectory point and the reference trajectory in the current iterative parking trajectory shown in the present application;
[0023] Figure 6 is a schematic diagram of an exemplary embodiment of a vehicle three-circle model shown in the present application;
[0024] Figure 7 is a block diagram of a parking trajectory acquisition device shown in an exemplary embodiment of the present application;
[0025] Figure 8 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;
[0026] Figure 9 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0027] 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. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0028] First of all, it should be noted that vehicles are important means of transportation in today's society. With the continuous increase in the number of vehicles, parking space is also constantly shrinking, and the parking technology requirements for drivers are getting higher and higher. Therefore, being able to plan a parking trajectory for the driver can greatly help the driver to achieve safe parking.
[0029] The current method for planning vehicle parking trajectories usually uses the hybrid A* algorithm built into the vehicle control system to plan the trajectory. However, the hybrid A* algorithm has high requirements for map accuracy. Any slight error in the map may cause deviations in the planned path, resulting in inaccurate trajectories.
[0030] Based on this, the present application provides a method for obtaining a parking trajectory, an electronic device, and a computer-readable storage medium. For details, please refer to Figure 1 , Figure 1 which is a schematic flowchart of an exemplary embodiment of a method for obtaining a parking trajectory shown in the present application.
[0031] The execution subject of a method for obtaining a parking trajectory may be a terminal device, a server, or other processing devices. Among them, the terminal device may be a computer, a mobile device, a terminal, a computing device, an in-vehicle device, etc. The execution subject of the method for obtaining a parking trajectory may also be a parking trajectory obtaining device. In some possible implementation manners, the method for obtaining a parking trajectory may be implemented by a processor calling computer-readable instructions stored in a memory. The execution subject of the method for obtaining a parking trajectory may also be a big data cluster. A big data cluster is a computer system architecture formed by connecting multiple computers through a network. The big data cluster may be deployed on a private cloud built by K8S (Kubernetes, a container orchestration engine).
[0032] Specifically, the method for obtaining a parking trajectory is applied to a vehicle. A method for obtaining a parking trajectory in this embodiment includes the following steps:
[0033] Step S110: Obtain current environment information, where the current environment information includes the first position of the vehicle and the target position of the vehicle, and the first position represents the current position of the vehicle.
[0034] The current environment information is the information of the environment where the vehicle is currently located. The current environment information includes the first position of the vehicle and the target position of the vehicle, and the first position represents the current position of the vehicle.
[0035] The current position of the vehicle refers to the current actual position of the vehicle. The current position of the vehicle may include the abscissa, ordinate, heading angle, vehicle speed, and the curvature of the curve where the current position is located when the vehicle is at the current position. As an example, the parking trajectory obtaining device locates the vehicle through a positioning device to obtain the current position of the vehicle. As another example, the parking trajectory obtaining device receives information sent by the control system of the vehicle, where the information includes the current position, and takes the received information as the current position of the vehicle.
[0036] The target position of the vehicle is the running end position of the vehicle. The target position of the vehicle may include the abscissa, ordinate, heading angle, vehicle speed, and the curvature of the curve where the end point is located when the vehicle reaches the running end. For example, the target position of the vehicle is the position of the parking point. Specifically, the parking trajectory obtaining device receives the position information sent by the control system of the vehicle, where the position information includes the target position information, and takes the received target position information as the target position of the vehicle.
[0037] Step S120: Construct a first parking trajectory corresponding to the first position according to the first position and the target position.
[0038] The first parking trajectory refers to the trajectory before optimization. As an example, the parking trajectory acquisition device uses the hybrid A* algorithm to perform trajectory planning processing on the first position and the target position to obtain the first parking trajectory. Among them, the hybrid A* algorithm can plan the parking trajectory according to the current position and target position information of the vehicle. As another example, the parking trajectory acquisition device inputs the first position and the target position into a preset trajectory planning model, obtains the model output result, and determines the model output result as the first parking trajectory.
[0039] Step S130: Optimize the first parking trajectory according to the preset parking constraint conditions to obtain the optimized first parking trajectory. The preset parking constraint conditions include trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint.
[0040] The preset parking constraint conditions can include trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint. Trajectory constraint means that during the optimization process, the trajectory constraint value of the trajectory is constrained to ensure that the trajectory constraint value of the optimized target parking trajectory is less than the preset trajectory threshold. Obstacle constraint means that during the optimization process, the obstacle constraint value of the trajectory is constrained to ensure that the obstacle constraint value of the optimized parking trajectory is less than the preset obstacle threshold. Steering wheel rotation speed constraint means that during the optimization process, the steering wheel rotation speed constraint value of the trajectory is constrained to ensure that the steering wheel rotation speed constraint value of the optimized parking trajectory is less than the preset steering wheel rotation speed threshold. Position constraint means that during the optimization process, the target position of the trajectory is constrained to ensure that the position constraint value of the optimized parking trajectory is less than the preset position threshold.
[0041] Furthermore, optimize the first parking trajectory according to the preset parking constraint conditions to obtain the optimized first parking trajectory. The preset parking constraint conditions include at least one of trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint.
[0042] The parking trajectory acquisition device optimizes the first parking trajectory according to preset parking constraint conditions to obtain the optimized first parking trajectory. Specifically, the parking trajectory acquisition device obtains the position constraint value of the first parking trajectory. In response to the position constraint value being greater than or equal to the preset position threshold, it optimizes the first parking trajectory to obtain the optimized first parking trajectory, and repeats the above steps until the position constraint value of the optimized first parking trajectory is less than the preset position threshold. For example, the parking trajectory acquisition device obtains the coordinate difference between the trajectory end point coordinates and the target position coordinates of the first parking trajectory; determines the fourth product term between the square term of the coordinate difference and the preset position weight as the position constraint value. In response to the position constraint value being less than the preset position threshold, it determines the first parking trajectory as the target parking trajectory; in response to the position constraint value being greater than or equal to the preset position threshold, it corrects the end position of the first parking trajectory to the target position to obtain the optimized first parking trajectory.
[0043] In the above solution, the current environmental information is obtained. The current environmental information includes the first position of the vehicle and the target position of the vehicle, and the first position represents the current position of the vehicle; the first parking trajectory corresponding to the first position is constructed according to the first position and the target position; the first parking trajectory is optimized according to preset parking constraint conditions to obtain the optimized first parking trajectory, and the preset parking constraint conditions include trajectory constraint, obstacle constraint, steering wheel rotation speed constraint and position constraint. Thus, by using trajectory constraint, obstacle constraint, steering wheel rotation speed constraint and position constraint to optimize the first parking trajectory, the accuracy of the first parking trajectory can be improved, thereby improving the accuracy of parking.
[0044] After the step of the parking trajectory acquisition device optimizing the first parking trajectory according to preset parking constraint conditions to obtain the optimized first parking trajectory, the method further includes: controlling the vehicle to travel according to the optimized first parking trajectory until the vehicle reaches the second position; in response to the second position being the same as the target position, stopping parking. Specifically, the parking trajectory acquisition device sends the optimized first parking trajectory to the control center of the vehicle, triggers the control center to control the vehicle to travel according to the optimized first parking trajectory, and when the driving time reaches the preset time period, obtains the position of the vehicle after driving, that is, the second position, and determines whether the second position is the same as the target position. If so, it determines that the vehicle has reached the target position and stops parking.
[0045] After the step of the parking trajectory acquisition device optimizing the first parking trajectory according to the preset parking constraint conditions to obtain the optimized first parking trajectory, the method further includes: in response to the second position being different from the target position, constructing a second parking trajectory corresponding to the second position according to the second position and the target position; optimizing the second parking trajectory according to the preset parking constraint conditions to obtain the optimized second parking trajectory; controlling the vehicle to travel according to the optimized second parking trajectory until the vehicle reaches the third position; in response to the third position being the same as the target position, stopping parking.
[0046] The parking trajectory acquisition device constructs a second parking trajectory corresponding to the second position according to the second position and the target position. Specifically, the parking trajectory acquisition device uses a preset trajectory decision algorithm to plan the parking trajectory of the vehicle with the second position as the starting point and the target position as the ending point, and obtains the second parking trajectory corresponding to the second position.
[0047] The parking trajectory acquisition device controls the vehicle to travel according to the optimized second parking trajectory until the vehicle reaches the third position; in response to the third position being the same as the target position, stopping parking. Specifically, the parking trajectory acquisition device sends the optimized second parking trajectory to the control center of the vehicle, triggers the control center to control the vehicle to travel according to the optimized second parking trajectory, and when the driving time reaches the preset time period, obtains the position of the vehicle after driving, that is, the third position, and determines whether the third position is the same as the target position. If so, it is determined that the vehicle has reached the target position and stops parking. If not, the above steps of optimizing the parking trajectory according to the preset parking constraint conditions are continued until the vehicle reaches the target position.
[0048] In one embodiment, the parking trajectory acquisition device performs trajectory optimization at preset time intervals. Specifically, the parking trajectory acquisition device receives the environmental information of the vehicle at preset time intervals. The environmental information includes the current position and the target position of the vehicle. A parking trajectory corresponding to the current position is constructed based on the current position and the target position; the parking trajectory corresponding to the current position is optimized according to the preset parking constraint conditions to obtain an optimized parking trajectory; the optimized parking trajectory is sent to the control system of the vehicle to trigger the vehicle to travel according to the optimized parking trajectory until the vehicle reaches the target position. For example, after the vehicle starts, the parking trajectory acquisition device obtains the environmental information of the vehicle at the current moment. The environmental information at the current moment includes the first position and the target position. A first parking trajectory corresponding to the first position is constructed based on the first position and the target position; the first parking trajectory is optimized according to the preset parking constraint conditions to obtain an optimized first parking trajectory, and the optimized first parking trajectory is sent to the control system of the vehicle to trigger the control system of the vehicle to control the vehicle to travel according to the optimized first parking trajectory; after a preset interval time period, the parking trajectory acquisition device obtains the environmental information of the vehicle at the next moment. The environmental information at the next moment includes the second position. A second parking trajectory corresponding to the second position is constructed based on the second position and the target position; the second parking trajectory is optimized according to the preset parking constraint conditions to obtain an optimized second parking trajectory, and the optimized second parking trajectory is sent to the control system of the vehicle to trigger the control system of the vehicle to control the vehicle to travel according to the optimized second parking trajectory. The above trajectory optimization processing steps are repeated until the vehicle reaches the target position. Among them, the preset interval time period can be 100 ms.
[0049] The environmental information further includes obstacle information. The obstacle information may include the position coordinates, outer contour, etc. of the obstacle.
[0050] The step of the parking trajectory acquisition device optimizing the first parking trajectory according to the preset parking constraint conditions to obtain an optimized first parking trajectory includes: performing iterative processing on the first parking trajectory according to the preset trajectory optimization algorithm to obtain the currently iterated parking trajectory; in response to the currently iterated parking trajectory satisfying the trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint, determining the currently iterated parking trajectory as the optimized first parking trajectory.
[0051] Further, the parking trajectory acquisition device determines the currently iterated parking trajectory as the optimized first parking trajectory in response to the currently iterated parking trajectory satisfying at least one of the trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint.
[0052] The parking trajectory acquisition device iteratively processes the first parking trajectory according to a preset trajectory optimization algorithm to obtain the current iterated parking trajectory. Specifically, the preset trajectory optimization algorithm can be the ILQR (Iterative Linear Quadratic Regulator) algorithm. The parking trajectory acquisition device inputs the current position, target position, and the first parking trajectory of the vehicle into the ILQR algorithm, and iteratively optimizes the first parking trajectory through the ILQR algorithm to obtain the current iterated parking trajectory. The iterative optimization directions at least include trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint.
[0053] Further, the state transition relationship of the parking trajectory in the iterative process X(k + 1) = f(X(k), U(k)) satisfies the following kinematic formula:
[0054]
[0055] In the above formula, X(k) represents the current state quantity, X(k) = [x, y, θ, v, k], U(k) represents the current action quantity, and X(k + 1) represents the next state quantity. k and respectively represent curvature and the first derivative of curvature, a represents the longitudinal acceleration. represents the velocity component in the x-axis direction. represents the velocity component in the y-axis direction. represents the heading angle in the next state quantity. represents the velocity in the next state quantity.
[0056] The current environmental information includes obstacle information. Before the step of the parking trajectory acquisition device determining the current iterated parking trajectory as the optimized first parking trajectory in response to the current iterated parking trajectory satisfying the trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint, the method further includes: determining a trajectory constraint value according to the trajectory difference between the current iterated parking trajectory and the obtained reference trajectory; obtaining an obstacle constraint value corresponding to the current iterated parking trajectory based on the obstacle information; obtaining a steering wheel rotation speed constraint value corresponding to the current iterated parking trajectory according to the curve information of the curve where the current iterated parking trajectory is located; and determining a position constraint value according to the position difference between the trajectory end point of the current iterated parking trajectory and the trajectory end point of the reference trajectory.
[0057] Before the step of the parking trajectory acquisition device determining a trajectory constraint value according to the trajectory difference between the parking trajectory after the current iteration and the acquired reference trajectory, the method further includes: constructing a first trajectory according to the current position information of the vehicle; constructing a second trajectory according to the target position information of the vehicle; performing a matching process on the trajectory points in the first trajectory and the trajectory points in the second trajectory to obtain trajectory point pairs; constructing a third trajectory according to the trajectory point pairs; and determining a reference trajectory based on the third trajectory, the first trajectory, and the second trajectory.
[0058] The parking trajectory acquisition device constructs a first trajectory according to the current position information of the vehicle. Specifically, the parking trajectory acquisition device acquires a first turning radius and constructs a first trajectory according to the current position of the vehicle and the first turning radius. As an example, the parking trajectory acquisition device determines the reciprocal of the curvature of the curve where the current position point of the vehicle is located as the first turning radius; starting from the current position of the vehicle, a curve is drawn according to the first turning radius, and this curve is determined as the first trajectory. As another example, the parking trajectory acquisition device acquires the tangent value of the front wheel angle of the vehicle; determines the ratio between the wheelbase of the vehicle and the tangent value as the first turning radius; starting from the current position of the vehicle, a first trajectory is drawn according to the first turning radius.
[0059] Among them, the front wheel angle and curvature of the vehicle satisfy the following formula:
[0060] kappa = 1 / R = tan(δ f ) / L
[0061] In the above formula, kappa represents curvature, R represents the radius of curvature, δ f represents the front wheel angle of the vehicle, and L represents the wheelbase of the vehicle.
[0062] In an embodiment, the vehicle model is as Figure 2 shown. In the XOY coordinate, (x, y) is the current position coordinate of the vehicle, θ is the heading angle, v is the vehicle speed, δ f is the front wheel angle of the vehicle, L is the wheelbase of the vehicle, point O` is the instantaneous center of rotation of the vehicle, and R is the radius of curvature.
[0063] The parking trajectory acquisition device constructs a second trajectory according to the target position information of the vehicle. The parking trajectory acquisition device starts from the target position of the vehicle and draws a second trajectory according to a second preset turning radius, where the distance between the trajectory end point of the first trajectory and the trajectory start point of the second trajectory is the shortest distance between the first trajectory and the second trajectory. The second preset turning radius can be the minimum turning radius of the vehicle.
[0064] The parking trajectory acquisition device performs a matching process on the trajectory points in the first trajectory and the trajectory points in the second trajectory to obtain trajectory point pairs. Specifically, the parking trajectory acquisition device uses the starting point of the first trajectory as the search starting point, and obtains multiple first trajectory points on the first trajectory at preset search step intervals; uses the ending point of the second trajectory as the search starting point, and obtains multiple second trajectory points on the second trajectory at preset search step intervals; selects a first matching trajectory point from the multiple first trajectory points, and selects a second matching trajectory point from the multiple second trajectory points. The search step between the first matching trajectory point and the search starting point of the first trajectory is the same as the search step between the second matching trajectory point and the search starting point of the second trajectory. Thus, by searching the first trajectory and the second trajectory, trajectory point pairs are obtained, realizing a double-pointer search, solving problems such as curvature overrun and collision easily caused by fixed-form trajectories, and at the same time being beneficial to improving the flexibility of the trajectory.
[0065] Among them, the point coordinates (P x , P y ) in the trajectory point pair satisfy the following formula:
[0066] [P x , P y = [x r , y r + R·[cosα, sinα]
[0067]
[0068] In the above formula, P x represents the abscissa of the point in the trajectory point pair, P y represents the ordinate of the point in the trajectory point pair, x r represents the abscissa of the center of the arc where the trajectory is located, y r represents the ordinate of the center of the arc where the trajectory is located, α represents the angle from the search starting point to the origin, and sgn represents the sign function.
[0069] The parking trajectory acquisition device constructs a third trajectory according to the trajectory point pairs. Specifically, the parking trajectory acquisition device obtains the coefficients in the trajectory point polynomial algorithm according to multiple trajectory point pairs, calculates the trajectory point polynomial algorithm after obtaining the coefficients, obtains a third trajectory point, repeats the above steps, obtains at least three third trajectory points, draws a curve according to the at least three third trajectory points, and uses this curve as the third trajectory. By obtaining the third trajectory points through the trajectory point polynomial algorithm and then obtaining the third trajectory, compared with using two tangent arcs to construct the S-shaped trajectory in the prior art, this embodiment is beneficial to ensuring continuous curvature and strong controllability of the motion state.
[0070] Among them, the trajectory point polynomial algorithm can be the following formula:
[0071]
[0072] In the above formula, x represents the abscissa of the trajectory point, y represents the ordinate of the trajectory point, y' represents the first derivative of the ordinate of the trajectory point, y'' represents the second derivative of the ordinate of the trajectory point, a represents the first coefficient, b represents the second coefficient, c represents the third coefficient, d` represents the fourth coefficient, e represents the fifth coefficient, f represents the sixth coefficient, and θ represents the heading angle of the center of the rear axle of the vehicle.
[0073] The steps for the parking trajectory acquisition device to determine the reference trajectory based on the third trajectory, the first trajectory, and the second trajectory include: connecting the first trajectory and the second trajectory through the third trajectory to obtain an alternative trajectory; in response to the alternative trajectory satisfying the kinematic constraints, performing dilation processing on the alternative trajectory to obtain the dilated trajectory; determining whether the position coordinates of the obstacle are outside the dilated trajectory; if so, determining the alternative trajectory as the reference trajectory.
[0074] Before the step of the parking trajectory acquisition device performing dilation processing on the alternative trajectory to obtain the dilated trajectory in response to the alternative trajectory satisfying the kinematic constraints, it further includes: obtaining the curvature of each trajectory point in the alternative trajectory, and in response to the curvature of each trajectory point in the alternative trajectory being less than a preset curvature threshold, determining that the alternative trajectory satisfies the kinematic constraints, otherwise it does not. Wherein, the preset curvature threshold can be the maximum kinematic curvature.
[0075] Further, if the parking trajectory acquisition device determines that the alternative trajectory does not meet the requirements in response to the alternative trajectory not satisfying the kinematic constraints or the position coordinates of the obstacle being inside the dilated trajectory, new trajectory points are selected and the above steps of constructing the third trajectory according to the trajectory points and determining the reference trajectory based on the third trajectory, the first trajectory, and the second trajectory are repeated until the reference trajectory is obtained.
[0076] In one embodiment, as Figure 3As shown, point A1 is the current position of the vehicle, and point B1 is the target position of the vehicle. In response to the ordinate of the target position being greater than the ordinate of the current position, after increasing the ordinate of the current position by the first turning radius, the center point K3 of the arc where the first trajectory is located is obtained. With K3 as the center point and the first turning radius as the radius, starting from the current position, a section of arc is drawn, and the obtained arc 1 is determined as the first trajectory, and the end point of the first trajectory is point A6. After decreasing the ordinate of the target position by the second preset turning radius, the center point N3 of the arc where the second trajectory is located is obtained. With N3 as the center point and the second preset turning radius as the radius, starting from the target position, a section of arc is drawn, and the obtained arc 2 is determined as the second trajectory, and the end point of the second trajectory is point B6. Then, the parking trajectory acquisition device searches the first trajectory and the second trajectory respectively with point A1 and point B1 as the search starting points according to the search step s, and obtains the first trajectory points A2, A3, A3, A5 on the first trajectory and the second trajectory points B2, B3, B3, B5 on the second trajectory. Matching processing is performed on multiple first trajectory points and multiple second trajectory points to obtain multiple trajectory point pairs, and the trajectory point pairs can be expressed as [A g , B h , where g and h can be 1, 2, 3, 4, 5, and 6. Substitute at least three trajectory point pairs into the trajectory point polynomial algorithm for calculation to obtain a set of polynomial algorithm coefficients; substitute the set of polynomial algorithm coefficients into the trajectory point polynomial algorithm for calculation to obtain a third trajectory point. Perform the above steps and calculate the trajectory point polynomial algorithm at least three times to obtain at least three third trajectory points. Draw a smooth curve based on the three trajectory points to obtain a polynomial curve, and determine the polynomial curve as the third trajectory. Connect the first trajectory and the second trajectory through the third trajectory to obtain an alternative trajectory. As shown in Figure 4 , in response to the alternative trajectory satisfying the kinematic constraints, the vehicle is simulated as a rectangle constructed by the vehicle length and vehicle width, and the contour feature points of the rectangle when the vehicle runs on the alternative trajectory are obtained. According to the distance and angle between adjacent points, inner broken lines and outer broken lines are constructed to form a circumscribed polygon, that is, the expanded trajectory is obtained. Determine whether the position coordinates of each obstacle are outside the circumscribed polygon; if so, determine that the alternative trajectory meets the collision detection requirements, and determine the alternative trajectory as the reference trajectory. If not, determine that the alternative trajectory does not meet the expansion detection requirements, and re-determine a new alternative trajectory in the above manner of determining the alternative trajectory.
[0077] Before the step of the parking trajectory acquisition device determining the trajectory constraint value according to the trajectory difference between the current iterated parking trajectory and the obtained reference trajectory, the method further includes: constructing a parking environment model and constructing a reference trajectory based on the parking environment model.
[0078] The parking trajectory acquisition device constructs a parking environment model. Specifically, the parking trajectory acquisition device collects environmental information in the area where the vehicle is located. The environmental information includes obstacles, parking spaces, and the vehicle position. Based on the environmental information, an environmental model in a two-dimensional coordinate system is constructed to obtain the parking environment model.
[0079] In one embodiment, the parking trajectory acquisition device collects environmental information through sensors. The environmental information includes parking spaces, the target vehicle, stationary obstacles, and dynamic obstacles. Among them, the sensors can include a fisheye sensor, an ultrasonic sensor, a vision sensor, etc. The stationary obstacles can include columns, stationary obstacle vehicles, etc., and the dynamic obstacles can include low-speed traffic participants, such as low-speed vehicles, pedestrians, etc. The parking trajectory acquisition device plots the stationary obstacles as 2d line segments (Segment2d, two-dimensional line segments) in a two-dimensional coordinate system according to their sizes and positions, and plots the dynamic obstacles as rectangles in the two-dimensional coordinate system according to their activity ranges. For example, for static obstacles such as walls and curbs, scattered points are fused and output to represent the walls and curbs, and the scattered points are connected into line segments as constraints for the planning system. For static obstacles such as columns and stationary vehicles, their outer contours are abstracted into a form of a line segment set. For a parallel parking space with length L` and width W`, the four corner points can be represented as CDEF. Then the parking space constraint lines are DE, EF, FC, and CD is the vehicle entry direction without obstacle avoidance constraints.
[0080] The steps for the parking trajectory acquisition device to determine the trajectory constraint value according to the trajectory difference between the parking trajectory after the current iteration and the obtained reference trajectory include: obtaining the square terms of the distances from each trajectory point in the parking trajectory after the current iteration to the reference trajectory; obtaining the first product terms between each square term of the distance and the preset trajectory cost weight; and determining the sum of each first product term as the trajectory constraint value.
[0081] Among them, the reference trajectory is as Figure 5 shown, P i and P i+1 are points on the reference trajectory P, S k is the k-th trajectory point in the parking trajectory after the current iteration, is 's unit normal vector. Then the distance from the k-th trajectory point in the parking trajectory after the current iteration to the reference trajectory satisfies the following formula:
[0082]
[0083] In the above formula, dis(s k ,P) represents the distance from the k-th trajectory point in the parking trajectory after the current iteration to the reference trajectory. Among them, S kIt can also be the state quantity at the Kth step of the current iteration of the ILQR algorithm, which is the optimization result of the previous iteration. Specifically, it can be to solve the optimal action u* based on backward (reverse), and then obtain a new state sequence [s0,......,sn] through forward simulation based on the optimal action. When the vehicle is cold-started, that is, at the 0th iteration, there is no optimal solution for the previous iteration, then the trajectory of the previous frame in the previous cycle is used as the input of the state-action series [S, U].
[0084] The square term of each distance, the preset trajectory cost weight, and the first product term satisfy the following formula:
[0085]
[0086] In the above formula, g rel (s k ,u k ) represents the first product term, and ω rel represents the preset trajectory cost weight.
[0087] The steps for the parking trajectory acquisition device to obtain the obstacle constraint value corresponding to the parking trajectory after the current iteration based on the obstacle information include: obtaining the distance between each obstacle and the parking trajectory after the current iteration according to the obstacle information; obtaining the difference between the distance and the preset safety distance threshold; obtaining the second product term of the square term of the difference and the preset weight threshold; and determining the sum of the second product terms as the obstacle constraint value.
[0088] The parking trajectory acquisition device obtains the distance between each obstacle and the parking trajectory after the current iteration according to the obstacle information. Specifically, when the vehicle is on the parking trajectory after the current iteration, the parking trajectory acquisition device uses a kd_tree (K-Dimensional Tree, k-dimensional tree) or a brute-force search method to search for obstacles centered on the vehicle, obtains the shortest distance between the found obstacles and the vehicle center, and determines the shortest distance as the distance between each obstacle and the parking trajectory after the current iteration.
[0089] For example, the obstacle constraint value satisfies the following formula:
[0090]
[0091] In the above formula, g collision (s k ,u k ) represents the obstacle constraint value, ω represents the preset weight threshold, dis represents the distance between obstacle i and the parking trajectory after the current iteration, and the value range of i is between [0, M], and buffer jCharacterize the j-th preset safety distance threshold, where the value range of j is between [0, Q]. Among them, when the vehicle is on the parking trajectory after the current iteration, the vehicle can be represented as a three-circle model as shown in Figure 6 The distance dis from the center of the middle circle to the obstacle i. The preset safety distance can be the sum of the circle radius and the preset distance. The preset distances corresponding to the circles can be the same or different. If the preset distances for the same circle are different, the preset safety distances are different, so that the obstacle avoidance intensity can be controlled.
[0092] Combined with Figure 6 As shown, l represents the vehicle body length, w represents the vehicle body width, d is the distance between the two circle centers, r represents the circle radius, and n represents the number of circles.
[0093] It should be noted that a non-zero value is assigned to the obstacle constraint value only when dis - buffer < 0, and when dis - buffer ≥ 0, the obstacle constraint value is 0.
[0094] The curve information includes curvature. The steps for the parking trajectory acquisition device to obtain the steering wheel speed constraint value corresponding to the parking trajectory after the current iteration according to the curve information of the curve where the parking trajectory after the current iteration is located include: obtaining the square term of the first derivative of the curvature of the curve where the parking trajectory after the current iteration is located; determining the third product term between the square term of the first derivative of the curvature and the preset speed weight as the steering wheel speed constraint value.
[0095] For example, the steering wheel speed constraint value, the first derivative of the curvature, and the preset speed weight satisfy the following formula:
[0096]
[0097] In the above formula, g dkappa (s k , u k ) represents the steering wheel speed constraint value, ω dkappa represents the preset speed weight, represents the first derivative of the curvature.
[0098] The steps for the parking trajectory acquisition device to determine the position constraint value according to the position difference between the trajectory end point of the parking trajectory after the current iteration of the vehicle and the trajectory end point of the reference trajectory include: obtaining the coordinate difference between the trajectory end point coordinates of the parking trajectory after the current iteration and the trajectory end point coordinates of the reference trajectory; determining the fourth product term between the square term of the coordinate difference and the preset position weight as the position constraint value.
[0099] For example, the preset position weight can include a first preset position weight and a second preset position weight. The first preset position weight, the second preset position weight, and the position constraint value satisfy the following formula:
[0100]
[0101] In the above formula, g end (S k , U k ) represents the position constraint value, ω` represents the first preset position weight, and x e , y e , θ e respectively represent the abscissa, ordinate, and heading angle of the trajectory end point of the parking trajectory after the current iteration, and x target , y target and θ target respectively represent the abscissa, ordinate, and heading angle of the trajectory end point of the reference trajectory, and T represents the second preset position weight.
[0102] The parking trajectory acquisition device optimizes the first parking trajectory according to the preset parking constraint conditions. The optimized first parking trajectory may further include: optimizing the first parking trajectory according to the obtained boundary constraint value, and the smaller the boundary constraint value, the better the optimization effect.
[0103] For example, the boundary constraint value satisfies the following formula:
[0104]
[0105] In the above formula, β(g(x, u)) represents the boundary constraint value, and g(x, u) represents a generic function, which has different structures for different constraint values. For example, when restricting the curvature kappa to be between [kappa_min, kappa_max], g(x, u) can be expressed as (kappa - kappa_max).
[0106] Figure 7 is a block diagram of the parking trajectory acquisition device shown in an exemplary embodiment of the present application. As Figure 7 shown, the exemplary parking trajectory acquisition device 700 includes: an acquisition module 710, a construction module 720, and an optimization module 730. Specifically:
[0107] The acquisition module 710 is configured to acquire the current environment information, where the current environment information includes the first position of the vehicle and the target position of the vehicle, and the first position represents the current position of the vehicle.
[0108] The construction module 720 is configured to construct a first parking trajectory corresponding to the first position according to the first position and the target position.
[0109] The optimization module 730 is configured to optimize the first parking trajectory according to the preset parking constraint conditions to obtain an optimized first parking trajectory, and the preset parking constraint conditions include trajectory constraints, obstacle constraints, steering wheel rotation speed constraints, and position constraints.
[0110] In the exemplary parking trajectory acquisition device, current environmental information is acquired. The current environmental information includes the first position of the vehicle and the target position of the vehicle. The first position represents the current position of the vehicle. A first parking trajectory corresponding to the first position is constructed based on the first position and the target position. The first parking trajectory is optimized according to preset parking constraint conditions, and the optimized first parking trajectory is obtained. The preset parking constraint conditions include trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint. Thus, by using the trajectory constraint, obstacle constraint, steering wheel rotation speed constraint, and position constraint to optimize the first parking trajectory, the accuracy of the first parking trajectory can be improved, thereby improving the accuracy of parking.
[0111] Among them, the functions of each module can be referred to in the embodiments of the parking trajectory acquisition method, which will not be elaborated here.
[0112] To implement the parking trajectory acquisition method of the above embodiments, the present application proposes another electronic device. For details, please refer to Figure 8 , Figure 8 is a schematic structural diagram of an embodiment of the electronic device provided by the present application.
[0113] The electronic device 800 includes a memory 801 and a processor 802. Among them, the memory 801 and the processor 802 are coupled.
[0114] The memory 801 is used to store program data, and the processor 802 is used to execute the program data to implement the parking trajectory acquisition method of the above embodiments.
[0115] In this embodiment, the processor 802 can also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 802 may be an integrated circuit chip with signal processing capabilities. The processor 802 may also be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field-programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor, or the processor 802 may also be any conventional processor, etc.
[0116] The present application also provides a computer-readable storage medium, as Figure 9 shown, the computer-readable storage medium 900 is used to store program data 901. When the program data 901 is executed by the processor, it is used to implement the parking trajectory acquisition method in the method embodiments of the present application.
[0117] In the embodiments of the parking trajectory acquisition method of this application, when the method involved exists in the form of a software functional unit and is sold or used as an independent product, it can be stored in a device, such as a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.
[0118] The above are only the embodiments of this application, and do not limit the patent scope of this application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of this application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of this application.
Claims
1. A parking trajectory acquisition method, characterized in that: Applied to a vehicle, the method comprises: Acquire current environment information, the current environment information including a first position of the vehicle and a target position of the vehicle, the first position representing a current position of the vehicle; constructing a first parking trajectory corresponding to the first position according to the first position and the target position; The first parking trajectory is optimized according to preset parking constraints to obtain an optimized first parking trajectory, wherein the preset parking constraints include trajectory constraints, obstacle constraints, steering wheel speed constraints, and position constraints.
2. The parking trajectory acquisition method according to claim 1, characterized in that: After the step of optimizing the first parking trajectory according to the preset parking constraint conditions to obtain the optimized first parking trajectory, the method further includes: Controlling the vehicle to move according to the optimized first parking trajectory until the vehicle reaches a second position; In response to the second position being the same as the target position, parking is stopped.
3. The parking trajectory acquisition method according to claim 2, characterized in that: After the step of optimizing the first parking trajectory according to the preset parking constraint conditions to obtain the optimized first parking trajectory, the method further includes: In response to the second position being different from the target position, constructing a second parking trajectory corresponding to the second position according to the second position and the target position; Optimizing the second parking trajectory according to the preset parking constraint condition to obtain an optimized second parking trajectory; Controlling the vehicle to move according to the optimized second parking trajectory until the vehicle reaches a third position; In response to the third position being the same as the target position, parking is stopped.
4. The parking trajectory acquisition method according to claim 1, characterized in that: The step of optimizing the first parking trajectory according to the preset parking constraint condition to obtain the optimized first parking trajectory comprises: Iteratively processing the first parking trajectory according to a preset trajectory optimization algorithm to obtain a parking trajectory after current iteration; In response to the current iterative parking trajectory satisfying the trajectory constraint, the obstacle constraint, the steering wheel speed constraint, and the position constraint, the current iterative parking trajectory is determined as the optimized first parking trajectory.
5. The parking trajectory acquisition method according to claim 4, characterized in that: The current environment information includes obstacle information. In response to the parking trajectory after the current iteration satisfying the trajectory constraint, the obstacle constraint, the steering wheel speed constraint, and the position constraint, before determining the parking trajectory after the current iteration as the optimized first parking trajectory, the method further includes: Determining a trajectory constraint value according to a trajectory difference between the parking trajectory after the current iteration and the acquired reference trajectory; Obtaining an obstacle constraint value corresponding to the currently iterated parking trajectory based on the obstacle information; Obtaining a steering wheel speed constraint value corresponding to the parking trajectory after the current iteration according to curve information of the curve where the parking trajectory after the current iteration is located; A position constraint value is determined according to a position difference between a trajectory end point of the current iterated parking trajectory and a trajectory end point of the reference trajectory.
6. The parking trajectory acquisition method according to claim 5, characterized in that: The step of determining the trajectory constraint value according to the trajectory difference between the current iterative parking trajectory and the acquired reference trajectory comprises: Obtaining the square term of the distance between each trajectory point in the current iterated parking trajectory and the reference trajectory; Obtaining the first product term between the square term of each distance and the preset trajectory cost weight; The sum of the first product terms is determined as the trajectory constraint value.
7. The parking trajectory acquisition method according to claim 5, characterized in that: The step of acquiring the obstacle constraint value corresponding to the currently iterated parking trajectory based on the obstacle information includes: Acquire the distance between each obstacle and the parking trajectory after the current iteration according to the obstacle information; Obtaining a difference between the distance and a preset safety distance threshold; Obtain a second product term of the square term of the difference and a preset weight threshold; The sum of the second product terms is determined as the obstacle constraint value.
8. The parking trajectory acquisition method according to claim 5, characterized in that: The curve information includes curvature, and the step of obtaining the steering wheel speed constraint value corresponding to the parking trajectory after the current iteration according to the curve information of the curve where the parking trajectory after the current iteration is located includes: Obtaining the square term of the first-order derivative of the curvature of the curve where the parking trajectory after the current iteration is located; A third product term between the square term of the first-order derivative of curvature and a preset rotation speed weight is determined as the steering wheel rotation speed constraint value.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: include: Program data is stored, and when the program data is executed by a processor, it is used to implement the method according to any one of claims 1 to 8.
Citation Information
Cited By
Parking control method, device, equipment and medium
CN120773726A