Robot speed control method and device and storage medium

By introducing speed change requests and adjustment flags, combined with state machine management, the robot speed control process is simplified, solving the problem of low maintenance efficiency caused by complex speed adjustment in existing technologies, and achieving simpler speed control and higher maintenance efficiency.

CN121733531APending Publication Date: 2026-03-27QKM TECH (DONG GUAN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, robot speed adjustment is complex, resulting in low maintenance efficiency. This is especially true for robots with dynamically configurable online debugging functions, where the independent setting of speed control logic makes maintenance difficult.

Method used

By adding speed change request identifiers and speed change adjustment identifiers, the issuance of speed change adjustment requests and the actual speed change process are decoupled, simplifying the program control logic. A state machine is used to manage speed adjustment, and discrete position points are sampled based on the initial trajectory, simplifying the speed control logic.

Benefits of technology

This simplifies robot speed control, improves maintenance efficiency, and simplifies speed control logic, making it easier to control the robot at different speeds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121733531A_ABST
    Figure CN121733531A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a robot speed control method and device and a storage medium, and belongs to the technical field of robot control. The method comprises the steps that when a target robot is in an execution state and a speed change request identifier is a first identifier value, a target speed change process is executed according to a speed change adjustment identifier, the speed change request identifier is updated to a preset initial value, and the speed change adjustment identifier is set to be a second identifier value; when the planning of the motion control parameters of the last instruction issuing period of the speed change duration is completed, the speed change adjustment identifier is set to be an initial value, and the target speed change process is ended; wherein the target speed change process is used for enabling the speed of the target robot to be in smooth transition from the speed change starting position to the target position within the speed change duration when the speed change request identifier is set to be the first identifier value. According to the embodiment of the invention, through the speed change adjustment identifier and the speed change request identifier, a response can be made immediately after the speed change adjustment request is received in the speed change adjustment process, and meanwhile, the maintenance efficiency of the robot is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of robot control technology, and in particular to a robot speed control method, device and storage medium. Background Technology

[0002] Before a robot can move, it needs to perform offline trajectory planning based on preset trajectory parameters (such as initial and final distances, initial and final velocities, maximum speed, maximum acceleration, and acceleration ramp time). When the robot is moving on the pre-planned trajectory, if the speed needs to be adjusted to meet different application requirements, a new trajectory needs to be planned. Then, the start and end points of the transition segment are determined from the two planned trajectories, and the old and new trajectories are switched based on the transition segment. However, this method is relatively complex. Although existing technologies provide methods for dynamically adjusting the speed along the original planned trajectory, the related functions are often set independently. For robots with dynamically configurable online debugging functions, the maintenance efficiency is low. Summary of the Invention

[0003] The main objective of this application is to provide a robot speed control method, device, and storage medium that can improve robot maintenance efficiency.

[0004] To achieve the above objectives, a first aspect of this application provides a robot speed control method, the method comprising: In response to the target robot being in a ready state, both the speed adjustment flag and the speed request flag are set to preset initial values, and an initial trajectory is planned according to preset maximum theoretical planning parameters, and the robot enters the execution state; the speed request flag is set to the first flag value by the speed adjustment request; the speed adjustment request is used to make the target robot reach a target speed that is a preset speed coefficient of the planned speed at the same position on the initial trajectory. In response to the target robot being in the execution state and the speed change request identifier being the first identifier value, a target speed change process is executed according to the speed change adjustment identifier, wherein, in the target speed change process, the speed change request identifier is updated to a preset initial value and the speed change adjustment identifier is set to a second identifier value within a preset speed change duration; Once the motion control parameters for the last instruction issuance cycle within the specified shift duration have been issued in the target shift process, the shift adjustment flag is set to the corresponding initial value, and the target shift process ends. The target speed change process is used to determine the discrete speed change position points obtained by the target robot from sampling the initial trajectory in each instruction issuance cycle corresponding to the speed change duration when the speed change request identifier is set to the first identifier value, and to determine motion control parameters based on the discrete speed change position points. The speed of each discrete speed change position point is smoothly transitioned to the discrete position point of the previous instruction issuance cycle.

[0005] To achieve the above objectives, a second aspect of the present application provides a control device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the robot speed control method as described in any one of the first aspects.

[0006] To achieve the above objectives, a third aspect of the present application provides a robot device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the robot speed control method as described in any of the first aspects.

[0007] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the robot speed control method described in any of the first aspects.

[0008] The robot speed control method, device, and storage medium proposed in this application identify whether a target speed change process is being executed by adding a speed adjustment flag. This allows for the decoupling of the speed adjustment request issuance and the actual speed change process using only the speed request flag and the speed adjustment flag, enabling rapid response to speed adjustment requests issued at different times. Furthermore, binding the speed change process to the target robot's state further simplifies the program control logic and maintenance process of the speed change process. Since both before and after the speed change are based on discrete position point sampling from the initial trajectory, different speeds can be controlled simply by changing the step size of each instruction issuance cycle under different speed requests. Therefore, compared with related technologies, the embodiments of this application simplify the implementation logic of speed control within the robot, making speed control simpler and improving robot maintenance efficiency. Attached Figure Description

[0009] Figure 1 This is a flowchart illustrating an embodiment of the robot speed control method provided in this application; Figure 2 This is a schematic diagram of the state transition of an embodiment of the state machine in the robot speed control method provided in this application; Figure 3This is a schematic diagram of the robot's program framework in the robot speed control method provided in this application; Figure 4 This is a schematic diagram illustrating the execution of another embodiment of the robot speed control method provided in this application; Figure 5 This is a schematic diagram of the position trajectory interpolation sampling of the initial trajectory when no speed adjustment request has been issued in one embodiment of the robot speed control method provided in this application; Figure 6 This is a schematic diagram of the speed change model in the robot speed control method provided in this application. Figure 7 This is a comparative schematic diagram of the difference in position trajectory before and after triggering a speed adjustment request in one embodiment of the robot speed control method provided in this application; Figure 8 This is a hardware schematic diagram of the control device corresponding to the robot speed control method provided in this application. Detailed Implementation

[0010] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0011] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0012] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0013] The following is an explanation of the terms used in the embodiments of this application: Trajectory planning involves finding a curve that connects the starting and ending points and satisfies constraints. The output of trajectory planning is an 8-bit array recording the inflection point information of the trajectory, which includes time series, jerk series, acceleration series, velocity series, and position series. Adjacent trajectory inflection point information forms a trajectory segment.

