A method of planning a parking trajectory and related apparatus
By using transition curves to connect straight lines and arcs in automatic parking, the problem of sudden curvature changes is solved, the accuracy of the parking trajectory and user experience are improved, and the safety and accuracy of the parking process are ensured.
Patent Information
- Application Number
- CN202311477322.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-07
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2043-11-07
AI Technical Summary
In existing automatic parking technology, there is a sudden change in curvature at the junction of straight lines and arcs, which affects the user's riding experience and trajectory accuracy.
By using transition curves to connect straight lines and arcs, the curvature continuity of the parking trajectory is ensured, and the curvature of the transition curve changes continuously with the length to eliminate the problem of curvature mutation.
The accuracy of parking trajectory and user experience are improved, ensuring the safety and accuracy of the vehicle during the parking process.
Smart Images

Figure CN118269943B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic parking, and in particular to a method for planning a parking trajectory and a related device. BACKGROUND
[0002] In automatic parking, planning a parking trajectory mainly includes determining a starting position and a target position of parking according to a parking space size and a parking position of a vehicle. Meanwhile, a drivable trajectory connecting the starting position and the target position is planned by considering constraints such as vehicle collision and vehicle kinematics.
[0003] In existing solutions, a geometric method of "straight line + circular arc" is usually used for trajectory planning. Since there is a sudden change in curvature at the joint of the straight line and the circular arc, if the vehicle parks and turns the steering wheel at the joint of the straight line and the circular arc, the user's ride experience will be affected. If the vehicle drives and turns the steering wheel at the joint of the straight line and the circular arc, the actual trajectory of the vehicle will deviate from the planned trajectory, thereby sacrificing the accuracy of vehicle trajectory tracking. SUMMARY
[0004] Embodiments of the present application provide a method for planning a parking trajectory and a related device, which generates a parking trajectory by geometric transformation of a transition curve, so as to ensure the continuity of the curvature of the parking trajectory and improve the user's parking experience.
[0005] In a first aspect, embodiments of the present application provide a method for planning a parking trajectory, which includes:
[0006] obtaining a position of a vehicle outside a parking space and a position of the vehicle inside the parking space, wherein the parking space is an area where the vehicle parks in or parks out;
[0007] determining a target parking trajectory of the vehicle according to the position of the vehicle outside the parking space and the position of the vehicle inside the parking space, wherein a shape of the target parking trajectory includes a transition curve, a straight line and a circular arc, the transition curve is used to connect the straight line and the circular arc, the curvature of the transition curve continuously changes with the length of the transition curve, and the vehicle is used to park in or park out the parking space according to the target parking trajectory.
[0008] In the above method, the positions of the vehicle outside the parking space and inside the parking space are obtained to determine the starting position and the target position in the parking process, the feasibility of parking into and out of the parking space is considered, and the accuracy and safety of parking can be improved. According to the characteristic that the curvature of any point on the transition curve is continuous, the target parking trajectory is determined by the transition curve, the straight line and the circular arc, which can ensure the continuity of the curvature of the target parking trajectory. Unlike the existing scheme, a complex function is used to fit the parking trajectory curve to eliminate the curvature discontinuity at the connection points of the circular arc and the straight line. The transition curve used in the present application is simpler to connect the straight line and the circular arc, and improves the real-time performance of determining the parking trajectory and the usability in actual engineering.
[0009] In an optional scheme of the first aspect, the curvature of the first end point of the transition curve for connecting the straight line is the same as the curvature of the straight line, and the curvature of the second end point of the transition curve for connecting the circular arc is the same as the curvature of the circular arc.
[0010] In the above method, the curvature of the first end point of the transition curve for connecting the straight line is the same as the curvature of the straight line, and the curvature of the second end point of the transition curve for connecting the circular arc is the same as the curvature of the circular arc. This can make the obtained parking trajectory more suitable for the characteristics of the vehicle itself, and improve the accuracy of the parking trajectory.
[0011] In an optional scheme of the first aspect, the length of the transition curve is determined by the difference between the curvature of the first end point and the curvature of the second end point, wherein the greater the difference, the longer the length of the transition curve.
[0012] In the above method, the length of the transition curve is determined according to the difference between the curvature of the first end point and the curvature of the second end point, that is, the difference between the curvature of the straight line connected by the first end point and the curvature of the circular arc connected by the second end point. In this way, after the transition curve connects the straight line and the circular arc, the curvature of the determined parking trajectory can be continuous.
[0013] In an optional scheme of the first aspect, the number of transition curves is equal to the number of splicing end point pairs, wherein the splicing end point pairs include the end points of the transition curve connected with the straight line and the end points of the transition curve connected with the circular arc. In the above method, the number of transition curves is equal to the number of splicing end point pairs, without complex mathematical calculations, the number of transition curves can be determined according to the number of splicing end point pairs. This can solve the problem of curvature discontinuity at the connection points of the circular arc and the straight line, and improve the user's parking experience.
[0014] In an optional implementation of the first aspect, the circular arc includes a first circular arc and a second circular arc, the first circular arc is a circular arc inside the parking space, and the second circular arc is a circular arc outside the parking space; and the transition curve includes a first transition curve, a second transition curve, and a third transition curve.
[0015] The first transition curve is determined by the first circular arc, and the second transition curve and the third transition curve are determined by the second circular arc.
[0016] In the method, the circular arc of the parking trajectory includes a circular arc inside the parking space and a circular arc outside the parking space, the first transition curve is determined according to the circular arc inside the parking space, and the second transition curve and the third transition curve are determined according to the circular arc outside the parking space, so that the determined first transition curve, second transition curve, and third transition curve meet the actual requirements of vehicle parking.
[0017] In an optional implementation of the first aspect, the straight line includes a first straight line and a second straight line, wherein,
[0018] The first transition curve is used to connect the first circular arc and the first straight line.
[0019] The second transition curve is used to connect the first straight line and the second circular arc.
[0020] The third transition curve is used to connect the second circular arc and the second straight line.
[0021] In the method, the first transition curve connects the first circular arc and the first straight line, the second transition curve connects the first straight line and the second circular arc, and the third transition curve connects the second circular arc and the second straight line, so that the curvature of the parking trajectory including the first circular arc, the second circular arc, the first straight line, and the second straight line is continuous.
[0022] In an optional implementation of the first aspect, the first transition curve is determined according to the curvature of the first circular arc and the curvature of the first straight line, the maximum curvature of the first transition curve is the curvature of the first circular arc, and the minimum curvature of the first transition curve is the curvature of the first straight line.
[0023] In the method, the curvature of the first transition curve is determined according to the curvature of the first circular arc and the curvature of the first straight line. Specifically, the maximum curvature of the first transition curve is the curvature of the first circular arc, and the minimum curvature of the first transition curve is the curvature of the first straight line. The first transition curve can be used to eliminate the sudden change of the curvature between the first circular arc and the first straight line, and the vehicle can park according to the parking trajectory determined by the first circular arc, the first transition curve, and the first straight line without stopping and turning the steering wheel again, thereby improving the user's parking experience.
[0024] In an optional implementation of the first aspect, the second transition curve is determined according to the curvature of the second circular arc and the curvature of the first straight line, the maximum curvature of the second transition curve is the curvature of the second circular arc, and the minimum curvature of the second transition curve is the curvature of the first straight line.
[0025] In the method, the curvature of the second transition curve can be determined according to the curvature of the second circular arc and the curvature of the first straight line. Specifically, the maximum curvature of the second transition curve is the curvature of the second circular arc, and the minimum curvature of the second transition curve is the curvature of the first straight line. The second transition curve can be used to eliminate the abrupt change of the curvature between the second circular arc and the first straight line. The vehicle parks according to the parking trajectory determined according to the second circular arc, the second transition curve, and the first straight line, without stopping and turning the steering wheel again, thereby improving the user's parking experience.
[0026] In an optional implementation of the first aspect, the third transition curve is determined according to the curvature of the second circular arc and the curvature of the second straight line, the maximum curvature of the third transition curve is the curvature of the second circular arc, and the minimum curvature of the third transition curve is the curvature of the second straight line.
[0027] In the method, the curvature of the third transition curve can be determined according to the curvature of the second circular arc and the curvature of the second straight line. Specifically, the maximum curvature of the third transition curve is the curvature of the second circular arc, and the minimum curvature of the third transition curve is the curvature of the second straight line. The third transition curve can be used to eliminate the abrupt change of the curvature between the second circular arc and the second straight line. The vehicle parks according to the parking trajectory determined according to the second circular arc, the third transition curve, and the second straight line, without stopping and turning the steering wheel again, thereby improving the user's parking experience.
[0028] In an optional implementation of the first aspect, the radius of the first circular arc is the minimum turning radius of the vehicle, and the minimum central angle of the first circular arc is related to the position of the vehicle in the parking space.
[0029] In the method, since the first circular arc is a circular arc in the parking space, if the radius of the first circular arc is the minimum turning radius of the vehicle, the trajectory formed by the vehicle in the parking space due to turning is also the minimum. The safety of the vehicle during parking into and out of the parking space can be ensured.
[0030] In an optional implementation of the first aspect, the radius of the second circular arc is greater than or equal to the minimum turning radius of the vehicle and less than or equal to twice the minimum turning radius, the central angle of the second circular arc is related to the first circular arc, the second transition curve, the third transition curve, and the second straight line, and the second straight line is related to the position of the vehicle outside the parking space.
[0031] In the method, the radius of the second circular arc can be greater than or equal to the minimum turning radius of the vehicle, so as to ensure the accuracy and reliability of the parking trajectory in the case that the angle of the vehicle parked at the position outside the parking space is not parallel to the parking space.
[0032] In an optional implementation of the first aspect, the method further includes:
[0033] determining a plurality of parking trajectories by sampling the central angle of the first circular arc and the radius of the second circular arc;
[0034] selecting a target parking trajectory from the plurality of parking trajectories according to the feasible parking area of the vehicle.
[0035] In the method, the plurality of parking trajectories are determined by sampling, and the target parking trajectory is determined by selecting from the plurality of parking trajectories according to the feasible parking area, so that the target parking trajectory determined is optimal and meets the requirement of the feasible parking area.
[0036] In the second aspect, an embodiment of the present application provides a device for planning a parking trajectory, and the device includes:
[0037] a communication unit configured to acquire a position of a vehicle outside a parking space and a position of the vehicle inside the parking space, wherein the parking space is an area for parking in or parking out of the vehicle;
[0038] a processing unit configured to determine a target parking trajectory of the vehicle according to the position of the vehicle outside the parking space and the position of the vehicle inside the parking space, wherein a shape of the target parking trajectory includes a transition curve, a straight line and a circular arc, the transition curve is used to connect the straight line and the circular arc, the curvature of the transition curve continuously changes with the length of the transition curve, and the vehicle is used to park in or park out of the parking space according to the target parking trajectory.
[0039] In an optional implementation of the second aspect, the curvature of a first end point of the transition curve used to connect the straight line is the same as the curvature of the straight line, and the curvature of a second end point of the transition curve used to connect the circular arc is the same as the curvature of the circular arc.
[0040] In an optional implementation of the second aspect, the length of the transition curve is determined by a difference between the curvature of the first end point and the curvature of the second end point, wherein the greater the difference is, the longer the length of the transition curve is.
[0041] In an optional implementation of the second aspect, the number of the transition curves is equal to the number of splicing end point pairs, wherein the splicing end point pairs include an end point of the transition curve connected with the straight line and an end point of the transition curve connected with the circular arc.
[0042] In an optional implementation of the second aspect, the arc includes a first arc and a second arc, the first arc is an arc within the parking space, and the second arc is an arc outside the parking space, and the transition curve includes a first transition curve, a second transition curve, and a third transition curve.
[0043] The first transition curve is determined by the first arc, and the second transition curve and the third transition curve are determined by the second arc.
[0044] In an optional implementation of the second aspect, the straight line includes a first straight line and a second straight line, wherein,
[0045] The first transition curve is used to connect the first arc and the first straight line.
[0046] The second transition curve is used to connect the first straight line and the second arc.
[0047] The third transition curve is used to connect the second arc and the second straight line.
[0048] In an optional implementation of the second aspect, the first transition curve is determined according to the curvature of the first arc and the curvature of the first straight line, the maximum curvature of the first transition curve is the curvature of the first arc, and the minimum curvature of the first transition curve is the curvature of the first straight line.
[0049] In an optional implementation of the second aspect, the second transition curve is determined according to the curvature of the second arc and the curvature of the first straight line, the maximum curvature of the second transition curve is the curvature of the second arc, and the minimum curvature of the second transition curve is the curvature of the first straight line.
[0050] In an optional implementation of the second aspect, the third transition curve is determined according to the curvature of the second arc and the curvature of the second straight line, the maximum curvature of the third transition curve is the curvature of the second arc, and the minimum curvature of the third transition curve is the curvature of the second straight line.
[0051] In an optional implementation of the second aspect, the radius of the first arc is the minimum turning radius of the vehicle, and the minimum central angle of the first arc is related to the position of the vehicle within the parking space.
[0052] In an optional implementation of the second aspect, a radius of the second circular arc is greater than or equal to a minimum turning radius of the vehicle and less than or equal to twice the minimum turning radius, and a central angle of the second circular arc is related to the first circular arc, the second transition curve, the third transition curve, and the second straight line, the second straight line being related to a position of the vehicle outside the parking space.
[0053] In an optional implementation of the second aspect, the method further includes:
[0054] a processing unit configured to determine a plurality of parking trajectories by sampling a central angle of the first circular arc and a radius of the second circular arc;
[0055] a processing unit configured to determine a target parking trajectory by screening the plurality of parking trajectories according to a feasible parking area of the vehicle.
[0056] In a third aspect, an embodiment of the present application provides a vehicle, including a processor and a memory, the processor being coupled to the memory, the memory being configured to store a computer program, and the processor being configured to invoke and run the computer program, so that the vehicle performs the method described in any one of the preceding first aspect.
[0057] In a fourth aspect, an embodiment of the present application provides a computing device, including a processor and a memory, the processor being coupled to the memory, the memory being configured to store a computer program, and the processor being configured to invoke and run the computer program, so that the computing device performs the method described in any one of the preceding first aspect.
[0058] Optionally, the computing device further includes a communication interface configured to receive and / or send data, and / or the communication interface is configured to provide input and / or output for the processor.
[0059] It should be noted that the above embodiments are described by taking a processor (or general-purpose processor) that invokes a computer program to perform a method as an example. In a specific implementation process, the processor can also be a special-purpose processor, and the computer program is preloaded in the processor. Optionally, the processor can include both a special-purpose processor and a general-purpose processor.
[0060] Optionally, the processor and the memory can also be integrated into one device, that is, the processor and the memory can also be integrated together.
[0061] In a fifth aspect, an embodiment of the present application provides a computer readable storage medium, the computer readable storage medium storing a computer program, and when the computer program runs on a computer or a processor, the method described in any one of the preceding first aspect is implemented.
[0062] The technical solutions provided by the second to fifth aspects of the present application have the beneficial effects of the technical solutions of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS
[0063] The drawings used in the description of the embodiments will be briefly described.
[0064] Figure 1 is a schematic diagram of the architecture of a vehicle provided by an embodiment of the present application;
[0065] Figure 2 is a schematic diagram of a method for planning a parking trajectory provided by an embodiment of the present application;
[0066] Figure 3 is a schematic diagram of a feasible parking space provided by an embodiment of the present application;
[0067] Figure 4 is a schematic diagram of a parking space provided by an embodiment of the present application;
[0068] Figure 5 is a schematic diagram of a parking space provided by an embodiment of the present application;
[0069] Figure 6 is a schematic diagram of a parking trajectory provided by an embodiment of the present application;
[0070] Figure 7 is a schematic diagram of determining a first part of a parking trajectory provided by an embodiment of the present application;
[0071] Figure 8 is a schematic diagram of a transition curve and a circular arc provided by an embodiment of the present application;
[0072] Figure 9 is a schematic diagram of a transition curve and a circular arc provided by an embodiment of the present application;
[0073] Figure 10 is a schematic diagram of performing geometric transformation provided by an embodiment of the present application;
[0074] Figure 11 is a schematic diagram of determining a second part of a parking trajectory provided by an embodiment of the present application;
[0075] Figure 12 is a schematic diagram of determining a collision risk provided by an embodiment of the present application;
[0076] Figure 13 is a schematic diagram of a first simulation result provided by an embodiment of the present application;
[0077] Figure 14is a schematic diagram of a second simulation result provided by an embodiment of the present application.
[0078] Figure 15 is a schematic diagram of a third simulation result provided by an embodiment of the present application.
[0079] Figure 16 is a schematic diagram of a fourth simulation result provided by an embodiment of the present application.
[0080] Figure 17 is a block diagram of functional units of a device for planning a parking trajectory provided by an embodiment of the present application.
[0081] Figure 18 is a structural schematic diagram of a computing device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0082] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0083] The terms "first", "second", "third", and "fourth" and the like in the description and claims of the present application and the accompanying drawings are used to distinguish between similar objects, not to describe a particular sequential order. In addition, the terms "include" and "have" and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a list of steps or units is not limited to the listed steps or units, but can optionally include additional steps or units not listed or can optionally include additional steps or units inherent to such processes, methods, products, or devices.
[0084] The system architecture to which the embodiments of the present application are applied will be described below. It should be noted that the system architecture and business scenarios described in the present application are for more clearly illustrating the technical solutions of the present application, and do not constitute a limitation on the technical solutions provided by the present application. Those skilled in the art can know that, as the system architecture evolves and new business scenarios appear, the technical solutions provided by the present application are also applicable to similar technical problems.
[0085] Please refer to Figure 1 , Figure 1 is a schematic diagram of a vehicle architecture provided by an embodiment of the present application. As shown in Figure 1 , the vehicle 10 includes one or more radars and / or one or more cameras.
[0086] The vehicle 10 can be a vehicle driven by electric energy, a vehicle driven by fuel, or a vehicle driven by new energy hybrid power. For example, when the vehicle 10 is a vehicle driven by electric energy, it can be a new energy vehicle, such as a pure electric vehicle, a range-extended electric vehicle, a hybrid vehicle, a fuel cell electric vehicle, etc. When the vehicle 10 is a vehicle driven by fuel, it can be a car, an agricultural transport vehicle, a tractor, or a trailer, etc. When the vehicle 10 is a car, it can be a sedan, a SUV, a van, a bus, or a minivan, etc.
[0087] One or more radars are used to perceive the distance between the vehicle 10 and the surrounding objects during automatic parking, so as to be able to find the empty parking space more accurately. In the process of determining the parking trajectory, the vehicle 10 can determine the position of the vehicle outside the parking space and the position of the vehicle inside the parking space based on the data collected by the radar and the structural parameters of the vehicle 10 itself. Figure 1 In the embodiment, 12 radars, i.e., the radars 101 to 1012, are exemplarily provided to measure the distance in front of, behind, and on the sides of the vehicle 10.
[0088] One or more cameras are used to detect the parking space and perceive the distance between the vehicle 10 and the surrounding objects during automatic parking. In the process of determining the parking trajectory, the vehicle 10 can determine the position of the vehicle outside the parking space and the position of the vehicle inside the parking space based on the data collected by the camera and the structural parameters of the vehicle 10 itself. Figure 1 In the embodiment, the front-view camera 1013, the left-side-view camera 1014, the right-side-view camera 1015, and the rear-view camera 1016 are exemplarily provided. It can be understood that the cameras in different directions are used to monitor the situation in front of, on the left side of, on the right side of, and / or behind the vehicle 10.
[0089] Please refer to Figure 2 , Figure 2 is a method flow diagram for planning a parking trajectory provided by the embodiment of the present application, and the method is applied to a vehicle as shown in Figure 1 . As shown in Figure 2 , the method includes but is not limited to the following steps:
[0090] Step S201, obtaining the position of the vehicle outside the parking space and the position of the vehicle inside the parking space.
[0091] Specifically, first, the vehicle can monitor the surrounding environment by radar or vehicle-mounted camera before parking into or out of the parking space to determine the feasible parking space. Then the vehicle updates the theoretical feasible parking space according to the constraint conditions of the parking-in or parking-out parking space and the parking curve type to obtain the starting position and target position that meet the actual parking requirements, i.e., the position of the vehicle outside the parking space and the position of the vehicle inside the parking space. Exemplarily, in the case of parking into the parking space, the parking space is the area where the vehicle parks in, the starting position is the position outside the parking space, and the target position is the position inside the parking space. In the case of parking out of the parking space, the parking space is the area where the vehicle parks out of, the starting position is the position inside the parking space, and the target position is the position outside the parking space.
[0092] For example, refer to Figure 3 , Figure 3 is a schematic diagram of a feasible parking space provided by an embodiment of the present application. As shown in Figure 3 , the vehicle can determine the distance from the obstacle or the position of the obstacle by radar or vehicle-mounted camera, and then determine the feasible parking space according to the external dimensions of the vehicle. The feasible parking space refers to the area that can be used by the vehicle for driving or parking, and the vehicle will not collide when driving or parking in the feasible parking space. Further, if the vehicle is parking into the parking space, the minimum parking space size required by the vehicle can be determined according to the relevant parameters of the vehicle. Then, the vehicle can determine the available parking space from the feasible parking space by radar or vehicle-mounted camera, such as the parallel parking space in Figure 3 .
[0093] For example, refer to Figure 4 , Figure 4 is a schematic diagram of a parking-in parking space provided by an embodiment of the present application. As shown in Figure 4 , a local parking space coordinate system is established with the upper right corner of the parking space as the origin, the horizontal axis as the x-axis, and the vertical axis as the y-axis. The position of the vehicle outside the parking space, i.e., the starting position of the parking-in parking space, is point O. The position of the vehicle inside the parking space, i.e., the target position of the parking-in parking space, is point D. The curve between point O and point D is the planned trajectory of the vehicle parking into the parking space, which is similar to a curve composed of two circular arcs.
[0094] The heading angle of point O can be between [-15°, 15°] . This is because if the heading angle of point O is greater than 15° or less than -15°, the vehicle will not be able to park into the parking space. The heading angle of point D can be between [-15°, 15°] If the angle of the vehicle is 0°, the vehicle must be adjusted to a position completely parallel to the parking space before it can be parked. However, it is difficult for the user to adjust the vehicle to be completely parallel to the parking space. Therefore, the embodiment of the present application sets a certain slack space for the heading angle of the starting position O of the parking space. The user can adjust the angle of the parked vehicle to between [-15°, 15°], and the vehicle can plan the parking trajectory according to the embodiment of the present application. For example, the user can adjust the angle of the parked vehicle to 15° up, or adjust the angle of the parked vehicle to 15° down.
[0095] For example, when Figure 4 When the length of the parking space shown is greater than the threshold, the length of the space available for parking the vehicle is longer. The vehicle can be parked directly in the parking space, and can be parked in the middle of the parking space in a better posture without maneuvering in the parking space. Maneuvering refers to the process of the vehicle moving forward and backward to completely park the vehicle in the parking space. The above-mentioned vehicle is parked in the middle of the parking space in a better posture, which can be a posture in which the vehicle is parallel to the parking space. Therefore, when the length of the parking space is greater than the threshold, the vehicle can be parallel to the parking space at point D. Therefore, in this case, the heading angle of point D is 0.
[0096] For example, when Figure 4 When the length of the parking space shown is less than or equal to the threshold, for example, if there are other vehicles parked in front of or behind the parking space or there are other obstacles, the length of the space available for parking is short. After the vehicle is parked at point D in the parking space, it is necessary to maneuver the vehicle forward and backward to park it in the middle of the parking space in a manner parallel to the parking space. Therefore, when the length of the parking space is less than or equal to the threshold, the vehicle is not parallel to the parking space when it is parked at point D in the parking space. Therefore, in this case, the heading angle at point D is Greater than 0.
[0097] See also Figure 5 , Figure 5 This is a schematic diagram of a parking space provided by an embodiment of the present application. Figure 5 As shown in the figure, a local parking space coordinate system is established with the upper right corner of the parking space as the origin, with the horizontal axis being the x-axis and the vertical axis being the y-axis. The vehicle's position inside the parking space, i.e., the starting position for exiting the space, is point D. The vehicle's position outside the parking space, i.e., the target position for exiting the space, is point O. The curve between points D and O is the planned trajectory for the vehicle exiting the space, which resembles a curve formed by joining two arcs.
[0098] Among them, point O can be the position point of the vehicle outside the parking space, and the heading angle of point O is It can be 0. It is understandable that if the heading angle of point O is When it is 0, the vehicle can reach the target position parallel to the parking space after parking out, which is convenient for subsequent vehicles to drive.
[0099] For example, when Figure 5 When the length of the parking space shown is greater than the threshold, the length of the space available for the vehicle to park out is longer. The vehicle can park out of the parking space directly without maneuvering in the parking space, or the vehicle can drive straight back and then park out of the parking space. Maneuvering refers to the process in which the vehicle moves forward and backward so that the vehicle can park out of the parking space directly without collision. Therefore, when the length of the parking space is greater than the threshold, the vehicle can park out of the parking space at point D in a posture parallel to the parking space. Therefore, in this case, the heading angle of point D is is 0.
[0100] For example, when Figure 5 When the length of the parking space shown is less than or equal to the threshold, for example, if there are other vehicles parked in front of or behind the parking space or there are other obstacles, the length of the space available for the vehicle to park out is shorter. There is a risk of collision if the vehicle parks out of the parking space directly at point D, so it is necessary to adjust the angle between the vehicle and the parking space by moving forward and backward before it can be parked out of the parking space without collision. Therefore, when the length of the parking space is less than or equal to the threshold, the vehicle can first adjust the angle with the parking space by moving forward and backward, and then park out of the parking space at point D. Therefore, in this case, the vehicle is not parallel to the parking space at point D, and the heading angle at point D is Greater than 0.
[0101] Step S202 : determining a target parking trajectory of the vehicle based on the position of the vehicle outside the parking space and the position of the vehicle inside the parking space.
[0102] Specifically, based on the vehicle's position outside the parking space and the vehicle's position inside the parking space obtained in step S201, a multi-segment curve with continuous curvature can be determined using transition curves, straight lines, and circular arcs to serve as the vehicle's target parking trajectory. When parking into the parking space, the vehicle can park according to the target parking trajectory. When parking out of the parking space, the vehicle can park out of the space according to the target parking trajectory.
[0103] In a possible implementation, the shape of the target parking trajectory of the vehicle includes one or more of an arc, a transition curve, and a straight line.
[0104] Among them, a transition curve is a transition curve segment that connects two curve segments and satisfies certain continuity conditions at the connection point. For example, a transition curve can be a transition curve. A transition curve refers to a curve in a plane line shape, in which the curvature is continuously changed between a straight line and an arc, or between arcs. The transition curve provided in the embodiment of the present application adopts a spiral shape, and the curvature of any point in the transition curve is continuous. The transition curve is used to connect a straight line and an arc, and the curvature of the transition curve changes continuously as the length of the transition curve increases.
[0105] In a possible implementation, the curvature of the first end point of the transition curve for connecting the straight line is the same as the curvature of the straight line, and the curvature of the second end point of the transition curve for connecting the circular arc is the same as the curvature of the circular arc.
[0106] Specifically, in the prior art, the parking trajectory of the vehicle is usually a combination of a circular arc and a straight line, and there is a problem of curvature discontinuity at the joint of the straight line and the circular arc. Therefore, the embodiments of the present application can solve the problem of curvature discontinuity at the joint of the straight line and the circular arc by connecting the circular arc and the straight line through the transition curve. For example, the radius of the circular arc is the turning radius of the vehicle, the curvature of any point on the circular arc is the inverse of the turning radius, and the curvature of the straight line is 0. Therefore, the curvature of the transition curve for connecting the circular arc and the straight line can continuously change from 0 to the inverse of the turning radius of the vehicle, that is, the curvature of the transition curve is greater than or equal to 0 and less than or equal to the inverse of the turning radius, so as to ensure the continuity of the curvature of the entire parking trajectory.
[0107] Please refer to Figure 6 , Figure 6 is a schematic diagram of a parking trajectory provided by the embodiments of the present application. As shown in Figure 6 , the point O is the position of the vehicle outside the parking space, and the point D is the position of the vehicle inside the parking space. In the case of parking the vehicle into the parking space, the parking trajectory is O→V1→V2→V3→V4→V5→V6→D. In the case of parking the vehicle out of the parking space, the parking trajectory is D→V6→V5→V4→V3→V2→V1→O. Among them, the curve DV6 and the curve V2V3 are circular arcs, the curve V1V2, the curve V3V4 and the curve V5V6 are transition curves, the straight line OV1 and the straight line V4V5 are straight lines. The circular arc DV6 corresponds to a center O1, a central angle θ, a radius R1, and a curvature 1 / R1. The curvature radius of the transition curve V5V6 is R1, and the rotation angle is α. The curvature of the transition curve V5V6 at the point V5 is 0, and the curvature at the point V6 is 1 / R1. The circular arc V2V3 corresponds to a center O2, a central angle η, a radius R2, and a curvature 1 / R2. The curvature radius of the transition curve V1V2 and the transition curve V3V4 is R2, and the rotation angle is β. The curvature of the transition curve V1V2 at the point V1 is 0, and the curvature at the point V2 is 1 / R2. The curvature of the transition curve V3V4 at the point V3 is 1 / R2, and the curvature at the point V4 is 0.
[0108] In a possible implementation, the length of the transition curve is determined by the difference between the curvature of the first end point and the curvature of the second end point, wherein the greater the difference, the longer the length of the transition curve.
[0109] Wherein, since the curvature of the transition curve can be continuously changed from the curvature of the first end point to the curvature of the second end point, the greater the difference between the curvature of the first end point and the curvature of the second end point, the longer the length of the transition curve.
[0110] In a possible implementation, the number of transition curves is equal to the number of splicing end point pairs, wherein the splicing end point pair includes an end point connected by the transition curve and a straight line and an end point connected by the transition curve and a circular arc.
[0111] Specifically, the transition curve is used to connect the straight line and the circular arc, so the number of transition curves can be determined by the number of splicing end point pairs.
[0112] In a possible implementation, the circular arc in the parking trajectory includes a first circular arc and a second circular arc, the first circular arc is a circular arc inside the parking space, and the second circular arc is a circular arc outside the parking space. The transition curve includes a first transition curve, a second transition curve and a third transition curve. The first transition curve is determined by the first circular arc, and the second transition curve and the third transition curve are determined by the second circular arc.
[0113] In a possible implementation, the straight line includes a first straight line and a second straight line, the first transition curve is used to connect the first circular arc and the first straight line, the second transition curve is used to connect the first straight line and the second circular arc, and the third transition curve is used to connect the second circular arc and the second straight line.
[0114] For example, please continue to refer to Figure 6 , the curve DV6 is the first circular arc, the curve V2V3 is the second circular arc. The curve V5V6 is the first transition curve, the curve V3V4 is the second transition curve, the curve V1V2 is the third transition curve, the straight line V4V5 is the first straight line, and the straight line OV1 is the second straight line. Wherein, the first transition curve V5V6 is used to connect the first circular arc DV6 and the first straight line V4V5, the second transition curve V3V4 is used to connect the first straight line V4V5 and the second circular arc V2V3, and the third transition curve V1V2 is used to connect the second circular arc V2V3 and the second straight line OV1.
[0115] In a possible implementation, the vehicle first geometrically transforms the first transition curve according to the position inside the parking space to determine the first part of the parking trajectory. Then, the vehicle geometrically transforms the second transition curve and the third transition curve according to the first part of the parking trajectory and the position outside the parking space to determine the second part of the parking trajectory. Finally, the vehicle determines the parking trajectory according to the first part of the parking trajectory and the second part of the parking trajectory.
[0116] For example, please continue to refer to Figure 6 , the curve DV5 is the first part of the parking trajectory, and the curve V4V1 is the second part of the parking trajectory.
[0117] Specifically, the vehicle performs geometric transformation, such as translation, rotation or mirroring, on the first transition curve according to the position D point in the parking space, determines the first transition curve as the transition curve V5V6, and thus determines the first part of the parking trajectory as the curve DV5. Then, the vehicle performs geometric transformation on the third transition curve and the second transition curve according to the curve DV5 and the O point. The third transition curve is determined as the curve V1V2, and the second transition curve is determined as the curve V3V4, thus determining the second part of the parking trajectory as the curve V4V1. Finally, the vehicle determines the parking trajectory of the vehicle as the curve OD according to the curve DV5 and the curve V4V1.
[0118] In a possible implementation, the radius of the first circular arc is the minimum turning radius of the vehicle, and the minimum central angle of the first circular arc is related to the position of the vehicle in the parking space.
[0119] Specifically, to ensure that the vehicle travels a small distance in the parking space and does not collide, the minimum turning radius of the vehicle can be taken as the radius of the first circular arc. Then, the minimum central angle of the first circular arc is determined according to the position of the vehicle in the parking space.
[0120] In a possible implementation, the vehicle determines a circular arc according to the turning radius and the central angle, and then performs geometric transformation on the first transition curve according to the end point of the circular arc to determine the first part of the parking trajectory. The central angle is the angle corresponding to the turning radius.
[0121] Specifically, the circular arc can be the trajectory generated when the vehicle turns the wheels by a certain angle to park in or out of the parking space. Therefore, to ensure that the vehicle travels a small distance in the parking space and does not collide, the position in the parking space can be determined as the end point of the circular arc. Then, the other end point of the circular arc is determined as the end point of the first transition curve, and geometric transformation is performed on the first transition curve. Thus, the first transition curve is used to connect the circular arc and the straight line to eliminate the problem of curvature discontinuity at the connection between the circular arc and the straight line.
[0122] Please refer to Figure 7 , Figure 7 is a schematic diagram of determining the first part of the parking trajectory provided by an embodiment of the present application. As shown in Figure 7 , the steps of determining the first part of the parking trajectory by the vehicle are as follows:
[0123] First, determine the circular arc DV6. A local parking space coordinate system is established with the upper right corner of the parking space as the origin, and the coordinates of the D point are determined according to the position of the vehicle in the parking space obtained by step S201. To ensure that the vehicle travels a small distance in the parking space and does not collide, the minimum turning radius of the vehicle is taken as the radius R1 of the circular arc DV6. The center of the circular arc DV6 is O1, and the sampling range of the central angle θ is [θ min ,θ min+10°], wherein θ min is the minimum feasible central angle of the circular arc DV6. When the central angle of the circular arc DV6 is θ min , the vehicle can drive out of the parking space from the V6 point along a straight line without collision.
[0124] The vehicle determines the central angle θ from the sampling range of the central angle θ according to the preset step length, and then determines the coordinates of the V6 point according to the coordinates of the D point, the central angle θ, and the radius R1. Thus, the circular arc DV6 is determined. Wherein, is the included angle between the tangent line of the V6 point and the horizontal line.
[0125] Secondly, the first transition curve is determined. The first transition curve is determined according to the curvature of the first circular arc and the curvature of the first straight line, the maximum curvature of the first transition curve is the curvature of the first circular arc, and the minimum curvature of the first transition curve is the curvature of the first straight line.
[0126] For example, the curvature radius of the first transition curve is the radius R1 of the circular arc DV6, and the curvature continuously changes from 0 to The vehicle can generate a spiral curve oA with a curvature change rate C1 at the origin of the coordinate system as the first transition curve, and the included angle between the tangent line of the A point and the horizontal line is . Wherein, the origin of the coordinate system is o, the horizontal axis of the coordinate system is x axis, and the vertical axis is y axis.
[0127] Wherein, the coordinates of any point P on the spiral curve oA is a function of . The included angle between the tangent line of the P point and the horizontal line is The calculation formula of the coordinates of the P point is as follows:
[0128]
[0129]
[0130]
[0131] Wherein, px x is the horizontal coordinate of the P point, py is the vertical coordinate of the P point, is the included angle between the tangent line of the P point and the horizontal line, n is a natural number greater than or equal to 0, and C1 is the curvature change rate of the spiral curve oA.
[0132] Thirdly, the vehicle makes a mirror image curve oA mirror of the curve oA with the y axis as the symmetry axis.
[0133] Fourthly, the vehicle takes the A mirror point as the base point to generate the curve oAmirror Translation to point V6 obtains curve V60 move .
[0134] Fifth step, the vehicle takes point V6 as the center to curve V60 move counterclockwise rotation angle, and then counterclockwise rotation angle, to obtain the first transition curve V5V6. Thus, the vehicle can determine the first part of the parking trajectory as curve DV5. Wherein, the included angle between the tangent of V6 point and the horizontal line and the included angle between the tangent of V5 point and the horizontal line The calculation formula is as follows:
[0135]
[0136]
[0137] Wherein, is the included angle between the tangent of D point and the horizontal line, is the included angle between the tangent of A point and the horizontal line, and θ is the central angle of the circular arc DV6.
[0138] In a possible implementation, after determining the first part of the parking trajectory, the vehicle can determine the position of the second part of the parking trajectory according to the first part of the parking trajectory and the position outside the parking space. Then, the third transition curve and the second transition curve are geometrically transformed according to the position of the second part to determine the second part of the parking trajectory.
[0139] Specifically, the steps of determining the second part of the parking trajectory by the vehicle are as follows:
[0140] First step, generate the third transition curve. The third transition curve is determined according to the curvature of the second circular arc and the curvature of the second straight line, the maximum curvature of the third transition curve is the curvature of the second circular arc, and the minimum curvature of the third transition curve is the curvature of the second straight line.
[0141] For example, please refer to Figure 8 , Figure 8 is a schematic diagram of a transition curve and a circular arc provided by an embodiment of the present application. As Figure 8 shown, the vehicle generates a spiral curve oB with constant curvature change rate C2 and continuous change of curvature from 0 to at the origin of the coordinate system. Wherein R2 is the turning radius of the vehicle, and the included angle between the tangent of B point and the horizontal line is
[0142] The second step is to generate a second arc. The radius of the second arc is greater than or equal to the vehicle's minimum turning radius and less than or equal to twice the minimum turning radius. The center angle of the second arc is related to the first arc, the second transition curve, the third transition curve, and the second straight line. The second straight line is related to the position of the vehicle outside the parking space.
[0143] Please continue reading Figure 8 , the vehicle generates an arc oG with a radius of R2 and a central angle of η at the origin of the coordinate system. Among them, the origin of the coordinate system is o, the horizontal axis of the coordinate system is the x-axis, and the vertical axis is the y-axis. R2 is the turning radius of the vehicle, and the sampling range of R2 is [R min , 2·R min ], R min is the minimum turning radius of the vehicle. The center angle η is calculated based on Figure 6 The geometric relationship of the parking trajectory can be determined by the following relationship:
[0144]
[0145] in, is the angle between the tangent line at point V5 and the horizontal line, which can be obtained from Figure 7 Sure. is the rotation angle of the third transition curve and the second transition curve, It is the angle between the tangent line of the vehicle outside the parking space and the horizontal line.
[0146] For the third step, please refer to Figure 9 , Figure 9 This is another schematic diagram of a transition curve and arc provided in the embodiment of the present application. Figure 9 As shown, the vehicle takes the coordinate system origin o as the base point and translates the arc oG to point B to obtain the curve BG. Then, the vehicle rotates counterclockwise around point B on the curve BG. The corresponding angle is the arc BG move .in, The corresponding angle is The origin of the coordinate system is o, the horizontal axis of the coordinate system is the x-axis, the vertical axis is the y-axis, and the arc BG move The central angle of the circle is η.
[0147] Step 4: Generate the second transition curve. Figure 9 , the vehicle moves in arc BG move The center O3 and the arc BG move The midpoint O4 of the spiral curve is connected to form a straight line O3O4 as the axis of symmetry, and the mirror image curve G of the spiral curve oB is determined. move o mirror Among them, the mirror curve G move o mirrorThe second transition curve is determined according to the curvature of the second circular arc and the curvature of the first straight line, the maximum curvature of the second transition curve is the curvature of the second circular arc, and the minimum curvature of the second transition curve is the curvature of the first straight line.
[0148] Step 5, please refer to Figure 10 , Figure 10 is a schematic diagram provided by an embodiment of the present application for performing geometric transformation. As shown in Figure 10 , the vehicle performs a center-symmetrical mirror curve o mirror of the multi-segment curve o cm o with the coordinate system origin point o. Among them, the central angle of the circular arc BG move is η, the coordinate system origin point is o, the coordinate system horizontal axis is x axis, and the vertical axis is y axis.
[0149] Step 6, please refer to Figure 11 , Figure 11 is a schematic diagram provided by an embodiment of the present application for determining the second part of the parking trajectory. As shown in Figure 11 , the vehicle translates the multi-segment curve o cm o to point O with the coordinate system origin point o as the base point, thereby obtaining the multi-segment curve o move O. Among them, point O is the position of the vehicle outside the parking space, the coordinate system origin point is o, the coordinate system horizontal axis is x axis, and the vertical axis is y axis.
[0150] Step 7, please continue to refer to Figure 11 , the straight line passing through point O is L1, the straight line passing through point V5 is L2, and the straight line L3 parallel to L1 is drawn through point o move . The vehicle can determine the coordinates of the intersection point V of the straight line L2 and the straight line L3 according to the geometric relationship Among them, the coordinates of point V5 can be determined by Figure 7 .
[0151] Step 8, if V x ≥ V5 x and V y ≥ V5 y are obtained in step 7, then the vehicle translates the multi-segment curve o move O to point V with o move as the base point, and sets point V as point V4. At the same time, the tangent point of the curve o move O and the straight line L1 is set as V1, thereby obtaining the second part V1V4 of the parking trajectory composed of the circular arc V2V3, the third transition curve V1V2, and the second transition curve V3V4. Otherwise, if the coordinates of the point V obtained in step 7 do not satisfy V x ≥ V5 x and V y ≥ V5 yIf the condition is not met, there is no feasible circular arc and transition curve.
[0152] Finally, the vehicle determines a parking trajectory of the vehicle according to a first part of the parking trajectory obtained by Figure 7 and a second part of the parking trajectory obtained by Figure 11 . Specifically, the vehicle connects the point V4 and the point V5 by a straight line V4V5, and connects the point O and the point V1 by a straight line OV1. Thus, a parking trajectory OD as shown in Figure 6 is formed.
[0153] In a possible implementation, the vehicle determines a plurality of parking trajectories by sampling the central angle of the first circular arc and the radius of the second circular arc, and then determines a target parking trajectory according to the feasible parking area of the vehicle.
[0154] Specifically, as known from the above, the sampling range of the central angle θ of the circular arc DV6 is [θ min , θ min + 10°], and the sampling range of the radius R2 of the circular arc V2V3 is [R min , 2·R min ]. Therefore, the vehicle can determine one or more sampling values of the central angle θ from the sampling range of the central angle θ according to a preset step size, and determine one or more sampling values of the radius R2 from the sampling range of the radius R2 according to a preset step size. Then, the vehicle determines one or more sampling trajectories according to the one or more sampling values of the central angle θ and the one or more sampling values of the radius R2. Finally, the vehicle determines an optimal sampling trajectory as the parking trajectory of the vehicle from the one or more sampling trajectories according to the collision constraint condition and the trajectory cost.
[0155] In a possible implementation, the collision constraint condition of the vehicle refers to a condition that the vehicle does not collide with other objects during the process of parking into or parking out of the parking space. Specifically, the collision constraint condition of the vehicle can determine the collision risk according to the distance between the vehicle and the obstacle.
[0156] For example, refer to Figure 12 , Figure 12 which is a schematic diagram for determining the collision risk provided by an embodiment of the present application. Wherein Figure 12 (a) is a schematic diagram of the left front corner of the vehicle, Figure 12 (b) is a schematic diagram of the right front corner of the vehicle, Figure 12 (c) is a schematic diagram of the right rear wheel of the vehicle.
[0157] As shown in Figure 12As shown in (a), the left front corner of a vehicle is prone to colliding with an obstacle represented by line D1 in the feasible parking space when parking in or out of a parking space. Therefore, the vertical distance between the left front corner of the vehicle and line D1 needs to be considered. For example, the vehicle obtains the minimum vertical distance d1 between the left front corner and line D1 in the sampled trajectory.
[0158] like Figure 12 As shown in (b), the right front corner of the vehicle is likely to collide with the obstacle represented by line D2 in the feasible parking space when parking in or out of the space. Therefore, the vertical distance between the right front corner of the vehicle and line D2 needs to be considered. For example, the vehicle obtains the minimum vertical distance d2 between the right front corner and line D2 in the sampled trajectory.
[0159] like Figure 12 As shown in (c), the right rear wheel of the vehicle is likely to collide with the obstacle represented by point D3 in the feasible parking space when parking in or out of the space. Therefore, the vertical distance between the right rear wheel of the vehicle and point D3 needs to be considered. For example, the vehicle obtains the minimum vertical distance d3 between the right rear wheel and point D3 in the sampled trajectory.
[0160] Then, the vehicle determines the collision risk of the sampled trajectory according to the following formula: risk :
[0161]
[0162] In one possible implementation, the trajectory cost of a sampled trajectory can be determined based on the collision risk and the number of gear shifts. The vehicle selects the trajectory cost corresponding to multiple sampled trajectories with the lowest trajectory cost as the vehicle's parking trajectory. The relationship for calculating the trajectory cost is as follows:
[0163] cost=costs hift ·n shift +cost risk ·col risk
[0164] Among them, cost is the trajectory cost of the sampled trajectory, cost shift is the unit cost of the number of gear shifts, n shift is the number of gear shifts, cost risk is the unit cost of collision risk, col risk For collision risk.
[0165] Among them, gear shifting refers to the vehicle switching between forward gear and reverse gear. For example, if the vehicle is parked in a parking space, the vehicle shifts from reverse gear to forward gear, the vehicle needs to drive forward first and then switch back to reverse gear to continue parking in the parking space. Compared with the vehicle directly parking in the reverse gear state, the efficiency is low and the cost is high. Therefore, the unit cost of the number of gear shifts can be greater than the unit cost of the collision risk. The number of gear shifts can be determined based on the horizontal coordinates of the endpoint O and the endpoint V1 of the straight line OV1 in the sampling trajectory. If the horizontal coordinate of the endpoint V1 is less than or equal to the horizontal coordinate of the endpoint O, that is, V1 x ≤O x When the vehicle shifts gears n shift On the contrary, if the horizontal coordinate of endpoint V1 is greater than the horizontal coordinate of endpoint O, that is, V1 x >O x When the vehicle shifts gears n shift For 1 time.
[0166] The following describes the results of simulation tests based on a method for planning parking trajectories provided in this application.
[0167] See also Figure 13 , Figure 13 : is a schematic diagram of a first simulation result provided by an embodiment of the present application. Figure 13 (a) is a schematic diagram of the vehicle’s trajectory. Figure 13 (b) is a line graph of trajectory curvature.
[0168] like Figure 13 As shown in (a), Figure 13 (a) shows a schematic diagram of the vehicle's parking trajectory and the vehicle's outline when parked according to the parking trajectory. The horizontal and vertical axes represent the vehicle's position coordinates. The horizontal axis shows 10 coordinate values, ranging from -8 to 10, and the vertical axis shows 8 coordinate values, ranging from -6 to 8. Figure 13 The trajectory given in (a) can be a parking trajectory when the vehicle is parked in a non-narrow parking space when the parking angle is level with the non-narrow parking space. It can also be a parking trajectory when the vehicle is parked out of a non-narrow parking space.
[0169] like Figure 13 As shown in (b), Figure 13 (b) is Figure 13 The curvature of the parking trajectory in (a) is shown in Figure 1. The horizontal axis is the horizontal coordinate of the trajectory point corresponding to the curvature, and the vertical axis is the curvature value. The horizontal axis gives 8 coordinate values from -6 to 1, and the vertical axis gives 10 coordinate values from 0 to 0.18. Figure 13 As can be seen from (b), Figure 13 The curvature corresponding to the parking trajectory in (a) is continuous, and there is no problem of curvature mutation.
[0170] Please refer to Figure 14 , Figure 14 is a second simulation result provided by an embodiment of the present application. Wherein Figure 14 (a) of figure Figure 14 (b) is a trajectory curvature line graph.
[0171] As shown in Figure 14 (a), figure Figure 14 (a) is a schematic diagram of a parking trajectory of a vehicle and a vehicle contour when the vehicle parks according to the parking trajectory. Wherein, the horizontal axis and the vertical axis are position coordinates of the vehicle. The horizontal axis exemplarily gives 10 coordinate values from -8 to 10, and the vertical axis exemplarily gives 7 coordinate values from -4 to 8. Figure 14 The trajectory given in (a) can be a parking trajectory when the vehicle parks into a narrow parking space with a parking angle and a horizontal narrow parking space. It can also be a parking trajectory when the vehicle parks out of a narrow parking space.
[0172] As shown in Figure 14 (b), figure Figure 14 (b) is Figure 14 the curvature corresponding to the parking trajectory in (a). Wherein, the horizontal axis is the horizontal coordinate of the trajectory point corresponding to the curvature, and the vertical axis is the value of the curvature. The horizontal axis exemplarily gives 8 coordinate values from -5 to 2, and the vertical axis exemplarily gives 11 coordinate values from 0 to 0.2. As can be seen from Figure 14 (b), Figure 14 the curvature corresponding to the parking trajectory in (a) is continuous, and there is no problem of sudden change of curvature.
[0173] Please refer to Figure 15 , Figure 15 is a third simulation result provided by an embodiment of the present application. Wherein Figure 15 (a) of figure Figure 15 (b) is a trajectory curvature line graph.
[0174] As shown in Figure 15 (a), figure Figure 15 (a) is a schematic diagram of a parking trajectory of a vehicle and a vehicle contour when the vehicle parks according to the parking trajectory. Wherein, the horizontal axis and the vertical axis are position coordinates of the vehicle. The horizontal axis exemplarily gives 10 coordinate values from -8 to 10, and the vertical axis exemplarily gives 7 coordinate values from -4 to 8. Figure 15 The trajectory given in (a) can be a parking trajectory when the vehicle starts to park into a narrow parking space, and the angle between the vehicle head and the horizontal line is 15°.
[0175] As shown in Figure 15 (b), figure Figure 15 (b) is Figure 15The curvature of the parking trajectory in (a) is shown in Figure 1. The horizontal axis is the horizontal coordinate of the trajectory point corresponding to the curvature, and the vertical axis is the curvature value. The horizontal axis gives a total of 6 coordinate values from -5 to 0, and the vertical axis gives a total of 11 coordinate values from 0 to 0.2. Figure 15 As can be seen from (b), Figure 15 The curvature corresponding to the parking trajectory in (a) is continuous, and there is no problem of sudden curvature change.
[0176] See also Figure 16 , Figure 16 : is a schematic diagram of a fourth simulation result provided in an embodiment of the present application. Figure 16 (a) is a schematic diagram of the vehicle’s trajectory. Figure 16 (b) is a line graph of trajectory curvature.
[0177] like Figure 16 As shown in (a), Figure 16 (a) shows a schematic diagram of the vehicle's parking trajectory and the vehicle's outline when parked according to the parking trajectory. The horizontal and vertical axes represent the vehicle's position coordinates. The horizontal axis shows 10 coordinate values, ranging from -8 to 10, and the vertical axis shows 7 coordinate values, ranging from -4 to 8. Figure 16 The trajectory given in (a) may be a parking trajectory when the vehicle starts to park into a narrow parking space, with the front of the vehicle swinging down, and the angle between the vehicle and the horizontal line is -15°.
[0178] like Figure 16 As shown in (b), Figure 16 (b) is Figure 16 The curvature of the parking trajectory in (a) is shown in Figure 1. The horizontal axis is the horizontal coordinate of the trajectory point corresponding to the curvature, and the vertical axis is the value of the curvature. The horizontal axis gives a total of 10 coordinate values from -5 to 4, and the vertical axis gives a total of 11 coordinate values from 0 to 0.2. Figure 16 As can be seen from (b), Figure 16 The curvature corresponding to the parking trajectory in (a) is continuous, and there is no problem of sudden curvature change.
[0179] In summary, Figure 16 、 Figure 13 、 Figure 14 and Figure 15 As can be seen, this embodiment of the present application supports parking trajectory planning for both regular and narrow parking spaces. Furthermore, this embodiment of the present application also supports parking trajectory planning for both regular and narrow parking spaces when the angle between the vehicle and the horizontal is within the range of [-15°, 15°]. The parking trajectories planned according to this embodiment of the present application effectively avoid obstacles, eliminate the need for gear shifting, and maintain a continuous curvature, eliminating the issue of sudden changes in curvature that could impact the user experience.
[0180] The above describes the method of the embodiments of the present application in detail. The device of the embodiments of the present application is provided below.
[0181] Please refer to Figure 16 , Figure 17 is a functional unit composition block diagram of a device for planning a parking trajectory provided by the embodiments of the present application. The device 170 for planning a parking trajectory can include a communication unit 1701 and a processing unit 1702. The device 170 for planning a parking trajectory is used to implement the aforementioned method for planning a parking trajectory, for example, the method for planning a parking trajectory shown in Figure 17 .
[0182] It should be noted here that the division of the above multiple units is only a logical division according to functions, and is not a limitation on the specific structure of the device 170 for planning a parking trajectory. In a specific implementation, some of the functional modules can be subdivided into more detailed functional modules, and some of the functional modules can be combined into one functional module.
[0183] In one possible implementation, the communication unit 1701 is configured to obtain a position of a vehicle outside a parking space and a position of the vehicle inside the parking space, where the parking space is an area for parking or unparking the vehicle;
[0184] The processing unit 1702 is configured to determine a target parking trajectory of the vehicle according to the position of the vehicle outside the parking space and the position of the vehicle inside the parking space, where a shape of the target parking trajectory includes a transition curve, a straight line, and a circular arc, the transition curve is used to connect the straight line and the circular arc, a curvature of the transition curve continuously changes with an increase in a length of the transition curve, and the vehicle is used to park or unpark the parking space according to the target parking trajectory.
[0185] In another possible implementation, a curvature of a first end point of the transition curve used to connect the straight line is the same as a curvature of the straight line, and a curvature of a second end point of the transition curve used to connect the circular arc is the same as a curvature of the circular arc.
[0186] In another possible implementation, the length of the transition curve is determined by a difference between the curvature of the first end point and the curvature of the second end point, where the greater the difference, the longer the length of the transition curve.
[0187] In another possible implementation, the number of the transition curves is equal to the number of the pairs of splicing end points, where the pairs of splicing end points include the end points of the transition curve connected with the straight line and the end points of the transition curve connected with the circular arc.
[0188] In another possible implementation, the circular arc includes a first circular arc and a second circular arc, the first circular arc is a circular arc inside the parking space, the second circular arc is a circular arc outside the parking space, and the transition curve includes a first transition curve, a second transition curve, and a third transition curve.
[0189] The first transition curve is determined by a first circular arc, and the second transition curve and the third transition curve are determined by a second circular arc.
[0190] In another possible implementation, the straight line includes a first straight line and a second straight line, wherein,
[0191] The first transition curve is used to connect the first circular arc and the first straight line;
[0192] The second transition curve is used to connect the first straight line and the second circular arc;
[0193] The third transition curve is used to connect the second circular arc and the second straight line.
[0194] In another possible implementation, the first transition curve is determined according to the curvature of the first circular arc and the curvature of the first straight line, the maximum curvature of the first transition curve is the curvature of the first circular arc, and the minimum curvature of the first transition curve is the curvature of the first straight line.
[0195] In another possible implementation, the second transition curve is determined according to the curvature of the second circular arc and the curvature of the first straight line, the maximum curvature of the second transition curve is the curvature of the second circular arc, and the minimum curvature of the second transition curve is the curvature of the first straight line.
[0196] In another possible implementation, the third transition curve is determined according to the curvature of the second circular arc and the curvature of the second straight line, the maximum curvature of the third transition curve is the curvature of the second circular arc, and the minimum curvature of the third transition curve is the curvature of the second straight line.
[0197] In another possible implementation, the radius of the first circular arc is the minimum turning radius of the vehicle, and the minimum central angle of the first circular arc is related to the position of the vehicle in the parking space.
[0198] In another possible implementation, the radius of the second circular arc is greater than or equal to the minimum turning radius of the vehicle and less than or equal to twice the minimum turning radius, the central angle of the second circular arc is related to the first circular arc, the second transition curve, the third transition curve and the second straight line, and the second straight line is related to the position of the vehicle outside the parking space.
[0199] In another possible implementation, the processing unit 1702 is configured to determine a plurality of parking trajectories by sampling the central angle of the first circular arc and the radius of the second circular arc.
[0200] The processing unit 1702 is configured to determine a target parking trajectory by screening the plurality of parking trajectories according to the feasible parking area of the vehicle.
[0201] It should be noted that in the embodiments of the present application, the specific implementation and technical effects of each unit can also be correspondingly referred to Figure 2The corresponding description of the method embodiment shown in the middle.
[0202] See Figure 2 , Figure 18 is a structural schematic diagram of a computing device provided by an embodiment of the present application. As shown in Figure 18 , the computing device 180 can include one or more processors 1801, one or more memories 1802, and one or more communication interfaces 1803. These components can be connected through a bus 1804 or other means, Figure 18 Taking the connection through the bus 1804 as an example. Among them:
[0203] The communication interface 1803 can be used for the computing device 180 to communicate with other communication devices, such as other computing devices. Specifically, the communication interface 1803 can be a wired interface.
[0204] The memory 1802 can be coupled to the processor 1801 via the bus 1804 or input / output port, and the memory 1802 can also be integrated with the processor 1801. The memory 1802 is used to store various software programs and / or sets of instructions or data. Specifically, the memory 1802 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto. The memory 1802 can include high-speed random access memory, and can also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 1802 can store an operating system (hereinafter referred to as a system), such as an embedded operating system uCOS, VxWorks, RTLinux, etc. The memory 1802 can also store a network communication program, which can be used to communicate with one or more additional devices, one or more user devices, and one or more terminals. The memory 1802 can exist independently and be connected to the processor 1801 via the bus 1804. The memory 1802 can also be integrated with the processor 1801.
[0205] The memory 1802 is used to store application program codes for implementing the above solutions, and the processor 1801 is used to control the execution of the application program codes stored in the memory 1802.
[0206] The processor 1801 can be a central processing unit, a general processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, a transistor logic device, a hardware component, or any combination thereof. It can implement or execute various exemplary logical blocks, modules, and circuits described in combination with the disclosure. The processor 1801 can also be a combination that implements a certain function, such as a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, etc.
[0207] In the embodiments of the present application, the processor 1801 can be configured to read and execute computer readable instructions. Specifically, the processor 1801 can be configured to invoke a program stored in the memory 1802 to perform the following operations:
[0208] The communication interface 1803 obtains a position of the vehicle outside the parking space and a position of the vehicle inside the parking space, where the parking space is an area for parking in or parking out of the vehicle;
[0209] According to the position of the vehicle outside the parking space and the position of the vehicle inside the parking space, a target parking trajectory of the vehicle is determined, where a shape of the target parking trajectory includes a transition curve, a straight line and a circular arc, the transition curve is used to connect the straight line and the circular arc, and the curvature of the transition curve continuously changes with the length of the transition curve, and the vehicle is used to park in or park out of the parking space according to the target parking trajectory.
[0210] In a possible implementation, the curvature of a first end point of the transition curve used to connect the straight line is the same as the curvature of the straight line, and the curvature of a second end point of the transition curve used to connect the circular arc is the same as the curvature of the circular arc.
[0211] In a possible implementation, the length of the transition curve is determined by a difference between the curvature of the first end point and the curvature of the second end point, where the greater the difference, the longer the length of the transition curve.
[0212] In a possible implementation, the number of the transition curves is equal to the number of the splicing end point pairs, where the splicing end point pairs include the end points of the transition curves connected with the straight lines and the end points of the transition curves connected with the circular arcs.
[0213] In a possible implementation, the circular arc includes a first circular arc and a second circular arc, the first circular arc is a circular arc inside the parking space, and the second circular arc is a circular arc outside the parking space, and the transition curve includes a first transition curve, a second transition curve and a third transition curve.
[0214] The first transition curve is determined by the first circular arc, and the second transition curve and the third transition curve are determined by the second circular arc.
[0215] In a possible implementation, the straight line includes a first straight line and a second straight line, where,
[0216] The first transition curve is used to connect the first circular arc and the first straight line.
[0217] The second transition curve is used to connect the first straight line and the second circular arc.
[0218] The third transition curve is used to connect the second circular arc and the second straight line.
[0219] In a possible implementation, the first transition curve is determined according to the curvature of the first circular arc and the curvature of the first straight line, the maximum curvature of the first transition curve is the curvature of the first circular arc, and the minimum curvature of the first transition curve is the curvature of the first straight line.
[0220] In a possible implementation, the second transition curve is determined according to the curvature of the second circular arc and the curvature of the first straight line, the maximum curvature of the second transition curve is the curvature of the second circular arc, and the minimum curvature of the second transition curve is the curvature of the first straight line.
[0221] In a possible implementation, the third transition curve is determined according to the curvature of the second circular arc and the curvature of the second straight line, the maximum curvature of the third transition curve is the curvature of the second circular arc, and the minimum curvature of the third transition curve is the curvature of the second straight line.
[0222] In a possible implementation, the radius of the first circular arc is the minimum turning radius of the vehicle, and the minimum central angle of the first circular arc is related to the position of the vehicle in the parking space.
[0223] In a possible implementation, the radius of the second circular arc is greater than or equal to the minimum turning radius of the vehicle and less than or equal to twice the minimum turning radius, the central angle of the second circular arc is related to the first circular arc, the second transition curve, the third transition curve, and the second straight line, and the second straight line is related to the position of the vehicle outside the parking space.
[0224] In a possible implementation, the processor 1801 is configured to:
[0225] determine a plurality of parking trajectories by sampling the central angle of the first circular arc and the radius of the second circular arc;
[0226] screen the plurality of parking trajectories according to the feasible parking area of the vehicle to determine a target parking trajectory.
[0227] It should be noted that, in the embodiments of the present application, the specific implementation and technical effects of each unit can also be correspondingly described with reference to the method embodiments shown in Figure 18 .
[0228] The present application also provides a computer readable storage medium, which stores instructions, when the instructions are executed on at least one processor, the method of planning a parking trajectory is implemented, for example Figure 2 .
[0229] The present application also provides a computer program product, which includes computer instructions, when the computer instructions are executed by a computing device, the method of planning a parking trajectory is implemented, for example Figure 2 Figure 2 .
[0230] In the embodiments of the present application, the words "for example", "for instance", "such as", or "like" are used to indicate one example out of many, and should not be used to limit or narrow the scope of the embodiments of the present application. Any embodiment or design scheme described herein as "for example" or "such as" should not be construed as being more preferred or advantageous than other embodiments or design schemes. Rather, the use of "for example" or "such as" is merely intended to present concepts in a concrete manner.
[0231] In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following (one)", or the like, means any combination of the items, including any combination of single item (one) or multiple items. For example, at least one of a, b, or c can mean a, b, c, (a and b), (a and c), (b and c), or (a and b and c), where a, b, and c can be single or multiple. "And / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects.
[0232] In addition, unless otherwise stated, the ordinal numbers "first", "second", etc. used in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, time sequence, priority or importance of the multiple objects. For example, the first device and the second device are only for ease of description, and do not mean that the structures, importance, etc. of the first device and the second device are different. In some embodiments, the first device and the second device can also be the same device.
[0233] In the above embodiments, according to the context, the term "when" can be interpreted as meaning "if", "after", "in response to determining", or "in response to detecting". The above is only an optional embodiment of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the concept and principles of the present application should be included in the protection scope of the present application.
[0234] A person of ordinary skill in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing relevant hardware to complete. The program can be stored in a computer readable storage medium, and the storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.
[0235] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for planning a parking trajectory, characterized in that: The method comprises: Obtaining a position of a vehicle outside a parking space and a position of the vehicle inside the parking space, wherein the parking space is an area where the vehicle is parked in or out; According to the position of the vehicle outside the parking space and the position of the vehicle inside the parking space, a plurality of parking trajectories are determined by sampling the central angle of the first arc and the radius of the second arc, wherein the sampling range of the central angle θ of the first arc is [θ min ,θ min +10°], θ min is the minimum center angle of the first arc, and the sampling range of the radius of the second arc is [R min ,2·R min ], R min is the minimum turning radius of the vehicle; The multiple parking trajectories are screened according to a collision constraint and a trajectory cost to determine a target parking trajectory for the vehicle, wherein the collision constraint includes a collision risk determined based on a distance between the vehicle and an obstacle, and the trajectory cost is determined based on the collision risk and a number of gear shifts. The target parking trajectory is a parking trajectory with the lowest trajectory cost among the multiple parking trajectories, and the vehicle is used to park into or out of the parking space according to the target parking trajectory. The trajectory cost is expressed as follows: cost = cost shift ·n shift +cost risk ·col risk , cost shift is the unit cost of the number of gear shifts, n shift is the number of gear shifts, col risk is the collision risk, cost risk is the unit cost of the collision risk, and the unit cost of the number of gear shifts is greater than the unit cost of the collision risk; The shape of the target parking trajectory includes a transition curve, a straight line, and an arc. The transition curve is used to connect the straight line and the arc, and the curvature of the transition curve changes continuously as the length of the transition curve increases. The arc includes a first arc and a second arc, the first arc is an arc within the parking space, and the second arc is an arc outside the parking space. The transition curve includes a first transition curve, a second transition curve, and a third transition curve. The first transition curve is determined by the first arc, and the second and third transition curves are determined by the second arc. The straight lines include a first straight line and a second straight line. The first transition curve is used to connect the first arc and the first straight line, the second transition curve is used to connect the first straight line and the second arc, and the third transition curve is used to connect the second arc and the second straight line. The first transition curve is determined according to the curvature of the first arc and the curvature of the first straight line, the maximum curvature of the first transition curve is the curvature of the first arc, and the minimum curvature of the first transition curve is the curvature of the first straight line; The process of determining the first transition curve comprises the following steps: generating a first spiral curve oA at the origin o of the coordinate system, mirroring the first spiral curve oA with the y-axis of the coordinate system as the axis of symmetry to obtain a second spiral curve oA mirror ; With the second spiral curve oA mirror A in mirror The second spiral curve oA is taken as the base point mirror Translate to the first point V6 to obtain the third spiral curve V6o move ; With the first point V6 as the center of the third spiral curve V6o move The first transition curve is obtained by performing counterclockwise rotation, and the first point V6 is the endpoint on the first arc connected to the first transition curve.
2. The method according to claim 1, characterized in that The curvature of the first endpoint of the transition curve used to connect the straight lines is the same as the curvature of the straight lines, and the curvature of the second endpoint of the transition curve used to connect the circular arcs is the same as the curvature of the circular arc.
3. The method according to claim 2, characterized in that The length of the transition curve is determined by the difference between the curvature of the first endpoint and the curvature of the second endpoint, wherein the greater the difference is, the longer the length of the transition curve is.
4. The method according to claim 1, wherein The second transition curve is determined according to the curvature of the second circular arc and the curvature of the first straight line. The maximum curvature of the second transition curve is the curvature of the second circular arc, and the minimum curvature of the second transition curve is the curvature of the first straight line.
5. The method according to claim 1, wherein The third transition curve is determined according to the curvature of the second arc and the curvature of the second straight line. The maximum curvature of the third transition curve is the curvature of the second arc, and the minimum curvature of the third transition curve is the curvature of the second straight line.
6. The method according to claim 1, characterized in that The radius of the first arc is the minimum turning radius of the vehicle, and the minimum center angle of the first arc is related to the position of the vehicle in the parking space.
7. The method according to claim 1, characterized in that The radius of the second arc is greater than or equal to the minimum turning radius of the vehicle and less than or equal to twice the minimum turning radius. The central angle of the second arc is related to the first arc, the second transition curve, the third transition curve and the second straight line. The second straight line is related to the position of the vehicle outside the parking space.
8. A device for planning parking trajectory, characterized in that: The device comprises: a communication unit, configured to obtain a position of a vehicle outside a parking space and a position of the vehicle within the parking space, wherein the parking space is an area where the vehicle is parked in or out; A processing unit is configured to determine a plurality of parking trajectories by sampling the central angle θ of a first arc and the radius of a second arc according to the position of the vehicle outside the parking space and the position of the vehicle inside the parking space, wherein the sampling range of the central angle θ of the first arc is [θ min ,θ min +10°], θ min is the minimum center angle of the first arc, and the sampling range of the radius of the second arc is [R min ,2·R min ], R min is the minimum turning radius of the vehicle; the processing unit is further configured to screen the plurality of parking trajectories based on a collision constraint and a trajectory cost to determine a target parking trajectory for the vehicle, wherein the collision constraint includes a collision risk determined based on a distance between the vehicle and an obstacle, the trajectory cost is determined based on the collision risk and a number of gear shifts, the target parking trajectory being a parking trajectory with the lowest trajectory cost among the plurality of parking trajectories, and the vehicle is configured to park into or out of the parking space according to the target parking trajectory; The trajectory cost is expressed as follows: cost = cost shift ·n shift +cost risk ·col risk , cost shift is the unit cost of the number of gear shifts, n shift is the number of gear shifts, col risk is the collision risk, cost risk is the unit cost of the collision risk, and the unit cost of the number of gear shifts is greater than the unit cost of the collision risk; The shape of the target parking trajectory includes a transition curve, a straight line, and an arc. The transition curve is used to connect the straight line and the arc, and the curvature of the transition curve changes continuously as the length of the transition curve increases. The arc includes a first arc and a second arc, the first arc is an arc within the parking space, and the second arc is an arc outside the parking space. The transition curve includes a first transition curve, a second transition curve, and a third transition curve. The first transition curve is determined by the first arc, and the second and third transition curves are determined by the second arc. The straight lines include a first straight line and a second straight line. The first transition curve is used to connect the first arc and the first straight line, the second transition curve is used to connect the first straight line and the second arc, and the third transition curve is used to connect the second arc and the second straight line. The first transition curve is determined according to the curvature of the first arc and the curvature of the first straight line, the maximum curvature of the first transition curve is the curvature of the first arc, and the minimum curvature of the first transition curve is the curvature of the first straight line; The process of determining the first transition curve comprises the following steps: generating a first spiral curve oA at the origin o of the coordinate system, mirroring the first spiral curve oA with the y-axis of the coordinate system as the axis of symmetry to obtain a second spiral curve oA mirror ; With the second spiral curve oA mirror A in mirror The second spiral curve oA is taken as the base point mirror Translate to the first point V6 to obtain the third spiral curve V6o move ; With the first point V6 as the center of the third spiral curve V6o move The first transition curve is obtained by performing counterclockwise rotation, and the first point V6 is the endpoint on the first arc connected to the first transition curve.
9. A vehicle, characterized in that: The vehicle comprises a processor and a memory, wherein the processor is coupled to the memory, the memory is used to store a computer program, and the processor is used to call and run the computer program, so that the vehicle executes the method according to any one of claims 1 to 7.
10. A computing device, characterized in that The device comprises a processor coupled to a memory, the memory being used to store a computer program, and the processor being used to call and run the computer program, so that the computing device executes the method according to any one of claims 1 to 7.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program includes instructions for executing the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method for manoeuvring a motor vehicle into a parking space with the determining of a parking trajectory, driver assistance system and motor vehicle
CN109415088A
Parking path planning method and system
CN114889586A
Vehicular travelling support device
JP2004352120A