Method and device for generating driving path
By determining the starting point and end point position information of the vehicle and the target rotation angle, the spiral route is generated, which solves the problem of low path generation efficiency for curvature and curvature change rate in autonomous driving, and improves the efficiency and accuracy of path generation.
Patent Information
- Application Number
- CN202411547205.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2024-12-17
AI Technical Summary
The existing autonomous driving trajectory algorithms are inefficient when generating paths that meet the requirements of curvature and curvature change rate, and the success rate cannot be guaranteed.
By determining the starting point and end point position information of the vehicle, calculating the target rotation angle, and generating at least one spiral line path based on this, ensuring that the curvature of different positions on the path is different, thereby improving the generation efficiency and accuracy of the driving path.
It realizes the rapid generation of driving paths that meet the requirements of curvature and curvature change rate, improves the efficiency and accuracy of path generation, and solves the problems of low efficiency and low success rate in the prior art.
Smart Images

Figure CN119146970A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of autonomous driving and data processing, and in particular to a method and device for generating a driving path. Background Art
[0002] In the field of autonomous driving, current trajectory algorithms all have strict requirements for the minimum turning radius of the planned path. In some mature algorithms, this requirement is basically met, but there are still disadvantages such as long planning time, low efficiency, exponential increase in complexity with the size of the space, and insufficient smoothness of the trajectory. In the case of use with higher requirements for path quality, the most important requirement for the quality of the trajectory is the rate of change of curvature with the path. At present, most algorithms basically include restrictions or optimizations on the rate of change of curvature, but they also have the problem of long generation time and the success rate cannot be guaranteed.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a method and device for generating a driving path, so as to at least solve the technical problem of low efficiency in generating a path whose curvature and curvature change rate meet the requirements in the related art.
[0005] According to one aspect of an embodiment of the present invention, a method for generating a driving path is provided, comprising: determining starting position information of a vehicle at a driving starting point and terminal position information at a driving end point; determining a target rotation angle from the driving starting point to the driving end point based on the starting position information and the terminal position information; generating at least one spiral path based on the target rotation angle, wherein the curvatures at different positions on any spiral path are different; and generating a target driving path for the vehicle based on at least one spiral path.
[0006] According to another aspect of an embodiment of the present invention, a driving path generation device is also provided, including: a posture information determination module, used to determine the starting posture information of the vehicle at the driving starting point, and the terminal posture information at the driving end point; a rotation angle determination module, used to determine the target rotation angle from the driving starting point to the driving end point based on the starting point posture information and the terminal posture information; a spiral path generation module, used to generate at least one spiral path based on the target rotation angle, wherein the curvature at different positions on any spiral path is different; a driving path generation module, used to generate the target driving path of the vehicle based on at least one spiral path.
[0007] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the method in each embodiment of the present invention is executed when the program is running.
[0008] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0009] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0010] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0011] According to another aspect of the embodiments of the present invention, a computer program is further provided. When the computer program is executed by a processor, the methods in the embodiments of the present invention are implemented.
[0012] In an embodiment of the present invention, the starting position information of the vehicle at the starting point of the driving, and the terminal position information at the end point of the driving are determined, and based on the starting position information and the terminal position information, the target rotation angle from the driving starting point to the driving end point is determined, and based on the target rotation angle, at least one spiral path is generated, and based on the at least one spiral path, the target driving path of the vehicle is generated, so as to achieve the purpose of quickly generating a driving path that meets the curvature and curvature change rate. It is easy to notice that at least one spiral path is generated based on the starting position information and the terminal position information, and relies on less data, so that the generation efficiency of the spiral path is high, and the curvatures at different positions in the spiral path are different, so that the target driving finally generated meets the requirements of the curvature and curvature change rate, thereby achieving the technical effect of improving the efficiency of driving path generation and improving the accuracy of driving path generation, and thus solving the technical problem of low efficiency in generating paths that meet the requirements of curvature and curvature change rate in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0014] Figure 1 is a flow chart of a method for generating a driving path according to an embodiment of the present invention;
[0015] Figure 2 is a schematic diagram of a spiral path according to an embodiment of the present invention;
[0016] Figure 3 is a schematic diagram of a target driving path including two spiral paths according to an embodiment of the present invention;
[0017] Figure 4 is a schematic diagram of four line types of a target driving path according to an embodiment of the present invention;
[0018] Figure 5 is a schematic diagram of a mapping relationship corresponding to a parallel S-shaped curve according to an embodiment of the present invention;
[0019] Figure 6 is a schematic diagram of a special line type of a parallel S-shaped curve according to an embodiment of the present invention;
[0020] Figure 7 is a schematic diagram of a mapping relationship corresponding to a parallel C-shaped curve according to an embodiment of the present invention;
[0021] Figure 8 is a schematic diagram of a special line type of parallel C-shaped curves according to an embodiment of the present invention;
[0022] Fig. 9 is a schematic diagram of a mapping relationship corresponding to a non-parallel S-shaped curve according to an embodiment of the present invention;
[0023] Fig.10 is a schematic diagram of a special line type of a non-parallel S-shaped curve according to an embodiment of the present invention;
[0024] Fig.11 is a schematic diagram of a mapping relationship corresponding to a non-parallel C-shaped curve according to an embodiment of the present invention;
[0025] Fig.12 is a schematic diagram of a special line type of a non-parallel C-shaped curve according to an embodiment of the present invention;
[0026] Fig.13 is a schematic diagram of target spiral path generation according to an embodiment of the present invention;
[0027] Fig.14 is a schematic diagram of a target spiral path in a non-parallel situation according to an embodiment of the present invention;
[0028] Fig.15 is a schematic diagram of a target spiral path in a parallel situation according to an embodiment of the present invention;
[0029] Fig.16 is a schematic diagram of optional starting point posture information and end point posture information according to an embodiment of the present invention;
[0030] Fig.17is a schematic diagram of an optional first spiral path according to an embodiment of the present invention;
[0031] Fig.18 is a schematic diagram of an optional second spiral path according to an embodiment of the present invention;
[0032] Fig.19 is a schematic diagram of an optional target driving path according to an embodiment of the present invention;
[0033] Fig. 20 is a schematic diagram of a driving path generating device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] According to an embodiment of the present invention, a method embodiment of a method for generating a driving path is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0037] Figure 1 is a flow chart of a method for generating a driving path according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:
[0038] Step S102, determining the starting position information of the vehicle at the starting point of the journey, and the ending position information of the vehicle at the ending point of the journey.
[0039] The vehicle in the above steps can be a vehicle with an autonomous driving function, which can be a fuel vehicle, a new energy vehicle, etc. The type of vehicle can be determined according to the actual scenario. For example, in an open-pit mine operation scenario, the vehicle can be an autonomous driving mining truck, an autonomous driving excavator, and other operating vehicles, but is not limited to this.
[0040] The above-mentioned starting point of travel can be the position where the vehicle starts to travel, that is, the position where the vehicle starts, and the above-mentioned end point of travel can be the position where the vehicle stops traveling, that is, the position where the vehicle stops. These two positions can be selected by the user on the map, or they can be set in advance according to the task that the vehicle currently needs to perform. This application does not make any specific limitations on this.
[0041] The above-mentioned starting point position information may refer to the position and orientation of the vehicle's starting point in space, and the above-mentioned terminal position information may refer to the position and orientation of the vehicle's terminal in space, wherein the position of the vehicle at the starting point may be the coordinates of the starting point in space; the position of the vehicle at the terminal may be the coordinates of the terminal in space; the orientation of the vehicle at the starting point may refer to the direction in which the front of the vehicle is pointing at the starting point, which may be determined by a sensor; the orientation of the vehicle at the terminal may refer to the direction in which the front of the vehicle is pointing at the terminal, which may be determined based on the environment surrounding the terminal.
[0042] In an optional embodiment, when the user needs to use the vehicle, the user can select the starting point and the end point of the journey in the map, so that the automatic driving system or the control system can determine the starting position information of the vehicle at the starting point of the journey and the end point of the journey according to the starting point and the end point of the journey selected by the user.
[0043] In another optional embodiment, when the vehicle needs to perform a task, the autonomous driving system or server can determine the starting point and the end point of the journey based on the task information performed by the vehicle, so that the autonomous driving system or server can determine the starting position information of the vehicle at the starting point of the journey and the end point position information at the end point of the journey based on the task information.
[0044] Step S104: determining a target rotation angle from the driving starting point to the driving end point based on the starting point posture information and the end point posture information.
[0045] In an optional embodiment, a starting direction straight line at the starting point of travel can be established based on the orientation of the vehicle at the starting point of travel. Similarly, a terminal direction straight line at the end point of travel can be established based on the orientation of the vehicle at the end point of travel. The angle between the two straight lines is calculated to determine the above-mentioned target rotation angle.
[0046] Step S106, generating at least one spiral path based on the target rotation angle, wherein the curvatures at different positions on any spiral path are different.
[0047] In an optional embodiment, Figure 2 Taking the scenario shown as an example, the spiral path develops from the first straight line a1 where the driving start point is located, and finally reaches the second straight line a2 where the driving end point is located. For a spiral path with limited curvature and curvature change rate (as shown by the curve with an arrow in the figure), its curvature change rate can be kept constant as the extreme value of the curvature change rate. This complete spiral path starts with a curvature of zero, and the curvature gradually rises to the limit value of the curvature (i.e., the axis of symmetry a3 in the figure) at the maximum curvature change rate, and then rotates a certain angle while keeping the curvature unchanged, and then gradually decreases to zero at the maximum curvature change rate. This process is called the generation process of a standard spiral path. Considering that its curvature change rate is constant, the spiral path must have a symmetrical shape.
[0048] However, the above spiral line generation scheme requires a single turn from the starting point to the end point, which can only cover some scenarios in practice. Considering that the actual use scenarios of this technology have high regularity and non-dense obstacles, multiple spiral lines can be generated, and then multiple spiral lines can be used to connect the starting point and the end point. For example, Figure 3 A solution for a target driving path containing two spiral paths is given. The first spiral path s1 can be generated based on the straight line in the starting direction x1, and the second spiral path s2 can be generated based on the straight line in the end direction x2. Then, the driving starting point, the first spiral path, the second spiral path and the driving end point are directly connected together through l to obtain the final path.
[0049] Step S108, generating a target driving path of the vehicle based on at least one spiral path.
[0050] In an optional embodiment, when a spiral path is generated, the spiral path can be directly used as the target driving path. However, considering that the spiral path does not necessarily start from the driving starting point and does not necessarily reach the driving end point, the driving starting point and the spiral path, as well as the spiral path and the driving end point can be connected by a straight line to obtain the final target driving path.
[0051] In another optional embodiment, when multiple spiral paths are generated, the driving starting point and the multiple spiral paths, the multiple spiral paths, and the multiple spiral paths and the driving end point can be connected by straight lines to obtain the final target driving path.
[0052] Through the steps in the above-mentioned embodiments of the present application, the starting position information of the vehicle at the starting point of the driving, and the terminal position information at the end point of the driving are determined, and based on the starting position information and the terminal position information, the target rotation angle from the driving starting point to the driving end point is determined, and based on the target rotation angle, at least one spiral path is generated, and based on the at least one spiral path, the target driving path of the vehicle is generated, thereby achieving the purpose of quickly generating a driving path that meets the curvature and curvature change rate. It is easy to notice that at least one spiral path is generated based on the starting position information and the terminal position information, and relies on less data, so that the generation efficiency of the spiral path is high, and the curvatures at different positions in the spiral path are different, so that the target driving finally generated meets the requirements of the curvature and the curvature change rate, thereby achieving the technical effect of improving the efficiency of driving path generation and improving the accuracy of driving path generation, and thus solving the technical problem of low efficiency in generating paths that meet the requirements of curvature and curvature change rate in the related technology.
[0053] In the above embodiments of the present application, at least one spiral path is generated based on the target rotation angle, including: generating a target spiral path based on the target rotation angle, a preset curvature value of the vehicle and a preset turning radius, wherein the curvature of the target spiral path gradually increases from an initial value to a preset curvature value, and gradually decreases from the preset curvature value to the initial value; when the target spiral path meets the preset conditions, determining the target spiral path as a spiral path; when the target spiral path does not meet the preset conditions, determining the target line type of the target driving path based on the starting point posture information and the end point posture information, and generating multiple spiral paths based on the target rotation angle and the target line type, wherein the target line type includes one of the following: a parallel C-shaped curve, a parallel S-shaped curve, a non-parallel C-shaped curve and a non-parallel S-shaped curve.
[0054] The above-mentioned preset curvature value may be the maximum curvature value permitted by the vehicle, and the preset turning radius may be the maximum turning radius permitted by the vehicle. The specific value may be determined according to actual needs, and the application does not impose specific restrictions on this. The above-mentioned preset value may be the starting value of the curvature change. For example, considering that the spiral path is generated from a straight line in the direction of the starting point of the driving start point, the curvature may change from 0, so the value of the preset value may be 0, but it is not limited to this, and it may be set or adjusted according to actual needs.
[0055] The above-mentioned preset conditions can be conditions for determining whether a single generated spiral path, that is, a target spiral path, can be used. For example, whether the vehicle will turn back when traveling along the target spiral path from the starting point, whether it can reach the end of the journey, whether it will collide with an obstacle, etc., which can be set according to actual conditions, vehicle safety requirements, etc.
[0056] The target linear shape can be a shape composed of multiple spiral paths. In the embodiment of the present application, taking the generation of two spiral paths as an example, the target driving path can be roughly divided into the following: Figure 4 The four shapes shown are parallel S-shaped curve on the upper left, parallel C-shaped curve on the upper right, non-parallel S-shaped curve on the lower left, and non-parallel C-shaped curve on the lower right. Parallelism is used to measure the straight line in the direction of the starting point and the straight line in the direction of the end point, which can be determined by the target rotation angle; S-shaped curve and C-shaped curve are used to measure the curvature arc direction of multiple spiral paths, which can be determined by the relative relationship between the position of the driving starting point and the position of the driving end point. It should be noted that the C-shaped curve and S-shaped curve here are not required to be a standard shape, and a certain degree of similarity is sufficient.
[0057] In an optional embodiment, the method for generating a spiral path provided in the embodiment of the present application can be used to generate a spiral path in which the curvature gradually increases from a preset value to a preset curvature value, then maintains the preset curvature value until reaching the axis of symmetry, and then gradually decreases from the preset curvature value to the preset value in a completely symmetrical form, that is, the target spiral path mentioned above.
[0058] Then the target spiral path is judged to determine whether the target spiral path meets the preset conditions, that is, whether the target spiral path can be used and whether it meets the vehicle safety requirements. If it is determined that the target spiral path meets the preset conditions, that is, it is determined that the target spiral path can be used and meets the vehicle safety requirements, the target driving path can be directly generated according to the target spiral path, that is, the driving starting point and the driving terminal are directly connected to the target spiral path.
[0059] If it is determined that the target spiral path does not meet the preset conditions, that is, it is determined that the target spiral path cannot be used or does not meet the requirements of vehicle safety, it is determined that multiple spiral paths need to be regenerated. At this time, it is first necessary to determine the target line type corresponding to the target driving path based on the starting point posture information and the end point posture information. In order to improve the efficiency of spiral path generation, it is possible to analyze spiral paths of different line types, and pre-set spiral path generation algorithms for different line types. After determining the target line type, the spiral line path generation algorithm corresponding to the target linear path can be directly called to generate multiple spiral paths, and then the multiple spiral paths are spliced and connected with the driving starting point and the driving end point to achieve the purpose of generating the target driving path.
[0060] In the above embodiments of the present application, the starting point posture information includes: the starting point position and the starting point direction, and the end point posture information includes: the end point position and the end point direction; based on the starting point posture information and the end point posture information, the target line type of the target driving path is determined, including: based on the starting point direction and the end point direction, determining whether the first straight line at the driving starting point is parallel to the second straight line at the driving end point; based on the starting point position and the end point position, determining the shape of the target driving path; based on whether the first straight line is parallel to the second straight line and the shape of the target driving path, determining the target line type.
[0061] The starting point position may be the position of the driving starting point, the starting point direction may be the direction of the vehicle at the driving starting point, the end point position may be the position of the driving end point, and the end point direction may be the direction of the vehicle at the driving end point. The first straight line may be the starting point direction straight line at the driving starting point, and the second straight line may be the end point direction straight line at the driving end point.
[0062] In an optional embodiment, a first vector corresponding to the first straight line can be constructed based on the direction of the starting point, and a second vector corresponding to the second straight line can be constructed based on the direction of the end point. Then, by calculating the angle between the two vectors, it can be determined whether the two straight lines are parallel. Figure 4 It can be seen from the different line types shown that the relative direction between the starting point and the end point can be determined based on the starting point position and the end point position, and then the shape of the target driving path can be determined based on the relative direction. For example, if the relative direction between the starting point and the end point changes slightly, the shape of the target driving path can be determined to be a C-shaped curve. If the relative direction between the starting point and the end point changes significantly, the shape of the target driving path can be determined to be an S-shaped curve. Further, whether the two straight lines are parallel and the shape of the target driving path are determined to determine whether the target line type of the target driving path is a parallel S-shaped curve, a parallel C-shaped curve, a non-parallel S-shaped curve, or a non-parallel C-shaped curve.
[0063] It should be noted that the shape of the target driving path may also take into account the rotation requirements of the target driving path, the path length, the curvature change rate, and other target driving path requirements. For example, if the target driving path needs to include multiple turns, an S-shaped curve may be considered. If the target driving path requires a single-direction rotation, a C-shaped curve may be considered, but it is not limited thereto. In addition, obstacles in the space may also be considered. For example, if there are obstacles in the space, since the target driving path needs to bypass the obstacles, a more appropriate line type may be selected.
[0064] In the above embodiments of the present application, the multiple spiral paths include at least: a first spiral path connected to the starting point of driving, and a second spiral path connected to the end point of driving; based on the target rotation angle and the target line type, the multiple spiral paths are generated, including: based on the target line type, determining the first rotation angle corresponding to the first spiral path, and the second rotation angle corresponding to the second spiral path; based on the first rotation angle, a preset curvature value and a preset turning radius, generating the first spiral path, and based on the second rotation angle, the preset curvature value and the preset turning radius, generating the second spiral path.
[0065] In an optional embodiment, in order to generate a target driving path that better meets the requirements, two spiral paths can be generated based on the driving starting point and the driving end point, that is, the first spiral path can be generated based on the starting point direction straight line at the driving starting point, and the second spiral path can be generated based on the end point direction straight line at the driving end point. Since the two spiral paths are generated separately, it can be known from the generation algorithm based on the spiral path that in order to generate a suitable spiral path, it is necessary to determine the first rotation angle corresponding to the first spiral path and the second rotation angle corresponding to the second spiral path.
[0066] For the first spiral path, since there is only the starting point posture information, the rotation angle of the first spiral path is not fixed. Therefore, based on different line types, a suitable angle can be determined from multiple preset angles (such as 30°, 45°, 60°, 90°, etc.). The multiple preset angles here can be set as needed, and this application does not make specific restrictions on this; the suitable angle here can be to ensure that the generated first spiral path will not encounter obstacles and can meet the path generation requirements. Refer to Figure 4 It can be seen from the different line types shown that there is a certain correlation between the first rotation angle and the second rotation angle. For example, for parallel S-shaped curves, the first rotation angle and the second rotation angle are the same, and for parallel C-shaped curves, the sum of the first rotation angle and the second rotation angle is equal to π. Therefore, after determining the first rotation angle, the second rotation angle can be determined based on the correlation between the two rotation angles.
[0067] After the first rotation angle and the second rotation angle are determined, the first spiral path and the second spiral path may be generated respectively using the spiral path generation algorithm provided in the present application.
[0068] In the above embodiments of the present application, based on the target line type, a first rotation angle corresponding to the first spiral path and a second rotation angle corresponding to the second spiral path are determined, including: when the target line type includes a parallel S-shaped curve or a parallel C-shaped curve, based on the target distance between the first straight line at the starting point of travel and the second straight line at the end of travel, the first rotation angle and the second rotation angle are determined from multiple preset angles; when the target line type includes a non-parallel S-shaped curve or a non-parallel C-shaped curve, based on the target rotation angle, the first rotation angle and the second rotation angle are determined from multiple preset angles, wherein the sum of the first rotation angle and the second rotation angle is the target rotation angle.
[0069] The above-mentioned target distance may refer to the distance between two straight lines, which may be calculated by the vectors corresponding to the two straight lines. The present application does not limit the specific calculation process.
[0070] The above-mentioned multiple preset angles can be pre-set fixed angles for determining the rotation angle. For example, the multiple preset angles can include 30°, 45°, 60°, 90°, etc., or they can be angles determined based on a pre-set angle interval. For example, assuming that the angle interval is 10°, the multiple preset angles can include 10°, 20°, 30°, 40°, 50°, 60°, 70°, 80°, 90°, etc.
[0071] In an optional embodiment, for parallel S-shaped curves and parallel C-shaped curves, considering that the two spiral paths are located between the first straight line and the second straight line, and the spiral paths have a certain diameter, it is necessary to determine the first rotation angle from multiple preset angles based on the target distance between the first straight line and the second straight line, and then determine the second rotation angle based on the correlation between the first rotation angle and the second rotation angle.
[0072] In another optional embodiment, for non-parallel S-shaped curves and non-parallel C-shaped curves, considering that the sum of the first rotation angle and the second rotation angle is equal to the target rotation angle, and the spiral path has a certain diameter, it is necessary to determine the first rotation angle and the second rotation angle from multiple preset angles based on the target rotation angle.
[0073] In the above embodiment of the present application, a first spiral path is generated based on a first rotation angle, a preset curvature value and a preset turning radius, and a second spiral path is generated based on a second rotation angle, a preset curvature value and a preset turning radius, including: based on the target line type, determining a first target position from a first position interval corresponding to the first spiral path, and determining a second target position from a second position interval corresponding to the second spiral path, wherein the first position interval is used to characterize an interval in which the starting point of the first spiral path is allowed to be selected on a first straight line at the starting point of travel, and the second position interval is used to characterize an interval in which the end point of the second spiral path is allowed to be selected on a second straight line at the end point of travel; based on the first target position, the first rotation angle, the preset curvature value and the preset turning radius, the first spiral path is generated, and based on the second target position, the second rotation angle, the preset curvature value and the preset turning radius, the second spiral path is generated.
[0074] Since the first spiral path develops from the first straight line where the driving starting point is located, rather than from the driving starting point, the starting point of the first spiral path is often at a certain distance from the driving starting point. Therefore, in order to ensure that the target driving path meets the user's requirements, the user can pre-set an interval in which the starting point of the first spiral path slides on the first straight line, that is, set the first position interval, to ensure that the starting point of the first spiral path falls within the interval. Similarly, the user can pre-set an interval in which the end point of the second spiral path slides on the second straight line, that is, set the second position interval, to ensure that the end point of the second spiral path falls within the interval.
[0075] In an optional embodiment, after determining the target line type, the first target position can be determined from the first position interval corresponding to the first spiral path through a pre-set mapping relationship, and the second target position can be determined from the second position interval corresponding to the second spiral path. Then, the spiral path generation algorithm provided in the present application can be used to generate the first spiral path and the second spiral path respectively.
[0076] In another optional embodiment, after determining the target line type, a position can be randomly selected from a first position interval corresponding to the first spiral path, and a position can be randomly selected from a second position interval corresponding to the second spiral path, and then the spiral path generation algorithm provided in the present application can be used to generate the first spiral path and the second spiral path respectively. If the first spiral path and the second spiral path can be spliced normally and meet the conditions, it can be determined that the two randomly selected positions are the first target position and the second target position respectively, and then the spiral path generation algorithm provided in the present application can be used to generate the first spiral path and the second spiral path respectively.
[0077] In the above embodiment of the present application, based on the target line type, the first target position is determined from the first position interval corresponding to the first spiral path, and the second target position is determined from the second position interval corresponding to the second spiral path, including: based on the mapping relationship corresponding to the target line type, the second position interval is mapped to the first straight line to obtain a third position interval, wherein the mapping relationship is used to characterize the mapping relationship between the position of the starting point of the first spiral path and the position of the end point of the second spiral path; the intersection of the first position interval and the third position interval is obtained to obtain multiple first candidate positions of the starting point of the first spiral path; according to a preset path screening strategy, the first target position is determined from the multiple first candidate positions, and the second target position is determined based on the mapping relationship.
[0078] In order to accurately generate the first spiral path and the second spiral path, the present application analyzes four line types.
[0079] As Figure 5 Take the parallel S-shaped curve shown as an example. The curve first rotates a certain angle θ toward the end point, and then rotates in the opposite direction by the same angle θ. Assume that the sliding interval of the starting point start_s of the first spiral path on the first straight line is between start_negative and start_positive, and the sliding interval of the end point end_s of the first spiral path on the second straight line is between end_negative and end_positive. The horizontal and vertical offset distances of the first spiral path at the starting point are start_offset_x and start_offset_y respectively, and the horizontal and vertical offset distances of the second spiral path at the end point are end_offset_x and end_offset_y respectively. Then the following transformation relationship exists:
[0080] distance=dy+start_offset_y+end_offset_y
[0081] end_s-end_offset_x-dx-start_offset_x=start_s
[0082]
[0083] Where end_start_negative and end_start_positive are intervals that map end_negative and end_positive to the first straight line through the above transformation. Obviously, the starting point of the first spiral path must be in the intersection of the start_negative to start_positive interval and the end_start_negative to end_start_positive interval. In this way, a series of spiral trajectories that are exactly the same in shape and parallel to each other that meet the requirements can be obtained. Select any appropriate starting point of the first spiral path, generate the corresponding first spiral path and second spiral path, which is a suitable spiral combination.
[0084] It should be noted that for Figure 6 The three special line types shown can also use the above transformation relationship, but some calculation details need to be noted. For the left special line type, that is, when dx = 0, the straight line length between the two spiral paths can be directly equal to dy; for the middle special line type and the right special line type, it is sufficient to ensure the consistency of the coordinate system of the starting point and the end point of the trip.
[0085] As Figure 7 Taking the parallel C-shaped curve shown in FIG. 1 as an example, similar to the assumption in the parallel S-shaped curve, the starting point of the first spiral path and the end point of the second spiral path respectively have a sliding interval, wherein the first rotation angle corresponding to the first spiral path is θ α , the offset parallel to the starting direction is start_offset_x, and the offset perpendicular to the starting direction is start_offset_y; the offset of the middle straight line parallel to the starting direction is dx, and the offset perpendicular to the starting direction is dy; the second rotation angle corresponding to the second spiral path is θ β , the offset parallel to the starting point is end_offset_x, and the offset perpendicular to the starting point is end_offset_y. Then the following transformation relationship exists:
[0086] θ α +θ β =π
[0087] distance=dy+start_offset_y+end_offset_y
[0088] end_s+end_offset_x-dx-start_offset_x=start_s
[0089]
[0090] The above form can map the sliding interval of the end point of the second spiral path to the sliding interval of the starting point of the first spiral path, and only needs to select a suitable first rotation angle θ for the first spiral path. α , the first spiral path and the second spiral path that meet the requirements can be obtained.
[0091] It should be noted that for Figure 8 The special line type shown can also use the above transformation relationship, but some calculation details need to be noted. For this special line type, that is, when dx=0, the straight line length between the two spiral paths can be directly equal to dy.
[0092] As Fig. 9 Taking the non-parallel S-shaped curve shown as an example, similar to the parallel case, the starting point of the first spiral path and the end point of the second spiral path can slide within a certain range on the first straight line and the second straight line respectively, but different from the parallel case is that the offset values of the first spiral path and the second spiral path in each direction are bound to the corresponding coordinate axes, and the connecting straight line is determined by two rays with the middle NP as the vertex.
[0093] NP is determined based on the lateral deviation values start_offset_y and end_offset_y of the two spiral lines relative to their respective reference lines and the intersection point P of the start and end lines.
[0094] When P and the lateral deviation of the two helices are known, NP is calculated using the following formula:
[0095]
[0096] Where θ is the target rotation angle, is the unit vector of the first line, is the unit vector of the second line.
[0097] Then the corresponding NP offsets start_check_s and end_check_s relative to the start and end points can be determined.
[0098] Then, at the angle with NP as the vertex, the first spiral path and the second spiral path form a one-to-one correspondence, and their lengths a_s and b_s have the following relationship:
[0099]
[0100] Among them, θ α is the first rotation angle corresponding to the first spiral path, θ β is the second rotation angle corresponding to the second spiral path, and they have the following relationship: θ α +θβ =θ.
[0101] At the same time, the position of NP relative to the starting point of the first spiral path in the starting direction can be determined as:
[0102]
[0103] Similarly, the position of NP relative to the end point of the second spiral path in the end point direction can be obtained as:
[0104]
[0105] Then for the second spiral path with the end point at end_s, the starting point position start_s of the first spiral path that matches it can be obtained by the following formula:
[0106] a_s=start_s+start_offset_x-start_check_s
[0107] end_s=end_check_s-b_s+end_offset_x
[0108] Then the slidable interval at the end point of the first spiral path can be mapped to the first straight line, and the available spiral space can be confirmed by finding the intersection with the slidable interval at the starting point of the second spiral path.
[0109] It should be noted that for Fig.10 The special line types shown can also use the above transformation relationship, but some calculation details need to be paid attention to. For the two special line types, the above mapping relationship disappears, and any one that meets the requirements can be selected.
[0110] As Fig.11 Taking the non-parallel C-shaped curve shown in the figure as an example, the non-parallel C-shaped curve is a line type having the same rotation direction from the first helical path and the second helical path. The first rotation angle corresponding to the first helical path is θ α , the second rotation angle corresponding to the second spiral path is θ β , they have the following relationship: θ α +θ β =θ.
[0111] For example, in a non-parallel S-shaped curve, first determine the position of the new intersection point NP, and its relationship with the intersection point P of the start and end straight lines is:
[0112]
[0113] Similarly, the distance a_s between the end point of the first spiral path and the NP and the distance b_s between the end point of the second spiral path and the NP have the following relationship:
[0114]
[0115] At the same time, the position of NP relative to the starting point of the first spiral path in the starting direction can be determined as:
[0116]
[0117] Similarly, the position of NP relative to the end point of the second spiral path in the end point direction can be obtained as:
[0118]
[0119] Then the position start_s from the end point of the second spiral path to the starting point of the first spiral path can be obtained by the following formula:
[0120] a_s=start_check_s-start_s-start_offset_x
[0121] b_s=end_check_s-ends_s+end_offset_x
[0122] Then the slidable interval at the end point of the first spiral path can be mapped to the first straight line, and the available spiral space can be confirmed by finding the intersection with the slidable interval at the starting point of the second spiral path.
[0123] It should be noted that for Fig.12 The special line types shown can also use the above transformation relationship, but some calculation details need to be paid attention to. For the two special line types, the above mapping relationship disappears, and any one that meets the requirements can be selected.
[0124] Based on the above analysis, it can be known that for different line types, there is a specific transformation relationship between the first spiral path and the second spiral path. Therefore, based on the transformation relationship, the second position interval can be mapped to the first straight line to obtain a mapping position interval, and then the first target position can be determined from the intersection of the first position interval and the mapping position interval, and then the second target position can be determined based on the transformation relationship.
[0125] In the above embodiment of the present application, a target spiral path is generated based on a target rotation angle, a preset curvature value and a preset turning radius of the vehicle, including: generating a sub-path corresponding to a first iteration based on an initial value and an initial angle; determining a rotation angle corresponding to a second iteration after the first iteration based on a rotation angle corresponding to the first iteration and a preset angle increment; determining a curvature value corresponding to the second iteration based on a preset curvature value, a preset turning radius and a curvature value corresponding to the first iteration; generating a sub-path corresponding to the second iteration based on the curvature value and the rotation angle corresponding to the second iteration; treating the second iteration as the first iteration, and repeatedly executing the steps of determining a rotation angle corresponding to the second iteration, determining a curvature value corresponding to the second iteration and generating a sub-path corresponding to the second iteration until the rotation angle corresponding to the second iteration reaches the target rotation angle; merging sub-paths corresponding to multiple iterations to obtain a target spiral path.
[0126] The above-mentioned initial angle can be the direction of the starting point of the spiral path. For example, considering that the spiral path is generated from a straight line in the direction of the starting point of the driving start point, the value of the initial angle can be 0, but it is not limited to this and can be set or adjusted according to actual needs.
[0127] The above-mentioned preset angle increment may be the amount of change of the angle during each iteration, which may be represented by dθ.
[0128] In an optional embodiment, refer to Fig.13 Taking the generation process shown in the figure as an example, the length of the small segment used in each calculation is ds (that is, the subpath mentioned above). When ds is very small, the trajectory can be regarded as an arc of equal curvature. After passing this distance, the curvature increases from the curvature value kn-1 corresponding to the n-1 iteration to the curvature value kn corresponding to the n iteration. The specific formula is as follows:
[0129] kn=min(kmax,kn-1+ds*dkmax)
[0130] Where kmax is the maximum permissible curvature value, and dkmax is the maximum permissible turning radius.
[0131] According to the direction θ of the current point, the arc length ds and the curvature kn, the change in the xy coordinates and the change in the angle can be calculated:
[0132] ds=dθ*dkmax
[0133] θn=θ+dθ
[0134] This is a state transition process of ds length, considering that the curvature gradually increases to the maximum curvature, then maintains until it reaches the symmetry axis, and then gradually decreases from the maximum curvature to 0 in a completely symmetrical form and reaches the straight line at the end point at the same time.
[0135] It should be noted that in this process, the target spiral path is not required to start from the starting point and end at the end point, but it is required that the target spiral path must develop from the straight line at the starting point to the straight line at the end point. This has the following advantages: the target spiral path has a higher standardization form, that is, when the turning angle is determined, the target spiral path with the same curvature and curvature change rate constraints must be consistent; the change of the target spiral path is more controllable, and the curvature of the target spiral path must increase or decrease from zero and then return to zero; the start and end points can be directly connected to the target spiral path with a straight line, which is very convenient for splicing, and this path must be the spiral path with the shortest length.
[0136] This assumption reduces the complex problem of searching for a spiral path from the starting point to the end point into the problem of how to place a fixed-shape target spiral path between the starting point and the end point under a fixed turning angle. This greatly simplifies the search process and can directly and rigidly guarantee the limits on curvature and curvature change rate.
[0137] In the above embodiment of the present application, the method also includes: based on the target rotation angle, determining whether the first straight line at the starting point of travel is parallel to the second straight line at the end point of travel, wherein the direction of the first straight line is consistent with the starting point posture information, and the direction of the second straight line is the same as the end point posture information; when the first straight line is not parallel to the second straight line, determining whether the target spiral path meets the preset conditions based on the length of the target spiral path, the target rotation angle, the starting point posture information and the end point posture information; when the first straight line is parallel to the second straight line, determining whether the target spiral path meets the preset conditions based on the length of the target spiral path and the target distance between the first straight line and the second straight line.
[0138] In an optional embodiment, when the starting point and the end point are determined, the angle θ of the single turn is also determined, and the line type of the spiral path given by the corresponding single turn is also determined. At this time, the distance between the starting point and the end point on the spiral path can be calculated, that is, the length string_length of the arc. On this basis, if the first straight line is not parallel to the second straight line, at this time, the length string_length and the target rotation angle θ can be used to determine whether the target spiral path meets the preset conditions. If the first straight line is parallel to the second straight line, at this time, only the length string_length and the target distance distance between the two straight lines are compared.
[0139] In the above-mentioned embodiment of the present application, based on the length of the target spiral path, the target rotation angle, the starting point posture information and the end point posture information, determining whether the target spiral path meets the preset conditions includes: determining a first length corresponding to the driving starting point and a second length corresponding to the driving end point based on the length of the target spiral path and the target rotation angle, wherein the first length is used to characterize the length of the line segment between the starting point of the target spiral path and the target intersection, and the second length is used to characterize the length of the line segment between the end point of the target spiral path and the target intersection, and the target intersection is used to characterize the intersection between the first straight line and the second straight line; determining a first distance between the driving starting point and the target intersection based on the starting point posture information, and determining a second distance between the driving end point and the target intersection based on the end point posture information; determining that the target spiral path meets the preset conditions when the difference between the first distance and the first length is less than the first preset difference, and the difference between the second distance and the second length is less than the second preset difference; determining that the target spiral path does not meet the preset conditions when the difference between the first distance and the first length is greater than or equal to the first preset difference, or the difference between the second distance and the second length is greater than or equal to the second preset difference.
[0140] In an optional embodiment, if Fig.14 As shown, according to symmetry, the triangle formed by the intersection of the starting point and the end point and the starting point and the end point is an isosceles triangle with a base angle of 0.5θ, that is, the first length and the second length are the same and can be represented by dl, which can be calculated by the following formula: dl = 0.5*string_length*cos(0.5θ). After calculating dl, it is necessary to compare the corresponding distances between the starting point and the end point and the intersection to determine whether they are available, that is, if the difference between the first distance and dl is less than the first preset difference, and the difference between the second distance and dl is less than the second preset difference, it is determined that the target spiral path meets the preset conditions; if the difference between the first distance and dl is greater than or equal to the first preset difference, or the difference between the second distance and dl is greater than or equal to the second preset difference, it is determined that the target spiral path does not meet the preset conditions.
[0141] In the above embodiments of the present application, based on the length of the target spiral path and the target distance between the first straight line and the second straight line, it is determined whether the target spiral path meets the preset conditions, including: when the length of the target spiral path is greater than or equal to the target distance, it is determined that the target spiral path meets the preset conditions; when the length of the target spiral path is less than the target distance, it is determined that the target spiral path does not meet the preset conditions.
[0142] In an optional embodiment, if Fig.15As shown, if the length string_length is greater than or equal to the target distance distance, it is determined that the target spiral path meets the preset condition; if the length string_length is less than the target distance distance, it is determined that the target spiral path does not meet the preset condition.
[0143] In the above embodiment of the present application, a target driving path of the vehicle is generated based on at least one spiral path, including: when generating one spiral path, connecting the spiral path with the driving starting point and the driving end point to obtain the target driving path; when generating multiple spiral paths, splicing the multiple spiral paths through straight lines to obtain a spliced path, and connecting the spliced path with the driving starting point and the driving end point to obtain the target driving path.
[0144] In an optional embodiment, considering that the spiral path is not directly generated based on the driving starting point and the driving end point, therefore, if only one spiral path is generated, it is only necessary to connect the spiral path with the driving starting point and the driving end point to obtain the target driving path; if multiple spiral paths are generated, the multiple spiral paths can be first spliced with straight lines, and then connected with the driving starting point and the driving end point to obtain the target driving path.
[0145] Combine the following Figures 16 to 19 A preferred embodiment of the present application is described in detail. Fig.16 As shown, the sliding interval of the spiral path at the starting point is from start_negative to start_positive, and the sliding interval of the spiral at the end point is from end_negative to end_positive. Non-parallel C-shaped spirals can be used to connect. Starting from an angle of 0°, the angle increment dθ is used for each round of calculation. Suppose that in a certain iteration, the first rotation angle corresponding to the first spiral path is θ α , the second rotation angle corresponding to the second spiral path is θ β , the corresponding relationship between the two angles is as described above. Fig.17 and Fig.18 As shown in the figure, the line type of the corresponding spiral path can be calculated based on the two rotation angles, and the corresponding parameters start_offset_x, start_offset_y, end_offset_x and end_offset_y can be obtained. Fig.19As shown in the figure, after getting start_check_s and end_check_s, the sliding range of the spiral line at the end point can be mapped to the starting line to find the intersection, and the actual sliding range of the starting point from start_s_start to start_s_end can be determined. In the sliding range of the starting point, the starting point start_s of the spiral line at the starting point is selected with an appropriate iteration interval and the corresponding spiral line at the starting point is generated, and then the corresponding spiral line at the end point is generated and spliced to obtain the final path. The credibility of the path is analyzed, and if it is satisfied, the corresponding path can be jumped out and output.
[0146] Through the above scheme, the present application has the following advantages: the curvature and curvature change rate of the spiral path are both rigidly controllable; the line shape of the spiral path is directly controllable by selecting different starting and ending point sliding interval lengths and combination forms; the calculation speed is very fast and the success rate is extremely high in open spaces without dense obstacles; the generated path meets human intuitive expectations and is highly interpretable.
[0147] According to an embodiment of the present invention, a device embodiment of a driving path generation device is provided. It should be noted that the device can be used to execute the above-mentioned driving path generation method. The specific implementation method and preferred application scenario are the same as the above-mentioned embodiment, and will not be repeated here.
[0148] Fig. 20 is a schematic diagram of a driving path generation device according to an embodiment of the present invention, such as Fig. 20 As shown, the device comprises:
[0149] The posture information determination module 2002 is used to determine the starting posture information of the vehicle at the starting point of the journey, and the terminal posture information at the end point of the journey; the rotation angle determination module 2004 is used to determine the target rotation angle from the starting point of the journey to the end point of the journey based on the starting posture information and the end posture information; the spiral path generation module 2006 is used to generate at least one spiral path based on the target rotation angle, wherein the curvatures at different positions on any spiral path are different; the driving path generation module 2008 is used to generate the target driving path of the vehicle based on at least one spiral path.
[0150] In the above embodiments of the present application, the spiral path generation module includes: an initial path generation unit, which is used to generate a target spiral path based on a target rotation angle, a preset curvature value of the vehicle and a preset turning radius, wherein the curvature of the target spiral path gradually increases from an initial value to a preset curvature value, and gradually decreases from the preset curvature value to the initial value; a spiral path determination unit, which is used to determine that the target spiral path is a spiral path when the target spiral path meets preset conditions; a spiral path generation unit, which is used to determine the target line type of the target driving path based on the starting point posture information and the end point posture information when the target spiral path does not meet the preset conditions, and to generate multiple spiral paths based on the target rotation angle and the target line type, wherein the target line type includes one of the following: a parallel C-shaped curve, a parallel S-shaped curve, a non-parallel C-shaped curve and a non-parallel S-shaped curve.
[0151] In the above embodiments of the present application, the starting point posture information includes: the starting point position and the starting point direction, and the end point posture information includes: the end point position and the end point direction; the spiral path generation unit includes: a parallel determination subunit, which is used to determine whether the first straight line at the starting point of travel is parallel to the second straight line at the end point of travel based on the starting point direction and the end point direction; a shape determination subunit, which is used to determine the shape of the target driving path based on the starting point position and the end point position; and a line type determination subunit, which is used to determine the target line type based on whether the first straight line is parallel to the second straight line and the shape of the target driving path.
[0152] In the above-mentioned embodiment of the present application, the multiple spiral paths include at least: a first spiral path connected to the starting point of driving, and a second spiral path connected to the end point of driving; the spiral path generation unit includes: an angle determination subunit, which is used to determine, based on the target line type, a first rotation angle corresponding to the first spiral path, and a second rotation angle corresponding to the second spiral path; a path generation subunit, which is used to generate the first spiral path based on the first rotation angle, a preset curvature value and a preset turning radius, and to generate the second spiral path based on the second rotation angle, the preset curvature value and the preset turning radius.
[0153] In the above embodiment of the present application, the angle determination subunit is also used to perform the following steps: when the target line type includes parallel S-shaped curves or parallel C-shaped curves, based on the target distance between the first straight line at the starting point of driving and the second straight line at the end point of driving, determine the first rotation angle and the second rotation angle from multiple preset angles; when the target line type includes non-parallel S-shaped curves or non-parallel C-shaped curves, based on the target rotation angle, determine the first rotation angle and the second rotation angle from multiple preset angles, wherein the sum of the first rotation angle and the second rotation angle is the target rotation angle.
[0154] In the above embodiment of the present application, the path generation subunit is also used to perform the following steps: based on the target line type, determine the first target position from the first position interval corresponding to the first spiral path, and determine the second target position from the second position interval corresponding to the second spiral path, wherein the first position interval is used to characterize the interval of positions allowed to be selected from the starting point of the first spiral path on the first straight line where the driving starting point is located, and the second position interval is used to characterize the interval of positions allowed to be selected from the end point of the second spiral path on the second straight line where the driving end point is located; based on the first target position, the first rotation angle, the preset curvature value and the preset turning radius, generate the first spiral path, and based on the second target position, the second rotation angle, the preset curvature value and the preset turning radius, generate the second spiral path.
[0155] In the above embodiment of the present application, the path generation subunit is also used to perform the following steps: based on the mapping relationship corresponding to the target line type, mapping the second position interval to the first straight line to obtain a third position interval, wherein the mapping relationship is used to characterize the mapping relationship between the position of the starting point of the first spiral path and the position of the end point of the second spiral path; obtaining the intersection of the first position interval and the third position interval to obtain multiple first candidate positions of the starting point of the first spiral path; determining the first target position from the multiple first candidate positions according to the preset path screening strategy, and determining the second target position based on the mapping relationship.
[0156] In the above-mentioned embodiment of the present application, the initial path generation unit is also used to perform the following steps: based on the initial value and the initial angle, generate a sub-path corresponding to the first iteration; based on the rotation angle corresponding to the first iteration and the preset angle increment, determine the rotation angle corresponding to the second iteration after the first iteration; based on the preset curvature value, the preset turning radius and the curvature value corresponding to the first iteration, determine the curvature value corresponding to the second iteration; based on the curvature value and the rotation angle corresponding to the second iteration, generate a sub-path corresponding to the second iteration; take the second iteration as the first iteration, and repeat the steps of determining the rotation angle corresponding to the second iteration, determining the curvature value corresponding to the second iteration, and generating the sub-path corresponding to the second iteration until the rotation angle corresponding to the second iteration reaches the target rotation angle; merge the sub-paths corresponding to multiple iterations to obtain the target spiral path.
[0157] In the above-mentioned embodiment of the present application, the device also includes: a parallel determination module, which is used to determine whether a first straight line at the starting point of travel is parallel to a second straight line at the end point of travel based on a target rotation angle, wherein the direction of the first straight line is consistent with the starting point posture information, and the direction of the second straight line is the same as the end point posture information; a first condition determination module, which is used to determine whether the target spiral path meets a preset condition based on the length of the target spiral path, the target rotation angle, the starting point posture information and the end point posture information when the first straight line is not parallel to the second straight line; a second condition determination module, which is used to determine whether the target spiral path meets a preset condition based on the length of the target spiral path and the target distance between the first straight line and the second straight line when the first straight line is parallel to the second straight line.
[0158] In the above-mentioned embodiment of the present application, the first condition determination module includes: a length determination unit, which is used to determine the first length corresponding to the driving starting point and the second length corresponding to the driving end point based on the length of the target spiral path and the target rotation angle, wherein the first length is used to characterize the length of the line segment between the starting point of the target spiral path and the target intersection, and the second length is used to characterize the length of the line segment between the end point of the target spiral path and the target intersection, and the target intersection is used to characterize the intersection between the first straight line and the second straight line; a distance determination unit, which is used to determine the first distance between the driving starting point and the target intersection based on the starting point posture information, and to determine the second distance between the driving end point and the target intersection based on the end point posture information; the first condition determination unit, which is used to determine that the target spiral path meets the preset condition when the difference between the first distance and the first length is less than the first preset difference, and the difference between the second distance and the second length is less than the second preset difference; the second condition determination unit, which is used to determine that the target spiral path does not meet the preset condition when the difference between the first distance and the first length is greater than or equal to the first preset difference, or the difference between the second distance and the second length is greater than or equal to the second preset difference.
[0159] In the above embodiment of the present application, the second condition determination module includes: a third condition determination unit, which is used to determine that the target spiral path meets the preset condition when the fiber length of the target spiral path is greater than or equal to the target distance; and a fourth condition determination unit, which is used to determine that the target spiral path does not meet the preset condition when the fiber length of the target spiral path is less than the target distance.
[0160] In the above-mentioned embodiment of the present application, the driving path generation module includes: a path connection unit, which is used to connect the spiral path with the driving starting point and the driving end point to obtain a target driving path when generating a spiral path; a path splicing unit, which is used to splice the multiple spiral paths through a straight line to obtain a spliced path when generating multiple spiral paths, and connect the spliced path with the driving starting point and the driving end point to obtain the target driving path.
[0161] An embodiment of the present application further provides an electronic device, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the methods in various embodiments of the present invention when running.
[0162] An embodiment of the present application further provides a computer-readable storage medium, which includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the methods in various embodiments of the present invention.
[0163] An embodiment of the present application further provides a computer program product, including a computer program, which implements the methods in various embodiments of the present invention when executed by a processor.
[0164] An embodiment of the present application further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium is used to store a computer program, and when the computer program is executed by a processor, the method in each embodiment of the present invention is implemented.
[0165] The embodiments of the present application further provide a computer program, which implements the methods in the above-mentioned embodiments of the present invention when executed by a processor.
[0166] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0167] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0168] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0169] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0171] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for generating a driving route, characterized in that: include: Determine the starting position information of the vehicle at the starting point of the journey, and the ending position information of the vehicle at the end point of the journey; Determining a target rotation angle from the driving starting point to the driving end point based on the starting point position information and the end point position information; Based on the target rotation angle, generating at least one spiral path, wherein the curvatures at different positions on any spiral path are different; Based on the at least one spiral path, a target driving path of the vehicle is generated.
2. The method according to claim 1, characterized in that: The step of generating at least one spiral path based on the target rotation angle comprises: Generate a target spiral path based on the target rotation angle, a preset curvature value of the vehicle, and a preset turning radius, wherein the curvature of the target spiral path gradually increases from an initial value to the preset curvature value, and gradually decreases from the preset curvature value to the initial value; In the case where the target spiral path meets a preset condition, determining that the target spiral path is a spiral path; When the target spiral path does not meet the preset conditions, the target line type of the target driving path is determined based on the starting point posture information and the end point posture information, and multiple spiral paths are generated based on the target rotation angle and the target line type, wherein the target line type includes one of the following: parallel C-shaped curves, parallel S-shaped curves, non-parallel C-shaped curves and non-parallel S-shaped curves.
3. The method according to claim 2, characterized in that The starting point posture information includes: starting point position and starting point direction, and the end point posture information includes: end point position and end point direction; determining the target line type of the target driving path based on the starting point posture information and the end point posture information includes: Based on the starting point direction and the end point direction, determining whether a first straight line at the driving starting point is parallel to a second straight line at the driving end point; Determining a shape of the target driving path based on the starting point position and the end point position; The target line type is determined based on whether the first straight line is parallel to the second straight line and the shape of the target driving path.
4. The method according to claim 2 or 3, characterized in that: The plurality of spiral paths at least include: a first spiral path connected to the driving starting point, and a second spiral path connected to the driving end point; based on the target rotation angle and the target line type, the plurality of spiral paths are generated, including: Based on the target line type, determining a first rotation angle corresponding to the first helical path and a second rotation angle corresponding to the second helical path; The first helical path is generated based on the first rotation angle, the preset curvature value, and the preset turning radius, and the second helical path is generated based on the second rotation angle, the preset curvature value, and the preset turning radius.
5. The method according to claim 4, characterized in that The determining, based on the target line type, a first rotation angle corresponding to the first spiral path and a second rotation angle corresponding to the second spiral path comprises: In a case where the target line type includes a parallel S-shaped curve or a parallel C-shaped curve, based on a target distance between a first straight line at the driving starting point and a second straight line at the driving end point, determining the first rotation angle and the second rotation angle from a plurality of preset angles; When the target line type includes a non-parallel S-shaped curve or a non-parallel C-shaped curve, the first rotation angle and the second rotation angle are determined from the multiple preset angles based on the target rotation angle, wherein the sum of the first rotation angle and the second rotation angle is the target rotation angle.
6. The method according to claim 4 or 5, characterized in that: The generating of the first helical path based on the first rotation angle, the preset curvature value and the preset turning radius, and the generating of the second helical path based on the second rotation angle, the preset curvature value and the preset turning radius comprises: Based on the target line type, a first target position is determined from a first position interval corresponding to the first spiral path, and a second target position is determined from a second position interval corresponding to the second spiral path, wherein the first position interval is used to represent an interval of positions that are allowed to be selected by the starting point of the first spiral path on the first straight line where the travel starting point is located, and the second position interval is used to represent an interval of positions that are allowed to be selected by the end point of the second spiral path on the second straight line where the travel end point is located; The first spiral path is generated based on the first target position, the first rotation angle, the preset curvature value and the preset turning radius, and the second spiral path is generated based on the second target position, the second rotation angle, the preset curvature value and the preset turning radius.
7. The method according to claim 6, characterized in that The step of determining a first target position from a first position interval corresponding to the first spiral path based on the target line type, and determining a second target position from a second position interval corresponding to the second spiral path, comprises: Based on the mapping relationship corresponding to the target line type, the second position interval is mapped to the first straight line to obtain a third position interval, wherein the mapping relationship is used to represent the mapping relationship between the position of the starting point of the first spiral path and the position of the end point of the second spiral path; Obtaining the intersection of the first position interval and the third position interval to obtain a plurality of first candidate positions of the starting point of the first spiral path; According to a preset path screening strategy, the first target position is determined from the multiple first candidate positions, and the second target position is determined based on the mapping relationship.
8. The method according to any one of claims 2 to 7, characterized in that The generating a target spiral path based on the target rotation angle, a preset curvature value of the vehicle and a preset turning radius includes: Based on the initial value and the initial angle, generate a subpath corresponding to the first iteration; Determining a rotation angle corresponding to a second iteration after the first iteration based on the rotation angle corresponding to the first iteration and a preset angle increment; Determining a curvature value corresponding to the second iteration based on the preset curvature value, the preset turning radius, and the curvature value corresponding to the first iteration; generating a subpath corresponding to the second iteration based on the curvature value and the rotation angle corresponding to the second iteration; Taking the second iteration as the first iteration, and repeatedly performing the steps of determining a rotation angle corresponding to the second iteration, determining a curvature value corresponding to the second iteration, and generating a subpath corresponding to the second iteration, until the rotation angle corresponding to the second iteration reaches the target rotation angle; The sub-paths corresponding to multiple iterations are merged to obtain the target spiral path.
9. The method according to any one of claims 2 to 8, characterized in that The method further comprises: Based on the target rotation angle, determining whether a first straight line at the driving starting point is parallel to a second straight line at the driving end point, wherein the direction of the first straight line is consistent with the starting point posture information, and the direction of the second straight line is the same as the end point posture information; In the case where the first straight line is not parallel to the second straight line, determining whether the target spiral path meets the preset condition based on the length of the target spiral path, the target rotation angle, the starting point position information and the end point position information; In the case that the first straight line is parallel to the second straight line, it is determined whether the target helical path meets the preset condition based on the length of the target helical path and the target distance between the first straight line and the second straight line.
10. The method according to claim 9, characterized in that The determining whether the target spiral path meets the preset condition based on the length of the target spiral path, the target rotation angle, the starting point position information and the end point position information includes: Based on the length of the target spiral path and the target rotation angle, determine a first length corresponding to the driving starting point and a second length corresponding to the driving end point, wherein the first length is used to characterize the length of the line segment between the starting point of the target spiral path and the target intersection point, and the second length is used to characterize the length of the line segment between the end point of the target spiral path and the target intersection point, and the target intersection point is used to characterize the intersection point between the first straight line and the second straight line; Determine a first distance between the driving starting point and the target intersection based on the starting point position information, and determine a second distance between the driving end point and the target intersection based on the end point position information; When the difference between the first distance and the first length is less than a first preset difference, and the difference between the second distance and the second length is less than a second preset difference, determining that the target spiral path satisfies the preset condition; When the difference between the first distance and the first length is greater than or equal to the first preset difference, or the difference between the second distance and the second length is greater than or equal to the second preset difference, it is determined that the target spiral path does not meet the preset condition.
11. The method according to claim 9, characterized in that The determining whether the target spiral path satisfies the preset condition based on the length of the target spiral path and the target distance between the first straight line and the second straight line includes: In a case where the length of the target helical path is greater than or equal to the target distance, determining that the target helical path satisfies the preset condition; When the length of the target helical path is less than the target distance, it is determined that the target helical path does not satisfy the preset condition.
12. The method according to any one of claims 1 to 11, characterized in that The step of generating a target driving path of the vehicle based on the at least one spiral path includes: When a spiral path is generated, the spiral path is connected with the driving starting point and the driving end point to obtain the target driving path; When a plurality of spiral paths are generated, the plurality of spiral paths are spliced together by straight lines to obtain a spliced path, and the spliced path is connected with the travel starting point and the travel end point to obtain the target travel path.
13. A driving route generation device, characterized in that: include: A posture information determination module is used to determine the starting posture information of the vehicle at the starting point of the journey, and the terminal posture information at the end point of the journey; A rotation angle determination module, used to determine a target rotation angle from the driving starting point to the driving end point based on the starting point posture information and the end point posture information; A spiral path generation module, used to generate at least one spiral path based on the target rotation angle, wherein the curvatures at different positions on any spiral path are different; The driving path generation module is used to generate a target driving path of the vehicle based on the at least one spiral path.
