Method and apparatus for calculating movement trajectory of vehicle, electronic device, and storage medium
By calculating the vehicle's starting point coordinates and heading angle, and combining the reference line and curve length, an accurate motion trajectory reference line is generated. This solves the problem of inaccurate calculation of the vehicle's left-turn driving path in the existing technology, simplifies the construction of the simulation environment, and improves the safety and stability of the autonomous driving system.
Patent Information
- Application Number
- PCT/CN2024/121115
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-04-26
- Filing Date
- 2024-09-25
- Publication Date
- 2025-10-30
AI Technical Summary
Existing technologies cannot accurately calculate the variable curvature path of a vehicle turning left, resulting in high complexity in building vehicle motion trajectories in the simulation environment, which makes it difficult to meet the safety requirements of autonomous driving systems.
By obtaining the vehicle's starting point coordinates, heading angle, and reference line length, the starting point and ending point coordinates of each curve are calculated to generate an accurate motion trajectory reference line. The coordinates of the end of the reference line are calculated using the product of the cosine and sine values, and the heading angle of the curve is calculated by combining the curvature and length of the curve, thus constructing an accurate vehicle motion trajectory.
It enables accurate calculation of the variable curvature path of a vehicle turning left in a simulation environment, reduces the complexity of the system setup, meets the safety requirements of the autonomous driving system, improves the stability of the automatic emergency braking system, and reduces the false alarm rate.
Smart Images

