Target trajectory optimization method, device, electronic device and storage medium

By constructing and adjusting the noise curve function to optimize the trajectory in SLAM, the problem of trajectory edge interleaving is solved and the accuracy of mapping is improved.

CN118408537BActive Publication Date: 2024-09-20NEOLITHIC ZHIHUA (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410883698.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-03
Publication Date
2024-09-20
Estimated Expiration
2044-07-03

AI Technical Summary

Technical Problem

In real-time positioning and mapping (SLAM), the problem of trajectory edge interlacing occurs after trajectory optimization, resulting in reduced mapping accuracy.

Method used

By obtaining the a priori target trajectory, construct the first growth curve function that simulates noise, and generate the second growth curve function. The adjusted noise value is close to 0 at both ends, and the middle section is close to the noise value in the middle section of the first growth curve. After adjustment, The trajectory construction factor graph is optimized to avoid the interlacing phenomenon caused by the imbalance of trajectory edges.

Benefits of technology

It improves the accuracy of trajectory optimization, improves the precision of mapping, avoids the intersection of trajectory edges, and ensures the consistency of mapping.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118408537B
    Figure CN118408537B
Patent Text Reader

Abstract

The present application relates to the field of map technology, and provides a method, device, electronic device and storage medium for optimizing a target trajectory. The method obtains a priori target trajectory, constructs a first growth curve function that simulates the noise of the priori target trajectory, generates a second growth curve function based on the first growth curve function, and the noise values ​​at both ends of the second growth curve function are close to 0 while the noise value in the middle section is close to the noise value in the middle section of the first growth curve, and then uses the second growth curve to adjust the noise of the priori target trajectory, and finally uses the adjusted priori target trajectory to construct a factor graph to optimize the target trajectory, considers the noise caused by various constraints in the middle section and regresses to the minimum noise near the endpoint, which can avoid the interlacing phenomenon caused by the imbalance of the trajectory edge, improves the trajectory optimization accuracy, and improves the mapping accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of map technology, and in particular to a target trajectory optimization method, device, electronic device and storage medium. Background Art

[0002] In the trajectory optimization step of Simultaneous Localization and Mapping (SLAM) mapping, after adding inter-frame constraints, the real-time kinematic (rtk) trajectory to be optimized will have a problem of too much change in the original pose after smoothing, and will not converge to the original rtk at the end of the road section. As a result, there is a large gap between the optimized result and the adjacent part of the trajectory that does not need to be processed, which greatly affects the mapping accuracy. Summary of the invention

[0003] In view of this, embodiments of the present application provide a target trajectory optimization method, device, electronic device and storage medium to solve the problem of interlaced trajectory edges during trajectory optimization in the prior art.

[0004] A first aspect of an embodiment of the present application provides a target trajectory optimization method, comprising:

[0005] Obtain prior target trajectory;

[0006] Constructing a first growth curve function of the prior target trajectory, where the first growth curve function is used to simulate the noise of the prior target trajectory;

[0007] A second growth curve function is generated based on the first growth curve function, wherein the difference between the value of the second growth curve function in the first interval and 0 is less than the first preset threshold, and the difference between the value of the second interval and the value of the first growth curve function is less than the second preset threshold, the first interval is an interval whose distance from the endpoint of the second growth curve is less than the third preset threshold, and the second interval is an interval whose distance from the endpoint of the second growth curve is greater than the fourth preset threshold;

[0008] Using a second growth curve function to adjust the noise of the prior target trajectory to obtain an adjusted prior target trajectory;

[0009] The adjusted prior target trajectory is used to construct a factor graph, and the factor graph is optimized to obtain the optimized target trajectory.

[0010] A second aspect of an embodiment of the present application provides a target trajectory optimization device, comprising:

[0011] An acquisition module, configured to acquire a priori target trajectory;

[0012] A construction module is configured to construct a first growth curve function of the prior target trajectory, where the first growth curve function is used to simulate the noise of the prior target trajectory;

[0013] A generating module is configured to generate a second growth curve function based on the first growth curve function, wherein the difference between a value of the second growth curve function in a first interval and 0 is less than a first preset threshold, and the difference between a value of the second interval and a value of the first growth curve function is less than a second preset threshold, the first interval is an interval whose distance from an endpoint of the second growth curve is less than a third preset threshold, and the second interval is an interval whose distance from an endpoint of the second growth curve is greater than a fourth preset threshold;

[0014] an adjustment module, configured to adjust the noise of the priori target trajectory using a second growth curve function to obtain an adjusted priori target trajectory;

[0015] The optimization module is configured to construct a factor graph using the adjusted prior target trajectory, and perform optimization calculation on the factor graph to obtain an optimized target trajectory.

[0016] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0017] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0018] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain a priori target trajectory, construct a first growth curve function that simulates the noise of the priori target trajectory, generate a second growth curve function based on the first growth curve function, the noise values ​​at both ends of the second growth curve function are close to 0 and the noise value in the middle section is close to the noise value in the middle section of the first growth curve, then use the second growth curve to adjust the noise of the priori target trajectory, and finally use the adjusted priori target trajectory to construct a factor Figure 1 The target trajectory is optimized, the noise caused by various constraints is considered in the middle section, and the minimum noise is regressed near the endpoints. This can avoid the interlacing phenomenon caused by unbalanced trajectory edges, improve the accuracy of trajectory optimization, and improve the accuracy of mapping. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0020] Figure 1 It is a scenario diagram of an application scenario of an embodiment of the present application.

