Data processing method, device, electronic device and storage medium

By performing secondary interpolation data processing in robot motion planning, the problem of low stop control efficiency of robot under different operating speed planning is solved, and a general stop control method is realized, which improves development efficiency.

CN115268371BActive Publication Date: 2025-06-06GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210836817.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-15
Publication Date
2025-06-06
Estimated Expiration
2042-07-15

AI Technical Summary

Technical Problem

In the prior art, different operating speed plans require separate development of matching stop speed plans, resulting in very low development efficiency.

Method used

By obtaining the first interpolation data corresponding to each remaining period in the first motion planning, and performing a secondary planning based on the first interpolation data to obtain the second interpolation data, the motion of the robot in the next cycle is controlled until the stop control is completed.

Benefits of technology

It realizes that no matter what kind of running speed planning is based on during the robot's movement, stop control can be completed, avoiding the need to develop stop speed planning separately for different running speed planning, and improving development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115268371B_ABST
    Figure CN115268371B_ABST
Patent Text Reader

Abstract

The present invention relates to a data processing method, device, electronic device and storage medium. The data processing method includes: if a trigger stop command is received during the movement of a robot according to a first motion plan, first interpolation data corresponding to each remaining cycle in the first motion plan is obtained; second interpolation data for the next cycle is determined based on the first interpolation data; and the second interpolation data is output to control the robot to move according to the second interpolation data in the next cycle until the stop control is completed. The embodiment of the present application can achieve stop control regardless of the operating speed plan based on which the robot is moving, without the need to develop a stop speed plan that matches different operating speed plans, thereby improving development efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a data processing method, device, electronic device and storage medium. Background Art

[0002] At present, industrial robots are widely used in various scenarios, and different application scenarios have different requirements for robot running speed curves. Common robot running speed planning includes S-type (polynomial) curve, Sine curve, Sine 2 Curve. For different running speed curves, how to ensure that the robot can stop quickly and smoothly is an important issue in robot motion control.

[0003] At present, different running speed plans require separate development of matching stopping speed plans, and the development efficiency is very low. Summary of the invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a data processing method, device, electronic device and storage medium.

[0005] In a first aspect, the present application provides a data processing method, comprising:

[0006] If a trigger stop command is received during the movement of the robot according to the first motion plan, first interpolation data corresponding to each remaining period in the first motion plan is obtained;

[0007] Determine second interpolation data for the next cycle based on the first interpolation data;

[0008] The second interpolation data is output to control the robot to move according to the second interpolation data in the next cycle until the stop control is completed.

[0009] Optionally, determining second interpolated data of a next period based on the first interpolated data includes:

[0010] Determine a window value of a Gaussian filter according to the first interpolation data;

[0011] Determine a buffer array based on the first interpolation data and the window value of the Gaussian filter;

[0012] Based on the first interpolation data, the window value of the Gaussian filter, the buffer array and the Gaussian filter, weighted processing is performed on the first interpolation data to obtain second interpolation data.

[0013] Optionally, determining a window value of a Gaussian filter according to the first interpolation data includes:

[0014] Determine the deceleration time corresponding to the first motion plan according to the maximum acceleration of the deceleration section, the jerk of the deceleration section and the maximum running speed;

[0015] The window value of the Gaussian filter is determined according to the deceleration period.

[0016] Optionally, determining a buffer array based on the first interpolation data and a window value of the Gaussian filter includes:

[0017] Determine the size of the buffer array according to the window value of the Gaussian filter;

[0018] extracting an interpolation period from the first interpolation data;

[0019] A buffer array is generated based on the size of the buffer array and the interpolation period.

[0020] Optionally, based on the first interpolation data, the buffer array, the window value and the Gaussian filter, weighted processing is performed on the first interpolation data to obtain second interpolation data, including:

[0021] Extracting an interpolation displacement array from the first interpolation data;

[0022] Determine the Gaussian probability of the next cycle and the mathematical expectation of the buffer array based on the first interpolation data;

[0023] Determining a buffer time based on the Gaussian probability and the mathematical expectation;

[0024] The second interpolation data is determined based on the buffer time and the interpolation displacement array.

[0025] Optionally, based on the first interpolation data, the buffer array, the window value and the Gaussian filter, weighted processing is performed on the first interpolation data to obtain second interpolation data, further comprising:

[0026] Get the current index value corresponding to the buffer array, and the index value increases by one after each cycle;

[0027] The interpolation period corresponding to the current index value in the buffer array is set to 0.

[0028] Optionally, the method further comprises:

[0029] Extracting the number of completed interpolation times and the total number of interpolation times from the first interpolation data, wherein the number of completed interpolation times increases by one after each cycle;

[0030] If the completed interpolation times are greater than or equal to the total interpolation times, or the buffer time is 0, it is determined that the stop control is completed.

[0031] In a second aspect, the present application provides a data processing device, including:

