Mechanical arm control method and device, electronic equipment and storage medium

By calculating the initial rotation parameters and weight information of the robot arm, and adjusting the rotation parameters of the joint shaft to match the target position, the problem of positioning error of the surgical robot arm is solved and positioning accuracy and stability are improved.

CN118927240APending Publication Date: 2024-11-12SHANGHAI YANGSHAN MEDICAL TECHNOLOGY CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410989313.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-23
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

There is absolute positioning error during operation of the surgical robot arm, and the existing error compensation method is difficult to meet the needs of high accuracy, especially when the end needs to be connected to surgical instruments and withstand large loads.

Method used

By obtaining the initial rotation parameters of each joint axes of the robot arm, the expected position information of the target control object is determined, and the gravity and torque information of the connecting rod are calculated based on the connecting rod weight information and the object weight information, the rotation parameters are adjusted to match the expected position, and the mechanical arm is improved. positioning accuracy.

Benefits of technology

It effectively improves the positioning accuracy of the robotic arm, meets the demand for high accuracy in surgical scenarios, reduces positioning errors, and enhances the operation stability of the surgical robotic arm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118927240A_ABST
    Figure CN118927240A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a mechanical arm control method and device, electronic equipment and a storage medium, and the method comprises the steps that when a mechanical arm conducts displacement control on a target control object, initial rotation parameters of the mechanical arm are obtained, and expected position information of the target control object under the action of the initial rotation parameters is determined; determining connecting rod gravity information, connecting rod torque information, object gravity information and object torque information of each connecting rod based on the initial rotation parameters, the weight information of each connecting rod and the weight information of the object; determining position offset information based on the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information and the object torque information; the initial rotation parameters are adjusted based on the position offset information to obtain the target rotation parameters, the joint shafts are controlled to rotate based on the target rotation parameters, the influence of the weights of the connecting rods and the control objects on the positioning precision is considered, the compensation amount is calculated according to the different control objects, and the positioning precision of the mechanical arm is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of robot control technology, and in particular to a robot arm control method, device, electronic equipment and storage medium. Background Art

[0002] With the improvement of science and technology, surgical robotic arms have gradually developed in the field of surgery. The surgical scene requires extremely high absolute positioning accuracy of the surgical robotic arm. However, there is an absolute positioning error in the operation of the robotic arm. Therefore, it is crucial to minimize the positioning error by correcting the driving parameters of the robotic arm.

[0003] At present, the main way to reduce the positioning error of the robot arm is to compensate for the error based on the difference between the robot arm's geometric parameters, kinematic characteristics and theoretical values.

[0004] However, for a surgical robot arm, the end needs to be connected to a surgical instrument and it needs to bear a large load during operation. The above error compensation method mainly considers compensating for the geometric error of the robot, which is difficult to meet the high-precision positioning requirements of the surgical robot arm. Summary of the invention

[0005] Embodiments of the present invention provide a robot arm control method, device, electronic device and storage medium to calculate a driving parameter compensation amount according to different target control objects, thereby improving the positioning accuracy of the robot arm.

[0006] In a first aspect, an embodiment of the present invention provides a method for controlling a robotic arm, wherein the robotic arm comprises at least two connecting rods, two adjacent connecting rods are connected via a joint axis, and a terminal end of the robotic arm is connected to a target control object, the method comprising:

[0007] When the target control object is subjected to displacement control based on the robot arm, initial rotation parameters corresponding to each of the joint axes of the robot arm in the current state are obtained, and expected position information of the target control object under the action of the initial rotation parameters is determined;

[0008] Determine the link gravity information and link torque information of each link, the object gravity information and object torque information of the target controlled object under the action of the initial rotation parameter based on the initial rotation parameter, the link weight information of each link, and the object weight information of the target controlled object;

[0009] Determining position offset information corresponding to the target controlled object based on the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information, and the object moment information;

[0010] The initial rotation parameters are adjusted based on the position offset information to obtain target rotation parameters corresponding to the joint axes, and the joint axes are controlled to rotate based on the target rotation parameters so that the current position information of the target control object matches the expected position information.

[0011] In a second aspect, an embodiment of the present invention further provides a robot arm control device, the device comprising:

[0012] An initial parameter acquisition module, used for acquiring the initial rotation parameters corresponding to each of the joint axes of the robotic arm in the current state when the robotic arm performs displacement control on the target control object, and determining the expected position information of the target control object under the action of the initial rotation parameters;

[0013] a gravity information determination module, for determining the connecting rod gravity information and connecting rod torque information of each connecting rod, the object gravity information and object torque information of the target controlled object under the action of the initial rotation parameter based on the initial rotation parameter, the connecting rod weight information of each connecting rod and the object weight information of the target controlled object;

[0014] an offset error determination module, configured to determine position offset information corresponding to the target controlled object based on the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information, and the object torque information;

[0015] A rotation parameter compensation module is used to adjust each of the initial rotation parameters based on the position offset information to obtain a target rotation parameter corresponding to each of the joint axes, so as to control each of the joint axes to rotate based on the target rotation parameter so that the current position information of the target control object matches the expected position information.

[0016] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0017] one or more processors;

[0018] a storage device for storing one or more programs,