[0021] Figure 2 This is the effect diagram of trajectory optimization using traditional backend noise function.

[0022] Figure 3 It is a flow chart of a target trajectory optimization method provided in an embodiment of the present application.

[0023] Figure 4 It is a schematic diagram of the first growth curve function provided in the embodiment of the present application.

[0024] Figure 5 It is a flowchart of a method for generating a second growth curve function based on a first growth curve function provided in an embodiment of the present application.

[0025] Figure 6 It is a schematic diagram of the scaled first growth curve function provided in an embodiment of the present application.

[0026] Figure 7 It is a flowchart diagram of a method for adjusting the position of a scaled first growth curve function in a definition domain provided in an embodiment of the present application.

[0027] Figure 8 It is a schematic diagram of the first growth curve function after translation provided in an embodiment of the present application.

[0028] Fig. 9 It is a flowchart of another method for generating a second growth curve function based on a first growth curve function provided in an embodiment of the present application.

[0029] FIG10(A) is a schematic diagram of a second growth curve function generated for the first time provided in an embodiment of the present application.

[0030] FIG10(B) is a schematic diagram of an updated second growth curve function provided in an embodiment of the present application.

[0031] Fig.11 It is a flowchart of another target trajectory optimization method provided in an embodiment of the present application.

[0032] Fig.12 It is a schematic diagram of a target trajectory optimization device provided in an embodiment of the present application.

[0033] Fig.13 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] 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 application. However, it should be clear to those skilled in the art that the present application may also 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 application.

[0035] A target trajectory optimization method and device according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0036] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include terminal devices 1, 2 and 3, a server 4 and a network 5.

[0037] Terminal devices 1, 2 and 3 can be hardware or software. When terminal devices 1, 2 and 3 are hardware, they can be various electronic devices with display screens and supporting communication with server 4, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers, etc.; when terminal devices 1, 2 and 3 are software, they can be installed in the electronic devices described above. Terminal devices 1, 2 and 3 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present application are not limited to this. Furthermore, various applications can be installed on terminal devices 1, 2 and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc. Sensor devices for data collection can be configured in terminal devices 1, 2 and 3, and the collected data can be converted into point cloud collection trajectories.

[0038] The server 4 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 4 may be a single server, a server cluster composed of several servers, or a cloud computing service center, which is not limited in the present application.

[0039] It should be noted that the server 4 can be hardware or software. When the server 4 is hardware, it can be various electronic devices that provide various services for the terminal devices 1, 2, and 3. When the server 4 is software, it can be multiple software or software modules that provide various services for the terminal devices 1, 2, and 3, or it can be a single software or software module that provides various services for the terminal devices 1, 2, and 3, and the embodiments of the present application are not limited to this.

[0040] The network 5 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present application.

[0041] The server can receive the point cloud data collected by the terminal device, process it to reconstruct the point cloud map, and use the newly collected point cloud data to optimize and update the already constructed point cloud map.

[0042] It should be noted that the specific types, quantities and combinations of the terminal devices 1, 2 and 3, the server 4 and the network 5 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.

[0043] As mentioned above, in the trajectory optimization step of SLAM mapping, after adding the inter-frame constraints, the rtk trajectory to be optimized will have a problem of too much change in the original pose after smoothing, and will not converge to the original rtk at the end of the road section. In this way, there is a large gap between the optimized result and the adjacent part of the trajectory that does not need to be processed, which greatly affects the mapping accuracy.

[0044] Figure 2 This is the effect of trajectory optimization using the traditional backend noise function. Figure 2 As shown in the figure, trajectory 1 is the rtk trajectory to be processed, and trajectory 2 is the optimized trajectory. The arrow indicates that the unsmooth rtk has become smooth due to the effect of the inter-frame constraint. In the experiment, the absolute accuracy of the end of the trajectory may be several meters different from the original trajectory. In this way, there is a large gap between the optimized result and the adjacent part of the trajectory that does not need to be processed, which is unacceptable.