[0014] S-velocity curve: The S-velocity curve consists of 7 trajectory segments, namely acceleration, uniform acceleration, deceleration, uniform speed, acceleration / deceleration, uniform deceleration, and deceleration / deceleration segments.

[0015] Inflection point: The intersection between adjacent trajectory segments, including the starting point and the ending point.

[0016] Steps: The trajectory obtained from trajectory planning is discrete, therefore the time series (time_series) is also discrete, and the total length of the time series is the total number of steps. The ratio of the current step to the total number of steps represents the current position relative to the entire trajectory. Each instruction issuance cycle... Take another step forward.

[0017] Reference Figure 1 As shown, a robot speed control method according to an embodiment of this application includes: Step S100: In response to the target robot being in the ready state, both the speed adjustment flag and the speed request flag are set to preset initial values, and the initial trajectory is planned according to the preset maximum theoretical planning parameters and the execution state is entered; the speed request flag is set to the first flag value by the speed adjustment request; the speed adjustment request is used to make the target robot reach the target speed of the preset speed coefficient at the same position of the initial trajectory. Step S200: In response to the target robot being in the execution state and the speed change request identifier being the first identifier value, the target speed change process is executed according to the speed change adjustment identifier, wherein the speed change request identifier is updated to a preset initial value and the speed change adjustment identifier is set to the second identifier value within a preset speed change duration. Step S300: In the last instruction issuance cycle within the completed shift duration of the target shift process, the motion control parameters are issued, the shift adjustment flag is set to the corresponding initial value, and the target shift process is terminated. The target speed change process is used to determine the discrete speed change position points obtained by sampling the initial trajectory of the target robot in each instruction issuance cycle corresponding to the speed change duration when the speed change request identifier is set to the first identifier value, and to determine the motion control parameters based on the discrete speed change position points. The speed of each discrete speed change position point is smoothly transitioned to the discrete position point of the previous instruction issuance cycle.

[0018] Therefore, by adding a speed change request identifier to identify the issuance of speed adjustment requests, and by adding a speed adjustment identifier to identify whether the target speed change process is being executed, the issuance of speed adjustment requests and the actual speed change process can be decoupled using only the speed change request identifier and the speed adjustment identifier. This allows for rapid response to speed adjustment requests issued at different times. Furthermore, binding the speed change process to the state of the target robot further simplifies the program control logic and maintenance process of the speed change process. Since both before and after the speed change are based on the sampling of discrete position points on the initial trajectory, different speeds can be controlled simply by changing the step size of the number of steps in each instruction issuance cycle under different speed requests. Therefore, the embodiments of this application can simplify the implementation logic of speed control within the robot, making speed control simpler and improving the maintenance efficiency of the robot.

[0019] The ready state and the execution state are both states in the target robot's state machine. Since the paths of different states are fixed, the control logic for online speed control based on the state machine is simpler. Specifically, the ready state indicates that the target robot is in the initialization phase, and the execution state indicates that the target robot is in motion. In some embodiments, such as... Figure 2 As shown, the state machine also includes a completion state, a paused state, a terminated state, and a return state. In the preparation state, once trajectory planning is complete, it will trigger the entry into the execution state. While in the execution state, depending on the actual triggering conditions, it will either trigger the entry into the completion state or the terminated state. For example, receiving a stop command triggers the paused state; pressing the emergency stop button triggers the terminated state; reaching the destination of the trajectory triggers the completion state, and so on. When in the completion state, it will choose to enter either the preparation state or the execution state based on the triggering conditions. If the conditions for restarting motion are met without any abnormalities, it will trigger the preparation state. If an abnormality exists (entering the completion state from the terminated state) and the conditions for restarting motion are met, it will re-enter the execution state. When in the terminated state, it will trigger the entry into the completion state upon program termination, or the execution state upon receiving a retry command without needing to restore the original trajectory, or the return state upon receiving a retry command and needing to restore the original trajectory. When in the paused state, it will trigger the entry into the stop state upon deceleration and stopping. When in the return state, it will trigger the entry into the execution state after returning to the trajectory starting point. In this way, managing the speed change process using the target robot's state machine can improve maintenance efficiency.

[0020] This application embodiment does not limit the specific values ​​of the first and second identifier values. The first and second identifier values ​​can be the same, such as both being 1, or they can be different. This application embodiment does not limit whether the initial values ​​of the shift request identifier and the shift adjustment identifier are the same, nor does it limit the values ​​of the initial values. Those skilled in the art can selectively set them according to actual needs.

