Multi-joint robot motion control method, device, electronic equipment and storage medium
By obtaining the movement direction and preset compensation table of the target joint of the multi-joint robot, combined with the inverse kinematics algorithm, the problem of large trajectory tracking control errors of the joint robot is solved, and precise control effects are achieved.
Patent Information
- Application Number
- CN202210445710.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-26
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-04-26
AI Technical Summary
The existing joint robot control method is simple, resulting in large joint trajectory tracking control errors.
By obtaining the movement direction of the multi-jointed robot's target joint, the joint gap compensation value and elastic coefficient of the target joint are determined according to the preset compensation table, and tracking control is performed based on the inverse kinematics algorithm to reduce trajectory control errors.
It achieves the reduction of trajectory control errors of multi-joint robots and achieves precise tracking control effects.
Smart Images

Figure CN114800503B
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a multi-joint robot motion control method, device, electronic equipment and storage medium. Background Art
[0002] An articulated robot, also known as an articulated robotic arm or a multi-joint robot, has each joint moving in rotation, similar to a human arm. An articulated robot is one of the most common forms of industrial robots in today's industrial field and is suitable for mechanical automation operations in many industrial fields, such as automatic assembly, painting, handling, welding and other tasks.
[0003] Conventionally, when controlling an articulated robot, feedback control is generally performed based on the joint positions fed back by the articulated robot and the preset planned positions.
[0004] It can be seen that the existing control method for articulated robots is relatively simple, and therefore there is a problem of large trajectory tracking control errors of the joints in the robot. Summary of the invention
[0005] The purpose of the present application is to provide a multi-joint robot motion control method, device, electronic device and storage medium to address the deficiencies in the above-mentioned prior art, which can reduce the trajectory control error of the multi-joint robot.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, the present invention provides a multi-joint robot motion control method, comprising:
[0008] Get the motion direction of the target joint in the multi-joint robot;
[0009] Determining a target joint clearance compensation value corresponding to the target joint according to the movement direction of the target joint and a preset compensation table, wherein the preset compensation table includes a joint clearance compensation value corresponding to the target joint when a preset torque is applied to the target joint;
[0010] The target joint is tracked and controlled according to the target joint gap compensation value corresponding to the target joint and the reference motion position of the target joint.
[0011] In an optional embodiment, the preset compensation table further includes a joint elastic coefficient corresponding to the target joint when a preset torque set is applied to the target joint;
[0012] The tracking control of the target joint according to the target joint gap compensation value corresponding to the target joint and the reference motion position of the target joint comprises:
[0013] Determining a target joint elastic coefficient corresponding to the target joint according to the preset compensation table;
[0014] The target joint is tracked and controlled according to the target joint gap compensation value corresponding to the target joint, the target joint elastic coefficient and the reference motion position of the target joint.
[0015] In an optional embodiment, tracking and controlling the target joint according to the target joint gap compensation value corresponding to the target joint, the target joint elastic coefficient, and the reference motion position of the target joint includes:
[0016] According to an inverse kinematics algorithm, obtaining the joint force expected to be output by the target joint;
[0017] Calculating a target joint elasticity compensation value according to the target joint elasticity coefficient and the joint force expected to be output by the target joint;
[0018] The target joint is tracked and controlled according to the target joint clearance compensation value corresponding to the target joint, the target joint elasticity compensation value, and the reference motion position of the target joint.
[0019] In an optional embodiment, before determining the target joint clearance compensation value corresponding to the target joint according to the movement direction of the target joint and a preset compensation table, the method further includes:
[0020] generating a torque application instruction in response to a request to obtain a preset compensation table;
[0021] According to the torque application instruction, a target torque is applied to the target joint, and a joint clearance compensation value and a joint elastic coefficient corresponding to the target joint are respectively obtained;
[0022] The preset compensation table is generated according to the joint clearance compensation value and the joint elasticity coefficient corresponding to the target joint.
[0023] In an optional embodiment, applying a target torque to the target joint according to the torque application instruction, and obtaining a joint clearance compensation value corresponding to the target joint includes:
[0024] According to the first torque application instruction, a first preset torque and a second preset torque are applied to the target joint respectively, wherein the first preset torque and the second preset torque are opposite in direction and have the same magnitude;
[0025] Respectively acquiring a first joint position corresponding to the target joint when the first preset torque is applied and a second joint position corresponding to the target joint when the second preset torque is applied;
[0026] A joint clearance compensation value corresponding to the target joint is calculated according to the first joint position and the second joint position.
[0027] In an optional implementation, calculating the joint clearance compensation value corresponding to the target joint according to the first joint position and the second joint position includes:
[0028] A position difference between the first joint position and the second joint position is calculated, and the position difference is used as a joint gap compensation value corresponding to the target joint.
[0029] In an optional embodiment, applying a target torque to the target joint according to the torque application instruction, and acquiring a joint elastic coefficient corresponding to the target joint includes:
[0030] Applying a preset torque set to the target joint according to the second torque application instruction, wherein the preset torque set includes a plurality of third torques;
[0031] Respectively acquiring the third joint position corresponding to the target joint when each of the third torques is applied;
[0032] Calculating each joint control error according to each of the third joint positions and the reference motion position of the target joint;
[0033] According to each of the joint control errors and each of the third torques, a joint elastic coefficient corresponding to the target joint is obtained.
[0034] In a second aspect, the present invention provides a multi-joint robot motion control device, comprising:
[0035] An acquisition module is used to obtain the movement direction of a target joint in a multi-joint robot;
[0036] A determination module, configured to determine a target joint clearance compensation value corresponding to the target joint according to a movement direction of the target joint and a preset compensation table, wherein the preset compensation table includes a joint clearance compensation value corresponding to the target joint when a preset torque is applied to the target joint;
[0037] The control module is used to track and control the target joint according to the target joint gap compensation value corresponding to the target joint and the reference motion position of the target joint.
[0038] In an optional embodiment, the preset compensation table further includes a joint elastic coefficient corresponding to the target joint when a preset torque set is applied to the target joint; the control module is specifically used to determine a target joint elastic coefficient corresponding to the target joint according to the preset compensation table;
[0039] The target joint is tracked and controlled according to the target joint gap compensation value corresponding to the target joint, the target joint elastic coefficient and the reference motion position of the target joint.
[0040] In an optional embodiment, the control module is specifically used to obtain the joint force expected to be output by the target joint according to an inverse kinematics algorithm;
[0041] Calculating a target joint elasticity compensation value according to the target joint elasticity coefficient and the joint force expected to be output by the target joint;
[0042] The target joint is tracked and controlled according to the target joint clearance compensation value corresponding to the target joint, the target joint elasticity compensation value, and the reference motion position of the target joint.
[0043] In an optional embodiment, the determination module is further configured to generate a torque application instruction in response to an acquisition request of a preset compensation table;
[0044] According to the torque application instruction, a target torque is applied to the target joint, and a joint clearance compensation value and a joint elastic coefficient corresponding to the target joint are respectively obtained;
[0045] The preset compensation table is generated according to the joint clearance compensation value and the joint elasticity coefficient corresponding to the target joint.
[0046] In an optional embodiment, the determination module is specifically configured to apply a first preset torque and a second preset torque to the target joint respectively according to the first torque application instruction, wherein the first preset torque and the second preset torque are opposite in direction and have the same magnitude;
[0047] Respectively acquiring a first joint position corresponding to the target joint when the first preset torque is applied and a second joint position corresponding to the target joint when the second preset torque is applied;
[0048] A joint clearance compensation value corresponding to the target joint is calculated according to the first joint position and the second joint position.
[0049] In an optional embodiment, the determination module is specifically configured to calculate a position difference between the first joint position and the second joint position, and use the position difference as a joint gap compensation value corresponding to the target joint.
[0050] In an optional embodiment, the determination module is specifically configured to apply a preset torque set to the target joint according to the second torque application instruction, wherein the preset torque set includes a plurality of third torques;
[0051] Respectively acquiring the third joint position corresponding to the target joint when each of the third torques is applied;
[0052] Calculating each joint control error according to each of the third joint positions and the reference motion position of the target joint;
[0053] According to each of the joint control errors and each of the third torques, a joint elastic coefficient corresponding to the target joint is obtained.
[0054] In the third aspect, the present invention provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the multi-joint robot motion control method as described in any of the aforementioned embodiments.
[0055] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the multi-joint robot motion control method as described in any of the aforementioned embodiments are executed.
[0056] The beneficial effects of this application are:
[0057] In the multi-joint robot motion control method, device, electronic device and storage medium provided in the embodiments of the present application, the motion direction of the target joint in the multi-joint robot is obtained; the target joint gap compensation value corresponding to the target joint is determined according to the motion direction of the target joint and a preset compensation table, and the preset compensation table includes the joint gap compensation value corresponding to the target joint when a preset torque is applied to the target joint; the target joint is tracked and controlled according to the target joint gap compensation value corresponding to the target joint and the reference motion position of the target joint, thereby reducing the trajectory control error of the multi-joint robot from the joint level, and thus achieving precise control when tracking and controlling the target joint. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0059] Figure 1 A schematic diagram of a flow chart of a multi-joint robot motion control method provided in an embodiment of the present application;
[0060] Figure 2A schematic diagram of another multi-joint robot motion control method provided in an embodiment of the present application;
[0061] Figure 3 A schematic flow chart of another multi-joint robot motion control method provided in an embodiment of the present application;
[0062] Figure 4 A schematic diagram of another multi-joint robot motion control method provided in an embodiment of the present application;
[0063] Figure 5 A schematic flow chart of another multi-joint robot motion control method provided in an embodiment of the present application;
[0064] Figure 6 A schematic diagram of another multi-joint robot motion control method provided in an embodiment of the present application;
[0065] Figure 7 A schematic diagram of the functional modules of a multi-joint robot motion control device provided in an embodiment of the present application;
[0066] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0067] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0068] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0069] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0070] In the prior art, when controlling an articulated robot, feedback control is generally performed on the articulated robot based on the preset planned positions of the joints and the joint positions fed back during the control process. Therefore, the existing control methods for articulated robots are relatively simple and there is a problem of large joint trajectory tracking control errors.
[0071] In view of this, an embodiment of the present application provides a multi-joint robot motion control method, and the application of this method can reduce the trajectory tracking control error of the multi-joint robot.
[0072] Figure 1 The present invention provides a schematic flow chart of a multi-joint robot motion control method, the execution subject of the method may be a multi-joint robot, specifically a controller in the multi-joint robot. Figure 1 As shown, the method may include:
[0073] S101. Obtain the movement direction of a target joint in a multi-joint robot.
[0074] Optionally, the multi-joint robot can be a robot used in industrial fields such as painting, handling, welding, etc.; the target joint can be any joint in the multi-joint robot, for example, it can be a knee joint, hip joint, ankle joint, elbow joint, etc., without limitation here.
[0075] In some embodiments, the movement direction of the target joint can be obtained through the trajectory planning route corresponding to the target joint, and of course, can also be acquired through the joint angle sensor, which is not limited here. The movement direction of the target joint can be forward or reverse.
[0076] S102. Determine a target joint clearance compensation value corresponding to the target joint according to the movement direction of the target joint and a preset compensation table, wherein the preset compensation table includes a joint clearance compensation value corresponding to the target joint when a preset torque is applied to the target joint.
[0077] It can be seen that the joint clearance compensation value corresponding to the target joint can be obtained through the preset compensation table. The joint clearance value corresponding to the target joint can characterize the position difference of the target joint from the preset position when the preset torque is applied to the target joint, wherein the preset position can be the default position corresponding to the target joint when the multi-joint robot is in the initial state, or it can be other positions, which are not limited here.
[0078] Among them, the joint gap compensation direction can be determined according to the movement direction of the target joint. If the movement direction of the target joint is forward rotation, the joint gap compensation direction can be determined as positive compensation, that is, the target joint gap compensation value corresponding to the target joint is positive; otherwise, if the movement direction of the target joint is reverse, the joint gap compensation direction can be determined as reverse compensation, that is, the target joint gap compensation value corresponding to the target joint is negative.
[0079] S103, tracking and controlling the target joint according to the target joint clearance compensation value corresponding to the target joint and the reference motion position of the target joint.
[0080] Among them, the reference motion position of the target joint can be obtained through the trajectory planning route corresponding to the target joint. Of course, in some embodiments, it can also be acquired through a joint position sensor, which is not limited here.
[0081] Based on the above description, after determining the target joint gap compensation value corresponding to the target joint, the reference motion position of the target joint can be compensated according to the joint gap compensation value corresponding to the target joint, and the target joint position corresponding to the compensated target joint can be obtained, so as to reduce the trajectory control error of the multi-joint robot from the joint level, and then when the target joint is further controlled according to the target joint position, precise tracking and control of the target joint can be achieved.
[0082] In summary, an embodiment of the present application provides a multi-joint robot motion control method, the method comprising: obtaining the motion direction of a target joint in the multi-joint robot; determining a target joint gap compensation value corresponding to the target joint according to the motion direction of the target joint and a preset compensation table, the preset compensation table including a joint gap compensation value corresponding to the target joint when a preset torque is applied to the target joint; tracking and controlling the target joint according to the target joint gap compensation value corresponding to the target joint and a reference motion position of the target joint, thereby reducing the trajectory control error of the multi-joint robot from the joint level, and thus achieving precise control when tracking and controlling the target joint.
[0083] Figure 2 A flow chart of another multi-joint robot motion control method provided by an embodiment of the present application. Optionally, the above-mentioned preset compensation table may also include a joint elastic coefficient corresponding to the target joint when a preset torque set is applied to the target joint, wherein the preset torque set may include multiple torques, wherein the multiple torques may include multiple positive torques and multiple negative torques, and the joint elastic coefficient corresponding to the target joint may characterize the relationship between the preset torque set and the target joint control error when the preset torque set is applied to the target joint, wherein the target joint control error may characterize the position difference of the target joint from the preset position when the preset torque set is applied, and the description of the preset position may refer to the aforementioned relevant part, which will not be repeated here.
[0084] Based on the above embodiments, Figure 2 As shown, the step of tracking and controlling the target joint according to the target joint gap compensation value corresponding to the target joint and the reference motion position of the target joint may include:
[0085] S201. Determine a target joint elastic coefficient corresponding to a target joint according to a preset compensation table.
[0086] S202, tracking and controlling the target joint according to the target joint gap compensation value, the target joint elastic coefficient and the reference motion position of the target joint corresponding to the target joint.
[0087] Based on the description of the preset compensation table, it can be seen that the target joint elastic coefficient corresponding to the target joint can also be obtained through the preset compensation table, and then the reference motion position of the target joint can be compensated in multiple dimensions according to the target joint elastic coefficient and the target joint gap compensation value, thereby reducing the trajectory control error of the multi-joint robot from multiple dimensions at the joint level, and then when the target joint is further controlled according to the target joint position, further precise tracking and control of the target joint can be achieved.
[0088] It should be noted that, when performing compensation, the present application does not limit the order of compensation, that is, the reference motion position of the target joint can be compensated first according to the joint clearance compensation value corresponding to the target joint, and then further compensation can be made according to the target joint elasticity coefficient; or the reference motion position of the target joint can be compensated first according to the target joint elasticity coefficient corresponding to the target joint, and then further compensation can be made according to the joint clearance compensation value corresponding to the target joint. The compensation order can be flexibly selected according to the actual application scenario.
[0089] Figure 3 A schematic diagram of a flow chart of another multi-joint robot motion control method provided in an embodiment of the present application. Figure 3 As shown, the target joint is tracked and controlled according to the target joint gap compensation value, the target joint elastic coefficient and the reference motion position of the target joint corresponding to the target joint, including:
[0090] S301. Obtain the joint force expected to be output by the target joint according to an inverse kinematics algorithm.
[0091] The inverse kinematics algorithm refers to an algorithm for solving the angles of each joint according to the posture of the robot's trunk and feet. In some embodiments, the joint force expected to be output by the target joint can be obtained based on the inverse kinematics algorithm, wherein the joint force expected to be output by the target joint can be a vector.
[0092] S302: Calculate the target joint elasticity compensation value according to the target joint elasticity coefficient and the joint force expected to be output by the target joint.
[0093] In some embodiments, the target joint elasticity compensation value can be determined by calculating the ratio between the joint force expected to be output by the target joint and the elastic coefficient of the target joint, that is, the elastic coefficient of the target joint is k, and the joint force expected to be output by the target joint is f. ref , then the target joint elastic compensation value θ spring It can be expressed as Based on this formula, it can be seen that when the joint force expected to be output by the target joint is different, different target joint elastic compensation values will be obtained.
[0094] S303, tracking and controlling the target joint according to the target joint clearance compensation value, the target joint elasticity compensation value, and the reference motion position of the target joint corresponding to the target joint.
[0095] Based on the above description, after obtaining the target joint elasticity compensation value, the reference motion position of the target joint can be compensated according to the target joint gap compensation value and the target joint elasticity compensation value corresponding to the target joint, and the target joint position corresponding to the compensated target joint can be obtained, and then the target joint can be accurately tracked and controlled based on the target joint position.
[0096] Optionally, the specific compensation method can refer to the following formula, wherein, assuming that the target joint clearance compensation value corresponding to the target joint is determined according to the movement direction of the target joint, the reference movement position of the target joint is positively compensated, then the target joint position θ corresponding to the target joint after the above compensation is cmd It can be expressed as θ cmd =θ ref +θ gap +θ spring , where θ ref represents the reference motion position of the target joint; θ gap represents the target joint gap compensation value corresponding to the target joint; θ spring Represents the target joint elastic compensation value. Based on the above description, it can be understood that in the real-time control process, the controller in the multi-joint robot can calculate the target joint position θ according to the calculated target joint position θ. cmd Controls the movement of the target joint.
[0097] Figure 4 A schematic flow chart of another multi-joint robot motion control method provided in an embodiment of the present application. Figure 4 As shown, before determining the target joint clearance compensation value corresponding to the target joint according to the movement direction of the target joint and the preset compensation table, the following further comprises:
[0098] S401 : In response to a request to obtain a preset compensation table, generate a torque application instruction.
[0099] S402. Apply a target torque to a target joint according to a torque application instruction, and obtain a joint clearance compensation value and a joint elastic coefficient corresponding to the target joint.
[0100] S403, generating a preset compensation table according to the joint clearance compensation value and the joint elastic coefficient corresponding to the target joint.
[0101] Optionally, the multi-joint robot can generate a request to obtain a preset compensation table based on the user's job request, and can generate a torque application instruction in response to the request to obtain the preset compensation table; according to the torque application instruction, the multi-joint robot can control the target joint to perform position holding control at a reference motion position, and apply a target torque to the target joint, and obtain the joint gap compensation value and joint elastic coefficient corresponding to the target joint respectively by applying the target torque.
[0102] Among them, the job request can be used to request the multi-joint robot to perform painting operations, handling operations, welding operations, etc., which are not limited here. In some embodiments, when applying the target torque to the target joint, the joint robot can apply the target torque to the target joint through its own motor, or the joint robot can be connected to an external device for communication, and apply the target torque to the target joint through the external device. Optionally, the external device can be a motor-to-motor test bench, or other devices with the same or similar functions as the motor-to-motor test bench, which are not limited here.
[0103] Of course, it should be noted that the preset compensation table can also include the joint gap compensation values and joint elasticity coefficients corresponding to other joints in the multi-joint robot. The acquisition of the joint gap compensation values and joint elasticity coefficients corresponding to other joints can refer to the acquisition process of the joint gap compensation values and joint elasticity coefficients corresponding to the above-mentioned target joints, which will not be repeated here.
[0104] Figure 5 A schematic diagram of a flow chart of another multi-joint robot motion control method provided in an embodiment of the present application. Figure 5 As shown, the above-mentioned method of applying the target torque to the target joint according to the torque application instruction and obtaining the joint clearance compensation value corresponding to the target joint includes:
[0105] S501. According to a first torque application instruction, apply a first preset torque and a second preset torque to a target joint respectively.
[0106] The first preset torque and the second preset torque are opposite in direction and the same in magnitude. That is, if the first preset torque is a torque in the positive direction, the second preset torque may be a torque of the same magnitude and opposite in direction as the first preset torque, that is, the second preset torque may be a torque in the reverse direction. For example, the first preset torque may be 0.1Nm, and the second preset torque may be -0.1Nm. Of course, the specific value is not limited to this and can be flexibly set according to the actual application scenario.
[0107] In some embodiments, the first torque application instruction may include the magnitude and direction of any one of the first preset torque and the second preset torque. Based on the above description, it can be understood that if the magnitude and direction of any one of the first preset torque and the second preset torque are known, the magnitude and direction of the other preset torque can be determined based on the relationship between the two, and the first preset torque and the second preset torque can be applied to the target joint respectively. For example, the first preset torque can be applied to the target joint first, and then the second preset torque can be applied to the target joint respectively.
[0108] S502 , respectively obtaining a first joint position corresponding to the target joint when a first preset torque is applied and a second joint position corresponding to the target joint when a second preset torque is applied.
[0109] Based on the above description, when the first preset torque and the second preset torque are applied to the target joint respectively, the first joint position of the target joint corresponding to the first preset torque and the second joint position of the target joint corresponding to the second preset torque can be obtained respectively. Optionally, when obtaining, the joint position sensor corresponding to the target joint can be used to collect and obtain, which is not limited here.
[0110] S503. Calculate a joint clearance compensation value corresponding to the target joint according to the first joint position and the second joint position.
[0111] Among them, the joint gap compensation value corresponding to the target joint can be determined by calculating the position difference between the first joint position and the second joint position, that is, the position difference between the first joint position and the second joint position can be used as the joint gap compensation value corresponding to the target joint.
[0112] Based on the above description, the relationship between the joint clearance compensation value corresponding to the target joint and the target joint clearance compensation value corresponding to the target joint can be expressed as the following formula:
[0113]
[0114] Among them, θ gap Indicates the target joint gap compensation value corresponding to the target joint, represents the reference motion velocity of the target joint, Δθ gap represents the joint gap compensation value corresponding to the target joint. From this formula, it can be seen that The calculation can determine the movement direction of the target joint.
[0115] Figure 6 A schematic flow chart of another multi-joint robot motion control method provided in an embodiment of the present application. Figure 6As shown, the step of applying the target torque to the target joint according to the torque application instruction and obtaining the joint elastic coefficient corresponding to the target joint may include:
[0116] S601. Apply a preset torque set to a target joint according to a second torque application instruction, where the preset torque set includes a plurality of third torques.
[0117] Among them, the multiple third torques may include multiple positive torques and multiple negative torques, and the magnitude of some positive torques may be the same as the magnitude of some negative torques. For example, the multiple third torques may include: -5Nm, -4.5Nm, -4Nm, ..., 4Nm, 4.5Nm, 5Nm, that is, the multiple third torques may include a series of torques at equal intervals. Of course, according to the actual application scenario, the multiple third torques may also include a series of torques at non-equal intervals, for example, they may include: -5Nm, -4Nm, ..., 3Nm, 4.5Nm, 5Nm, etc. The specific value method is not limited to this.
[0118] S602 , respectively obtaining the third joint positions corresponding to the target joints when the third torques are applied.
[0119] S603: Calculate the control error of each joint according to the position of each third joint and the reference motion position of the target joint.
[0120] The specific application process of each third torque can be referred to in the application process of the first preset torque and the second preset torque, which will not be described in detail here. When each third torque is applied to the target joint, the third joint position corresponding to the target joint when each third torque is applied can be obtained respectively. It can be understood that multiple third joint positions will be obtained at this time.
[0121] Based on the above description, further, each joint control error between each third joint position and the reference motion position of the target joint can be obtained, and each joint control error can represent the control error of the target joint when each third torque is applied.
[0122] S604: Obtain a joint elastic coefficient corresponding to the target joint according to each joint control error and each third torque.
[0123] Based on the above description, it can also be understood that each joint control error will correspond to a third torque, so at this time, the joint elastic coefficient corresponding to the target joint can be obtained by fitting according to each joint control error and each third torque. The fitting formula can be expressed as the following formula:
[0124] f=kθ err
[0125] Where f represents the preset torque set, θ errrepresents the joint control error set corresponding to the preset torque set, and k represents the joint elastic coefficient corresponding to the target joint.
[0126] It should be noted that, during the specific fitting, it can be obtained based on the least squares fitting method. Of course, the present application does not limit the specific fitting algorithm here, and it can be flexibly selected according to the actual application scenario.
[0127] Figure 7 This is a functional module diagram of a multi-joint robot motion control device provided in the embodiment of the present application. The basic principle and technical effects of the device are the same as those of the corresponding method embodiment described above. For the sake of brief description, the parts not mentioned in this embodiment can be referred to the corresponding contents in the method embodiment. Figure 7 As shown, the motion control device 100 may include:
[0128] An acquisition module 110 is used to acquire the movement direction of a target joint in a multi-joint robot;
[0129] A determination module 120, configured to determine a target joint clearance compensation value corresponding to the target joint according to the movement direction of the target joint and a preset compensation table, wherein the preset compensation table includes a joint clearance compensation value corresponding to the target joint when a preset torque is applied to the target joint;
[0130] The control module 130 is used to track and control the target joint according to the target joint gap compensation value corresponding to the target joint and the reference motion position of the target joint.
[0131] In an optional embodiment, the preset compensation table further includes a joint elastic coefficient corresponding to the target joint when a preset torque set is applied to the target joint; the control module 130 is specifically used to determine a target joint elastic coefficient corresponding to the target joint according to the preset compensation table;
[0132] The target joint is tracked and controlled according to the target joint gap compensation value corresponding to the target joint, the target joint elastic coefficient and the reference motion position of the target joint.
[0133] In an optional implementation, the control module 130 is specifically configured to obtain the joint force expected to be output by the target joint according to an inverse kinematics algorithm;
[0134] Calculating a target joint elasticity compensation value according to the target joint elasticity coefficient and the joint force expected to be output by the target joint;
[0135] The target joint is tracked and controlled according to the target joint clearance compensation value corresponding to the target joint, the target joint elasticity compensation value, and the reference motion position of the target joint.
[0136] In an optional embodiment, the determination module 120 is further configured to generate a torque application instruction in response to an acquisition request of a preset compensation table;
[0137] According to the torque application instruction, a target torque is applied to the target joint, and a joint clearance compensation value and a joint elastic coefficient corresponding to the target joint are respectively obtained;
[0138] The preset compensation table is generated according to the joint clearance compensation value and the joint elasticity coefficient corresponding to the target joint.
[0139] In an optional embodiment, the determination module 120 is specifically configured to apply a first preset torque and a second preset torque to the target joint according to the first torque application instruction, wherein the first preset torque and the second preset torque are opposite in direction and have the same magnitude;
[0140] Respectively acquiring a first joint position corresponding to the target joint when the first preset torque is applied and a second joint position corresponding to the target joint when the second preset torque is applied;
[0141] A joint clearance compensation value corresponding to the target joint is calculated according to the first joint position and the second joint position.
[0142] In an optional implementation, the determination module 120 is specifically configured to calculate a position difference between the first joint position and the second joint position, and use the position difference as a joint gap compensation value corresponding to the target joint.
[0143] In an optional embodiment, the determination module 120 is specifically configured to apply a preset torque set to the target joint according to the second torque application instruction, wherein the preset torque set includes a plurality of third torques;
[0144] Respectively acquiring the third joint position corresponding to the target joint when each of the third torques is applied;
[0145] Calculating each joint control error according to each of the third joint positions and the reference motion position of the target joint;
[0146] According to each of the joint control errors and each of the third torques, a joint elastic coefficient corresponding to the target joint is obtained.
[0147] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0148] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0149] Figure 8 The following is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device can be integrated into a multi-joint robot. Figure 8 As shown, the electronic device may include: a processor 210, a storage medium 220 and a bus 230, the storage medium 220 stores machine-readable instructions executable by the processor 210, when the electronic device is running, the processor 210 and the storage medium 220 communicate through the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.
[0150] Optionally, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method embodiment are executed. The specific implementation method and technical effect are similar and will not be repeated here.
[0151] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0152] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0153] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0154] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0155] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0156] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application. It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A multi-joint robot motion control method, characterized in that: include: Get the motion direction of the target joint in the multi-joint robot; Determine a target joint clearance compensation value corresponding to the target joint according to the movement direction of the target joint and a preset compensation table, wherein the preset compensation table includes a joint clearance compensation value corresponding to the target joint when a preset torque is applied to the target joint; wherein the target joint clearance compensation value corresponding to the target joint represents a position difference of the target joint from a preset position when the preset torque is applied to the target joint, wherein the preset position is a default position corresponding to the target joint when the multi-joint robot is in an initial state; Tracking and controlling the target joint according to the target joint gap compensation value corresponding to the target joint and the reference motion position of the target joint; The preset compensation table also includes a joint elastic coefficient corresponding to the target joint when a preset torque set is applied to the target joint; The tracking control of the target joint according to the target joint gap compensation value corresponding to the target joint and the reference motion position of the target joint comprises: According to the preset compensation table, determining a target joint elastic coefficient corresponding to the target joint; wherein the target joint elastic coefficient corresponding to the target joint represents a relationship between the preset torque and a target joint control error when the preset torque is applied to the target joint, and the target joint control error represents a position difference of the target joint deviating from the preset position when the preset torque set is applied to the target joint; The target joint is tracked and controlled according to the target joint gap compensation value corresponding to the target joint, the target joint elastic coefficient and the reference motion position of the target joint.
2. The method according to claim 1, characterized in that: The tracking control of the target joint according to the target joint gap compensation value corresponding to the target joint, the target joint elastic coefficient and the reference motion position of the target joint includes: According to an inverse kinematics algorithm, obtaining the joint force expected to be output by the target joint; Calculating a target joint elasticity compensation value according to the target joint elasticity coefficient and the joint force expected to be output by the target joint; The target joint is tracked and controlled according to the target joint clearance compensation value corresponding to the target joint, the target joint elasticity compensation value, and the reference motion position of the target joint.
3. The method according to claim 1, characterized in that Before determining the target joint clearance compensation value corresponding to the target joint according to the movement direction of the target joint and the preset compensation table, the method further includes: generating a torque application instruction in response to a request to obtain a preset compensation table; According to the torque application instruction, a target torque is applied to the target joint, and a joint clearance compensation value and a joint elastic coefficient corresponding to the target joint are respectively obtained; The preset compensation table is generated according to the joint clearance compensation value and the joint elasticity coefficient corresponding to the target joint.
4. The method according to claim 3, characterized in that: Applying a target torque to the target joint according to the torque application instruction, and obtaining a joint clearance compensation value corresponding to the target joint, including: According to the first torque application instruction, a first preset torque and a second preset torque are applied to the target joint respectively, wherein the first preset torque and the second preset torque are opposite in direction and have the same magnitude; Respectively acquiring a first joint position corresponding to the target joint when the first preset torque is applied and a second joint position corresponding to the target joint when the second preset torque is applied; A joint clearance compensation value corresponding to the target joint is calculated according to the first joint position and the second joint position.
5. The method according to claim 4, characterized in that The calculating the joint clearance compensation value corresponding to the target joint according to the first joint position and the second joint position includes: A position difference between the first joint position and the second joint position is calculated, and the position difference is used as a joint gap compensation value corresponding to the target joint.
6. The method according to claim 3, characterized in that Applying a target torque to the target joint according to the torque application instruction, and acquiring a joint elastic coefficient corresponding to the target joint, including: Applying a preset torque set to the target joint according to the second torque application instruction, wherein the preset torque set includes a plurality of third torques; Respectively acquiring the third joint position corresponding to the target joint when each of the third torques is applied; Calculating each joint control error according to each of the third joint positions and the reference motion position of the target joint; According to each of the joint control errors and each of the third torques, a joint elastic coefficient corresponding to the target joint is obtained.
7. A multi-joint robot motion control device, characterized in that: include: An acquisition module is used to obtain the movement direction of a target joint in a multi-joint robot; A determination module, for determining a target joint clearance compensation value corresponding to a target joint according to a movement direction of the target joint and a preset compensation table, wherein the preset compensation table includes a joint clearance compensation value corresponding to the target joint when a preset torque is applied to the target joint; wherein the target joint clearance compensation value corresponding to the target joint represents a position difference of the target joint from a preset position when the preset torque is applied to the target joint, wherein the preset position is a default position corresponding to the target joint when the multi-joint robot is in an initial state; the preset compensation table also includes a joint elastic coefficient corresponding to the target joint when a preset torque set is applied to the target joint; A control module, used for tracking and controlling the target joint according to a target joint clearance compensation value corresponding to the target joint and a reference motion position of the target joint; The control module is specifically used to determine the target joint elastic coefficient corresponding to the target joint according to the preset compensation table; wherein the target joint elastic coefficient corresponding to the target joint represents the relationship between the preset torque and the target joint control error when the preset torque is applied to the target joint, and the target joint control error represents the position difference of the target joint deviating from the preset position when the preset torque set is applied; the target joint is tracked and controlled according to the target joint gap compensation value corresponding to the target joint, the target joint elastic coefficient and the reference motion position of the target joint.
8. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the multi-joint robot motion control method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the multi-joint robot motion control method as claimed in any one of claims 1 to 6 are executed.