[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the robotic arm control method as described in any one of the embodiments of the present invention.

[0020] In a fourth aspect, an embodiment of the present invention further provides a storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the robot arm control method as described in any one of the embodiments of the present invention when executed by a computer processor.

[0021] The technical solution of the embodiment of the present invention, when the displacement control of the target control object is performed based on the mechanical arm, the initial rotation parameters corresponding to each joint axis of the mechanical arm in the current state are obtained, and the expected position information of the target control object under the action of the initial rotation parameters is determined, thereby, based on the initial rotation parameters, the connecting rod weight information of each connecting rod and the object weight information of the target control object, the connecting rod gravity information and connecting rod torque information of each connecting rod, the object gravity information and object torque information of the target control object under the action of the initial rotation parameters are determined, and further, based on the expected position information, the connecting rod gravity information, the connecting rod torque information, the object gravity information and the object torque information, the position offset information corresponding to the target control object is determined, and finally, based on the position offset information, each initial rotation parameter is adjusted to obtain the target rotation parameter corresponding to each joint axis, so as to control each joint axis to rotate based on the target rotation parameter, so that the current position information of the target control object matches the expected position information. The technical solution provided by this embodiment takes into account the influence of the connecting rod deadweight and the control object on the positioning accuracy of the mechanical arm, and can calculate the driving parameter compensation amount according to different target control objects, thereby improving the positioning accuracy of the mechanical arm. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required to describe the embodiments. Obviously, the drawings introduced are only drawings of a part of the embodiments to be described in the present invention, rather than all the drawings. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 is a schematic structural diagram of a mechanical arm involved in an embodiment of the present invention;

[0024] Figure 2 A schematic flow chart of a method for controlling a robotic arm provided by an embodiment of the present invention;

[0025] Figure 3 A schematic diagram of a sample data collection system according to an embodiment of the present invention;

[0026] Figure 4 A schematic flow chart of another robot arm control method provided by an embodiment of the present invention;

[0027] Figure 5 A schematic structural diagram of a robotic arm control device provided by an embodiment of the present invention;

[0028] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0029] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0030] Embodiment 1

[0031] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.

[0032] Before introducing the embodiments of the present invention, the structure of the mechanical arm may be described first. Figure 1 ,like Figure 1 As shown, the robotic arm includes at least two connecting rods (corresponding to icon 1), two adjacent connecting rods are connected through a joint axis (corresponding to icon 2), and the end of the robotic arm is connected to the target control object (corresponding to icon 3).

[0033] The absolute positioning error factors of a robot arm (multi-axis robot) can be divided into two categories: geometric error and non-geometric error. The forward motion equation of the robot is the relationship between the robot axis variables and the direction and position conversion of the robot end effector obtained by multiplying the homogeneous transformation matrix between each link of the robot and the coordinate system. The homogeneous transformation matrix is ​​often presented in the form of standard DH parameter expression. The causes of geometric errors include parameter errors of the links, errors between the reference coordinate system and the actual coordinate system, and errors such as non-parallelism of the joint axes. Geometric errors can be attributed to the difference between the DH parameters of the coordinate systems of each link of the robot and the theoretical values. Existing methods for correcting the positioning accuracy of robotic arms mainly consider compensating for robot geometric errors.

[0034] Non-geometric errors include deformation of joint links, transmission errors of transmission mechanisms, and other factors. For surgical robotic arms, the end needs to be connected to surgical instruments and needs to withstand large loads during operation. For different surgical procedures, the target operation postures of surgical robotic arms vary. The surgical scenes have extremely high requirements for the absolute positioning accuracy of surgical robots. In this case, the driving parameters of the surgical robotic arms can be corrected based on the technology provided in the embodiments of the present invention to improve the absolute positioning accuracy of the surgical robot.

[0035] Figure 2A flow chart of a robot arm control method provided in an embodiment of the present invention. This embodiment can be applicable to the situation of correcting the driving parameters of the robot arm. The method can be executed by a robot arm control device, which can be implemented in the form of software and / or hardware. The hardware can be an electronic device such as a server, and the electronic device can execute the robot arm control method provided by this technical solution.

[0036] like Figure 2 As shown, the method includes:

[0037] S110, when the target control object is displacement-controlled based on the robotic arm, initial rotation parameters corresponding to each joint axis of the robotic arm in the current state are obtained, and expected position information of the target control object under the action of the initial rotation parameters is determined.

[0038] Among them, the target control object is the object held by the end of the robot arm. For example, if surgery needs to be performed based on a robot arm, the target control object can be the surgical instrument held by the end of the surgical robot arm. If an object needs to be moved to a specific position based on the robot arm, the target control object can be the object. The rotation parameter is the torsion angle corresponding to each joint axis, and the initial rotation parameter is the torsion angle data that needs to be corrected. The expected position information is the theoretical position that the target control object will reach assuming that the robot arm works based on the initial rotation parameter.

[0039] In this embodiment, the end of the manipulator holds the target control object, and the target control object can reach the specified position under the drive of the manipulator. This process is the process of displacement control of the target control object by the manipulator. During the operation of the manipulator, the control instruction received is the torsion angle corresponding to each joint axis, so that each joint axis performs a rotation action according to the corresponding torsion angle, wherein the control instruction can be issued by the main controller to the manipulator. Based on this, before the main controller sends the control instruction (initial rotation parameter) to the manipulator, the technical solution based on this embodiment can first adjust the initial rotation parameter, and send the adjusted target rotation parameter to the manipulator, so that the manipulator can perform rotation based on the target rotation parameter. This is because, if the manipulator is rotated based on the initial rotation parameter, the target control object should reach the target position A in the end, but due to the positioning error of the geometric error and non-geometric error of the manipulator, if the rotation control is actually performed based on the initial rotation parameter, the target control object can only reach position A1 in the end. Therefore, in order to make position A1 as close to the target position A as possible, the initial rotation parameter can be compensated for the error first.