[0021] The "speed change request flag" indicates whether a speed change has occurred, while the "speed change adjustment flag" indicates whether a speed change is currently in progress. If the speed change adjustment flag is at its initial value, it means the process has transitioned from normal motion to the target speed change flow. In some embodiments, the speed change adjustment flag is at a second flag value, indicating that a speed change adjustment request has been triggered again while the process is currently in the target speed change flow. Different values ​​of the speed change adjustment flag result in different corresponding business logic for the target speed change flow, thus enabling speed change scenarios from normal motion to re-planning motion control parameters during the speed change process. For example, assuming both the first and second identifier values ​​are 1, and the initial values ​​are both 0, and the target speed change process is determined by using an Nth-order polynomial curve (such as a fifth-order polynomial curve) constructed based on the starting speed and ending speed to determine the speed change step size for each instruction issuance cycle, when a speed change is detected at time t, the "speed change request identifier" is first set to 1, and then the Nth-order polynomial curve parameters of the speed change step size kt are set according to the "speed change adjustment identifier". If the speed change is not currently underway, i.e., the "speed change adjustment identifier" is 0, then the initial first and second derivatives of the Nth-order polynomial curve of the speed change step size kt are 0, i.e., the kt value is adjusted starting from a fixed kt value. If the speed change is already underway at time t, i.e., the "speed change adjustment identifier" is 1, then the initial first and second derivatives of the new kt Nth-order polynomial curve are taken from the initial first and second derivatives of the fifth-order polynomial curve of kt at time t, i.e., the kt value is adjusted starting from the changing kt value. Finally, the already changed speed time is reset to 0, the counting starts again, and the "Change Speed ​​Request Flag" is set to 0 to wait for the next change speed request. The "Change Speed ​​Adjustment Flag" is set to 1 to indicate that a change speed is in progress. In this way, when the kt value is on a certain segment of the fifth-degree polynomial curve, the change speed request can be reacted immediately, and a smooth fifth-degree polynomial curve can be generated again at that point.

[0022] This application does not limit the adjustment parameters included in the speed adjustment identifier. In some embodiments, the adjustment parameter includes a percentage representing the speed, indicating that the expected actual movement of each discrete position point is a percentage of the speed of the same discrete position point on the initial trajectory. In other embodiments, the adjustment parameter includes a target speed at a specified position.

[0023] This application does not impose any restrictions on how to sample discrete speed change position points, nor on how to ensure a smooth transition. For example, in some embodiments, different speed change step sizes can be set for each instruction issuance cycle corresponding to the speed change duration, thereby ensuring a smooth transition in speed between adjacent related discrete position points through different speed change step size settings.

[0024] Understandably, the execution of the target speed change process includes: When the shift adjustment flag is at its initial value, set the shift adjustment flag to the second flag value and update the shift request flag to the preset initial value, and then perform the following steps: The next instruction issuance cycle after the instruction issuance cycle when the target speed change process starts is taken as the first instruction issuance cycle to be planned for the preset speed change duration. Determine the first speed increase / decrease and the first speed coefficient. The first speed coefficient represents the speed ratio between the actual speed at the start of the target speed change process and the planned speed at the same position on the initial trajectory. The first speed increase / decrease represents the speed coefficient difference between the second speed coefficient and the first speed coefficient when the speed change adjustment request is met. Input the first speed increase / decrease, the first speed coefficient, and the planning duration of the current planned instruction issuance cycle into the preset speed change model to determine the first speed change step of each planned instruction issuance cycle within the speed change duration. Based on each first speed change step, determine the first motion control parameters for the corresponding instruction issuance cycle to be planned.

[0025] The currently planned instruction issuance cycle indicates that the speed change step planning has not been completed within the speed change duration and the remaining cycle is the first instruction issuance cycle waiting to be planned. For example, if the speed change duration includes 5 instruction issuance cycles, after the speed change step planning for the 2nd instruction issuance cycle is completed, the 3rd instruction issuance cycle will be the currently planned instruction issuance cycle.

[0026] This application does not impose constraints on how to determine the first speed increase / decrease and the first speed coefficient. For example, regarding the first speed coefficient, the actual speed of the instruction issuance cycle preceding the first planned instruction issuance cycle within the shift duration (i.e., the instruction issuance cycle in which the target shift process starts) is determined. Since the initial trajectory is known, the corresponding planned speed can be determined based on the initial trajectory when the position is known. Dividing the actual speed by the planned speed at that position yields the first speed coefficient. In some embodiments, speed control is based on a configured speed percentage before entering the shift process; therefore, this speed percentage can be directly obtained as the first speed coefficient. This application does not limit the first speed increase / decrease. In some embodiments, the shift adjustment request is set based on the speed increase / decrease; in this case, the speed increase / decrease in the shift adjustment request can be directly used as the first speed increase / decrease. In other embodiments, the shift adjustment request is set based on a second speed coefficient; in this case, the second speed coefficient is directly extracted, and the difference between the first speed coefficient and the second speed coefficient is used as the first speed increase / decrease. This application does not elaborate on these points individually; those skilled in the art can selectively set them according to actual conditions.

[0027] The variable speed model is a machine learning model, which can be an Nth-order polynomial model or other models. This application does not limit the specific models used. The variable speed model represents the relationship between the variable speed step size corresponding to each instruction issuance cycle to be planned and the planning time. The first speed increase / decrease and the first speed coefficient are used to determine the variable coefficients (including the coefficients of the constant term and the coefficients of the variable term) in the variable speed model.