[0045] The reason for this problem is that the prior rtk introduces noise with its own data. This noise is obtained from the standard deviation of the trajectory data itself. The data near the stratified road section is often where the standard deviation is relatively large, and the noise is relatively large. As a result, the influence of the prior constraints is reduced when factor graph optimization is added, but in real time, these noisy parts are not all smooth, especially where they connect with other segments. Therefore, it is necessary to provide an improved target trajectory optimization method to achieve that the trajectory edge needs to be maintained in its original state even in the case of large noise, so as to ensure the overall consistency after mapping.

[0046] In view of this, an embodiment of the present application provides a target trajectory optimization method, by obtaining a priori target trajectory, constructing a first growth curve function that simulates the noise of the priori target trajectory, generating a second growth curve function based on the first growth curve function, the noise values ​​at both ends of the second growth curve function are close to 0 and the noise value in the middle section is close to the noise value in the middle section of the first growth curve, and then using the second growth curve to adjust the noise of the priori target trajectory, and finally using the adjusted priori target trajectory to construct a factor Figure 1 The target trajectory is optimized, the noise caused by various constraints is considered in the middle section, and the minimum noise is regressed near the endpoints. This can avoid the interlacing phenomenon caused by unbalanced trajectory edges, improve the accuracy of trajectory optimization, and improve the accuracy of mapping.

[0047] Figure 3 is a flow chart of a target trajectory optimization method provided in an embodiment of the present application. Figure 3 As shown, the method comprises the following steps:

[0048] In step S301, a priori target trajectory is obtained.

[0049] In step S302, a first growth curve function of the priori target trajectory is constructed.

[0050] The first growth curve function is used to simulate the noise of the prior target trajectory.

[0051] In step S303, a second growth curve function is generated based on the first growth curve function.

[0052] Among them, the difference between the value of the second growth curve function in the first interval and 0 is less than the first preset threshold, the difference between the value of the second interval and the value of the first growth curve function is less than the second preset threshold, the first interval is an interval whose distance from the endpoint of the second growth curve is less than the third preset threshold, and the second interval is an interval whose distance from the endpoint of the second growth curve is greater than the fourth preset threshold.

[0053] In step S304, the noise of the priori target trajectory is adjusted using the second growth curve function to obtain an adjusted priori target trajectory.

[0054] In step S305, a factor graph is constructed using the adjusted prior target trajectory, and the factor graph is optimized to obtain an optimized target trajectory.

[0055] In the embodiment of the present application, the method is executed by a server, or by a terminal with certain computing capabilities.

[0056] In the embodiment of the present application, a priori target trajectory may be first obtained, wherein the priori target trajectory is a trajectory to be optimized such as smoothing, for example, an RTK trajectory to be optimized. Noise influence may be applied to the priori target trajectory for optimization, and the noise influence may include, for example, inter-frame constraints, loop constraints, etc.

[0057] In an embodiment of the present application, a first growth curve function of a priori target trajectory can be constructed, and the first growth curve function is used to simulate the noise of the prior target trajectory. Next, the first growth curve function can be used to generate a second growth curve function. Among them, the difference between the value of the second growth curve function in the first interval and 0 is less than the first preset threshold, the difference between the value in the second interval and the value of the first growth curve function is less than the second preset threshold, the first interval is an interval where the distance from the endpoint of the second growth curve is less than the third preset threshold, and the second interval is an interval where the distance from the endpoint of the second growth curve is greater than the fourth preset threshold. Among them, the values ​​of the first preset threshold, the second preset threshold, the third preset threshold and the fourth preset threshold can be determined according to actual needs and are not limited here.

[0058] That is to say, the second growth curve function fully accepts the adjustment of the data by other constraints within the curve segment, and smoothly regresses the result to the vicinity of the prior at the edge of the curve segment.

[0059] In the embodiment of the present application, the second growth curve function can be used to adjust the noise of the prior target trajectory to obtain the adjusted prior target trajectory. Finally, the adjusted prior target trajectory is used to construct a factor graph, and the factor graph is optimized to obtain the optimized target trajectory.