[0040] Specifically, in the process of displacement control of the target control object by the robot arm, the main controller can send down the initial rotation parameters corresponding to each control moment in real time, based on which the initial rotation parameters corresponding to each joint axis of the robot arm at the current moment can be obtained from the main controller. On the basis of obtaining the initial rotation parameters, according to the theory of forward kinematics, the expected position information of the target control object under the action of the initial rotation parameters can be calculated.

[0041] S120. Based on the initial rotation parameters, the link weight information of each link, and the object weight information of the target controlled object, determine the link gravity information and link torque information of each link under the action of the initial rotation parameters, and the object gravity information and object torque information of the target controlled object.

[0042] Among them, the connecting rod gravity information is the three-dimensional data of the connecting rod gravity in the robot base coordinate system. The connecting rod torque information is the three-dimensional data of the connecting rod torque in the robot base coordinate system. The object gravity information is the three-dimensional data of the load gravity of the target control object in the robot base coordinate system. The object torque information is the three-dimensional data of the load torque of the target control object in the robot base coordinate system.

[0043] Specifically, the weight information, length, and initial rotation parameters of each connecting rod can be combined with the forward kinematics theory to determine the weight information and torque information of each connecting rod under the initial rotation parameters. The object weight information, length, and initial rotation parameters of the target controlled object can be combined with the forward kinematics theory to determine the object gravity information and object torque information of the target controlled object.

[0044] For example, the gravity information of each connecting rod relative to the base coordinate system can be calculated: and connecting rod torque information Where j = 1..k, k is the number of robot arm links. Calculate the object gravity information of the target control object relative to the base coordinate system and object torque information

[0045] S130, determining position offset information corresponding to the target controlled object based on the expected position information, the gravity information of each link, the torque information of each link, the object gravity information, and the object moment information.

[0046] In this embodiment, if the robot arm controls the movement of the target control object based on the initial rotation parameters, the actual position reached by the target control object is called the actual position information, and the position offset information is the deviation information between the actual position information and the expected position information.

[0047] Specifically, the specific implementation method for determining the position offset information corresponding to the target control object can be to input the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information and the object torque information into a pre-trained position error determination model to obtain the position offset information corresponding to the target control object.

[0048] Next, the determination process of the position error determination model is described in detail. The model structure of the position error determination model can be any neural network model, and the number of hidden layers of the neural network is not less than 2. Before training the error determination model, it is necessary to first determine the training sample set, so that the position error determination model to be trained can be trained based on the training sample set to obtain the trained position error determination model.

[0049] The specific steps of determining the training sample set may include:

[0050] S1301, obtaining multiple sets of preset posture data and target ball weight information of at least one calibration target ball.

[0051] Each set of preset posture data includes preset rotation parameters corresponding to each joint axis.

[0052] In order to determine the training sample set, a sample data collection system can be built in advance. The sample data collection system diagram can be found in Figure 3 ,like Figure 3 As shown, the sample data acquisition system includes: a mechanical arm, at least one calibration target ball and a laser measurement device (corresponding to icon 4). Each calibration target ball corresponds to a different weight, and the calibration target ball is used to simulate the influence of the end load of the mechanical arm on the absolute positioning accuracy.

[0053] In this embodiment, multiple sets of preset posture data can be pre-planned. On the basis of obtaining multiple target balls for measurement, the weight information of each target ball for measurement can be easily obtained. For example, 100 sets of preset posture data can be pre-planned, and 5 target balls for measurement with different masses can be pre-set.

[0054] S1302: for each preset posture data, determine the target ball expected position information of each measurement target ball under the effect of the current preset posture data.

[0055] In this embodiment, the processing method of any one of the multiple sets of preset posture data is the same, and any one of the sets is the current preset posture data as an example for explanation. When the current preset posture data is constant, the target ball expected position information corresponding to each calibration target ball is the same, and the torsion angle data of each joint axis in the current preset posture data can be processed and calculated by the forward kinematics theory to obtain the target ball expected position.

[0056] S1303, based on the current preset posture data, the connecting rod weight information of each connecting rod and the target ball weight information of each calibration target ball, determine the connecting rod sample data corresponding to the current preset posture data and the target ball sample data corresponding to each calibration target ball.

[0057] The connecting rod sample data includes connecting rod gravity sample information and connecting rod torque sample information, and the target ball sample data includes target ball gravity sample information and target ball torque sample information.

[0058] In this embodiment, based on the current preset posture data, the connecting rod weight information of each connecting rod and the preset positive kinematics function, the connecting rod gravity sample information and the connecting rod torque sample information of each connecting rod under the action of the current preset posture data can be determined. Based on the current preset posture data, the target ball weight information of each calibration target ball and the preset positive kinematics function, the target ball gravity sample information and the target ball torque sample information of each target ball under the action of the current preset posture data are determined.

[0059] S1304. For each calibration target ball, when the robotic arm drives the current calibration target ball based on each preset posture data, determine the actual position information of the target ball corresponding to each preset posture data, so as to determine the position offset error of the current calibration target ball driven by each preset posture data based on the actual position information of the target ball and the expected position information of the target ball.

[0060] In this embodiment, the implementation method of determining the position offset error of each marking target sphere is the same, and any one of the marking target spheres is taken as an example for description.