[0028] In this embodiment, it is not limited whether the first speed change step of each planned instruction issuance cycle is calculated in one go or distributed in the calculation of each actual issuance cycle. Those skilled in the art can selectively set it according to the actual situation.

[0029] By using a variable speed model to plan the first speed change step size for multiple command issuance cycles of the first speed increase or decrease, the adjustment of speed variables can be simplified while ensuring the smoothness of speed changes.

[0030] This application does not restrict whether the first motion control parameter is obtained in real time during the corresponding instruction issuance cycle. Those skilled in the art can selectively set it according to actual needs.

[0031] The planning duration represents the proportion of the shift time from the start of shifting to the current planned command issuance cycle to the total shift duration. It can be determined based on specific time values ​​or directly as a percentage of the cycle count. For example, if the current command issuance cycle is the k-th command issuance cycle within the shift duration, then the planning duration is k * cycle duration / shift duration. In some embodiments, the planning duration can also be k / cnt, where cnt is the total number of cycles within the shift duration.

[0032] Understandably, the speed change model is an Nth-order polynomial model. The first speed increase / decrease, the first speed coefficient, and the planning duration are input into the preset speed change model to determine the first speed change step in each planned instruction issuance cycle within the speed change duration, including: Configure the planning duration as the variable value of the variable factor in an Nth-order polynomial model; Configure the first velocity coefficient as the constant term coefficient of the Nth-order polynomial model; The increase or decrease in the first speed is configured as the changing part of the coefficients of different orders in the Nth order polynomial model, so as to obtain the coefficients of different orders. By using a pre-configured Nth-order polynomial model, the first variable-speed step size is obtained, which corresponds one-to-one with the planning duration.

[0033] This application does not limit the order of the Nth-order polynomial in its embodiments; those skilled in the art can selectively set it according to actual conditions. For example, in some embodiments, N is 3, in others N is 5, and in still others N is 7. Since the coefficients of different orders are set to consist of a changing part and a fixed part, and when the planning duration is 0, the dependent variable of the Nth-order polynomial model is the known initial velocity coefficient (e.g., the first velocity coefficient), and when the planning duration is the speed change duration, the dependent variable of the Nth-order polynomial model is the target velocity coefficient after the speed change (e.g., the second velocity coefficient), the fixed value of the fixed part can be pre-solved for the Nth-order polynomial and configured in the control device. Then, during robot operation, only the changing part needs to be updated in real time to the speed increase or decrease, thus determining the coefficients of different orders to adapt to speed changes in different scenarios. For example, taking a speed change model constructed based on a third-order polynomial as an example, the speed change model satisfies the following formula: (1) Among them, the planning duration ; This characterizes the runtime of the instruction issuance cycle to be planned within the variable speed duration. Characterizing the duration of speed change, This indicates the variable step distance to be solved; the instruction issuance cycle to be planned indicates the instruction issuance cycle for which the variable step distance needs to be determined. Indicates the initial velocity coefficient. Indicates the target velocity coefficient. This represents the speed increase / decrease coefficient. Substituting the first speed coefficient and the first speed increase / decrease into formula (1), the first speed change step distance is determined by the planning time corresponding to different instruction cycles.

[0034] For example, in some other embodiments, taking the variable speed model as an example of being constructed based on a fifth-order polynomial, the variable speed model satisfies the following formula: (2) Among them, the planning duration Substituting the first speed coefficient and the first speed increase / decrease into formula (2) yields the first speed change model.

[0035] Understandably, the execution of the target speed change process includes: When the gear shift adjustment flag is the second flag value and the gear shift request flag is the first flag value, update the gear shift request flag to the preset initial value and reset the planning duration, and perform the following steps: Determine the second speed increase / decrease and the third speed coefficient; the third speed coefficient represents the speed ratio between the actual speed in the current command issuance cycle and the planned speed at the same position on the initial trajectory; the second speed increase / decrease represents the speed coefficient difference between the fourth speed coefficient and the third speed coefficient when the most recent speed adjustment request is met. Substitute the second speed increase / decrease, the third speed coefficient, and the planning duration of the current instruction issuance cycle into the preset speed change model to determine the second speed change step of the current instruction issuance cycle. Based on each second speed change step, determine the second motion control parameters and update planning time corresponding to each planned instruction issuance cycle within the speed change duration.

[0036] Resetting the planning duration means setting the planning duration of the current instruction issuance cycle or the next instruction issuance cycle to 1, so that the current instruction issuance cycle or the next instruction issuance cycle to be planned is used as the first instruction issuance cycle to be planned in the shift duration to re-plan the shift step.

[0037] For example, assuming the target speed change process is started at time t1, and a new speed adjustment request is received after the first motion control parameter A is planned in the k-th instruction issuance cycle of the speed change duration of the target speed change process, the planning duration is reset. At this time, the (k+1)-th instruction issuance cycle is taken as the first instruction issuance cycle to be planned for the speed change duration, and the speed change step is planned starting with the speed coefficient in the first motion control parameter A. Then, for the (k+1)-th instruction issuance cycle to be planned, 1 / cnt is taken as the planning duration of the instruction issuance cycle to be planned. Substituting the second speed increase / decrease, the third speed coefficient, and 1 / cnt into formula (1) or formula (2) can determine the second speed change step.

