Robot control method and control device
By generating new interpolation points when the number of interpolation points in the cache queue is insufficient, and the target speed is generated based on the position of the tool center point, the problem of remote operation control delay and instability in industrial robot arms is solved, and the robot is realized Stable control and anti-interference capability.
Patent Information
- Application Number
- CN202411797751.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-12-09
AI Technical Summary
In industrial robotic arm application scenarios, teaching programming based on target points is inefficient to generate complex motion trajectories, and there are problems of control delay and instability in the remote operation mode.
When the number of interpolation points in the cache queue is less than the target number, a new interpolation point is generated according to the first speed and the second speed, and the cache queue is added to ensure that the number of interpolation points reaches or exceeds the target number, and obtain the tool center point The current and target poses are generated to generate target speeds for stable control.
The anti-interference ability of the robot is enhanced, stable control of the robot is achieved, and control effects caused by abnormal points of remote operating equipment are avoided.
Smart Images

Figure CN119260749A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot technology, and in particular to a control method and a control device for a robot. Background Art
[0002] In most industrial robot arm application scenarios, target point-based teaching programming can meet the needs, but if complex motion trajectories need to be generated, this method is inefficient. The teaching method based on teleoperation can easily generate the required motion trajectory, but the process of generating motion trajectories through teleoperation currently still has the defects of control delay and instability. Summary of the invention
[0003] The present application provides a robot control method and a control device, which can achieve stable control of the robot.
[0004] A first aspect of an embodiment of the present application provides a control method for a robot, the method comprising: in response to the number of first interpolation points in a cache queue being less than a target number, generating at least one second interpolation point according to a first speed and a second speed, and adding the at least one second interpolation point to the cache queue so that the total number of the first interpolation points and the second interpolation points in the cache queue is not less than the target number; wherein the first interpolation point and the second interpolation point both correspond to the axis positions of each joint of the robot, the first speed and the second speed are target speeds generated twice adjacently, and the second speed is the most recently generated target speed; at the same time, the method further comprises: obtaining the current posture and the desired target posture of the tool center point of the robot at the current moment; generating the target speed that the tool center point is expected to reach according to the current posture and the target posture, the target speed comprising a target linear speed and a target axis angular velocity.
[0005] A second aspect of an embodiment of the present application provides a control device, which includes a processor, a memory, and a communication circuit. The processor is coupled to the memory and the communication circuit, respectively. Program data is stored in the memory. The processor implements the steps in the above method by executing the program data in the memory.
[0006] The beneficial effect is: in the control method of the present application, as long as it is detected that the number of first interpolation points in the cache queue is less than the target number, interpolation is performed according to the first speed and the second speed, and new interpolation points are generated and added to the cache queue. Even if the process of generating the target speed is affected due to the sudden appearance of abnormal points in the control signal of the remote control device, the interpolation process of the present application will not be affected, thereby enhancing the robot's anti-interference ability and achieving stable control of the robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work, among which: Figure 1 It is a flowchart of the first thread in the control method of the robot of the present application; Figure 2 It is a flow chart of the second thread in the control method of the robot of the present application; Figure 3 yes Figure 1 Schematic diagram of the process of step S110; Figure 4 It is a structural schematic diagram of an implementation method of the control device of the present application; Figure 5 It is a structural schematic diagram of an implementation method of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0008] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only 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 creative work are within the scope of protection of this application.
[0009] It should be noted that the terms "first" and "second" in this application are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices.
[0010] See also Figure 1 , Figure 1 1 is a flow chart of an embodiment of a control method of a robot of the present application, the method comprising: S110: In response to the number of first interpolation points in the cache queue being less than the target number, generating at least one second interpolation point according to the first speed and the second speed, and adding the at least one second interpolation point to the cache queue so that the total number of first interpolation points and second interpolation points in the cache queue is not less than the target number.
[0011] The first interpolation point and the second interpolation point both correspond to the axis positions of the joints of the robot, the first speed and the second speed are target speeds generated twice consecutively, and the second speed is the latest generated target speed.
[0012] Also, see Figure 2 , the method further comprises: S120: Obtain the current position and desired target position of the tool center point of the robot at the current moment.
[0013] S130: Generate a target speed at which the tool center point is expected to reach according to the current posture and the target posture, where the target speed includes a target linear speed and a target axis angular speed.
[0014] Specifically, step S110 is executed by a first thread of the control device, and step S120 and step S130 are executed by a second thread of the control device.
[0015] The second thread executes steps S120-S130 according to a preset cycle, and after each execution of steps S120-S130, the second thread generates a target speed for the tool center point to reach, and then sends the target speed to the first thread. When generating the target speed, the second thread obtains the posture that the TCP (tool center point) is expected to reach in the tool coordinate system at the current moment, that is, the target posture, and obtains the actual posture of the TCP in the tool coordinate system at the current moment, that is, the current posture, and then generates the linear speed (defined as the target linear speed) and the axis angular velocity (defined as the target axis angular velocity) required for the TCP to reach the target posture according to the obtained current posture and target posture, wherein the target linear speed and the axis angular velocity are collectively referred to as the target speed. It should be noted that the linear speed and the axis angular velocity of the TCP refer to the linear speed and the axis angular velocity of the tool coordinate system of the robot relative to the base coordinate system of the robot, respectively.
[0016] Among them, the target posture of TCP at the current moment is generated by teleoperation. Teleoperation means that the signals of the operator's hand and other signals are collected through external equipment and then mapped to the robot, so as to achieve the effect of real-time control of the robot by the operator. Therefore, the posture signal generated by the human hand at the current moment is obtained, and the posture signal is mapped to the tool coordinate system of the robot, so as to obtain the target posture of TCP at the current moment.
[0017] In one embodiment, the process of generating the target speed in step S130 includes: S131: Generate a posture error based on the current posture and the target posture, where the posture error includes a position error and a posture error.
[0018] Specifically, a position error is generated according to the position in the current pose and the position in the target pose, wherein the position in the current pose and the position in the target pose can both be described by a 3×1 matrix, and the position matrix in the current pose is subtracted from the position matrix in the target pose to obtain the position error.
[0019] When generating the attitude error, the attitude in the current pose and the attitude in the target pose are described as quaternion attitudes respectively, and then the quaternion-described attitude in the current pose is multiplied by the inverse of the quaternion-described attitude in the target pose to obtain the attitude error, and then the attitude error can be written as a 3×1 matrix.
[0020] By merging the matrix corresponding to the position error and the matrix corresponding to the attitude error, a 6×1 matrix can be obtained.
[0021] S132: Substitute the posture error into the admittance control equation to obtain the linear acceleration and axial angular acceleration of the tool center point.
[0022] Specifically, the posture error is substituted into the following admittance control equation to obtain the acceleration of TCP at the current moment (including linear acceleration and axial angular acceleration):
[0023] in, is the mass matrix parameter of the admittance model, is the damping matrix parameter of the admittance model, is the rigid parameter matrix of the admittance model, , as well as are all 6×6 matrices, is a 6×1 matrix consisting of the linear acceleration of the tool center point and the angular acceleration of the axis. The target speed obtained by the second thread last time is a 6×1 matrix consisting of the target linear speed and target axis angular speed obtained by the second thread last time. is the posture error, which is a 6×1 matrix consisting of position error and posture error. is the external force term, which is a 6×1 matrix.
[0024] S133: Obtain the target linear velocity at which the tool center point is expected to reach according to the linear acceleration of the tool center point.
[0025] S134: Obtain a target axis angular velocity at which the tool center point is expected to reach according to the axis angular acceleration of the tool center point.
[0026] Specifically, after the linear acceleration and axial angular acceleration of the tool center point are obtained, the linear acceleration and axial angular acceleration are respectively integrated according to time to obtain the target linear velocity and target axial angular velocity that the tool center point is expected to reach.
[0027] Among them, the linear velocity, linear acceleration, axial angular velocity, and axial angular acceleration in the present application are all 3×1 matrices. The three elements in the matrix corresponding to the linear velocity are the linear velocity in the X direction, the linear velocity in the Y direction, and the linear velocity in the Z direction, respectively. The three elements in the matrix corresponding to the linear acceleration are the linear acceleration in the X direction, the linear acceleration in the Y direction, and the linear acceleration in the Z direction, respectively. The rotation axis of the axial angular velocity is the direction of the unit vector corresponding to the matrix, the magnitude of the axial angular velocity is the modulus of the matrix, and the rotation direction of the axial angular velocity satisfies the right-hand rule. Similarly, the rotation axis of the axial angular acceleration is the direction of the unit vector corresponding to the matrix, the magnitude of the axial angular acceleration is the modulus of the matrix, and the rotation direction of the axial angular acceleration satisfies the right-hand rule.
[0028] Since the above-mentioned admittance control method is second-order differentiable, the trajectory subsequently generated based on the target speed calculated through the above steps is smooth and flexible.
[0029] The above describes in detail the process of generating the target speed by the second thread. The following describes the process of the first thread: Among them, the robot reads the interpolation points in the cache queue according to the principle of first-in-first-out. The robot reads the interpolation points in the cache queue in the order from first to last, and moves according to the read interpolation points. After each interpolation point is read, the interpolation point is removed from the cache queue. At the same time, each interpolation point corresponds to the joint axis position of each joint of the robot. After reading the interpolation point, the robot controls each joint to move according to the joint axis position corresponding to the interpolation point.
[0030] When the first thread detects that the number of interpolation points in the cache queue is less than the target number, it interpolates according to the target speeds sent twice by the second thread (the latest sent target speed is defined as the second speed, and the latest sent target speed before the second speed is defined as the first speed), generates a new interpolation point (that is, the second interpolation point), and adds the new interpolation point to the cache queue so that the total number of interpolation points in the cache queue is not less than the target number. For example, in one embodiment, the target number is equal to 10. When the first thread detects that the number of interpolation points in the cache queue is 6, it interpolates to generate 4 new interpolation points and enters the cache queue. In another embodiment, the trigger condition for the first thread to generate a new interpolation point can also be: the number of the first interpolation points in the cache queue is less than the target number and the difference between the number of the first interpolation points and the target number is greater than the difference threshold. For example, the target number is 6 and the difference threshold is 2. When the number of interpolation points in the cache queue is 8, the trigger condition is not met at this time, and the first thread is not triggered. When the number of interpolation points in the cache queue is 7, the trigger condition is met at this time, and the first thread is triggered, thereby generating 3 new interpolation points.
[0031] It should be noted that, between the second thread sending the target speed to the first thread twice adjacently, if the first thread detects that the number of interpolation points in the cache queue is not less than the target number, the first thread does not interpolate. However, if the first thread detects that the number of interpolation points in the cache queue is less than the target number, the first thread performs multiple interpolations based on the target speeds sent twice adjacently by the second thread, and each interpolation generates a number of new interpolation points to maintain the total number of interpolation points in the cache queue not less than the target number.
[0032] See also Figure 3 In one implementation, step S110 specifically includes: S111: Calculate the interpolation time of the second interpolation point.
[0033] The interpolation time of the second interpolation point is equal to the sum of the current time and the target duration, and the target duration is equal to the product of the interpolation period and the number of interpolation points before the second interpolation point.
[0034] Specifically, since the second interpolation point is not the interpolation point to be read currently, and there are interpolation points that the robot has not read before the second interpolation point, the interpolation time of the second interpolation point is not the current time, but the time calculated using the following formula:
[0035] in, is the interpolation time of the second interpolation point, For the current moment, is the number of the first interpolation points in the current cache queue, is the ID corresponding to the second interpolation point, is the interpolation period, that is, the time interval between two adjacent interpolation points.
[0036] Among them, if the second interpolation point is the first interpolation point among the new interpolation points generated this time, the ID corresponding to the second interpolation point is 0, if the second interpolation point is the second interpolation point among the new interpolation points generated this time, the ID corresponding to the second interpolation point is 1, and the interpolation points are added to the cache queue in sequence and saved in order (the interpolation points generated first are saved in front of the interpolation points generated later), so That is, the number of interpolation points before the current second interpolation point.
[0037] S112: Determine whether the interpolation time of the second interpolation point is less than the target time.
[0038] The target time is equal to the sum of the current time and the preset expected duration.
[0039] Specifically, the preset expected time length is set in advance, which means that the TCP is expected to reach the target speed within the preset expected time length from the current moment.
[0040] If step S112 determines that the interpolation time of the second interpolation point is less than the target time, step S113 is executed; otherwise, step S114 is executed.
[0041] S113: Perform interpolation according to the first speed and the second speed to generate a linear speed and an axial angular speed of a second interpolation point.
[0042] Specifically, if the interpolation time of the second interpolation point is less than the target time, interpolation is performed to generate the linear velocity and axial angular velocity of the second interpolation point. It can be understood that the linear velocity and axial angular velocity of the second interpolation point are the linear velocity and axial angular velocity of the TCP at the interpolation time of the second interpolation point, respectively.
[0043] S114: setting the linear velocity of the second interpolation point equal to the linear velocity of the previous interpolation point adjacent to the second interpolation point, and the axial angular velocity of the second interpolation point equal to the axial angular velocity of the previous interpolation point adjacent to the second interpolation point.
[0044] Specifically, if the interpolation time of the second interpolation point is not less than the target time, it means that the speed of TCP at the interpolation time of the second interpolation point has reached the target speed, and then at this time, it is only necessary to let TCP maintain the linear velocity and axial angular velocity of the previous interpolation point, that is, the linear velocity of the second interpolation point is set equal to the linear velocity of the third interpolation point, and the axial angular velocity of the second interpolation point is equal to the axial angular velocity of the third interpolation point, wherein the third interpolation point is located before the second interpolation point and is set adjacent to the second interpolation point.
[0045] S115: Determine the posture of the second interpolation point according to the linear velocity and the axis angular velocity of the second interpolation point and the posture of a previous interpolation point adjacent to the second interpolation point.
[0046] Specifically, after obtaining the linear velocity and the axis angular velocity of the second interpolation point, the pose of the second interpolation point in the tool coordinate system can be obtained by combining the pose of the previous interpolation point (ie, the third interpolation point) in the tool coordinate system.
[0047] S116: Perform an inverse solution on the posture corresponding to the second interpolation point to obtain the axis positions of each joint of the robot corresponding to the second interpolation point.
[0048] Specifically, after obtaining the position and posture of the second interpolation point in the tool coordinate system, the axis position of each joint axis of the robot can be obtained by using the inverse solver.
[0049] In one embodiment, the method of the present application further comprises: S140: In response to the time length between the current moment and the moment when the second speed is generated reaching a preset time length, an alarm is issued.
[0050] Specifically, if the time length between the current moment and the time length when the second speed is generated reaches the preset time length, it means that there may be a problem with the second thread. If the first thread is allowed to interpolate all the time and the robot keeps moving, a collision may occur. Therefore, in order to protect the robot, an alarm is issued when it is detected that the time length between the current moment and the time length when the second speed is generated reaches the preset time length.
[0051] In one embodiment, the process of interpolating and generating the linear velocity of the second interpolation point in step S113 includes: S1131: Generate the linear velocity of the second interpolation point using the Hermite interpolation algorithm according to the target linear velocity in the first velocity and the target linear velocity in the second velocity.
[0052] Specifically, the linear velocity of the second interpolation point is calculated using the following formula:
[0053] in, , , , .
[0054] at the same time, is the generation time of the second velocity, For the above target time, is the target linear velocity in the first velocity, is the target linear velocity in the second velocity, is the linear acceleration of the starting interpolation point, is the average acceleration from the generation time of the second velocity to the target time, is the interpolation time of the second interpolation point. The starting interpolation point refers to the interpolation point that the robot runs when generating the second speed. The calculation process is: calculating the first difference between the target linear velocity in the second speed and the target linear velocity in the first speed, and and The second difference is then divided by the first difference to get the average acceleration. .
[0055] As mentioned above, the linear velocity is a 3×1 matrix. When generating the linear velocity of the second interpolation point, the above step S1131 is performed for the X direction, the Y direction and the Z direction, so as to generate the X component, the Y component and the Z component of the linear velocity. The process specifically includes: in the process of performing the above step S1131 for the X direction, is the component of the target linear velocity in the first velocity in the X direction, is the component of the linear acceleration of the starting interpolation point in the X direction, The component in the X direction of the average acceleration from the generation time of the second velocity to the target time is obtained, thereby obtaining the component in the X direction, and so on, successively obtaining the component in the Y direction and the component in the Z direction, and finally obtaining the linear velocity of the second interpolation point.
[0056] At the same time, after obtaining the linear velocity of the second interpolation point, the linear acceleration of the second interpolation point is obtained according to the linear velocity of the second interpolation point and the linear velocity of the previous interpolation point adjacent to the second interpolation point. In other words, each interpolation point also corresponds to a linear acceleration. When generating the linear acceleration of the interpolation point, it is also calculated separately for the X direction, Y direction, and Z direction.
[0057] Among them, in order to ensure the safe operation of the robot, the present application will also constrain the linear speed of the TCP. Specifically, after the linear speed of the second interpolation point is obtained through step S113, the linear acceleration of the second interpolation point is calculated according to the linear speed of the second interpolation point and the linear speed of the previous interpolation point adjacent to the second interpolation point; in response to the linear acceleration of the second interpolation point not exceeding the maximum linear acceleration, the linear speed of the second interpolation point is maintained unchanged; otherwise, the linear speed of the second interpolation point is updated according to the linear speed of the previous interpolation point adjacent to the second interpolation point and the maximum linear acceleration.
[0058] Specifically, after obtaining the linear acceleration corresponding to the second interpolation point, if the linear acceleration does not exceed the linear acceleration threshold, the linear velocity of the second interpolation point is maintained unchanged; however, if the linear acceleration exceeds the linear acceleration threshold, the linear acceleration of the second interpolation point is recalculated based on the linear velocity of the previous interpolation point adjacent to the second interpolation point and the maximum linear acceleration.
[0059] Among them, when performing TCP linear velocity constraints, constraints are performed on the X direction, Y direction and X direction respectively, that is, the above process is performed on the X direction, Y direction and X direction respectively, and the corresponding maximum linear velocity in the X direction, the corresponding maximum linear velocity in the Y direction, and the corresponding maximum linear velocity in the Z direction can be the same or different, and can be preset according to actual needs.
[0060] Of course, in other implementations, the above-mentioned maximum linear acceleration may not be set.
[0061] In one embodiment, the process of interpolating and generating the shaft angular velocity of the second interpolation point in step S113 includes: S1132: The axis of the target shaft angular velocity in the second speed is used as the rotation axis of the shaft angular velocity of the second interpolation point.
[0062] S1133: Determine the modulus of the shaft angular velocity of the second interpolation point according to the modulus of the target shaft angular velocity in the first speed and the modulus of the target shaft angular velocity in the second speed.
[0063] S1134: Determine the shaft angular velocity of the second interpolation point according to the rotation axis of the shaft angular velocity of the second interpolation point and the modulus of the shaft angular velocity of the second interpolation point.
[0064] Specifically, when generating the axial angular velocity of the second interpolation point, interpolation calculation is performed according to the modulus of the target axial angular velocity in the first speed, the modulus of the target axial angular velocity in the second speed, and the interpolation time of the second interpolation point to obtain the modulus of the axial angular velocity of the second interpolation point, and the axis of the target axial angular velocity in the second speed is used as the rotation axis of the axial angular velocity of the second interpolation point. Therefore, the axial angular velocity of the second interpolation point can be obtained according to the modulus of the axial angular velocity and the rotation axis. Among them, the axial angular velocity of the second interpolation point is a three-dimensional vector, and the direction of the unit vector corresponding to the three-dimensional vector is the extension direction of the rotation axis (the extension direction of the rotation axis can also be represented by a three-dimensional vector). Therefore, in the process of generating the axial angular velocity according to the modulus of the axial angular velocity of the second interpolation point and the rotation axis, the unit vector corresponding to the axial angular velocity can be first generated according to the extension direction of the rotation axis, and then the three-dimensional vector corresponding to the axial angular velocity can be generated according to the unit vector and the modulus of the axial angular velocity (the modulus of the three-dimensional vector is equal to the modulus of the axial angular velocity). Among them, the interpolation calculation can refer to the above process or adopt other existing interpolation algorithms.
[0065] Similarly, in order to ensure the safe operation of the robot, the axis angular acceleration of the TCP is also constrained. Specifically, after the axis angular velocity of the second interpolation point is obtained in step S113, the axis angular acceleration of the second interpolation point is calculated according to the axis angular velocity of the second interpolation point and the axis angular velocity of the previous interpolation point adjacent to the second interpolation point; in response to the axis angular acceleration of the second interpolation point not exceeding the maximum axis angular acceleration, the axis angular velocity of the second interpolation point is maintained unchanged; otherwise, the axis angular velocity of the second interpolation point is updated according to the axis angular velocity of the previous interpolation point adjacent to the second interpolation point and the maximum axis angular acceleration.
[0066] Specifically, after the axial angular velocity of the second interpolation point is obtained, the axial angular acceleration of the second interpolation point is obtained according to the axial angular velocity of the second interpolation point and the axial angular velocity of the previous interpolation point adjacent to the second interpolation point. At the same time, after the axial angular acceleration corresponding to the second interpolation point is obtained, if the axial angular acceleration does not exceed the axial angular acceleration threshold, the axial angular velocity of the second interpolation point is maintained unchanged, but if the axial angular acceleration exceeds the axial angular acceleration threshold, the axial angular acceleration of the second interpolation point is recalculated according to the axial angular velocity of the previous interpolation point adjacent to the second interpolation point and the maximum axial angular acceleration. Among them, the maximum axial angular acceleration is preset. Of course, in other embodiments, the above-mentioned maximum axial angular acceleration may not be set.
[0067] In one implementation, step S115 specifically includes: S1151: Obtain the position of the second interpolation point according to the linear velocity of the second interpolation point and the position of a previous interpolation point adjacent to the second interpolation point.
[0068] S1152: Multiply the axis angular velocity of the second interpolation point by the interpolation period to obtain an axis angle increment, and convert the axis angle increment into an increment described by a quaternion.
[0069] S1153: Multiply the quaternion description increment by the quaternion description attitude of the previous interpolation point adjacent to the second interpolation point to obtain the quaternion description attitude of the second interpolation point.
[0070] Specifically, the linear velocity of the second interpolation point is integrated using the interpolation period to obtain a distance value, and then the position of the second interpolation point is obtained according to the position of the previous interpolation point adjacent to the second interpolation point and the distance value. At the same time, the posture of the second interpolation point calculated by the above method is a posture in quaternion form.
[0071] From the above content, it can be seen that as long as the control method of the present application detects that the number of first interpolation points in the cache queue is less than the target number, it will interpolate according to the first speed and the second speed to generate new interpolation points and add them to the cache queue. Even if the process of generating the target speed is affected due to the sudden appearance of abnormal points in the control signal of the remote control device, the interpolation process of the present application will not be affected. Therefore, the robot's anti-interference ability can be enhanced and stable control of the robot can be achieved.
[0072] See also Figure 4 , Figure 4 2 is a schematic diagram of the structure of an embodiment of the control device of the present application. The control device 200 includes a processor 210, a memory 220 and a communication circuit 230. The processor 210 is coupled to the memory 220 and the communication circuit 230 respectively. The memory 220 stores program data. The processor 210 implements the steps in any of the above-mentioned implementation methods by executing the program data in the memory 220. The detailed steps can be found in the above-mentioned implementations and will not be repeated here.
[0073] The control device 200 may be any device with algorithm processing capability, such as a computer, a mobile phone, a robot control cabinet, etc., and is not limited here.
[0074] See also Figure 5 , Figure 5 The computer-readable storage medium 400 stores a computer program 410, which can be executed by a processor to implement the steps in any of the above methods.
[0075] The computer-readable storage medium 400 may specifically be a device that can store the computer program 410, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or may be a server that stores the computer program 410. The server may send the stored computer program 410 to other devices for execution, or may also execute the stored computer program 410 by itself.
[0076] The above description is only an embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A robot control method, characterized in that: The method comprises: In response to the number of first interpolation points in the cache queue being less than the target number, generating at least one second interpolation point according to the first speed and the second speed, and adding the at least one second interpolation point to the cache queue so that the total number of the first interpolation points and the second interpolation points in the cache queue is not less than the target number; Wherein, the first interpolation point and the second interpolation point correspond to the axis positions of each joint of the robot, the first speed and the second speed are target speeds generated twice adjacently, and the second speed is the most recently generated target speed; At the same time, the method further comprises: Obtaining the current position and desired target position of the tool center point of the robot at the current moment; The target speed at which the tool center point is expected to reach is generated according to the current posture and the target posture, wherein the target speed includes a target linear speed and a target axis angular speed.
2. The method according to claim 1, characterized in that The step of generating at least one second interpolation point according to the first speed and the second speed comprises: Calculating an interpolation time of the second interpolation point, wherein the interpolation time of the second interpolation point is equal to the sum of the current time and a target duration, and the target duration is equal to the product of an interpolation period and the number of interpolation points before the second interpolation point; Determine whether the interpolation time of the second interpolation point is less than the target time, wherein the target time is equal to the sum of the current time and a preset expected duration; If it is less than, interpolate according to the first speed and the second speed to generate the linear speed and the axial angular speed of the second interpolation point; otherwise, set the linear speed of the second interpolation point equal to the linear speed of the previous interpolation point adjacent to the second interpolation point, and the axial angular speed of the second interpolation point equal to the axial angular speed of the previous interpolation point adjacent to the second interpolation point; Determining the pose of the second interpolation point according to the linear velocity and the axis angular velocity of the second interpolation point and the pose of a previous interpolation point adjacent to the second interpolation point; The posture corresponding to the second interpolation point is inversely solved to obtain the axis positions of each joint of the robot corresponding to the second interpolation point.
3. The method according to claim 2, characterized in that The step of interpolating the first speed and the second speed to generate the linear speed and the axial angular speed of the second interpolation point comprises: The linear velocity of the second interpolation point is generated by using the Hermite interpolation algorithm according to the target linear velocity in the first velocity and the target linear velocity in the second velocity.
4. The method according to claim 2, characterized in that: The method further comprises: After obtaining the linear velocity of the second interpolation point, calculating the linear acceleration of the second interpolation point according to the linear velocity of the second interpolation point and the linear velocity of a previous interpolation point adjacent to the second interpolation point; In response to the linear acceleration of the second interpolation point not exceeding the maximum linear acceleration, maintaining the obtained linear velocity of the second interpolation point unchanged; Otherwise, the linear velocity of the second interpolation point is updated according to the linear velocity of a previous interpolation point adjacent to the second interpolation point and the maximum linear acceleration.
5. The method according to claim 2, characterized in that: The step of interpolating the first speed and the second speed to generate the linear speed and the axial angular speed of the second interpolation point comprises: Using the axis of the target shaft angular velocity in the second velocity as the rotation axis of the shaft angular velocity of the second interpolation point; determining the modulus of the shaft angular velocity of the second interpolation point according to the modulus of the target shaft angular velocity in the first speed and the modulus of the target shaft angular velocity in the second speed; The shaft angular velocity of the second interpolation point is determined according to the rotation axis of the shaft angular velocity of the second interpolation point and the modulus of the shaft angular velocity of the second interpolation point.
6. The method according to claim 2, characterized in that The method further comprises: After obtaining the shaft angular velocity of the second interpolation point, calculating the shaft angular acceleration of the second interpolation point according to the shaft angular velocity of the second interpolation point and the shaft angular velocity of a previous interpolation point adjacent to the second interpolation point; In response to the shaft angular acceleration of the second interpolation point not exceeding the maximum shaft angular acceleration, maintaining the shaft angular velocity of the second interpolation point unchanged; Otherwise, the shaft angular velocity of the second interpolation point is updated according to the shaft angular velocity of a previous interpolation point adjacent to the second interpolation point and the maximum shaft angular acceleration.
7. The method according to claim 2, characterized in that The step of determining the pose of the second interpolation point according to the linear velocity, the axis angular velocity of the second interpolation point and the pose of a previous interpolation point adjacent to the second interpolation point comprises: Obtaining the position of the second interpolation point according to the linear velocity of the second interpolation point and the position of a previous interpolation point adjacent to the second interpolation point; Multiplying the axis angular velocity of the second interpolation point by the interpolation period to obtain an axis angular increment, and converting the axis angular increment into an increment described by a quaternion; The quaternion description increment is multiplied on the left by the quaternion description attitude of a previous interpolation point adjacent to the second interpolation point to obtain the quaternion description attitude of the second interpolation point.
8. The method according to claim 2, characterized in that: The method further comprises: In response to the time length between the current moment and the moment when the second speed is generated reaching a preset time length, an alarm prompt is issued.
9. The method according to claim 1, characterized in that: The step of generating the target speed at which the tool center point is expected to reach according to the current posture and the target posture comprises: Generate a posture error according to the current posture and the target posture, wherein the posture error includes a position error and a posture error; Substituting the posture error into the admittance control equation, the linear acceleration and the axial angular acceleration of the tool center point are obtained; According to the linear acceleration of the tool center point, the target linear velocity at which the tool center point is expected to reach is obtained; The target axial angular velocity that the tool center point is expected to reach is obtained according to the axial angular acceleration of the tool center point.
10. A control device, characterized in that: The control device includes a processor, a memory and a communication circuit, the processor is coupled to the memory and the communication circuit respectively, the memory stores program data, and the processor implements the steps in the method as described in any one of claims 1 to 9 by executing the program data in the memory.
Citation Information
Patent Citations
Industrial robot visual servo method and device, electronic equipment and storage medium
CN116512237A
Motion control method of mechanical arm, electronic equipment and computer readable storage medium
CN118438428A
Wrist singular crossing method and device and robot system
CN118927254A
Robots and spot welding robots with learning control function
DE102012104194A1
Speed control method and controller for articulated robot
JP2004252814A