Method, device, electronic device and storage medium for path smoothing processing
By interpolating and thresholding the robot path, a smooth sequence of target position points is generated, which solves the problems of head swaying and jamming caused by the non-smooth path during robot movement, ensures the overall shape of the path is stable and avoids collisions, and improves the motion effect and task execution efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 重庆中科汽车软件创新中心
- Filing Date
- 2022-09-21
- Publication Date
- 2026-04-21
AI Technical Summary
When a robot moves along an uneven path, it may experience problems such as swaying its head left and right or getting stuck, which affects the movement and task execution.
By interpolating the target path data, a sequence of candidate location points with a distance interval of less than a preset interval threshold is generated. The candidate location point sequence is then smoothed according to a preset angle threshold to generate the target location point sequence, ensuring that the direction change angle meets the preset threshold.
The path was smoothed, maintaining the overall shape and trend of the path, avoiding collisions between points and obstacles, and ensuring smooth robot movement.
Smart Images

Figure CN115617931B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of robot path planning and data processing technology, and in particular to a method, apparatus, electronic device and storage medium for path smoothing processing. Background Technology
[0002] For robots, such as intelligent robotic vacuum cleaners, logistics handling robots, factory robots, and autonomous vehicles, navigation paths are usually pre-planned to facilitate the robot in performing corresponding tasks. Therefore, navigation paths play a crucial role in the robot's movement, and the quality of the path directly affects the robot's movement and task execution efficiency.
[0003] The smoothness of the path affects the smoothness of the robot's movement. When walking along an uneven path, the robot may experience problems such as swaying its head left and right and getting stuck, which may not only damage the robot's parts but also affect the robot's task performance. Summary of the Invention
[0004] To solve the above-mentioned technical problems, or at least partially solve them, embodiments of this disclosure provide a method, apparatus, electronic device, and storage medium for path smoothing processing.
[0005] In a first aspect, embodiments of this disclosure provide a method for path smoothing. The method includes: acquiring target path data to be smoothed, the target path data including position data of sequentially arranged position points; interpolating the position data according to a preset interval threshold to obtain a sequence of candidate position points where the distance between adjacent position points is less than the preset interval threshold; wherein the preset interval threshold matches a target map corresponding to the target path data; performing a traversal operation to traverse candidate position points (excluding the first and last positions) in the candidate position point sequence, and smoothing the candidate position point sequence according to a preset angle threshold to obtain a target position point sequence; wherein the preset angle threshold matches the motion of a target robot navigating the target path data; the direction change angle corresponding to each target position point in the target position point sequence is less than the preset angle threshold, and the direction change angle is the angle between a first vector pointing from the previous position point to the current position point and a second vector pointing from the current position point to the next position point.
[0006] According to embodiments of this disclosure, the above-mentioned traversal operation, which traverses the candidate position points in the candidate position point sequence that are not at the beginning or end, and smooths the candidate position point sequence according to a preset angle threshold to obtain the target position point sequence, includes: in the k-th traversal operation, for the i-th candidate position point in the input candidate position point sequence, i = 2, 3, ..., N-1, k and i are positive integers, and N is the total number of candidate position points contained in the input candidate position point sequence, a position adjustment operation is performed to obtain a smoothed candidate position point sequence; the smoothed candidate position point sequence is used as the input candidate position point sequence in the (k+1)-th traversal operation, and the input candidate position point sequence corresponding to the 1st traversal operation is the above-mentioned candidate position point sequence; when in the K-th traversal operation, the position of the smoothed candidate position point sequence relative to the candidate position points in the input candidate position point sequence of this traversal operation does not need to be adjusted, then the smoothed candidate position point sequence obtained corresponding to the K-th traversal operation is the above-mentioned target position point sequence, where K is the sequence number of the last traversal operation, K ≥ 2 and is an integer.
[0007] According to an embodiment of this disclosure, for the i-th candidate position point, the position adjustment operation includes: calculating the direction change angle corresponding to the i-th candidate position point; determining whether the direction change angle corresponding to the i-th candidate position point is greater than the preset angle threshold; if the direction change angle is greater than the preset angle threshold, adjusting the position of the i-th candidate position point to the midpoint position, wherein the midpoint position is the position corresponding to the midpoint between the (i-1)-th and (i+1)-th candidate position points.
[0008] According to an embodiment of this disclosure, the above-mentioned interpolation processing of the location data based on a preset interval threshold to obtain a candidate location point sequence in which the distance interval between adjacent location points is lower than the preset interval threshold includes: calculating the distance interval between adjacent location points in the target path data; determining whether there is a target location point pair among the adjacent location points with a distance interval greater than the preset interval threshold; and if there is a target location point pair, performing linear interpolation on the target location point pair, wherein the interpolated location point and the original location point in the target path data constitute the candidate location point sequence.
[0009] According to an embodiment of this disclosure, the method further includes: matching the target angle threshold range of the target robot from a pre-configured mapping table based on the motion information of the target robot; the mapping table stores the association between the motion information of at least one robot and the angle threshold range, wherein the at least one robot includes the target robot; and generating the preset angle threshold based on the target angle threshold range.
[0010] According to embodiments of this disclosure, the motion information includes at least one of the following: motion characteristic information and motion scene information; the motion characteristic information includes at least one of the following: the size of the robot, the turning angle limit of the robot, and the operating mode of the robot; the motion scene information includes at least one of the following: motion environment information of the robot and motion restriction information of the robot in the motion environment.
[0011] According to an embodiment of this disclosure, the method further includes: generating the preset interval threshold based on the pixel resolution of the target map; wherein the preset interval threshold is less than or equal to half of the pixel resolution.
[0012] According to embodiments of this disclosure, the target path data is navigation path data used by the robot to navigate on a target road segment, the target road segment is the global path or a partial path, and the target path data is path data that has been pre-processed to avoid obstacles.
[0013] Secondly, embodiments of this disclosure provide an apparatus for path smoothing. The apparatus includes a data acquisition module, a preprocessing module, and a smoothing module. The data acquisition module acquires target path data to be smoothed, the target path data including position data of sequentially arranged position points. The preprocessing module interpolates the position data according to a preset interval threshold to obtain a sequence of candidate position points where the distance between adjacent position points is less than the preset interval threshold; wherein the preset interval threshold matches the target map corresponding to the target path data. The smoothing module performs a traversal operation, traversing candidate position points that are not at the beginning or end of the candidate position point sequence, and smooths the candidate position point sequence according to a preset angle threshold to obtain a target position point sequence. The preset angle threshold matches the motion of the target robot navigating the target path data; the direction change angle corresponding to each target position point in the target position point sequence is less than the preset angle threshold, the direction change angle being the angle between a first vector pointing from the previous position point to the current position point and a second vector pointing from the current position point to the next position point.
[0014] Thirdly, embodiments of this disclosure provide an electronic device. The electronic device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, communication interface, and memory communicate with each other via the communication bus; the memory stores computer programs; and the processor, when executing the program stored in the memory, implements the path smoothing method described above.
[0015] Fourthly, embodiments of this disclosure provide a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the path smoothing method described above.
[0016] The technical solutions provided in the embodiments of this disclosure have at least some or all of the following advantages:
[0017] By interpolating the position data in the target path data, a sequence of candidate position points with a distance interval of less than a preset threshold is obtained. Then, the candidate position point sequence is smoothed according to a preset angle threshold to obtain the target position point sequence. The smoothing process is an iterative process that ensures the directional change angle of each position point conforms to the preset angle threshold. In this scheme, on the one hand, by interpolating the target path data to make the distance interval between adjacent position points sufficiently small, the overall path direction will not be significantly altered during the smoothing process based on the preset angle threshold; only local smoothing is achieved, ensuring the overall shape and trend of the path remain stable. On the other hand, the sufficiently small interval between adjacent position points minimizes the adjustment of position points during smoothing, minimizing collisions between smoothed position points and obstacles. Path smoothing is achieved while ensuring the overall path trend conforms to the robot's design. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a path smoothing method according to an embodiment of the present disclosure is shown schematically.
[0021] Figure 2 A schematic diagram illustrating the path corresponding to the target path data according to an embodiment of the present disclosure is shown.
[0022] Figure 3A A schematic diagram illustrating a scenario of interpolating target path data according to an embodiment of the present disclosure is provided.
[0023] Figure 3BThe diagram illustrates a path diagram corresponding to the candidate location point sequence obtained after interpolating the target path data according to an embodiment of the present disclosure.
[0024] Figure 4 The diagram illustrates the path of the target location point sequence obtained after smoothing the candidate location point sequence according to an embodiment of the present disclosure.
[0025] Figure 5A The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on a second candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0026] Figure 5B The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on a third candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0027] Figure 5C The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on the fourth candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0028] Figure 5D The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on the fifth candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0029] Figure 5E The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on the sixth candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0030] Figure 5F The illustration schematically depicts an implementation scenario of a smoothed sequence of candidate positions obtained after performing a position adjustment operation on the penultimate candidate position point in accordance with an embodiment of the present disclosure, after performing a traversal operation.
[0031] Figure 5G The illustration schematically depicts an implementation scenario of a smoothed sequence of candidate position points obtained after performing a second traversal operation and adjusting the position of the penultimate candidate position point according to an embodiment of the present disclosure.
[0032] Figure 6 A structural block diagram of a path smoothing processing apparatus according to an embodiment of the present disclosure is schematically shown; and
[0033] Figure 7 A schematic block diagram of an electronic device provided in an embodiment of the present disclosure is shown. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this disclosure. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0035] A first exemplary embodiment of this disclosure provides a method for path smoothing. This method can be performed by an electronic device with computing capabilities.
[0036] In some embodiments, the electronic device may be a computer device, such as a desktop computer, laptop computer, tablet computer, etc.; it may also be various types of robots, such as intelligent sweeping robots, logistics handling robots, factory operation robots, intelligent rescue robots, autonomous vehicles, etc.; or it may be a server or other terminal device that can communicate with the robot, such as a smartphone, smartwatch, etc.
[0037] Figure 1 A flowchart illustrating a path smoothing process according to an embodiment of the present disclosure is shown schematically.
[0038] Reference Figure 1 As shown, the path smoothing method provided in this embodiment includes the following steps: S110, S120 and S130.
[0039] In step S110, the target path data to be smoothed is obtained, which includes the position data of the sequentially arranged position points.
[0040] In some embodiments, the target path data is used to be presented in a target map; the target path data is navigation path data used by the target robot to navigate on a target road segment, where the target road segment is the global distance or a portion of the distance.
[0041] The above means that the target path data is matched with the target map. For example, there is a correspondence between the location data of each location point contained in the target path data and the geographical location of the target map.
[0042] In some embodiments, the target robot has a display screen, and the target map and corresponding target path data can be displayed on the target robot's display screen interface. Alternatively, in other embodiments, the robot stores the target map and corresponding target path data, and can move according to the target path data planned on the target map.
[0043] In some embodiments, the target robot mentioned above includes, but is not limited to: intelligent sweeping robot, logistics handling robot, factory operation robot, intelligent rescue robot, autonomous vehicle, etc.
[0044] In one embodiment, the target map is a two-dimensional or three-dimensional raster map.
[0045] Figure 2 A schematic diagram of the path corresponding to the target path data according to an embodiment of the present disclosure is shown.
[0046] The aforementioned target path data includes the location data of sequentially arranged points, for example, referring to... Figure 2 As shown, the path R0 corresponding to the target path data includes T sequentially arranged location points, represented in sequence form: {L1 0 L2 0 L3 0 ... L T-1 0 L T 0}, where L1 0 L2 0 L3 0 ... L T-1 0 L T 0 This represents the 1st, 2nd, 3rd, ..., T-1th, and Tth position points.
[0047] The location data for each point can be two-dimensional or three-dimensional. Here, we take two-dimensional location data as an example. Each location point L1 0 L2 0 L3 0 ... L T-1 0 L T 0 The corresponding location data are represented as follows: (x1) 0 y1 0 (x2) 0 y2 0 (x3) 0 y3 0 ), ..., (x T-1 0 y T-1 0 ), (x T 0 y T 0In this embodiment, T=10 is used as an example. In the representation of location data and location points in the embodiments of this disclosure, the number in the upper right corner (e.g., 0) refers to the label of the path corresponding to the location point, which is used to distinguish the path corresponding to the location point obtained during the smoothing process.
[0048] In step S120, the location data is interpolated according to a preset interval threshold to obtain a sequence of candidate location points whose distance interval between adjacent location points is lower than the preset interval threshold; wherein the preset interval threshold is matched with the target map presented corresponding to the target path data.
[0049] In the embodiments of this disclosure, setting the interval threshold has at least two considerations and purposes: Firstly, by interpolating the target path data, the distance between adjacent points is made sufficiently small. Therefore, during the smoothing process based on the preset angle threshold, the overall path direction will not be significantly altered; only local smoothing is achieved, ensuring the overall shape and trend of the path remain stable. Secondly, a sufficiently small interval between adjacent points minimizes the adjustment of points during smoothing, thus minimizing the risk of collisions between the adjusted points and obstacles.
[0050] In some embodiments, if the distance interval between each adjacent location point in the target path data meets the condition of being lower than a preset interval threshold, then in step S120, it is determined that no interpolation of the location data is required, and the resulting candidate location point sequence is the input target path data.
[0051] In other embodiments, if there is a set or more sets of adjacent location points in the target path data whose distance interval does not meet the condition of being lower than a preset interval threshold, then in step S120, it is determined that these location data that do not meet the condition need to be interpolated, and the number of location points in the resulting candidate location point sequence is greater than the number of location points in the input target path data.
[0052] In one embodiment, step S120 includes: calculating the distance interval between adjacent location points in the target path data; determining whether there is a pair of target location points with a distance interval greater than the preset interval threshold among the adjacent location points; and if there is a pair of target location points, performing linear interpolation on the pair of target location points, wherein the interpolated location points and the original location points in the target path data constitute the candidate location point sequence.
[0053] In some embodiments, step S120 further includes: if there is no target location point pair, determining that there is no need to interpolate the location data, and using the target path data as a candidate location point sequence.
[0054] Figure 3A A schematic diagram illustrating a scenario of interpolating target path data according to an embodiment of the present disclosure is provided. Figure 3B The diagram illustrates a path diagram corresponding to the candidate location point sequence obtained after interpolating the target path data according to an embodiment of the present disclosure.
[0055] Reference Figure 3A As shown, a line segment with two endpoints representing a solid circle indicates the length of a preset interval threshold. In an exemplary scenario, in the path R0 corresponding to the aforementioned target path data, the adjacent position point L1 0 and L2 0 Distance interval between them, adjacent position points L8 0 and L9 0 The distance between them is greater than the preset interval threshold. Adjacent location point L3 0 and L4 0 The distance between them is equal to a preset interval threshold. L2 0 and L3 0 Between, L4 0 and L5 0 Between, L5 0 and L6 0 Between, L6 0 and L7 0 Between, L7 0 and L8 0 Between and L9 0 and L 10 0 The distances between them are all less than a preset interval threshold. That is, except for adjacent location points L1 0 and L2 0 L8 0 and L9 0 Apart from that, the distance between all other adjacent locations is lower than the preset interval threshold, and it is necessary to consider the distance between adjacent locations L1. 0 and L2 0 Between and L8 0 and L9 0 Interpolation is performed between them individually. For example, in Figure 3A The diagram illustrates the position of point L1 in the adjacent location. 0 and L2 0 Interpolation point L for linear interpolation between 12 At adjacent location point L8 0 and L9 0 Interpolation point L for linear interpolation between 89 .
[0056] Reference Figure 3BAs shown, the original points and interpolated points in the target path data together constitute the candidate location point sequence. After interpolation processing, the target path data containing 10 location points becomes the candidate location point sequence {L1}. 1 L2 1 L3 1 ... L N-1 1 L N 1 The corresponding path R1 includes N sequentially arranged points, N≥T, where these N points are: L1 1 L2 1 L3 1 ... L N-1 1 L N 1 In this embodiment, N=12 is used as an example.
[0057] In step S130, a traversal operation is performed to traverse the candidate position points that are not at the beginning or end of the candidate position point sequence. Based on a preset angle threshold, the candidate position point sequence is smoothed to obtain the target position point sequence.
[0058] Wherein, the aforementioned preset angle threshold is matched to the motion of the target robot corresponding to the navigation of the aforementioned target path data; the directional change angle corresponding to each target position point in the aforementioned target position point sequence is lower than the aforementioned preset angle threshold, and the aforementioned directional change angle is the angle between the first vector pointing from the previous position point to the current position point and the second vector pointing from the current position point to the next position point.
[0059] Figure 4 The diagram illustrates the path of the target location point sequence obtained after smoothing the candidate location point sequence according to an embodiment of the present disclosure.
[0060] Reference Figure 4 As shown, the preset angle threshold α is defined. For the target path data corresponding to the two-dimensional map, the preset angle threshold is a limit value of the plane angle. For example, in the two-dimensional map (driving plane) corresponding to the robot vacuum cleaner, the preset angle threshold of the target path data is the plane angle in the plane where the two-dimensional map is located.
[0061] For target path data corresponding to a 3D map, the preset angle threshold is a limit value of the plane angle along a set plane. For example, in the 3D map corresponding to an autonomous vehicle, the preset angle threshold of the target path data is the plane angle along the plane where the driving direction is located, including turning directions such as left turn and right turn.
[0062] By performing a traversal operation, the candidate position points from the second to the second-to-last position point in the candidate position point sequence are traversed in each traversal operation. For each current candidate position point along the path, its position is adjusted according to a preset angle threshold to smooth the candidate position point sequence, thus obtaining the target position point sequence. For example, referring to Figure 3 and... Figure 4 As shown, in one embodiment, by processing the above-mentioned candidate location point sequence {L1} 1 L2 1 L3 1 ... L 11 1 L 12 1 Perform one traversal operation, traversing to the second position L2. 1 ~The second to last position point L 11 1 During the process, path smoothing is performed based on a preset angle threshold α to obtain the target position point sequence {L1}. 2 L2 2 L3 2 ... L 11 2 L 12 2 The corresponding path R2, relative to the unsmoothed path R1, only has the position point L3. 2 Relative to position point L3 1 The location data of one point has changed, while the location data of other points remain unchanged. It's understandable that this illustrates the simplest case; other cases can be iterated once or multiple times using the same logic until the condition is met. That is, the process is traversed once or multiple times, adjusting some location points during each traversal until the target location point sequence is obtained.
[0063] It should be noted that during the traversal operation, a certain position L is adjusted sequentially. X During the process of smoothing the position, the position point L X Due to the position adjustment, this position point L will be affected. X and neighboring location L X-1 The direction of the line connecting them changes, causing the nearest neighbor point L to... X-1 The angle between the second vector and the first vector changes, which may lead to the following situation: the position L that previously corresponded to the X-1th traversal order... X-1The condition that the direction change angle is lower than the above-mentioned preset angle threshold is changed to: no longer meeting the condition that the direction change angle is lower than the above-mentioned preset angle threshold. Therefore, when the traversal operation is executed sequentially, multiple traversal operations need to be performed to adjust the position points that no longer meet the condition that the direction change angle is lower than the above-mentioned preset angle threshold. As the traversal operation is executed, the adjustment trend of the position points is to make the trends of each adjacent position point tend to be smooth, and the overall trend will tend to converge until all position points no longer need to be adjusted.
[0064] In some embodiments, during each traversal operation, the candidate position points from the second position point to the second-to-last position point in the candidate position point sequence are traversed sequentially. If a current candidate position point requires position adjustment during the traversal, the position adjustment operation is performed on the next candidate position point after the current candidate position point is adjusted. In other embodiments, during each traversal operation, the candidate position points from the second position point to the second-to-last position point in the candidate position point sequence are traversed sequentially. If a current candidate position point requires position adjustment during the traversal, the position adjustment is performed on the current candidate position point, and the traversal jumps back to the initial position for the next round of traversal: that is, the traversal starts again from the second position point.
[0065] In summary, in the embodiments including steps S110 to S130 above, by interpolating the position data in the target path data, a sequence of candidate position points with a distance interval between adjacent position points lower than a preset interval threshold is obtained; by smoothing the candidate position point sequence according to a preset angle threshold, a target position point sequence is obtained; the smoothing process is an iterative process to make the directional change angle corresponding to each position point conform to the preset angle threshold; in the above scheme, on the one hand, by interpolating the target path data, the distance interval between adjacent position points is made small enough, so during the smoothing process according to the preset angle threshold, the overall path direction will not be greatly changed, only the local area can be smoothed, ensuring that the overall shape trend of the path remains stable; on the other hand, the interval between adjacent position points is set small enough, so the adjustment of position points during the smoothing process is relatively small, and collisions between the smoothed position points and obstacles can be avoided as much as possible; the path smoothing process is achieved while ensuring the overall path trend and conforming to the robot.
[0066] According to an embodiment of this disclosure, in step S130 above, a traversal operation is performed to traverse the candidate position points that are not at the beginning or end of the candidate position point sequence. Based on a preset angle threshold, the candidate position point sequence is smoothed to obtain the target position point sequence, including:
[0067] In the k-th traversal operation, for the i-th candidate position point in the input candidate position point sequence, i = 2, 3, ..., N-1, k and i are positive integers, and N is the total number of candidate position points contained in the above input candidate position point sequence, a position adjustment operation is performed to obtain a smoothed candidate position point sequence; the above smoothed candidate position point sequence is used as the input candidate position point sequence in the (k+1)-th traversal operation, and the input candidate position point sequence corresponding to the 1st traversal operation is the above candidate position point sequence;
[0068] If, in the Kth traversal operation, the position of the candidate position point in the smoothed candidate position point sequence relative to the candidate position point in the input candidate position point sequence of this traversal operation does not need to be adjusted, then the smoothed candidate position point sequence obtained in the Kth traversal operation is the target position point sequence, where K is the sequence number of the last traversal operation and K≥2.
[0069] The following is combined Figures 5A-5F To describe the process of the first traversal operation, in Figure 5G The description describes the case where the result of the second traversal operation is the same as the result of the first traversal operation. That is, only the position adjustment of the candidate points is needed in the first traversal operation, and no position adjustment is needed in the second. The result obtained in the first operation is the converged case, which can be output as the target position point sequence. The gray-filled circles are used to indicate the current candidate position points in the first traversal operation.
[0070] According to an embodiment of this disclosure, for the i-th candidate position point, the position adjustment operation includes: calculating the direction change angle corresponding to the i-th candidate position point; determining whether the direction change angle corresponding to the i-th candidate position point is greater than the preset angle threshold; if the direction change angle is greater than the preset angle threshold, adjusting the position of the i-th candidate position point to the midpoint position, wherein the midpoint position is the position corresponding to the midpoint between the (i-1)-th and (i+1)-th candidate position points.
[0071] In some embodiments, if the directional change angle is lower than the preset angle threshold, the i-th candidate position point is skipped, that is, the position of the i-th candidate position point is not adjusted.
[0072] Figure 5A The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on a second candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0073] For the candidate location sequence {L1 1 L2 1 L3 1 L4 1 L5 1L6 1 L7 1 L8 1 L9 1 L 10 1 L 11 1 L 12 1 The process iterates from the second candidate position to the second-to-last candidate position. (See reference...) Figure 5A As shown, begin one traversal operation, selecting the second candidate location L2. 1 As the current candidate position, i = 2. Figure 5A The arrow in the image indicates the location of the second candidate point L2. 1 The first vector and the second vector, and the corresponding direction change angle β, in this embodiment, the second candidate position point L2 1 The corresponding direction change angle β is 0; therefore, the second candidate location point L2 can be determined. 1 If the corresponding direction change angle β is less than the preset angle threshold α, then skip the second candidate position point L2 mentioned above. 1 For the next candidate location point L3 1 Perform a position adjustment operation.
[0074] Figure 5B The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on a third candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0075] Reference Figure 5B As shown, the third candidate location point L3 1 As the current candidate position, i = 3. Figure 5B The arrow in the image indicates the location of the third candidate point L3. 1 The first vector, the second vector, and the corresponding direction change angle β; in this embodiment, the third candidate position point L3. 1 The corresponding direction change angle β is greater than the preset angle threshold α; in this case, adjust the position of the third candidate position point to the second candidate position point L2. 1 And the 4th candidate location point L4 1 Midpoint L between 3-1 1 Then, for the next candidate location point L4... 1 Perform a position adjustment operation.
[0076] Figure 5C The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on a fourth candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0077] Reference Figure 5C As shown, the fourth candidate location point L4 1 As the current candidate position, i = 4. Figure 5C The arrow in the image indicates the fourth candidate location, L4. 1 The first vector and the second vector, and the corresponding direction change angle β, in this embodiment, the fourth candidate position point L4 1 The corresponding direction change angle β is less than the preset angle threshold α; in this case, skip the fourth candidate position point L4 mentioned above. 1 For the next candidate location point L5 1 Perform a position adjustment operation.
[0078] Figure 5D The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on the fifth candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0079] Reference Figure 5D As shown, the fifth candidate location point L5 1 As the current candidate position, i = 5. Figure 5D The arrow in the image indicates the location of the fifth candidate point, L5. 1 Given the first and second vectors and their corresponding direction change angle β, in this embodiment, the fifth candidate position point L5... 1 The corresponding direction change angle β is less than the preset angle threshold α; in this case, skip the fifth candidate position point L5 mentioned above. 1 For the next candidate location point L6 1 Perform a position adjustment operation.
[0080] Figure 5E The diagram schematically illustrates an implementation scenario in which a position adjustment operation is performed on the sixth candidate location point during a single traversal operation, according to an embodiment of the present disclosure.
[0081] Reference Figure 5E As shown, the 6th candidate location point L6 1 As the current candidate position, i = 6. Figure 5E The arrow in the image indicates the location of the 6th candidate point L6. 1 The first vector and the second vector, and the corresponding direction change angle β, in this embodiment, the 6th candidate position point L6 1 The corresponding direction change angle β = preset angle threshold α; in this case, skip the 6th candidate position point L6 mentioned above. 1 For the next candidate location point L7 1 Perform a position adjustment operation.
[0082] Figure 5F The illustration schematically depicts an implementation scenario of a smoothed sequence of candidate position points obtained after performing a position adjustment operation on the penultimate candidate position point in accordance with an embodiment of the present disclosure, following a single traversal operation.
[0083] Continue targeting the 7th candidate position L7 in the same manner as described above. 1 The 8th candidate position L8 1 ... the 11th candidate position (i.e., the second to last candidate position) L 11 1 Performing position adjustment operations ultimately yields a smoothed candidate position point sequence {L1} corresponding to one traversal operation. 1 L2 1 L 3-1 1 L4 1 L5 1 L6 1 L7 1 L8 1 L9 1 L 10 1 L 11 1 L 12 1}
[0084] Since the input candidate position point sequence for the above traversal process is the above candidate position point sequence {L1} 1 L2 1 L 3-1 1 L4 1 L5 1 L6 1 L7 1 L8 1 L9 1 L 10 1 L 11 1 L 12 1}}, that is, the traversal process is based on the execution of the first traversal operation.
[0085] Figure 5G The illustration schematically depicts an implementation scenario of a smoothed sequence of candidate position points obtained after performing a second traversal operation and adjusting the position of the penultimate candidate position point according to an embodiment of the present disclosure.
[0086] After performing the first traversal operation, the second traversal operation is performed iteratively, and the smoothed candidate position point sequence {L1} obtained from the first traversal operation is processed. 1 L2 1 L 3-1 1 L4 1 L5 1 L6 1 L7 1 L8 1 L9 1 L 10 1 L 11 1 L 12 1 The sequence of candidate positions, used as the input for the second traversal operation, is processed again using the same logic. The smoothed candidate position sequence obtained from the second traversal operation is then referred to... Figure 5G As shown, by Figure 5G and Figure 5F The comparison shows that the candidate position point sequence after the smoothing process in the second traversal operation (corresponding to the aforementioned K value) does not need to be adjusted relative to the candidate position point sequence in the input candidate position point sequence of this traversal operation. Therefore, the smoothed candidate position point sequence obtained in the second traversal operation is the target position point sequence, which can be represented as {L1}. 2 L2 2 L3 2 L4 2 L5 2 L6 2 L7 2 L8 2 L9 2 L 10 2 L 11 2 L 12 2 The corresponding path is represented as R2.
[0087] According to some embodiments of this disclosure, the method further includes: matching the target angle threshold range of the target robot from a pre-configured mapping table based on the motion information of the target robot; the mapping table stores the association between the motion information of at least one robot and the angle threshold range, wherein the at least one robot includes the target robot; and generating the preset angle threshold based on the target angle threshold range.
[0088] By pre-configuring a mapping table corresponding to the robot's motion information and angle threshold range, the angle threshold range can be adapted to different motion information of the same type of robot as well as motion information of different types of robots. This effectively ensures that the smoothed target position point sequence conforms to the robot's motion characteristics, such as conforming to the robot's motion characteristics and the motion scene it is in.
[0089] For example, in one embodiment, the motion information includes at least one of the following: motion characteristic information and motion scene information; the motion characteristic information includes at least one of the following: the size of the robot, the turning angle limit of the robot, and the operating mode of the robot; the motion scene information includes at least one of the following: the motion environment information of the robot and the motion restriction information of the robot in the motion environment.
[0090] For example, the operating modes of the aforementioned robots include: autonomous driving mode and manual driving mode. Or they may include: semi-automatic operation mode and automatic control mode, etc.
[0091] The motion environment information of the robot mentioned above can be indoor or outdoor environment.
[0092] For some robots, motion restriction information may not be required. For example, for certain types of robotic vacuum cleaners, indoor and outdoor environments do not constrain the turning limit value of the robotic vacuum cleaner, that is, the turning limit value does not change with the motion environment.
[0093] For example, the above-mentioned motion restriction information may be: the maximum turning angle in an indoor environment is 80% of the turning angle limit, or the maximum turning angle in an outdoor area with obstacles (such as parallel parking) is 20% of the turning angle limit, etc.
[0094] According to some embodiments of this disclosure, the method further includes: generating the preset interval threshold based on the pixel resolution of the target map; wherein the preset interval threshold is less than or equal to half of the pixel resolution.
[0095] For example, in a raster map, a pixel resolution of 0.05m (meters) means that the size of a row is one meter, the corresponding number of grids is 20, and the length of each grid is 0.05m.
[0096] By setting a preset interval threshold less than or equal to half the pixel resolution (e.g., 0.025m), it can be ensured that the overall path direction will not be significantly altered during the smoothing process based on the preset angle threshold. Only local smoothing is achieved, ensuring that the overall shape trend of the path remains stable. At the same time, since the preset interval threshold is less than or equal to half the pixel resolution, when adjusting the position of one or more candidate points, it is still limited to a grid scale, which can minimize the probability of collision between the smoothed adjustment point and obstacles.
[0097] According to some embodiments of this disclosure, the target path data described above is path data for which obstacle avoidance processing has been performed in advance.
[0098] In some practical scenarios, in addition to path smoothing, it is also necessary to consider minimizing the risk of the smoothed path colliding with obstacles. By pre-processing the planned path data to avoid obstacles and using the resulting path data as the target path data, the interference of obstacle collisions can be largely avoided before smoothing. During path smoothing, since only minor adjustments are made, the probability of the smoothed path colliding with obstacles can be reduced.
[0099] A second exemplary embodiment of this disclosure provides an apparatus for path smoothing processing.
[0100] Figure 6 A structural block diagram of a path smoothing processing apparatus according to an embodiment of the present disclosure is shown schematically.
[0101] Reference Figure 6 As shown, the path smoothing processing apparatus 600 provided in this embodiment includes: a data acquisition module 601, a preprocessing module 602, and a smoothing processing module 603.
[0102] The data acquisition module 601 is used to acquire target path data to be smoothed, which includes the position data of sequentially arranged position points.
[0103] The preprocessing module 602 is used to perform interpolation processing on the location data according to a preset interval threshold to obtain a sequence of candidate location points whose distance interval between adjacent location points is lower than the preset interval threshold; wherein the preset interval threshold is matched with the target map presented corresponding to the target path data.
[0104] The smoothing module 603 is used to perform a traversal operation, traversing the candidate position points (excluding the first and last positions) in the candidate position point sequence, and smoothing the candidate position point sequence according to a preset angle threshold to obtain the target position point sequence. The preset angle threshold matches the motion of the target robot corresponding to the target path data; the direction change angle corresponding to each target position point in the target position point sequence is less than the preset angle threshold, and the direction change angle is the angle between the first vector pointing from the previous position point to the current position point and the second vector pointing from the current position point to the next position point.
[0105] According to some embodiments of this disclosure, the above-described apparatus further includes: a preset angle threshold generation module.
[0106] The aforementioned preset angle threshold generation module is used to: obtain the target angle threshold range of the target robot from a pre-configured mapping table based on the motion information of the target robot; and generate the aforementioned preset angle threshold based on the target angle threshold range. The mapping table stores the association between the motion information of at least one robot and the angle threshold range, wherein the at least one robot includes the aforementioned target robot.
[0107] According to embodiments of this disclosure, the motion information includes at least one of the following: motion characteristic information and motion scene information; the motion characteristic information includes at least one of the following: the size of the robot, the turning angle limit of the robot, and the operating mode of the robot; the motion scene information includes at least one of the following: motion environment information of the robot and motion restriction information of the robot in the motion environment.
[0108] According to some embodiments of this disclosure, the above-described apparatus further includes: a preset interval threshold generation module.
[0109] The preset interval threshold generation module is used to generate the preset interval threshold based on the pixel resolution of the target map; wherein the preset interval threshold is less than or equal to half of the pixel resolution.
[0110] According to some embodiments of this disclosure, the target path data is navigation path data used by the robot to navigate on a target road segment, the target road segment is the global path or a partial path, and the target path data is path data that has been pre-processed to avoid obstacles.
[0111] The specific execution details of the functional modules included in the above-mentioned device 600 can be referred to the description of the first embodiment, and will not be repeated here.
[0112] Any plurality of the functional modules included in the aforementioned device 600 may be combined into one module, or any one of the modules may be split into multiple modules. Alternatively, at least a portion of the functionality of one or more of these modules may be combined with at least a portion of the functionality of other modules and implemented in one module. At least one of the functional modules included in the aforementioned device 600 may be at least partially implemented as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a System-on-Chip, a System-on-Substrate, a System-on-Package, an Application-Specific Integrated Circuit (ASIC), or any other reasonable means of integrating or packaging circuitry, or implemented in hardware or firmware, or in any one of software, hardware, and firmware implementations, or in a suitable combination of any of these. Alternatively, at least one of the functional modules included in the aforementioned device 600 may be at least partially implemented as a computer program module, which, when run, can perform corresponding functions.
[0113] A third exemplary embodiment of this disclosure provides an electronic device.
[0114] Figure 7 A schematic block diagram of an electronic device provided in an embodiment of the present disclosure is shown.
[0115] Reference Figure 7 As shown, the electronic device 700 provided in this embodiment includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704. The processor 701, the communication interface 702, and the memory 703 communicate with each other through the communication bus 704. The memory 703 is used to store computer programs. When the processor 701 executes the program stored in the memory, it implements the path smoothing method described above.
[0116] A fourth exemplary embodiment of this disclosure also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program that, when executed by a processor, implements the path smoothing method as described above.
[0117] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs that, when executed, implement the method according to the embodiments of this disclosure.
[0118] According to embodiments of this disclosure, the computer-readable storage medium can be a non-volatile computer-readable storage medium, such as including, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0119] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0120] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for path smoothing, characterized in that, include: Obtain the target path data to be smoothed, the target path data including the position data of sequentially arranged position points; According to a preset interval threshold, the location data is interpolated to obtain a sequence of candidate location points whose distance interval between adjacent location points is lower than the preset interval threshold; wherein, the interpolation is performed on location points whose distance interval between adjacent location points is greater than the preset interval threshold, and the preset interval threshold is matched to the target map presented corresponding to the target path data; A traversal operation is performed, traversing the candidate position points in the candidate position point sequence that are not at the beginning or end. The candidate position point sequence is then smoothed according to a preset angle threshold to obtain the target position point sequence. The smoothing process involves adjusting the position of candidate position points whose direction change angle is greater than the preset angle threshold. Wherein, the preset angle threshold is matched to the motion of the target robot corresponding to the navigation of the target path data; the direction change angle corresponding to each target position point in the target position point sequence is lower than the preset angle threshold, and the direction change angle is the angle between the first vector pointing from the previous position point to the current position point and the second vector pointing from the current position point to the next position point.
2. The method according to claim 1, characterized in that, The step of performing a traversal operation involves traversing candidate position points that are not at the beginning or end of the candidate position point sequence, and smoothing the candidate position point sequence according to a preset angle threshold to obtain the target position point sequence, including: In the k-th traversal operation, for the i-th candidate position point in the input candidate position point sequence, i = 2, 3, ..., N-1, k and i are positive integers, and N is the total number of candidate position points contained in the input candidate position point sequence, a position adjustment operation is performed to obtain a smoothed candidate position point sequence; the smoothed candidate position point sequence is used as the input candidate position point sequence in the (k+1)-th traversal operation, and the input candidate position point sequence corresponding to the 1st traversal operation is the candidate position point sequence; If, in the Kth traversal operation, the position of the candidate position point in the smoothed candidate position point sequence relative to the candidate position point in the input candidate position point sequence of this traversal operation does not need to be adjusted, then the smoothed candidate position point sequence obtained corresponding to the Kth traversal operation is the target position point sequence, where K is the sequence number of the last traversal operation, K≥2 and is an integer.
3. The method according to claim 2, characterized in that, For the i-th candidate location point, the position adjustment operation includes: Calculate the orientation change angle corresponding to the i-th candidate position point; Determine whether the directional change angle corresponding to the i-th candidate position point is greater than the preset angle threshold; If the direction change angle is greater than the preset angle threshold, the position of the i-th candidate position point is adjusted to the midpoint position, where the midpoint position is the position corresponding to the midpoint between the (i-1)-th and (i+1)-th candidate position points.
4. The method according to claim 1, characterized in that, The step of interpolating the location data according to a preset interval threshold to obtain a sequence of candidate location points whose distance interval between adjacent location points is lower than the preset interval threshold includes: Calculate the distance interval between adjacent points in the target path data; Determine whether there are any pairs of target location points among the adjacent location points whose distance interval is greater than the preset interval threshold; If the target location point pair exists, linear interpolation is performed on the target location point pair, and the interpolated location point and the original location point in the target path data constitute the candidate location point sequence.
5. The method according to claim 1, characterized in that, The method further includes: Based on the motion information of the target robot, the target angle threshold range of the target robot is obtained by matching from a pre-configured mapping table; the mapping table stores the association between the motion information and angle threshold range of at least one robot, and the at least one robot includes the target robot; The preset angle threshold is generated based on the target angle threshold range.
6. The method according to claim 5, characterized in that, The motion information includes at least one of the following: motion characteristic information, motion scene information; The motion characteristic information includes at least one of the following: the robot's dimensions, the robot's turning angle limits, and the robot's operating mode; The motion scene information includes at least one of the following: motion environment information of the robot and motion restriction information of the robot in the motion environment.
7. The method according to claim 1, characterized in that, The method further includes: The preset interval threshold is generated based on the pixel resolution of the target map; Wherein, the preset interval threshold is less than or equal to half of the pixel resolution.
8. The method according to any one of claims 1-7, characterized in that, The target path data is navigation path data used by the robot to navigate on the target road segment. The target road segment is the global route or a part of the route. The target path data is path data that has been pre-processed to avoid obstacles.
9. A path smoothing processing apparatus, characterized in that, include: The data acquisition module is used to acquire target path data to be smoothed, the target path data including the position data of sequentially arranged position points; A preprocessing module interpolates the location data according to a preset interval threshold to obtain a sequence of candidate location points where the distance between adjacent location points is less than the preset interval threshold. The interpolation is performed on location points where the distance between adjacent location points is greater than the preset interval threshold, and the preset interval threshold matches the target map corresponding to the target path data. A smoothing module performs a traversal operation, iterating through the candidate location point sequence (excluding the first and last positions) and smoothing the sequence according to a preset angle threshold to obtain a target location point sequence. The smoothing is performed by adjusting the positions of candidate location points whose directional change angle is greater than the preset angle threshold. Wherein, the preset angle threshold is matched to the motion of the target robot corresponding to the navigation of the target path data; the direction change angle corresponding to each target position point in the target position point sequence is lower than the preset angle threshold, and the direction change angle is the angle between the first vector pointing from the previous position point to the current position point and the second vector pointing from the current position point to the next position point.
10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1-8.
Citation Information
Patent Citations
Path planning method and system based on parameterized Thiele continued fraction interpolation
CN112099498A