[0060] According to the technical solution provided in the embodiment of the present application, by obtaining the prior target trajectory, a first growth curve function simulating the noise of the prior target trajectory is constructed, and a second growth curve function is generated based on the first growth curve function, wherein the noise values ​​at both ends of the second growth curve function are close to 0 and the noise value in the middle section is close to the noise value in the middle section of the first growth curve, and then the noise of the prior target trajectory is adjusted using the second growth curve, and finally the adjusted prior target trajectory is used to construct the factor Figure 1The target trajectory is optimized, the noise caused by various constraints is considered in the middle section, and the minimum noise is regressed near the endpoints. This can avoid the interlacing phenomenon caused by unbalanced trajectory edges, improve the accuracy of trajectory optimization, and improve the accuracy of mapping.

[0061] In the embodiment of the present application, the first growth curve function may be: , where f(x) is the first growth curve function, k is the hyperparameter of the first growth curve function, the hyperparameter is proportional to the slope of the first growth curve, and x is the position value of the prior target trajectory.

[0062] Further, by analyzing the derivative of the first growth curve function, it can be found that k is proportional to the slope of the curve at x=0, that is, , if k1>k2, then at x=0, Therefore, the smoothness of the entire curve can be adjusted by adjusting the value of k, and the domain of the first growth curve function is naturally suitable for use as a weight function between 0 and 1.

[0063] Figure 4 is a schematic diagram of the first growth curve function provided in the embodiment of the present application. Figure 4 As shown, the horizontal axis is the input trajectory, and the vertical axis is the noise weight. According to the different values ​​of the hyperparameter k, the first growth curve functions with different slopes can be obtained. In the figure, the hyperparameters corresponding to the first growth curve functions from small to large in slope are 0.5, 1, 2 and 5 respectively.

[0064] Figure 5 is a flow chart of a method for generating a second growth curve function based on a first growth curve function provided in an embodiment of the present application. Figure 5 As shown, the method comprises the following steps:

[0065] In step S501, the origin of the first growth curve function is translated to the target point.

[0066] The trajectory position value of the target point is less than or equal to all the position values ​​in the first growth curve function, or the trajectory position value of the target point is greater than or equal to all the position values ​​in the first growth curve function.

[0067] In step S502, the domain of the first growth curve function is expanded from the first range to the second range to obtain a scaled first growth curve function.

[0068] In step S503, the position of the scaled first growth curve function in the definition domain is adjusted so that the scaled first growth curve is translated toward the origin by a preset distance.

[0069] In step S504, the portion of the curve from the origin of the user-defined domain to the midpoint of the definition domain in the translated first growth curve is evenly extended to obtain a second growth curve.

[0070] In the embodiment of the present application, since the first growth curve function has an adjustable smoothness curve characteristic at the origin, this part of the characteristic can be utilized at the endpoints of the weight function at both ends of the trajectory, so that the smoothness of the trajectory noise at the endpoints under the weight blessing can be returned to the trusted prior observation. Therefore, the origin of the first growth curve function can be first translated to the target point, and the trajectory position value of the target point is less than or equal to all position values ​​in the first growth curve function. In other words, we can first translate the origin of the first growth curve function from the center of the trajectory to the left endpoint of the trajectory.

[0071] In an embodiment of the present application, the domain of the first growth curve function can be expanded from the first range to the second range to obtain a scaled first growth curve function. The domain of the first growth curve is the value range of the independent variable x of the first growth curve function. In an example, the first range can be, for example, -10 to 10, and the second range can be, for example, 0 to 2000, that is, the domain of the first growth curve function can be expanded from -10 to 10 to 0 to 2000.

[0072] In the embodiment of the present application, the position of the scaled first growth curve function in the definition domain can be adjusted so that the scaled first growth curve is translated toward the origin by a preset distance. Since the convergence process of the trajectory needs to have a small enough impact on other parts, it is necessary to adjust the position of the scaled first growth curve function in the definition domain so that it is close enough to the endpoint.

[0073] In the embodiment of the present application, the curve from the origin of the custom domain to the midpoint of the definition domain in the first growth curve after translation can be evenly extended to obtain the second growth curve. In other words, in order to ensure that the function has such properties at both ends, the function is evenly extended near the midpoint of the trajectory, so that the entire weight function obtained after the extension has the ability to converge the weights at both ends of the trajectory to 0, and the weight in the middle part is normally 1.

[0074] In an embodiment of the present application, after the domain of the first growth curve is expanded from the first range to the second range, the value of the hyperparameter slope k of the first growth curve can also be reduced from the first value to the second value to obtain a scaled first growth curve function.

[0075] As mentioned above, the hyperparameter k of the first growth curve function is proportional to the slope. After changing the domain of the first growth curve function and expanding the domain, in order to ensure the overall distribution of the curve, the slope of the first growth curve function needs to be reduced, that is, k is inversely proportional to the domain range. It should be noted that k can also be adaptively transformed according to actual needs without being affected by the domain range.