[0061] For the current target ball, the specific implementation method of determining the actual position information of the target ball can be: when the robotic arm drives the current calibration target ball based on each preset posture data, the center position of the current calibration target ball is collected based on the laser measurement device to obtain the position information of the target ball to be processed; the position information of the target ball to be processed is converted into the actual target ball position information in the base coordinate system of the robotic arm.

[0062] In this embodiment, the coordinate system conversion relationship between the robot arm base coordinate system and the laser measurement device coordinate system can be predetermined to achieve the purpose of unifying the coordinate system. Since the target ball position information to be processed is the position information in the laser measurement device coordinate system, and the target ball expected position information is the position information in the robot arm base coordinate system, in order to make the actual target ball position information and the target ball expected position information the coordinate information in the same coordinate system, it is necessary to convert the position information collected by the laser measurement device into data in the robot arm base coordinate system. Based on this, the target ball position information to be processed can be converted into data in the robot arm base coordinate system through the coordinate system conversion relationship, that is, the actual target ball position information.

[0063] Furthermore, for the current marking ball, on the basis of obtaining the actual position information of the target ball corresponding to each preset posture data, the position offset error of the current marking target ball driven by each preset posture data can be obtained based on the displacement difference between the actual position information of the target ball and the expected position information of the target ball.

[0064] S1305, constructing training sample data corresponding to the current calibration target sphere based on the target sphere expected position information corresponding to the current calibration target sphere, the connecting rod sample data under each preset posture data, the target sphere sample data and the position offset error.

[0065] In this embodiment, for the i-th target ball (i.e., the current target ball), if 100 sets of preset posture data are included, the target ball expected position information can be expressed as P i ; Under the action of the first set of preset posture data, the position offset error can be expressed as e1 i =P1 i '-P i , the connecting rod sample data can be expressed as L1 i , the target ball sample data can be expressed as B1 i , where L1 i Includes: connecting rod gravity sample information and connecting rod torque sample information. The connecting rod gravity sample information is expressed as The connecting rod torque sample information is expressed as k is the number of robot arm links; B1 i It includes target ball gravity sample information and target ball moment sample information. The target ball gravity sample information is expressed as The target ball moment sample information is expressed as Under the influence of the second set of preset posture data, the position offset error can be expressed as e2 i =P2 i '-P i , the connecting rod sample data can be expressed as L2 i , the target ball sample data can be expressed as B2 i , where L2 i Including connecting rod gravity sample information and connecting rod torque sample information, the connecting rod gravity sample information is expressed as The connecting rod torque sample information is expressed as k is the number of robot arm links, B2 i It includes target ball gravity sample information and target ball moment sample information. The target ball gravity sample information is expressed as The target ball moment sample information is expressed as Based on this, the training sample data corresponding to the current target ball can be expressed as {P i 、e1i 、L1 i 、B1 i 、e2 i 、L2 i 、B2 i 、......、e100 i 、L100 i and B100 i}.

[0066] S1306: Determine a training sample set based on the training sample data corresponding to each of the calibration target spheres.

[0067] In this embodiment, training sample data corresponding to each marking target sphere can be constructed based on the same method, so that the set of training sample data corresponding to each marking target sphere is determined as a training sample set.

[0068] Further, on the basis of obtaining the training sample set, the position error determination model to be trained can be trained based on the training sample set to obtain the position error determination model.

[0069] Specifically, the specific implementation method of the training position error determination model may include: for each training sample data in the training sample set, the target ball expected position information corresponding to the current calibration target ball in the current training sample data, the connecting rod sample data and the target ball sample data under each preset posture data are input into the position error determination model to be trained to obtain the predicted position offset; based on the preset loss function, the predicted position offset and the position offset error in the current training sample data are subjected to loss processing, so as to correct the model of the position error determination model to be trained according to the obtained loss value; and the convergence of the preset loss function is used as the training goal to obtain the position error determination model.

[0070] In this embodiment, for each training sample data, the target ball expected position information corresponding to the current calibration target ball in the current training sample data, the connecting rod sample data and the target ball sample data under each preset posture data are used as the input of the position error determination model to be trained, and the output layer of the position error determination model to be trained can output the predicted position offset. Then, based on the preset loss function, the predicted position offset and the position offset error in the current training sample data are subjected to loss processing to obtain the loss value, so as to optimize the model parameters in the position error determination model to be trained according to the loss value. Finally, the convergence of the preset loss function is used as the training goal to obtain the position error determination model.

[0071] Based on this, the trained position error determination model can be used to determine the position offset information corresponding to the target control object.

[0072] S140, adjusting each initial rotation parameter based on the position offset information to obtain a target rotation parameter corresponding to each joint axis, and controlling each joint axis to rotate based on the target rotation parameter, so that the current position information of the target control object matches the expected position information.

[0073] In this embodiment, the rotation parameter compensation amount can be determined according to the position offset information, so that the target rotation parameter corresponding to each joint axis can be obtained according to the sum of the rotation parameter compensation amount and the initial rotation parameter. Therefore, the robot arm can control each joint axis to rotate according to the target rotation parameter, so that the current position information of the target control object is consistent with the expected position information.