[0032] An acquisition module, configured to acquire first interpolation data corresponding to each remaining period in the first motion plan if a trigger stop command is received during the movement of the robot according to the first motion plan;

[0033] A first determining module, configured to determine second interpolated data of a next cycle based on the first interpolated data;

[0034] The output module is used to output the second interpolation data to control the robot to move according to the second interpolation data in the next cycle until the stop control is completed.

[0035] Optionally, the first determining module includes:

[0036] A first determining unit, configured to determine a window value of a Gaussian filter according to the first interpolation data;

[0037] A second determining unit, configured to determine a buffer array based on the first interpolation data and a window value of the Gaussian filter;

[0038] A weighted processing unit is used to perform weighted processing on the first interpolated data based on the first interpolated data, the window value of the Gaussian filter, the buffer array and the Gaussian filter to obtain second interpolated data.

[0039] Optionally, the first determining unit includes:

[0040] A first determination subunit is used to determine the deceleration time corresponding to the first motion plan according to the maximum acceleration value of the deceleration section, the jerk of the deceleration section and the maximum running speed;

[0041] The second determining subunit is used to determine the window value of the Gaussian filter according to the deceleration period.

[0042] Optionally, the second determining unit includes:

[0043] A third determining subunit, configured to determine the size of the buffer array according to the window value of the Gaussian filter;

[0044] A first extraction subunit, configured to extract an interpolation period from the first interpolation data;

[0045] A generating subunit is used to generate a buffer array based on the size of the buffer array and the interpolation period.

[0046] Optionally, the weighted processing unit includes:

[0047] A second extraction subunit, used for extracting an interpolation displacement array from the first interpolation data;

[0048] a fourth determining subunit, configured to determine the Gaussian probability of the next cycle and the mathematical expectation of the buffer array based on the first interpolation data;

[0049] a fifth determining subunit, configured to determine a buffer time based on the Gaussian probability and the mathematical expectation;

[0050] The sixth determining subunit is used to determine the second interpolation data based on the buffer time and the interpolation displacement array.

[0051] Optionally, the weighted processing unit further includes:

[0052] An acquisition subunit is used to acquire a current index value corresponding to the buffer array, and the index value is incremented by one after each cycle;

[0053] The setting subunit is used to set the interpolation period corresponding to the current index value in the buffer array to 0.

[0054] Optionally, the method further comprises:

[0055] An extraction module, used for extracting the number of completed interpolation times and the total number of interpolation times from the first interpolation data, wherein the number of completed interpolation times increases by one after each cycle;

[0056] The second determination module is used to determine that the stop control is completed if the number of completed interpolation times is greater than or equal to the total number of interpolation times, or the buffer time is 0.

[0057] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0058] Memory, used to store computer programs;

[0059] The processor is used to implement any data processing method described in the first aspect when executing a program stored in the memory.

[0060] In a fourth aspect, the present application provides a computer-readable storage medium, on which a program of a data processing method is stored. When the program of the data processing method is executed by a processor, the steps of any data processing method described in the first aspect are implemented.

[0061] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0062] The embodiment of the present application obtains the first interpolation data corresponding to each remaining cycle in the first motion plan, performs secondary planning based on the first interpolation data to obtain the second interpolation data, and then controls the movement of the robot in the next cycle based on the second interpolation data until it stops. This ensures that no matter what kind of operating speed plan the robot is based on during the movement process, stop control can be completed, and there is no need to develop a stop speed plan that matches different operating speed plans separately, thereby improving development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0064] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0065] Figure 1 A schematic diagram of an operating state machine provided in an embodiment of the present application;

[0066] Figure 2 A schematic diagram of a stop state machine provided in an embodiment of the present application;

[0067] Figure 3 A schematic diagram of a logic state machine provided in an embodiment of the present application;

[0068] Figure 4 A flowchart of a data processing method provided in an embodiment of the present application;

[0069] Figure 5 for Figure 4 Flow chart of step S102;

[0070] Figure 6 A flowchart of a data processing method in a practical application provided by an embodiment of the present application;

[0071] Figure 7 A schematic diagram of a stopping speed curve for completing stopping control with an S-shaped curve provided in an embodiment of the present application;

[0072] Figure 8 A schematic diagram of a stop speed curve for completing stop control using an S-shaped speed curve provided in an embodiment of the present application;

[0073] Fig. 9A schematic diagram of a stop speed curve for completing stop control using a Sine-type speed curve provided in an embodiment of the present application;

[0074] Fig.10 A schematic diagram of a stop speed curve for completing stop control using a SineSquare type speed curve provided in an embodiment of the present application;

[0075] Fig.11 A structural diagram of a data processing device provided in an embodiment of the present application;