[0076] Figure 6 is a schematic diagram of the scaled first growth curve function provided in the embodiment of the present application. Figure 6 As shown, the horizontal axis is the input trajectory and the vertical axis is the noise weight. The origin of the scaled first growth curve function is at its left endpoint, and the domain is from 0 to 2000, so the midpoint of the trajectory is 1000. The adjusted hyperparameter k values ​​Original k can be 0.0175, 0.025, and 0.05 respectively.

[0077] Figure 7 is a flow chart of a method for adjusting the position of the scaled first growth curve function in the definition domain provided in an embodiment of the present application. Figure 7 As shown, the method comprises the following steps:

[0078] In step S701, 1 / n of the position value of the point in the domain is defined as the preset distance.

[0079] In step S702, the scaled first growth curve function is translated by a preset distance toward the origin of the definition domain to obtain a translated first growth curve.

[0080] In the embodiment of the present application, the position of the scaled first growth curve function in the definition domain may be adjusted by taking 1 / n of the position value of the midpoint of the definition domain as a preset distance. Then, the scaled first growth curve function is translated by a preset distance toward the origin of the definition domain to obtain the translated first growth curve.

[0081] In other words, we can subtract 1 / n times the center point from x to control the convergence of the function to a few quantiles of the domain. We can change the convergence range of the function by adjusting n, and then find a parameter that converges smoothly enough and has little impact on other parts. Take n = 2 as an example, Figure 8 FIG. 4 is a schematic diagram showing a first growth curve function after translation provided in an embodiment of the present application. Figure 8 As shown, the horizontal axis is the input trajectory, the vertical axis is the noise weight, and the left rising part of the first growth curve function after translation is compressed to the halfway point of the midpoint from the left endpoint. At this point, the left curve of the second growth curve function is completed.

[0082] Fig. 9is a flow chart of another method for generating a second growth curve function based on a first growth curve function provided in an embodiment of the present application. Fig. 9 Steps S901 to S904 in the embodiment shown are Figure 5 Steps S501 to S504 in the illustrated embodiment are substantially the same and will not be described in detail herein. Fig. 9 As shown, the method also includes the following steps:

[0083] In step S905, in response to determining that the convergence interval of the second growth curve function is greater than a preset threshold, the n value is increased, and the two even-symmetric curve parts of the second growth curve function are translated by a preset distance toward the origin of the domain and the maximum value of the domain, respectively, to obtain an updated second growth curve function.

[0084] In step S906, it is determined that the updated second growth curve is a second growth curve function generated based on the first growth curve function.

[0085] In the embodiment of the present application, after generating the second growth curve function, if it is determined that the convergence interval of the second growth curve function is greater than a preset threshold, the value of n can be increased, and the two even-symmetric curves of the second growth curve function are translated by a preset distance in the direction of the origin of the domain and the direction of the maximum value of the domain, respectively, to obtain an updated second growth curve function. Then, the updated second growth curve is used to generate a second growth curve function based on the first growth curve function. Among them, the value of the preset threshold can be determined according to actual needs and is not limited here.

[0086] That is, in order to reduce the influence of convergence, the parameter n of the generated second growth curve function may be further adjusted to obtain a second growth curve function with a smaller convergence process.

[0087] FIG10 (A) is a schematic diagram of the first generated second growth curve function provided in an embodiment of the present application, and FIG10 (B) is a schematic diagram of the updated second growth curve function provided in an embodiment of the present application. In FIG10 (A) and FIG10 (B), the horizontal axis is the input trajectory and the vertical axis is the noise weight. It can be seen from FIG10 (A) and FIG10 (B) that the second growth curve function adjusted by further increasing the n value is closer to the endpoint and has a smaller convergence interval.

[0088] Fig.11 is a flow chart of another target trajectory optimization method provided in an embodiment of the present application. Fig.11 Steps S1101 to S1105 in the embodiment shown are Figure 3 Steps S301 to S305 in the illustrated embodiment are substantially the same and will not be described in detail herein. Fig.11 As shown, the method also includes the following steps:

[0089] In step S1106, the sum of the product of the second growth curve function and the first constant and the second constant is determined to be a noise function.

[0090] In step S1107 , the noise of the priori target trajectory is adjusted using a noise function to obtain an adjusted priori target trajectory.

[0091] The difference between the first constant and 1 is smaller than a fifth preset threshold, and the difference between the second constant and 0 is smaller than a sixth preset threshold.