[0074] The technical solution of the embodiment of the present invention, when the displacement control of the target control object is performed based on the mechanical arm, the initial rotation parameters corresponding to each joint axis of the mechanical arm in the current state are obtained, and the expected position information of the target control object under the action of the initial rotation parameters is determined, thereby, based on the initial rotation parameters, the connecting rod weight information of each connecting rod and the object weight information of the target control object, the connecting rod gravity information and connecting rod torque information of each connecting rod, the object gravity information and object torque information of the target control object under the action of the initial rotation parameters are determined, and further, based on the expected position information, the connecting rod gravity information, the connecting rod torque information, the object gravity information and the object torque information, the position offset information corresponding to the target control object is determined, and finally, based on the position offset information, each initial rotation parameter is adjusted to obtain the target rotation parameter corresponding to each joint axis, so as to control each joint axis to rotate based on the target rotation parameter, so that the current position information of the target control object matches the expected position information. The technical solution provided by this embodiment takes into account the influence of the connecting rod deadweight and the control object on the positioning accuracy of the mechanical arm, and can calculate the compensation amount according to different target control objects, thereby improving the positioning accuracy of the mechanical arm.

[0075] Embodiment 2

[0076] Figure 4 This is a flowchart of a method for controlling a robotic arm provided by an embodiment of the present invention. Based on the above embodiment, the specific implementation methods of S110, 120 and S140 are described in detail. The specific implementation methods can refer to the technical solution of this embodiment. The technical terms that are the same or corresponding to the above embodiment are not repeated here.

[0077] like Figure 4 As shown, the method specifically comprises the following steps:

[0078] S210, when the target control object is subjected to displacement control based on the robotic arm, initial rotation parameters corresponding to each joint axis of the robotic arm in the current state are obtained.

[0079] S220, bringing the initial rotation parameters into a preset tool center point calculation function to obtain tool center point position information.

[0080] In this embodiment, the center position of the target control object is set as the tool center point in advance, where the tool center point (TCP) refers to the center point of the control object at the end of the robot arm (such as a welding gun, a fixture, etc.). The preset tool center point calculation function is a pre-set calculation formula for determining the tool center point. The initial rotation parameters are brought into the preset tool center point calculation function, and the tool center point position information can be obtained by calculation.

[0081] S230: Determine the tool center point position information as the expected position information of the target controlled object under the action of the initial rotation parameters.

[0082] In this embodiment, on the basis of obtaining the tool center point position information, the tool center point position information is the expected position information of the target controlled object under the action of the initial rotation parameters.

[0083] S240, based on the initial rotation parameters, the connecting rod weight information of each connecting rod and the preset positive kinematics function, determine the connecting rod gravity information and connecting rod torque information of each connecting rod under the action of the initial rotation parameters.

[0084] In this embodiment, for each connecting rod, the initial rotation parameter and the connecting rod weight information corresponding to the current connecting rod can be processed by a preset positive kinematics function to obtain the connecting rod gravity information and connecting rod torque information of the current connecting rod under the action of the initial rotation parameter. Based on the same calculation method, the connecting rod gravity information and connecting rod torque information of each connecting rod can be determined.

[0085] S250 , determining object gravity information and object torque information of the target controlled object under the action of the initial rotation parameter based on the initial rotation parameter, the object weight information of the target controlled object and a preset positive kinematics function.

[0086] In this embodiment, the initial rotation parameters and the object weight information of the target controlled object can be processed by a preset positive kinematics function to obtain the object gravity information and object torque information of the target controlled object under the action of the initial rotation parameters.

[0087] S260: Determine a rotation parameter compensation amount based on the position offset information and the Jacobian matrix corresponding to the robotic arm.

[0088] In this embodiment, the Jacobian matrix corresponding to the robot arm is an inherent property of the robot arm and can be easily obtained. The position offset information can be expressed as e, the Jacobian matrix can be expressed as J, and the rotation parameter compensation amount Δq can be expressed as: Δq = (J TJ) -1 J T e.

[0089] S270: Determine the target rotation parameter corresponding to each joint axis based on the rotation parameter compensation amount and the initial rotation parameter.

[0090] In this embodiment, the initial rotation parameter can be expressed as q, and on the basis of obtaining the rotation parameter compensation amount Δq, the target rotation parameter can be expressed as q′=q+Δq.

[0091] S280. Control each of the joint axes to rotate based on the target rotation parameter so that the current position information of the target control object matches the expected position information.

[0092] The technical solution of this embodiment is to set the center position of the target control object as the tool center point in advance. When the target control object is displaced based on the robot arm, the initial rotation parameters corresponding to each joint axis of the robot arm in the current state are obtained, and then the initial rotation parameters are brought into the preset tool center point calculation function to obtain the tool center point position information, and the tool center point position information is determined as the expected position information of the target control object under the action of the initial rotation parameters. Further, based on the initial rotation parameters, the link weight information of each link and the preset positive kinematic function, the link gravity information and link torque information of each link under the action of the initial rotation parameters are determined. Then, based on the initial rotation parameters, the object weight information of the target control object and the preset positive kinematic function, the object gravity information and object torque information of the target control object under the action of the initial rotation parameters are determined. Thus, based on the position offset information and the Jacobian matrix corresponding to the robot arm, the rotation parameter compensation amount is determined. Finally, based on the rotation parameter compensation amount and the initial rotation parameters, the target rotation parameters corresponding to each joint axis are determined, so as to control each of the joint axes to rotate based on the target rotation parameters, so that the current position information of the target control object matches the expected position information. The technical solution provided in this embodiment takes into account the influence of the connecting rod's own weight and the control object on the positioning accuracy of the robot arm, and can calculate the compensation amount according to different target control objects, thereby improving the positioning accuracy of the robot arm.

[0093] Embodiment 3