[0076] Fig.12 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0078] At present, different running speed plans need to be developed separately to match the stop speed plans, and the development efficiency is very low. To this end, the embodiments of the present application provide a data processing method, device, electronic device and storage medium, which can obtain the first interpolation data corresponding to each remaining cycle in the first motion plan, and perform secondary planning based on the first interpolation data to obtain the second interpolation data, and then control the movement of the robot in the next cycle based on the second interpolation data until it stops, so that no matter what kind of running speed plan is used during the movement of the robot, the stop control can be completed, and there is no need to develop a stop speed plan that matches different running speed plans separately, thereby improving development efficiency.

[0079] The data processing method can be applied to a robot, which refers to a robot that can move and stop moving. The robot includes a controller, a planner, a drive module, etc. The controller can communicate with the planner and the drive module respectively.

[0080] In the embodiment of the present application, the planner includes: a logic state machine, a running state machine and a stop state machine, wherein, Figure 1 As shown in FIG. 1 , the running state machine includes the states of “ready state”, “running state”, “standby state”, “completion state” and “error state”, which are used to realize the movement of the robot. For example, the instruction requires the robot to move from point A to point B; Figure 2As shown, the stop state machine includes the states of "ready state", "start state", "interrupt state", "complete state" and "error state", which are used to stop the robot from moving; Figure 3 As shown, the logic state machine includes multiple states such as "ready state", "execute run command", "stop state", "emergency stop state", etc., which are used for switching the overall state.

[0081] Execute motion instructions: "The user triggers the run instruction and completes the speed planning" is a trigger condition of the logic state machine, which migrates from the current "ready state" to "execute the run instruction". This state migration "triggering the run instruction and completing the speed planning" is another trigger condition of the running state machine, which makes the running state machine migrate from the "ready state" to the "running state" and execute the action of "outputting one interpolation data in each cycle". After obtaining the interpolation data, the controller sends the interpolation data to the drive module, and the drive module drives the robot to move according to the interpolation data;

[0082] Stop: "User triggers stop command" is also a trigger condition of the logic state machine, which migrates from the current "execute motion instruction" to the "stop state". The state migration of this logic state machine "user triggers stop command" is a trigger condition of the running state machine, which allows the running state machine to migrate from the "running state" to the "standby state" and execute the action of "copying all current interpolation data (1000 copies of length data) from the memory of the running state machine to the memory of the stop state machine". "User triggers stop command" is a trigger condition of the stop state machine, which allows the stop state machine to migrate from the "ready state" to the "start state" and execute the action of "stop control involved in the present invention, output the processed interpolation data". Then "interpolation is completed or BufferTime is 0" is a trigger condition of the stop state machine, which switches the stop state machine from the "start" state to the "completed" state;

[0083] Continue motion: "Trigger the continue command" is a trigger condition of the logic state machine. The logic state machine switches from the "stop state" to the "execute run instruction" state. This state transition "trigger the continue command" is also a trigger condition of the run state machine, allowing the run state machine to migrate from the "standby state" to the "running state" and execute the action of "continue running according to the interpolation data". It is also a trigger condition of the stop state machine, allowing the stop state machine to migrate from "complete" to "ready".

[0084] like Figure 4 As shown, the data processing method may include the following steps:

[0085] Step S101, if a trigger stop command is received during the movement of the robot according to the first motion plan, first interpolation data corresponding to each remaining period in the first motion plan is obtained;

[0086] When the robot is moving or stopping, it is all completed according to the corresponding motion plan planned by the planner. In the embodiment of the present application, the robot moves according to the first motion plan, and the first motion plan includes interpolation data corresponding to each interpolation cycle. The interpolation data is the sum of the lengths required to move in each interpolation cycle.

[0087] In each interpolation cycle, the robot reads an interpolation data (movement length) to move. It should be noted that when the running instruction moves, the robot reads the first interpolation data OldData from the running state machine.

[0088] For example, when controlling the robot to move according to the first motion plan, assuming that the instruction is to let the robot move from point A to point B, first use a certain planning method in the planner to divide the length of segment AB into several lengths. Assuming that it takes 1000 interpolation cycles to run from A to B, it is divided into 1000 lengths. These 1000 lengths are the interpolation data, which is the sum of the lengths that the controller obtains from the planner and that the robot needs to move in each interpolation cycle.

[0089] If a trigger stop command is received during the robot's motion, since the robot may have moved for several interpolation cycles when the trigger stop command is received, the first interpolation data OldData corresponding to each remaining cycle can be obtained in the motion state machine of the planner. OldData includes: interpolation cycle CycleTime, completed interpolation times X, total interpolation times Y and interpolation displacement array OldLength, etc., where the array size of the interpolation displacement array OldLength is Y.

[0090] Step S102, determining second interpolation data of the next cycle based on the first interpolation data;

[0091] In this step, the first interpolation data may be weighted to obtain the second interpolation data of the next cycle.

[0092] Specifically, after obtaining the first interpolation data corresponding to each remaining period, all the obtained first interpolation data OldData can be copied to the stop state machine, and the stop state machine performs weighted processing on the first interpolation data OldData through a Gaussian filter, which can be understood as:

[0093] The second interpolation data NewData = the first interpolation data OldData * buffer time BufferTime. The buffer time BufferTime is the weighting factor of the weighted processing. As mentioned above, the robot moves according to the interpolation cycle. If BufferTime is 1, it means 1 interpolation cycle. If BufferTime is less than 1, NewData is less than OldData, that is, the robot travels a shorter distance in the same time, achieving a deceleration effect.

[0094] Exemplarily, during normal operation, one interpolation cycle runs a displacement corresponding to one interpolation cycle; while when the present invention is applied to stop motion, one interpolation cycle only runs a displacement corresponding to 0.8 interpolation cycles, where 0.8 interpolation cycles is BufferTime.

[0095] Step S103, outputting the second interpolation data to control the robot to move according to the second interpolation data in the next cycle until the stop control is completed.

[0096] The stop state machine outputs the second interpolation data. After acquiring the second interpolation data, the controller sends the second interpolation data to the drive module, and the drive module drives the robot to move according to the second interpolation data. That is, the robot reads the second interpolation data NewData from the stop state machine (this second interpolation data is the interpolation data obtained after secondary planning based on the first interpolation data copied by the running state machine). For example, in the second interpolation data NewData, the interpolation period is 0.1 seconds, and the corresponding interpolation displacement is 0.1 meters, which means that the robot has to move 0.1 meters in this 0.1 second.

[0097] After outputting the second interpolation data, the method further includes:

[0098] The completed interpolation times and the total interpolation times are extracted from the first interpolation data, and the completed interpolation times are incremented by one after each cycle; if the completed interpolation times are greater than or equal to the total interpolation times, or the buffer time is 0, it is determined that the stop control is completed.

[0099] When the number of completed interpolation times is greater than or equal to the total number of interpolation times, it indicates that the interpolation is completed. When the interpolation is completed, it indicates that the robot has moved to the end point and naturally stops according to the original plan, and the speed is also 0.

[0100] When BufferTime is 0, it means that the robot only runs the displacement corresponding to 0 interpolation cycles in one interpolation cycle. The displacement corresponding to 0 interpolation cycles is 0. The robot moves 0 meters in each cycle. In this way, the robot stops moving and the speed drops to 0.

[0101] For example, (1) if the number of interpolation times X>=Y, it means that the interpolation is complete. Assume that Y=100, Windows=15, and when the running state machine reaches X=90, the stop command is triggered. The stop state machine then continues to interpolate from the 90th point. After interpolation for 10 times, it reaches the end point, so the robot stops. This is the first stop situation, and the Gaussian filter stops before it is completely run.

[0102] (2) BufferTime = 0. Assume that Y = 100, Windows = 15, and when X = 80 is reached in the running state machine, the stop command is triggered. After 15 more interpolations, all the numbers in Buffer[1] to Buffer

[15] become 0. At this time, BufferTime = 0, and the interpolation displacement NewLength also becomes 0. That is, from then on, the robot moves 0 meters in each interpolation cycle. This is the second stop situation. The interpolation is not completed, and the robot just keeps standing still (remaining stationary).

[0103] The embodiment of the present application obtains the first interpolation data corresponding to each remaining cycle in the first motion plan, performs secondary planning based on the first interpolation data to obtain the second interpolation data, and then controls the movement of the robot in the next cycle based on the second interpolation data until it stops. This ensures that no matter what kind of operating speed plan the robot is based on during the movement process, stop control can be completed, and there is no need to develop a stop speed plan that matches different operating speed plans separately, thereby improving development efficiency.

[0104] In another embodiment of the present application, Figure 5 As shown, step S102 determines the second interpolation data of the next cycle based on the first interpolation data, including:

[0105] Step S201, determining a window value of a Gaussian filter according to the first interpolation data;

[0106] In this step, the deceleration time corresponding to the first motion plan can be determined according to the maximum acceleration of the deceleration segment, the jerk of the deceleration segment and the maximum running speed, and then the window value of the Gaussian filter can be determined according to the deceleration time.

[0107] Specifically, the window value setting of the Gaussian filter can refer to the following formula:

[0108]

[0109] Windows=Round(Tdec)

[0110] Among them, Tdec is the original planned deceleration time, Dec is the maximum acceleration of the deceleration section, Jerk is the jerk of the deceleration section, that is, the derivative of the acceleration of the deceleration section, Vmax is the maximum running speed, Windows is the window value of the Gaussian filter, and the Round() function is to divide Tdec by the interpolation period and then round it. Among them, the Gaussian filter window value can be understood as the size of an array from the perspective of data structure, and can be understood as the time required to stop from the perspective of physical meaning.

[0111] Step S202, determining a buffer array based on the first interpolation data and the window value of the Gaussian filter;