[0092] In the embodiment of the present application, in order to avoid the optimization noise time-effect caused by the weight items at both ends of the generated second growth curve function being 0, which in turn causes the map to fail, it is necessary to set the convergence value to a controllable result. In other words, it can be further determined that the product of the second growth curve function and the first constant and the sum of the second constant are the noise function. The noise of the prior target trajectory is adjusted using the noise function to obtain the adjusted prior target trajectory. Among them, the difference between the first constant and 1 is less than the fifth preset threshold, and the difference between the second constant and 0 is less than the sixth preset threshold. The values ​​of the fifth preset threshold and the sixth preset threshold can be determined according to actual needs, and are not limited here. In an example, the first constant can be 0.999 and the second constant can be 0.001. If f2(x) is used to represent the second growth curve function, the noise function can be 0.001+0.999* f2(x).

[0093] When the embodiment of the present application is applied to the field of SLAM mapping, when the prior rtk is relatively accurate, it is used to adjust the prior weight to achieve normal noise regulation within the segment, and smoothly regress to a high weight at the edge of the segment. Since the misalignment and ghosting problems caused by some rtk accuracy problems in all the data collected by the collection vehicle require the introduction of inter-frame constraints of the odometer to smooth the problem sections. Since it is not desirable that the smoothing of the problem sections cause the misalignment of the edges of the processed sections with the previous intersections, a noise weight function is introduced into the rtk prior that converges to relatively small noise at both ends, that is, the prior is fully trusted at both ends, and the internal section regresses to the original noise. While ensuring full utilization of the inter-frame constraint smoothing, smooth convergence to absolute accuracy is ensured at the end.

[0094] Furthermore, in the embodiments of the present application, the following problems are solved by introducing an adjustable noise weight function: fully accepting the adjustment of data to other constraints within the segment; smoothly regressing the results to the vicinity of the prior at the edge of the segment; the smoothness of the regression, the minimum noise of the regression, and the internal noise amplification ratio are all adjustable; adaptive smoothness adjustment ensures a relatively smooth transition from as small as dozens of trajectories to as many as tens of thousands of trajectories.

[0095] When making this adjustable noise weight function, the following ideas were adopted:

[0096] The traditional smooth growth curve function is extended in the symmetrical interval around the midpoint of the trajectory domain. At the same time, taking advantage of the fact that its domain is between 0 and 1, it is changed into a weighted function with its two ends converging to the second constant and the middle being 1. Finally, an adjustable parameter is added to the inflection points of the rising and falling parts of the function to control the position where the convexity of the function changes in the rising and falling parts, making it closer to the two ends of the domain or closer to the center.

[0097] Since the input of the function is a trajectory, in which the trajectory is sorted by time and the key points are screened according to equal distance, the time interval between two adjacent points will vary with the vehicle speed. In order to operate the overall trajectory itself, the trajectory is re-encoded in sequence, and continuous natural numbers are used as the trajectory input x.

[0098] The input trajectory length will vary between 1 and 100,000. If the k value is given, the function curve will fluctuate greatly as the trajectory range changes, and the curve will have a gradient that is too large, resulting in faults in the optimized trajectory and being too smooth, which results in the inability to fully utilize the high-quality (small variance) trajectory of the combined inertial navigation system inside the road, and the inability to converge to the required second constant. The target trajectory optimization method provided in the embodiment of the present application uses the first growth curve function to generate the second growth curve function, and associates the trajectory range with the hyperparameter k, so that the function can be smooth when dealing with trajectories of different lengths, and can converge to the second constant of the boundary, such as 0.001.

[0099] It has been verified experimentally that by adopting the technical solution of the embodiment of the present application, the difference between the optimized target trajectory and the original trajectory at the end of the trajectory is only 6 cm, which greatly improves the problem of misalignment of the optimized target trajectory and improves the trajectory optimization accuracy.

[0100] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.

[0101] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0102] Fig.12 Schematic diagram of a target trajectory optimization device provided in an embodiment of the present application. Fig.12 As shown, the device comprises:

[0103] The acquisition module 1201 is configured to acquire a priori target trajectory.

[0104] The construction module 1202 is configured to construct a first growth curve function of the priori target trajectory, where the first growth curve function is used to simulate the noise of the priori target trajectory.

[0105] The generation module 1203 is configured to generate a second growth curve function based on the first growth curve function, the difference between the value of the second growth curve function in the first interval and 0 is less than the first preset threshold, the difference between the value of the second interval and the value of the first growth curve function is less than the second preset threshold, the first interval is an interval whose distance to the endpoint of the second growth curve is less than the third preset threshold, and the second interval is an interval whose distance to the endpoint of the second growth curve is greater than the fourth preset threshold.

