Teaching path processing method, device, computer equipment and storage medium
By preprocessing and curve smoothing the robot teaching path point set, especially using Dubbins curve to connect turning path points, the problem of inaccurate generation of path point sets in the prior art is solved, and the robot navigation efficiency is improved.
Patent Information
- Application Number
- CN202211354857.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-11-01
AI Technical Summary
In the existing robot teaching technology, the teaching path generated by the path point set is low in accuracy and accuracy, and does not comply with the constraints of the robot kinematic model, resulting in low execution efficiency.
By obtaining the set of path points generated during the robot teaching process, pre-processing is performed to delete abnormal data points, and identifying the turning path points to be smoothed based on the curvature mutation of the path points, and using path curve smoothing processing, including Dubbins curve connection, ensure that the path meets kinematic constraints.
The generated teaching path is smoother and more accurate, meeting kinematic constraints, thereby improving the execution efficiency of the robot during navigation.
Smart Images

Figure CN115760911B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a teaching path processing method, apparatus, computer equipment, and storage medium. Background Art
[0002] With the development of robotics, robot teaching technology has emerged. Currently, most robot teaching technologies use a handheld teaching pendant to manipulate the robot to walk along the manipulated path, obtain a series of path point sets, and then generate a teaching path based on the path point sets.
[0003] However, due to the inevitable sensor anomalies and arbitrary teaching paths encountered during the handheld teach pendant teaching process, the pathpoint set contains a large number of abnormal pathpoints. The teaching path generated from the pathpoint set not only has low accuracy and precision, but also does not conform to the robot's kinematic model constraints, resulting in low execution efficiency when the robot navigates along the taught path. Summary of the Invention
[0004] Based on this, it is necessary to provide a teaching path processing method, device, computer equipment and computer-readable storage medium that can improve the execution efficiency of the robot in response to the above technical problems.
[0005] In a first aspect, the present application provides a teaching path processing method. The method comprises:
[0006] Get the set of path points generated during the robot teaching process;
[0007] Preprocess the path point set to obtain the target path point set;
[0008] According to the sudden change of curvature of the path points in the target path point set, the turning path points to be smoothed are identified from the target path point set;
[0009] Perform path curve smoothing on smooth turning path points.
[0010] In one embodiment, preprocessing the path point set to obtain the target path point set includes:
[0011] Determine the distance difference between the current path point and the next path point in the path point set in sequence;
[0012] If the distance difference is greater than the distance threshold, the current path point is deleted, and the path point set after the current path point is deleted is used as the preliminary path point set;
[0013] Perform interpolation on the preliminary path point set to obtain the target path point set.
[0014] In one embodiment, the initial teaching path is obtained after the path curve is smoothed on the smooth turning path point; after the path curve is smoothed on the smooth turning path point, the method further includes:
[0015] Determine the collision path point in the initial teaching path; the collision path point is the path point where the positioning jumps;
[0016] The collision path points are translated to obtain a collision-free target teaching path.
[0017] In one embodiment, identifying a turning path point to be smoothed from the target path point set based on a sudden change in curvature of the path point in the target path point set includes:
[0018] Determine the current path point from the target path point set in sequence, determine the previous path points and the next path points adjacent to the current path point, and ensure that neither the current path point nor the previous path points has a sudden change in curvature;
[0019] Determine a first vector angle between a first vector and a second vector, where the first vector is a direction vector formed by a previous path point and the current path point, and the second vector is a direction vector formed by the current path point and the subsequent path point;
[0020] Check whether the subsequent path point is a turning path point to be smoothed based on the first vector angle.
[0021] In one embodiment, checking whether the subsequent path point is a turning path point to be smoothed based on the first vector angle includes:
[0022] If the first vector angle is greater than the angle threshold, then determining a second vector angle between a third vector and the first vector, where the third vector is a direction vector formed by the current path point and an adjacent subsequent path point; the adjacent subsequent path point is an adjacent path point after the subsequent path point of the current path point;
[0023] If the second vector angle is not less than the angle threshold, the subsequent path point is determined to be a turning path point to be smoothed.
[0024] In one embodiment, performing path curve smoothing processing on the turning path point to be smoothed includes:
[0025] A smooth path curve corresponding to the turning path point to be smoothed is determined according to the turning path point to be smoothed, a previous path point adjacent to the turning path point to be smoothed, and a turning radius of the robot.
[0026] In one embodiment, a previous path point adjacent to a turning path point to be smoothed is a first previous path point; a previous path point adjacent to the first previous path point is a second previous path point; and determining a smooth path curve corresponding to the turning path point to be smoothed based on the turning path point to be smoothed, the previous path points adjacent to the turning path point to be smoothed, and a turning radius of the robot includes:
[0027] determining a fourth vector based on a direction vector formed by the second previous path point and the first previous path point;
[0028] Determine a fifth vector based on a direction vector formed by the turning path point to be smoothed and a path point following the turning path point to be smoothed;
[0029] By taking the direction indicated by the fourth vector as the initial posture orientation of the Dubins curve, the direction indicated by the fifth vector as the target posture orientation of the Dubins curve, and the turning radius of the robot as the curvature of the Dubins curve, the first prior path point and the turning path point to be smoothed are connected by the Dubins curve to obtain the smooth path curve corresponding to the turning path point to be smoothed.
[0030] In a second aspect, the present application further provides a teaching path processing device. The device comprises:
[0031] The acquisition module is used to obtain the path point set generated during the robot teaching process;
[0032] A preprocessing module, configured to preprocess the path point set to obtain a target path point set;
[0033] An identification module, configured to identify turning path points to be smoothed from the target path point set according to sudden changes in curvature of the path points in the target path point set;
[0034] The smoothing processing module is used to perform path curve smoothing processing on the turning path point to be smoothed.
[0035] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0036] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor.
[0037] In a fifth aspect, the present application further provides a computer program product, which includes a computer program that implements the steps of the above method when executed by a processor.
[0038] The aforementioned teaching path processing method, apparatus, computer device, storage medium, and computer program product obtain a set of path points generated during a robot teaching process; preprocess the set of path points to obtain a target set of path points; identify turning path points to be smoothed from the target set of path points based on sudden changes in curvature of the path points in the target set of path points; and perform path curve smoothing on the turning path points to be smoothed. Before generating a teaching path, abnormal data points in the set of path points are deleted and path curve smoothing is performed on the turning path points to be smoothed. This results in a smooth teaching path that satisfies kinematic constraints and improves the robot's execution efficiency during navigation.
[0039] The method obtains the path point set generated during the robot teaching process, pre-processes the path point set to obtain the target path point set, identifies the turning path points to be smoothed from the target path point set based on the sudden change in curvature of the path points in the target path point set, and then performs path curve smoothing on the turning path points to be smoothed. Before generating the teaching path, the method removes abnormal data points from the path point set and performs path curve smoothing on the turning path points to be smoothed. This ensures that the generated teaching path is not only smooth but also meets kinematic constraints, thereby improving the robot's execution efficiency during the navigation process. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 1 is a flow chart of a teaching path processing method in one embodiment;
[0041] Figure 2A A schematic diagram of identifying a turning path point to be smoothed in one embodiment;
[0042] Figure 2B A schematic diagram of identifying a turning path point to be smoothed in one embodiment;
[0043] Figure 3 A schematic diagram of performing path curve smoothing processing on a turning path point to be smoothed in one embodiment;
[0044] Figure 4 is a flow chart of a teaching path processing method in another embodiment;
[0045] Figure 5A is a structural block diagram of a teaching path processing device in one embodiment;
[0046] Figure 5B is a structural block diagram of an identification module in one embodiment;
[0047] Figure 6 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application pertains. The terms used herein in the specification of this application are for the purpose of describing specific embodiments only and are not intended to limit this application.
[0050] It will be understood that the terms "first," "second," and the like used herein may be used to describe various elements herein, but these elements are not limited by these terms. These terms are used solely to distinguish a first element from another element. For example, a first vector may be referred to as a second vector, and similarly, a second vector may be referred to as a first vector, without departing from the scope of this application. Both the first vector and the second vector are vectors, but they are not the same vector.
[0051] It can be understood that the teaching path processing method in each embodiment of the present application can be executed by the robot itself, that is, it can be executed by a chip device set on the robot, or it can be executed by a server, that is, the robot sends the path point set generated during the teaching process to the server, and the server executes each step in the teaching path processing method in each embodiment of the present application.
[0052] In one embodiment, Figure 1 As shown, a teaching path processing method is provided. The method is applied to a computer device as an example for illustration. The computer device can be a chip device set on a robot or a server. Specifically, the following steps are included:
[0053] Step 101: Obtain a set of path points generated during the robot teaching process.
[0054] The path point set is a collection of a series of path points generated during the robot teaching process.
[0055] In some embodiments, the pathpoint set includes a large number of pathpoints, each of which includes position coordinate information such as its X and Y coordinates, and each of which is generated in chronological order of teaching time. That is, the pathpoint set includes a series of ordered pathpoints generated in chronological order of the robot's teaching time. It will be appreciated that the pathpoints in the pathpoint set are sorted by teaching time.
[0056] Exemplarily, the computer device loads the original path points generated during the robot teaching process and records the original path points into the path point set, that is, the computer device obtains the path point set generated during the robot teaching process.
[0057] Step 102: Preprocess the path point set to obtain a target path point set.
[0058] The target path point set refers to a set of target path points that meet the requirements.
[0059] In some embodiments, the target waypoint set includes, but is not limited to, a series of waypoints that conform to a distance difference and a curvature.
[0060] Exemplarily, the computer device pre-processes the acquired path point set according to preset conditions to obtain target path points that meet the requirements. The set of target path points is the target path point set.
[0061] In one embodiment, the pre-processing may include filtering the waypoints in the waypoint set according to a preset condition, that is, the target waypoint set may be determined based on the waypoints remaining after filtering.
[0062] In one embodiment, the pre-processing may also include performing preliminary filtering on the waypoints in the waypoint set according to a preset condition, and amplifying the remaining waypoints after the preliminary filtering. That is, the amplified waypoints may be used to determine the target waypoint set.
[0063] Step 103: Identify turning path points to be smoothed from the target path point set based on the sudden change in curvature of the path points in the target path point set.
[0064] The turning path point to be smoothed refers to the path point to be smoothed.
[0065] Exemplarily, the computer device determines the curvature mutation of each path point through the curvature characterization information of each path point in the target path point set, and identifies the turning path point to be smoothed from the target path point set.
[0066] In one embodiment, the curvature characterization information includes the curvature value of the path point. The curvature value of the path point is calculated as follows: first, the coordinates of the path point are interpolated to obtain a fitting curve, then the first and second derivative values of the path point on the fitting curve are calculated, and finally, the first and second derivative values are substituted into the curvature formula to obtain the curvature value of the path point.
[0067] In another embodiment, the curvature representation information further includes a vector angle value between a path point and a direction vector formed by an adjacent path point.
[0068] For example, when the curvature value of a path point is less than the curvature threshold or the vector angle value is less than the angle threshold, it indicates that no sudden change in curvature has occurred at this path point. When the curvature value of a path point is not less than the curvature threshold or the vector angle value is not less than the angle threshold, it indicates that a sudden change in curvature has occurred at this path point. The curvature threshold refers to the critical value for determining when a sudden change in curvature has occurred at a certain path point. Specifically, the curvature threshold is determined by the minimum turning radius of the robot. Different types of robots have different minimum turning radii, and the curvature thresholds are also different.
[0069] Step 104: perform path curve smoothing processing on the turning path points to be smoothed.
[0070] It can be understood that there is a sudden change in curvature at the turning path point to be smoothed, so the part of the path curve corresponding to the turning path point to be smoothed is not smooth enough, and the jumps and mutations are relatively large. Therefore, the computer device can smooth the part of the path curve corresponding to the turning path point to be smoothed, so that the entire teaching path curve of the robot is smooth.
[0071] The teaching path processing method described above obtains a set of path points generated during the robot teaching process; preprocesses the path point set to obtain a target path point set; identifies turning path points to be smoothed from the target path point set based on sudden changes in curvature of the path points within the target path point set; and performs path curve smoothing on the turning path points to be smoothed. Before generating the teaching path, abnormal data points in the path point set are deleted and path curve smoothing is performed on the turning path points to be smoothed. This results in a smooth teaching path that also satisfies kinematic constraints, thereby improving the robot's execution efficiency during navigation.
[0072] In one embodiment, a path point set is preprocessed to obtain a target path point set, including: sequentially determining the distance difference between a current path point and a subsequent path point in the path point set; if the distance difference is greater than a distance threshold, deleting the current path point and using the path point set after deleting the current path point as a preliminary path point set; and interpolating the preliminary path point set to obtain a target path point set.
[0073] The current pathpoint refers to the pathpoint for which the distance difference is currently being calculated. It will be understood that each pathpoint for which a distance difference is calculated is the current pathpoint. For example, if a pathpoint set includes 100 pathpoints, and the distance difference between the first and second pathpoints is calculated for the first time, the current pathpoint is the first pathpoint. The distance difference between the second and third pathpoints is calculated for the second time, and the current pathpoint is the second pathpoint.
[0074] The distance difference is the difference between the current path point and its adjacent next path point. Specifically, the distance difference can be calculated using a distance formula. Common distance formulas include, but are not limited to, Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, or Mahalanobis distance.
[0075] It should be noted that each path point in the path point set will be used as the current path point in turn, and the distance difference between each current path point and the next path point will be calculated.
[0076] The distance threshold is the critical value for determining a sudden change in the distance between two adjacent waypoints. In some embodiments, the distance threshold is positively correlated with the size of the robot. For example, a small robot can set the distance threshold to 10 cm, while a medium-to-large robot can set the distance threshold to 15 cm. The distance threshold is typically set accordingly based on the size of the robot. In some cases, assuming the robot itself requires that waypoints be recorded at 5 cm intervals, the distance threshold is set to 5 cm.
[0077] The preliminary pathpoint set is the pathpoint set obtained after preliminary processing of the pathpoint set. Specifically, if the distance difference between the current pathpoint and the next pathpoint is greater than the distance threshold, it indicates that the current pathpoint has experienced a distance mutation, meaning that the current pathpoint is a noise point and needs to be removed. The pathpoint set after removing all pathpoints with distance mutations is the preliminary pathpoint set.
[0078] Interpolation is an approximate calculation method for calculating unknown points from known points. Specifically, interpolation includes at least one of Lagrange interpolation, Newton interpolation, and Gaussian interpolation.
[0079] For example, after obtaining the path point set generated during the robot teaching process, the computer device sequentially determines the distance difference between the current path point and the next path point in the path point set; if the distance difference is greater than the distance threshold, the current path point is deleted, that is, the current path point is a noise point, and the path point set after deleting the current path point is used as the preliminary path point set; the preliminary path point set is interpolated to obtain the target path point set.
[0080] In one embodiment, the computer device may perform uniform interpolation on the preliminary path point set so that the distances between the path points are as equal as possible. In other embodiments, the computer device may also perform random interpolation on the preliminary path point set to expand the path points in the preliminary path point set.
[0081] In the above embodiment, by eliminating points with sudden distance changes in the path point set and interpolating the preliminary path point set to obtain the target path point set, the computational complexity of the teaching path algorithm is reduced, making the computational efficiency of the teaching path algorithm higher.
[0082] In one embodiment, the initial teaching path is obtained after the path curve of the smooth turning path point is smoothed; after the path curve of the smooth turning path point is smoothed, it also includes: determining the collision path point in the initial teaching path; the collision path point is the path point of the positioning jump; the collision path point is translated to obtain a collision-free target teaching path.
[0083] Among them, the initial teaching path refers to the teaching path obtained by smoothing the part of the path curve corresponding to the turning path point to be smoothed, and combining it with the path points in the target path point set that do not need to be smoothed. That is, the initial teaching path is the teaching path obtained by combining the smooth path curve corresponding to the turning path point to be smoothed and the path points in the target path point set that do not need to be smoothed. The collision path point is the path point where the positioning jumps. Specifically, the collision path point can be a path point generated due to abnormal positioning of the robot itself. It can be understood that when passing through a place with an obstacle during the teaching process, in theory, the point where the obstacle is located will not be used as a path point, because the robot will not pass through the obstacle in the actual scene, but due to the positioning difference of the robot itself, the point where the obstacle is located is collected as a path point, that is, a collision path point.
[0084] The target teaching path refers to the teaching path obtained by translating the collision path points in the initial teaching path, that is, the collision-free target teaching path.
[0085] Specifically, after the computer device smoothes the path curve of the turning path point to be smoothed, it obtains the smooth path curve corresponding to the turning path point to be smoothed, combines the path points in the target path point set that do not need to be smoothed to obtain the initial teaching path, performs collision detection on the initial teaching path, determines the collision path points in the initial teaching path, and translates the collision path points to obtain a collision-free path point set composed of collision-free path points, and obtains a collision-free target teaching path based on the collision-free path point set.
[0086] In one embodiment, when generating a teaching path, the path points are mapped to a grid map. The robot can obtain the pixel value of the corresponding path point in the grid map based on the coordinates of each path point in the path point set. If the pixel value of a path point is 255, that is, the path point is a white grid in the grid map, then the path point is determined to be a non-collision path point. If the pixel value of a path point is 0, that is, the path point is a black grid in the grid map, then the path point is determined to be a collision path point. The robot can translate the collision path point toward the interval of the white pass area in the map grid. It can be understood that the interval of the white pass area is the interval where there is no collision point.
[0087] In the above embodiment, by translating the collision path points, the generated target teaching path is made more accurate, thereby making the subsequent path curve smoothing process more accurate.
[0088] In one embodiment, according to the curvature mutation of the path points in the target path point set, the turning path points to be smoothed are identified from the target path point set, including: determining the current path point in sequence from the target path point set, determining the previous path point and the next path point adjacent to the current path point, and determining that neither the current path point nor the previous path point has a curvature mutation; determining a first vector angle between a first vector and a second vector, the first vector being a direction vector composed of the previous path point and the current path point, and the second vector being a direction vector composed of the current path point and the next path point; and identifying the turning path points to be smoothed from the target path point set according to the first vector angle.
[0089] The preceding path point is the path point immediately preceding the current path point, and the succeeding path point is the path point immediately following the current path point. It can be understood that the "adjacent path points" refer to the order in which the path points are distinguished by the order in which they were taught. For example, the path point recorded at the moment immediately preceding the moment the current path point was recorded is the preceding path point, and the path point recorded at the moment immediately following the moment the current path point was recorded is the succeeding path point.
[0090] In one embodiment, four path points are recorded at 9:05, 9:06, 9:08, and 9:09, respectively. The path point recorded at 9:08 is used as the current path point. The path point recorded at 9:09 is the subsequent path point to the path point recorded at 9:08, and the path point recorded at 9:06 is the previous path point to the path point recorded at 9:08.
[0091] The current path point and the previous path point are both points with no curvature mutation, and the subsequent path point is the point to be verified for curvature mutation. The curvature mutation of the subsequent path point is verified by the two current path points with no curvature mutation and the previous path point, that is, the curvature mutation of the unknown point is verified by two points with normal curvature.
[0092] The first vector is the direction vector formed by the previous path point and the current path point. The second vector is the direction vector formed by the current path point and the subsequent path point. The first vector angle is the angle between the first vector and the second vector. The value of the first vector angle is used to determine whether there is a sudden change in curvature at the subsequent path point.
[0093] Exemplarily, the computer device sequentially determines the current path point from the target path point set, determines the previous path point and the subsequent path point adjacent to the current path point, and neither the current path point nor the previous path point has a sudden change in curvature; determines a first vector angle between a first vector and a second vector, the first vector being a direction vector composed of the previous path point and the current path point, and the second vector being a direction vector composed of the current path point and the subsequent path point; determines whether there is a sudden change in curvature at the subsequent path point by the value of the first vector angle, and identifies the turning path point to be smoothed from the target path point set.
[0094] In the above embodiment, two path points without curvature mutation are used to verify whether an unknown path point has a curvature mutation, which is simple and efficient.
[0095] It should be noted that, in the above embodiment, two path points with normal curvature are used to verify unknown path points, that is, the target path point set includes at least three path points, and the first current path point is calculated from the second path point in the target path point set.
[0096] In one embodiment, whether the subsequent path point is a turning path point to be smoothed is checked based on the first vector angle, including: if the first vector angle is greater than the angle threshold, the computer device determines the second vector angle between the third vector and the first vector, the third vector is a direction vector composed of the current path point and the adjacent subsequent path point; the adjacent subsequent path point is the adjacent path point after the subsequent path point of the current path point; if the second vector angle is not less than the angle threshold, the subsequent path point is determined to be a turning path point to be smoothed.
[0097] The angle threshold is a critical value for determining whether the angle is normal. Specifically, the angle threshold is related to the robot's minimum turning radius and wheelbase: angle threshold = arsin(wheelbase / minimum turning radius).
[0098] The adjacent subsequent path point is an adjacent path point following the subsequent path point of the current path point, and the third vector is a direction vector formed by the current path point and the adjacent subsequent path point.
[0099] For example, when the first vector angle is greater than the angle threshold, it indicates that the subsequent path point is a path point with a sudden change in curvature or a turning path point that needs to be smoothed. It is necessary to further calculate the second vector angle to determine the curvature sudden change of the subsequent path point. When the second vector angle is less than the angle threshold, it indicates that the subsequent path point is a point with a sudden change in curvature, and the subsequent path point is deleted. When the second vector angle is not less than the angle threshold, it indicates that the subsequent path point is a turning path point that needs to be smoothed.
[0100] In some embodiments, as Figure 2A As shown, a schematic diagram of identifying turning path points to be smoothed is provided.
[0101] Among them, the path point P i-1 is the previous path point, path point P i is the current path point, path point P i+1 is the next path point, path point P i+2 is the adjacent path point. The first vector a=(P i-1 ,Pi), the second vector b=(P i ,P i+1 ), the third vector c=(P i ,P i+2 ), the first vector angle β1 refers to the angle between the first vector a and the second vector b, and the second vector angle β2 refers to the angle between the first vector a and the third vector c. It should be noted that the current path point P i and the previous path point P i-1 There is no sudden change in curvature.
[0102] For example, when the first vector angle β1 is greater than the angle threshold, it means that at the next path point P i+1 Is a path point with a sudden change in curvature or a turning path point to be smoothed. Further, it is determined whether the second vector angle β2 is greater than the angle threshold to determine whether the path point P is the next one. i+1 If the second vector angle β2 is less than the angle threshold, it means that at the next path point P i+1 Is a point where the curvature changes suddenly, then the point P on the back path i+1 delete.
[0103] It should be noted that Figure 2A The adjacent subsequent path point P in i+2 and the next path point P i+1 The relative position relationship is only used as an example for illustration and is not limited in this embodiment.
[0104] In one embodiment, Figure 2B As shown, another schematic diagram for identifying turning path points to be smoothed is provided.
[0105] Among them, about the path point P i-1 、Path point P i 、Path point P i+1 、Path point P i+2 The description of the first vector a, the second vector b and the angle β1 of the first vector is detailed in the above embodiment, and will not be repeated here in this embodiment.
[0106] The third vector f=(P i ,P i+2 ), the second vector angle β3 refers to the angle between the first vector a and the third vector f.
[0107] For example, when the first vector angle β1 is greater than the angle threshold, it means that at the next path point P i+1 Is a path point with a sudden change in curvature or a turning path point to be smoothed. Further, it is determined whether the second vector angle β3 is greater than the angle threshold to determine whether the path point P is the next one. i+1 If the second vector angle β3 is not less than the angle threshold, that is, greater than or equal to the angle threshold, it means that at the subsequent path point P i+1 is a turning path point to be smoothed, and the following path point P i+1 Perform path smoothing.
[0108] I understand. Figure 2A β2 in is less than the angle threshold, Figure 2B β3 in is greater than or equal to the angle threshold, so β2 is less than β3.
[0109] It should be noted that Figure 2B The adjacent subsequent path point P in i+2 and the next path point P i+1 The relative position relationship is only used as an example for illustration and is not limited in this embodiment. In the above embodiment, the curvature mutation at the subsequent path point is determined by calculating the vector angle twice and comparing the vector angle with the angle threshold, which has higher accuracy.
[0110] In another embodiment, if the angle of the first vector is not greater than the angle threshold, it indicates that no sudden change in curvature occurs at the subsequent path point, and there is no need to perform path curve smoothing processing on the subsequent path point.
[0111] In one embodiment, path curve smoothing is performed on a turning path point to be smoothed, including: determining a smooth path curve corresponding to the turning path point to be smoothed based on the turning path point to be smoothed, a previous path point adjacent to the turning path point to be smoothed, and a turning radius of the robot.
[0112] The path curve smoothing process refers to smoothing the path curve at the turning path point to be smoothed. Specifically, assuming that the subsequent path point is a turning path point to be smoothed, the subsequent path point and the current path point are connected by a curve.
[0113] In one embodiment, a Dubins curve is used to connect the subsequent path point and the current path point. The Dubins curve is the shortest path connecting two two-dimensional planes under the conditions of satisfying curvature constraints and specified tangent lines (entry directions) at the start and end points, and restricting the target to only move forward.
[0114] In the above embodiment, by smoothing the path curve at the turning path point, the turning frequency of the robot at the turning path point is greatly reduced, so that the execution efficiency of the robot is higher.
[0115] In one embodiment, a computer device preprocesses a set of path points to obtain a target set of path points. Based on the sudden change in curvature of the path points in the target set of path points, the computer device identifies a turning path point to be smoothed from the target set of path points and determines the preceding path point adjacent to the turning path point to be smoothed as the first preceding path point; the preceding path point adjacent to the first preceding path point is the second preceding path point. The computer device then determines a fourth vector based on the direction vector formed by the second preceding path point and the first preceding path point. The computer device determines a fifth vector based on the direction vector formed by the turning path point to be smoothed and the path point immediately following the turning path point to be smoothed. The computer device then uses the direction indicated by the fourth vector as the initial pose orientation of the Dubins curve, the direction indicated by the fifth vector as the target pose orientation of the Dubins curve, and the turning radius of the robot as the curvature of the Dubins curve. The first preceding path point and the turning path point to be smoothed are connected using the Dubins curve to obtain a smoothed path curve corresponding to the turning path point to be smoothed. In one embodiment, the turning radius of the robot refers to the robot's minimum turning radius. It can be understood that different types of robots have different minimum turning radiuses, that is, the turning radius of a robot is related to the type of robot.
[0116] In one embodiment, Figure 3 As shown, a schematic diagram of path curve smoothing for a turning path point to be smoothed is provided.
[0117] P1 is the preceding pathpoint adjacent to the turning pathpoint to be smoothed, P2, i.e., the first preceding pathpoint; P0 is the preceding pathpoint adjacent to the first preceding pathpoint P1, i.e., the second preceding pathpoint; and P3 is the subsequent pathpoint of the turning pathpoint to be smoothed, P2. The computer device determines a fourth vector d = (P0, P1) based on the direction vector formed by the second preceding pathpoint P0 and the first preceding pathpoint P1. A fifth vector e = (P2, P3) is determined based on the direction vector formed by the turning pathpoint to be smoothed, P2, and the subsequent pathpoint P3. The direction indicated by the fourth vector d is used as the initial pose orientation of the Dubins curve, the direction indicated by the fifth vector e is used as the target pose orientation of the Dubins curve, and the robot's minimum turning radius is used as the curvature of the Dubins curve. The first preceding pathpoint P1 and the turning path to be smoothed, P2, are connected using the Dubins curve to obtain the smoothed path curve corresponding to the turning pathpoint to be smoothed, P2.
[0118] In the above embodiment, the Dubins curve is used to connect the path curve at the turning point, so as to avoid the robot from turning in place at the turning point, thereby improving the execution efficiency of the robot.
[0119] In another embodiment, Figure 4 As shown, a flow chart of a teaching path processing method is provided, and the method is illustrated by applying it to a computer device. Specifically, the following steps are included:
[0120] Step 401: Obtain a set of path points generated during the robot teaching process.
[0121] Step 402: sequentially determine the distance difference between the current path point and the next path point in the path point set.
[0122] Step 404: Determine whether the distance difference is greater than a distance threshold. If so, execute step 404; otherwise, execute step 405.
[0123] Step 404: Delete the current path point, and use the path point set after deleting the current path point as the preliminary path point set.
[0124] Step 405: Save the current path point.
[0125] Step 406: Perform uniform interpolation processing on the preliminary path point set to obtain the target path point set.
[0126] Step 407: determine the current path point from the target path point set in sequence, determine the previous path points and the next path points adjacent to the current path point, and ensure that neither the current path point nor the previous path point has a sudden change in curvature.
[0127] Step 408: Determine a first vector angle between a first vector and a second vector, where the first vector is a direction vector formed by a previous path point and a current path point, and the second vector is a direction vector formed by the current path point and a subsequent path point.
[0128] Step 409: Determine whether the first vector angle is greater than the angle threshold. If so, proceed to step 410; otherwise, proceed to step 411.
[0129] Step 410: Determine the angle between the third vector and the second vector of the first vector, where the third vector is a direction vector formed by the current path point and the adjacent subsequent path point; the adjacent subsequent path point is the adjacent path point after the subsequent path point of the current path point.
[0130] Step 411: Determine whether the subsequent path point is a turning path point that is not to be smoothed.
[0131] It can be understood that the subsequent path point is a turning path point that is not to be smoothed, which means that there is no need to perform path curve smoothing processing on the subsequent path point.
[0132] Step 412: Determine whether the angle between the second vector and the second vector is greater than the angle threshold. If so, proceed to step 413; otherwise, proceed to step 414.
[0133] Step 413: Determine that the subsequent path point is a turning path point to be smoothed.
[0134] Step 414: Delete the subsequent path points.
[0135] Step 415: Determine a fourth vector based on the direction vector formed by the second preceding path point and the first preceding path point; determine a fifth vector based on the direction vector formed by the turning path point to be smoothed and the path point following the turning path point to be smoothed.
[0136] The previous path point adjacent to the turning path point to be smoothed is the first previous path point, and the previous path point adjacent to the first previous path point is the second previous path point.
[0137] Step 416: By taking the direction indicated by the fourth vector as the initial posture orientation of the Dubins curve, the direction indicated by the fifth vector as the target posture orientation of the Dubins curve, and the turning radius of the robot as the curvature of the Dubins curve, the first prior path point and the turning path point to be smoothed are connected using the Dubins curve to obtain a smooth path curve corresponding to the turning path point to be smoothed.
[0138] Step 417: Smoothing the path curve of the smooth turning path point to obtain the initial teaching path, and then determining the collision path point in the initial teaching path; the collision path point is the path point where the positioning jump occurs; and translating the collision path point to obtain a collision-free target teaching path.
[0139] In the above method embodiment, a set of path points generated during the robot teaching process is obtained; the path point set is preprocessed to obtain a target path point set; turning path points to be smoothed are identified from the target path point set based on sudden changes in curvature of the path points in the target path point set; and path curve smoothing is performed on the turning path points to be smoothed. Before generating the teaching path, abnormal data points in the path point set are deleted and path curve smoothing is performed on the turning path points to be smoothed. This ensures that the generated teaching path is not only smooth but also satisfies kinematic constraints, thereby improving the robot's execution efficiency during the navigation process.
[0140] It should be understood that, although the steps in the flowcharts of the above embodiments are shown in sequence as indicated by the arrows, these steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily to be performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0141] Based on the same inventive concept, the present application also provides a teaching path processing device for implementing the teaching path processing method mentioned above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more teaching path processing device embodiments provided below can be found in the above-mentioned limitations of the teaching path processing method and will not be repeated here.
[0142] In one embodiment, Figure 5A As shown, a teaching path processing device is provided, including: an acquisition module 501, a pre-processing module 502, a recognition module 503 and a smoothing processing module 504, wherein:
[0143] The acquisition module 501 is used to acquire the path point set generated during the robot teaching process.
[0144] The pre-processing module 502 is used to pre-process the path point set to obtain a target path point set.
[0145] The identification module 503 is used to identify the turning path points to be smoothed from the target path point set according to the sudden change of curvature of the path points in the target path point set.
[0146] The smoothing processing module 504 is used to perform path curve smoothing processing on the turning path points to be smoothed.
[0147] In one embodiment, the preprocessing module 502 is also used to determine the distance difference between the current path point and the next path point in the path point set in sequence; if the distance difference is greater than the distance threshold, the current path point is deleted, and the path point set after the current path point is deleted is used as the preliminary path point set; the preliminary path point set is interpolated to obtain the target path point set.
[0148] In another embodiment, the preprocessing module 502 is also used to obtain an initial teaching path after smoothing the path curve of the smooth turning path point; determine the collision path point in the initial teaching path; the collision path point is the path point of the positioning jump; and translate the collision path point to obtain a collision-free target teaching path.
[0149] In one embodiment, Figure 5B As shown, the identification module 503 includes:
[0150] A first determining unit 503a is configured to sequentially determine a current path point from the target path point set, and determine a previous path point and a subsequent path point adjacent to the current path point, wherein neither the current path point nor the previous path point has a sudden change in curvature;
[0151] A second determining unit 503b is configured to determine a first vector angle between a first vector and a second vector, wherein the first vector is a direction vector formed by a previous path point and a current path point, and the second vector is a direction vector formed by the current path point and a subsequent path point;
[0152] The identification unit 503c is used to verify whether the subsequent path point is a turning path point to be smoothed based on the first vector angle.
[0153] In one embodiment, the identification module 503 is specifically used to determine the second vector angle between the third vector and the first vector if the first vector angle is greater than the angle threshold, where the third vector is a direction vector composed of the current path point and the adjacent subsequent path point; the adjacent subsequent path point is the adjacent path point after the subsequent path point of the current path point; if the second vector angle is not less than the angle threshold, the subsequent path point is determined to be a turning path point to be smoothed.
[0154] In one embodiment, the smoothing processing module 504 is configured to determine a smooth path curve corresponding to the turning path point to be smoothed according to the turning path point to be smoothed, a previous path point adjacent to the turning path point to be smoothed, and a turning radius of the robot.
[0155] In one embodiment, the previous path point adjacent to the turning path point to be smoothed is the first previous path point; the previous path point adjacent to the first previous path point is the second previous path point; the smoothing processing module 504 is specifically used to determine the fourth vector based on the direction vector composed of the second previous path point and the first previous path point; determine the fifth vector based on the direction vector composed of the turning path point to be smoothed and the subsequent path point of the turning path point to be smoothed; by taking the direction indicated by the fourth vector as the initial posture orientation of the Dubins curve, the direction indicated by the fifth vector as the target posture orientation of the Dubins curve, and the turning radius of the robot as the curvature of the Dubins curve, the first previous path point and the turning path point to be smoothed are connected by the Dubins curve to obtain a smooth path curve corresponding to the turning path point to be smoothed.
[0156] Each module in the teaching path processing device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0157] In one embodiment, a computer device is provided. The computer device may be a server or a robot, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, and a communication interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, it implements a teaching path processing method.
[0158] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0159] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0160] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0161] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0162] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0163] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0164] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A teaching path processing method, characterized in that: The method comprises: Get the set of path points generated during the robot teaching process; Preprocessing the path point set to obtain a target path point set; Identifying a turning path point to be smoothed from the target path point set based on a sudden change in curvature of a path point in the target path point set, including: sequentially determining a current path point from the target path point set, and determining a preceding path point and a succeeding path point adjacent to the current path point, wherein neither the current path point nor the preceding path point has a sudden change in curvature; Determining a first vector angle between a first vector and a second vector, wherein the first vector is a direction vector formed by the previous path point and the current path point, and the second vector is a direction vector formed by the current path point and the subsequent path point; If the first vector angle is greater than the angle threshold, determining a second vector angle between a third vector and the first vector, where the third vector is a direction vector formed by the current path point and an adjacent subsequent path point; the adjacent subsequent path point is an adjacent path point subsequent to the current path point; If the included angle of the second vector is not less than the included angle threshold, determining that the subsequent path point is a turning path point to be smoothed; Perform path curve smoothing processing on the turning path point to be smoothed.
2. The method according to claim 1, characterized in that The preprocessing of the path point set to obtain a target path point set includes: sequentially determining a distance difference between a current path point and a subsequent path point in the path point set; If the distance difference is greater than the distance threshold, the current path point is deleted, and the path point set after the current path point is deleted is used as the preliminary path point set; Interpolation processing is performed on the preliminary path point set to obtain the target path point set.
3. The method according to claim 1, characterized in that After performing path curve smoothing processing on the turning path point to be smoothed, an initial teaching path is obtained; after performing path curve smoothing processing on the turning path point to be smoothed, the method further includes: Determining a collision path point in the initial teaching path; the collision path point is a path point where positioning jumps; The collision path points are translated to obtain a collision-free target teaching path.
4. The method according to any one of claims 1 to 3, characterized in that The performing path curve smoothing processing on the turning path point to be smoothed includes: A smooth path curve corresponding to the turning path point to be smoothed is determined according to the turning path point to be smoothed, a previous path point adjacent to the turning path point to be smoothed, and a turning radius of the robot.
5. The method according to claim 4, characterized in that The previous path point adjacent to the turning path point to be smoothed is a first previous path point; the previous path point adjacent to the first previous path point is a second previous path point; and determining a smooth path curve corresponding to the turning path point to be smoothed based on the turning path point to be smoothed, the previous path point adjacent to the turning path point to be smoothed, and the turning radius of the robot includes: determining a fourth vector based on a direction vector formed by the second previous path point and the first previous path point; determining a fifth vector according to a direction vector formed by the turning path point to be smoothed and a path point following the turning path point to be smoothed; By taking the direction indicated by the fourth vector as the initial posture orientation of the Dubins curve, the direction indicated by the fifth vector as the target posture orientation of the Dubins curve, and the turning radius of the robot as the curvature of the Dubins curve, the first prior path point and the turning path point to be smoothed are connected using the Dubins curve to obtain a smooth path curve corresponding to the turning path point to be smoothed.
6. A teaching path processing device, characterized in that: The device comprises: The acquisition module is used to obtain the path point set generated during the robot teaching process; A preprocessing module, configured to preprocess the path point set to obtain a target path point set; an identification module, configured to identify, from the target path point set, a turning path point to be smoothed based on a sudden change in curvature of the path points in the target path point set, comprising: sequentially determining a current path point from the target path point set, and determining a preceding path point and a succeeding path point adjacent to the current path point, wherein neither the current path point nor the preceding path point has a sudden change in curvature; Determining a first vector angle between a first vector and a second vector, wherein the first vector is a direction vector formed by the previous path point and the current path point, and the second vector is a direction vector formed by the current path point and the subsequent path point; If the first vector angle is greater than the angle threshold, determining a second vector angle between a third vector and the first vector, where the third vector is a direction vector formed by the current path point and an adjacent subsequent path point; the adjacent subsequent path point is an adjacent path point subsequent to the current path point; If the included angle of the second vector is not less than the included angle threshold, determining that the subsequent path point is a turning path point to be smoothed; The smoothing processing module is used to perform path curve smoothing processing on the turning path point to be smoothed.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Planning method for robot teaching path
CN107728619A
Route planning method and device, computer equipment and storage medium
CN110045730A