[0094] Figure 5 A structural schematic diagram of a robotic arm control device provided in an embodiment of the present invention, the robotic arm includes at least two connecting rods, two adjacent connecting rods are connected by a joint axis, the end of the robotic arm is connected to the target control object, and the robotic arm control device includes: an initial parameter acquisition module 310, a gravity information determination module 320, an offset error determination module 330 and a rotation parameter compensation module 340.

[0095] The initial parameter acquisition module 310 is used to acquire the initial rotation parameters corresponding to each joint axis of the robotic arm in the current state when the robotic arm performs displacement control on the target control object, and determine the expected position information of the target control object under the action of the initial rotation parameters;

[0096] A gravity information determination module 320 is used to determine the link gravity information and link torque information of each link, the object gravity information and object torque information of the target controlled object under the action of the initial rotation parameter based on the initial rotation parameter, the link weight information of each link, and the object weight information of the target controlled object;

[0097] An offset error determination module 330 is used to determine position offset information corresponding to a target control object based on the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information and the object torque information;

[0098] The rotation parameter compensation module 340 is used to adjust each initial rotation parameter based on the position offset information to obtain the target rotation parameter corresponding to each joint axis, so as to control the rotation of each joint axis based on the target rotation parameter so that the current position information of the target control object matches the expected position information.

[0099] Based on the above embodiment, the offset error determination module 330 is specifically used to: input the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information and the object torque information into a pre-trained position error determination model to obtain the position offset information corresponding to the target control object.

[0100] On the basis of the above embodiment, the manipulator control device further includes: an error model determination module; the error model determination module includes: a calibration data acquisition unit, a target ball expected position determination unit, a sample data determination unit, an offset error determination unit, a training sample construction unit, a training sample set determination unit and an error model determination unit;

[0101] The mapping data acquisition unit is used to acquire multiple sets of preset posture data and target ball weight information of at least one mapping target ball; wherein each set of preset posture data includes preset rotation parameters corresponding to each joint axis;

[0102] The target ball expected position determination unit is used to determine the target ball expected position information of each target ball under the action of the current preset posture data for each preset posture data;

[0103] A sample data determination unit is used to determine the connecting rod sample data corresponding to the current preset posture data and the target ball sample data corresponding to each calibration target ball based on the current preset posture data, the connecting rod weight information of each connecting rod and the target ball weight information of each calibration target ball; wherein the connecting rod sample data includes connecting rod gravity sample information and connecting rod torque sample information, and the target ball sample data includes target ball gravity sample information and target ball torque sample information;

[0104] The offset error determination unit is used to determine, for each calibration target ball, the actual position information of the target ball corresponding to each preset posture data when the robot arm drives the current calibration target ball based on each preset posture data, so as to determine the position offset error of the current calibration target ball driven by each preset posture data based on the actual position information of the target ball and the expected position information of the target ball;

[0105] A training sample construction unit is used to construct training sample data corresponding to the current calibration target ball based on the target ball expected position information corresponding to the current calibration target ball, the connecting rod sample data under each preset posture data, the target ball sample data and the position offset error;

[0106] A training sample set determination unit, used to determine a training sample set based on the training sample data corresponding to each of the marking target spheres;

[0107] The error model determination unit is used to train the position error determination model to be trained based on the training sample set to obtain the position error determination model.

[0108] Based on the above embodiment, the offset error determination unit further includes an actual position determination subunit;

[0109] The actual position determination subunit is used to collect the center position of the current marked target ball based on the laser measurement device when the robotic arm drives the current marked target ball based on the preset posture data, and obtain the position information of the target ball to be processed; the target ball position information to be processed is converted into the actual target ball position information in the base coordinate system of the robotic arm.

[0110] Based on the above embodiment, the error model determination unit further includes an actual position determination subunit;

[0111] The actual position determination subunit is used to input the target ball expected position information corresponding to the current calibration target ball in the current training sample data, the connecting rod sample data and the target ball sample data under each preset posture data into the position error determination model to be trained for each training sample data in the training sample set, so as to obtain the predicted position offset;

[0112] The actual position determination subunit is used to perform loss processing on the predicted position offset and the position offset error in the current training sample data based on a preset loss function, so as to perform model correction on the position error determination model to be trained according to the obtained loss value;

[0113] The actual position determination subunit is used to take the convergence of the preset loss function as the training target to obtain the position error determination model.

[0114] On the basis of the above embodiment, the center position of the target control object is set as the tool center point, and the initial parameter acquisition module 310 further includes: an expected position determination unit;

[0115] The expected position determination unit brings the initial rotation parameters into a preset tool center point calculation function to obtain tool center point position information; and determines the tool center point position information as the expected position information of the target control object under the action of the initial rotation parameters.

[0116] On the basis of the above embodiment, the gravity information determination module 320 includes: a connecting rod gravity determination unit and an object gravity determination unit;

[0117] The connecting rod gravity determination unit is used to determine the connecting rod gravity information and connecting rod torque information of each connecting rod under the action of the initial rotation parameters based on the initial rotation parameters, the connecting rod weight information of each connecting rod and the preset positive kinematic function;

[0118] The object gravity determination unit is used to determine the object gravity information and object torque information of the target control object under the action of the initial rotation parameters based on the initial rotation parameters, the object weight information of the target control object and the preset positive kinematics function.

[0119] On the basis of the above embodiment, the rotation parameter compensation module 340 further includes: a target rotation parameter determination unit;