Figure CN2024121115_30102025_PF_FP_ABST
Abstract
Description
Vehicle trajectory calculation methods, devices, electronic equipment and storage media
[0001] Cross-references to related applications
[0002] This application is based on and claims priority to Chinese Patent Application No. 202410510384.5, filed on April 26, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of vehicle technology, and in particular to a method, apparatus, electronic device, and storage medium for calculating vehicle motion trajectory. Background Technology
[0004] With the rapid development of autonomous driving technology, the requirements for active safety in dangerous autonomous driving scenarios are becoming increasingly stringent. The test scenarios in industry standards such as E-NCAP (Euro-New Car Assessment Program) and C-NCAP (China-New Car Assessment Program), which are conducive to achieving a five-star active safety rating for automatic emergency braking systems, are becoming increasingly complex. In particular, the necessity of building such scenarios in simulation environments and closed test tracks is increasing, especially for newly added scenarios involving vehicles turning left at intersections and colliding with pedestrians, bicycles, electric vehicles, and other vehicles going straight.
[0005] In related technologies, the current scene construction technology mainly involves building intersection scenes by dragging and dropping modules.
[0006] However, the existing technology cannot accurately calculate the variable curvature path of a vehicle making a left turn, and it urgently needs improvement.
[0007] Summary of the Invention
[0008] This application provides a method, apparatus, electronic device, and storage medium for calculating vehicle motion trajectory, in order to solve the problem that related technologies cannot accurately calculate the variable curvature path of a vehicle making a left turn.
[0009] The first aspect of this application provides a method for calculating a vehicle's motion trajectory, including the following steps:
[0010] Obtain the vehicle's starting point coordinates, the vehicle's starting point heading angle, the length of the first reference line, the lengths of at least two curves, and the length of the second reference line;
[0011] The end coordinates of the first reference line are determined based on the starting point coordinates of the vehicle, the starting point heading angle of the vehicle, and the length of the first reference line. The starting point heading angle of each curve and the end coordinates of each curve are obtained based on the end coordinates of the first reference line, the starting point heading angle of the vehicle, and the lengths of the at least two curves.
[0012] The end coordinates of the second reference line are calculated based on the heading angle of the starting point of each curve, the end coordinates of each curve, and the length of the second reference line. The motion trajectory reference line of the vehicle is generated based on the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
[0013] Based on the above-mentioned technical means, the problem that related technologies cannot accurately calculate the variable curvature path of a vehicle turning left is solved, and the reference route of the vehicle's trajectory at different speeds can be accurately calculated.
[0014] According to one embodiment of this application, determining the end coordinates of the first reference line based on the starting point coordinates of the vehicle, the starting point heading angle of the vehicle, and the length of the first reference line includes:
[0015] Calculate the first product between the length of the first reference line and the cosine of the heading angle at the starting point of the vehicle, and calculate the second product between the length of the first reference line and the sine of the heading angle at the starting point of the vehicle.
[0016] The end coordinates of the first reference line are obtained based on the first product, the second product, and the starting point coordinates of the vehicle.
[0017] Based on the aforementioned technical means, by calculating the product of the length of the first reference line and the cosine of the heading angle at the vehicle's starting point, and the length of the first reference line and the sine of the heading angle at the vehicle's starting point, an accurate result can be obtained, and the length and end coordinates of the first reference line can be precisely determined.
[0018] According to one embodiment of this application, the at least two curves include a first to a third curve, and obtaining the starting point heading angle of each curve and the ending coordinates of each curve based on the end coordinates of the first reference line, the starting point heading angle of the vehicle, and the lengths of the at least two curves includes:
[0019] Obtain the lengths of the first to third curves, the curvature of the starting point of the first curve, the curvature of the ending point of the first curve, the curvature of the second curve, the curvature of the starting point of the third curve, and the curvature of the ending point of the third curve;
[0020] The starting point heading angle of the first curve is obtained based on the starting point heading angle of the vehicle, and the starting point heading angle of the second curve is obtained based on the length of the first curve, the curvature of the end point of the first curve, the curvature of the starting point of the first curve, and the starting point heading angle of the first curve.
[0021] The coordinates of the end point of the first reference line are used as the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are obtained based on the length of the first curve, the curvature of the end point of the first curve, the curvature of the starting point of the first curve, the heading angle of the starting point of the first curve, and the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are used as the coordinates of the starting point of the second curve.
[0022] The starting point heading angle of the third curve is obtained based on the curvature of the second curve, the heading angle of the starting point of the second curve, and the length of the second curve.
[0023] The coordinates of the end point of the second curve are obtained based on the coordinates of the starting point of the second curve, the heading angle of the starting point of the second curve, the length of the second curve, and the curvature of the second curve. The coordinates of the end point of the second curve are then used as the coordinates of the starting point of the third curve.
[0024] The end coordinates of the third curve are obtained based on the length of the third curve, the curvature of the starting point of the third curve, the curvature of the ending point of the third curve, the heading angle of the starting point of the third curve, and the coordinates of the starting point of the third curve.
[0025] Based on the aforementioned technical means, by calculating the coordinates of the endpoints of each segment of the vehicle turning trajectory reference line, the heading angle of the endpoints, the curvature of the arc, and the length of the arc, the problem of building curved roads based on the OpenDrive standard format (the main open format and de facto standard for describing road networks in driving simulation applications) in simulation software is solved, reducing the operational complexity of building curved roads and thus saving construction time.
[0026] According to one embodiment of this application, calculating the end coordinates of the second reference line based on the heading angle of the starting point of each curve, the end coordinates of each curve, and the length of the second reference line includes:
[0027] The heading angle of the second reference line is obtained based on the length of the third curve, the curvature of the endpoint of the third curve, the curvature of the starting point of the third curve, and the heading angle of the starting point of the third curve.
[0028] The coordinates of the end point of the third curve are used as the coordinates of the starting point of the second reference line. The heading angle of the end point of the second reference line is obtained based on the heading angle of the starting point of the second reference line. The coordinates of the end point of the second reference line are obtained based on the length of the first curve, the heading angle of the end point of the second reference line, and the coordinates of the starting point of the second reference line.
[0029] Using the aforementioned techniques, by calculating the length, starting curvature, ending curvature, and starting heading angle of the third curve, the starting heading angle of the second reference line can be accurately derived. Furthermore, by utilizing the starting heading angle of the second reference line, the ending heading angle and end coordinates can be further calculated, thus providing accurate reference line position information.
[0030] According to one embodiment of this application, generating a motion trajectory reference line for the vehicle based on the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line includes:
[0031] The vehicle's motion trajectory reference line is obtained by sequentially connecting the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
[0032] Based on the aforementioned technical means, the coordinates of each connection point are calculated based on the position information of the actual vehicle and the reference line. Therefore, by connecting the coordinates of different points in sequence, an accurate motion trajectory reference line can be constructed.
[0033] According to the vehicle trajectory calculation method provided in this application, the end coordinates of the first reference line are determined based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of the first reference line. The starting point heading angle and end coordinates of each curve are obtained based on the end coordinates of the first reference line, the vehicle's starting point heading angle, and the length of the curve. The end coordinates of the second reference line are calculated based on the curve's starting point heading angle, the curve's end coordinates, and the length of the second reference line. Finally, a vehicle trajectory reference line is generated based on the vehicle's starting point coordinates, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line. This solves the problem in related technologies where the variable curvature path of a vehicle making a left turn cannot be accurately calculated, and enables precise calculation of the vehicle's trajectory reference routes at different speeds.
[0034] A second aspect of this application provides a vehicle motion trajectory calculation device, comprising:
[0035] The acquisition module is used to acquire the vehicle's starting point coordinates, the vehicle's starting point heading angle, the length of the first reference line, the lengths of at least two curves, and the length of the second reference line;
[0036] The processing module is used to determine the end coordinates of the first reference line based on the starting point coordinates of the vehicle, the starting point heading angle of the vehicle, and the length of the first reference line, and to obtain the starting point heading angle of each curve and the end coordinates of each curve based on the end coordinates of the first reference line, the starting point heading angle of the vehicle, and the lengths of the at least two curves.
[0037] The calculation and generation module is used to calculate the end coordinates of the second reference line based on the heading angle of the starting point of each curve, the end coordinates of each curve, and the length of the second reference line, and to generate the motion trajectory reference line of the vehicle based on the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
[0038] According to one embodiment of this application, the processing module is configured to:
[0039] Calculate the first product between the length of the first reference line and the cosine of the heading angle at the starting point of the vehicle, and calculate the second product between the length of the first reference line and the sine of the heading angle at the starting point of the vehicle.
[0040] The end coordinates of the first reference line are obtained based on the first product, the second product, and the starting point coordinates of the vehicle.
[0041] According to one embodiment of this application, the at least two curves include a first to a third curve, and the processing module is configured to:
[0042] Obtain the lengths of the first to third curves, the curvature of the starting point of the first curve, the curvature of the ending point of the first curve, the curvature of the second curve, the curvature of the starting point of the third curve, and the curvature of the ending point of the third curve;
[0043] The starting point heading angle of the first curve is obtained based on the starting point heading angle of the vehicle, and the starting point heading angle of the second curve is obtained based on the length of the first curve, the curvature of the end point of the first curve, the curvature of the starting point of the first curve, and the starting point heading angle of the first curve.
[0044] The coordinates of the end point of the first reference line are used as the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are obtained based on the length of the first curve, the curvature of the end point of the first curve, the curvature of the starting point of the first curve, the heading angle of the starting point of the first curve, and the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are used as the coordinates of the starting point of the second curve.
[0045] The starting point heading angle of the third curve is obtained based on the curvature of the second curve, the heading angle of the starting point of the second curve, and the length of the second curve.
[0046] The coordinates of the end point of the second curve are obtained based on the coordinates of the starting point of the second curve, the heading angle of the starting point of the second curve, the length of the second curve, and the curvature of the second curve. The coordinates of the end point of the second curve are then used as the coordinates of the starting point of the third curve.
[0047] The end coordinates of the third curve are obtained based on the length of the third curve, the curvature of the starting point of the third curve, the curvature of the ending point of the third curve, the heading angle of the starting point of the third curve, and the coordinates of the starting point of the third curve.
[0048] According to one embodiment of this application, the calculation and generation module is used for:
[0049] The heading angle of the second reference line is obtained based on the length of the third curve, the curvature of the endpoint of the third curve, the curvature of the starting point of the third curve, and the heading angle of the starting point of the third curve.
[0050] The coordinates of the end point of the third curve are used as the coordinates of the starting point of the second reference line. The heading angle of the end point of the second reference line is obtained based on the heading angle of the starting point of the second reference line. The coordinates of the end point of the second reference line are obtained based on the length of the first curve, the heading angle of the end point of the second reference line, and the coordinates of the starting point of the second reference line.
[0051] According to one embodiment of this application, the calculation and generation module is used for:
[0052] The vehicle's motion trajectory reference line is obtained by sequentially connecting the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
[0053] According to the vehicle trajectory calculation device provided in this application embodiment, the end coordinates of the first reference line are determined based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of the first reference line. The starting point heading angle and end coordinates of each curve are obtained based on the end coordinates of the first reference line, the vehicle's starting point heading angle, and the length of the curve. The end coordinates of the second reference line are calculated based on the curve's starting point heading angle, the curve's end coordinates, and the length of the second reference line. Finally, a vehicle trajectory reference line is generated based on the vehicle's starting point coordinates, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line. This solves the problem in related technologies where the variable curvature path of a vehicle making a left turn cannot be accurately calculated, and enables precise calculation of the vehicle's trajectory reference routes at different speeds.
[0054] A third aspect of this application provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the vehicle motion trajectory calculation method as described in the above embodiments.
[0055] A fourth aspect of this application provides a computer-readable storage medium storing computer instructions for causing the computer to execute the vehicle trajectory calculation method as described in the above embodiments.
[0056] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0057] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0058] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:
[0059] Figure 1 is a schematic diagram illustrating the requirements of the E-NCAP / C-NCAP standards for the driving trajectory of vehicles turning left at intersections at different speeds.
[0060] Figure 2 is a flowchart of a vehicle motion trajectory calculation method according to an embodiment of this application;
[0061] Figure 3 is a flowchart of a vehicle motion trajectory calculation method according to an embodiment of this application;
[0062] Figure 4 is a schematic diagram of a vehicle motion trajectory according to an embodiment of this application;
[0063] Figure 5 is a schematic diagram of the composition of a vehicle motion trajectory calculation device according to an embodiment of this application;
[0064] Figure 6 is a schematic diagram of the composition of the electronic device provided in the embodiment of this application. Detailed Implementation
[0065] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0066] The following description, with reference to the accompanying drawings, outlines a vehicle trajectory calculation method, apparatus, electronic device, and storage medium according to embodiments of this application. Addressing the problem mentioned in the background art of inaccurately calculating the variable curvature path of a vehicle making a left turn, this application provides a vehicle trajectory calculation method. The method determines the end coordinates of a first reference line based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of a first reference line. Then, based on the end coordinates of the first reference line, the vehicle's starting point heading angle, and the length of each curve, the method obtains the starting point heading angle and the end coordinates of each curve. The method calculates the end coordinates of a second reference line based on the curve's starting point heading angle, the curve's end coordinates, and the length of a second reference line. Finally, it generates a vehicle trajectory reference line based on the vehicle's starting point coordinates, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line. This solves the problem of inaccurately calculating the variable curvature path of a vehicle making a left turn, and enables precise calculation of reference routes for the vehicle's trajectory at different speeds.
[0067] Before introducing the vehicle trajectory calculation method of this application, let's first introduce the purpose of proposing the vehicle trajectory calculation method of this application. As shown in Figure 1, Figure 1 shows the requirements of the E-NCAP / C-NCAP standard for the driving trajectory corresponding to different speeds when a vehicle turns left at an intersection. In Figure 1, VUT (Vehicle Under Test) is the test vehicle, and GVT (Global Vehicle Target) is the target vehicle. In order to meet the requirements of the above standard, this application proposes a vehicle trajectory calculation method that can quickly and accurately calculate the reference route of the vehicle's driving trajectory at different speeds in virtual simulation environment and real vehicle environment. It fully complies with the requirements of the E-NCAP / C-NCAP standard for the vehicle's trajectory in this scenario. At the same time, it can be generalized to different speeds for iterative testing by engineers during the development and testing phases, which greatly facilitates the improvement of the stability of the automatic emergency braking system and the reduction of false activation rate and missed activation rate.
[0068] Specifically, Figure 2 is a flowchart illustrating a vehicle motion trajectory calculation method provided in an embodiment of this application.
[0069] As shown in Figure 2, the method for calculating the vehicle's trajectory includes the following steps:
[0070] In step S201, the starting point coordinates of the vehicle, the starting point heading angle of the vehicle, the length of the first reference line, the lengths of at least two curves, and the length of the second reference line are obtained.
[0071] Among them, the vehicle's starting point coordinates refer to the vehicle's initial position in the autonomous driving system, the vehicle's starting point heading angle refers to the angle between the vehicle's center of gravity velocity and the horizontal axis in the ground coordinate system, the length of the first reference line refers to the distance between the starting point and the ending point of the first reference line, the length of the curve refers to the arc length between the starting point and the ending point of the curve, and the length of the second reference line refers to the distance between the starting point and the ending point of the second reference line.
[0072] Specifically, in this application embodiment, the starting point coordinates of the vehicle can be obtained through a GPS (Global Positioning System) positioning system, and the starting point heading angle of the vehicle can be obtained through sensors. It should be noted that the above-mentioned methods for obtaining the starting point coordinates and the starting point heading angle of the vehicle are merely exemplary and are not intended to limit this application. Those skilled in the art can adopt other methods to obtain the starting point coordinates and the starting point heading angle of the vehicle according to the actual situation. To avoid redundancy, they will not be described in detail here.
[0073] To facilitate understanding by those skilled in the art regarding the vehicle's starting point coordinates, starting point heading angle, length of the first reference line, and length of the second reference line in the embodiments of this application, the abscissa of the vehicle's starting point, ordinate of the vehicle's starting point, starting point heading angle, and length of the first reference line are respectively expressed as: x1=x start (1) y1=y start (2) hdg1=hdg start (3) length1=L line (4)
[0074] Where x1 is the x-coordinate of the vehicle's starting point, x start Here, y1 is the x-coordinate of the vehicle's starting point, and y2 is the y-coordinate of the vehicle's starting point. start Here, hdg1 is the ordinate of the vehicle's starting point, hdg is the heading angle of the vehicle's starting point, and hdg is the ordinate of the vehicle's starting point. start Here are the parameters used to determine the vehicle's starting heading angle, where length1 is the length of the first reference line, and L... lineThese are parameters used to determine the lengths of the first reference line and the second reference line.
[0075] In step S202, the end coordinates of the first reference line are determined based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of the first reference line. The starting point heading angle of each curve and the end coordinates of each curve are obtained based on the end coordinates of the first reference line, the vehicle's starting point heading angle, and the lengths of at least two curves.
[0076] Specifically, by calculating the end coordinates of the first reference line, the starting point heading angle, and the length of the first reference line based on the vehicle's starting point coordinates, heading angle, and end coordinates of each curve, more accurate motion trajectory calculation results can be obtained. Furthermore, more curves can be flexibly added to meet the needs of more complex vehicle motion paths.
[0077] Furthermore, in some embodiments, determining the end coordinates of the first reference line based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of the first reference line includes: calculating a first product between the length of the first reference line and the cosine of the vehicle's starting point heading angle, and calculating a second product between the length of the first reference line and the sine of the vehicle's starting point heading angle; and obtaining the end coordinates of the first reference line based on the first product, the second product, and the vehicle's starting point coordinates.
[0078] To facilitate understanding of the first and second products of the embodiments of this application by those skilled in the art, the first and second products can be expressed by equations (5) and (6) respectively: x lin1 =length1·cos(hdg1) (5) y lin1 =length1·sin(hdg1) (6)
[0079] Where, x lin1 The parameters used to calculate the x-coordinate of the end of the first reference line are: length1, hdg1, and y. lin1 These are the parameters used to calculate the ordinate of the end point of the first reference line.
[0080] Furthermore, based on the first product, the second product, and the vehicle's starting point coordinates, the ending coordinates of the first reference line can be obtained: x2 = x lin1 +x1 (7) y2=y lin1 +y1 (8)
[0081] Where x2 is the x-coordinate of the end of the first reference line, x lin1 The parameters used to calculate the x-coordinate of the end of the first reference line are: x1 is the x-coordinate of the vehicle's starting point, y2 is the y-coordinate of the end of the first reference line, and y... lin1y1 is the parameter used to calculate the end ordinate of the first reference line, and y1 is the ordinate of the starting point of the vehicle.
[0082] Further, in some embodiments, at least two curves include a first to a third curve. The starting point heading angle and the end coordinates of each curve are obtained based on the end coordinates of the first reference line, the vehicle's starting point heading angle, and the lengths of the at least two curves. This includes: obtaining the lengths of the first to third curves, the starting point curvature of the first curve, the ending point curvature of the first curve, the curvature of the second curve, the starting point curvature of the third curve, and the ending point curvature of the third curve; obtaining the starting point heading angle of the first curve based on the vehicle's starting point heading angle, and obtaining the starting point heading angle of the second curve based on the length of the first curve, the ending point curvature of the first curve, the starting point curvature of the first curve, and the starting point heading angle of the first curve; using the end coordinates of the first reference line as the starting point coordinates of the first curve, and obtaining the starting point heading angle of the second curve based on the length of the first curve, the ending point curvature of the first curve, the starting point curvature of the first curve, and the ending point heading angle of the third curve; using the end coordinates of the first reference line as the starting point coordinates of the first curve, and obtaining the starting point heading angle of the second curve based on the length of the first curve, the starting point curvature of the first curve, the ending point curvature of the first curve, the starting point curvature of the first curve, and the ending point heading angle of the third curve; obtaining the starting point heading angle of the first curve based on the vehicle's starting point heading angle, and obtaining the starting point heading angle of the second curve based on the vehicle's starting point heading angle, and obtaining the starting point heading angle of the third curve based on the vehicle's starting point heading angle, and obtaining the starting point heading angle of the second ... third The coordinates of the end point of the first curve are obtained from the curvature of the end point of the first curve, the curvature of the starting point of the first curve, the heading angle of the starting point of the first curve, and the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are then used as the coordinates of the starting point of the second curve. The heading angle of the starting point of the second curve is obtained from the curvature of the second curve, the heading angle of the starting point of the second curve, and the length of the second curve. The coordinates of the end point of the second curve are obtained from the coordinates of the starting point of the second curve, the heading angle of the starting point of the second curve, the length of the second curve, and the curvature of the second curve. The coordinates of the end point of the second curve are then used as the coordinates of the starting point of the third curve. The coordinates of the end point of the third curve are obtained from the length of the third curve, the curvature of the starting point of the third curve, the curvature of the end point of the third curve, the heading angle of the starting point of the third curve, and the coordinates of the starting point of the third curve.
[0083] The lengths of the first to third curves can be expressed by the following formula: length2 = L spiral (9) length3=L arc (10) length4=L spiral (11)
[0084] Where length2 is the length of the first curve, L spiral The parameters used to determine the lengths of the first and third curves, where length3 is the length of the second curve, and L... arc The parameter used to determine the length of the second curve is length4, which is the length of the third curve.
[0085] Furthermore, the curvature at the starting point of the first curve, the curvature at the ending point of the first curve, the curvature at the starting point of the second curve, and the curvature at the ending point of the third curve can be calculated using the following formula: curvStart2=R1=0 (12) curvEnd4=R1=0 (16) R arc =R2 (17)
[0086] Where, curvStart2 is the starting curvature of the first curve, R1 is the parameter used to calculate the starting curvature of the first curve, and curvEnd2 is the ending curvature of the first curve. arc Here, `curvature3` is the curvature of the second curve, `curvStart4` is the curvature of the third curve, `curvEnd4` is the curvature of the third curve, and `R2` is the parameter used to calculate the curvature at the endpoint of the first curve, the curvature of the second curve, and the curvature at the starting point of the third curve. `curvature3` is the curvature of the second curve, `curvStart4` is the curvature at the starting point of the third curve, and `curvEnd4` is the curvature at the endpoint of the third curve. `R2` is used to determine `R`. arc The parameters.
[0087] Furthermore, the heading angle of the first curve can be obtained from the heading angle of the vehicle's starting point, which can be expressed as: hdg2=hdg1 (18)
[0088] Where hdg2 is the heading angle of the starting point of the first curve, and hdg1 is the heading angle of the starting point of the vehicle.
[0089] Furthermore, based on the length of the first curve, the curvature at the endpoint of the first curve, and the curvature at the starting point of the first curve, the parameter used to calculate the heading angle at the starting point of the second curve can be obtained: L spi2 =L spiral ·curvEnd2 / (curvEnd2-curvStart2) (19)
[0090] Among them, L spi2 L is the parameter used to calculate the heading angle at the starting point of the second curve. spiral The parameters used to determine the lengths of the first and third curves are: curvEnd2, which is the curvature at the end of the first curve, and curvStart2, which is the curvature at the start of the first curve.
[0091] Furthermore, based on the parameters used to calculate the heading angle at the starting point of the second curve, the curvature at the endpoint of the first curve, and the heading angle at the starting point of the first curve, the parameters used to determine the heading angle at the starting point of the second curve can be obtained:
[0092] Among them, hdg spi2L is the parameter used to determine the heading angle of the starting point of the second curve. spi2 Here, is the parameter used to calculate the heading angle at the starting point of the second curve, curvEnd2 is the curvature at the end point of the first curve, and hdg2 is the heading angle at the starting point of the first curve.
[0093] Furthermore, the starting point heading angle of the second curve can be obtained using the parameters described above for determining the heading angle of the second curve. The starting point heading angle of the second curve can be expressed as: hdg3 = hdg spi2 (twenty one)
[0094] Where hdg3 is the heading angle at the starting point of the second curve, hdg spi2 These are the parameters used to determine the heading angle of the starting point of the second curve.
[0095] Furthermore, taking the coordinates (x2, y2) of the end point of the first reference line as the coordinates of the starting point of the first curve, the parameters used to calculate the coordinates of the end point of the first curve can be obtained based on the curvature of the end point and the curvature of the starting point of the first curve:
[0096] Among them, a spi2 The parameters used to calculate the end coordinates of the first curve are: curvEnd2, the end curvature of the first curve, and curvStart2, the starting curvature of the first curve.
[0097] Furthermore, based on the length of the first curve, the parameters used to calculate the coordinates of the end point of the first curve, and the heading angle of the starting point of the first curve, the parameters used to calculate the x-coordinate of the end point of the first curve and the parameters used to calculate the y-coordinate of the end point of the first curve can be calculated: x spi2 =S(length2 / a) spi2 )·a spi2 ·cos(hdg2)-S(length2 / a spi2 )·a spi2 ·sin(hdg2) (23) y spi2 =S(length2 / a) spi2 )·a spi2 ·cos(hdg2)+S(length2 / a spi2 )·a spi2 sin(hdg2) (24)
[0098] Where, x spi2 Here, S() is the Fresnel sine integral function used to calculate the x-coordinate of the end of the first curve, length2 is the length of the first curve, and a is the parameter used to calculate the x-coordinate of the end of the first curve. spi2Here, hdg2 is the heading angle of the starting point of the first curve, and hdg2 is the parameter used to calculate the coordinates of the end point of the first curve. spi2 These are the parameters used to calculate the ordinate of the end point of the first curve.
[0099] Furthermore, based on the parameters used to calculate the x-coordinate of the end point of the first curve, the parameters used to calculate the y-coordinate of the end point of the first curve, and the coordinates of the starting point of the first curve, the coordinates of the end point of the first curve can be obtained: x3 = x spi2 +x2 (25) y3=y spi2 +y2 (26)
[0100] Where x3 is the x-coordinate of the end of the first curve, x spi2 Here, x2 is the x-coordinate of the starting point of the first curve, and y3 is the y-coordinate of the ending point of the first curve. spi2 y1 is the parameter used to calculate the ordinate of the end point of the first curve, and y2 is the ordinate of the starting point of the first curve.
[0101] Furthermore, the coordinates of the end point of the first curve (x3, y3) are used as the coordinates of the starting point of the second curve, and the first parameter used to calculate the coordinates of the end point of the second curve is obtained based on the heading angle of the starting point of the second curve: angle0_cur=hdg3+pi / 2 (27)
[0102] Where angle0_cur is the first parameter used to calculate the coordinates of the end point of the second curve, hdg3 is the heading angle of the starting point of the second curve, and pi is pi.
[0103] Furthermore, based on the curvature of the second curve, the length of the second curve, and the first parameter used to calculate the coordinates of the end point of the second curve, the second parameter used to calculate the coordinates of the end point of the second curve can be obtained: angle1_cur=curvature3·length3+angle0_cur (28)
[0104] Where angle1_cur is the second parameter used to calculate the coordinates of the end point of the second curve, curvature3 is the curvature of the second curve, length3 is the length of the second curve, and angle0_cur is the first parameter used to calculate the coordinates of the end point of the second curve.
[0105] Furthermore, based on the curvature of the second curve, the parameters used to determine the heading angle of the starting point of the second curve, and the heading angle of the starting point of the second curve, the parameters used to determine the heading angle of the starting point of the third curve can be obtained: hdg cur =curvature3·(pi / 2-hdgspi2 )·1 / curvature3+hdg3 (29)
[0106] Among them, hdg cur Here are the parameters used to determine the heading angle of the starting point of the third curve, where curvature3 is the curvature of the second curve, pi is pi, and hdg is the value of pi. spi2 hdg3 is the heading angle at the starting point of the second curve, used to determine the heading angle at the starting point of the second curve.
[0107] Furthermore, the starting point heading angle of the third curve can be obtained using the parameters mentioned above for determining the heading angle of the third curve. The starting point heading angle of the third curve can be expressed as: hdg4 = hdg cur (30)
[0108] Where hdg4 is the heading angle of the starting point of the third curve, hdg cur These are the parameters used to determine the heading angle of the starting point of the third curve.
[0109] Furthermore, based on the second parameter used to calculate the end coordinates of the second curve, the first parameter used to calculate the end coordinates of the second curve, the curvature of the second curve, and the starting point coordinates of the second curve, the parameters used to calculate the x-coordinate of the end of the second curve and the parameters used to calculate the y-coordinate of the end of the second curve can be obtained: x cur =(cos(angle1_cur)-cos(angle0_cur)) / (-curvature3)+x3 (31) y cur =(sin(angle1_cur)-sin(angle0_cur)) / (-curvature3)+y3 (32)
[0110] Where, x cur Here, `angle1_cur` is the second parameter used to calculate the x-coordinate of the endpoint of the second curve, `angle0_cur` is the first parameter used to calculate the x-coordinate of the endpoint of the second curve, `curvature3` is the curvature of the second curve, `x3` is the x-coordinate of the starting point of the second curve, and `y` is the x-coordinate of the starting point of the second curve. cur y3 is the parameter used to calculate the ordinate of the end point of the second curve, and y3 is the ordinate of the starting point of the second curve.
[0111] Furthermore, based on the parameters used to calculate the x-coordinate of the second curve's endpoint, the parameters used to calculate the y-coordinate of the second curve's endpoint, and the coordinates of the second curve's starting point, the coordinates of the second curve's endpoint can be obtained. These coordinates are then used as the coordinates of the starting point of the third curve. The coordinates of the second curve's endpoint can be expressed as: x⁴ = x cur +x3 (33) y4=y cur +y3 (34)
[0112] Where x4 is the x-coordinate of the end of the second curve, x cur Here, x3 is the x-coordinate of the starting point of the second curve, and y4 is the y-coordinate of the ending point of the second curve. cur y3 is the parameter used to calculate the ordinate of the end point of the second curve, and y3 is the ordinate of the starting point of the second curve.
[0113] Furthermore, based on the curvature of the endpoint and the curvature of the starting point of the third curve, the parameters used to calculate the endpoint coordinates of the third curve can be obtained using the following formula:
[0114] Among them, a spi4 The parameters used to calculate the end coordinates of the third curve are: curEnd4 is the curvature at the end of the third curve, and curStart4 is the curvature at the start of the third curve.
[0115] Furthermore, based on the parameters used to calculate the end coordinates of the third curve, the length of the third curve, and the heading angle of the starting point of the third curve, the parameters used to calculate the abscissa of the end of the third curve and the parameters used to calculate the ordinate of the end of the third curve can be obtained: x spi4 =S(length4 / a) spi4 )·a spi4 ·cos(hdg4)-S(length4 / a spi4 )·a spi4 ·sin(hdg4) (36) y spi4 =S(length4 / a) spi4 )·a spi4 ·cos(hdg4)+S(length4 / a spi4 )·a spi4 sin(hdg4) (37)
[0116] Where, x spi4 Here, S() is the Fresnel sine integral function used to calculate the x-coordinate of the endpoint of the third curve, length4 is the length of the third curve, and a is the parameter used to calculate the x-coordinate of the endpoint of the third curve. spi4Here are the parameters used to calculate the end coordinates of the third curve, where hdg4 is the heading angle of the starting point of the third curve, and y is the y-axis. spi4 These are the parameters used to calculate the ordinate of the end point of the third curve.
[0117] Furthermore, based on the parameters used to calculate the x-coordinate of the third curve's endpoint, the parameters used to calculate the y-coordinate of the third curve's endpoint, and the coordinates of the starting point of the third curve, the coordinates of the endpoint of the third curve can be obtained: x5 = x spi4 +x4 (38) y5=y spi4 +y4 (39)
[0118] Where x5 is the x-coordinate of the end of the third curve, x spi4 Here, x4 is the x-coordinate of the starting point of the third curve, and y5 is the y-coordinate of the ending point of the third curve. spi4 y4 is the parameter used to calculate the ordinate of the end point of the third curve, and y4 is the ordinate of the starting point of the third curve.
[0119] In step S203, the end coordinates of the second reference line are calculated based on the heading angle of the starting point of each curve, the end coordinates of each curve, and the length of the second reference line. The motion trajectory reference line of the vehicle is generated based on the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
[0120] Further, in some embodiments, calculating the end coordinates of the second reference line based on the starting point heading angle of each curve, the end coordinates of each curve, and the length of the second reference line includes: obtaining the starting point heading angle of the second reference line based on the length of the third curve, the end curvature of the third curve, the starting curvature of the third curve, and the starting point heading angle of the third curve; using the end coordinates of the third curve as the starting point coordinates of the second reference line, obtaining the end heading angle of the second reference line based on the starting point heading angle of the second reference line, and obtaining the end coordinates of the second reference line based on the length of the first curve, the end heading angle of the second reference line, and the starting point coordinates of the second reference line.
[0121] Specifically, L can be obtained from the length of the third curve, the curvature at the endpoint of the third curve, and the curvature at the starting point of the third curve. spi4 L spi4 =length4·curvEnd4 / (curvEnd4-curvStart4) (40)
[0122] Among them, L spi4Here are the parameters used to calculate the heading angle of the starting point of the second reference line, length4 is the length of the third curve, curvEnd4 is the curvature of the end point of the third curve, and curvStart4 is the curvature of the starting point of the third curve.
[0123] Furthermore, based on the parameters used to calculate the heading angle at the starting point of the second reference line, the curvature at the endpoint of the third curve, and the heading angle at the starting point of the third curve, the parameters used to determine the heading angle at the starting point of the second reference line can be obtained:
[0124] Among them, hdg spi4 L is the parameter used to determine the heading angle of the starting point of the second reference line. spi4 Here, is the parameter used to calculate the heading angle at the starting point of the second reference line, curvEnd4 is the curvature at the end of the third curve, and hdg4 is the heading angle at the starting point of the third curve.
[0125] Furthermore, the starting point heading angle of the second reference line can be obtained using the parameters described above for determining the heading angle of the second reference line. The starting point heading angle of the second reference line can be expressed as: hdg5 = hdg spi4 (42)
[0126] Where hdg5 is the heading angle of the starting point of the second reference line, hdg spi4 This is the parameter used to determine the heading angle of the starting point of the second reference line.
[0127] Furthermore, the coordinates of the end point of the third curve (x5, y5) are taken as the starting point coordinates of the second reference line, and the ending point heading angle of the second reference line is obtained from the heading angle of the starting point. The ending point heading angle of the second reference line can be expressed as: hdg end =hdg5 (43)
[0128] Among them, hdg end is the heading angle at the end of the second reference line, and hdg5 is the heading angle at the beginning of the second reference line.
[0129] Furthermore, the length of the second reference line can be expressed as: length5 = L line (44)
[0130] Where length5 is the length of the second reference line, L line These are parameters used to determine the lengths of the first reference line and the second reference line.
[0131] Furthermore, based on the length of the second reference line, the heading angle at the end of the second reference line, and the coordinates of the starting point of the second reference line, the coordinates of the end point of the second reference line can be obtained: x end=length5·cos(hdg) end )+x5 (46) y end =length5·sin(hdg) end )+y5 (47)
[0132] Where, x end Here, x is the x-coordinate of the end of the second reference line, length5 is the length of the second reference line, and hdg is the x-coordinate of the end of the second reference line. end x5 is the heading angle at the end of the second reference line, x5 is the x-coordinate of the starting point of the second reference line, and y end y1 is the ordinate of the end point of the second reference line, and y2 is the ordinate of the starting point of the second reference line.
[0133] Furthermore, in some embodiments, generating a vehicle motion trajectory reference line based on the vehicle's starting point coordinates, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line includes: sequentially connecting the vehicle's starting point coordinates, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line to obtain the vehicle's motion trajectory reference line.
[0134] Specifically, a reference route for the vehicle's motion trajectory is generated by connecting the vehicle's heading angle and starting point coordinates, the heading angle and ending coordinates of the first reference line, the heading angle and ending coordinates of each curve, and the heading angle and ending coordinates of the second reference line.
[0135] Therefore, by calculating the coordinates of the endpoints of each segment of the vehicle turning trajectory reference line, the direction angle of the endpoints, the curvature of the arc, and the length of the arc, the problem of building curved roads based on the OpenDrive standard format (the main open format and de facto standard for describing road networks in driving simulation applications) in simulation software is solved, reducing the operational complexity of building curved roads and thus saving construction time.
[0136] To facilitate a clearer and more intuitive understanding of the vehicle trajectory calculation method of this application embodiment by those skilled in the art, a detailed description is provided below with reference to Figures 3 and 4, wherein S1 is the first reference line, S2 is the first curve, S3 is the second curve, S4 is the third curve, S5 is the second reference line, R1 is the road radius at the start of the curve, and R2 is the road radius at the end of the curve.
[0137] Specifically, Figure 3 is a flowchart of a vehicle motion trajectory calculation method according to an embodiment of this application, which includes the following steps.
[0138] S301, pre-collect or set the coordinates and orientation angle of the starting point.
[0139] S302, based on the coordinates and direction angle of the end point of the first segment S1 trajectory, determine the starting point of the first straight line trajectory and the second segment S2 trajectory.
[0140] S303, based on the coordinates and orientation angle of the end point of the second segment S2 trajectory, determine the starting point of the second segment of variable curvature trajectory and the third segment S3 trajectory.
[0141] S304. Based on the coordinates and orientation angle of the end point of the third segment S3 trajectory, determine the starting point of the third segment of the constant curvature trajectory and the fourth segment S4 trajectory.
[0142] S305. Based on the coordinates and orientation angle of the end point of the fourth segment S4 trajectory, determine the starting point of the fourth segment variable curvature trajectory and the fifth segment S5 trajectory.
[0143] S306. Based on the coordinates and direction angle of the end point of the fifth segment S5 trajectory, determine the fifth straight line trajectory and the end point of the trajectory line.
[0144] S307 connects the orientation angle and coordinates of S1, S2, S3, S4, and S5.
[0145] S308 generates a reference route for the vehicle's turning trajectory.
[0146] Therefore, this application uses Fresnel integral to calculate the variable curvature trajectory of the transition segment S2 from the straight line S1 to the constant curvature curve S3 in real time, accurately meeting the requirements of the corresponding scenario for vehicle motion trajectory in the E-NCAP / C-NCAP test standards. In addition to solving the difficulty of trajectory generation in the corresponding test scenario in the E-NCAP / C-NCAP test standards, it also serves as a module of the automatic emergency braking system software function development algorithm to deal with the situation of emergency collision when the vehicle is turning.
[0147] According to the vehicle trajectory calculation method proposed in this application, the end coordinates of the first reference line are determined based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of the first reference line. Then, the starting point heading angle and end coordinates of each curve are obtained based on the end coordinates of the first reference line, the vehicle's starting point heading angle, and the length of the curve. The end coordinates of the second reference line are calculated based on the curve's starting point heading angle, the curve's end coordinates, and the length of the second reference line. Finally, a vehicle trajectory reference line is generated based on the vehicle's starting point coordinates, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line. This solves the problem that related technologies cannot accurately calculate the variable curvature path of a vehicle making a left turn, and can accurately calculate the reference route of the vehicle's trajectory at different speeds.
[0148] Next, the vehicle motion trajectory calculation device according to the embodiments of this application is described with reference to the accompanying drawings.
[0149] Figure 5 is a schematic diagram of the vehicle motion trajectory calculation device according to an embodiment of this application.
[0150] As shown in Figure 5, the vehicle motion trajectory calculation device includes: an acquisition module 100, a processing module 200, and a calculation and generation module 300.
[0151] The acquisition module 100 is used to acquire the vehicle's starting point coordinates, the vehicle's starting point heading angle, the length of the first reference line, the lengths of at least two curves, and the length of the second reference line. The processing module 200 is used to determine the end coordinates of the first reference line based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of the first reference line, and to obtain the starting point heading angle and end coordinates of each curve based on the end coordinates of the first reference line, the vehicle's starting point heading angle, and the lengths of at least two curves. The calculation and generation module 300 is used to calculate the end coordinates of the second reference line based on the starting point heading angle of each curve, the end coordinates of each curve, and the length of the second reference line, and to generate a motion trajectory reference line for the vehicle based on the vehicle's starting point coordinates, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
[0152] Furthermore, in some embodiments, the processing module 200 is configured to: calculate a first product between the length of the first reference line and the cosine of the heading angle at the starting point of the vehicle, and calculate a second product between the length of the first reference line and the sine of the heading angle at the starting point of the vehicle; and obtain the end coordinates of the first reference line based on the first product, the second product, and the starting point coordinates of the vehicle.
[0153] Further, in some embodiments, at least two curves include a first to a third curve. The processing module 200 is used to: obtain the lengths of the first to third curves, the starting curvature of the first curve, the ending curvature of the first curve, the curvature of the second curve, the starting curvature of the third curve, and the ending curvature of the third curve; obtain the starting point heading angle of the first curve based on the vehicle's starting point heading angle, and obtain the starting point heading angle of the second curve based on the length of the first curve, the ending curvature of the first curve, the starting curvature of the first curve, and the starting point heading angle of the first curve; use the end coordinates of the first reference line as the starting point coordinates of the first curve, and obtain the starting point heading angle of the second curve based on the length of the first curve, the ending curvature of the first curve, the starting curvature of the first curve, and the ending curvature of the third curve; The starting point heading angle and coordinates of the first curve are used to obtain the end coordinates of the first curve, which are then used as the starting point coordinates of the second curve. The starting point heading angle of the third curve is obtained based on the curvature, the starting point heading angle, and the length of the second curve. Similarly, the end coordinates of the second curve are obtained based on the starting point coordinates, the starting point heading angle, the length, and the curvature, and are then used as the starting point coordinates of the third curve. Finally, the end coordinates of the third curve are obtained based on its length, the starting point curvature, the ending point curvature, the starting point heading angle, and the starting point coordinates.
[0154] Furthermore, in some embodiments, the calculation and generation module 300 is used to: obtain the starting point heading angle of the second reference line based on the length of the third curve, the end curvature of the third curve, the starting curvature of the third curve, and the starting point heading angle of the third curve; use the end coordinates of the third curve as the starting point coordinates of the second reference line, obtain the end heading angle of the second reference line based on the starting point heading angle of the second reference line, and obtain the end coordinates of the second reference line based on the length of the first curve, the ending heading angle of the second reference line, and the starting point coordinates of the second reference line.
[0155] Furthermore, in some embodiments, the calculation and generation module 300 is used to: sequentially connect the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line to obtain a motion trajectory reference line for the vehicle.
[0156] It should be noted that the foregoing explanation of the vehicle trajectory calculation method embodiment also applies to the vehicle trajectory calculation device of this embodiment, and will not be repeated here.
[0157] The vehicle trajectory calculation device proposed in this application determines the end coordinates of a first reference line based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of a first reference line. It then obtains the starting point heading angle and end coordinates of each curve based on the end coordinates of the first reference line, the vehicle's starting point heading angle, and the length of the curve. The device calculates the end coordinates of a second reference line based on the curve's starting point heading angle, the curve's end coordinates, and the length of a second reference line. Finally, it generates a vehicle trajectory reference line based on the vehicle's starting point coordinates, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line. This solves the problem in related technologies where the variable curvature path of a vehicle making a left turn cannot be accurately calculated, enabling precise calculation of reference routes for the vehicle's trajectory at different speeds.
[0158] Figure 6 is a schematic diagram of the composition of an electronic device provided in an embodiment of this application. The electronic device may include: a memory 601, a processor 602, and a computer program stored in the memory 601 and executable on the processor 602.
[0159] When the processor 602 executes the program, it implements the trajectory planning method for the electronic device provided in the above embodiments.
[0160] Furthermore, the electronic device also includes a communication interface 603 for communication between the memory 601 and the processor 602.
[0161] The memory 601 is used to store computer programs that can run on the processor 602.
[0162] The memory 601 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0163] If the memory 601, processor 602, and communication interface 603 are implemented independently, they can be interconnected via a bus to communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in Figure 6, but this does not imply that there is only one bus or one type of bus.
[0164] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.
[0165] The processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application.
[0166] This embodiment also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the vehicle trajectory planning method described above.
[0167] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0168] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0169] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0170] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0171] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0172] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0173] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0174] The storage medium mentioned above may be a read-only memory, a magnetic disk, or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application. Persons skilled in the art may make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.
Claims
1. A method for calculating the trajectory of a vehicle, characterized in that, Includes the following steps: Obtain the vehicle's starting point coordinates, the vehicle's starting point heading angle, the length of the first reference line, the lengths of at least two curves, and the length of the second reference line; The end coordinates of the first reference line are determined based on the starting point coordinates of the vehicle, the starting point heading angle of the vehicle, and the length of the first reference line. The starting point heading angle of each curve and the end coordinates of each curve are obtained based on the end coordinates of the first reference line, the starting point heading angle of the vehicle, and the lengths of the at least two curves. The end coordinates of the second reference line are calculated based on the heading angle of the starting point of each curve, the end coordinates of each curve, and the length of the second reference line. The motion trajectory reference line of the vehicle is generated based on the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
2. The vehicle trajectory calculation method according to claim 1, characterized in that, Determining the end coordinates of the first reference line based on the vehicle's starting point coordinates, the vehicle's starting point heading angle, and the length of the first reference line includes: Calculate the first product between the length of the first reference line and the cosine of the heading angle at the starting point of the vehicle, and calculate the second product between the length of the first reference line and the sine of the heading angle at the starting point of the vehicle. The end coordinates of the first reference line are obtained based on the first product, the second product, and the starting point coordinates of the vehicle.
3. The vehicle trajectory calculation method according to claim 1 or 2, characterized in that, The at least two curves include a first to a third curve. The step of obtaining the starting point heading angle of each curve and the ending point coordinates of each curve based on the end coordinates of the first reference line, the starting point heading angle of the vehicle, and the lengths of the at least two curves includes: Obtain the lengths of the first to third curves, the curvature of the starting point of the first curve, the curvature of the ending point of the first curve, the curvature of the second curve, the curvature of the starting point of the third curve, and the curvature of the ending point of the third curve; The starting point heading angle of the first curve is obtained based on the starting point heading angle of the vehicle, and the starting point heading angle of the second curve is obtained based on the length of the first curve, the curvature of the end point of the first curve, the curvature of the starting point of the first curve, and the starting point heading angle of the first curve. The coordinates of the end point of the first reference line are used as the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are obtained based on the length of the first curve, the curvature of the end point of the first curve, the curvature of the starting point of the first curve, the heading angle of the starting point of the first curve, and the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are used as the coordinates of the starting point of the second curve. The starting point heading angle of the third curve is obtained based on the curvature of the second curve, the heading angle of the starting point of the second curve, and the length of the second curve. The coordinates of the end point of the second curve are obtained based on the coordinates of the starting point of the second curve, the heading angle of the starting point of the second curve, the length of the second curve, and the curvature of the second curve. The coordinates of the end point of the second curve are then used as the coordinates of the starting point of the third curve. The end coordinates of the third curve are obtained based on the length of the third curve, the curvature of the starting point of the third curve, the curvature of the ending point of the third curve, the heading angle of the starting point of the third curve, and the coordinates of the starting point of the third curve.
4. The vehicle trajectory calculation method according to claim 3, characterized in that, The step of calculating the end coordinates of the second reference line based on the heading angle of the starting point of each curve, the end coordinates of each curve, and the length of the second reference line includes: The heading angle of the second reference line is obtained based on the length of the third curve, the curvature of the endpoint of the third curve, the curvature of the starting point of the third curve, and the heading angle of the starting point of the third curve. The coordinates of the end point of the third curve are used as the coordinates of the starting point of the second reference line. The heading angle of the end point of the second reference line is obtained based on the heading angle of the starting point of the second reference line. The coordinates of the end point of the second reference line are obtained based on the length of the first curve, the heading angle of the end point of the second reference line, and the coordinates of the starting point of the second reference line.
5. The vehicle trajectory calculation method according to claim 3, characterized in that, The step of generating a motion trajectory reference line for the vehicle based on the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line includes: The vehicle's motion trajectory reference line is obtained by sequentially connecting the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
6. A vehicle motion trajectory calculation device, characterized in that, include: The acquisition module is used to acquire the vehicle's starting point coordinates, the vehicle's starting point heading angle, the length of the first reference line, the lengths of at least two curves, and the length of the second reference line; The processing module is used to determine the end coordinates of the first reference line based on the starting point coordinates of the vehicle, the starting point heading angle of the vehicle, and the length of the first reference line, and to obtain the starting point heading angle of each curve and the end coordinates of each curve based on the end coordinates of the first reference line, the starting point heading angle of the vehicle, and the lengths of the at least two curves. The calculation and generation module is used to calculate the end coordinates of the second reference line based on the heading angle of the starting point of each curve, the end coordinates of each curve, and the length of the second reference line, and to generate the motion trajectory reference line of the vehicle based on the starting point coordinates of the vehicle, the end coordinates of the first reference line, the end coordinates of each curve, and the end coordinates of the second reference line.
7. The vehicle motion trajectory calculation device according to claim 6, characterized in that, The processing module is used for: Calculate the first product between the length of the first reference line and the cosine of the heading angle at the starting point of the vehicle, and calculate the second product between the length of the first reference line and the sine of the heading angle at the starting point of the vehicle. The end coordinates of the first reference line are obtained based on the first product, the second product, and the starting point coordinates of the vehicle.
8. The vehicle motion trajectory calculation device according to claim 6 or 7, characterized in that, The at least two curves include the first to the third curve, and the processing module is used for: Obtain the lengths of the first to third curves, the curvature of the starting point of the first curve, the curvature of the ending point of the first curve, the curvature of the second curve, the curvature of the starting point of the third curve, and the curvature of the ending point of the third curve; The starting point heading angle of the first curve is obtained based on the starting point heading angle of the vehicle, and the starting point heading angle of the first curve is obtained based on the length of the first curve and the first... The starting point heading angle of the second curve is obtained by taking the curvature at the end of one curve, the curvature at the beginning of the first curve, and the heading angle at the beginning of the first curve. The coordinates of the end point of the first reference line are used as the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are obtained based on the length of the first curve, the curvature of the end point of the first curve, the curvature of the starting point of the first curve, the heading angle of the starting point of the first curve, and the coordinates of the starting point of the first curve. The coordinates of the end point of the first curve are used as the coordinates of the starting point of the second curve. The starting point heading angle of the third curve is obtained based on the curvature of the second curve, the heading angle of the starting point of the second curve, and the length of the second curve. The coordinates of the end point of the second curve are obtained based on the coordinates of the starting point of the second curve, the heading angle of the starting point of the second curve, the length of the second curve, and the curvature of the second curve. The coordinates of the end point of the second curve are then used as the coordinates of the starting point of the third curve. The end coordinates of the third curve are obtained based on the length of the third curve, the curvature of the starting point of the third curve, the curvature of the ending point of the third curve, the heading angle of the starting point of the third curve, and the coordinates of the starting point of the third curve.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the vehicle trajectory calculation method as described in any one of claims 1-5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the vehicle motion trajectory calculation method as described in any one of claims 1-5.
Citation Information
Patent Citations
Vehicle driving path obtaining method and device and computer readable storage medium
CN112061115A
Lane connecting line generation method and device, electronic equipment and storage medium
CN112232330A
Vehicle control method and control system and vehicle
CN112373463A
Mining area vehicle driving path planning method and device and computer equipment
CN114791288A
Vehicle motion trail calculation method and device, electronic equipment and storage medium
CN118089773A