[0106] The adjustment module 1204 is configured to adjust the noise of the priori target trajectory using the second growth curve function to obtain an adjusted priori target trajectory.

[0107] The optimization module 1205 is configured to construct a factor graph using the adjusted prior target trajectory, and perform optimization calculation on the factor graph to obtain an optimized target trajectory.

[0108] According to the technical solution provided in the embodiment of the present application, by obtaining the prior target trajectory, a first growth curve function simulating the noise of the prior target trajectory is constructed, and a second growth curve function is generated based on the first growth curve function, wherein the noise values ​​at both ends of the second growth curve function are close to 0 and the noise value in the middle section is close to the noise value in the middle section of the first growth curve, and then the noise of the prior target trajectory is adjusted using the second growth curve, and finally the adjusted prior target trajectory is used to construct the factor Figure 1 The target trajectory is optimized, the noise caused by various constraints is considered in the middle section, and the minimum noise is regressed near the endpoints. This can avoid the interlacing phenomenon caused by unbalanced trajectory edges, improve the accuracy of trajectory optimization, and improve the accuracy of mapping.

[0109] In the embodiment of the present application, the first growth curve function is: , where f(x) is the first growth curve function, k is the hyperparameter of the first growth curve function, the hyperparameter is proportional to the slope of the first growth curve, and x is the position value of the prior target trajectory.

[0110] In an embodiment of the present application, a second growth curve function is generated based on the first growth curve function, including: translating the origin of the first growth curve function to a target point, wherein the trajectory position value of the target point is less than or equal to all position values ​​in the first growth curve function, or the trajectory position value of the target point is greater than or equal to all position values ​​in the first growth curve function; expanding the definition domain of the first growth curve function from a first range to a second range to obtain a scaled first growth curve function; adjusting the position of the scaled first growth curve function in the definition domain so that the scaled first growth curve is translated toward the origin by a preset distance; and evenly extending the curve portion from the origin of the custom domain to the midpoint of the definition domain in the translated first growth curve to obtain a second growth curve.

[0111] In an embodiment of the present application, adjusting the position of the scaled first growth curve function in the definition domain includes: taking 1 / n of the position value of the midpoint of the definition domain as a preset distance; translating the scaled first growth curve function toward the origin of the definition domain by a preset distance to obtain the translated first growth curve.

[0112] In an embodiment of the present application, it also includes: in response to determining that the convergence interval of the second growth curve function is greater than a preset threshold, increasing the n value, translating the two even-symmetrical curve parts of the second growth curve function by a preset distance toward the origin of the domain and the maximum value of the domain, respectively, to obtain an updated second growth curve function; determining that the updated second growth curve function is a second growth curve function generated based on the first growth curve function.

[0113] In an embodiment of the present application, after expanding the domain of the first growth curve from the first range to the second range, it also includes: reducing the value of the hyperparameter slope k of the first growth curve from the first value to the second value to obtain a scaled first growth curve function.

[0114] In an embodiment of the present application, it also includes: determining that the product of the second growth curve function and the first constant and the sum of the second constant are the noise function; using the noise function to adjust the noise of the prior target trajectory to obtain an adjusted prior target trajectory; wherein the difference between the first constant and 1 is less than the fifth preset threshold, and the difference between the second constant and 0 is less than the sixth preset threshold.

[0115] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0116] Fig.13 Schematic diagram of an electronic device provided in an embodiment of the present application. Fig.13As shown, the electronic device 13 of this embodiment includes: a processor 1301, a memory 1302, and a computer program 1303 stored in the memory 1302 and executable on the processor 1301. When the processor 1301 executes the computer program 1303, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1301 executes the computer program 1303, the functions of the modules / units in the above-mentioned device embodiments are implemented.

[0117] The electronic device 13 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 13 may include, but is not limited to, a processor 1301 and a memory 1302. Those skilled in the art will appreciate that Fig.13 The electronic device 13 is merely an example and does not limit the electronic device 13 , and may include more or fewer components than those shown in the figure, or different components.

[0118] The processor 1301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0119] The memory 1302 may be an internal storage unit of the electronic device 13, for example, a hard disk or memory of the electronic device 13. The memory 1302 may also be an external storage device of the electronic device 13, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 13. The memory 1302 may also include both an internal storage unit of the electronic device 13 and an external storage device. The memory 1302 is used to store computer programs and other programs and data required by the electronic device.