[0120] Among them, the target rotation parameter determination unit is used to determine the rotation parameter compensation amount based on the position offset information and the Jacobian matrix corresponding to the robotic arm; based on the rotation parameter compensation amount and the initial rotation parameter, determine the target rotation parameter corresponding to each joint axis.

[0121] The technical solution of the embodiment of the present invention, when the displacement control of the target control object is performed based on the mechanical arm, the initial rotation parameters corresponding to each joint axis of the mechanical arm in the current state are obtained, and the expected position information of the target control object under the action of the initial rotation parameters is determined, thereby, based on the initial rotation parameters, the connecting rod weight information of each connecting rod and the object weight information of the target control object, the connecting rod gravity information and connecting rod torque information of each connecting rod, the object gravity information and object torque information of the target control object under the action of the initial rotation parameters are determined, and further, based on the expected position information, the connecting rod gravity information, the connecting rod torque information, the object gravity information and the object torque information, the position offset information corresponding to the target control object is determined, and finally, based on the position offset information, each initial rotation parameter is adjusted to obtain the target rotation parameter corresponding to each joint axis, so as to control each joint axis to rotate based on the target rotation parameter, so that the current position information of the target control object matches the expected position information. The technical solution provided by this embodiment takes into account the influence of the connecting rod deadweight and the control object on the positioning accuracy of the mechanical arm, and can calculate the compensation amount according to different target control objects, thereby improving the positioning accuracy of the mechanical arm.

[0122] The robot arm control device provided in the embodiment of the present invention can execute the robot arm control method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0123] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present invention.

[0124] Embodiment 4

[0125] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 6 A block diagram of an exemplary electronic device 40 suitable for implementing exemplary embodiments of the present invention is shown. Figure 6 The electronic device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0126] like Figure 6 As shown, the electronic device 40 is in the form of a general computing device. The components of the electronic device 40 may include but are not limited to: one or more processors or processing units 401, a system memory 402, and a bus 403 connecting different system components (including the system memory 402 and the processing unit 401).

[0127] Bus 403 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0128] The electronic device 40 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 40, including volatile and non-volatile media, removable and non-removable media.

[0129] System memory 402 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 404 and / or cache memory 405. Electronic device 40 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 406 may be used to read and write non-removable, non-volatile magnetic media ( Figure 6 not shown, usually called a "hard drive"). Although Figure 6 Not shown in the figure, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 403 via one or more data medium interfaces. Memory 402 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of various embodiments of the present invention.

[0130] A program / utility 408 having a set (at least one) of program modules 404 may be stored, for example, in memory 402, such program modules 407 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 407 generally perform the functions and / or methods of the embodiments described herein.

[0131] The electronic device 40 may also communicate with one or more external devices 409 (e.g., keyboards, pointing devices, displays 410, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 40, and / or may communicate with any device that enables the electronic device 40 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 411. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 412. As shown, the network adapter 412 communicates with other modules of the electronic device 40 via the bus 403. It should be understood that although Figure 6 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0132] The processing unit 401 executes various functional applications and data processing by running the programs stored in the system memory 402, such as implementing the robot arm control method provided in the embodiment of the present invention.

[0133] Embodiment 5

[0134] The embodiment of the present invention also provides a storage medium containing computer executable instructions, which are used to execute a method for controlling a robotic arm when executed by a computer processor. The robotic arm includes at least two connecting rods, two adjacent connecting rods are connected by a joint axis, and the end of the robotic arm is connected to a target control object. The robotic arm control includes:

[0135] When the target control object is subjected to displacement control based on the robot arm, initial rotation parameters corresponding to each of the joint axes of the robot arm in the current state are obtained, and expected position information of the target control object under the action of the initial rotation parameters is determined;

[0136] Determine the link gravity information and link torque information of each link, the object gravity information and object torque information of the target controlled object under the action of the initial rotation parameter based on the initial rotation parameter, the link weight information of each link, and the object weight information of the target controlled object;

[0137] Determining position offset information corresponding to the target controlled object based on the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information, and the object moment information;

[0138] The initial rotation parameters are adjusted based on the position offset information to obtain target rotation parameters corresponding to the joint axes, and the joint axes are controlled to rotate based on the target rotation parameters so that the current position information of the target control object matches the expected position information.

[0139] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.

[0140] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0141] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0142] Computer program code for performing the operation of embodiments of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0143] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for controlling a robotic arm, wherein the robotic arm comprises at least two connecting rods, two adjacent connecting rods are connected via a joint axis, and the end of the robotic arm is connected to a target control object, characterized in that: include: When the target control object is subjected to displacement control based on the robot arm, initial rotation parameters corresponding to each of the joint axes of the robot arm in the current state are obtained, and expected position information of the target control object under the action of the initial rotation parameters is determined; Determine the link gravity information and link torque information of each link, the object gravity information and object torque information of the target controlled object under the action of the initial rotation parameter based on the initial rotation parameter, the link weight information of each link, and the object weight information of the target controlled object; Determining position offset information corresponding to the target controlled object based on the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information, and the object moment information; The initial rotation parameters are adjusted based on the position offset information to obtain target rotation parameters corresponding to the joint axes, and the joint axes are controlled to rotate based on the target rotation parameters so that the current position information of the target control object matches the expected position information.

2. The method according to claim 1, characterized in that The determining of the position offset information corresponding to the target controlled object based on the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information and the object torque information comprises: The expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information and the object torque information are input into a pre-trained position error determination model to obtain the position offset information corresponding to the target control object.