[0038] Understandably, the speed change model is either a third-order polynomial model or a fifth-order polynomial model. The planning duration represents the ratio of the speed change time to the speed change duration for the corresponding instruction issuance cycle to be planned. For example, in some embodiments, the planning duration is the ratio of the sequence number of the instruction cycle to be planned to the total number of instruction cycles within the speed change duration. In other embodiments, the planning duration is the ratio of the speed change time to the speed change duration for the corresponding instruction issuance cycle to be planned.

[0039] The third-order polynomial model or the fifth-order polynomial model can be selected according to the robot's hardware parameters. This application will not elaborate further on this aspect in its embodiments.

[0040] Understandably, based on each first speed change step, the first motion control parameters for the corresponding instruction issuance cycle to be planned are determined, including: Obtain the cumulative initial value of the step size corresponding to the previous instruction issuance cycle of the instruction issuance cycle to be planned; Based on the initial cumulative step size and the corresponding first variable speed step size, determine the cumulative transition value of the step size for each instruction issuance cycle to be planned; The actual running time of the trajectory is determined based on the cumulative step size transition value, the cycle duration of the corresponding instruction issuance cycle to be planned, and the cumulative step size value of the starting point of the target trajectory segment; the target trajectory segment is the trajectory segment of the instruction issuance cycle to be planned in the initial trajectory. Based on the actual running time of the trajectory and the position function of the target trajectory segment, the first discrete position point corresponding to the instruction issuance cycle to be planned is obtained; wherein, the first discrete position point is one of the first motion control parameters.

[0041] The initial value of the cumulative step length is the cumulative value of the step length of each instruction issuance cycle that has actually been run. For example, taking the initial trajectory starting point as an example, if the speed is 70%, then the step length of each instruction issuance cycle is k, and the initial value of the cumulative step length is 0.7*k. By accumulating based on the actual step length, time regularization can be achieved, so that the variable speed step distance must be within the range of [0,1], and the speed actually planned will not exceed the maximum speed supported by the target robot. At this time, the actual running time of the trajectory satisfies the following formula (3): (3) in, This represents the cumulative step size from the starting point. This represents the cumulative transition value of the step size. Indicates the actual running time of the trajectory. This refers to the duration of the instruction issuance cycle.

[0042] For example, the position function is shown in formula (4): (4) in, This indicates the starting position (i.e., the origin) of the target trajectory segment. The initial planning velocity indicates the starting position of the target trajectory segment. The initial acceleration indicates the starting planned position of the target trajectory segment; The initial jerk indicates the starting planned position of the target trajectory segment.

[0043] Understandably, determining the first motion control parameters for the corresponding instruction issuance cycle to be planned, based on each first speed change step, also includes at least one of the following: Based on the actual running time of the trajectory and the velocity function corresponding to the target trajectory segment, the velocity of the first discrete position point corresponding to the instruction issuance cycle to be planned is obtained. Based on the second discrete position point and the first discrete position point of the previous instruction issuance cycle of the instruction issuance cycle to be planned, the velocity of the first discrete position point corresponding one-to-one with the instruction issuance cycle to be planned is obtained. Among them, the velocity at the first discrete position point is one of the first motion control parameters.

[0044] This application does not limit the method of determining the first discrete velocity. In some embodiments, the first discrete velocity and the first discrete position can be determined based on a velocity function and a position function, respectively. In other embodiments, the first discrete position point can be determined based on a position function, and the first discrete velocity can be determined based on the first discrete position point and the second discrete position point.

[0045] For example, in some embodiments, the first discrete velocity It can be obtained through the following formula (5): (5); in, This indicates the speed step size of the current planned instruction issuance cycle. This represents the discrete speed of the instruction issuance cycle to be planned. The initial planning acceleration is the initial planning position for the target trajectory segment. Accelerate the initial planning of the target trajectory segment's starting position. This represents the actual running time of the trajectory. At this point, the velocity function is as shown in formula (5). As shown, the velocity of the first discrete position point can be obtained by substituting the actual running time of the trajectory and the first variable speed step size into formula (5). .

[0046] In other embodiments, the first discrete velocity It can be obtained through the following formula (6): (6) in, Indicates the duration of the period. This represents a discrete position point in the current planned instruction issuance cycle. This represents the discrete position point of the previous instruction issuance cycle of the current planned instruction issuance cycle. Substituting the first discrete position point, the second discrete position point, and the cycle duration into this value yields the velocity at the first discrete position point.

[0047] Understandably, determining the first motion control parameters for the corresponding instruction issuance cycle to be planned, based on each first speed change step, also includes at least one of the following: Based on the actual running time of the trajectory and the acceleration function corresponding to the target trajectory segment, the discrete position point accelerations corresponding one-to-one with the instruction issuance cycle to be planned are obtained. Based on the velocity of the second discrete position point and the velocity of the first discrete position point in the previous instruction issuance cycle of the instruction issuance cycle to be planned, the acceleration of the discrete position point corresponding one-to-one with the instruction issuance cycle to be planned is obtained. Among them, the acceleration at discrete position points is one of the first motion control parameters.

[0048] This application does not limit the method used to determine acceleration. In some embodiments, an acceleration function can be used, while in others, discrete velocities from adjacent command issuance cycles can be used. In some embodiments, the discrete velocities from adjacent command issuance cycles can be used to determine the inflection points of the planned trajectory covered by the current command issuance cycle. When the current command issuance cycle corresponds to the same target trajectory segment, a velocity function is used. In other embodiments, discrete velocities from adjacent command issuance cycles can be used for all cases. This application does not limit the specific methods used, and those skilled in the art can selectively configure the methods according to the actual situation.