[0112] This step is to initialize the buffer array Buffer. Specifically, the size of the buffer array can be determined according to the window value of the Gaussian filter; the interpolation period can be extracted from the first interpolation data; and the buffer array can be generated based on the size of the buffer array and the interpolation period.

[0113] Specifically, the size of the buffer array Buffer can be set to the window value Windows; all values ​​in the buffer array Buffer can be set to the interpolation cycle CycleTime; and the search value Index=0 can be initialized.

[0114] The principle of Gaussian filter can be simplified as follows: Assuming the window value Windows is 100 and the interpolation cycle CycleTime is 1 second, the initial average value of the Buffer array is 1 second. When entering the first interpolation, change the first number from 1 second to 0 seconds, and then calculate the average value to be 0.99 seconds. When entering the second interpolation, change the second number from 1 to 0, and then calculate the average value to be 0.98 seconds... and so on. When entering the 100th interpolation, the average value of the Buffer array is 0. The above "average value" is the buffer time BufferTime, but such filtering can only be said to be a "mean" filter because it uses "average distribution". The Gaussian filter uses "Gaussian normal distribution" instead of "average distribution". It does not calculate the "average value" of the Buffer array, but calculates its "Gaussian value" and outputs it as the buffer time BufferTime.

[0115] Step S203: Based on the first interpolation data, the window value of the Gaussian filter, the buffer array and the Gaussian filter, weighted processing is performed on the first interpolation data to obtain second interpolation data.

[0116] In the embodiment of the present application, it is necessary to set the parameters of the Gaussian filter, that is: set the mean μ = 0; set the standard deviation σ = 1, let the number of completed interpolation times X = X + 1, start the Xth interpolation, and then execute the Gaussian filter. The input parameters of the Gaussian filter include: window value Windows; buffer array Buffer[1] ~ Buffer[Windows]; Gaussian function parameters μ, σ; index value Index.

[0117] Then, the current index value corresponding to the buffer array is obtained, and the index value is incremented by one after each cycle; the interpolation cycle corresponding to the current index value in the buffer array is set to 0. That is, the number of Index in the buffer array Buffer is set to 0, and then the Index is incremented by 1, which can be referred to the following formula:

[0118] Buffer[Index]=0

[0119] Index=Index+1

[0120] In this step, an interpolation displacement array may be extracted from the first interpolation data; based on the first interpolation data, the Gaussian probability of the next cycle and the mathematical expectation of the buffer array may be determined;

[0121] Specifically, the Gaussian probability Gsum of the current cycle and the mathematical expectation Sum of the buffer array Buffer can be calculated according to the following formulas:

[0122]

[0123]

[0124] Gsum is the Gaussian probability, Sum is the mathematical expectation of the buffer array, which can be simply understood as: Gsum is the total number, Sum is the total number, BufferTime = total number / total number, and a number similar to the average value is obtained. The corresponding meanings of the remaining parameters have been supplemented, among which Windows, μ, σ are set values, and Buffer[i] can be regarded as a function of i in the integral, and i is just an operator.

[0125] Then, a buffer time is determined based on the Gaussian probability and the mathematical expectation; and the second interpolation data is determined based on the buffer time and the interpolation displacement array.

[0126] Specifically, the buffer time and the new interpolation displacement (ie, the second interpolation data) NewLength can be calculated using a Gaussian filter:

[0127]

[0128] NewLength[X]=OldLength[X]×BufferTime

[0129] The initial value of the buffer time BufferTime is CycleTime. Every time the stop state machine runs a cycle, BufferTime will decrease. After running Windows cycles, BufferTime will decrease to 0.

[0130] Interpolation displacement is a quantity that represents distance, which is the distance the robot moves. Interpolation displacement is obtained through the planner, which mainly implements speed planning. For example, it takes 10 meters to walk from point A to point B. If the robot's interpolation cycle is 0.1 seconds, it takes 10 seconds, or 100 interpolation cycles, to complete this displacement at a uniform speed of 1 meter per second. That is, 10 meters is divided into 100 parts, each of which is 0.1 meters, and the robot walks 0.1 meters in each interpolation cycle. The final 100 parts of 0.1 meter displacement are the interpolation displacement output by the planner.

[0131] After the second interpolation data is obtained, the second interpolation data NewLength[X] is uploaded to the motion drive module, and the robot is driven to perform a displacement of a corresponding length to complete the Xth interpolation.

[0132] For example, assume that the robot is always moving at a constant speed, the interpolation displacement of each interpolation cycle is 0.1 meters, the interpolation cycle is 0.1, and the total number of interpolations is 5. Then OldLength[1]~OldLength[5] are all 0.1, that is, the speed of the robot in these 5 interpolation cycles is 1 m / s. If the first cycle is, a stop command is triggered, and the method of the present invention is used to weight OldLength, and NewLength[1]~NewLength[5] are obtained to be equal to 0.1, 0.6, 0.2, 0, 0 respectively, then the corresponding speeds are 1 m / s, 0.6 m / s, 0.2 m / s, 0 m / s, 0 m / s, thereby achieving deceleration.

