Track planning method and device, electronic equipment and storage medium
By determining the waypoints in trajectory planning and combining the maximum step size with linear interpolation and digital filtering, the problem of high computational cost in trajectory planning is solved, and efficient kinematic constraint satisfaction and trajectory planning are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-08
- Publication Date
- 2026-04-03
AI Technical Summary
Existing trajectory planning methods involve large computational loads and cannot effectively satisfy kinematic constraints.
By determining the waypoints in the trajectory to be planned, linear interpolation is performed in conjunction with the maximum step size. A digital filter is used to filter the coordinate point sequence, and the distance error between coordinate points is calculated to determine the target trajectory. An infinite impulse response filter is used for bidirectional filtering.
It effectively reduces the computational load of trajectory planning, satisfies kinematic constraints, and improves the efficiency and real-time performance of trajectory planning.
Smart Images

Figure CN121785326A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of path planning technology, and in particular to a trajectory planning method, apparatus, electronic device, and storage medium. Background Technology
[0002] In robot motion control, smoothing the robot's trajectory is necessary to ensure its smoothness and stability. Robot motion planning typically involves two stages: path planning and trajectory planning. Path planning involves designing a geometric path from the starting point to the ending point within the workspace or joint space, based on task requirements. Trajectory planning, building upon path planning, considers the robot's dynamic characteristics and kinematic constraints to calculate a series of discrete trajectory points that meet the requirements.
[0003] Trajectory planning needs to consider two main types of constraints: the first is task-related constraints, such as those imposed by processes like welding and painting, which have strict requirements on parameters like pose accuracy, speed, and acceleration of the robot's end effector; the second is robot-related constraints, including dynamic performance limitations such as maximum speed, maximum acceleration, and maximum torque of the joint motors. Traditional trajectory planning methods use optimization algorithms to transform the path planning results into parameterized fitting function equations, and then interpolate these fitting functions to obtain a series of discrete trajectory points. Commonly used parameterized fitting methods include polynomial spline functions, Bézier curves, and B-spline curves; moreover, the higher the order of the fitting function, the smoother the resulting trajectory.
[0004] However, solving higher-order fitting functions involves significant computation, and the fitting process also requires consideration of kinematic constraints such as velocity and acceleration at control points, further increasing the complexity of the fitting function solution. Therefore, how to reduce the computational cost of trajectory planning while satisfying kinematic constraints is a pressing technical problem that needs to be solved. Summary of the Invention
[0005] The purpose of this invention is to provide a trajectory planning method, apparatus, electronic device, and storage medium to solve the technical problems of high computational load and inability to meet kinematic constraints in trajectory planning methods in related technologies.
[0006] In a first aspect, embodiments of the present invention provide a trajectory planning method, comprising the following steps: Identify multiple waypoints in the trajectory to be planned; Based on the maximum step size in the trajectory to be planned, linear interpolation is performed on the discrete sequence composed of multiple passing points to obtain a set of discrete first coordinate point sequences, and the position index of the passing points in the first coordinate point sequence is recorded. The maximum step size satisfies the motion constraint conditions of the trajectory to be planned. The first coordinate point sequence is filtered using a digital filter to obtain the second coordinate point sequence. Based on the location index, determine the first coordinate point and the second coordinate point corresponding to the first coordinate point sequence and the second coordinate point sequence, and calculate the first distance error between the first coordinate point and the second coordinate point; If the first distance error is less than a preset distance threshold, the trajectory corresponding to the second coordinate point sequence is taken as the target trajectory for this planning.
[0007] In some embodiments, the method further includes: If the first distance error is not less than a preset distance threshold, the first coordinate point sequence is updated according to the first distance error to obtain the third coordinate point sequence. The third coordinate point sequence is filtered using a digital filter to obtain the fourth coordinate point sequence; Based on the location index, determine the first coordinate point and the fourth coordinate point corresponding to the first coordinate point sequence and the fourth coordinate point sequence, and calculate the second distance error between the first coordinate point and the fourth coordinate point; If the second distance error is less than the preset distance threshold, the trajectory corresponding to the fourth coordinate point sequence will be used as the target trajectory for this planning.
[0008] In some embodiments, the step of updating the first coordinate point sequence based on the first distance error to obtain a third coordinate point sequence includes: Based on the first distance error of the coordinate point corresponding to each location index and the preset update calculation formula, the coordinate point corresponding to each location index is updated to obtain multiple updated coordinate points; The multiple updated coordinate points are used as a third coordinate point sequence; The update calculation formula is as follows: ; in, and For the same index location, the coordinates before and after the update are given. A constant coefficient that is greater than 0. This is the first distance error.
[0009] In some embodiments, before the step of performing linear interpolation on the discrete sequence of multiple waypoints based on the maximum step size in the trajectory to be planned to obtain a set of discrete first coordinate point sequences, the method further includes: Obtain the motion constraints in the trajectory to be planned, including the maximum speed in the trajectory to be planned and the time period of trajectory discreteness; Based on the maximum speed and the time period, the maximum step size in the trajectory to be planned is determined, and the maximum step size is used to constrain the speed in the planned trajectory to not exceed the maximum speed.
[0010] In some embodiments, the step of performing linear interpolation on a discrete sequence of multiple transit points based on the maximum step size in the trajectory to be planned to obtain a set of discrete first coordinate point sequences includes: Calculate the adjacent distances between adjacent waypoints; The number of interpolation points is determined based on the adjacent distances and the maximum step size in the trajectory to be planned; A number of equally spaced interpolation points are generated between adjacent waypoints to obtain a set of discrete first coordinate point sequences.
[0011] In some embodiments, the step of filtering the first coordinate point sequence with a digital filter to obtain the second coordinate point sequence includes: An infinite impulse response filter is used to perform forward filtering on the first coordinate point sequence to obtain the first filtering result. The first filtering result is reversed and filtered to obtain the second filtering result; The second filtering result is reversed to obtain the second coordinate point sequence.
[0012] In some embodiments, the discrete sequence of the plurality of waypoints includes coordinate points in two-dimensional and three-dimensional space.
[0013] Secondly, embodiments of the present invention provide a trajectory planning device, comprising: The first determination module is used to determine multiple waypoints in the trajectory to be planned; The first processing module is used to perform linear interpolation on a discrete sequence of multiple passing points based on the maximum step size in the trajectory to be planned, to obtain a set of discrete first coordinate point sequences, and to record the position index of the passing points in the first coordinate point sequence, wherein the maximum step size satisfies the motion constraint conditions of the trajectory to be planned. The first filtering module is used to filter the first coordinate point sequence using a digital filter to obtain the second coordinate point sequence; The first calculation module is used to determine, based on the location index, a first coordinate point and a second coordinate point corresponding to the first coordinate point sequence and the second coordinate point sequence, and to calculate a first distance error between the first coordinate point and the second coordinate point; The second processing module is used to take the trajectory corresponding to the second coordinate point sequence as the target trajectory for this planning when the first distance error is less than a preset distance threshold.
[0014] Thirdly, embodiments of the present invention provide an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the trajectory planning method described above.
[0015] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the trajectory planning method described in any of the preceding claims.
[0016] Fifthly, embodiments of the present invention provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in the trajectory planning method provided in this application.
[0017] This invention provides a trajectory planning method, device, electronic device, and storage medium. The method obtains a first coordinate point sequence by linearly interpolating the discrete sequence of path points using the path points of the trajectory to be planned and the maximum step size in the trajectory. Then, it obtains a second coordinate point sequence by filtering. By calculating the distance error between the first and second coordinate points, it can be determined whether the second coordinate point sequence can be used as the target trajectory. This avoids the problem of large computational load in solving traditional high-order fitting functions, while also satisfying kinematic constraints, effectively reducing the computational load of trajectory planning. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating a trajectory planning method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram illustrating an application scenario of linear interpolation processing provided in an embodiment of the present invention; Figure 3a and Figure 3b This is a schematic diagram of a scenario for update and iterative calculation provided in an embodiment of the present invention; Figure 4a and Figure 4b This is a schematic diagram of velocity and acceleration in a target trajectory provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a trajectory planning device provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention; Figure 7 This is another structural schematic diagram of the electronic device provided in the embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0021] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0022] In related technologies, to ensure the smoothness and stability of robot motion, it is usually necessary to smooth the motion trajectory during robot motion control. Robot motion planning is generally divided into two stages: path planning and trajectory planning. Path planning involves planning a geometric path from the starting point to the ending point in the workspace or joint space according to task requirements. Trajectory planning, based on path planning, considers the robot's dynamic characteristics and kinematic constraints to calculate a series of discrete trajectory points that meet the requirements.
[0023] Trajectory planning needs to consider two main types of constraints: the first is task-related constraints, such as those imposed by processes like welding and painting, which have strict requirements on parameters like pose accuracy, speed, and acceleration of the robot's end effector; the second is robot-related constraints, including dynamic performance limitations such as maximum speed, maximum acceleration, and maximum torque of the joint motors. Traditional trajectory planning methods use optimization algorithms to transform the path planning results into parameterized fitting function equations, and then interpolate these fitting functions to obtain a series of discrete trajectory points. Commonly used parameterized fitting methods include polynomial spline functions, Bézier curves, and B-spline curves; moreover, the higher the order of the fitting function, the smoother the resulting trajectory.
[0024] However, solving higher-order fitting functions involves significant computation, and the fitting process also requires consideration of kinematic constraints such as velocity and acceleration at control points, further increasing the complexity of the fitting function solution. Therefore, how to reduce the computational cost of trajectory planning while satisfying kinematic constraints is a pressing technical problem that needs to be solved.
[0025] To address the technical problems existing in related technologies, embodiments of the present invention provide a trajectory planning method. For details, please refer to... Figure 1 , Figure 1 This is a flowchart of a trajectory planning method provided in an embodiment of the present invention, which includes steps 101 to 105. Step 101: Determine multiple waypoints in the trajectory to be planned.
[0026] In this embodiment, the trajectory to be planned is the trajectory that needs to be planned in this instance. Waypoints are pre-determined locations that the planned trajectory must pass through. Specifically, the waypoints can be determined based on actual task requirements and environmental information. For example, for a robot handling task, waypoints can be the starting position of the item, intermediate transfer points, and the final placement position.
[0027] After determining multiple waypoints, this embodiment can also predetermine the motion constraints in the trajectory to be planned, thereby calculating the maximum step size parameter in the trajectory based on the determined motion constraints. Specifically, the motion constraints are mainly used to constrain the motion state of the planned trajectory to meet specified requirements, such as constraints that the trajectory must pass through the waypoints and the speed must not exceed a specified value.
[0028] It should be noted that the discrete sequence of multiple waypoints provided in this embodiment includes coordinate points in two-dimensional and three-dimensional space. That is, waypoints can be two-dimensional coordinate points on a plane or three-dimensional coordinate points in space to adapt to different application scenarios. For example, in an indoor two-dimensional plane robot navigation scenario, waypoints are two-dimensional coordinate points; while in a scenario where a drone is flying in three-dimensional space, waypoints are three-dimensional coordinate points.
[0029] Step 102: Based on the maximum step size in the trajectory to be planned, perform linear interpolation on the discrete sequence composed of multiple passing points to obtain a set of discrete first coordinate point sequences, and record the position index of the passing points in the first coordinate point sequence.
[0030] Wherein, all first coordinate points in the first coordinate point sequence are the path points, and the maximum step length satisfies the motion constraint conditions of the trajectory to be planned. Specifically, in order to calculate the maximum step length parameter in the trajectory to be planned and to make the maximum step length parameter satisfy the motion constraint conditions of the trajectory to be planned, before step 102, the trajectory planning method provided in this embodiment may further include: obtaining the motion constraint conditions in the trajectory to be planned, the motion constraint conditions including the maximum speed in the trajectory to be planned and the time period of trajectory discreteness; determining the maximum step length in the trajectory to be planned based on the maximum speed and the time period, the maximum step length being used to constrain the speed in the planned trajectory from exceeding the maximum speed.
[0031] Specifically, the maximum step length in the trajectory to be planned can be calculated by multiplying the maximum speed by the time period to directly obtain the maximum step length.
[0032] After obtaining the maximum step size that satisfies the motion constraints of the planned trajectory, linear interpolation can be performed on the discrete sequence consisting of multiple waypoints. In this embodiment, linear interpolation of the discrete sequence allows for rapid refinement of the waypoint sequence while meeting certain accuracy requirements. By inserting new points between adjacent waypoints according to certain rules, the resulting discrete sequence becomes denser, thus providing a richer data foundation for subsequent filtering.
[0033] In some embodiments, the step of performing linear interpolation on a discrete sequence of multiple waypoints based on the maximum step size in the trajectory to be planned to obtain a set of discrete first coordinate point sequences may include: calculating the adjacent distance between adjacent waypoints; determining the number of interpolation points based on the adjacent distance and the maximum step size in the trajectory to be planned; and generating the number of equally spaced interpolation points between adjacent waypoints to obtain a set of discrete first coordinate point sequences.
[0034] For example, if the adjacent distance is L and the maximum step size is S, then the number of interpolation points N = L / S. After obtaining the number of interpolation points, the number of equally spaced interpolation points can be generated between adjacent path points to obtain a set of discrete, denser first coordinate point sequences.
[0035] Please see below. Figure 2 , Figure 2 This is a schematic diagram illustrating an application scenario of linear interpolation processing provided in an embodiment of the present invention, such as... Figure 2As shown, this embodiment mainly performs linear interpolation between adjacent waypoints. Specifically, the waypoints can be connected sequentially to obtain a polyline. Then, on each segment of the polyline, interpolation is performed at equal intervals according to the maximum step size to construct a set of discrete first coordinate point sequences (the shape of the first coordinate point sequence is a polyline, which has not been smoothed and cannot meet the normal movement trajectory of a robot, for example).
[0036] After obtaining a denser sequence of first coordinate points, this embodiment also needs to record the position index of the passing points in the sequence. This position index can help to quickly and accurately locate and compare the relationship between corresponding coordinate points in different processing stages during subsequent calculations and judgments, thereby effectively reducing the amount of calculation and improving the accuracy of calculation, and thus reducing the amount of calculation for overall trajectory planning.
[0037] Step 103: The first coordinate point sequence is filtered using a digital filter to obtain the second coordinate point sequence.
[0038] In this embodiment, the digital filter can remove noise and interference from the sequence, making the trajectory smoother. To achieve trajectory smoothness while simultaneously satisfying motion constraints, this embodiment can employ an Infinite Impulse Response (IIR) filter for bidirectional IIR filtering, thus ensuring both trajectory smoothness and motion constraints.
[0039] Specifically, the step of filtering the first coordinate point sequence with a digital filter to obtain the second coordinate point sequence provided in this embodiment may include: using an infinite impulse response filter to perform forward filtering on the first coordinate point sequence to obtain a first filtering result; performing reverse processing and filtering on the first filtering result to obtain a second filtering result; and performing reverse processing on the second filtering result to obtain the second coordinate point sequence.
[0040] Thus, the bidirectional IIR filtering process of this invention, through forward and reverse filtering, can effectively reduce the phase delay generated during the filtering process, resulting in a smoother filtered trajectory with minimal deviation from the original trajectory, ensuring the filtered trajectory closely matches the path points. Simultaneously, the infinite impulse response filter exhibits high filtering efficiency and low computational complexity, meeting the requirements of real-time deployment applications.
[0041] Specifically, the forward filtering process provided in this embodiment can use the positive coefficients of an IIR filter to perform filtering calculations on each point in the first coordinate point sequence in sequence. Based on the filter's transfer function and initial conditions, the output is updated using the weighted sum of the current point and previous points to obtain the first filtered result after forward filtering. It should be noted that the filter parameters used in forward filtering are optimized and adjusted according to the characteristics of the trajectory to be planned and the desired filtering effect. For example, for cases with large trajectory fluctuations, the weights of the filter coefficients can be appropriately increased to enhance the filtering's ability to suppress high-frequency noise.
[0042] When performing reverse filtering and subsequent filtering on the first filtering result, the reverse operation involves inverting the order of the first filtering results and then applying the positive coefficients of the IIR filter for inverse filtering. This is done to eliminate any phase shift that may occur during the forward filtering process, making the filtered trajectory more accurately approximate the original trajectory. During the second filtering, a weighted calculation is performed based on the filter parameters and the reversed sequence to obtain the second filtering result.
[0043] Finally, the second filtering result is reversed to restore its original order, resulting in a smoother second coordinate point sequence that meets the motion constraints. Each coordinate point in this sequence has undergone filtering optimization, ensuring that the trajectory formed by these points satisfies both the task constraints and the dynamic performance limitations of the robot. Compared to traditional high-order fitting function trajectory planning methods, the calculation process for the second coordinate point sequence obtained using the filtering method provided in this embodiment is simpler, significantly reducing computational resource consumption and improving the real-time performance and efficiency of trajectory planning.
[0044] Step 104: Based on the location index, determine the first coordinate point and the second coordinate point corresponding to the first coordinate point sequence and the second coordinate point sequence, and calculate the first distance error between the first coordinate point and the second coordinate point.
[0045] In this embodiment, since the position index of each waypoint in the first coordinate point sequence is recorded in step 102, the coordinate points corresponding to the same position index can be quickly found in the first and second coordinate point sequences based on the recorded position index. By calculating the distance error between these corresponding coordinate points, the degree of influence of filtering on the trajectory can be evaluated.
[0046] It should be noted that the first coordinate point and the second coordinate point corresponding to different position indices may have different values of the first error distance. Therefore, this embodiment mainly uses the largest error distance as the first error distance to compare with the preset distance threshold, so as to determine whether the second coordinate point sequence is the target trajectory.
[0047] Step 105: If the first distance error is less than a preset distance threshold, the trajectory corresponding to the second coordinate point sequence is taken as the target trajectory for this planning.
[0048] It should be noted that the preset distance threshold provided in this embodiment can be set according to the specific application scenario and accuracy requirements of the trajectory to be planned. For example, in scenarios with high trajectory accuracy requirements, such as precision parts processing and high-precision surveying, the preset distance threshold can be set relatively small, such as at the millimeter or even micrometer level. This ensures that the trajectory corresponding to the second coordinate point sequence deviates very little from the original trajectory, thereby meeting the requirements of high-precision operations. In scenarios with relatively low trajectory accuracy requirements, such as ordinary logistics warehousing and handling, and simple indoor navigation, the preset distance threshold can be appropriately increased, for example, set to the centimeter level. This can reduce unnecessary computation and filtering processes while ensuring a certain degree of trajectory smoothness, thereby improving the efficiency of trajectory planning.
[0049] Furthermore, the preset distance threshold can be determined based on the actual performance of the robot or motion device. For example, when the robot's motion accuracy is inherently limited, or its operating speed is too fast to achieve high-precision trajectory tracking, setting the preset distance threshold too high may cause the trajectory to lose its proper smoothness, while setting it too low may lead to a large amount of repetitive calculation and processing. In this case, the preset distance threshold can be adjusted according to the robot's motion error range to ensure both the basic smoothness of the trajectory and kinematic constraints, while also matching the robot's actual performance.
[0050] In practical applications, this embodiment can also conduct multiple experiments beforehand to try different distance threshold settings and observe the effect and computational efficiency of trajectory planning. Then, based on the experimental results, the most suitable preset distance threshold range for different scenarios can be summarized, so that these data can be directly referenced in subsequent trajectory planning to flexibly adjust the preset distance threshold to achieve the best trajectory planning effect.
[0051] After determining the preset distance threshold, if the first distance error is less than the preset distance threshold, it means that the trajectory corresponding to the second coordinate point sequence has met the planning requirements (i.e., the trajectory corresponding to the second coordinate point sequence can retain the characteristics of the original trajectory well while ensuring trajectory smoothness), and can be used as the target trajectory for this planning; otherwise, subsequent updates and bidirectional IIR filtering are required until the requirements are met. Thus, the distance error-based judgment method provided by this embodiment of the invention can effectively balance the relationship between trajectory smoothness and computational complexity, avoiding the complex calculation process of traditional high-order fitting function solutions, while also satisfying kinematic constraints, effectively reducing trajectory planning computation and improving trajectory planning efficiency.
[0052] Optionally, to satisfy more motion constraints, such as the maximum acceleration constraint in the trajectory to be planned, the step of using the trajectory corresponding to the second coordinate point sequence as the target trajectory for this planning in this embodiment may further include: calculating the maximum acceleration of the second coordinate point sequence and determining whether the maximum acceleration satisfies the preset maximum acceleration constraint. If it does, the trajectory corresponding to the second coordinate point sequence is used as the target trajectory for this planning; if it does not, the value of the order f of the digital filter is adjusted, and the steps of filtering the first coordinate point sequence, calculating the first distance error between the first coordinate point and the second coordinate point, and determining the target trajectory (i.e., steps 103 to 105) are repeated until the maximum acceleration constraint is satisfied. The trajectory corresponding to the coordinate point sequence obtained in the end is the target trajectory for this planning.
[0053] The filter order f can be adjusted as follows: the filter order is adjusted according to formula f new =f·a max / a R_max Calculate, where a R_max The maximum acceleration of the second coordinate point sequence is a. max The maximum acceleration constraint is set as a preset condition, f is the order of the digital filter used in this embodiment, and the calculation result is rounded up to an even integer as the new filter order.
[0054] In some embodiments, where the first distance error is not less than a preset distance threshold, in order to still obtain a target trajectory that satisfies the motion constraints in this case, this embodiment can further update the first coordinate point sequence to continue bidirectional IIR filtering processing using the updated coordinate point sequence, thereby calculating the difference between the filtered result and the updated coordinate point sequence, and thus determining the target trajectory. For details, please refer to [link to previous document]. Figure 1 ,like Figure 1As shown, the trajectory planning method provided in this embodiment may further include steps 106 to 109; Step 106: If the first distance error is not less than a preset distance threshold, update the first coordinate point sequence according to the first distance error to obtain the third coordinate point sequence.
[0055] In this embodiment, in order to obtain a target trajectory that satisfies the motion constraints, when the first distance error is determined to be not less than a preset distance threshold, it indicates that the trajectory obtained after filtering cannot meet the motion constraints and requires subsequent updating and further filtering. At this time, the idea of feedback control can be used to update the coordinates of each coordinate point in the first coordinate point sequence. Specifically, the step of updating the first coordinate point sequence based on the first distance error to obtain a third coordinate point sequence provided in this embodiment may include: updating the coordinate points corresponding to each position index according to the first distance error of the coordinate points corresponding to each position index and a preset update calculation formula, obtaining multiple updated coordinate points; and using the multiple updated coordinate points as the third coordinate point sequence; wherein the update calculation formula is: ;in, and For the same index location, the coordinates before and after the update are given. A constant coefficient that is greater than 0. This is the first distance error.
[0056] It should be noted that when When =1, during the iterative update calculation, the points on the updated trajectory Points on the trajectory before the update The distance between them will monotonically converge to 0, which is a uniform convergence process; when 0 < When <1, the calculation process is still a convergent process, but the convergence speed is slower; when Values greater than 1 and relatively large, such as 1.5, may diverge, leading to incorrect results. Therefore, to accelerate convergence, this embodiment provides... A constant coefficient slightly greater than 1 can be chosen, which is preferred. It can be 1.05.
[0057] Step 107: The third coordinate point sequence is filtered using a digital filter to obtain the fourth coordinate point sequence.
[0058] In this embodiment, the filtering process performed on the third coordinate point sequence is also a bidirectional IIR filtering process using an Infinite Impulse Response (IIR) filter. This not only reduces the amount of computation but also ensures that the trajectory fits the path points as closely as possible while maintaining trajectory smoothness.
[0059] Step 108: Based on the location index, determine the first coordinate point and the fourth coordinate point corresponding to the first coordinate point sequence and the fourth coordinate point sequence, and calculate the second distance error between the first coordinate point and the fourth coordinate point.
[0060] Using the same method as comparing the first coordinate point sequence and the second coordinate point sequence, the coordinate points on the first coordinate point sequence and the fourth coordinate point sequence are calculated to determine the second distance error between the first coordinate point (i.e., the waypoint) and the fourth coordinate point, thereby facilitating the judgment of whether the fourth coordinate point sequence is the target trajectory.
[0061] Step 109: If the second distance error is less than a preset distance threshold, the trajectory corresponding to the fourth coordinate point sequence is taken as the target trajectory for this planning.
[0062] In this embodiment, if the second distance error between the first coordinate point and the fourth coordinate point is less than a preset distance threshold, it indicates that the trajectory corresponding to the fourth coordinate point sequence has met the planning requirements (i.e., the trajectory corresponding to the fourth coordinate point sequence can retain the characteristics of the original trajectory while ensuring the smoothness of the trajectory), and can be used as the target trajectory for this planning; otherwise, steps 106 to 109 need to be repeated until the coordinate distance between the updated coordinate point sequence and the passing point is less than the preset distance threshold.
[0063] In this way, through multiple updates and iterations, the filtered trajectory can eventually pass through all the waypoints and also satisfy the motion constraints.
[0064] For example, to better illustrate the process of multiple update iterations, please refer to [link to relevant documentation]. Figure 3a and Figure 3b , Figure 3a and Figure 3b This is a schematic diagram of a scenario for update and iterative calculation provided in an embodiment of the present invention, such as... Figure 3a and Figure 3b As shown, Figure 3a The relationship between the filtered trajectory and the waypoints is shown, where the coordinates of the points marked with a pentagram are the waypoints (i.e., the first coordinate points in the first coordinate point sequence), and the coordinates of the points marked with a triangle are the position points on the filtered trajectory with the same index as the waypoints (i.e., the second coordinate points in the second coordinate point sequence).
[0065] At this point, the first error distance between the first coordinate point (i.e., the waypoint) and the second coordinate point with the same index on the first and second coordinate point sequences can be calculated. However, according to... Figure 3a It can be seen that the first error distance is greater than the preset distance threshold. Assuming the distance threshold is 0.05mm, this indicates that the second coordinate point sequence is not the target trajectory. Therefore, it is necessary to use the update calculation formula and update each coordinate point in the first coordinate point sequence according to the first distance error (i.e., update the coordinate points corresponding to the passing points) to obtain the third coordinate point sequence. The points in the third coordinate point sequence are the updated points of the passing points. Specifically, the third coordinate points in the third coordinate point sequence are as follows: Figure 3a The coordinates of the large circle in the diagram are shown.
[0066] After obtaining the third coordinate point sequence, IIR filtering can be applied to it to obtain the filtered fourth coordinate point sequence. In this embodiment, a low-pass Butterworth filter with an order of 5 and a cutoff frequency of 0.08 can be used. However, the filter parameters used in different trajectory planning schemes are not limited to those provided in this embodiment; other filter parameters that meet practical application requirements can also be used, which will not be listed here.
[0067] Specifically, the trajectory corresponding to the filtered sequence of fourth coordinate points is as follows: Figure 3b As shown, according to Figure 3b It can be seen that the fourth coordinate point sequence has passed through all the waypoints, and the maximum distance between it and the first coordinate point (i.e. the waypoint) in the first coordinate point sequence is less than the preset distance threshold of 0.05mm. Therefore, it can be determined that the trajectory corresponding to the fourth coordinate point sequence is the target trajectory.
[0068] Furthermore, after obtaining the target trajectory, the velocity and acceleration within the trajectory can be determined based on the distance traveled within the time period. For details, please refer to [link to relevant documentation]. Figure 4a and Figure 4b , Figure 4a and Figure 4b This is a schematic diagram of velocity and acceleration in a target trajectory provided in an embodiment of the present invention. Figure 4a and Figure 4b The velocity curve and acceleration curve of the target trajectory are shown respectively. Figure 4a and Figure 4b As can be seen, the velocity and acceleration in the target trajectory do not exceed the maximum velocity and maximum acceleration of the trajectory to be planned. Therefore, the target trajectory can well satisfy the motion constraints.
[0069] It should be noted that if the fourth coordinate point in the fourth coordinate point sequence does not pass through any path points, and the distance between it and the first coordinate point is greater than a preset distance threshold, then steps 106 to 109 need to be re-executed one or more times until the updated coordinate point sequence and the distance between the path points are less than the preset distance threshold, i.e., as shown below. Figure 3b As shown. The re-execution scheme is described in the above embodiment and will not be repeated here.
[0070] Thus, by adopting the above embodiments, the trajectory planning method provided by the present invention can effectively reduce the computational amount of trajectory planning while satisfying kinematic constraints, thereby effectively avoiding the problem of large computational amount in solving traditional high-order fitting functions, and quickly obtaining discrete trajectory points that meet the requirements.
[0071] In summary, this invention provides a trajectory planning method, including determining multiple waypoints in the trajectory to be planned; performing linear interpolation on a discrete sequence of waypoints based on the maximum step size in the trajectory to be planned to obtain a first coordinate point sequence, where the maximum step size satisfies motion constraints; recording the position indices of the waypoints in the first coordinate point sequence; filtering the first coordinate point sequence using a digital filter to obtain a second coordinate point sequence; determining the first and second coordinate points corresponding to the first and second coordinate point sequences based on the position indices; calculating a first distance error between the first and second coordinate points; and, if the first distance error is less than a preset distance threshold, using the trajectory corresponding to the second coordinate point sequence as the target trajectory for this planning. By combining the waypoints of the trajectory to be planned with the maximum step size in the trajectory, linear interpolation is performed on the discrete sequence of waypoints to obtain the first coordinate point sequence, which is then filtered to obtain the second coordinate point sequence. This allows for the determination of whether the second coordinate point sequence can be used as the target trajectory by calculating the distance error between the first and second coordinate points, avoiding the computationally intensive problem of traditional high-order fitting function solutions while still satisfying kinematic constraints, effectively reducing the computational load of trajectory planning.
[0072] Based on the method described in the above embodiments, this embodiment will further describe it from the perspective of a trajectory planning device. The trajectory planning device can be implemented as an independent entity or integrated into an electronic device, such as a terminal, which may include a mobile phone, a tablet computer, etc.
[0073] To address the same technical problem, this embodiment also provides a trajectory planning device. For details, please refer to... Figure 5 , Figure 5 This is a schematic diagram of a trajectory planning device provided in an embodiment of the present invention, such as... Figure 5As shown, the trajectory planning device 500 provided in this embodiment of the invention includes: a first determining module 501, a first processing module 502, a first filtering module 503, a first calculation module 504, and a second processing module 505; The first determining module 501 is used to determine multiple waypoints in the trajectory to be planned.
[0074] In this embodiment, the discrete sequence of multiple path points provided in this embodiment may include coordinate points in two-dimensional and three-dimensional space.
[0075] The first processing module 502 is used to perform linear interpolation processing on a discrete sequence composed of multiple passing points according to the maximum step size in the trajectory to be planned, to obtain a set of discrete first coordinate point sequences, and to record the position index of the passing points in the first coordinate point sequence, wherein the maximum step size satisfies the motion constraint conditions of the trajectory to be planned.
[0076] In this embodiment, the first processing module 502 is specifically used to: calculate the adjacent distance between adjacent waypoints; determine the number of interpolation points based on the adjacent distance and the maximum step size in the trajectory to be planned; generate the number of interpolation points with equal spacing between adjacent waypoints to obtain a set of discrete first coordinate point sequences.
[0077] The first filtering module 503 is used to filter the first coordinate point sequence using a digital filter to obtain the second coordinate point sequence.
[0078] In this embodiment, the first filtering module 503 is specifically used to: perform forward filtering on the first coordinate point sequence using an infinite impulse response filter to obtain a first filtering result; perform reverse processing and filtering on the first filtering result to obtain a second filtering result; and perform reverse processing on the second filtering result to obtain a second coordinate point sequence.
[0079] The first calculation module 504 is used to determine the first coordinate point and the second coordinate point corresponding to the first coordinate point sequence and the second coordinate point sequence according to the position index, and to calculate the first distance error between the first coordinate point and the second coordinate point.
[0080] The second processing module 505 is used to take the trajectory corresponding to the second coordinate point sequence as the target trajectory for this planning when the first distance error is less than a preset distance threshold.
[0081] In some embodiments, the trajectory planning device 500 provided in this embodiment may further include an update module, a second filtering module, a second calculation module, and a third processing module; The update module is used to update the first coordinate point sequence according to the first distance error, so as to obtain a third coordinate point sequence, when the first distance error is not less than a preset distance threshold.
[0082] In this embodiment, the update module can also be used to: update the coordinate points corresponding to each location index according to the first distance error of the coordinate points corresponding to each location index and a preset update calculation formula, to obtain multiple updated coordinate points; and use the multiple updated coordinate points as a third coordinate point sequence; wherein, the update calculation formula is: ;in, and For the same index location, the coordinates before and after the update are given. A constant coefficient greater than or equal to 1. This is the first distance error.
[0083] The second filtering module is used to filter the third coordinate point sequence using a digital filter to obtain the fourth coordinate point sequence.
[0084] The second calculation module is used to determine the first coordinate point and the fourth coordinate point corresponding to the first coordinate point sequence and the fourth coordinate point sequence according to the position index, and to calculate the second distance error between the first coordinate point and the fourth coordinate point.
[0085] The third processing module is used to take the trajectory corresponding to the fourth coordinate point sequence as the target trajectory for this planning when the second distance error is less than a preset distance threshold.
[0086] In some embodiments, the trajectory planning device 500 provided in this embodiment may further include an acquisition module and a second determination module; The acquisition module is used to acquire the motion constraints in the trajectory to be planned, including the maximum speed in the trajectory to be planned and the time period of trajectory discreteness.
[0087] The second determining module is used to determine the maximum step size in the trajectory to be planned based on the maximum speed and the time period, wherein the maximum step size is used to constrain the speed in the planned trajectory to not exceed the maximum speed.
[0088] In specific implementation, the above modules and / or units can be implemented as independent entities, or they can be arbitrarily combined and implemented as the same or several entities. For the specific implementation of the above modules and / or units, please refer to the previous method embodiments. For the specific beneficial effects that can be achieved, please also refer to the beneficial effects in the previous method embodiments, which will not be repeated here.
[0089] Additionally, please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. The electronic device can be a mobile terminal such as a smartphone, tablet computer, or other similar device. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 602. The processor 601 and the memory 602 are electrically connected.
[0090] The processor 601 is the control center of the electronic device 600. It connects various parts of the electronic device through various interfaces and lines. By running or loading the application program stored in the memory 602 and calling the data stored in the memory 602, it performs various functions of the electronic device 600 and processes data, thereby monitoring the electronic device 600 as a whole.
[0091] In this embodiment, the processor 601 in the electronic device 600 loads the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 runs the applications stored in the memory 602 to realize any step in the trajectory planning method provided in the above embodiment.
[0092] The electronic device 600 can implement the steps of any embodiment of the trajectory planning method provided in the embodiments of the present invention. Therefore, it can achieve the beneficial effects that any trajectory planning method provided in the embodiments of the present invention can achieve. For details, please refer to the previous embodiments, which will not be repeated here.
[0093] Please see Figure 7 , Figure 7 This is another structural schematic diagram of the electronic device provided in the embodiment of the present invention, such as... Figure 7 As shown, Figure 7 A specific structural block diagram of an electronic device provided in an embodiment of the present invention is shown. This electronic device can be used to implement the trajectory planning method provided in the above embodiments. The electronic device 700 can be a mobile terminal such as a smartphone or a laptop computer.
[0094] RF circuit 710 is used to receive and transmit electromagnetic waves, converting electromagnetic waves into electrical signals and vice versa, thereby enabling communication with communication networks or other devices. RF circuit 710 may include various existing circuit elements used to perform these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, subscriber identity modules (SIM cards), memory, etc. RF circuit 710 can communicate with various networks such as the Internet, corporate intranets, and wireless networks, or communicate with other devices via wireless networks. The aforementioned wireless networks may include cellular telephone networks, wireless local area networks (WLANs), or metropolitan area networks (MANs). The aforementioned wireless networks may use various communication standards, protocols, and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging, and short messages, and any other suitable communication protocols, including those that have not yet been developed.
[0095] The memory 720 can be used to store software programs and modules, such as the program instructions / modules corresponding to the trajectory planning method in the above embodiment. The processor 780 executes various functional applications and controls the tower crane by running the software programs and modules stored in the memory 720.
[0096] Memory 720 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, memory 720 may further include memory remotely located relative to processor 780, which can be connected to electronic device 700 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0097] The input unit 730 can be used to receive input digital or character information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, the input unit 730 may include a touch-sensitive surface 731 and other input devices 732. The touch-sensitive surface 731, also known as a touch display screen or touchpad, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch-sensitive surface 731), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 731 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch-sensitive surface 731 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 731, the input unit 730 may also include other input devices 732. Specifically, other input devices 732 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.
[0098] Display unit 740 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of electronic device 700. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Display unit 740 may include display panel 741, optionally configured as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other similar forms. Further, touch-sensitive surface 731 may cover display panel 741. When touch-sensitive surface 731 detects a touch operation on or near it, it transmits the information to processor 780 to determine the type of touch event. Subsequently, processor 780 provides corresponding visual output on display panel 741 according to the type of touch event. Although in the figures, touch-sensitive surface 731 and display panel 741 are implemented as two separate components to achieve input and output functions, in some embodiments, touch-sensitive surface 731 and display panel 741 can be integrated to achieve input and output functions.
[0099] The electronic device 700 may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 741 according to the ambient light level, and the proximity sensor can generate an interruption when the flip is closed or shut down. As a type of motion sensor, a gravity acceleration sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that recognize the phone's posture (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. Other sensors that may be configured in the electronic device 700, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be described in detail here.
[0100] Audio circuitry 760, speaker 761, and microphone 762 provide an audio interface between the user and electronic device 700. Audio circuitry 760 converts received audio data into electrical signals and transmits them to speaker 761, where speaker 761 converts them into sound signals for output. Conversely, microphone 762 converts collected sound signals into electrical signals, which are then received by audio circuitry 760, converted back into audio data, and processed by processor 780. The audio data is then transmitted via RF circuitry 710 to, for example, another terminal, or output to memory 720 for further processing. Audio circuitry 760 may also include an earphone jack to facilitate communication between peripheral headphones and electronic device 700.
[0101] Electronic device 700, through transmission module 770 (e.g., Wi-Fi module), can help users receive requests, send information, etc., providing users with wireless broadband internet access. Although transmission module 770 is shown in the figure, it is understood that it is not an essential component of electronic device 700 and can be omitted as needed without changing the essence of the invention.
[0102] The processor 780 is the control center of the electronic device 700. It connects to various parts of the phone via various interfaces and lines, and performs various functions and processes data of the electronic device 700 by running or executing software programs and / or modules stored in the memory 720, and by calling data stored in the memory 720, thereby providing overall monitoring of the electronic device. Optionally, the processor 780 may include one or more processing cores; in some embodiments, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 780.
[0103] The electronic device 700 also includes a power supply 790 (such as a battery) that supplies power to various components. In some embodiments, the power supply may be logically connected to the processor 780 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. The power supply 790 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0104] Although not shown, the electronic device 700 also includes cameras (such as front-facing cameras and rear-facing cameras), Bluetooth modules, etc., which will not be described in detail here. Specifically, in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory and one or more programs, wherein one or more programs are stored in the memory and configured to be executed by one or more processors to implement any step of the trajectory planning method provided in the above embodiments.
[0105] In practice, the above modules can be implemented as independent entities or combined in any way to be implemented as the same or several entities. For the specific implementation of the above modules, please refer to the previous method implementation examples, which will not be repeated here.
[0106] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. Therefore, embodiments of the present invention provide a storage medium storing multiple instructions that, when executed by a processor, can implement any step in the trajectory planning method provided in the above embodiments.
[0107] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0108] Since the instructions stored in the storage medium can execute the steps in any embodiment of the trajectory planning method provided in the embodiments of the present invention, the beneficial effects that any trajectory planning method provided in the embodiments of the present invention can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0109] The foregoing has provided a detailed description of a trajectory planning method, apparatus, electronic device, and storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application. Moreover, those skilled in the art can make several improvements and modifications without departing from the principles of this invention, and these improvements and modifications are also considered to be within the scope of protection of this invention.
[0110] It should be noted that when the above embodiments of this application are applied to specific products or technologies, and user-related data is involved, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
Claims
1. A trajectory planning method, characterized in that, Includes the following steps: Identify multiple waypoints in the trajectory to be planned; Based on the maximum step size in the trajectory to be planned, linear interpolation is performed on the discrete sequence composed of multiple passing points to obtain a set of discrete first coordinate point sequences, and the position index of the passing points in the first coordinate point sequence is recorded. The maximum step size satisfies the motion constraint conditions of the trajectory to be planned. The first coordinate point sequence is filtered using a digital filter to obtain the second coordinate point sequence. Based on the location index, determine the first coordinate point and the second coordinate point corresponding to the first coordinate point sequence and the second coordinate point sequence, and calculate the first distance error between the first coordinate point and the second coordinate point; If the first distance error is less than a preset distance threshold, the trajectory corresponding to the second coordinate point sequence is taken as the target trajectory for this planning.
2. The trajectory planning method as described in claim 1, characterized in that, The method further includes: If the first distance error is not less than a preset distance threshold, the first coordinate point sequence is updated according to the first distance error to obtain the third coordinate point sequence; The third coordinate point sequence is filtered using a digital filter to obtain the fourth coordinate point sequence; Based on the location index, determine the first coordinate point and the fourth coordinate point corresponding to the first coordinate point sequence and the fourth coordinate point sequence, and calculate the second distance error between the first coordinate point and the fourth coordinate point; If the second distance error is less than the preset distance threshold, the trajectory corresponding to the fourth coordinate point sequence will be used as the target trajectory for this planning.
3. The trajectory planning method as described in claim 2, characterized in that, The step of updating the first coordinate point sequence based on the first distance error to obtain the third coordinate point sequence includes: Based on the first distance error of the coordinate point corresponding to each location index and the preset update calculation formula, the coordinate point corresponding to each location index is updated to obtain multiple updated coordinate points; The multiple updated coordinate points are used as a third coordinate point sequence; The update calculation formula is as follows: ; in, and For the same index location, the coordinates before and after the update are given. A constant coefficient greater than 0. This is the first distance error.
4. The trajectory planning method as described in claim 1, characterized in that, Before the step of performing linear interpolation on the discrete sequence of multiple passing points based on the maximum step size in the trajectory to be planned to obtain a set of discrete first coordinate point sequences, the method further includes: Obtain the motion constraints in the trajectory to be planned, including the maximum speed in the trajectory to be planned and the time period of trajectory discreteness; Based on the maximum speed and the time period, the maximum step size in the trajectory to be planned is determined, and the maximum step size is used to constrain the speed in the planned trajectory to not exceed the maximum speed.
5. The trajectory planning method as described in claim 1, characterized in that, The step of performing linear interpolation on a discrete sequence of multiple transit points based on the maximum step size in the trajectory to be planned to obtain a discrete sequence of first coordinate points includes: Calculate the adjacent distances between adjacent waypoints; The number of interpolation points is determined based on the adjacent distances and the maximum step size in the trajectory to be planned; A number of equally spaced interpolation points are generated between adjacent waypoints to obtain a set of discrete first coordinate point sequences.
6. The trajectory planning method as described in claim 1, characterized in that, The step of filtering the first coordinate point sequence with a digital filter to obtain the second coordinate point sequence includes: An infinite impulse response filter is used to perform forward filtering on the first coordinate point sequence to obtain the first filtering result. The first filtering result is reversed and filtered to obtain the second filtering result; The second filtering result is reversed to obtain the second coordinate point sequence.
7. The trajectory planning method as described in any one of claims 1-6, characterized in that, The discrete sequence of multiple path points includes coordinate points in two-dimensional and three-dimensional space.
8. A trajectory planning device, characterized in that, include: The first determination module is used to determine multiple waypoints in the trajectory to be planned; The first processing module is used to perform linear interpolation on a discrete sequence of multiple passing points based on the maximum step size in the trajectory to be planned, to obtain a set of discrete first coordinate point sequences, and to record the position index of the passing points in the first coordinate point sequence, wherein the maximum step size satisfies the motion constraint conditions of the trajectory to be planned. The first filtering module is used to filter the first coordinate point sequence using a digital filter to obtain the second coordinate point sequence; The first calculation module is used to determine, based on the location index, a first coordinate point and a second coordinate point corresponding to the first coordinate point sequence and the second coordinate point sequence, and to calculate a first distance error between the first coordinate point and the second coordinate point; The second processing module is used to take the trajectory corresponding to the second coordinate point sequence as the target trajectory for this planning when the first distance error is less than a preset distance threshold.
9. An electronic device, characterized in that, The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 7.