[0049] For example, in some embodiments, the acceleration at discrete locations is obtained by the following formula (7): (7) in, This represents the discrete acceleration of the instruction issuance cycle to be planned at time t. Let represent the acceleration function of the target trajectory segment, so as to obtain the planned acceleration at time t. The planned acceleration for the starting planned position of the target trajectory segment; Accelerate the planning of the starting position of the target trajectory segment. The variable speed step size represents the interval of the instruction issuance cycle to be planned at time t, where t represents the actual running time of the trajectory.

[0050] For example, in some other embodiments, the acceleration at discrete locations is obtained by the following formula (8): (8); in, This represents the acceleration of the instruction issuance cycle to be planned at time t. This represents the velocity of the discrete position point in the command issuance cycle to be planned at time t. The velocity of the discrete position point corresponding to the previous instruction issuance cycle.

[0051] Understandably, the method also includes: When both the gear shift request flag and the gear shift adjustment flag are initial values, the cumulative value of the gear shift duration corresponding to the previous instruction issuance cycle is used as the cumulative step size base value. Starting from the cumulative benchmark value of the step size, the speed coefficient of the actual running speed in the previous instruction issuance cycle relative to the planned speed at the same position on the initial trajectory is used as the sampling step of the cycle sampling; The remaining trajectory segments of the initial trajectory are periodically sampled according to the sampling step to obtain the third discrete position point.

[0052] Understandably, the method also includes: Get the configuration file for the function module; When the configuration file of the functional module shows that online speed adjustment is supported, load the online speed adjustment module and the detection module. The detection module is used to update the gear shift request identifier to the first identifier value; the online speed adjustment module is used to update the planning duration, the gear shift step distance of each instruction issuance cycle within the gear shift duration, and the planning duration in the target gear shift process, indicating that the motion control parameters of each instruction issuance cycle within the gear shift duration have been issued, and to set the gear shift adjustment identifier to the corresponding initial value.

[0053] For example, refer to Figure 3 As shown, by separating the online speed control module and the detection module, since the initial trajectory is planned based on the maximum theoretical planning parameters, the main difference between variable speed and non-variable speed scenarios (including variable speed phases and stable phases) lies in the setting of the variable speed step size within the variable speed duration. Therefore, by independently setting the variable speed step size in the online speed control module, code reuse can be achieved for both variable speed and non-variable speed scenarios. Simultaneously, by using an independent detection module, the coupling between modules is reduced. Therefore, the method in this embodiment simplifies the maintenance of the target robot.

[0054] For example, see below. Figures 4 to 7 The method described in the embodiments of this application is referred to Figure 3 and Figure 4 As shown, the specific steps are as follows: Step S1: In response to the determination that the function module loads the configuration file to support online speed regulation, load the online speed regulation module and the detection module.

[0055] Step S2: Initialize the target robot and enter the ready state of the target robot's state machine. The specific steps are as follows: S2.1 In response to receiving the running command, enter the preparation state. In the preparation state, initialize the online speed control module (that is, set both the speed adjustment flag and the speed request flag to preset initial values) and plan the initial trajectory based on the maximum theoretical planning parameters, as well as the initial speed configured for the target robot (in some embodiments, it may be the initial speed coefficient). S2.2 In response to the completion of the initial trajectory planning, determine whether to execute the target speed change process based on the speed change request flag and speed change adjustment flag, as follows: For each instruction issuance cycle, the following steps are performed: If both the speed change request flag and the speed change adjustment flag are set to initial values, then the ratio of the current actual running speed to the planned speed at the same position on the initial trajectory is used as the interpolation sampling step size and input to the motion trajectory interpolation module. Specifically, if no speed change adjustment request has ever been issued, then... Figure 5 As shown, this speed ratio will be used as the sampling step to perform periodic uniform sampling of the initial trajectory at equal intervals.

[0056] If the speed change request identifier is set to the first identifier value and the speed change adjustment identifier is set to the initial value, then the speed change adjustment identifier is set to the second identifier value and the speed change request identifier is set to the initial value. Based on the initial speed and the speed change adjustment request, the first speed coefficient and the first speed increase / decrease are determined. At this time, the first speed coefficient, the first speed increase / decrease, and the planning duration are substituted into formula (1) or (2) to obtain the first speed change step size of the current instruction issuance cycle. The first speed change step size is output to the motion trajectory interpolation module as the interpolation sampling step size. If the speed change request identifier is the first identifier value and the speed change adjustment identifier is the second identifier value, then the planning duration is reset, the speed change request identifier is set to the initial value, and the second speed coefficient and the second speed increase / decrease are determined. Substituting the second speed coefficient, the second speed increase / decrease and the planning duration into formula (1) or (2) simultaneously can yield the second speed change step size of the current instruction issuance cycle. The second speed change step size is output to the motion trajectory interpolation module as the interpolation sampling step size.

[0057] When the planned duration indicates that the current shift time is greater than or equal to the shift duration, the shift adjustment is marked as the initial value and the planned duration is reset. Among them, such as Figure 3 As shown, the motion trajectory interpolation module determines the actual running time of the trajectory based on the input values ​​and outputs motion control parameters. These motion control parameters are then output to the dynamics calculation module. The dynamics calculation module, based on the motion control parameters, determines the required drive / torque output for each joint and outputs the drive / torque to the motor encoder value conversion module. The motor encoder module, based on the input mapping relationship, determines the instructions to be issued to the target robot. After the instruction is issued, the detection module checks whether the speed value has been updated. If so, the gear shift request identifier is updated, as well as the speed coefficient corresponding to the end time of the gear shift duration.