[0133] On the one hand, since the present application uses a Gaussian filter to perform weighted processing on the first interpolated data, the characteristics of Gaussian filtering are utilized, and the Gaussian filter is applied to the Gaussian distribution function (normal distribution function), so that the second interpolated data also has the characteristics of the Gaussian distribution function, that is, continuous and differentiable, and the curve is soft. Acceleration is directly proportional to force (according to Newton's second law F=ma), which means that the change in force is softer when the robot stops, thereby reducing jitter. Since the acceleration image of the T-type deceleration curve in the prior art is step-like and discontinuous, and the acceleration image of the S-type deceleration curve is a trapezoid, which is continuous but not differentiable, the stopping effect of the embodiment of the present application is better than the speed planning method in the prior art.

[0134] On the other hand, if the stop command is triggered during the deceleration phase, assuming that the deceleration in the original motion plan is already very large, the speed will drop to 0 in 1 second. When the stop command is triggered, the motion will be replanned. Although the speed will be greater, the deceleration will increase from 0 again, and it may take 2 seconds to drop the speed to 0. The longer the time, the longer the movement distance, so it is possible to exceed the target point.

[0135] The use of Gaussian filtering for deceleration does not re-plan the movement, but performs secondary planning on the output of the original plan. For example, assuming that the interpolation period is 1 second, the displacement of each cycle output of the original deceleration section is: 1, 0.8, 0.6, 0.4, 0.2, 0, and a total distance of 3 is run. The Gaussian stop planning performs secondary planning on its output, and the displacement after secondary planning is: 0.8, 0.64, 0.48, 0.32, 0.16, 0 (here the original planned output is simply multiplied by 0.8, while the present invention is multiplied by the multiple of the Gaussian function), and only a distance of 2.4 is run. This multiple will not be greater than 1, so in the deceleration section, the movement distance of the robot will only be smaller than the original plan, so it will definitely not exceed the target point. This is also one of the characteristics of Gaussian filtering, which solves the problem of exceeding the target point in the deceleration section.

[0136] At the same time, the window value of the Gaussian filter (the window value can be regarded as the deceleration time) is set to the time of the originally planned deceleration segment, ensuring that when the non-deceleration segment triggers the stop command, the stop deceleration time of the Gaussian filter is not greater than the originally planned deceleration time, thereby strictly ensuring that the robot will not stop beyond the target point.

[0137] For ease of understanding, Figure 6 As shown, the present application also provides an embodiment in practical application, as follows:

[0138] Step 1: The user triggers a stop command, the robot controller switches from the running state to the stopped state, and obtains all the current interpolation data OldData from the running state machine.

[0139] Step 2: Copy all the interpolation data OldData obtained to the stop state machine. The contents of OldData include:

[0140] (1) Interpolation cycle CycleTime;

[0141] (2) The number of interpolation completed is X;

[0142] (3) Total number of interpolation times Y;

[0143] (4) Interpolate the displacement array OldLength, the array size is Y;

[0144] Step 3: Gaussian filter window value setting:

[0145]

[0146] Windows=Round(Tdec)

[0147] Tdec is the original planned deceleration time, Dec is the maximum acceleration of the deceleration, Jerk is the jerk of the deceleration, Vmax is the maximum running speed, Windows is the Gaussian filter window value, and the Round() function is to divide Tdec by the interpolation period and then round it. Among them, the Gaussian filter window value can be understood as the size of an array from the perspective of data structure, and can be understood as the time required to stop from the perspective of physical meaning.

[0148] Step 4: Initialize the buffer array Buffer:

[0149] (1) Set the size of the array Buffer to Windows;

[0150] (2) Set all values ​​in the Buffer array to CycleTime;

[0151] (3) Initialize the search value Index = 0;

[0152] Step 5: Parameter setting of standard Gaussian function:

[0153] (1) Mean μ = 0;

[0154] (2) Standard deviation σ=1.

[0155] Step 6: Set the number of interpolation times X=X+1 and start the Xth interpolation.

[0156] Step 7: Execute Gaussian filter. Input parameters of Gaussian filter:

[0157] (1) Window value Windows;

[0158] (2) Buffer array Buffer[1]~Buffer[Windows];

[0159] (3) Gaussian function parameters μ, σ;

[0160] (4) Index value Index.

[0161] Step 8: Set the number of Index in the buffer array Buffer to 0, and then increment Index by 1:

[0162] Buffer[Index]=0

[0163] Index=Index+1

[0164] Step 9: The loop body in this step is an integrator, which calculates the Gaussian probability Gsum of the current cycle and the mathematical expectation Sum of the buffer array Buffer:

[0165]

[0166]

[0167] Step 10: Gaussian filter outputs buffer time and new interpolation displacement:

[0168]

[0169] NewLength[X]=OldLength[X]×BufferTime

[0170] The initial value of the buffer time BufferTime is CycleTime. Every time the stop state machine runs a cycle, BufferTime will decrease. After running Windows cycles, BufferTime will decrease to 0.

[0171] Step 11: Upload the NewLength[X] data to the motion drive module, drive the robot to move the corresponding length, and complete the Xth interpolation.

[0172] Step 12: Determine whether BufferTime is 0 or whether interpolation is completed. If not, jump to Step 5 to perform interpolation for the next cycle; if so, stop motion after completion.

[0173] The present application also conducted a comparative experiment, the control group - the stop control method of the traditional S-shaped speed planning curve, taking the S-shaped speed planning as an example, the stop speed planning curve is also the S-shaped speed planning, and the stop speed curve is as follows Figure 7 As shown in the figure, although the S-type stop curve fits the S-type speed curve well, it can only be used for the S-type speed curve. If it is used for other speed curves, due to the difference in speed characteristics, a large impact may occur (especially in the acceleration section).

[0174] Generally speaking, the initial velocity and initial acceleration of the running speed planning are 0, but the initial velocity and initial acceleration of the stopping speed planning are often not 0, and it is also difficult to accurately obtain the initial velocity and initial acceleration. Therefore, the development difficulty of the stopping speed planning is relatively large.

[0175] Experimental group: The stop control method proposed by the present invention is compatible with three different speed curves. The stop control method of the present invention is used to trigger the stop command in the uniform speed segment, acceleration segment, and deceleration segment of the three different speed curves, as shown in the attached figure. Figure 8 , Fig. 9 , Fig.10 As shown, the following conclusions can be drawn:

[0176] (1) Universality of the present invention. The stop control method of the present invention is applicable to different speed curves, and the speed can be smoothly reduced when a stop command is triggered at each stage.

[0177] (2) The present invention can avoid stopping the motion beyond the target point. The integral of the velocity curve after the stop command is triggered is not greater than the integral of the original planned curve, that is, the displacement after the stop command is triggered is not greater than the residual displacement of the original plan.

[0178] (3) The present invention can stop quickly and smoothly. In the acceleration section, the uniform speed section, and the deceleration section, the speed change curve is smooth, and the deceleration time of stopping is short, and the speed can be reduced to 0 quickly.

[0179] In another embodiment of the present application, Fig.11 As shown, a data processing device is also provided, comprising:

[0180] An acquisition module 11 is configured to acquire first interpolation data corresponding to each remaining period in the first motion plan if a trigger stop command is received during the movement of the robot according to the first motion plan;

[0181] A first determining module 12, configured to determine second interpolated data of a next period based on the first interpolated data;

[0182] The output module 13 is used to output the second interpolation data to control the robot to move according to the second interpolation data in the next cycle until the stop control is completed.

[0183] Optionally, the first determining module includes:

[0184] A first determining unit, configured to determine a window value of a Gaussian filter according to the first interpolation data;

[0185] A second determining unit, configured to determine a buffer array based on the first interpolation data and a window value of the Gaussian filter;

[0186] A weighted processing unit is used to perform weighted processing on the first interpolated data based on the first interpolated data, the window value of the Gaussian filter, the buffer array and the Gaussian filter to obtain second interpolated data.

[0187] Optionally, the first determining unit includes:

[0188] A first determination subunit is used to determine the deceleration time corresponding to the first motion plan according to the maximum acceleration value of the deceleration section, the jerk of the deceleration section and the maximum running speed;

[0189] The second determining subunit is used to determine the window value of the Gaussian filter according to the deceleration period.

[0190] Optionally, the second determining unit includes:

[0191] A third determining subunit, configured to determine the size of the buffer array according to the window value of the Gaussian filter;

[0192] A first extraction subunit, configured to extract an interpolation period from the first interpolation data;

[0193] A generating subunit is used to generate a buffer array based on the size of the buffer array and the interpolation period.

[0194] Optionally, the weighted processing unit includes:

[0195] A second extraction subunit, used for extracting an interpolation displacement array from the first interpolation data;

[0196] a fourth determining subunit, configured to determine the Gaussian probability of the next cycle and the mathematical expectation of the buffer array based on the first interpolation data;

[0197] a fifth determining subunit, configured to determine a buffer time based on the Gaussian probability and the mathematical expectation;

[0198] The sixth determining subunit is used to determine the second interpolation data based on the buffer time and the interpolation displacement array.

[0199] Optionally, the weighted processing unit further includes:

[0200] An acquisition subunit is used to acquire a current index value corresponding to the buffer array, and the index value is incremented by one after each cycle;

[0201] The setting subunit is used to set the interpolation period corresponding to the current index value in the buffer array to 0.

[0202] Optionally, the method further comprises:

[0203] An extraction module, used for extracting the number of completed interpolation times and the total number of interpolation times from the first interpolation data, wherein the number of completed interpolation times increases by one after each cycle;

[0204] The second determination module is used to determine that the stop control is completed if the number of completed interpolation times is greater than or equal to the total number of interpolation times, or the buffer time is 0.

[0205] In another embodiment of the present application, an electronic device is provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;

[0206] Memory, used to store computer programs;

[0207] The processor is used to implement the data processing method described in any of the preceding method embodiments of the claims when executing the program stored in the memory.

[0208] In the electronic device provided by the embodiment of the present invention, the processor executes the program stored in the memory to obtain the first interpolation data corresponding to each remaining cycle in the first motion plan, and performs secondary planning based on the first interpolation data to obtain the second interpolation data, and then controls the movement of the robot in the next cycle based on the second interpolation data until it stops, so that no matter what kind of operation speed plan is based on during the movement of the robot, the stop control can be completed, and there is no need to separately develop a stop speed plan that matches different operation speed plans, thereby improving development efficiency.

[0209] The communication bus 1140 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.12 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0210] The communication interface 1120 is used for communication between the above electronic device and other devices.

