Trajectory fitting method, device, electronic device and storage medium
The road complexity is determined by calculating the difference in heading angles of the trajectory point sequence. A multinomial fitting model is adopted to solve the problem of high computational resource consumption in long-distance trajectory fitting, and efficient and accurate trajectory fitting is achieved.
Patent Information
- Application Number
- CN202411566921.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-11-05
AI Technical Summary
In the navigation and path planning of autonomous vehicles, it is difficult to adopt a unified standard for fitting long-distance, highly complex trajectories, which leads to a significant increase in computing resource consumption and poor fitting results.
The road complexity is determined by calculating the difference in heading angle between adjacent trajectory points in the trajectory point sequence. An appropriate fitting complexity is then selected based on the road complexity for trajectory fitting, including high-complexity fitting for complex road sections and low-complexity fitting for simple road sections. A multinomial fitting model is used for fitting.
While maintaining fitting accuracy, it reduces computational resource consumption, adapts to trajectory fitting for road segments of varying complexity, and improves the efficiency and accuracy of the fitting algorithm.
Smart Images

Figure CN119063757B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of intelligent driving technology, and in particular to a trajectory fitting method, device, electronic device and storage medium. Background Art
[0002] In the navigation and path planning of autonomous vehicles, it is necessary to fit the vehicle's driving trajectory based on the sensor data collected in real time, and then perform path prediction and planning based on the fitted driving trajectory.
[0003] Currently, when fitting long-distance, high-complexity trajectories, we encounter the problem that some sections of the trajectory have high complexity, while others have low complexity, making it difficult to fit them using a unified standard. If a low-complexity fitting algorithm is used uniformly, the fitting effect of high-complexity sections will be very poor; if a high-complexity fitting algorithm is used uniformly, firstly, the consumption of computing resources will increase significantly, and secondly, the fitting effect of low-complexity sections supported by a high-complexity algorithm model may not be better than that of a low-complexity algorithm. Summary of the invention
[0004] The present invention provides a trajectory fitting method, device, electronic equipment and storage medium to solve the above problems.
[0005] In a first aspect, an embodiment of the present invention provides a trajectory fitting method, the method comprising:
[0006] Obtain the trajectory point sequence of the road section to be fitted;
[0007] Determining the road complexity of the road section to be fitted according to the heading angle difference between adjacent trajectory points in the trajectory point sequence;
[0008] The fitting complexity of the road section to be fitted is determined according to the road complexity, and trajectory fitting is performed on the road section to be fitted according to the fitting complexity.
[0009] Furthermore, determining the road complexity of the road section to be fitted according to the heading angle difference between adjacent trajectory points in the trajectory point sequence includes:
[0010] According to the heading angle difference between adjacent trajectory points in the trajectory point sequence, the number of heading angle changes in the section to be fitted and the cumulative value of the heading angle changes are determined; according to the number of heading angle changes in the section to be fitted and the cumulative value of the heading angle changes, the road complexity of the section to be fitted is determined.
[0011] Furthermore, determining the road complexity of the road section to be fitted according to the number of times the heading angle changes in the road section to be fitted and the cumulative value of the heading angle changes includes:
[0012] The road complexity of the road section to be fitted is calculated according to the following formula:
[0013]
[0014] Where m represents the road complexity, Indicates the number of positive and negative changes in the heading angle difference. Indicates the absolute cumulative value of the heading angle difference.
[0015] Furthermore, performing trajectory fitting on the road section to be fitted according to the fitting complexity includes:
[0016] According to the following formula, the fitting complexity is substituted into the polynomial fitting model of the piecewise curve.
[0017]
[0018] Among them, x is the coordinate value of one dimension of the trajectory point, w is the fitting model coefficient, The coordinate value of another dimension of the corresponding trajectory point, m represents the road complexity;
[0019] Solve the polynomial fitting model to obtain a fitting trajectory of the road section to be fitted.
[0020] Furthermore, before determining the road complexity of the road section to be fitted according to the heading angle difference between adjacent trajectory points in the trajectory point sequence, the method further includes:
[0021] The heading angle differences between adjacent trajectory points in the trajectory point sequence are smoothed.
[0022] In a second aspect, an embodiment of the present invention further provides a trajectory fitting device, the device comprising:
[0023] An acquisition module is used to acquire a trajectory point sequence of a road section to be fitted;
[0024] A complexity determination module, used to determine the road complexity of the to-be-fitted road section according to the heading angle difference between adjacent trajectory points in the trajectory point sequence;
[0025] The trajectory fitting module is used to determine the fitting complexity of the road section to be fitted according to the road complexity, and perform trajectory fitting on the road section to be fitted according to the fitting complexity.
[0026] Furthermore, the complexity determination module includes:
[0027] A number determination unit, used to determine the number of heading angle changes in the to-be-fitted section and the cumulative value of the heading angle changes according to the heading angle differences between adjacent trajectory points in the trajectory point sequence;
[0028] The complexity determination unit is used to determine the road complexity of the road section to be fitted according to the number of times the heading angle changes in the road section to be fitted and the cumulative value of the heading angle changes.
[0029] Furthermore, the complexity determination unit is used to:
[0030] The road complexity of the road section to be fitted is calculated according to the following formula:
[0031]
[0032] Where m represents the road complexity, Indicates the number of positive and negative changes in the heading angle difference. Indicates the absolute cumulative value of the heading angle difference.
[0033] In a third aspect, an embodiment of the present invention provides an electronic device, the device comprising:
[0034] one or more processors;
[0035] a storage device for storing one or more programs,
[0036] When the one or more programs are executed by the one or more processors, the one or more processors implement the trajectory fitting method as described in any one of the embodiments of the present invention.
[0037] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a trajectory fitting method as described in any one of the embodiments of the present invention.
[0038] The embodiment of the present invention calculates the complexity of each road section and determines the fitting complexity of the trajectory according to the complexity of the road section, thereby realizing high-complexity fitting for complex road sections and low-complexity fitting for simple road sections. This implementation reduces the consumption of computing resources for road section fitting while ensuring the accuracy of road section fitting, thereby realizing perfect adaptation of the fitting algorithm to different complex road sections.
[0039] The calculation accuracy of the road complexity is improved by calculating the road complexity in multiple dimensions according to the number of heading angle changes in the road section to be fitted and the cumulative value of the heading angle changes.
[0040] By smoothing the heading angle differences of adjacent trajectory points in the trajectory point sequence before determining the road complexity of the road section to be fitted based on the heading angle differences of adjacent trajectory points in the trajectory point sequence, the calculation accuracy of the heading angle differences is improved, thereby improving the determination accuracy of the road complexity of the road section to be fitted. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0042] Figure 1 is a flow chart of a trajectory fitting method provided by an embodiment of the present invention;
[0043] Figure 2 is a flow chart of another trajectory fitting method provided by an embodiment of the present invention;
[0044] Figure 3 is a structural schematic diagram of a trajectory fitting device provided by an embodiment of the present invention;
[0045] Figure 4 It is a structural schematic diagram of a device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0047] In the description of the present invention, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" and "plurality" refer to two or more. The words "first", "second", etc. do not limit the quantity and execution order, and the words "first", "second", etc. do not limit them to be different.
[0048] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0049] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally include other steps or modules that are not listed, or may optionally include other steps or modules that are inherent to these processes, methods, products or devices.
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clear, the following will be described through specific embodiments in conjunction with the accompanying drawings of the present invention.
[0051] Figure 1 is a flow chart of a trajectory fitting method provided by an embodiment of the present invention. This method is applicable to the scenario of trajectory fitting, especially the scenario of segmented fitting of long-distance trajectories. Figure 1 , a trajectory fitting method provided by an embodiment of the present invention includes:
[0052] S110: Obtain a trajectory point sequence of the road section to be fitted.
[0053] S120: Determine the road complexity of the road section to be fitted according to the heading angle difference between adjacent trajectory points in the trajectory point sequence.
[0054] The road complexity refers to the complexity of the road section to be fitted.
[0055] S130. Determine a fitting complexity of the road section to be fitted according to the road complexity, and perform trajectory fitting on the road section to be fitted according to the fitting complexity.
[0056] The fitting complexity refers to the complexity of fitting the road section to be fitted.
[0057] The embodiment of the present invention calculates the complexity of each road section and determines the fitting complexity of the trajectory according to the complexity of the road section, thereby realizing high-complexity fitting for complex road sections and low-complexity fitting for simple road sections. This implementation reduces the consumption of computing resources for road section fitting while ensuring the accuracy of road section fitting, thereby realizing perfect adaptation of the fitting algorithm to different complex road sections.
[0058] In order to improve the calculation accuracy of the road complexity, the road complexity of the road section to be fitted is determined according to the heading angle difference between adjacent trajectory points in the trajectory point sequence, including:
[0059] Determining the number of heading angle changes in the to-be-fitted section and the cumulative value of the heading angle changes according to the heading angle differences between adjacent trajectory points in the trajectory point sequence;
[0060] The road complexity of the road section to be fitted is determined according to the number of times the heading angle changes in the road section to be fitted and the accumulated value of the heading angle changes.
[0061] The number of times the heading angle changes in the fitting section can be determined according to the number of times the heading angle difference changes in positive and negative directions.
[0062] The cumulative value of the heading angle change can be determined based on the cumulative value of the absolute value of the heading angle difference. Because when the heading angle difference is 0, it means that the road has no curvature, and when the heading angle is not 0, it means that the road is turning, so the cumulative value of the absolute value of the heading angle difference represents the complexity of this road to a certain extent.
[0063] In order to improve the accuracy of determining the road complexity of the road section to be fitted, before determining the road complexity of the road section to be fitted according to the heading angle difference between adjacent trajectory points in the trajectory point sequence, the method further includes:
[0064] The heading angle differences between adjacent trajectory points in the trajectory point sequence are smoothed.
[0065] Figure 2 FIG. 1 is a flow chart of another trajectory fitting method provided by an embodiment of the present invention. Figure 2 , the embodiment of the present invention can also be described as:
[0066] Segment the long trajectory according to the set length to obtain the trajectory point sequence of the section to be fitted;
[0067] Determining the number of heading angle changes in the to-be-fitted section and the cumulative value of the heading angle changes according to the heading angle differences between adjacent trajectory points in the trajectory point sequence;
[0068] The road complexity of the road section to be fitted is calculated according to the following formula:
[0069]
[0070] Where m represents the road complexity, Indicates the number of positive and negative changes in the heading angle difference. Indicates the absolute value of the cumulative heading angle difference;
[0071] Determining the road complexity as the fitting complexity of the road section to be fitted, and performing trajectory fitting on the road section to be fitted according to the fitting complexity, including:
[0072] According to the following formula, the fitting complexity is substituted into the polynomial fitting model of the piecewise curve,
[0073]
[0074] Among them, x is the coordinate value of one dimension of the trajectory point, w is the fitting model coefficient, The coordinate value of another dimension of the corresponding trajectory point, m represents the road complexity;
[0075] Solve the polynomial fitting model to obtain a fitting trajectory of the road section to be fitted.
[0076] Figure 3 is a schematic diagram of the structure of a trajectory fitting device provided by an embodiment of the present invention. Figure 3 , an embodiment of the present invention provides a trajectory fitting device, the device comprising:
[0077] An acquisition module 310 is used to acquire a trajectory point sequence of a road section to be fitted;
[0078] A complexity determination module 320, configured to determine the road complexity of the road section to be fitted according to the heading angle difference between adjacent trajectory points in the trajectory point sequence;
[0079] The trajectory fitting module 330 is used to determine the fitting complexity of the road section to be fitted according to the road complexity, and perform trajectory fitting on the road section to be fitted according to the fitting complexity.
[0080] The embodiment of the present invention calculates the complexity of each road section and determines the fitting complexity of the trajectory according to the complexity of the road section, thereby realizing high-complexity fitting for complex road sections and low-complexity fitting for simple road sections. This implementation reduces the consumption of computing resources for road section fitting while ensuring the accuracy of road section fitting, thereby realizing perfect adaptation of the fitting algorithm to different complex road sections.
[0081] Furthermore, the complexity determination module includes:
[0082] A number determination unit, used to determine the number of heading angle changes in the to-be-fitted section and the cumulative value of the heading angle changes according to the heading angle differences between adjacent trajectory points in the trajectory point sequence;
[0083] The complexity determination unit is used to determine the road complexity of the road section to be fitted according to the number of times the heading angle changes in the road section to be fitted and the cumulative value of the heading angle changes.
[0084] Furthermore, the complexity determination unit is used to:
[0085] The road complexity of the road section to be fitted is calculated according to the following formula:
[0086]
[0087] Where m represents the road complexity, Indicates the number of positive and negative changes in the heading angle difference. Indicates the absolute cumulative value of the heading angle difference.
[0088] Furthermore, the trajectory fitting module includes:
[0089] The model is brought into the unit, which is used to substitute the fitting complexity into the polynomial fitting model of the piecewise curve according to the following formula:
[0090]
[0091] Among them, x is the coordinate value of one dimension of the trajectory point, w is the fitting model coefficient, The coordinate value of another dimension of the corresponding trajectory point, m represents the road complexity;
[0092] The trajectory solving unit is used to solve the polynomial fitting model to obtain the fitting trajectory of the road section to be fitted.
[0093] Furthermore, the device also includes:
[0094] The smoothing module is used to smooth the heading angle differences between adjacent trajectory points in the trajectory point sequence before determining the road complexity of the to-be-fitted road section according to the heading angle differences between adjacent trajectory points in the trajectory point sequence.
[0095] Figure 4 Schematic diagram of a device provided by an embodiment of the present invention. Figure 4 As shown, the device includes a processor 40, a memory 41, an input device 42 and an output device 43; the number of processors 40 in the device can be one or more. Figure 4 A processor 40 is taken as an example; the processor 40, memory 41, input device 42 and output device 43 in the device can be connected by a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0096] The memory 41, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to a camera automatic verification method in an embodiment of the present invention (for example, various modules included in a trajectory fitting device). The processor 40 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 41, that is, implements the above-mentioned trajectory fitting method.
[0097] The memory 41 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 41 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 41 may further include a memory remotely arranged relative to the processor 40, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0098] The input device 42 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 43 may include a display device such as a display screen.
[0099] An embodiment of the present invention further provides a storage medium comprising computer executable instructions, and the computer executable instructions are used to execute a trajectory fitting method when executed by a computer processor.
[0100] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0101] It is worth noting that in the embodiment of the above-mentioned trajectory fitting device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0102] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A trajectory fitting method, characterized in that: The method comprises: Obtain the trajectory point sequence of the road section to be fitted; Determining the road complexity of the road section to be fitted according to the heading angle difference between adjacent trajectory points in the trajectory point sequence; Determining the fitting complexity of the road section to be fitted according to the road complexity, and performing trajectory fitting on the road section to be fitted according to the fitting complexity; The determining the road complexity of the to-be-fitted road section according to the heading angle difference between adjacent trajectory points in the trajectory point sequence comprises: Determining the number of heading angle changes in the to-be-fitted section and the cumulative value of the heading angle changes according to the heading angle differences between adjacent trajectory points in the trajectory point sequence; Determining the road complexity of the road section to be fitted according to the number of times the heading angle changes in the road section to be fitted and the cumulative value of the heading angle changes; The performing trajectory fitting on the to-be-fitted road section according to the fitting complexity includes: According to the following formula, the fitting complexity is substituted into the polynomial fitting model of the piecewise curve. Among them, x is the coordinate value of one dimension of the trajectory point, w is the fitting model coefficient, The coordinate value of another dimension of the corresponding trajectory point, m represents the road complexity; Solve the polynomial fitting model to obtain a fitting trajectory of the road section to be fitted.
2. The method according to claim 1, characterized in that Determining the road complexity of the road section to be fitted according to the number of times the heading angle changes in the road section to be fitted and the cumulative value of the heading angle changes includes: The road complexity of the road section to be fitted is calculated according to the following formula: Where m represents the road complexity, Indicates the number of positive and negative changes in the heading angle difference. Indicates the absolute cumulative value of the heading angle difference.
3. The method according to claim 1, characterized in that Before determining the road complexity of the to-be-fitted road section according to the heading angle difference between adjacent trajectory points in the trajectory point sequence, the method further includes: The heading angle differences between adjacent trajectory points in the trajectory point sequence are smoothed.
4. A trajectory fitting device, characterized in that: The device comprises: An acquisition module is used to acquire a trajectory point sequence of a road section to be fitted; A complexity determination module, used to determine the road complexity of the to-be-fitted road section according to the heading angle difference between adjacent trajectory points in the trajectory point sequence; A trajectory fitting module, used to determine the fitting complexity of the road section to be fitted according to the road complexity, and perform trajectory fitting on the road section to be fitted according to the fitting complexity; The complexity determination module comprises: A number determination unit, used to determine the number of heading angle changes in the to-be-fitted section and the cumulative value of the heading angle changes according to the heading angle differences between adjacent trajectory points in the trajectory point sequence; A complexity determination unit, for determining the road complexity of the road section to be fitted according to the number of heading angle changes in the road section to be fitted and the cumulative value of the heading angle changes; The trajectory fitting module comprises: The model is brought into the unit, which is used to substitute the fitting complexity into the polynomial fitting model of the piecewise curve according to the following formula: Among them, x is the coordinate value of one dimension of the trajectory point, w is the fitting model coefficient, The coordinate value of another dimension of the corresponding trajectory point, m represents the road complexity; The trajectory solving unit is used to solve the polynomial fitting model to obtain the fitting trajectory of the road section to be fitted.
5. The device according to claim 4, characterized in that The complexity determination unit is used for: The road complexity of the road section to be fitted is calculated according to the following formula: Where m represents the road complexity, Indicates the number of positive and negative changes in the heading angle difference. Indicates the absolute cumulative value of the heading angle difference.
6. An electronic device, characterized in that: The device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the trajectory fitting method as described in any one of claims 1 to 3.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the trajectory fitting method as described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Vehicle real-time track prediction method and prediction system
CN106384540A
Trajectory generation method of multi-rotor unmanned aerial vehicle in landing process of mobile platform
CN112859927A