[0058] Among them, such as Figure 6 As shown, after adopting the variable speed model, during the variable speed duration, the target robot changes from its initial robot speed... To the desired robot speed (That is, at the end of the shift duration) its speed changes smoothly, at which point, as... Figure 7 As shown in the left-middle figure, it can be seen that the step size of the target robot's position trajectory changes two steps before and after t=1500 (i.e., the moment the speed adjustment request is executed). At this time, since the sampling is still based on the position trajectory corresponding to the initial trajectory, the target robot's actual movement is as follows: Figure 6 The shape of the trajectory in the right figure has not changed.

[0059] For the motion trajectory interpolation module, the cumulative transition value of the step size can be obtained based on the initial cumulative step size of the previous instruction issuance cycle and the input interpolation sampling step size. Assuming the cumulative transition value of the step size... ;in, This is the initial value for the cumulative step size; By inputting the step size, we can obtain the actual running time of the trajectory segment within the corresponding target trajectory segment. ;in, This is the cumulative step size of the starting point of the target trajectory segment; Let be the duration of the instruction issuance cycle. By referring to the above formulas (4) to (8), the discrete position point, discrete velocity, and discrete acceleration of each instruction issuance cycle can be obtained.

[0060] S2.3 In response to receiving an emergency stop command in the execution state, the robot enters the termination state. The speed coefficient is updated to 0 through the online speed adjustment module, so that the actual running time of the trajectory calculated by the motion trajectory interpolation module remains unchanged, the position point calculated by the dynamics calculation module remains unchanged and the speed is 0. At this time, the target robot is stationary, but the target robot is still in motion.

[0061] S2.4 In response to receiving a pause state in the execution state, the motion control parameters for different instruction issuance cycles of the corresponding trajectory segment are determined by the stop trajectory interpolation module; and after the pause is completed, that is, after the speed drops to 0, the termination state is entered. S2.5 In response to receiving a retry command to restore the original trajectory in the terminated state, enter the return state, determine the motion control parameters of the corresponding trajectory segment in different sending cycles through the return trajectory interpolation module, and jump to S2.2 after the return is completed; S2.6, In response to receiving a retry instruction in the terminated state, jump to S2.2.

[0062] S2.7. In response to the robot program being stopped in the terminated state (e.g., triggered when the robot is powered off or in standby mode), enter the completed state.

[0063] Please see Figure 8 , Figure 8 The hardware structure of an electronic device according to another embodiment is illustrated, wherein the embedded user identification device includes: The processor 801 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 802 can be a NAND flash, and the relevant program code is stored in the memory 802 and called by the processor 801 to execute the robot speed control method of the present application embodiment; The 803 input / output interface is used to implement information input and output. The communication interface 804 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 805 transmits information between various components of the device (e.g., processor 801, memory 802, input / output interface 803, and communication interface 804); The processor 801, memory 802, input / output interface 803, and communication interface 804 are connected to each other within the device via bus 805.

[0064] This application also provides a robot device, including: a target robot and a controller, wherein the controller is integrated on the target robot and executes the robot speed control method as described in any of the first aspects.

[0065] This application also provides a computer-readable storage medium that stores a computer program that, when executed by a processor, implements the above-described robot speed control method.

[0066] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0067] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0068] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0069] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0070] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0071] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0072] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0073] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0074] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0075] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0076] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0077] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A robot speed control method, characterized in that, The method includes: In response to the target robot being in a ready state, both the speed adjustment flag and the speed request flag are set to preset initial values, and an initial trajectory is planned according to preset maximum theoretical planning parameters, and the robot enters the execution state; the speed request flag is set to the first flag value by the speed adjustment request; the speed adjustment request is used to make the target robot reach a target speed that is a preset speed coefficient of the planned speed at the same position on the initial trajectory. In response to the target robot being in the execution state and the speed change request identifier being the first identifier value, a target speed change process is executed according to the speed change adjustment identifier, wherein, in the target speed change process, the speed change request identifier is updated to a preset initial value and the speed change adjustment identifier is set to a second identifier value within a preset speed change duration; Once the motion control parameters for the last instruction issuance cycle within the specified shift duration have been issued in the target shift process, the shift adjustment flag is set to the corresponding initial value, and the target shift process ends. The target speed change process is used to determine the discrete speed change position points obtained by the target robot from sampling the initial trajectory in each instruction issuance cycle corresponding to the speed change duration when the speed change request identifier is set to the first identifier value, and to determine motion control parameters based on the discrete speed change position points. The speed of each discrete speed change position point is smoothly transitioned to the discrete position point of the previous instruction issuance cycle.

