Vehicle local trajectory planning method, electronic device and vehicle
By selecting lane reference trajectory points for fitting in autonomous driving, a unique local trajectory is generated, which solves the problem of excessive time consumption in existing methods, improves real-time performance and trajectory generation efficiency, and ensures the continuity and comfort of vehicle driving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-27
- Publication Date
- 2026-03-20
AI Technical Summary
Existing local planning methods for autonomous driving are too time-consuming to meet real-time requirements, and the trajectory planning process is complex.
By selecting at least two reference trajectory points on the reference trajectory line of the vehicle's current lane for fitting, a unique local trajectory is generated, avoiding the construction of cumbersome loss functions and simplifying the planning process.
It improves the efficiency of local trajectory generation, meets the real-time requirements of autonomous driving, and generates a coherent and smooth trajectory, making vehicle driving more comfortable.
Smart Images

Figure CN117002497B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent driving, and in particular to a vehicle local trajectory planning method, an electronic device and a vehicle. BACKGROUND
[0002] The existing automatic driving local planning usually uses a Lattice Planner method or an EM Planner method, both of which adopt a horizontal and vertical multi-point sampling method, so that the number of trajectory clusters after the combination of horizontal and vertical trajectories is large. In the Lattice Planner method, 12 trajectories are generated in horizontal planning, and 50 trajectories are generated in vertical planning, so that the number of trajectory clusters after the combination of horizontal and vertical trajectories reaches 600, and the time consumption of outputting the optimal trajectory by the entire Lattice Planner method is as high as 100 milliseconds or more. High time consumption is very unfavorable for the automatic driving system which has high real-time requirements. In the EM Planner method, DP (Dynamic Programming) and QP (Quadratic Programming) are used for path and speed planning respectively in the decoupling of horizontal and vertical directions, resulting in more parameters and a complex process. SUMMARY
[0003] To solve the above technical problems, the present application provides a vehicle local trajectory planning method, an electronic device and a vehicle. At least two reference trajectory points on a first reference trajectory line are selected, and a unique local trajectory can be obtained by fitting the at least two reference trajectory points, avoiding the construction of a complex loss function, simplifying the process, making it easier to obtain the trajectory in time, improving the generation efficiency of the local trajectory, and meeting the real-time requirements of automatic driving.
[0004] The first aspect of the present application provides a vehicle local trajectory planning method, which comprises: when it is determined that the vehicle keeps driving in a current lane, acquiring a first reference trajectory line of the lane where the vehicle is located from a map, the first reference trajectory line comprising a plurality of first reference trajectory points; selecting at least two target reference trajectory points from the plurality of first reference trajectory points according to the current position of the vehicle; and fitting each target reference trajectory point to obtain a local trajectory, so that the vehicle drives according to the local trajectory.
[0005] The second aspect of the present application further provides a vehicle local trajectory planning device, which comprises a memory and a processor, and the memory stores a computer program for calling by the processor to execute after the calling, so as to realize the vehicle local trajectory planning method described above.
[0006] The third aspect of the present application further provides a vehicle, which comprises the electronic device described above.
[0007] A fourth aspect of this application also provides a computer-readable storage medium storing a computer program, which is executed by a processor to implement the aforementioned vehicle local trajectory planning method.
[0008] The vehicle local trajectory planning method, electronic device, vehicle, and computer-readable storage medium provided in this application can obtain a unique local trajectory by selecting at least two reference trajectory points on the first reference trajectory line and fitting the at least two reference trajectory points. This avoids the need to construct a cumbersome loss function, simplifies the process, makes it easier to obtain the trajectory in a timely manner, improves the efficiency of local trajectory generation, and can meet the real-time requirements of autonomous driving. Attached Figure Description
[0009] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0010] Figure 1 A flowchart of a vehicle local trajectory planning method provided in an embodiment of this application.
[0011] Figure 2 for Figure 1 The sub-flowchart of step S02.
[0012] Figure 3 This is a schematic diagram of the first reference trajectory line, the vehicle's current position, and the local trajectory of the previous frame in the Cartesian coordinate system.
[0013] Figure 4 This is a flowchart for determining the target local trajectory points provided in the embodiments of this application.
[0014] Figure 5 This is a flowchart illustrating the generation of a target velocity trajectory provided in an embodiment of this application.
[0015] Figure 6 This is a schematic diagram of a candidate velocity trajectory planning model based on ST graphs provided in an embodiment of this application.
[0016] Figure 7 for Figure 5 The sub-flowchart of step S11.
[0017] Figure 8 A flowchart illustrating the planning method for the local trajectory of a vehicle changing lanes to overtake.
[0018] Figure 9 This is a schematic diagram of a planning model for the local trajectory of a lane change based on a lane change point heatmap.
[0019] Figure 10 For Figure 8 The subflowchart of step S18.
[0020] Figure 11 The flowchart of generating a target speed trajectory provided by another embodiment of the present application.
[0021] Figure 12 The schematic diagram of a candidate speed trajectory planning model based on an ST graph provided by another embodiment of the present application. DETAILED DESCRIPTION
[0022] The technical solutions in the embodiments of the present application will be clearly and completely described in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the protection scope of the present application.
[0023] In the description of the present application, the terms "first", "second", and the like are used to distinguish different objects, and are not used to describe a specific order, and therefore cannot be understood as a limitation on the present application.
[0024] In the description of the present application, unless otherwise explicitly specified and limited, the term "connection" should be understood broadly, for example, it can be a fixed connection, or a detachable connection, or an integral connection; it can be directly connected, or indirectly connected through an intermediate medium, or the internal communication of two elements; it can be a communication connection; it can be an electrical connection. For a person of ordinary skill in the art, the specific meaning of the above-mentioned term in the present application can be understood according to the specific circumstances.
[0025] Please refer to Figure 1 , Figure 1 The flowchart of a vehicle local trajectory planning method provided by an embodiment of the present application. As shown in Figure 1 The vehicle local trajectory planning method comprises the following steps:
[0026] S01: When it is determined that the vehicle keeps driving in the current lane, a first reference trajectory line of the lane where the vehicle is located is acquired from a map, and the first reference trajectory line comprises a plurality of first reference trajectory points.
[0027] S02: At least two target reference trajectory points are selected from the plurality of first reference trajectory points according to the current position of the vehicle.
[0028] S03: Each target reference trajectory point is fitted to obtain a local trajectory, so that the vehicle drives according to the local trajectory.
[0029] The vehicle local trajectory planning method provided by the embodiments of the present application can obtain a unique local trajectory by selecting at least two reference trajectory points on the first reference trajectory line and fitting the at least two reference trajectory points, avoid constructing a complicated loss function, and has a simple process, is easier to obtain a trajectory in time, improves the generation efficiency of the local trajectory, and can meet the real-time requirement of automatic driving.
[0030] In some embodiments, the vehicle comprises a perception module, a prediction module and a decision module. The perception module is configured to obtain obstacle information around the vehicle, the obstacle information comprising whether there is a preceding vehicle in front of a lane where the vehicle is located and a distance between the preceding vehicle and the vehicle and an angle of the preceding vehicle relative to the vehicle when there is a preceding vehicle. The prediction module is configured to obtain a predicted trajectory of an obstacle according to a behavior of the obstacle. The decision module is configured to determine a driving mode of the vehicle, such as cruise driving, following driving, or lane changing and overtaking driving. When there is no obstacle around the vehicle or the distance between the obstacle and the vehicle is greater than a preset distance, the decision module determines that the vehicle is in cruise driving, i.e., the vehicle travels at a constant speed. When the distance between the obstacle and the vehicle is less than or equal to the preset distance, the decision module determines the driving mode of the vehicle according to the predicted trajectory of the obstacle predicted by the prediction module, such as following driving or lane changing and overtaking driving. The preset distance can be a safe driving distance set according to actual requirements.
[0031] In some embodiments, the first reference trajectory line can be a center line of the lane where the vehicle is located. In some embodiments, the vehicle further comprises a navigation module, and the navigation module stores a high-definition map. The vehicle can obtain the first reference trajectory line through the high-definition map.
[0032] Please refer to Figure 2 , Figure 2 for a subflowchart of step S02. In some embodiments, as shown in Figure 1 , the step of selecting at least two target reference trajectory points from the plurality of first reference trajectory points according to the current position of the vehicle comprises: Figure 2
[0033] S021: determining a first reference trajectory point on the first reference trajectory line closest to the current position of the vehicle, denoted as a first target point.
[0034] S022: taking the first target point and target number of first reference trajectory points after the first target point on the first reference trajectory line as the at least two target reference trajectory points.
[0035] The positions of multiple first trajectory points of the first reference trajectory line can be obtained through the high-precision map. The position of each first reference trajectory point can be represented by coordinate values in a Cartesian coordinate system. For example, a plane rectangular coordinate system is established on the surface of the lane with a certain point in the lane where the vehicle is located as the origin of the Cartesian coordinate system. The plane rectangular coordinate system includes mutually perpendicular x-axis and y-axis. The position of the first reference trajectory point in the plane rectangular coordinate system is (x, y).
[0036] In some embodiments, the vehicle further includes a positioning module, which can obtain the current position of the vehicle. In some embodiments, the current position of the vehicle can be represented by coordinate values in a Cartesian coordinate system. By comparing the coordinate values of the current position with the coordinate values of the plurality of first reference trajectory points, the position of the first reference trajectory point closest to the current position on the first reference trajectory line can be determined, that is, the coordinate values of the first target point in the Cartesian coordinate system can be determined.
[0037] For example, please refer to Figure 3 , Figure 3 The diagram illustrates the positional relationship between the first reference trajectory line in the Cartesian coordinate system and the current position of the vehicle. The current position of the vehicle, A, is obtained from the high-precision map. Figure 3 The first reference trajectory line shown is further defined as follows: the first reference trajectory point on the first reference trajectory line that is closest to A is B, i.e., the first target point is B. Further, two first reference trajectory points C and D on the first reference trajectory line after the first target point B are selected, and the first target point B, first reference trajectory point C, and first reference trajectory point D are taken as the target reference trajectory point.
[0038] Wherein, the number of first reference trajectory points on the first reference trajectory line after the first target point refers to the number of first reference trajectory points on the first reference trajectory line located in front of the first target point in the direction of travel of the vehicle.
[0039] In some embodiments, the target number is the number of first reference trajectory points included within the target distance after the first target point, and the target distance is equal to the product of the vehicle's current speed and a preset duration.
[0040] The preset duration can be set according to actual needs.
[0041] The target distance after the first target point refers to the target distance in the direction of travel of the vehicle that is ahead of the first target point.
[0042] The target distance is obtained by multiplying the preset time length by the current speed of the vehicle, and the target number is the number of first reference trajectory points on the first reference trajectory line after the first target point and within the target distance.
[0043] Referring to Figure 4 , Figure 4 A flowchart for determining target local trajectory points is provided in embodiments of the present application. In some embodiments, as shown in Figure 4 The vehicle local trajectory planning method further includes the following steps:
[0044] S04: Obtain a previous frame of local trajectory, the previous frame of local trajectory including a plurality of local trajectory points.
[0045] S05: Determine a local trajectory point on the previous frame of local trajectory closest to the current position of the vehicle, denoted as a second target point.
[0046] S06: Take the second target point and a preset number of local trajectory points before the second target point on the previous frame of local trajectory as target local trajectory points.
[0047] The obtained previous frame of local trajectory includes positions of a plurality of local trajectory points, the position of each local trajectory point can be represented by a coordinate value in a Cartesian coordinate system, and the position of the local trajectory point on the previous frame of local trajectory closest to the current position of the vehicle can be determined by comparing the coordinate value of the current position of the vehicle with the coordinate values of the plurality of local trajectory points, i.e., the coordinate value of the second target point in the Cartesian coordinate system can be determined.
[0048] Exemplarily, referring again to Figure 3 , Figure 3 The previous frame of local trajectory is also shown, as shown in Figure 3 The current position of the vehicle is A, and the local trajectory point E on the previous frame of local trajectory closest to A is determined as the second target point. Further, two local trajectory points F and G before the second target point E on the previous frame of local trajectory are selected, and the second target point E, the local trajectory point F and the local trajectory point G are taken as the target local trajectory points. Among them, Figure 3 The previous frame of local trajectory and the first reference trajectory line shown in the above embodiment completely coincide, in other embodiments, the previous frame of local trajectory can partially coincide with the first reference trajectory line, or the previous frame of local trajectory does not coincide with the first reference trajectory line.
[0049] The preset number of the local trajectory points before the second target point on the last frame of local trajectory refers to a preset number of local trajectory points behind the second target point on the last frame of local trajectory in the driving direction of the vehicle.
[0050] The preset number can be set according to actual needs. In some embodiments, the preset number can be 19.
[0051] In some embodiments, in step S03, the fitting of each target reference trajectory point obtains a local trajectory, including: fitting each target reference trajectory point and each target local trajectory point to obtain the local trajectory.
[0052] For example, referring again to Figure 3 , each target reference trajectory point is B, C and D respectively, and each target local trajectory point is E, F and G respectively. By fitting G, F, E, B, C and D, the local trajectory can be obtained.
[0053] The vehicle local trajectory planning method provided by the embodiments of the present application selects a preset number of local trajectory points of the last frame of local trajectory, and fits them with target reference trajectory points to obtain a local trajectory, so that the generated local trajectory is partially close to the last frame of local trajectory, and the heading angle, curvature and first-order derivative of curvature of the generated local trajectory are continuous with the heading angle, curvature and first-order derivative of curvature of the last frame of local trajectory, thereby making the driving of the vehicle more coherent, stable and comfortable.
[0054] In some embodiments, the fitting of each target reference trajectory point and each target local trajectory point obtains the local trajectory, including: regarding each target reference trajectory point and each target local trajectory point as a to-be-fitted point; regarding each adjacent two to-be-fitted points in all to-be-fitted points as a first starting point and a first ending point respectively; obtaining the heading angle and curvature corresponding to the first starting point, and the heading angle and curvature corresponding to the first ending point; generating a local sub-trajectory according to the heading angle and curvature corresponding to the first starting point, the heading angle and curvature corresponding to the first ending point, and a preset quintic polynomial; and sequentially splicing all generated local sub-trajectories to obtain the local trajectory.
[0055] For example, referring again to Figure 3, the respective target reference track points are B, C and D, the respective target local track points are E, F and G, G, F, E, B, C and D are taken as to-be-fitted points, G and F are taken as a first start point and a first end point respectively, a heading angle and a curvature corresponding to G and a heading angle and a curvature corresponding to F are obtained, a local sub-track from G to F is determined according to the heading angle and the curvature corresponding to G, the heading angle and the curvature corresponding to F and a preset quintic polynomial; F and E are taken as the first start point and the first end point respectively, a heading angle and a curvature corresponding to F and a heading angle and a curvature corresponding to E are obtained, a local sub-track from F to E is determined according to the heading angle and the curvature corresponding to F, the heading angle and the curvature corresponding to E and the preset quintic polynomial; E and B are taken as the first start point and the first end point respectively, a heading angle and a curvature corresponding to E and a heading angle and a curvature corresponding to B are obtained, a local sub-track from E to B is determined according to the heading angle and the curvature corresponding to E, the heading angle and the curvature corresponding to B and the preset quintic polynomial; B and C are taken as the first start point and the first end point respectively, a heading angle and a curvature corresponding to B and a heading angle and a curvature corresponding to C are obtained, a local sub-track from B to C is determined according to the heading angle and the curvature corresponding to B, the heading angle and the curvature corresponding to C and the preset quintic polynomial; C and D are taken as the first start point and the first end point respectively, a heading angle and a curvature corresponding to C and a heading angle and a curvature corresponding to D are obtained, a local sub-track from C to D is determined according to the heading angle and the curvature corresponding to C, the heading angle and the curvature corresponding to D and the preset quintic polynomial; the local sub-tracks from G to F, from F to E, from E to B, from B to C and from C to D are sequentially spliced to obtain a local sub-track from G to D.
[0056] In the method, the generating the local sub-track according to the heading angle and the curvature corresponding to the first start point, the heading angle and the curvature corresponding to the first end point and the preset quintic polynomial can include: generating the local sub-track according to the position of the first start point, the heading angle and the curvature corresponding to the first start point, the position of the first end point, the heading angle and the curvature corresponding to the first end point and the preset quintic polynomial.
[0057] Specifically, the preset quintic polynomial is y = a0 + a1(x-x0) + a2(x-x0)2 + a3(x-x0)3 + a4(x-x0)4 + a5(x-x0)5. 2 + a3(x-x0) 3 + a4(x-x0) 4 + a5(x-x0) 5wherein x0 is the horizontal coordinate value of the position of the first start point, x and y can be used to represent the position of any trajectory point on the local sub-trajectory, and the coefficients a1, a2, a3, a4 and a5 can be obtained by solving the quintic polynomial according to the position (x0, y0) of the first start point, the corresponding heading angle heading0 and the curvature k_s0, and the position (x1, y1) of the first end point, the corresponding heading angle heading1 and the curvature k_s1. Wherein a0=y0, a1=d_start=tan(heading0), wherein delta_y=y1-y0, delta_x=x1-x0, delta_x2=delta_x*delta_x, delta_x3=delta_x*delta_x2, delta_x4=delta_x2*delta_x2, delta_x5=delta_x*delta_x2*delta_x2, d_end=tan(heading1), wherein the quintic polynomial obtained by solving the coefficients is the local sub-trajectory.
[0058] In this embodiment, the quintic polynomial is solved according to the position (x0, y0) of the first start point, the corresponding heading angle heading0 and the curvature k_s0, and the position (x1, y1) of the first end point, the corresponding heading angle heading1 and the curvature k_s1, so that the local sub-trajectory with smooth curvature and no jitter can be obtained.
[0059] wherein the process of solving the coefficients a1, a2, a3, a4 and a5 according to the position (x0, y0) of the first start point, the corresponding heading angle heading0 and the curvature k_s0, and the position (x1, y1) of the first end point, the corresponding heading angle heading1 and the curvature k_s1 is specifically described as follows.
[0060] Substituting the position (x0, y0) of the first start point into the quintic polynomial, y0=a0 can be obtained.
[0061] Substituting the position (x1, y1) of the first end point into the quintic polynomial, y1=a0+a1(x1-x0)+a2(x1-x0) 2 +a3(x1-x0) 3 +a4(x1-x0) 4 +a5(x1-x0) 5 ;
[0062] Substituting the position (x1, y1) of the first end point into the quintic polynomial, y1=a0+a1(x1-x0)+a2(x1-x0)2 +a3(x-x0) 3 +a4(x-x0) 4 +a5(x-x0) 5 Taking the first derivative, we obtain the first derivative of the fifth-degree polynomial: y′=a1+2a2(x-x0)+3a3(x-x0). 2 +4a4(x-x0) 3 +5a5(x-x0) 4 ;
[0063] For the quintic polynomial y = a0 + a1(x - x0) + a2(x - x0) 2 +a3(x-x0) 3 +a4(x-x0) 4 +a5(x-x0) 5 Taking the second derivative, we obtain the second derivative of the fifth-degree polynomial: y″ = 2a² + 6a³(x - x₀) + 12a₄(x - x₀). 2 +20a5(x-x0) 3 ;
[0064] For the first starting point, y′(x0)=d_start=tan(heading0),
[0065] For the first endpoint, y′(x1)=d_end=tan(heading1), Thus, the coefficients a1, a2, a3, a4, and a5 can be obtained.
[0066] In some embodiments, obtaining the heading angle and curvature corresponding to the first starting point, and the heading angle and curvature corresponding to the first ending point, includes: if the first starting point is a target local trajectory point, then obtaining the heading angle of the vehicle at the position closest to the first starting point as the heading angle corresponding to the first starting point, and obtaining the curvature of the first starting point on the local trajectory of the previous frame as the curvature corresponding to the first starting point; if the first starting point is a target reference trajectory point, then obtaining the heading angle and curvature corresponding to the first starting point from the map; if the first ending point is a target local trajectory point, then obtaining the heading angle of the vehicle at the position closest to the first ending point as the heading angle corresponding to the first ending point, and obtaining the curvature of the first ending point on the local trajectory of the previous frame as the curvature corresponding to the first ending point; if the first ending point is a target reference trajectory point, then obtaining the heading angle and curvature corresponding to the first ending point from the map.
[0067] The obtained local trajectory from the previous frame includes the curvature of multiple local trajectory points.
[0068] If the first starting point is a target local trajectory point, the curvature of the first starting point is the curvature of that target local trajectory point on the local trajectory of the previous frame, i.e., the curvature of that target local trajectory point. The heading angle of the first starting point is the heading angle of the vehicle at the position closest to the target local trajectory point during its actual journey to the current position. For example, as... Figure 3 As shown, when the first starting point is G, the curvature of the first starting point is the curvature of G, and the heading angle of the first starting point is the heading angle of the vehicle when it travels to the position closest to G during the actual process of traveling to A.
[0069] Wherein, if the first endpoint is a target local trajectory point, the curvature of the first endpoint is the curvature of the target local trajectory point on the local trajectory of the previous frame, that is, the curvature of the target local trajectory point, and the heading angle of the first endpoint is the heading angle of the vehicle at the position closest to the target local trajectory point during its actual journey to the current position. For example, as Figure 3 As shown, when the first endpoint is F, the curvature of the first starting point is the curvature of F, and the heading angle of the first endpoint is the heading angle of the vehicle when it travels to the position closest to F during the actual journey to A.
[0070] Specifically, the heading angle and curvature of each first reference trajectory point on the first reference trajectory line can be obtained through the high-precision map.
[0071] Wherein, if the first starting point is a target reference trajectory point, the heading angle and curvature of the target reference trajectory point can be obtained through the high-precision map. For example, as... Figure 3 As shown, when the first starting point is C, the curvature of the first starting point is the curvature of C, and the heading angle of the first starting point is the heading angle of C.
[0072] Wherein, if the first endpoint is a target reference trajectory point, the heading angle and curvature of the target reference trajectory point can be obtained through the high-precision map. For example, as... Figure 5 As shown, when the first endpoint is D, the curvature of the first endpoint is the curvature of D, and the heading angle of the first endpoint is the heading angle of D.
[0073] Please see Figure 5 , Figure 5 A flowchart illustrating the generation of a target velocity trajectory provided in an embodiment of this application. In some embodiments, such as... Figure 6 As shown, the vehicle local trajectory planning method further includes the following steps:
[0074] S07: Based on the vehicle's perception data, an ST map is established, which represents the possible locations of obstacles at different times.
[0075] S08: Determine the obstacle area in the ST diagram for obstacles in the lane where the vehicle is located, such as...Figure 6 a quadrilateral region in the ST graph.
[0076] S09: determining a passable region in the ST graph based on the obstacle region.
[0077] S10: uniformly scattering points in the passable region to obtain a plurality of sampling points.
[0078] S11: generating a plurality of candidate speed trajectories corresponding to the local trajectory according to the origin of the ST graph and the plurality of sampling points, the origin representing the position of the vehicle at the current time.
[0079] S12: determining the candidate speed trajectory with the minimum loss function value among the plurality of candidate speed trajectories as the target speed trajectory, so that the vehicle travels according to the speed indicated by the target speed trajectory.
[0080] wherein the loss function can be constructed based on longitudinal acceleration, jerk (first derivative of acceleration), relationship between speed and curvature (centripetal acceleration), and cruising speed, etc.
[0081] wherein the ST (mileage-time) graph can be established based on the obstacle information perceived by the perception module of the vehicle and the possible positions of the obstacles at different time points predicted by the prediction module based on the obstacle information.
[0082] wherein the obstacle can be an obstacle on the lane in front of the vehicle, the left boundary of the quadrilateral region represents the time when the obstacle enters the local trajectory of the vehicle, the right boundary represents the time when the obstacle leaves the local trajectory of the vehicle, the upper boundary represents the front boundary line of the obstacle, and the lower boundary represents the rear boundary line of the obstacle. The obstacle region represents the region where the obstacle can appear.
[0083] wherein the passable region includes the region in the ST graph outside the obstacle region, and the vehicle traveling in the passable region can ensure that it will not collide with the obstacle.
[0084] In step S10, the uniform scattering in the passable area is obtained by uniformly scattering a plurality of sampling points in the passable area, and specifically includes: uniformly scattering a plurality of sampling points in the passable area at a plurality of sampling time points, and each adjacent two sampling time points are separated by a same preset time length, and each sampling time point can correspond to a plurality of sampling points. Wherein, the plurality of sampling points corresponding to a certain sampling time point can include a plurality of overtaking sampling points and a plurality of following sampling points, the mileage of the overtaking sampling points is greater than the mileage of the obstacle area corresponding to the time point, and the mileage of the following sampling points is less than the mileage of the obstacle area corresponding to the time point. Under the same sampling time point, the mileage interval between the adjacent two overtaking sampling points is equal, and the mileage interval between the adjacent two following sampling points is equal.
[0085] Exemplarily, please refer to Figure 6 , Figure 6 is a schematic diagram of a candidate speed trajectory planning model based on an ST graph. As shown in Figure 6 , uniform scattering is performed at T1, T2 and T3 respectively, the plurality of sampling points corresponding to T1 include overtaking sampling points A1, A2 and A3 and following sampling points A4, A5 and A6, the plurality of sampling points corresponding to T2 include overtaking sampling points B1, B2 and B3 and following sampling points B4, B5 and B6, and the plurality of sampling points corresponding to T3 include overtaking sampling points C1, C2 and C3 and following sampling points C4, C5 and C6; wherein, T1, T2 and T3 are separated by the same length, the mileage interval between the adjacent two sampling points in A1, A2 and A3 is equal (as shown in Figure 7 , the interval mileage of the adjacent two sampling points is 2.5m), and is equal to the mileage interval between the adjacent two sampling points in B1, B2 and B3 and is equal to the mileage interval between the adjacent two sampling points in C1, C2 and C3, the mileage interval between the adjacent two sampling points in A4, A5 and A6 is equal, and is equal to the mileage interval between the adjacent two sampling points in B4, B5 and B6 and is equal to the mileage interval between the adjacent two sampling points in C4, C5 and C6.
[0086] Please refer to Figure 7 , Figure 5 is a subflowchart of step S11 in Figure 7 . In some embodiments, as shown in Figure 3 , the plurality of candidate speed trajectories corresponding to the local trajectory are generated according to the origin of the ST graph and the plurality of sampling points, and include:
[0087] S111: selecting a plurality of sampling point sequences from the plurality of sampling points based on the driving direction of the vehicle.
[0088] S112: for each sampling point sequence, taking each adjacent two sampling points in the sampling point sequence and the origin as a second starting point and a second ending point respectively.
[0089] S113: Obtain the speed and acceleration corresponding to the second starting point, and the speed corresponding to the second ending point.
[0090] S114: Generate a speed sub-trajectory according to the speed and acceleration corresponding to the second starting point, the speed corresponding to the second ending point, and a preset quartic polynomial.
[0091] S115: Splice all the speed sub-trajectories obtained according to the sampling point sequences to obtain the candidate speed trajectory.
[0092] In step S111, the plurality of sampling point sequences are selected based on the driving direction of the vehicle, specifically including: selecting any one of the plurality of sampling points corresponding to each sampling time point as a target sampling point along the driving direction of the vehicle, and combining the target sampling points corresponding to all sampling time points to obtain the plurality of sampling point sequences, each sampling point sequence including one target sampling point corresponding to each sampling time point. For example, as shown in Figure 6 A1 corresponding to T1, sampling point B1 corresponding to T2, and sampling point C1 corresponding to T3 are selected as the target sampling point corresponding to T1, the target sampling point corresponding to T2, and the target sampling point corresponding to T3, respectively, and sampling point A1, sampling point B1, and sampling point C1 form a sampling point sequence; sampling point A1 corresponding to T1, sampling point B1 corresponding to T2, and sampling point C2 corresponding to T3 are also selected as the target sampling point corresponding to T1, the target sampling point corresponding to T2, and the target sampling point corresponding to T3, respectively, and sampling point A1, sampling point B1, and sampling point C2 form a sampling point sequence, so that a plurality of sampling point sequences can be obtained.
[0093] In step S111, the plurality of sampling point sequences are selected based on the driving direction of the vehicle, specifically including: selecting any one of the plurality of sampling points corresponding to each sampling time point as a target sampling point along the driving direction of the vehicle, and combining the target sampling points corresponding to all sampling time points to obtain the plurality of sampling point sequences, each sampling point sequence including one target sampling point corresponding to each sampling time point. For example, as shown in Figure 6 a plurality of candidate speed trajectories X.
[0094] In step S112, for example, as shown in Figure 6As shown, the sampling point sequence includes sampling point A1, sampling point B1 and sampling point C1, each two adjacent points of the origin, sampling point A1, sampling point B1 and sampling point C1 are taken as a second starting point and a second end point respectively, the origin and sampling point A1 are taken as the second starting point and the second end point respectively, the speed and acceleration corresponding to the origin and the speed corresponding to sampling point A1 are obtained, and the speed sub-trajectory from the origin to sampling point A1 is generated according to the speed and acceleration corresponding to the origin, the speed corresponding to sampling point A1 and the preset quartic polynomial; sampling point A1 and sampling point B1 are taken as the second starting point and the second end point respectively, the speed and acceleration corresponding to sampling point A1 and the speed corresponding to sampling point B1 are obtained, and the speed sub-trajectory from sampling point A1 to sampling point B1 is generated according to the speed and acceleration corresponding to sampling point A1, the speed corresponding to sampling point B1 and the preset quartic polynomial; sampling point B1 and sampling point C1 are taken as the second starting point and the second end point respectively, the speed and acceleration corresponding to sampling point B1 and the speed corresponding to sampling point C1 are obtained, and the speed sub-trajectory from sampling point B1 to sampling point C1 is generated according to the speed and acceleration corresponding to sampling point B1, the speed corresponding to sampling point C1 and the preset quartic polynomial; the speed sub-trajectory from the origin to sampling point A1, the speed sub-trajectory from sampling point A1 to sampling point B1 and the speed sub-trajectory from sampling point B1 to sampling point C1 are spliced to obtain the candidate speed trajectory.
[0095] In step S114, the speed sub-trajectory is generated according to the speed and acceleration corresponding to the second starting point, the speed corresponding to the second end point and the preset quartic polynomial, which can specifically include: generating the speed sub-trajectory according to the mileage s0 of the second starting point at the corresponding sampling time point, the speed speed0 and the acceleration acceleration0 corresponding to the second starting point, the mileage s1 of the second end point at the corresponding sampling time point, the speed speed1 corresponding to the second end point, the preset time interval ΔT1 between the sampling time point corresponding to the second starting point and the sampling time point corresponding to the second end point and the preset quartic polynomial.
[0096] Specifically, the preset quartic polynomial is s=m0+m1(t-t0)+m2(t-t0) 2 +m3(t-t0) 3 +m4(t-t0) 4, according to the mileage s0 of the second starting point at the sampling time point t0, the speed speed0 and the acceleration acceleration0 corresponding to the second starting point, and the mileage s1 of the second end point at the sampling time point t1, the corresponding speed speed1 and the preset time length ΔT1 between the sampling time point t1 and the sampling time point t0, the coefficients m1, m2, m3 and m4 are solved. Wherein, m0=s0, m1=d_start=speed0, m2=dd_start / 2=acceleration0 / 2, m3=(4delta_s-(d_end+3d_start)delta_t-dd_start·delta_t2) / delta_t3, m4=(-6delta_s+(2d_end+4d_start)delta_t+dd_start·delta_t2) / 2delta_t4. Wherein, d_end=speed1, delta_s=s1-s0, delta_t=t1-t0, delta_t2=delta_t·delta_t, delta_t3=delta_t·delta_t2, delta_t4=delta_t2·delta_t2, delta_t5=delta_t·delta_t2·delta_t2.
[0097] In the embodiments of the application, by the mileage s0 of the second starting point at the sampling time point t0, the speed speed0 and the acceleration acceleration0 corresponding to the second starting point, and the mileage s1 of the second end point at the sampling time point t1, the corresponding speed speed1 and the preset time length ΔT1 between the sampling time point t1 and the sampling time point t0, the quartic polynomial is solved, and the curvature smoothness and the speed sub-trajectory without jitter can be obtained.
[0098] Wherein, according to the mileage s0 of the second starting point at the sampling time point t0, the speed speed0 and the acceleration acceleration0 corresponding to the second starting point, and the mileage s1 of the second end point at the sampling time point t1, the corresponding speed speed1 and the preset time length ΔT1 between the sampling time point t1 and the sampling time point t0, the process of solving the coefficients m1, m2, m3 and m4 is specifically explained as follows.
[0099] The mileage s0 and the sampling time point t0 are substituted into the quartic polynomial, and s0=m0 can be obtained.
[0100] The mileage s1 and the sampling time point t1 are substituted into the quartic polynomial, and s1=m0+m1(t1-t0)+m2(t1-t0) 2 +m3(t1-t0)3 + m4(t-t0) 4 ;
[0101] The first-order derivative of the quartic polynomial s = m0 + m1(t-t0) + m2(t-t0) 2 + m3(t-t0) 3 + m4(t-t0) 4 is obtained as s' = m1 + 2m2(t-t0) + 3m3(t-t0) 2 + 4m4(t-t0) 3 ;
[0102] The second-order derivative of the quartic polynomial s = m0 + m1(t-t0) + m2(t-t0) 2 + m3(t-t0) 3 + m4(t-t0) 4 is obtained as s'' = 2m2 + 6m3(t-t0) + 12m4(t-t0) 2 ;
[0103] For the second starting point, s'(t0) = d_start = speed0, and s''(t0) = dd_start = acceleration0.
[0104] For the second end point, s'(t1) = d_end = speed1, so the coefficients m1, m2, m3 and m4 can be obtained.
[0105] The preset time length ΔT1 is set according to actual requirements. In some embodiments, the preset time length ΔT1 is 8 seconds.
[0106] In step S12, the loss function can be wherein C total (s) is a loss function value, s' is the first-order derivative of the candidate speed trajectory, s ref ' is a preset reference speed, s'' is the second-order derivative of the candidate speed trajectory, s''' is the third-order derivative of the candidate speed trajectory, w1, w2 and w3 are respectively a first preset weight value, a second preset weight value and a third preset weight value.
[0107] In some embodiments, in step S113, the speed and acceleration corresponding to the second starting point and the speed corresponding to the second ending point are obtained by: if the second starting point is the origin, obtaining the speed of the vehicle at the current time as the speed corresponding to the second starting point and obtaining the acceleration of the vehicle at the current time as the acceleration corresponding to the second starting point; if the second starting point is a sampling point, obtaining the speed of the front obstacle at the time corresponding to the second starting point as the speed corresponding to the second starting point and obtaining the acceleration of the front obstacle at the time corresponding to the second starting point as the acceleration corresponding to the second starting point, the front obstacle being an obstacle on the lane in front of the vehicle; and if the second ending point is a sampling point, obtaining the speed of the front obstacle at the time corresponding to the second ending point as the speed corresponding to the second ending point and obtaining the acceleration of the front obstacle at the time corresponding to the second ending point as the acceleration corresponding to the second ending point.
[0108] As shown in FIG. 6, when the origin is the second starting point and the sampling point A1 is the second ending point, the speed and acceleration of the second starting point are the speed and acceleration of the vehicle at the current time, and the speed and acceleration of the second ending point are the speed and acceleration of the front obstacle at the time T1. When the sampling point A1 is the second starting point and the sampling point B1 is the second ending point, the speed and acceleration of the second starting point are the speed and acceleration of the front obstacle at the time T1, and the speed and acceleration of the second ending point are the speed and acceleration of the front obstacle at the time T2. Figure 8
[0109] As shown in FIG. 6, when the origin is the second starting point and the sampling point A1 is the second ending point, the speed and acceleration of the second starting point are the speed and acceleration of the vehicle at the current time, and the speed and acceleration of the second ending point are the speed and acceleration of the front obstacle at the time T1. When the sampling point A1 is the second starting point and the sampling point B1 is the second ending point, the speed and acceleration of the second starting point are the speed and acceleration of the front obstacle at the time T1, and the speed and acceleration of the second ending point are the speed and acceleration of the front obstacle at the time T2. Figure 8 Figure 8 As shown in FIG. 6, when the origin is the second starting point and the sampling point A1 is the second ending point, the speed and acceleration of the second starting point are the speed and acceleration of the vehicle at the current time, and the speed and acceleration of the second ending point are the speed and acceleration of the front obstacle at the time T1. When the sampling point A1 is the second starting point and the sampling point B1 is the second ending point, the speed and acceleration of the second starting point are the speed and acceleration of the front obstacle at the time T1, and the speed and acceleration of the second ending point are the speed and acceleration of the front obstacle at the time T2. Figure 9
[0110] S13: determining a second reference trajectory line of a target lane to which the vehicle changes lanes when the vehicle changes lanes and overtakes, the second reference trajectory line comprising a plurality of second reference trajectory points.
[0111] S14: obtaining a last frame of local trajectory, the last frame of local trajectory comprising a plurality of local trajectory points.
[0112] S15: determining a local trajectory point on the last frame of local trajectory closest to the current position of the vehicle, denoted as a second target point.
[0113] S16: taking the second target point and a preset number of local trajectory points before the second target point on the last frame of local trajectory as target lane-changing local trajectory points.
[0114] S17: Obtain a lane-changing point hotspot map based on driving experience, and determine a lane-changing target point on the second reference trajectory line according to the lane-changing point hotspot map.
[0115] S18: Fit each target lane-changing local trajectory point and the lane-changing target point to obtain a lane-changing local trajectory, so that the vehicle travels according to the lane-changing local trajectory.
[0116] In some embodiments, the second reference trajectory line can be a center line of the target lane. The second reference trajectory line can be obtained through the high-definition map.
[0117] wherein the preset number of local trajectory points on the last frame of local trajectory before the third target point refer to a preset number of local trajectory points on the last frame of local trajectory behind the third target point in the driving direction of the vehicle.
[0118] wherein the lane-changing point hotspot map is obtained by collecting lane-changing points of a plurality of drivers with rich driving experience changing lanes to another lane at the same speed on the same road under the same conditions, and each lane-changing point is represented by a lane-changing time point and a corresponding mileage.
[0119] wherein the preset number can be set according to actual needs, and in some embodiments, the preset number can be 19.
[0120] Exemplarily, please refer to Figure 9 , Figure 10 The planning model of the lane-changing local trajectory based on the lane-changing point hotspot map is schematically shown in FIG. 18. The current position of the vehicle can be determined as P through the high-definition map, and the local trajectory point on the last frame of local trajectory closest to the current position P of the vehicle is determined as H, i.e., the second target point is H. The lane-changing target point O is determined according to the lane-changing point hotspot map.
[0121] The vehicle local trajectory planning method provided by the embodiments of the present application can determine a lane-changing target point according to a lane-changing point hotspot map based on driving experience, so that the generated lane-changing local trajectory is more reasonable, which is beneficial to the vehicle to change lanes to the target lane stably and quickly. In the embodiments, a unique lane-changing local trajectory can be obtained by fitting the local trajectory points of the last frame and the lane-changing target point, which avoids the cumbersome construction of a loss function, is simple in process, is easier to obtain the lane-changing local trajectory in time, improves the generation efficiency of the lane-changing local trajectory, and can meet the real-time requirements of automatic driving.
[0122] Please refer to Figure 10 , Figure 8 For Figure 10 the subflowchart of step S18 in FIG. 17. In some embodiments, as Figure 9As shown, the fitting of the target lane-changing local trajectory points and the lane-changing target point obtains a lane-changing local trajectory, including the following steps:
[0123] S181: The target lane-changing local trajectory points and the lane-changing target point are taken as fitting points.
[0124] S182: For each adjacent two fitting points in all fitting points, the two fitting points are taken as a first start point and a first end point respectively.
[0125] S183: The heading angle and curvature corresponding to the first start point and the heading angle and curvature corresponding to the first end point are obtained.
[0126] S184: A lane-changing local sub-trajectory is generated according to the heading angle and curvature corresponding to the first start point, the heading angle and curvature corresponding to the first end point, and a preset quintic polynomial.
[0127] S185: All generated lane-changing local sub-trajectories are sequentially spliced to obtain the lane-changing local trajectory.
[0128] Exemplarily, please refer to Figure 9 again, the target lane-changing local trajectory points are J, I, and H respectively, the lane-changing target point is O, J and I are taken as the first start point and the first end point respectively, the heading angle and curvature corresponding to J and the heading angle and curvature corresponding to I are obtained, a lane-changing local sub-trajectory from J to I is generated according to the heading angle and curvature corresponding to J, the heading angle and curvature corresponding to I, and a preset quintic polynomial; I and H are taken as the first start point and the first end point respectively, the heading angle and curvature corresponding to I and the heading angle and curvature corresponding to H are obtained, a lane-changing local sub-trajectory from I to H is generated according to the heading angle and curvature corresponding to I, the heading angle and curvature corresponding to H, and a preset quintic polynomial; H and O are taken as the first start point and the first end point respectively, the heading angle and curvature corresponding to H and the heading angle and curvature corresponding to O are obtained, a lane-changing local sub-trajectory from H to O is generated according to the heading angle and curvature corresponding to H, the heading angle and curvature corresponding to O, and a preset quintic polynomial; the lane-changing local sub-trajectories from J to I, I to H, and H to O are sequentially spliced to obtain a lane-changing local trajectory from J to O.
[0129] Wherein, the generation of the lane-changing local sub-trajectory according to the heading angle and curvature corresponding to the first start point, the heading angle and curvature corresponding to the first end point, and the preset quintic polynomial can include: the generation of the lane-changing local sub-trajectory according to the position of the first start point, the corresponding heading angle and curvature, the position of the first end point, the corresponding heading angle and curvature, and the preset quintic polynomial.
[0130] Specifically, the preset fifth-degree polynomial is y = b0 + b1(x - x2) + b2(x - x2). 2 +b3(x-x2) 3 +b4(x-x2) 4 +b5(x-x2) 5 Where x2 is the x-coordinate of the first starting point, and x and y can be used to represent the position of any trajectory point on the local sub-trajectory of the lane change. Based on the position of the first starting point (x2, y2), the corresponding heading angle heading2 and curvature k_s2, and the position of the first ending point (x3, y3), the corresponding heading angle heading3 and curvature k_s3, solving this fifth-order polynomial yields the coefficients b1, b2, b3, b4, and b5. Where b0 = y2, b1 = d_start = tan(heading2), Among them, delta_y=y3-y2, delta_x=x3-x2, delta_x2=delta_x·delta_x, delta_x3=delta_x·delta_x2, delta_x4=delta_x2·delta_x2, delta_x5=delta_x·delta_x2·delta_x2, d_end=tan(heading1),
[0131] In this embodiment of the application, by solving the fifth-order polynomial using the position of the first starting point (x2, y2), the corresponding heading angle heading2 and curvature k_s2, and the position of the first ending point (x3, y3), the corresponding heading angle heading3 and curvature k_s3, a smooth curvature-free local sub-trajectory for lane changing can be obtained.
[0132] The process of solving the fifth-degree polynomial to obtain the coefficients b1, b2, b3, b4 and b5 based on the position of the first starting point (x2, y2), the corresponding heading angle heading2 and curvature k_s2, and the position of the first ending point (x3, y3), the corresponding heading angle heading3 and curvature k_s3, can be referred to the aforementioned process of solving the coefficients a1, a2, a3, a4 and a5.
[0133] In some embodiments, the obtaining the heading angle and the curvature corresponding to the first starting point and the heading angle and the curvature corresponding to the first ending point comprises: if the first starting point is a target local lane-changing trajectory point, obtaining a heading angle of the vehicle driving to a position closest to the first starting point as the heading angle corresponding to the first starting point, and obtaining a curvature of the first starting point on the last frame of local trajectory as the curvature corresponding to the first starting point; if the first ending point is a target local lane-changing trajectory point, obtaining a heading angle of the vehicle driving to a position closest to the first ending point as the heading angle corresponding to the first ending point, and obtaining a curvature of the first ending point on the last frame of local trajectory as the curvature corresponding to the first ending point; if the first ending point is a lane-changing target point, obtaining the heading angle and the curvature corresponding to the first ending point from the map.
[0134] wherein the obtained last frame of local trajectory comprises curvatures of a plurality of local trajectory points.
[0135] wherein if the first starting point is a target lane-changing local trajectory point, the curvature of the first starting point is the curvature of the target local trajectory point on the last frame of local trajectory, and the heading angle of the first starting point is a heading angle of the vehicle driving to a position closest to the target local trajectory point in the process of actually driving to the current position. For example, as shown in FIG. 6, when the first starting point is J, the curvature of the first starting point is the curvature of J, and the heading angle of the first starting point is a heading angle of the vehicle driving to a position closest to J in the process of actually driving to the current position P. Figure 9
[0136] wherein if the first ending point is a target lane-changing local trajectory point, the curvature of the first ending point is the curvature of the target local trajectory point on the last frame of local trajectory, and the heading angle of the first ending point is a heading angle of the vehicle driving to a position closest to the target local trajectory point in the process of actually driving to the current position. For example, as shown in FIG. 6, when the first ending point is I, the curvature of the first starting point is the curvature of I, and the heading angle of the first ending point is a heading angle of the vehicle driving to a position closest to I in the process of actually driving to the current position P. Figure 9
[0137] wherein the heading angle and the curvature of each second reference trajectory point on the second reference trajectory line can be obtained from the high-definition map.
[0138] wherein if the first ending point is a lane-changing target point, the heading angle and the curvature corresponding to the first ending point are obtained from the map, i.e., the heading angle and the curvature corresponding to the first ending point. For example, as shown in FIG. 6, when the first ending point is O, the curvature and the heading angle of the first starting point are the curvature and the heading angle of O, respectively. Figure 9
[0139] In some embodiments, the lane-changing point hotspot map comprises a plurality of empirical lane-changing points, and the determining a lane-changing target point on the second reference trajectory line according to the lane-changing point hotspot map comprises: averaging positions of the plurality of empirical lane-changing points to obtain a target empirical lane-changing point; and taking a second reference trajectory point on the second reference trajectory line closest to the target empirical lane-changing point as the lane-changing target point.
[0140] In some embodiments, the averaging positions of the plurality of empirical lane-changing points to obtain a target empirical lane-changing point comprises: adding and averaging mileages of the plurality of empirical lane-changing points to obtain an average mileage, adding and averaging times of the plurality of empirical lane-changing points to obtain an average time, and determining that a mileage of the target empirical lane-changing point is equal to the average mileage and a time of the target empirical lane-changing point is equal to the average time. Further, the taking a second reference trajectory point on the second reference trajectory line closest to the target empirical lane-changing point as the lane-changing target point. Figure 9 As shown in FIG. 6, the lane-changing point hotspot map is projected onto a coordinate system in which the second reference trajectory line is located according to the same variable (e.g., time or mileage), and a second reference trajectory point on the second reference trajectory line closest to the target empirical lane-changing point is taken as the lane-changing target point. Figure 11 As shown in FIG. 6, the lane-changing point hotspot map is projected onto a coordinate system in which the second reference trajectory line is located according to the same variable (e.g., time or mileage), and a second reference trajectory point on the second reference trajectory line closest to the target empirical lane-changing point is taken as the lane-changing target point.
[0141] As shown in FIG. 6, the lane-changing point hotspot map is projected onto a coordinate system in which the second reference trajectory line is located according to the same variable (e.g., time or mileage), and a second reference trajectory point on the second reference trajectory line closest to the target empirical lane-changing point is taken as the lane-changing target point. Figure 11 Figure 11 A flowchart for generating a target speed trajectory is provided for another embodiment of the present application. In some embodiments, as shown in FIG. 7, the vehicle local trajectory planning method further comprises the following steps: Figure 12
[0142] S19: establishing an ST map based on perception data of the vehicle, the ST map representing possible positions of obstacles at different time points.
[0143] S20: determining an obstacle region of an obstacle on a lane on which the vehicle is located and an obstacle region of an obstacle on the target lane in the ST map.
[0144] S21: determining a passable region in the ST map based on the obstacle region.
[0145] S22: uniformly scattering points in the passable region to obtain a plurality of sampling points.
[0146] S23: generating a plurality of candidate speed trajectories corresponding to the lane-changing local trajectory according to an origin of the ST map and the plurality of sampling points, the origin representing a position of the vehicle at a current time point.
[0147] S24: determining the candidate speed trajectory with the minimum loss function value from the plurality of candidate speed trajectories as a target speed trajectory, so that the vehicle travels according to the speed indicated by the target speed trajectory.
[0148] wherein the obstacle region corresponding to the obstacle on the lane where the vehicle is located is a first obstacle region, and the obstacle region corresponding to the obstacle on the target lane is a second obstacle region.
[0149] wherein the passable region includes a region outside the obstacle region in the ST graph, and the vehicle travels in the passable region to ensure that no collision with the obstacle occurs.
[0150] Exemplarily, please refer to Figure 12 , Figure 12 The obstacle region M corresponding to the obstacle on the lane where the vehicle is located and the obstacle region N corresponding to the obstacle on the target lane are schematically shown.
[0151] wherein in step S22, the uniform scattering of points in the passable region to obtain a plurality of sampling points specifically includes: uniformly scattering points in the passable region at a plurality of sampling time points to obtain a plurality of sampling points, and each adjacent two sampling time points are separated by the same preset time length, and each sampling time point can correspond to a plurality of sampling points. Wherein the plurality of sampling points corresponding to a certain sampling time point can include a plurality of sampling points, wherein the mileage of the sampling point is greater than the mileage corresponding to the first obstacle region at the time point, and less than the mileage corresponding to the second obstacle region at the time point, that is, the vehicle overtaking sampling is performed for the obstacle on the lane where the vehicle is located, and the vehicle following sampling is performed for the obstacle on the target lane. Under the same sampling time point, the mileage interval between adjacent two sampling points is equal. Exemplarily, as Figure 12 shown, uniform scattering of points is performed at T1, T2, and T3 time points, the plurality of sampling points corresponding to T1 time point include sampling points A1, A2, and A3, the plurality of sampling points corresponding to T2 time point include sampling points B1, B2, and B3, and the plurality of sampling points corresponding to T3 time point include sampling points C1, C2, and C3; wherein T1, T2, and T3 are separated by the same length, the mileage interval between adjacent two sampling points in A1, A2, and A3 is equal (as shown, the interval mileage of the adjacent two sampling points is 2.5m), and is equal to the interval mileage of the adjacent two sampling points in B1, B2, and B3 and is equal to the interval mileage of the adjacent two sampling points in C1, C2, and C3.
[0152] wherein the specific process of generating a plurality of candidate speed trajectories corresponding to the lane-changing local trajectory according to the origin of the ST graph and the plurality of sampling points can refer to the specific process of the aforementioned step S11.
[0153] Among the plurality of candidate speed trajectories, the candidate speed trajectory with the minimum loss function value is determined as the target speed trajectory. For the specific filtering process, reference can be made to the specific process of step S12 described above.
[0154] The perception module can be a camera, a millimeter wave radar, a laser radar, an ultrasonic sensor, etc. The prediction module and the decision module can be a single-chip microcomputer, a controller, a processor, etc.
[0155] The electronic device provided in the embodiments of the present application includes a memory and a processor. The memory stores a computer program. The computer program is used to be called by the processor to be executed to implement the vehicle local trajectory planning method provided in any of the preceding embodiments.
[0156] The vehicle provided in the embodiments of the present application includes the electronic device described above, and further includes a perception module, a decision module, a navigation module, and a positioning module.
[0157] The computer readable storage medium provided in the embodiments of the present application stores a computer program. The computer program is called by a processor to be executed to implement the vehicle local trajectory planning method provided in any of the preceding embodiments.
[0158] Those skilled in the art can understand that all or part of the steps of the various methods in the above embodiments can be completed by a program instructing the relevant hardware, and the program can be stored in a computer readable memory, which can include a flash disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, etc.
[0159] It should be noted that, for the method embodiments described above, in order to simply describe, they are all described as a series of action combinations, but those skilled in the art should know that the present application is not limited to the order of the actions described, because according to the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0160] In the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0161] The above is the implementation manner of the embodiments of the present application. It should be noted that, for those skilled in the art, without departing from the principle of the embodiments of the present application, a number of improvements and refinements can be made, which are also regarded as the protection scope of the present application.
Claims
1. A method for local trajectory planning of a vehicle, characterized in that, The vehicle local trajectory planning method includes the following steps: When it is determined that the vehicle is maintaining its current lane, a first reference trajectory line of the lane where the vehicle is located is obtained from the map. The first reference trajectory line includes a plurality of first reference trajectory points. Based on the current position of the vehicle, at least two target reference trajectory points are selected from the plurality of first reference trajectory points; Each target reference trajectory point is fitted to obtain a local trajectory, so that the vehicle can travel according to the local trajectory; The vehicle local trajectory planning method also includes: Obtain the local trajectory of the previous frame, wherein the local trajectory of the previous frame includes multiple local trajectory points; The local trajectory point on the previous frame that is closest to the current position of the vehicle is determined and denoted as the second target point; The second target point, and a predetermined number of local trajectory points on the previous frame's local trajectory preceding the second target point, are taken as target local trajectory points; The process of fitting each target reference trajectory point to obtain a local trajectory includes: The local trajectory is obtained by fitting each target reference trajectory point and each target local trajectory point; The step of fitting each target reference trajectory point and each target local trajectory point to obtain the local trajectory includes: Each target reference trajectory point and each target local trajectory point are used as the points to be fitted; For each pair of adjacent points to be fitted among all the points to be fitted, the two points to be fitted are respectively taken as the first starting point and the first ending point; Obtain the heading angle and curvature corresponding to the first starting point, and the heading angle and curvature corresponding to the first ending point; Based on the heading angle and curvature corresponding to the first starting point, the heading angle and curvature corresponding to the first ending point, and a preset fifth-order polynomial, a local sub-trajectory is generated. All the generated local sub-trajectories are concatenated sequentially to obtain the local trajectory.
2. The vehicle local trajectory planning method according to claim 1, characterized in that, The step of selecting at least two target reference trajectory points from the plurality of first reference trajectory points based on the current position of the vehicle includes: The first reference trajectory point on the first reference trajectory line that is closest to the current position of the vehicle is determined and denoted as the first target point; The first target point and the number of first reference trajectory points on the first reference trajectory line that are after the first target point are taken as the at least two target reference trajectory points.
3. The vehicle local trajectory planning method according to claim 2, characterized in that, The target number is the number of first reference trajectory points included within the target distance after the first target point, and the target distance is equal to the product of the vehicle's current speed and the preset duration.
4. The vehicle local trajectory planning method according to claim 1, characterized in that, The step of obtaining the heading angle and curvature corresponding to the first starting point, and the heading angle and curvature corresponding to the first ending point, includes: If the first starting point is a target local trajectory point, then the heading angle of the vehicle at the position closest to the first starting point is obtained as the heading angle corresponding to the first starting point, and the curvature of the first starting point on the local trajectory of the previous frame is obtained as the curvature corresponding to the first starting point. If the first starting point is the target reference trajectory point, then obtain the heading angle and curvature corresponding to the first starting point from the map; If the first endpoint is a target local trajectory point, then the heading angle of the vehicle at the position closest to the first endpoint is obtained as the heading angle corresponding to the first endpoint, and the curvature of the first endpoint on the local trajectory of the previous frame is obtained as the curvature corresponding to the first endpoint. If the first endpoint is the target reference trajectory point, then obtain the heading angle and curvature corresponding to the first endpoint from the map.
5. The vehicle local trajectory planning method according to claim 1, characterized in that, The vehicle local trajectory planning method also includes: An ST map is established based on the vehicle's perception data, and the ST map represents the possible locations of obstacles at different points in time. Determine the obstacle area in the ST diagram for obstacles in the lane where the vehicle is located; Based on the aforementioned obstacle area, a passable area is determined in the ST map; Multiple sampling points are obtained by evenly distributing samples within the passable area. Based on the origin of the ST graph and the multiple sampling points, multiple candidate velocity trajectories corresponding to the local trajectory are generated, where the origin represents the position of the vehicle at the current moment. The candidate speed trajectory with the smallest loss function value among the multiple candidate speed trajectories is determined as the target speed trajectory, so that the vehicle travels at the speed indicated by the target speed trajectory.
6. The vehicle local trajectory planning method according to claim 5, characterized in that, The step of generating multiple candidate velocity trajectories corresponding to the local trajectory based on the origin of the ST graph and the multiple sampling points includes: Based on the vehicle's driving direction, a sequence of multiple sampling points is selected from the plurality of sampling points; For each sampling point sequence, each pair of adjacent sampling points in the sampling point sequence and the origin are respectively used as the second starting point and the second ending point; Obtain the velocity and acceleration corresponding to the second starting point, and the velocity corresponding to the second ending point; Based on the velocity and acceleration corresponding to the second starting point, the velocity corresponding to the second ending point, and a preset fourth-order polynomial, a velocity sub-trajectory is generated; The candidate velocity trajectory is obtained by splicing together all the velocity sub-trajectories obtained from the sampling point sequence.
7. The vehicle local trajectory planning method according to claim 6, characterized in that, The step of obtaining the velocity and acceleration corresponding to the second starting point, and the velocity corresponding to the second ending point, includes: If the second starting point is the origin, then the speed of the vehicle at the current moment is obtained as the speed corresponding to the second starting point, and the acceleration of the vehicle at the current moment is obtained as the acceleration corresponding to the second starting point; If the second starting point is a sampling point, then the velocity of the obstacle ahead at the time corresponding to the second starting point is obtained as the velocity corresponding to the second starting point, and the acceleration of the obstacle ahead at the time corresponding to the second starting point is obtained as the acceleration corresponding to the second starting point. The obstacle ahead is an obstacle in the lane where the vehicle is located, which is ahead of the vehicle. If the second endpoint is a sampling point, then the velocity of the obstacle at the time corresponding to the second endpoint is obtained as the velocity corresponding to the second endpoint, and the acceleration of the obstacle at the time corresponding to the second endpoint is obtained as the acceleration corresponding to the second endpoint.
8. The vehicle local trajectory planning method according to claim 1, characterized in that, The vehicle local trajectory planning method also includes: When it is determined that the vehicle is changing lanes to overtake, a second reference trajectory line of the target lane to which the vehicle has changed lanes is obtained, and the second reference trajectory line includes a plurality of second reference trajectory points; Obtain the local trajectory of the previous frame, wherein the local trajectory of the previous frame includes multiple local trajectory points; The local trajectory point on the previous frame that is closest to the current position of the vehicle is determined and denoted as the second target point; The second target point, and a predetermined number of local trajectory points on the previous frame's local trajectory preceding the second target point, are taken as target lane-changing local trajectory points; Obtain a lane change point heat map based on driving experience, and determine the lane change target point on the second reference trajectory line according to the lane change point heat map; The local trajectory points of each target lane change and the target lane change point are fitted to obtain the local lane change trajectory, so that the vehicle can drive according to the local lane change trajectory.
9. The vehicle local trajectory planning method according to claim 8, characterized in that, The process of fitting the local trajectory points of each target lane change and the target lane change point to obtain the local lane change trajectory includes: Each target local lane-change trajectory point and the lane-change target point are used as the points to be fitted; For each pair of adjacent points to be fitted among all the points to be fitted, the two points to be fitted are respectively taken as the first starting point and the first ending point; Obtain the heading angle and curvature corresponding to the first starting point, and the heading angle and curvature corresponding to the first ending point; Based on the heading angle and curvature corresponding to the first starting point, the heading angle and curvature corresponding to the first ending point, and a preset fifth-order polynomial, a local sub-trajectory for lane changing is generated. All generated lane-change local sub-trajectories are sequentially spliced together to obtain the lane-change local trajectory.
10. The vehicle local trajectory planning method according to claim 9, characterized in that, The step of obtaining the heading angle and curvature corresponding to the first starting point, and the heading angle and curvature corresponding to the first ending point, includes: If the first starting point is the target local lane change trajectory point, then the heading angle of the vehicle at the position closest to the first starting point is obtained as the heading angle corresponding to the first starting point, and the curvature of the first starting point on the local trajectory of the previous frame is obtained as the curvature corresponding to the first starting point. If the first endpoint is a target local lane change trajectory point, then the heading angle of the vehicle at the position closest to the first endpoint is obtained as the heading angle corresponding to the first endpoint, and the curvature of the first endpoint on the local trajectory of the previous frame is obtained as the curvature corresponding to the first endpoint. If the first destination is a lane-changing target point, then obtain the heading angle and curvature corresponding to the first destination from the map.
11. The vehicle local trajectory planning method according to claim 8, characterized in that, The lane change point heatmap includes multiple empirical lane change points. Determining the lane change target point on the second reference trajectory line based on the lane change point heatmap includes: The target empirical lane change point is obtained by averaging the positions of the multiple empirical lane change points. The second reference trajectory point on the second reference trajectory line that is closest to the target empirical lane-changing point is taken as the lane-changing target point.
12. The vehicle local trajectory planning method according to claim 8, characterized in that, The vehicle local trajectory planning method also includes: An ST map is established based on the vehicle's perception data, and the ST map represents the possible locations of obstacles at different points in time. Identify obstacles in the lane where the vehicle is located, and the obstacle areas in the target lane as shown in the ST diagram; Based on the aforementioned obstacle area, a passable area is determined in the ST map; Multiple sampling points are obtained by evenly distributing samples within the passable area. Based on the origin of the ST graph and the multiple sampling points, multiple candidate speed trajectories corresponding to the lane-changing local trajectory are generated, where the origin represents the position of the vehicle at the current moment. The candidate speed trajectory with the smallest loss function value among the multiple candidate speed trajectories is determined as the target speed trajectory, so that the vehicle travels at the speed indicated by the target speed trajectory.
13. An electronic device comprising a memory and a processor, the memory storing a computer program for execution by the processor to implement the vehicle local trajectory planning method as described in any one of claims 1-12.
14. A vehicle comprising the electronic equipment as claimed in claim 13.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is executed by a processor to implement the vehicle local trajectory planning method as described in any one of claims 1-12.
Citation Information
Patent Citations
Method for planning local route of ground unmanned platform
CN107289938A
Real-time collision avoidance track planning method and system for lane changing of vehicles on expressway
CN112572443A
Local path planning method and device, computer equipment and storage medium
CN113091750A
Method and device for planning obstacle avoidance path of driving device
CN113960996A