Vehicle track editing method and device and terminal equipment
By editing the vehicle's historical trajectory, we solve the problems of low efficiency and poor accuracy of the trajectory prediction model caused by positioning problems, improve the accuracy and rationality of the trajectory prediction model, ensure the natural behavior of autonomous vehicles, and improve driving efficiency. Security.
Patent Information
- Application Number
- CN202310427659.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2024-10-22
AI Technical Summary
In the existing technology, due to factors such as positioning jumps, positioning offsets, and IMU drift, the historical trajectory of the vehicle results in low training efficiency and poor accuracy of the trajectory prediction model, which cannot effectively reflect the natural behavior of the vehicle.
By judging the time continuity and spatial position deviation of the vehicle's historical trajectory, unreasonable trajectory points are eliminated, and trajectory correction, completion and extrapolation are performed to ensure that the trajectory information is consistent with actual driving conditions and improve the accuracy of the trajectory prediction model. and reasonableness.
The accuracy and rationality of the trajectory prediction model are improved, making it better reflect the natural behavior of the vehicle and enhancing the driving safety and smoothness of unmanned vehicles.
Smart Images

Figure CN118810818A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a vehicle trajectory editing method, device and terminal equipment. Background Art
[0002] During the operation of unmanned vehicles, factors such as the relative speed and relative distance of surrounding moving vehicles greatly affect the autonomous driving safety of unmanned vehicles. For static vehicles and other stationary obstacles in the environment, unmanned vehicles can make decisions by detouring or staying away from them; for moving vehicles, human drivers can use past experience and interactive behaviors such as gesture communication to identify their future behavior, but for unmanned vehicles, the most convenient way is to improve their driving safety and smoothness by observing the historical trajectory positions to predict the future driving trajectory of surrounding vehicles.
[0003] Therefore, the accuracy and rationality of trajectory prediction are particularly important for the safe driving of unmanned vehicles. Therefore, it is necessary to train the trajectory prediction model extensively through known historical vehicle trajectories. At present, the process of training the trajectory prediction model is to collect a large number of historical vehicle trajectories and directly apply them to the training of the trajectory prediction model. However, these vehicle historical trajectories are often established on a unified coordinate system. Affected by multiple factors such as positioning jumps, positioning offsets, and IMU drift, the historical trajectories of individual vehicles may have problems such as poor continuity and breakage between trajectories, which in turn leads to low efficiency and poor accuracy in trajectory prediction model training. The prediction results cannot well reflect the natural behavior of the vehicle. Summary of the invention
[0004] In view of the deficiencies in the above-mentioned prior art, the present invention provides a vehicle trajectory editing method, device and terminal device, which edit the historical trajectory of the vehicle to make it conform to the actual driving situation, ensure that the trained trajectory prediction model conforms to traffic regulations and natural driving rules, improve the accuracy and rationality of the trajectory prediction model for the vehicle trajectory, and better reflect the natural behavior of the vehicle.
[0005] To achieve the above object, the present invention provides a vehicle track editing method, comprising the following steps:
[0006] Get the original track information to be edited;
[0007] Performing temporal continuity judgment and spatial position deviation judgment on the original trajectory information;
[0008] If and only if the original trajectory information passes both the time continuity judgment and the spatial position offset judgment, the original trajectory information is trajectory edited; otherwise, the editing of the original trajectory information is terminated.
[0009] In one embodiment, the process of determining the temporal continuity is as follows:
[0010] Step 101: establish an error point set and a common trajectory point set, add the first trajectory point in the original trajectory information to the common trajectory point set, and set the number of trajectory points in the original trajectory information to I. max , iteration parameter i = 2;
[0011] Step 102, calculate the time difference of the trajectory points Δt=t i -t back , where t i is the timestamp of the ith trajectory point in the original trajectory information, t back The timestamp of the last track point in the common track point set;
[0012] Step 103, determine whether the time difference of the trajectory points Δt>0 is established:
[0013] If yes, add the i-th track point in the original track information as the last track point in the common track point set to the common track point set, set i=i+1, and then proceed to step 104;
[0014] Otherwise, add the i-th trajectory point in the original trajectory information to the error point set, set i=i+1, and then proceed to step 104;
[0015] Step 104, determine i>I max Is it established:
[0016] If yes, proceed to step 105;
[0017] Otherwise, return to step 102;
[0018] Step 105, determining whether the proportion of the number of trajectory points in the error point set to the original trajectory information is less than a first threshold:
[0019] If so, determining that the original trajectory information passes the time continuity judgment, and removing the trajectory points in the error point set from the original trajectory information, then performing the spatial position offset judgment on the original trajectory information;
[0020] Otherwise, it is determined that the original trajectory information fails to pass the time continuity judgment, and the editing of the original trajectory information is directly terminated.
[0021] In one embodiment, the process of determining the spatial position offset is as follows:
[0022] Step 201, removing obviously abnormal trajectory points in the original trajectory information;
[0023] Step 202, after removing obviously abnormal trajectory points in the original trajectory information, all trajectory points in the original trajectory information are converted into a Frenet coordinate system;
[0024] Step 203: Calculate the distance d from each track point in the original track information to the road centerline in the Frenet coordinate system. i , determine whether the original trajectory information satisfies |d i | <d max Whether the number of trajectory points of this condition is greater than the second threshold, where d max For the third threshold:
[0025] If so, determining that the original trajectory information passes the spatial position offset determination, and performing trajectory editing on the original trajectory information;
[0026] Otherwise, it is determined that the original trajectory information does not pass the spatial position offset determination, and the editing of the original trajectory information is terminated.
[0027] In one embodiment, removing obviously abnormal trajectory points in the original trajectory information includes:
[0028] Eliminate the trajectory points where the original trajectory information is not on the road;
[0029] For multiple trajectory points with the same coordinates in the original trajectory information, retain one of them;
[0030] For the average speed between any two adjacent trajectory points in the original trajectory information, two adjacent trajectory points whose average speed is greater than the maximum speed of the vehicle are eliminated.
[0031] In one embodiment, performing trajectory editing on the original trajectory information includes:
[0032] Step 301, obtaining original trajectory information after the time continuity judgment and the spatial position offset judgment, and defining it as trajectory information to be edited;
[0033] Step 302: determine whether the trajectory information to be edited has a trajectory point whose spatial position offset exceeds a third threshold:
[0034] If yes, correct the trajectory points in the trajectory information to be edited whose spatial position deviation exceeds the third threshold value to obtain the first trajectory information and proceed to step 303;
[0035] Otherwise, directly taking the track information to be edited as the first track information and proceeding to step 303;
[0036] Step 303: determine whether there is a missing track point between any two adjacent track points in the first track information:
[0037] If yes, fill in the missing track points in the first track information to obtain the second track information and proceed to step 304;
[0038] Otherwise, directly use the first trajectory information as the second trajectory information and proceed to step 304;
[0039] Step 304: determine whether the track duration of the second track information reaches a specified duration:
[0040] If so, outputting the second trajectory information as an edited result of the original trajectory information;
[0041] Otherwise, the second trajectory information is extrapolated until the trajectory duration of the second trajectory information reaches a specified duration, and the second trajectory information is output as the editing result of the original trajectory information.
[0042] In one embodiment, in step 302, the process of correcting the trajectory points in the trajectory information to be edited whose spatial position deviation exceeds the third threshold value includes:
[0043] Convert all track points in the track information to be edited into the Frenet coordinate system;
[0044] In the Frenet coordinate system, curve fitting is performed on the trajectory points whose spatial position deviation in the trajectory information to be edited does not exceed the third threshold value to obtain a trajectory fitting curve y=ax 3 +bx 2 +cx+d, where a, b, c, and d are fitting coefficients;
[0045] For each trajectory point in the trajectory information to be edited whose spatial position deviation exceeds the third threshold, the x value of its coordinate is substituted into the trajectory fitting curve, the y value of the corresponding trajectory point in the Frenet coordinate system is updated, and then the coordinates of the trajectory point in the Frenet coordinate system are converted into longitude and latitude coordinates, and the correction is completed.
[0046] In one embodiment, in step 303, the process of filling in the missing trajectory points in the first trajectory information is:
[0047] Two adjacent trajectory points that need to be filled in the first trajectory information are defined as trajectory point A and trajectory point B respectively;
[0048] Linear interpolation is performed with trajectory point A as the starting point and trajectory point B as the end point to obtain the first set of prediction values of the trajectory points to be filled between trajectory point A and trajectory point B;
[0049] Linear interpolation is performed with trajectory point B as the starting point and trajectory point A as the end point to obtain the predicted values of the second set of trajectory points to be filled between trajectory point A and trajectory point B;
[0050] Based on the principle that the smaller the time difference, the higher the weight value assigned, the weighted average of the predicted values of the first group of trajectory points to be completed and the predicted values of the second group of trajectory points to be completed between trajectory point A and trajectory point B is taken, and the result of the weighted average is used as the completion result of the trajectory points between trajectory point A and trajectory point B;
[0051] All two adjacent track points that need to be filled in the first track information are traversed, so as to complete the missing track points in the first track information.
[0052] In one embodiment, in step 304, the process of extrapolating the second trajectory information is:
[0053] Taking the last trajectory point in the second trajectory information as the starting point and the acceleration of the starting point as the acceleration of the extrapolated trajectory point, the extrapolated trajectory points of the second trajectory information are recursively added in sequence until the trajectory duration of the second trajectory information reaches the specified duration.
[0054] To achieve the above object, the present invention further provides a vehicle track editing device, which uses the above vehicle track editing method to edit the vehicle track, and the vehicle track editing device comprises:
[0055] Data acquisition module, used for the original trajectory information to be edited;
[0056] A time continuity judgment module, used for judging the time continuity of the original trajectory information;
[0057] A spatial position deviation judgment module, used for judging the spatial position deviation of the original trajectory information;
[0058] The vehicle track editing module is used to edit the original track information.
[0059] To achieve the above object, the present invention further provides a terminal device, which is a computer, an unmanned vehicle, an unmanned aerial vehicle, an unmanned driving device or a mobile robot, and is provided with:
[0060] Memory, used to store programs;
[0061] A processor is used to execute the program stored in the memory. When the program is executed, the processor is used to execute part or all of the steps of the above method.
[0062] Compared with the prior art, the present invention has the following beneficial technical effects:
[0063] 1. Before editing the vehicle historical trajectory, the present invention firstly judges the rationality of the time continuity and spatial position deviation of the vehicle historical trajectory. Only when the original trajectory information passes the time continuity judgment and the spatial position deviation judgment at the same time, the subsequent trajectory editing is performed on the original trajectory information, thereby effectively eliminating the low rationality vehicle historical trajectories with poor continuity, broken trajectories, etc.;
[0064] 2. The present invention edits the trajectory information of the vehicle historical trajectory that has passed the rationality judgment from multiple angles such as trajectory correction, completion and extrapolation during the trajectory editing process, so that the trajectory information used for trajectory prediction model training is more in line with the actual driving situation, ensuring that the trained trajectory prediction model complies with traffic regulations and natural driving rules, improving the accuracy and rationality of the trajectory prediction model for the vehicle trajectory, and being able to better reflect the natural behavior of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0066] Figure 1 Flow chart of a vehicle trajectory editing method according to an embodiment of the present invention;
[0067] Figure 2 This is a flow chart of time continuity judgment in an embodiment of the present invention;
[0068] Figure 3 This is a flow chart of determining the degree of spatial position deviation in an embodiment of the present invention;
[0069] Figure 4 A flowchart of trajectory editing in an embodiment of the present invention;
[0070] Figure 5 It is a structural block diagram of a vehicle trajectory editing device in an embodiment of the present invention;
[0071] Figure 6 4 is a structural block diagram of a terminal device in an embodiment of the present invention.
[0072] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0074] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0075] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0076] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0077] Example 1
[0078] This embodiment discloses a vehicle trajectory editing method, which mainly includes three parts: data acquisition, rationality judgment and trajectory editing.
[0079] The rationality judgment spans both time and space dimensions to achieve the integrity of the evaluation. That is, the attributes of the historical vehicle trajectory are evaluated to determine its rationality in time and space and whether it meets the vehicle driving requirements. Only the historical vehicle trajectory that meets the rationality judgment is subsequently edited, while the historical vehicle trajectory that does not meet the rationality judgment is directly eliminated.
[0080] Trajectory editing is to reasonably complete the trajectory points of missing positions and trajectories of insufficient time length, so that the edited historical vehicle trajectory is more in line with the actual driving conditions, ensuring that the trained trajectory prediction model complies with traffic regulations and natural driving rules, and improving the accuracy and rationality of the trajectory prediction model for vehicle trajectories, so that unmanned vehicles can avoid potential accidents and improve their driving safety.
[0081] refer to Figure 1The main implementation process of the vehicle trajectory editing method in this embodiment specifically includes the following steps:
[0082] Obtain and import the map information and the original track information to be edited;
[0083] The original trajectory information is sequentially subjected to time continuity judgment and spatial position offset judgment. If and only if the original trajectory information passes both time continuity judgment and spatial position offset judgment, the original trajectory information is subjected to trajectory editing. Otherwise, the editing of the original trajectory information is terminated, that is:
[0084] First, the temporal continuity of the original trajectory information is judged:
[0085] If the temporal continuity judgment fails, the editing of the original trajectory information is terminated directly, and the original trajectory information is removed from the training set of the trajectory prediction model;
[0086] If the temporal continuity is judged, the spatial position offset of the original trajectory information is judged:
[0087] If the spatial position offset is not judged, the editing of the original trajectory information is terminated directly, and the original trajectory information is removed from the training set of the trajectory prediction model;
[0088] If the spatial position deviation is judged to be passed, the original trajectory information is trajectory edited to complete the update of the original trajectory information, and the updated original trajectory information is replaced into the training set of the trajectory prediction model.
[0089] It is worth noting that in specific applications, the map information can be obtained and imported at the same time as the original track information to be edited, or it can be imported by default. That is, the acquisition and import of map information can be used as a step in the vehicle track editing method of this embodiment, or it can not be used as a step in the vehicle track editing method of this embodiment.
[0090] For an original trajectory information containing multiple trajectory points, reasonable trajectory points should be arranged in chronological order, that is, the time attributes of each trajectory point in an original trajectory information should show a monotonically increasing change. For two adjacent trajectory points in the original trajectory information, calculate the time difference Δt between them. When Δt>0, the time attributes of the two trajectory points are reasonable; when Δt<0, time-staggered trajectory points appear, and the time attributes of the two trajectory points are considered unreasonable; and when Δt=0, and the two trajectory points are not the same point, different trajectory points appear at the same time, and the time attributes of the two trajectory points are also considered unreasonable. However, considering the hardware error problem in the process of collecting the original trajectory information, if the entire original trajectory information is deleted because of one or a small number of error points, it is inevitable that resources will be wasted. Based on this, this embodiment provides a time continuity judgment method that can eliminate a small number of error points. In the process of visual continuity judgment, the original trajectory information can also be preliminarily updated. Refer to Figure 2 , the process is as follows:
[0091] Step 101: establish an error point set and a common trajectory point set, add the first trajectory point in the original trajectory information to the common trajectory point set, and set the number of trajectory points in the original trajectory information to I. max , iteration parameter i = 2;
[0092] Step 102, calculate the time difference of the trajectory points Δt=t i -t back , where t i is the timestamp of the ith trajectory point in the original trajectory information, t back The timestamp of the last track point in the common track point set;
[0093] Step 103, determine whether the time difference of the trajectory points Δt>0 is established:
[0094] If yes, add the i-th track point in the original track information as the last track point in the common track point set to the common track point set, set i=i+1, and then proceed to step 104;
[0095] Otherwise, add the i-th trajectory point in the original trajectory information to the error point set, set i=i+1, and then proceed to step 104;
[0096] Step 104, determine i>I max Is it established:
[0097] If yes, proceed to step 105;
[0098] Otherwise, return to step 102;
[0099] Step 105, determining whether the proportion of the number of trajectory points in the error point set to the original trajectory information is less than a first threshold:
[0100] If so, determining that the original trajectory information passes the time continuity judgment, and removing the trajectory points in the error point set from the original trajectory information, then performing the spatial position offset judgment on the original trajectory information;
[0101] Otherwise, it is determined that the original trajectory information fails to pass the time continuity judgment, and the editing of the original trajectory information is directly terminated.
[0102] For a reasonable original trajectory information, the trajectory points it contains should be close to the center line of the road. Therefore, the road center line and the trajectory can be introduced for similarity evaluation to extract the availability of the trajectory. Figure 3 , the process of judging the spatial position deviation in this embodiment is as follows:
[0103] Step 201, for the original trajectory information after time continuity judgment, the road where the original trajectory information is located is obtained by calculating the shortest distance between the road center line of the vector map information and the trajectory point, and the obviously abnormal trajectory points in the original trajectory information are removed, including:
[0104] Eliminate the trajectory points whose original trajectory information is not on the road;
[0105] For multiple trajectory points with the same coordinates in the original trajectory information, only one is retained and the other trajectory points are discarded;
[0106] For the average speed between any two adjacent track points in the original track information, remove the two adjacent track points whose average speed is greater than the maximum speed of the vehicle, where the average speed between the two adjacent track points is obtained by dividing the distance interval between the two track points by the time interval between the two track points;
[0107] Step 202, after removing obviously abnormal trajectory points in the original trajectory information, all trajectory points in the original trajectory information are converted to the Frenet coordinate system. In the Frenet coordinate system, the centerline of the road is the x-axis, the extension direction of the trajectory in the original trajectory information is the positive direction of the x-axis, the distance direction from the trajectory to the centerline of the road is the y-axis, the right side or the left side of the road is the positive direction of the y-axis, and the point on the centerline of the road closest to the starting point of the trajectory is the origin of the Frenet coordinate system;
[0108] Step 203: Calculate the distance d from each track point in the original track information to the road centerline in the Frenet coordinate system. i , determine whether the original trajectory information satisfies |d i | <d max Whether the number of trajectory points is greater than the second threshold, where dmax For the third threshold:
[0109] If so, that is, the proportion of trajectory points that meet the distance constraint requirement is greater than the set threshold, and the trajectory is similar to the road, then the original trajectory information is determined by the spatial position offset, and subsequent trajectory editing is performed on the original trajectory information;
[0110] Otherwise, that is, the proportion of trajectory points that meet the distance constraint requirement is less than or equal to the set threshold, and the trajectory is different from the road, then it is determined that the original trajectory information does not pass the spatial position offset judgment, and the editing of the original trajectory information ends.
[0111] In this embodiment, the trajectory editing of the original trajectory information determined by time continuity and spatial position offset mainly includes the correction, filling and extrapolation of silica gel points, which correspond to the following steps 302, 303 and 304 respectively. Figure 4 In this embodiment, the specific implementation process of editing the original trajectory information is as follows: Step 301 to Step 304:
[0112] Step 301 : obtaining original trajectory information after time continuity judgment and spatial position offset judgment, and defining it as trajectory information to be edited.
[0113] The original trajectory information after the time continuity judgment and the spatial position deviation judgment refers to the original trajectory information after the abnormal trajectory points are eliminated in step 104 or step 105 and step 202.
[0114] Step 302: determine whether the trajectory information to be edited has a trajectory point whose spatial position offset exceeds a third threshold:
[0115] If yes, correct the track points whose spatial position deviation in the track information to be edited exceeds the third threshold, obtain the first track information and proceed to step 303;
[0116] Otherwise, the track information to be edited is directly used as the first track information and then step 303 is performed.
[0117] A reasonable trajectory information includes all trajectory points that meet certain distance constraints from the road centerline. In this embodiment, the distance d from the road centerline in the original trajectory information is i Satisfy |d i | <d max The trajectory points that meet this condition are defined as reasonable points, and the remaining trajectory points are defined as unreasonable points. Reasonable points are points that meet the distance constraint, and unreasonable points are points that do not meet the distance constraint. Therefore, it is necessary to correct all unreasonable points in the trajectory information to be edited. The specific implementation process is as follows:
[0118] First, all trajectory points in the trajectory information to be edited are converted to the Frenet coordinate system;
[0119] In the Frenet coordinate system, the least square method is used to perform curve fitting on the trajectory points whose spatial position offset in the edited trajectory information does not exceed the third threshold, and the trajectory fitting curve y=ax 3 +bx 2 +cx+d, where a, b, c, and d are fitting coefficients;
[0120] The correction of the trajectory points requires that all the trajectory points after correction are not far above or below the trajectory fitting curve, reflecting the overall distribution of the trajectory points without large local fluctuations. Therefore, for each trajectory point whose spatial position offset exceeds the third threshold in the trajectory information to be edited, the x value of its coordinate is substituted into the polynomial y=ax of the trajectory fitting curve. 3 +bx 2 +cx+d, update the y value of the corresponding trajectory point in the Frenet coordinate system, and then convert the coordinates of all trajectory points in the Frenet coordinate system into longitude and latitude coordinates, that is, complete the correction of unreasonable points in the trajectory information to be edited, and obtain the first trajectory information.
[0121] Step 303, determining whether there is a missing track point between any two adjacent track points in the first track information:
[0122] If yes, fill in the missing track points in the first track information to obtain the second track information and proceed to step 304;
[0123] Otherwise, the first track information is directly used as the second track information and step 304 is performed.
[0124] In step 303, it is first necessary to identify whether there is a missing track point between two adjacent track points in the first track information. The specific implementation process is as follows:
[0125] The time threshold t_Threshold is set to set the distance of the vehicle's minimum speed movement t_Threshold time as the distance threshold L_Threshold. The speed of the vehicle will change during driving. If the time difference Δt ≥ t_Threshold and the distance L ≥ L_Threshold between two adjacent trajectory points in the first trajectory information, it can be determined that there is a missing trajectory point between the two adjacent trajectory points.
[0126] In this embodiment, the specific implementation process of filling the missing trajectory points in the first trajectory information is:
[0127] A group of two adjacent trajectory points in the first trajectory information that need to be filled in are defined as trajectory point A and trajectory point B, respectively, wherein the timestamp of trajectory point A is greater than the timestamp of trajectory point B;
[0128] Linear interpolation is performed with trajectory point A as the starting point and trajectory point B as the end point to obtain the first set of prediction values of the trajectory points to be filled between trajectory point A and trajectory point B; linear interpolation is performed with trajectory point B as the starting point and trajectory point A as the end point to obtain the second set of prediction values of the trajectory points to be filled between trajectory point A and trajectory point B; the specific process is as follows:
[0129] According to the acceleration and time of trajectory points A and B, the number of trajectory points to be filled is flexibly set to n to prevent the time interval of the trajectory points to be repaired from being too large or too small. The time interval between two adjacent trajectory points after filling is ΔT1=t B -t A ) / (+1), where t B is the timestamp of track point B in the first track information, t A is the timestamp of track point A in the first track information;
[0130] The linear interpolation method is used to calculate the acceleration of n trajectory points to be completed. It is assumed that the adjacent trajectory points follow uniformly accelerated motion. The starting and ending points A and B of the missing trajectory are respectively regarded as the starting points. The trajectory point attribute information of the starting and ending points A and B are used as the initial value for iteration. The iteration result is used as the initial value for the next iteration until the iteration is completed. The speed v of all trajectory points to be completed and the distance L between each two trajectory points are obtained. The predicted distance data between two groups of trajectory repair points with A and B as the starting points can be obtained, that is, the predicted values of the first group of trajectory points to be completed containing n first completed trajectory points and the predicted values of the second group of trajectory points to be completed containing n second completed trajectory points.
[0131] After obtaining the prediction values of the first group of trajectory points to be completed and the prediction values of the second group of trajectory points to be completed, the first group of trajectory points to be completed and the prediction values of the second group of trajectory points to be completed between trajectory point A and trajectory point B are weighted averaged based on the principle that the smaller the time difference, the higher the weight value assigned, and the result of the weighted average is used as the completion result of the trajectory points between trajectory point A and trajectory point B. In the specific implementation process:
[0132] The first complementing trajectory point corresponding to the predicted value of the first set of to-be-complemented trajectory points and the second complementing trajectory point corresponding to the predicted value of the second set of to-be-complemented trajectory points are in one-to-one correspondence. The weight of the i-th actual complementing trajectory point along the direction from trajectory point A to trajectory point B is calculated as:
[0133]
[0134] Then, based on the calculated weight, the x-axis coordinate value of the i-th actual completed trajectory point along the direction from trajectory point A to trajectory point B is obtained as:
[0135] x i =Q A × Ai +Q B × Bi
[0136] Among them, x i is the x-axis value of the ith actual completed trajectory point in the Frenet coordinate system along the direction from trajectory point A to trajectory point B, Ai is the x-axis value of the ith first-filled trajectory point in the Frenet coordinate system along the direction from trajectory point A to trajectory point B, Bi is the x-axis value of the i-th second-filled trajectory point in the Frenet coordinate system along the direction from trajectory point A to trajectory point B;
[0137] After calculating the x-axis value xi of the ith actual completed trajectory point in the Frenet coordinate system, substitute xi into the polynomial y=ax of the trajectory fitting curve in step 302. 3 +bx 2 +cx+d, we can get the y-axis value y of the i-th actual completed trajectory point in the Frenet coordinate system i back;
[0138] Traverse all the actual completed track points between track point A and track point B to obtain the track point coordinates of all the actual completed track points between track point A and track point B in the Frenet coordinate system, and then transform the obtained track point coordinates into longitude and latitude coordinates, thus completing the track point completion of track point A and track point B.
[0139] All two adjacent track points that need to be filled in the first track information are traversed, so as to complete the missing track points in the first track information.
[0140] Step 304, determining whether the track duration of the second track information reaches a specified duration:
[0141] If yes, the second trajectory information is output as the editing result of the original trajectory information, that is, the trajectory editing is completed;
[0142] Otherwise, the second trajectory information is extrapolated until the trajectory duration of the second trajectory information reaches the specified duration, and the second trajectory information is output as the editing result of the original trajectory information.
[0143] In this embodiment, the specific implementation process of extrapolating the second trajectory information until the trajectory duration of the second trajectory information reaches the specified duration is:
[0144] Set the specified time to T_Default, take the last track point C in the second track information as the starting point, set the number of track points to be extrapolated to m, take the acceleration of the last track point C in the current second track information as the acceleration of the extrapolated track point, prevent the time interval of the track points to be extrapolated from being too large or too small, and set the time interval between the track points to be extrapolated to ΔT2 = (T_Default - t C ) / (m+1), where t C is the timestamp of the track point C in the second track information;
[0145] Assuming that the extrapolated trajectory points follow uniformly accelerated motion, the velocity and acceleration of trajectory point C are used as initial values, the velocities of m trajectory points to be extrapolated and the distances between each two trajectory points are recursively deduced, and then combined with the coordinate position of trajectory point C, the polynomial y=ax is introduced into the trajectory fitting curve of step 302 3 +bx 2 +cx+d, we can get m extrapolated trajectory point coordinates. Then we transform the extrapolated trajectory point coordinates into longitude and latitude coordinates, and the short trajectory extrapolation is completed. After the trajectory extrapolation is completed, the edited trajectory is published, and the trajectory editing is completed.
[0146] Example 2
[0147] Based on the vehicle track editing method in Example 1, this embodiment discloses a vehicle track editing device. Figure 5 The vehicle track editing device includes a data acquisition module, a time continuity judgment module, a spatial position offset judgment module and a vehicle track editing module. The vehicle track editing device is used to execute some or all steps of the vehicle track editing method in Example 1 to realize the editing of the vehicle track. Specifically:
[0148] The data acquisition module is used for the original trajectory information to be edited;
[0149] The time continuity judgment module is used to judge the time continuity of the original trajectory information;
[0150] The spatial position deviation judgment module is used to judge the spatial position deviation of the original trajectory information;
[0151] The vehicle trajectory editing module is used to edit the original trajectory information.
[0152] In this embodiment, the specific working process and working principle of the data acquisition module, the time continuity judgment module, the spatial position offset judgment module and the vehicle trajectory editing module are the same as those in Example 1, so they will not be repeated in this embodiment.
[0153] Example 3
[0154] like Figure 6 The terminal device disclosed in this embodiment is shown, including a transmitter, a receiver, a memory and a processor. Among them, the transmitter is used to send instructions and data, the receiver is used to receive instructions and data, the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions stored in the memory to implement some or all of the steps executed by the vehicle trajectory editing method in the above embodiment 1. Its specific implementation process is the same as the vehicle trajectory editing method in the above embodiment 1.
[0155] It should be noted that the above memory can be independent or integrated with the processor. When the memory is independently provided, the terminal device further includes a bus for connecting the memory and the processor.
[0156] In the specific application process, the terminal device is a computer, an unmanned vehicle, a drone, an unmanned driving device or a mobile robot, etc.
[0157] Example 4
[0158] This embodiment discloses a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, some or all of the steps executed by the vehicle trajectory editing method in the above-mentioned embodiment 1 are implemented.
[0159] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A vehicle trajectory editing method, characterized in that: The steps include: Get the original track information to be edited; Performing temporal continuity judgment and spatial position deviation judgment on the original trajectory information; If and only if the original trajectory information passes both the time continuity judgment and the spatial position offset judgment, the original trajectory information is trajectory edited; otherwise, the editing of the original trajectory information is terminated.
2. The vehicle trajectory editing method according to claim 1, characterized in that: The process of temporal continuity judgment is as follows: Step 101: establish an error point set and a common trajectory point set, add the first trajectory point in the original trajectory information to the common trajectory point set, and set the number of trajectory points in the original trajectory information to I. max , iteration parameter i = 2; Step 102, calculate the time difference of the trajectory points Δt=t i -t back , where t i is the timestamp of the ith trajectory point in the original trajectory information, t back The timestamp of the last track point in the common track point set; Step 103, determine whether the time difference of the trajectory points Δt>0 is established: If yes, add the i-th track point in the original track information as the last track point in the common track point set to the common track point set, set i=i+1, and then proceed to step 104; Otherwise, add the i-th trajectory point in the original trajectory information to the error point set, set i=i+1, and then proceed to step 104; Step 104: determine if i>I max Is it established: If yes, proceed to step 105; Otherwise, return to step 102; Step 105, determining whether the proportion of the number of trajectory points in the error point set to the original trajectory information is less than a first threshold: If so, determining that the original trajectory information passes the time continuity judgment, and removing the trajectory points in the error point set from the original trajectory information, then performing the spatial position offset judgment on the original trajectory information; Otherwise, it is determined that the original trajectory information fails to pass the time continuity judgment, and the editing of the original trajectory information is directly terminated.
3. The vehicle trajectory editing method according to claim 2, characterized in that: The process of determining the spatial position offset is as follows: Step 201, removing obviously abnormal trajectory points in the original trajectory information; Step 202, after removing obviously abnormal trajectory points in the original trajectory information, all trajectory points in the original trajectory information are converted into a Frenet coordinate system; Step 203: Calculate the distance d from each track point in the original track information to the road centerline in the Frenet coordinate system. i , determine whether the original trajectory information satisfies |di | <d max Whether the number of trajectory points of this condition is greater than the second threshold, where d max For the third threshold: If so, determining that the original trajectory information passes the spatial position offset determination, and performing trajectory editing on the original trajectory information; Otherwise, it is determined that the original trajectory information does not pass the spatial position offset determination, and the editing of the original trajectory information is terminated.
4. The vehicle trajectory editing method according to claim 3, characterized in that: The step of removing obviously abnormal trajectory points in the original trajectory information comprises: Eliminate the trajectory points where the original trajectory information is not on the road; For multiple trajectory points with the same coordinates in the original trajectory information, retain one of them; For the average speed between any two adjacent trajectory points in the original trajectory information, two adjacent trajectory points whose average speed is greater than the maximum speed of the vehicle are eliminated.
5. The vehicle trajectory editing method according to any one of claims 1 to 4, characterized in that: Performing trajectory editing on the original trajectory information includes: Step 301, obtaining original trajectory information after the time continuity judgment and the spatial position offset judgment, and defining it as trajectory information to be edited; Step 302: determine whether the trajectory information to be edited has a trajectory point whose spatial position offset exceeds a third threshold: If yes, correct the trajectory points in the trajectory information to be edited whose spatial position deviation exceeds the third threshold value to obtain the first trajectory information and proceed to step 303; Otherwise, directly taking the track information to be edited as the first track information and proceeding to step 303; Step 303: determine whether there is a missing track point between any two adjacent track points in the first track information: If yes, fill in the missing track points in the first track information to obtain the second track information and proceed to step 304; Otherwise, directly use the first trajectory information as the second trajectory information and proceed to step 304; Step 304: determine whether the track duration of the second track information reaches a specified duration: If so, outputting the second trajectory information as an edited result of the original trajectory information; Otherwise, the second trajectory information is extrapolated until the trajectory duration of the second trajectory information reaches a specified duration, and the second trajectory information is output as the editing result of the original trajectory information.
6. The vehicle trajectory editing method according to claim 5, characterized in that: In step 302, the process of correcting the trajectory points in the trajectory information to be edited whose spatial position deviation exceeds the third threshold value includes: Convert all track points in the track information to be edited into the Frenet coordinate system; In the Frenet coordinate system, curve fitting is performed on the trajectory points whose spatial position deviation in the trajectory information to be edited does not exceed the third threshold, and a trajectory fitting curve y=ax is obtained. 3 +bx 2 +cx+d, where a, b, c, and d are fitting coefficients; For each trajectory point in the trajectory information to be edited whose spatial position deviation exceeds the third threshold, the x value of its coordinate is substituted into the trajectory fitting curve, the y value of the corresponding trajectory point in the Frenet coordinate system is updated, and then the coordinates of the trajectory point in the Frenet coordinate system are converted into longitude and latitude coordinates, and the correction is completed.
7. The vehicle trajectory editing method according to claim 5, characterized in that: In step 303, the process of filling in the missing trajectory points in the first trajectory information is as follows: Two adjacent trajectory points that need to be filled in the first trajectory information are defined as trajectory point A and trajectory point B respectively; Linear interpolation is performed with trajectory point A as the starting point and trajectory point B as the end point to obtain the first set of prediction values of the trajectory points to be filled between trajectory point A and trajectory point B; Linear interpolation is performed with trajectory point B as the starting point and trajectory point A as the end point to obtain the predicted values of the second set of trajectory points to be filled between trajectory point A and trajectory point B; Based on the principle that the smaller the time difference, the higher the weight value assigned, the weighted average of the predicted values of the first group of trajectory points to be completed and the predicted values of the second group of trajectory points to be completed between trajectory point A and trajectory point B is taken, and the result of the weighted average is used as the completion result of the trajectory points between trajectory point A and trajectory point B; All two adjacent track points that need to be filled in the first track information are traversed, so as to complete the missing track points in the first track information.
8. The vehicle trajectory editing method according to claim 5, characterized in that: In step 304, the process of extrapolating the second trajectory information is as follows: Taking the last trajectory point in the second trajectory information as the starting point and the acceleration of the starting point as the acceleration of the extrapolated trajectory point, the extrapolated trajectory points of the second trajectory information are recursively added in sequence until the trajectory duration of the second trajectory information reaches the specified duration.
9. A vehicle trajectory editing device, characterized in that: The vehicle trajectory editing method according to any one of claims 1 to 8 is used to edit the vehicle trajectory, and the vehicle trajectory editing device comprises: Data acquisition module, used for the original trajectory information to be edited; A time continuity judgment module, used for judging the time continuity of the original trajectory information; A spatial position deviation judgment module, used for judging the spatial position deviation of the original trajectory information; The vehicle track editing module is used to edit the original track information.
10. A terminal device, characterized in that: The terminal device is a computer, an unmanned vehicle, an unmanned aerial vehicle, an unmanned driving device or a mobile robot, and is provided with: Memory, used to store programs; A processor, configured to execute the program stored in the memory; when the program is executed, the processor is configured to execute part or all of the steps of the method according to any one of claims 1 to 8.
Citation Information
Cited By
Quality evaluation method for spatio-temporal trajectory big data
CN119862401A
A Quality Assessment Method for Spatiotemporal Trajectory Big Data
CN119862401B