[0211] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0212] The above-mentioned processor 1110 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.

[0213] In another embodiment of the present application, a computer-readable storage medium is provided, on which a program of a data processing method is stored. When the program of the data processing method is executed by a processor, the steps of the data processing method described in any of the aforementioned method embodiments are implemented.

[0214] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0215] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A data processing method, It is characterized in that include: If a trigger stop command is received during the movement of the robot according to the first motion plan, first interpolation data corresponding to each remaining period in the first motion plan is obtained; Determine second interpolation data for the next cycle based on the first interpolation data; Determining second interpolation data of a next cycle based on the first interpolation data includes: Determine a window value of a Gaussian filter according to the first interpolation data; Determine a buffer array based on the first interpolation data and the window value of the Gaussian filter; Based on the first interpolation data, the window value of the Gaussian filter, the buffer array and the Gaussian filter, weighted processing is performed on the first interpolation data to obtain second interpolation data; The second interpolation data is output to control the robot to move according to the second interpolation data in the next cycle until the stop control is completed.

2. The data processing method according to claim 1, It is characterized in that Determining a window value of a Gaussian filter according to the first interpolation data includes: Determine the deceleration time corresponding to the first motion plan according to the maximum acceleration of the deceleration section, the jerk of the deceleration section and the maximum running speed; The window value of the Gaussian filter is determined according to the deceleration period.

