Method for determining smooth inflection point in point-to-point trajectory, industrial robot and storage device
By using dichotomy to determine the smooth inflection point in industrial robot point-to-point trajectory, the problem of the inability to determine the smooth inflection point through distance constraints in the prior art is solved, and the motion fluency and efficiency are improved.
Patent Information
- Application Number
- CN202510669290.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-01
AI Technical Summary
The prior art cannot determine the smooth inflection point in the point-to-point trajectory of industrial robots through a given distance constraint, resulting in irregular trajectory formation, affecting motion fluency and efficiency.
The smooth inflection point is selected in the trajectory of the to-determined inflection point, and the smooth inflection point is determined by responding that the error between the Cartesian spatial distance and the smooth distance between the to-determined inflection point and the transition path point is within the preset range.
It realizes the accurate determination of the smooth inflection point through a given smooth distance constraint, which improves the motion fluency and operation efficiency of industrial robots.
Smart Images

Figure CN120395859A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of machine vision, and in particular to a shape matching method, a computer device, and a storage device. Background Art
[0002] In the point-to-point trajectory (Point to point movements, also known as PTP trajectory or joint space path movement) planning of industrial robots, in order to make the movement of the robot smoother, a smooth transition trajectory is added between adjacent taught trajectories, and this smooth transition segment trajectory is simply referred to as a smooth trajectory. When forming the smooth trajectory, it is necessary to first determine the smooth inflection points between the smooth trajectory and the taught trajectory. Generally, first, an operator selects a transition path point from the taught points, and this transition path point is a point that the industrial robot does not need to pass through as specified by the operator; then the industrial robot takes the taught trajectory connected to the transition path point as the pending inflection point trajectory, and selects a point in the pending inflection point trajectory as the smooth inflection point.
[0003] Since in the point-to-point trajectory, when the end of the axis of the industrial robot moves from the starting position to the ending position, the trajectory formed by the end of the axis in the Cartesian space is an irregular curve, for a given distance constraint relative to the over-path point, an analytical solution for finding the smooth inflection point that satisfies this distance constraint cannot be found in the point-to-point trajectory. Therefore, when forming the smooth trajectory, the industrial robot generally selects the smooth inflection point through a proportional parameter specified by the operator. Usually, this proportional parameter is associated with a point in the pending inflection point trajectory, and the ratio of the length of the trajectory between this point and the starting point of the pending inflection point trajectory to the length of the pending inflection point trajectory is equal to this proportional parameter. The industrial robot selects the point associated with this proportional parameter in the pending inflection point trajectory as the smooth inflection point.
[0004] Therefore, the prior art cannot determine the smooth inflection point through a given distance constraint. Summary of the Invention
[0005] In view of this, to solve the above technical problems, the present application provides a method for determining a smooth inflection point in a point-to-point trajectory, an industrial robot, and a storage device.
[0006] To achieve the above object, the present application provides a method for determining a smooth inflection point in a point-to-point trajectory. The point-to-point trajectory at least includes multiple taught trajectories sequentially connected by a plurality of preset taught points. The method includes:
[0007] Selecting a transition path point from the multiple taught points;
[0008] Selecting the taught trajectory connected to the transition path point from the multiple taught trajectories as the pending inflection point trajectory;
[0009] Selecting a pending inflection point in the pending inflection point trajectory by the bisection method;
[0010] In response to the error between the Cartesian space distance and the smooth distance between the to-be-determined inflection point and the transition path point being within a preset error range, the to-be-determined inflection point is used as the smooth inflection point.
[0011] To solve the above technical problems, another technical solution adopted by this application is to provide an industrial robot, which includes a memory and a processor. Among them, the memory stores program data; the program data can be executed by the processor to implement the method of any one of the above.
[0012] To solve the above technical problems, another technical solution adopted by this application is to provide a storage device, which stores program data, and the program data can be executed by the processor to implement the method of any one of the above.
[0013] Beneficial effects: Different from the prior art, this application selects the to-be-determined inflection point in the to-be-determined inflection point trajectory by the dichotomy method; in response to the error between the Cartesian space distance and the smooth distance between the to-be-determined inflection point and the transition path point being within a preset error range, the to-be-determined inflection point is used as the smooth inflection point, realizing the determination of the smooth inflection point through the given smooth distance constraint. Description of the Drawings
[0014] Figure 1 It is a point-to-point trajectory schematic diagram of the first embodiment of the method for determining the smooth inflection point of the point-to-point trajectory of this application;
[0015] Figure 2 It is a flowchart of the first embodiment of the method for determining the smooth inflection point of the point-to-point trajectory of this application;
[0016] Figure 3 It is a flowchart of steps S130 and S140 in the first embodiment of the method for determining the smooth inflection point of the point-to-point trajectory of this application;
[0017] Figure 4 It is a point-to-point trajectory schematic diagram of the second embodiment of the method for determining the smooth inflection point of the point-to-point trajectory of this application;
[0018] Figure 5 It is a flowchart of the second embodiment of the method for determining the smooth inflection point of the point-to-point trajectory of this application;
[0019] Figure 6 It is a flowchart of steps S241 and S251 in the second embodiment of the method for determining the smooth inflection point of the point-to-point trajectory of this application;
[0020] Figure 7 It is a flowchart of steps S242 and S252 in the second embodiment of the method for determining the smooth inflection point of the point-to-point trajectory of this application;
[0021] Figure 8 It is a schematic flowchart of step S230 in the second embodiment of the method for determining smooth inflection points of the point-to-point trajectory in this application;
[0022] Figure 9 It is a schematic structural diagram of an industrial robot embodiment in this application;
[0023] Figure 10 It is a schematic structural diagram of a storage device embodiment in this application. Specific Embodiment
[0024] To enable those skilled in the art to better understand the technical solutions of this application, the following further describes this application in detail with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of this application.
[0025] Please refer to Figure 1 , Figure 1 It is a point-to-point trajectory schematic diagram of the first embodiment of the method for determining smooth inflection points of the point-to-point trajectory in this application.
[0026] As Figure 1 shown, the point-to-point trajectory at least includes multiple teaching points A preset in sequence to form multiple teaching trajectories connected in sequence. Each teaching trajectory may include a straight-line trajectory, an arc trajectory, or a spline curve trajectory. Of course, each teaching trajectory may also include other types of trajectories.
[0027] The teaching points A can be specified by the operator, and the end of the axis of the industrial robot needs to pass through the teaching points A in sequence. Taking Figure 1 as an example for illustration, five teaching points A are exemplarily given in Figure 1 as the first teaching point A1, the second teaching point A2, the third teaching point A3, the fourth teaching point A4, and the fifth teaching point A5 in sequence. The five teaching points A are connected in sequence to form four teaching trajectories, namely the first teaching trajectory A1A2, the second teaching trajectory A2A3, the third teaching trajectory A3A4, and the fourth teaching trajectory A4A5. Of course, the number of teaching points A in this embodiment is not limited. In another embodiment, the number of teaching points A can also be 3, 4, 10, 100, 400, 500, etc., as long as the number of teaching points A can satisfy that multiple teaching points A can be connected in sequence to form at least two teaching trajectories. When the industrial robot is working, the end of the axis of the industrial robot will pass through the first teaching point A1, the second teaching point A2, the third teaching point A3, the fourth teaching point A4, and the fifth teaching point A5 along multiple teaching trajectories in sequence.
[0028] However, when passing through the teaching point A, there will be a pause at the end of the axis of the industrial robot. Therefore, when there are many teaching points A, it will consume more time and reduce the overall operation efficiency. Usually, a smooth trajectory L1 with a smooth transition is set between the teaching trajectories to improve the running smoothness of the end of the axis of the industrial robot, thereby improving the running rhythm of the end of the axis of the industrial robot. When forming the smooth trajectory L1, it is necessary to first determine the smooth inflection point between the smooth trajectory L1 and the teaching trajectory.
[0029] Refer to Figure 2 , Figure 2 which is a schematic flow chart of the first embodiment of the method for determining the smooth inflection point of the point-to-point trajectory of the present application.
[0030] As Figure 2 shown, in this embodiment, the method for determining the smooth inflection point of the point-to-point trajectory may include the following steps:
[0031] Step S110: Select a transition path point from multiple teaching points.
[0032] Taking Figure 1 as an example for illustration, as Figure 1 shown, when smooth transition is required between the teaching trajectories, the operator can select the teaching point A as the transition path point B from multiple teaching points A. As Figure 1 shown, when smooth transition is required between the second teaching trajectory A2A3 and the third teaching trajectory A3A4, the third teaching point A3 can be selected as the transition path point B. Of course, in another embodiment, other teaching points A can also be selected as the transition path point B according to the difference of the teaching trajectories that need to be smoothly transitioned. For example, when smooth transition is required between the first teaching trajectory A1A2 and the second teaching trajectory A2A3, the second teaching point A2 can be selected as the transition path point B; for example, when smooth transition is required between the third teaching trajectory A3A4 and the fourth teaching trajectory A4A5, the fourth teaching point A4 can be selected as the transition path point B. In the present application, the third teaching point A3 is taken as the transition path point B for illustration.
[0033] Step S120: Select the teaching trajectory connected to the transition path point from multiple teaching trajectories as the pending inflection point trajectory.
[0034] Taking Figure 1 as an example for illustration, as Figure 1 shown, the point-to-point trajectory includes multiple teaching trajectories formed by sequentially connecting the teaching points A. After determining the transition path point B, the teaching trajectory connected to the transition path point B can be selected from the multiple teaching trajectories as the pending inflection point trajectory L2 for later finding the smooth inflection point C in the pending inflection point trajectory L2. In Figure 1In the multi-segment teaching trajectory shown, the second teaching trajectory A2A3 can be used as the pending inflection point trajectory L2, or the third teaching trajectory A3A4 can be used as the pending inflection point trajectory L2.
[0035] Step S130: Select a pending inflection point in the pending inflection point trajectory by the bisection method.
[0036] Step S140: In response to the error between the Cartesian space distance and the smoothing distance between the pending inflection point and the transition path point being within a preset error range, use the pending inflection point as the smoothing inflection point.
[0037] For the sake of easy understanding, steps S130 and S140 are described together here.
[0038] Take Figure 1 as an example for illustration. As Figure 1 shown, the Cartesian space distance in this application refers to the straight-line distance between two points in the Cartesian space. Denote the smoothing distance as S. The inventor of this application found that in the point-to-point trajectory, after a given smoothing distance S is given, although the position of the smoothing inflection point C cannot be directly calculated, if a point in the pending inflection point trajectory L2 is given, the Cartesian space distance from this point to the transition path point B can be obtained. For example, using the joint space coordinates of this point, the Cartesian space coordinates of this point can be calculated through forward kinematics; thus, a point can be selected as the pending inflection point F in the pending inflection point trajectory L2 by the bisection method, and the Cartesian space coordinates of the pending inflection point F and the transition path point B can be obtained respectively; then, the Cartesian space distance FB between the pending inflection point and the transition path point B is calculated using the Cartesian space coordinates. By responding to the error between the Cartesian space distance FB between the pending inflection point F and the transition path point B and the smoothing distance S being within a preset error range, use the pending inflection point F as the smoothing inflection point C.
[0039] The beneficial effect of this embodiment is: select the pending inflection point F in the pending inflection point trajectory L2 by the bisection method; in response to the error between the Cartesian space distance FB between the pending inflection point F and the transition path point B and the smoothing distance S being within a preset error range, use the pending inflection point F as the smoothing inflection point C. Thus, the determination of the smoothing inflection point is realized through the given smoothing distance S constraint.
[0040] Further, before step S130, it includes:
[0041] Obtain the preset value of the smoothing distance S;
[0042] Obtain the Cartesian space distance between the midpoint of the pending inflection point trajectory L2 and the transition path point B as the comparison distance;
[0043] Select the minimum value from the preset value and the comparison distance as the smoothing distance S.
[0044] by Figure 1 Take this as an example to illustrate, Figure 1 As shown, the preset value of the smooth distance S can be a value set in advance by the user to constrain the Cartesian space distance between the smooth inflection point C to be determined and the transition path point B. Since the undetermined inflection point trajectory L2 may also need to smoothly transition with the teaching trajectory of other segments. For example, Figure 1 As shown, when the undetermined inflection point trajectory L2 is the second teaching trajectory A2A3, the second teaching trajectory A2A3 may also need to smoothly transition with the first teaching trajectory A1A2. In order to avoid the smooth transition between the undetermined inflection point trajectory L2 and the teaching trajectory of other segments, the smooth trajectory formed by the smooth transition is Figure 1 , intersecting the smooth trajectory L1 shown in , thus creating a contradiction. The midpoint of the pending inflection point trajectory L2 can be used as the dividing point to divide the pending inflection point trajectory L2 into a half-segment of the pending inflection point trajectory L2 connected to the transition path point B and a half-segment of the pending inflection point trajectory L2 not connected to the transition path point B. By taking the Cartesian distance between the midpoint of the pending inflection point trajectory L2 and the transition path point B as the comparison distance, and selecting the minimum value between the preset value and the comparison distance as the smoothing distance S, the smoothed inflection point C to be determined is constrained to be within the half-segment of the pending inflection point trajectory L2 connected to the transition path point B.
[0045] Further, refer to Figure 1 and Figure 3 , Figure 3 1 is a flow chart of steps S130 and S140 in the first embodiment of the method for determining smooth inflection points in a point-to-point trajectory of the present application. Here, steps S130 and S140 in the first embodiment of the method for determining smooth inflection points in a point-to-point trajectory are further explained.
[0046] See Figure 1 Specifically, each point in each teaching trajectory in the point-to-point trajectory is associated with an association ratio, and the association ratio is the ratio of the length of the trajectory between the point associated with the association ratio in the teaching trajectory and the starting point of the teaching trajectory to the length of the teaching trajectory. Take the second teaching trajectory A2A3 as an example, that is, each point in the second teaching trajectory A2A3 is associated with an association ratio. Among them, the starting point of the second teaching trajectory A2A3, that is, the second teaching point A2, is associated with an association ratio of 0, and the end point of the second teaching trajectory A2A3, that is, the third teaching point A3, is associated with an association ratio of 1. In each teaching trajectory in the point-to-point trajectory, the joint space coordinates of the point associated with the association ratio can be calculated by using the association ratio of a point in the teaching trajectory, the joint space coordinates of the starting point of the teaching trajectory, and the joint space coordinates of the end point of the teaching trajectory. Then, the Cartesian space coordinates of the point can be obtained from the joint space coordinates of the point through forward kinematics.
[0047] Therefore, each point on the pending inflection point trajectory L2 in this embodiment is also correspondingly associated with an associated ratio.
[0048] As Figure 3 shown, in this embodiment, step S130 in the first embodiment of the method for determining a smooth inflection point from a point-to-point trajectory may include steps S131 to S137. Step S140 may include steps S141 to S142.
[0049] Step S131: Set the initial value of the point-taking ratio and the initial value of the point-taking step size.
[0050] Take Figure 1 as an example for illustration. Refer to Figure 1 As Figure 1 shown, since each point on the pending inflection point trajectory L2 is correspondingly associated with an associated ratio, and the point-taking ratio, as a ratio, can be equal to an associated ratio, thus a point associated with the point-taking ratio can be obtained from the pending inflection point trajectory L2 through the point-taking ratio as the pending inflection point F. In this embodiment, denote the point-taking ratio as u, and denote the pending inflection point F associated with the point-taking ratio u on the pending inflection point trajectory L2 as F u , and denote the point-taking step size as step. The point-taking step size step is used to limit the deviation between the point-taking ratios u for selecting the pending inflection point F u in two adjacent point-taking operations. And the absolute value of the point-taking step size step can be used as a measure of the size of the search range for finding the smooth inflection point C in this embodiment. The trajectory segment of the pending inflection point trajectory L2 where there is a smooth inflection point C is called the inflection point interval. The inflection point interval can be obtained according to the smooth distance S. For example, the inflection point interval can be the pending inflection point trajectory L2; in addition, when the Cartesian space distance between the end point of the pending inflection point trajectory L2 and the transition path point is greater than or equal to the smooth distance S, the inflection point interval can be a half-segment of the pending inflection point trajectory L2 connected to the transition path point B. The initial value of the point-taking ratio u and the initial value of the point-taking step size step can be set according to the inflection point interval, so that the search range for finding the smooth inflection point C in this embodiment is the inflection point interval. For example, the associated ratio associated with the end point or the midpoint of the inflection point interval can be used as the point-taking ratio u to complete the setting of the initial value of the point-taking ratio u, and the maximum value of the absolute value of the difference between the associated ratio associated with the point in the inflection point interval and the initial value of the point-taking ratio u is used as the point-taking step size step, and a positive value is assigned to the point-taking step size step in response to the transition path point B being located at the end point of the pending inflection point trajectory L2, and a negative value is assigned to the point-taking step size step in response to the filtering path point B being located at the starting point of the pending inflection point trajectory L2, to complete the setting of the initial value of the point-taking step size step. Thus, the initial search range for finding the smooth inflection point C in this embodiment is the inflection point interval. The end points of the inflection point interval include the left end point and the right end point, where the left end point is the starting point of the inflection point interval, and the right end point is the end point of the inflection point interval.
[0051] Step S132: Selecting a point associated with the point ratio in the pending inflection point trajectory as the pending inflection point.
[0052] In this step, the point associated with the point ratio u is selected in the undetermined inflection point trajectory L2 as the undetermined inflection point F u .
[0053] Step S133: Reassign the point picking step length so that the point picking step length after reassignment is half of the point picking step length before reassignment.
[0054] In this embodiment, the step length of the point is reassigned, and the reassignment equation (1) is as follows:
[0055]
[0056] The step on the right side of the re-assignment equation (1) represents the step length of the point selection before the re-assignment, and the step on the left side of the re-assignment equation (1) represents the step length of the point selection after the re-assignment.
[0057] Step S134: Determine whether the Cartesian space distance between the undetermined inflection point and the transition path point is greater than the smoothing distance.
[0058] by Figure 1 Take this as an example to illustrate, Figure 1 As shown, in this step, when the inflection point F u The Cartesian distance F between the transition path point B and the transition path point B u When B is greater than the smoothing distance S, it means that the smoothing inflection point C to be determined is located at the undetermined inflection point F in the undetermined inflection point trajectory L2. u Towards the side of transition path point B; when the undetermined turning point F u The Cartesian distance F between the transition path point B and the transition path point B u When B is less than the smoothing distance S, it means that the smoothing inflection point C to be determined is located at the undetermined inflection point F in the undetermined inflection point trajectory L2. u On the side away from transition path point B. Thus, after the second pass through this step, each pass through this step further narrows the search range for the smooth inflection point C, and the size of the search range after each narrowing is half of the size of the search range before narrowing. Assuming that before the second pass through this step, the search range for the smooth inflection point C is the entire pending inflection point trajectory L2, then after the second pass through this step, the search range for the smooth inflection point C will be further narrowed to half of the pending inflection point trajectory L2.
[0059] In this embodiment, when the undetermined inflection point F u The Cartesian distance F between the transition path point B and the transition path point B uWhen B is greater than the smoothing distance S, the process jumps to step S136, that is, in response to the undetermined inflection point F u The Cartesian distance F between the transition path point B and the transition path point B u B is greater than the smoothing distance S; when the undetermined inflection point F u The Cartesian distance F between the transition path point B and the transition path point B u When B is less than the smoothing distance S, the process jumps to step S135, that is, in response to the undetermined inflection point F u The Cartesian distance F between the transition path point B and the transition path point B u B is less than the smoothing distance S.
[0060] Step S135: reassign the point ratio so that the reassigned point ratio is the difference between the point ratio before reassignment and the point step after reassignment.
[0061] In this embodiment, the point ratio u is reassigned, and the reassignment equation (2) is as follows:
[0062] u=u-step··················(2)
[0063] The u on the right side of the re-assignment equation (2) represents the point ratio u before re-assignment, and the u on the left side of the re-assignment equation (2) represents the point ratio u after re-assignment. In this step, since the smooth inflection point C to be determined is located at the undetermined inflection point F in the undetermined inflection point trajectory L2, u The side away from the transition path point B. Therefore, the point ratio u after reassignment is made the difference between the point ratio u before reassignment and the point step step after reassignment, so that the undetermined inflection point Fu associated with the point ratio u after reassignment in the undetermined inflection point trajectory L2 is relative to the undetermined inflection point F associated with the point ratio u before reassignment in the undetermined inflection point trajectory L2. u , moving closer to the side where the smooth inflection point C is located.
[0064] Step S136: reassign the point ratio u so that the reassigned point ratio u is the sum of the point ratio u before reassignment and the reassigned point step step.
[0065] In this embodiment, the point ratio u is reassigned, and the reassignment equation (3) is as follows:
[0066] u=u+step···················(3)
[0067] Among them, the u on the right side of the re-assigned equation (3) represents the sampling ratio u before re-assignment, and the u on the left side of the re-assigned equation (3) represents the sampling ratio u after re-assignment. In this step, since the smooth inflection point C to be determined is located on one side of the pending inflection point F in the pending inflection point trajectory L2 u on the side towards the transition path point B. Therefore, the sampling ratio u after re-assignment is set to the sum of the sampling ratio u before re-assignment and the sampling step step after re-assignment, so that the sampling ratio u after re-assignment is such that the pending inflection point F associated with it in the pending inflection point trajectory L2 u is closer to the side where the smooth inflection point C is located compared to the pending inflection point F associated with the sampling ratio u before re-assignment in the pending inflection point trajectory L2 u .
[0068] Step S137: Re-select the pending inflection point, taking the point associated with the sampling ratio after re-assignment in the pending inflection point trajectory as the re-selected pending inflection point, and jump to step S133.
[0069] In this step, by taking the point associated with the sampling ratio u after re-assignment in the pending inflection point trajectory L2 as the re-selected pending inflection point F u , the re-selected pending inflection point F u is closer to the side where the smooth inflection point C is located compared to the pending inflection point F before re-selection u . And the re-selected pending inflection point F u divides the search range for the smooth inflection point C in the pending inflection point trajectory L2 into two halves. Among them, one half of the search range is on the side of the pending inflection point Fu towards the transition path point B, and the other half of the search range is on the side of the pending inflection point F u away from the transition path point B.
[0070] After completing the re-selection of the pending inflection point F u in this step, it then jumps to step S133.
[0071] In this way, in this embodiment, by repeatedly executing the above steps S133 to S137, the search range for the smooth inflection point C in the pending inflection point trajectory L2 can be continuously narrowed.
[0072] Step S141: Determine whether the error between the Cartesian space distance and the smooth distance between the pending inflection point and the transition path point is within a preset error range.
[0073] For illustration purposes, as Figure 1 shown, in this step, for each selected pending inflection point F Figure 1 . It is necessary to determine the pending inflection point F u . uThe Cartesian space distance F between the transition path point B u Whether the error between B and the smoothing distance S is within a preset error range. This step can be located between step S133 and step S134, or can be located immediately before step S137. Of course, this step can also be located at other positions, which are not listed one by one here. In this embodiment, this step is located between step S134 and step S133 as an example for illustration. In this step, the pending inflection point F u associated sampling ratio u, the joint space coordinates of the starting point of the pending inflection point trajectory L2, and the joint space coordinates of the ending point of the pending inflection point trajectory L2 can be combined to calculate the pending inflection point F u of the joint space coordinates. Then, using forward kinematics, the Cartesian space coordinates of the pending inflection point F u can be obtained through the joint space coordinates of the pending inflection point F u . The Cartesian space coordinates of the pending inflection point F u and the transition path point B can be used to calculate the Cartesian space distance F u between the pending inflection point F u and the transition path point B. Then in this step, it can be judged whether the absolute value of the difference between the Cartesian space distance F u between the pending inflection point F u and the transition path point B and the smoothing distance S is less than a preset distance threshold, so as to judge whether the error between the Cartesian space distance F u of the pending inflection point F u from the transition path point B and the smoothing distance S is within the preset error range. When it is determined that the absolute value of the difference between the Cartesian space distance F u of the pending inflection point F u from the transition path point B and the smoothing distance S is less than the preset distance threshold, it is considered that the error between the Cartesian space distance F u between the pending inflection point F u and the transition path point B and the smoothing distance S is within the preset error range; and when it is determined that the absolute value of the difference between the Cartesian space distance F u of the pending inflection point F u from the transition path point B and the smoothing distance S is greater than or equal to the preset distance threshold, it is considered that the error between the Cartesian space distance F u between the pending inflection point F u and the transition path point B and the smoothing distance S exceeds the preset error range. The distance threshold is, for example, 0.01 mm. The preset distance threshold can be adjusted according to different required precisions, and it is not limited to the value listed in this embodiment.
[0074] In this step, when it is determined that the pending inflection point F uThe Cartesian space distance F between the transition path point B u When the error between B and the smoothing distance S is within a preset error range, jump to step S141, that is, in response to the pending inflection point F u The Cartesian space distance F between the transition path point B u The error between B and the smoothing distance S is within a preset error range; when it is determined that the pending turning-in point F u The Cartesian space distance F between the transition path point B u When the error between B and the smoothing distance S exceeds the preset error range, jump to step S134.
[0075] Step S142: Take the pending inflection point as the smoothing inflection point.
[0076] Take Figure 1 as an example for illustration. As Figure 1 shown, in this step, the selected pending inflection point F u is taken as the smoothing inflection point C.
[0077] In this way, in this embodiment, the pending inflection point F within the preset error range can be selected according to the smoothing distance S u as the smoothing inflection point C.
[0078] Furthermore, in order to prevent the problem of excessive operation time caused by too many loop times, in Figure 3 the process of step S130 shown, it may further include the step: in response to the number of points taken in the pending inflection point trajectory exceeding a preset threshold, take the currently obtained pending inflection point F u as the smoothing inflection point C. In this step, the preset threshold can be 20 times. Of course, the preset threshold can also be 40 times, 50 times, and other integer times.
[0079] Refer to Figure 4 Figure 4 is the point-to-point trajectory schematic diagram of the second embodiment of the method for determining the smoothing inflection point of the point-to-point trajectory of the present application.
[0080] Figure 4 The parts with the same reference numerals in Figure 1 can be referred to the description of this part in Figure 1 above. As Figure 4 shown, the difference between Figure 4 and Figure 1 is that the pending inflection point F u includes a pending turning-out point D u2 and a pending turning-in point E u2, The smoothing inflection points to be determined include a smoothing turning-out point C1 and a smoothing turning-in point C2.
[0081] Refer toFigure 5 , Figure 5 is a schematic flowchart of the second embodiment of the method for determining smooth inflection points of a point-to-point trajectory in the present application.
[0082] As Figure 5 shown, in this embodiment, the method for determining smooth inflection points of a point-to-point trajectory may include step S210, step S220, step S230, step S241, step S251, step S242, and step S252. Among them, step S220 may be Figure 2 the specific implementation manner of step S120 shown in Figure 2 in this embodiment; steps S241 and S242 may be Figure 2 the specific implementation manner of step S130 shown in u in this embodiment; steps S251 and S252 may be u1 the specific implementation manner of step S140 shown in u2 .
[0083] Step S210: Select transition path points from multiple taught points. This step may be the same as Figure 2 step S110 shown in
[0084] and will not be elaborated here.
[0085] As Figure 4 shown, the point-to-point trajectory includes multiple taught trajectories formed by sequentially connecting taught points A. After determining the transition path point B, the previous taught trajectory connected to the transition path point B can be selected from the multiple taught trajectories as the pending exit point trajectory L21 for later finding the smooth exit point C1 in the pending exit point trajectory L21; the subsequent taught trajectory connected to the transition path point B can be selected from the multiple taught trajectories as the pending entry point trajectory L22 for later finding the smooth entry point C2 in the pending entry point trajectory L22. As Figure 4 shown, the previous taught trajectory connected to the transition path point B is the second taught trajectory A2A3, that is, in Figure 4 the multiple taught trajectories shown, the second taught trajectory A2A3 can be used as the pending exit point trajectory L21; the subsequent taught trajectory connected to the transition path point B is the third taught trajectory A3A4, that is, in Figure 4In the multi-segment teaching trajectory shown, the third teaching trajectory A3A4 can be used as the to-be-determined turning-in point trajectory L22.
[0086] Step S230: Set the smoothing distance.
[0087] In this embodiment, the smoothing distance S needs to be set in advance to constrain the Cartesian space distance C1B between the smoothing turning-out point C1 and the transition path point B and the Cartesian space distance C2B between the smoothing turning-in point C2 and the transition path point B.
[0088] Step S241: Select a to-be-determined turning-out point in the to-be-determined turning-out point trajectory by the bisection method.
[0089] Refer to Figure 6 , Figure 6 is a schematic flowchart of steps S241 and S251 in the second embodiment of the method for determining a smoothing inflection point of a point-to-point trajectory in this application. Among them, step S241 includes steps S2411 to S2417.
[0090] Step S2411: Set the initial value of the first point-taking ratio and the initial value of the first point-taking step size.
[0091] Taking Figure 4 as an example for illustration, as Figure 4 shown, since each point in the to-be-determined turning-out point trajectory L21 is associated with an associated ratio, and the first point-taking ratio u1, as a ratio, can be equal to an associated ratio. Thus, the point associated with the first point-taking ratio u1 can be obtained in the to-be-determined turning-out point trajectory L21 as the to-be-determined turning-out point D u1 . The first point-taking step size step1 is used to limit the selection of the to-be-determined turning-out point D during two adjacent point-takings u1The deviation between the first sampling ratio u1. And the absolute value of the first sampling step u1 can be used as a measure of the size of the search range for finding the smooth turning-out point C1 in this embodiment. The trajectory segment of the to-be-determined turning-out point trajectory L21 where there is a smooth turning-out point C1 is called the turning-out point interval. For example, the turning-out point interval can be the entire to-be-determined turning-out point trajectory L21. In addition, when the Cartesian space distance between the midpoint of the to-be-determined turning-out point trajectory L21 and the transition path point B is greater than or equal to the smooth distance S, the turning-out point interval can be a half-segment of the to-be-determined turning-out point trajectory L21 connected to the transition path point B. The initial value of the first sampling ratio u1 and the initial value of the first sampling step step1 can be set according to the turning-out point interval, so that the search range for finding the smooth turning-out point C1 in this embodiment is the turning-out point interval. For example, the associated ratio associated with the endpoint or midpoint of the turning-out point interval can be used as the first sampling ratio u1 to complete the setting of the initial value of the first sampling ratio u1, and the maximum value of the absolute value of the difference between the associated ratio associated with the points in the turning-out point interval and the initial value of the first sampling ratio u1 is used as the first sampling step step1. Since the transition path point B is located at the end of the to-be-determined turning-out point trajectory L21, a positive value can be assigned to the first sampling step step1 to complete the setting of the initial value of the first sampling step step1. Thus, the initial search range for finding the smooth turning-out point C1 in this embodiment is the turning-out point interval. The endpoints of the turning-out point interval include the left endpoint and the right endpoint, where the left endpoint is the starting point of the turning-out point interval and the right endpoint is the end point of the turning-out point interval.
[0092] In this embodiment, the turning-out point interval is used as the to-be-determined turning-out point trajectory L21 for illustration. Since the associated ratio associated with the end point of the to-be-determined turning-out point trajectory L21 is 1, the first sampling ratio u1 can be 1, that is, the associated ratio associated with the end point of the turning-out point interval is used as the initial value of the first sampling ratio u1. At this time, since the maximum value of the absolute value of the difference between the associated ratio associated with the points in the to-be-determined turning-out point trajectory L21 and the first sampling ratio u1 is 1, the first sampling step step1 can be 1. As Figure 4 shown, since the transition path point B is located at the end of the to-be-determined turning-out point trajectory L21, a positive value is assigned to the first sampling step step1. Therefore, the first sampling step step1 takes a positive value of 1 in this step.
[0093] Step S2412: Select the point associated with the first sampling ratio in the to-be-determined turning-out point trajectory as the to-be-determined turning-out point.
[0094] In this step, that is, select the point associated with the first sampling ratio u1 in the to-be-determined turning-out point trajectory L21 as the to-be-determined turning-out point D u1 .
[0095] Step S2413: reassign the first point-taking step length so that the reassigned first point-taking step length is half of the first point-taking step length before the reassignment.
[0096] In this embodiment, the first point step is reassigned, and the reassignment equation (4) is as follows:
[0097]
[0098] The step1 on the right side of the re-assignment equation (4) represents the first point-taking step length step1 before the re-assignment, and the step1 on the left side of the re-assignment equation (4) represents the first point-taking step length step1 after the re-assignment.
[0099] Step S2414: Determine whether the Cartesian space distance between the undetermined turning-out point and the transition path point is greater than the smoothing distance.
[0100] by Figure 4 Take this as an example to illustrate, Figure 4 As shown, in this step, when the undetermined inflection point D u1 The Cartesian distance D between the transition path point B and the transition path point B u1 When B is greater than the smoothing distance S, it means that the smoothing inflection point C1 to be determined is located at the inflection point D in the inflection point trajectory L21. u1 Towards the side of transition path point B; when the undetermined turning point D u1 The Cartesian distance D between the transition path point B and the transition path point B u1 When B is less than the smoothing distance S, it means that the smoothing inflection point C1 to be determined is located at the inflection point D in the inflection point trajectory L21. u1 On the side away from transition path point B. Thus, after the second pass through this step, each pass through this step further narrows the search range for the smooth inflection point C1, and the size of the search range after each narrowing is half of the size of the search range before narrowing. For example, before the second pass through this step, the search range for the smooth inflection point C1 is the entire pending inflection point trajectory L21. After the second pass through this step, the search range for the smooth inflection point C1 is further narrowed to half of the pending inflection point trajectory L21.
[0101] In this embodiment, when the undetermined inflection point D u1 The Cartesian distance D between the transition path point B and the transition path point B u1 When B is greater than the smoothing distance S, the process jumps to step S2416, that is, in response to the pending inflection point D u1 The Cartesian distance D between the transition path point B and the transition path point B u1 B is greater than the smoothing distance S; when the undetermined inflection point D u1The Cartesian distance D between the transition path point B and the transition path point B u1 When B is less than the smoothing distance S, the process jumps to step S2415, that is, in response to the pending inflection point D u1 The Cartesian distance D between the transition path point B and the transition path point B u1 B is less than the smoothing distance S.
[0102] Step S2415: reassign the first point ratio, and set the reassigned first point ratio to be the difference between the first point ratio before reassignment and the first point step after reassignment.
[0103] In this embodiment, the first point ratio is re-assigned, and the re-assignment equation (5) is as follows:
[0104] u1=u1-step1···················(5)
[0105] The u1 on the right side of the re-assigned equation (5) represents the first point ratio u1 before re-assignment, and the u1 on the left side of the re-assigned equation (5) represents the first point ratio u1 after re-assignment. In this step, since the smooth inflection point C1 to be determined is located at the undetermined inflection point trajectory L21, u1 The side away from the transition path point B. Therefore, the first point ratio u1 after reassignment is the difference between the first point ratio u1 before reassignment and the first point step length step1 after reassignment, so that the first point ratio u1 after reassignment is associated with the undetermined inflection point D in the undetermined inflection point trajectory L21. u1 The undetermined inflection point D associated with the first point ratio u1 before reassignment in the undetermined inflection point trajectory L21 u1 , moving closer to the side where the smooth inflection point C1 is located.
[0106] Step S2416: reassign the first point ratio so that the first point ratio after reassignment is the sum of the first point ratio before reassignment and the first point step after reassignment.
[0107] In this embodiment, the first point ratio is re-assigned, and the re-assignment equation (6) is as follows:
[0108] u1=u1+step1··················(6)
[0109] Among them, the u1 on the right side of the re-assignment equation (6) represents the first sampling ratio u1 before re-assignment, and the u1 on the left side of the re-assignment equation (6) represents the first sampling ratio u1 after re-assignment. In this step, since in the pending turning-out point trajectory L21, the smooth turning-out point C1 to be determined is located at the pending turning-out point D u1 on the side towards the transition path point B. Therefore, let the first sampling ratio u1 after re-assignment be the sum of the first sampling ratio u1 before re-assignment and the first sampling step length step1 after re-assignment, so that the first sampling ratio u1 after re-assignment is at the pending turning-out point D associated with it in the pending turning-out point trajectory L21 u1 , relative to the pending turning-out point D associated with the first sampling ratio u1 before re-assignment in the pending turning-out point trajectory L21 u1 , move closer to the side where the smooth turning-out point C1 is located.
[0110] Step S2417: Re-select the pending turning-out point, and use the point associated with the first sampling ratio after re-assignment in the pending turning-out point trajectory as the re-selected pending turning-out point, and jump to step S2413.
[0111] In this step, by using the point associated with the first sampling ratio u1 after re-assignment in the pending turning-out point trajectory L21 as the re-selected pending turning-out point D u1 , so that the re-selected pending turning-out point D u1 moves closer to the side where the smooth turning-out point C1 is located relative to the pending turning-out point D before re-selection. And this re-selected pending turning-out point D u1 divides the search range of the smooth turning-out point C1 into two parts in the pending turning-out point trajectory L21. Among them, one part of the search range is located on the side of this pending turning-out point D u1 away from the transition path point B, and the other part of the search range is located on the side of this pending turning-out point D u1 towards the transition path point B. u1
[0112] After completing the re-selection of the pending turning-out point D u1 in this step, it then jumps to step S2413.
[0113] In this way, in this embodiment, by repeatedly executing the above steps S2413 to S2417, the range of searching for the smooth turning-out point C1 in the pending turning-out point trajectory L21 can be continuously narrowed.
[0114] Step S251: In response to the error between the Cartesian space distance and the smooth distance between the pending turning-out point and the transition path point being within a preset error range, use the pending turning-out point as the smooth turning-out point.
[0115] In this embodiment, step S251 may include steps S2511 to S2512.
[0116] Step S2511: Determine whether the error between the Cartesian space distance and the smoothing distance between the to-be-determined turning-out point and the transition path point is within a preset error range.
[0117] For example, as Figure 4 shown, take Figure 4 as an example. As shown in u1 , denote the Cartesian space distance between the to-be-determined turning-out point D u1 and the transition path point B as D u1 B. In this step, for each selected to-be-determined turning-out point D u1 , it is necessary to determine whether the error between the Cartesian space distance D u1 B between the to-be-determined turning-out point D Figure 6 and the transition path point B and the smoothing distance S is within the preset error range. As shown in
[0118] , this step may be located between step S2413 and step S2414, or may be located immediately before step S2417. Of course, this step is also located at other positions, which are not listed one by one here. In this embodiment, this step is taken as an example of being located between step S2413 and step S2414 for illustration.
[0118] In this step, the first point-taking ratio u1 associated with the to-be-determined turning-out point D u1 , the joint space coordinates of the starting point of the to-be-determined turning-out point trajectory L21, and the joint space coordinates of the ending point of the to-be-determined turning-out point trajectory L21 can be combined to calculate the joint space coordinates of the to-be-determined turning-out point D u1 . Then, through forward kinematics, the Cartesian space coordinates of the to-be-determined turning-out point D u1 can be obtained from the joint space coordinates of the to-be-determined turning-out point D u1 . The Cartesian space coordinates of the to-be-determined turning-out point Du1 and the transition path point B can be used to calculate the Cartesian space distance D u1 between the to-be-determined turning-out point D u1 and the transition path point B, denoted as D u1 B. Then, in this application, it can be determined whether the error between the Cartesian space distance D u1 B between the to-be-determined turning-out point D u1 and the transition path point B and the smoothing distance S is within the preset error range by judging whether the absolute value of the difference between the Cartesian space distance D u1 B between the to-be-determined turning-out point D u1 and the transition path point B and the smoothing distance S is less than a preset distance threshold. When it is determined that the Cartesian space distance D u1When the absolute value of the difference between the transition path point B and the smoothing distance S is less than a preset distance threshold, the pending turning-out point D is considered u1 The Cartesian space distance D between the transition path point B and the pending turning-out point D u1 The error between the transition path point B and the smoothing distance S is within a preset error range; and when it is determined that the pending turning-out point D u1 The Cartesian space distance D between the transition path point B and the pending turning-out point D u1 When the absolute value of the difference between the transition path point B and the smoothing distance S is greater than or equal to a preset distance threshold, the pending turning-out point D is considered u1 The Cartesian space distance D between the transition path point B and the pending turning-out point D u1 The error between the transition path point B and the smoothing distance S exceeds the preset error range. The distance threshold is, for example, 0.01 mm. The preset distance threshold can be adjusted according to different required precisions and is not limited to the value exemplified in this embodiment.
[0119] In this step, when it is determined that the pending turning-out point D u1 The Cartesian space distance D between the transition path point B and the pending turning-out point D u1 The error between the transition path point B and the smoothing distance S is within the preset error range, then it jumps to step S2512, that is, in response to the pending turning-out point D u1 The Cartesian space distance D between the transition path point B and the pending turning-out point D u1 The error between the transition path point B and the smoothing distance S is within the preset error range; when it is determined that the pending turning-in point D u1 The Cartesian space distance D from the transition path point B to the pending turning-in point D u1 The error between the transition path point B and the smoothing distance S exceeds the preset error range, then it jumps to step S2414.
[0120] Step S2512: Take the pending turning-out point as the smoothing turning-out point.
[0121] Take Figure 4 as an example for illustration. As Figure 4 shown, in this step, the selected pending turning-out point D u1 is taken as the smoothing turning-out point C1.
[0122] In this way, in this embodiment, the pending turning-out point D within the preset error range can be selected according to the smoothing distance S u1 as the smoothing turning-out point C1.
[0123] Step S242: Select a pending turning-in point from the pending turning-in point trajectory by the bisection method.
[0124] Refer to Figure 7 , Figure 7It is a schematic flowchart of steps S242 and S252 in the second embodiment of the method for determining smooth inflection points of the point-to-point trajectory of the present application. Among them, step S242 includes steps S2421 to S2427.
[0125] Step S2421: Set the initial value of the second point-taking ratio and the initial value of the second point-taking step size.
[0126] Take Figure 4 as an example for illustration. Refer to Figure 4 , as Figure 4 shown. Since each point in the to-be-determined turning-in point trajectory L22 corresponds to an associated ratio, and the second point-taking ratio u2, as a ratio, can be equal to an associated ratio, thus the point associated with the second point-taking ratio u2 can be obtained in the to-be-determined turning-in point trajectory L22 through the second point-taking ratio u2 as the to-be-determined turning-in point E u2 . The second point-taking step size step2 is used to limit the deviation between the second point-taking ratios u2 for selecting the to-be-determined turning-in point E u2 in two adjacent point-takings. And the absolute value of the second point-taking step size u2 can be used as a measure of the size of the search range for finding the smooth turning-in point C2 in this embodiment. The trajectory segment in the to-be-determined turning-in point trajectory L22 where there is a smooth turning-in point C2 is called the turning-out point interval. For example, the turning-out point interval can be the to-be-determined turning-in point trajectory L22. In addition, when the Cartesian space distance between the end point of the to-be-determined turning-in point trajectory L22 and the transition path point is greater than or equal to the smooth distance S, the turning-out point interval can be a half segment of the to-be-determined turning-in point trajectory L22 connected to the transition path point B. Set the initial value of the second point-taking ratio u2 and the initial value of the second point-taking step size step2 according to the turning-out point interval, so that the search range for finding the smooth turning-in point C2 in this embodiment is the turning-out point interval. For example, the associated ratio associated with the end point or midpoint of the turning-out point interval can be used as the second point-taking ratio u2 to complete the setting of the initial value of the second point-taking ratio u2. The maximum value of the absolute value of the difference between the associated ratio of the points in the turning-out point interval and the initial value of the second point-taking ratio u2 is used as the second point-taking step size step2. In response to the filtering path point B being located at the starting point of the to-be-determined turning-in point trajectory L22, a negative value is assigned to the second point-taking step size step2 to complete the setting of the initial value of the second point-taking step size step2. Thus, the initial search range for finding the smooth turning-in point C2 in this embodiment is the turning-out point interval. The end points of the turning-out point interval include the left end point and the right end point, where the left end point is the starting point of the turning-out point interval and the right end point is the end point of the turning-out point interval.
[0127] In this embodiment, the turning-out point interval is used as the to-be-determined turning-in point trajectory L22 for illustration. Since the associated ratio of the starting point of the to-be-determined turning-in point trajectory L22 is 0, the second sampling ratio u2 can be 0, that is, the associated ratio of the starting point of the turning-out point interval is used as the initial value of the second sampling ratio u2. At this time, since the maximum value of the absolute value of the difference between the associated ratio of the points in the to-be-determined turning-in point trajectory L22 and the second sampling ratio u2 is 1, the second sampling step size step2 can be 1. As Figure 4 shown, since the excessive path point B is located at the starting point of the to-be-determined turning-in point trajectory L22, a negative value is assigned to the second sampling step size step2. Therefore, in this step, the second sampling step size step2 takes a negative value, which is -1.
[0128] Step S2422: Select the point associated with the second sampling ratio in the to-be-determined turning-in point trajectory as the to-be-determined turning-in point.
[0129] In this step, that is, the point associated with the second sampling ratio u2 in the to-be-determined turning-in point trajectory L22 is selected as the to-be-determined turning-in point E u2 .
[0130] Step S2423: Reassign the second sampling step size so that the reassigned second sampling step size is half of the second sampling step size before reassignment.
[0131] In this embodiment, the reassignment of the second sampling step size can refer to the reassignment equation (7) as follows:
[0132]
[0133] Where step2 on the right side of the reassignment equation (7) represents the second sampling step size step2 before reassignment, and step2 on the left side of the reassignment equation (7) represents the second sampling step size step2 after reassignment.
[0134] Step S2424: Determine whether the Cartesian space distance between the to-be-determined turning-in point and the transition path point is greater than the smoothing distance.
[0135] Taking Figure 4 as an example for illustration, as Figure 4 shown, in this step, when the Cartesian space distance E u2 between the to-be-determined turning-in point E and the transition path point B is greater than the smoothing distance S, it means that the smoothing turning-in point C2 to be determined is located on the side of the to-be-determined turning-in point E u2 towards the transition path point B in the to-be-determined turning-in point trajectory L22; when the Cartesian space distance E u2 between the to-be-determined turning-in point E and the transition path point B is greater than the smoothing distance S, it means that the smoothing turning-in point C2 to be determined is located on the side of the to-be-determined turning-in point E u2 towards the transition path point B in the to-be-determined turning-in point trajectory L22; when the Cartesian space distance E u2When B is less than the smoothing distance S, it means that the smoothing turning-in point C2 to be determined is located at the pending turning-in point E in the pending turning-in point trajectory L22 u2 on the side away from the transition path point B. Thus, after the second pass through this step, each time this step is passed, the range for finding the smoothing turning-in point C2 can be further narrowed, and the size of the narrowed search range each time is one-half of the size of the search range before narrowing. For example, before the second pass through this step, the range for finding the smoothing turning-in point C2 is the entire pending turning-in point trajectory L22, and after the second pass through this step, the range for finding the smoothing turning-in point C2 will be further defined as a half-segment trajectory in the pending turning-in point trajectory L22
[0136] In this embodiment, when the pending turning-in point E u2 and the Cartesian space distance E between the transition path point B u2 B is greater than the smoothing distance S, then jump to step S2426, that is, in response to the Cartesian space distance E between the pending turning-in point E u2 and the transition path point B u2 B is greater than the smoothing distance S; when the pending turning-in point E u2 the Cartesian space distance E from the transition path point B u2 B is less than the smoothing distance S, then jump to step S2425, that is, in response to the Cartesian space distance E between the pending turning-in point E u2 and the transition path point B u2 B is less than the smoothing distance S
[0137] Step S2425: Reassign the second sampling ratio so that the reassigned second sampling ratio is the difference between the second sampling ratio before reassignment and the second sampling step after reassignment
[0138] In this embodiment, the reassignment of the second sampling ratio can refer to the reassignment equation (8) as follows
[0139] u2 = u2 - step2 ··············· (8)
[0140] where u2 on the right side of the reassignment equation (8) represents the second sampling ratio u2 before reassignment, and u2 on the left side of the reassignment equation (8) represents the second sampling ratio u2 after reassignment. In this step, since in the pending turning-in point trajectory L22, the smoothing turning-in point C2 to be determined is located at the pending turning-in point E u2 on the side away from the transition path point B. So let the reassigned second sampling ratio u2 be the difference between the second sampling ratio u2 before reassignment and the second sampling step step2 after reassignment, so that the reassigned second sampling ratio u2 is associated with the pending turning-in point E in the pending turning-in point trajectory L22u2 The pending turning-in point E associated with the second sampling ratio u2 in the pending turning-in point locus L22 before re-assignment u2 moves closer to the side where the smooth turning-in point C2 is located.
[0141] Step S2426: Re-assign the second sampling ratio, and let the re-assigned second sampling ratio be the sum of the second sampling ratio before re-assignment and the second sampling step length after re-assignment.
[0142] In this embodiment, the re-assignment of the second sampling ratio can refer to the re-assignment equation (9) as follows:
[0143] u2 = u2 + step2 ··············· (9)
[0144] Where u2 on the right side of the re-assignment equation (9) represents the second sampling ratio u2 before re-assignment, and u2 on the left side of the re-assignment equation (9) represents the second sampling ratio u2 after re-assignment. In this step, since in the pending turning-in point locus L22, the smooth turning-in point C2 to be determined is located on the side of the pending turning-in point E u2 towards the transition path point B. Therefore, let the re-assigned second sampling ratio u2 be the sum of the second sampling ratio u2 before re-assignment and the second sampling step length step2 after re-assignment, so that the re-assigned second sampling ratio u2 in the pending turning-in point locus L22 is associated with the pending turning-in point E u2 moves closer to the side where the smooth turning-in point C2 is located compared to the pending turning-in point E associated with the second sampling ratio u2 in the pending turning-in point locus L22 before re-assignment u2 moves closer to the side where the smooth turning-in point C2 is located.
[0145] Step S2427: Re-select the pending turning-in point, and use the point associated with the re-assigned second sampling ratio in the pending turning-in point locus as the re-selected pending turning-in point, and then jump to step S2423.
[0146] In this step, by using the point associated with the re-assigned second sampling ratio u2 in the pending turning-in point locus L22 as the re-selected pending turning-in point E u2 so that the re-selected pending turning-in point E u2 moves closer to the side where the smooth turning-in point C2 is located compared to the pending turning-in point E before re-selection u2 And this re-selected pending turning-in point E u2 divides the search range of the smooth turning-in point C2 in the pending turning-in point locus L22 into two parts. Among them, one part of the search range is located on the side of this pending turning-in point E u2On the side away from the transition path point B, the other part of the search range is located at the undetermined turning point E u2 Towards the side of transition waypoint B.
[0147] In this step, the inflection point E is completed. u2 After reselection, jump to step S2423.
[0148] Thus, in this embodiment, by repeatedly executing the above steps S2423 to S2427, the range for searching for the smooth inflection point C2 in the pending inflection point trajectory L22 can be continuously narrowed.
[0149] Step S252: In response to the error between the Cartesian space distance and the smooth distance between the pending turning point and the transition path point being within a preset error range, the pending turning point is used as a smooth turning point.
[0150] In this embodiment, step S252 may include steps S2521 to S2522.
[0151] Step S2521: Determine whether the error between the Cartesian space distance and the smoothed distance between the to-be-determined turning point and the transition path point is within a preset error range.
[0152] by Figure 4 Take this as an example to illustrate, Figure 4 As shown, in this step, for each selected undetermined inflection point E u2 . Need to determine the pending inflection point E u2 The Cartesian distance E between the transition path point B and the transition path point B u2 Whether the error between B and the smoothed distance S is within a preset error range. This step can be located between steps S2423 and S2424, or immediately before step S2427. Of course, this step can also be located in other locations, which are not listed here. In this embodiment, this step is described as being located between steps S2423 and S2424.
[0153] In this embodiment, the undetermined inflection point E can be combined with u2 The associated point ratio u2, the joint space coordinates of the starting point of the pending inflection point trajectory L22 and the joint space coordinates of the end point of the pending inflection point trajectory L22 are used to calculate the pending inflection point E u2 Then, using forward kinematics, we can get the joint space coordinates of the undetermined inflection point E. u2 The joint space coordinates of the undetermined inflection point E are obtained u2 The Cartesian space coordinates of . The undetermined inflection point E can be used u2 And the Cartesian space coordinates of the transition path point B, calculate the undetermined turning point E u2The Cartesian space distance E between the transition path point B u2 B. Then in the present application, it is possible to determine the pending turning-in point E by judging u2 The Cartesian space distance E between the transition path point B u2 Whether the absolute value of the difference between B and the smoothing distance S is less than a preset distance threshold to determine the pending turning-in point E u2 The Cartesian space distance E between the transition path point B u2 Whether the error between B and the smoothing distance S is within a preset error range. When it is determined that the pending turning-in point E u2 The Cartesian space distance E between the transition path point B u2 The absolute value of the difference between B and the smoothing distance S is less than the preset distance threshold, then it is considered that the pending turning-in point E u2 The Cartesian space distance E between the transition path point B u2 The error between B and the smoothing distance S is within the preset error range; and when it is determined that the pending turning-in point E u2 The Cartesian space distance E between the transition path point B u2 The absolute value of the difference between B and the smoothing distance S is greater than or equal to the preset distance threshold, then it is considered that the pending turning-in point E u2 The Cartesian space distance E between the transition path point B u2 The error between B and the smoothing distance S exceeds the preset error range. The distance threshold is, for example, 0.01 mm. The preset distance threshold can be adjusted according to different required precisions, and it is not limited to the value exemplified in this embodiment.
[0154] In this step, when it is determined that the error between the pending turning-in point E u2 The Cartesian space distance E between the transition path point B u2 And the smoothing distance S is within the preset error range, then it jumps to step S2522, that is, in response to the pending turning-in point E u2 The Cartesian space distance E between the transition path point B u2 And the smoothing distance S is within the preset error range; when it is determined that the pending turning-in point E u2 The Cartesian space distance E from the transition path point B u2 The error between B and the smoothing distance S exceeds the preset error range, then it jumps to step S2424.
[0155] Step S2522: Use the pending turning-in point as the smoothed turning-in point.
[0156] Take Figure 4 As an example for illustration, as Figure 4 Shown, in this step, it is to select the pending turning-in point E u2As the smooth turning-in point C2.
[0157] Thus, in this embodiment, the pending turning-in point E within the preset error range can be selected according to the smooth distance S u2 As the smooth turning-in point C2.
[0158] The beneficial effect of this embodiment is that the Cartesian space distance C1B between the smooth turning-out point C1 and the transition path point B and the Cartesian space distance C2B between the smooth turning-in point C2 and the transition path point B are constrained by the same smooth distance S, so that both the Cartesian space distance C1B and the Cartesian space distance C2B are equal to the smooth distance S. As a result, for the formed smooth trajectory L1, whether it turns out from the pending turning-out point trajectory L21 through the smooth turning-out point C1 or turns in from the pending turning-in point trajectory L22 through the smooth turning-in point C2, the corresponding curvature is the same. In this way, the shape of the smooth trajectory L1 is relatively symmetric, realizing the natural and smooth transition of the smooth trajectory L1, enabling a larger speed to be planned for the speed planning of the end of the axis of the industrial robot later, thereby shortening the cycle time. By directly constraining the Cartesian space distance C1B between the smooth turning-out point C1 and the transition path point B and the Cartesian space distance C2B between the smooth turning-in point C2 and the transition path point B through the smooth distance S, it is possible to more conveniently adjust the curvature of the smooth trajectory L1 at the smooth turning-out point C1 and the smooth turning-in point C2.
[0159] Furthermore, refer to Figure 8 , Figure 8 which is a schematic flowchart of step S230 in the second embodiment of the method for determining smooth inflection points of the point-to-point trajectory of the present application.
[0160] In this embodiment, step S230 may include steps S231 to S232.
[0161] Step S231: Obtain the preset value of the smooth distance. This step may be the same as the step of obtaining the preset value of the smooth distance S in the first embodiment, and will not be elaborated here.
[0162] Step S232: Obtain the Cartesian space distance between the midpoint of the pending turning-out point trajectory and the transition path point as the first comparison distance; obtain the Cartesian space distance between the midpoint of the pending turning-in point trajectory and the transition path point as the second comparison distance.
[0163] This step may be the specific implementation manner in this embodiment of the step of obtaining the Cartesian space distance between the midpoint of the pending inflection point trajectory L2 and the transition path point B in the first embodiment.
[0164] Taking Figure 4 as an example for illustration, as Figure 4As shown, point A23 is the midpoint of the pending turning-out point trajectory L21, and point A34 is the midpoint of the pending turning-in point trajectory L22. For convenience of description, the Cartesian space distance between point A23 and the transition path point B is denoted as A23B, and the Cartesian space distance between point A34 and the transition path point B is denoted as A34B. Then, in Figure 4 it is possible to use the Cartesian space distance A23B as the first comparison distance and the Cartesian space distance A34B as the second comparison distance.
[0165] Step S233: Select the minimum value from the preset value, the first comparison distance, and the second comparison distance as the smoothing distance. This step can be a specific implementation of selecting the minimum value from the preset value and the comparison distance as the smoothing distance S in the first embodiment in this embodiment.
[0166] Taking Figure 4 as an example for illustration, the preset value of the smoothing distance is denoted as SetS. Then, the calculation formula (10) of the smoothing distance S is as follows:
[0167] S = min(A23B, A34B, SetS) ················· (10)
[0168] Referring to Figure 9 , Figure 9 is a schematic structural diagram of an embodiment of an industrial robot of the present application.
[0169] As Figure 9 shown, the industrial robot 2 may include a memory 210 and a processor 220. The processor 220 is electrically coupled to the memory 210. The memory 210 is used to store program data. The program data can be loaded and executed by the processor 220, so as to implement the method for determining smooth inflection points of the point-to-point trajectory in the above embodiments of the present application.
[0170] Referring to Figure 10 , Figure 10 is a schematic structural diagram of an embodiment of a storage device of the present application.
[0171] As Figure 10 shown, the storage device 3 may include at least one storage block 31, and the program data is stored in at least one storage block 31 respectively, or stored in some of the storage blocks 31. The program data can be executed by the processor to implement the method for determining smooth inflection points of the point-to-point trajectory in the above embodiments.
[0172] The storage device 3 in this embodiment may be the memory 210 of the industrial robot 2 as in Figure 9 . In other embodiments, it may also be a storage medium such as a USB flash drive, a network disk, a storage hard disk with a storage function. In addition, it may also be a device such as a terminal or a server with a storage function.
[0173] The above are only the implementation manners of the present application, and do not limit the patent scope of the present application accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present application.
Claims
1. A method for determining a smooth inflection point of a point-to-point trajectory, characterized in that the point-to-point trajectory at least includes multiple teaching trajectories formed by sequentially connecting a plurality of preset teaching points, and the method includes: selecting a transition path point from the plurality of teaching points; selecting the teaching trajectory connected to the transition path point from the multiple teaching trajectories as the pending inflection point trajectory; selecting a pending inflection point in the pending inflection point trajectory by the bisection method; in response to the error between the Cartesian space distance and the smooth distance between the pending inflection point and the transition path point being within a preset error range, taking the pending inflection point as the smooth inflection point.
2. The method according to claim 1, characterized in that after selecting the teaching trajectory connected to the transition path point from the multiple teaching trajectories as the pending inflection point trajectory, it includes: obtaining a preset value of the smooth distance; obtaining the Cartesian space distance between the midpoint of the pending inflection point trajectory and the transition path point as the comparison distance; selecting the minimum value from the preset value and the comparison distance as the smooth distance.
3. The method according to any one of claims 1-2, characterized in that each point in the teaching trajectory is correspondingly associated with an association ratio, and the association ratio is the ratio of the length of the trajectory between the point associated with the association ratio in the teaching trajectory and the starting point of the teaching trajectory to the length of the teaching trajectory; the selecting a pending inflection point in the pending inflection point trajectory by the bisection method includes: setting an initial value of the point-taking ratio and an initial value of the point-taking step size; selecting the point associated with the point-taking ratio in the pending inflection point trajectory as the pending inflection point; reassigning the point-taking step size so that the reassigned point-taking step size is half of the point-taking step size before reassignment; in response to the Cartesian space distance between the pending inflection point and the transition path point being greater than the smooth distance, reassigning the point-taking ratio so that the reassigned point-taking ratio is the sum of the point-taking ratio before reassignment and the reassigned point-taking step size; in response to the Cartesian space distance between the pending inflection point and the transition path point being less than the smooth distance, reassigning the point-taking ratio so that the reassigned point-taking ratio is the difference between the point-taking ratio before reassignment and the reassigned point-taking step size; reselecting the pending inflection point, and taking the point associated with the reassigned point-taking ratio in the pending inflection point trajectory as the reselected pending inflection point; jumping to the step of reassigning the point-taking step size, and making the reassigned point-taking step size half of the point-taking step size before reassignment.
4. The method according to any one of claims 1-2, characterized in that the pending inflection point includes a pending exit point and a pending entry point, and the selecting the teaching trajectory connected to the transition path point from the multiple teaching trajectories as the pending inflection point trajectory includes: selecting the previous teaching trajectory connected to the transition path point from the multiple teaching trajectories as the pending exit point trajectory; Select the subsequent teaching trajectory connected to the transition path point from the multiple segments of teaching trajectories as the to-be-determined turning-in point trajectory; The selecting the to-be-determined inflection point from the to-be-determined inflection point trajectory by the bisection method includes: Selecting the to-be-determined turning-out point from the to-be-determined turning-out point trajectory by the bisection method; Selecting the to-be-determined turning-in point from the to-be-determined turning-in point trajectory by the bisection method; The responding that the error between the Cartesian space distance and the smoothing distance between the to-be-determined inflection point and the transition path point is within a preset error range and taking the to-be-determined inflection point as the smoothing inflection point includes: Responding that the error between the Cartesian space distance and the smoothing distance between the to-be-determined turning-out point and the transition path point is within a preset error range and taking the to-be-determined turning-out point as the smoothing turning-out point; Responding that the error between the Cartesian space distance and the smoothing distance between the to-be-determined turning-in point and the transition path point is within a preset error range and taking the to-be-determined turning-in point as the smoothing turning-in point.
5. The method according to claim 1, wherein The obtaining the Cartesian space distance between the midpoint of the to-be-determined inflection point trajectory and the transition path point as the comparison distance includes: Obtaining the Cartesian space distance between the midpoint of the to-be-determined turning-out point trajectory and the transition path point as the first comparison distance; Obtaining the Cartesian space distance between the midpoint of the to-be-determined turning-in point trajectory and the transition path point as the second comparison distance; The selecting the minimum value from the preset value and the comparison distance as the smoothing distance includes: Selecting the minimum value from the preset value, the first comparison distance and the second comparison distance as the smoothing distance.
6. The method according to claim 3, wherein The error between the Cartesian space distance and the smoothing distance between the to-be-determined inflection point and the transition path point being within a preset error range includes: The absolute value of the difference between the Cartesian space distance and the smoothing distance between the to-be-determined inflection point and the transition path point is less than a preset distance threshold.
7. The method according to claim 3, wherein The method further includes: Responding that when the number of point-taking times in the to-be-determined inflection point trajectory exceeds a preset threshold, taking the currently obtained to-be-determined inflection point as the smoothing inflection point.
8. The method according to claim 1, wherein The teaching trajectory includes a straight-line trajectory, an arc trajectory or a spline curve trajectory.
9. An industrial robot, characterized in that, The industrial robot includes: A memory storing program data; And a processor, the program data being executable by the processor to implement the method according to any one of claims 1-8.
10. A storage device, characterized in that, The storage device stores program data, the program data being executable by the processor to implement the method according to any one of claims 1-8.