3. The method according to claim 2, characterized in that The method further comprises: Acquire multiple sets of preset posture data and target ball weight information of at least one target ball; wherein each set of the preset posture data includes preset rotation parameters corresponding to each of the joint axes; For each of the preset posture data, determining the target ball expected position information of each of the marking target balls under the effect of the current preset posture data; Based on the current preset posture data, the connecting rod weight information of each connecting rod and the target ball weight information of each calibration target ball, the connecting rod sample data corresponding to the current preset posture data and the target ball sample data corresponding to each calibration target ball are determined; wherein the connecting rod sample data includes connecting rod gravity sample information and connecting rod torque sample information, and the target ball sample data includes target ball gravity sample information and target ball torque sample information; For each of the calibration target balls, when the robot arm drives the current calibration target ball based on each of the preset posture data, the actual position information of the target ball corresponding to each of the preset posture data is determined, so as to determine the position offset error of the current calibration target ball driven by each of the preset posture data based on the actual position information of the target ball and the expected position information of the target ball; Constructing training sample data corresponding to the current measured target ball based on the target ball expected position information corresponding to the current measured target ball, the connecting rod sample data under each of the preset posture data, the target ball sample data and the position offset error; Determine a training sample set based on the training sample data corresponding to each of the marking target spheres; The position error determination model to be trained is trained based on the training sample set to obtain a position error determination model.

4. The method according to claim 3, characterized in that The determining of the actual position information of the target ball corresponding to each of the preset posture data comprises: When the mechanical arm drives the current measuring target ball based on each of the preset posture data, the center position of the current measuring target ball is collected based on the laser measuring device to obtain the position information of the target ball to be processed; The target ball position information to be processed is converted into actual target ball position information in the base coordinate system of the robotic arm.

5. The method according to claim 3, characterized in that: The training of the position error determination model to be trained based on the training sample set to obtain the position error determination model includes: For each of the training sample data in the training sample set, the target ball expected position information corresponding to the current calibration target ball in the current training sample data, the connecting rod sample data and the target ball sample data under each of the preset posture data are input into the position error determination model to be trained to obtain the predicted position offset; Performing loss processing on the predicted position offset and the position offset error in the current training sample data based on a preset loss function, so as to perform model correction on the position error determination model to be trained according to the obtained loss value; The convergence of the preset loss function is used as a training target to obtain a position error determination model.

6. The method according to claim 1, characterized in that The center position of the target controlled object is set as the tool center point, and the determining of the expected position information of the target controlled object under the action of the initial rotation parameter includes: Substituting the initial rotation parameters into a preset tool center point calculation function to obtain tool center point position information; The tool center point position information is determined as the expected position information of the target controlled object under the action of the initial rotation parameters.

7. The method according to claim 1, characterized in that Based on the initial rotation parameters, the connecting rod weight information of each connecting rod and the object weight information of the target controlled object, determining the connecting rod gravity information and connecting rod torque information of each connecting rod, the object gravity information and the object torque information of the target controlled object under the action of the initial rotation parameters, including: Determine the connecting rod gravity information and connecting rod torque information of each connecting rod under the action of the initial rotation parameter based on the initial rotation parameter, the connecting rod weight information of each connecting rod and a preset positive kinematic function; Based on the initial rotation parameters, the object weight information of the target controlled object and a preset positive kinematics function, the object gravity information and the object torque information of the target controlled object under the action of the initial rotation parameters are determined.

8. The method according to claim 1, characterized in that The adjusting each of the initial rotation parameters based on the position offset information to obtain a target rotation parameter corresponding to each of the joint axes includes: Determine a rotation parameter compensation amount based on the position offset information and a Jacobian matrix corresponding to the robotic arm; Based on the rotation parameter compensation amount and the initial rotation parameter, a target rotation parameter corresponding to each of the joint axes is determined.

9. A robot arm control device, the robot arm comprising at least two connecting rods, two adjacent connecting rods being connected via a joint axis, the end of the robot arm being connected to a target control object, characterized in that: include: An initial parameter acquisition module, used for acquiring the initial rotation parameters corresponding to each of the joint axes of the robotic arm in the current state when the robotic arm performs displacement control on the target control object, and determining the expected position information of the target control object under the action of the initial rotation parameters; a gravity information determination module, for determining the connecting rod gravity information and connecting rod torque information of each connecting rod, the object gravity information and object torque information of the target controlled object under the action of the initial rotation parameter based on the initial rotation parameter, the connecting rod weight information of each connecting rod and the object weight information of the target controlled object; an offset error determination module, configured to determine position offset information corresponding to the target controlled object based on the expected position information, the gravity information of each connecting rod, the torque information of each connecting rod, the object gravity information, and the object torque information; A rotation parameter compensation module is used to adjust each of the initial rotation parameters based on the position offset information to obtain a target rotation parameter corresponding to each of the joint axes, so as to control each of the joint axes to rotate based on the target rotation parameter so that the current position information of the target control object matches the expected position information.

10. An electronic device, characterized in that: Electronic equipment includes: one or more processors; a storage device for storing one or more programs, When one or more programs are executed by one or more processors, the one or more processors implement the robot arm control method as claimed in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Industrial robot and connecting rod deformation compensation method and device thereof

    CN112847312A

  • Mechanical arm control method and device, mechanical arm and readable storage medium

    CN113510698A

  • Robot 6D pose estimation system and method

    CN114131595A

  • Mechanical arm torque control method and device, computer equipment and storage medium

    CN115582839A

  • Robot joint flexibility coefficient identification method and related device

    CN116010758A