3. The data processing method according to claim 1, It is characterized in that Determining a buffer array based on the first interpolation data and the window value of the Gaussian filter includes: Determine the size of the buffer array according to the window value of the Gaussian filter; extracting an interpolation period from the first interpolation data; A buffer array is generated based on the size of the buffer array and the interpolation period.

4. The data processing method according to claim 1, It is characterized in that Based on the first interpolation data, the buffer array, the window value and the Gaussian filter, weighted processing is performed on the first interpolation data to obtain second interpolation data, including: Extracting an interpolation displacement array from the first interpolation data; Determine the Gaussian probability of the next cycle and the mathematical expectation of the buffer array based on the first interpolation data; Determining a buffer time based on the Gaussian probability and the mathematical expectation; The second interpolation data is determined based on the buffer time and the interpolation displacement array.

5. The data processing method according to claim 1, It is characterized in that Based on the first interpolation data, the buffer array, the window value and the Gaussian filter, weighted processing is performed on the first interpolation data to obtain second interpolation data, further comprising: Get the current index value corresponding to the buffer array, and the index value increases by one after each cycle; The interpolation period corresponding to the current index value in the buffer array is set to 0.

6. The data processing method according to claim 4, It is characterized in that The method further comprises: Extracting the number of completed interpolation times and the total number of interpolation times from the first interpolation data, wherein the number of completed interpolation times increases by one after each cycle; If the completed interpolation times are greater than or equal to the total interpolation times, or the buffer time is 0, it is determined that the stop control is completed.

7. A data processing device, It is characterized in that include: An acquisition module, configured to acquire first interpolation data corresponding to each remaining period in the first motion plan if a trigger stop command is received during the movement of the robot according to the first motion plan; A first determining module, configured to determine second interpolated data of a next cycle based on the first interpolated data; The first determining module comprises: A first determining unit, configured to determine a window value of a Gaussian filter according to the first interpolation data; A second determining unit, configured to determine a buffer array based on the first interpolation data and a window value of the Gaussian filter; a weighted processing unit, configured to perform weighted processing on the first interpolated data based on the first interpolated data, the window value of the Gaussian filter, the buffer array and the Gaussian filter to obtain second interpolated data; The output module is used to output the second interpolation data to control the robot to move according to the second interpolation data in the next cycle until the stop control is completed.

8. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the data processing method according to any one of claims 1 to 6 when executing a program stored in a memory.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a program of a data processing method, and when the program of the data processing method is executed by a processor, the steps of the data processing method described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Industrial robot stop motion trajectory planning method

    CN111015669A