2. The robot speed control method according to claim 1, characterized in that, The execution target speed change process includes: When the gear shift adjustment flag is the initial value, the gear shift adjustment flag is set to the second flag value and the gear shift request flag is updated to the preset initial value, and the following steps are performed: The next instruction issuance cycle after the instruction issuance cycle when the target speed change process starts is taken as the first instruction issuance cycle to be planned for the preset speed change duration. Determine the first speed increase / decrease and the first speed coefficient. The first speed coefficient represents the speed ratio between the actual speed when the target speed change process starts and the planned speed at the same position point on the initial trajectory. The first speed increase / decrease represents the speed coefficient difference between the second speed coefficient and the first speed coefficient when the speed change adjustment request is met. The first speed increase / decrease, the first speed coefficient, and the planning duration of the current planned instruction issuance cycle are input into the preset speed change model to determine the first speed change step of each planned instruction issuance cycle within the speed change duration. Based on each of the first speed change step distances, the first motion control parameters for the corresponding instruction issuance cycle to be planned are determined.

3. The robot speed control method according to claim 2, characterized in that, The speed change model is an Nth-order polynomial model. The step of inputting the first speed increase / decrease, the first speed coefficient, and the planning duration into the preset speed change model to determine the first speed change step size for each planned instruction issuance cycle within the speed change duration includes: Configure the planning duration as the variable value of the variable factor of the Nth order polynomial model; Configure the first velocity coefficient as the constant term coefficient of the Nth order polynomial model; The first speed increase or decrease is configured as the changing part of the coefficients of different orders in the Nth order polynomial model to obtain coefficients of different orders. The first variable speed step size, which corresponds one-to-one with the planning duration, is obtained by using a pre-configured Nth-order polynomial model.

4. The robot speed control method according to claim 1 or 2, characterized in that, The execution target speed change process includes: When the gear shift adjustment identifier is the second identifier value and the gear shift request identifier is the first identifier value, update the gear shift request identifier to a preset initial value and reset the planning duration, and perform the following steps: Determine the second speed increase / decrease and the third speed coefficient; the third speed coefficient represents the speed ratio between the actual speed in the current command issuance cycle and the planned speed at the same position point on the initial trajectory, and the second speed increase / decrease represents the speed coefficient difference between the fourth speed coefficient and the third speed coefficient when the speed adjustment request is met; Substitute the second speed increase / decrease, the third speed coefficient, and the planning duration of the current instruction issuance cycle into the preset speed change model to determine the second speed change step of the current instruction issuance cycle. Based on each of the second speed change step distances, determine the second motion control parameters corresponding to each instruction issuance cycle to be planned within the speed change duration and update the planning duration.

5. The robot speed control method according to claim 2, characterized in that, The step of determining the first motion control parameters for the corresponding instruction issuance cycle to be planned based on each first speed change step includes: Obtain the cumulative initial value of the step size corresponding to the previous instruction issuance cycle of the instruction issuance cycle to be planned; Based on the initial cumulative step size and the corresponding first variable speed step size, determine the cumulative transition value of the step size for each instruction issuance cycle to be planned; The actual running time of the trajectory is determined based on the cumulative transition value of the step size, the cycle duration of the corresponding instruction issuance cycle to be planned, and the cumulative step size of the starting point of the target trajectory segment; the target trajectory segment is the trajectory segment of the instruction issuance cycle to be planned in the initial trajectory. Based on the actual running time of the trajectory and the position function of the target trajectory segment, a first discrete position point corresponding one-to-one with the instruction issuance cycle to be planned is obtained; wherein, the first discrete position point is one of the first motion control parameters.

6. The robot speed control method according to claim 5, characterized in that, The first motion control parameters further include a first discrete position point velocity and / or a discrete position point acceleration, wherein the first discrete position point velocity is obtained through one of the following steps: Based on the actual running time of the trajectory and the velocity function corresponding to the target trajectory segment, the velocity of the first discrete position point corresponding one-to-one with the instruction issuance cycle to be planned is obtained. Based on the second discrete position point of the previous instruction issuance cycle and the first discrete position point of the instruction issuance cycle to be planned, the velocity of the first discrete position point corresponding one-to-one with the instruction issuance cycle to be planned is obtained. The acceleration at the discrete location point is obtained through one of the following steps: Based on the actual running time of the trajectory and the acceleration function corresponding to the target trajectory segment, the discrete position point accelerations corresponding one-to-one with the instruction issuance cycle to be planned are obtained. Based on the velocity of the second discrete position point in the previous instruction issuance cycle and the velocity of the first discrete position point, the discrete position point acceleration corresponding one-to-one with the instruction issuance cycle to be planned is obtained.

7. The robot speed control method according to claim 1, characterized in that, The method further includes: When both the speed change request flag and the speed change adjustment flag are initial values, the cumulative value of the speed change duration corresponding to the previous instruction issuance cycle is used as the cumulative step size reference value. Starting from the cumulative reference value of the step size, the speed coefficient of the actual running speed in the previous instruction issuance cycle relative to the planned speed at the same position on the initial trajectory is used as the sampling step of the cycle sampling; The remaining trajectory segments of the initial trajectory are periodically sampled according to the sampling step to obtain the third discrete position point.

8. The robot speed control method according to claim 1, characterized in that, The method further includes: Get the configuration file for the function module; When the configuration file of the functional module shows that online speed adjustment is supported, the online speed adjustment module and the detection module are loaded. The detection module is used to update the gear shift request identifier to a first identifier value; the online speed adjustment module is used to update the planning duration, the gear shift step distance of each instruction issuance cycle within the gear shift duration, and the planning duration in the target gear shift process to indicate that the motion control parameters of each instruction issuance cycle within the gear shift duration have been issued, and to set the gear shift adjustment identifier to the corresponding initial value.

9. A control device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the robot speed control method as described in any one of claims 1 to 8.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the robot speed control method according to any one of claims 1 to 8.