[0120] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0121] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0122] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A target trajectory optimization method, characterized in that: include: Obtain prior target trajectory; Constructing a first growth curve function of the priori target trajectory, wherein the first growth curve function is used to simulate the noise of the priori target trajectory; A second growth curve function is generated based on the first growth curve function, wherein the difference between the value of the second growth curve function in the first interval and 0 is less than a first preset threshold, and the difference between the value of the second growth curve function in the second interval and the value of the first growth curve function is less than a second preset threshold, so that the noise value of the middle section of the second growth curve function is close to the noise value of the middle section of the first growth curve, so that the adjustment of the data by other constraints is fully accepted inside the second growth curve, and the noise values ​​at both ends of the second growth curve function are close to 0, so that the result is smoothly regressed to the vicinity of the prior at the edge of the second growth curve; The first interval is an interval whose distance from the endpoint of the second growth curve is less than a third preset threshold, and the second interval is an interval whose distance from the endpoint of the second growth curve is greater than a fourth preset threshold; Using the second growth curve function to adjust the noise of the priori target trajectory to obtain an adjusted priori target trajectory; A factor graph is constructed using the adjusted prior target trajectory, and the factor graph is optimized to obtain an optimized target trajectory.

2. The method according to claim 1, characterized in that: The first growth curve function is: , where f(x) is the first growth curve function, k is a hyperparameter of the first growth curve function, the hyperparameter is proportional to the slope of the first growth curve, and x is the position value of the prior target trajectory.

3. The method according to claim 2, characterized in that The generating a second growth curve function based on the first growth curve function comprises: The origin of the first growth curve function is translated to a target point, wherein the trajectory position value of the target point is less than or equal to all the position values ​​in the first growth curve function, or the trajectory position value of the target point is greater than or equal to all the position values ​​in the first growth curve function; Expanding the definition domain of the first growth curve function from a first range to a second range to obtain a scaled first growth curve function; Adjusting the position of the scaled first growth curve function in the definition domain so that the scaled first growth curve is translated toward the origin by a preset distance; The portion of the curve from the origin of the user-defined domain to the midpoint of the definition domain in the translated first growth curve is evenly extended to obtain the second growth curve.

4. The method according to claim 3, characterized in that The adjusting the position of the scaled first growth curve function in the definition domain comprises: The preset distance is 1 / n of the midpoint position value of the definition domain; The scaled first growth curve function is translated toward the origin of the definition domain by a preset distance to obtain a translated first growth curve.

5. The method according to claim 4, characterized in that The method further comprises: In response to determining that the convergence interval of the second growth curve function is greater than a preset threshold, increasing the value of n, and translating the two even-symmetric curves of the second growth curve function by preset distances toward the origin of the domain and the maximum value of the domain, respectively, to obtain an updated second growth curve function; Determining the updated second growth curve function is generating a second growth curve function based on the first growth curve function.

6. The method according to claim 3, characterized in that After expanding the definition domain of the first growth curve from the first range to the second range, the method further includes: The value of the hyperparameter slope k of the first growth curve is reduced from a first value to a second value to obtain a scaled first growth curve function.

7. The method according to any one of claims 1 to 6, characterized in that The method further comprises: Determine the sum of the product of the second growth curve function and the first constant and the second constant as a noise function; Using the noise function to adjust the noise of the priori target trajectory to obtain an adjusted priori target trajectory; The difference between the first constant and 1 is smaller than a fifth preset threshold, and the difference between the second constant and 0 is smaller than a sixth preset threshold.

8. A target trajectory optimization device, characterized in that: include: An acquisition module, configured to acquire a priori target trajectory; A construction module is configured to construct a first growth curve function of the priori target trajectory, wherein the first growth curve function is used to simulate the noise of the priori target trajectory; A generating module is configured to generate a second growth curve function based on the first growth curve function, wherein the difference between the value of the second growth curve function in the first interval and 0 is less than a first preset threshold, and the difference between the value of the second growth curve function in the second interval and the value of the first growth curve function is less than a second preset threshold, so that the noise value of the middle section of the second growth curve function is close to the noise value of the middle section of the first growth curve, so that the adjustment of the data by other constraints is fully accepted inside the second growth curve, and the noise values ​​at both ends of the second growth curve function are close to 0, so that the result is smoothly regressed to the vicinity of the prior at the edge of the second growth curve; The first interval is an interval whose distance from the endpoint of the second growth curve is less than a third preset threshold, and the second interval is an interval whose distance from the endpoint of the second growth curve is greater than a fourth preset threshold; an adjustment module, configured to adjust the noise of the priori target trajectory using the second growth curve function to obtain an adjusted priori target trajectory; The optimization module is configured to construct a factor graph using the adjusted prior target trajectory, and perform optimization calculation on the factor graph to obtain an optimized target trajectory.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.