Terminal force estimation model training method, estimation method, device, equipment and medium
By training an end-effector force estimation model and utilizing multiple motion state data of the robotic arm and a single-axis force sensor, the problem of expensive and complex end-effector force sensors for robotic arms is solved, achieving accurate end-effector force estimation, reducing costs and improving operational accuracy and safety.
Patent Information
- Application Number
- CN202311091276.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2043-08-28
AI Technical Summary
Existing technologies for force sensors at the end effector of robotic arms are expensive and complex to install, resulting in high costs and low accuracy.
By acquiring sample state data of the robotic arm in multiple motion states, the initial end-effector force estimation model is used to predict and iteratively adjust the model parameters to train the target end-effector force estimation model, which only requires a single-axis force sensor to acquire the end-effector force parameters.
While reducing costs, the robot arm's end effector force is accurately estimated, improving operational precision and safety.
Smart Images

Figure CN119526371B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of mechanical arms, in particular to a terminal force estimation model training method, an estimation method, a device, equipment and a medium. BACKGROUND
[0002] Automated industrial robot arms have a wide range of application scenarios in production and living environments, such as industrial welding robot arms, sorting robot arms, etc. In the use of robot arms, it is usually necessary to accurately obtain the force information at the end of the robot arm to achieve high-precision and high-efficiency operation and assembly requirements. For example, for a welding robot arm, the end force information can help the robot arm control the force and pressure of the welding torch to ensure the quality and stability of the welding. For a sorting robot arm, the end force information can help the robot arm control the force and posture of the clamped object to accurately sort the objects. In addition, in some special environments, such as high temperature and high pressure environments, the end force information of the robot arm can also help the robot arm adapt to environmental changes to ensure the safety and stability of the operation. Therefore, accurately obtaining the force information at the end of the robot arm is crucial for the efficient operation and safety of the robot arm.
[0003] Various sensors and measurement methods are widely used in the acquisition of the force at the end of the robot arm to meet the needs of different application scenarios. Generally, the force at the end of the robot arm can be obtained by deploying a force sensor at its end and reading the value of the sensor. For example, a six-axis force sensor can be installed at the end of the robot arm to obtain the force information in the xyz and roll, pitch, yaw six dimensions, which can be used to control the motion of the robot arm and achieve high-precision operation and assembly tasks. However, the price of the force sensor is generally quite high, for example, a common six-axis force sensor costs more than 20,000 yuan, which may increase the cost and complexity of the robot arm. In addition, the installation and calibration of the force sensor also require professional technology and operation, which may also increase the difficulty and cost of use. SUMMARY
[0004] The present application provides a terminal force estimation model training method, an estimation method, a device, equipment and a medium to solve the problems of low precision and high cost in the prior art.
[0005] The technical solutions adopted by the embodiments of the present application are as follows:
[0006] In a first aspect, the embodiments of the present application provide a terminal force estimation model training method, which comprises:
[0007] The sample state data comprises sample state data of a plurality of joints in the mechanical arm and sample force parameters of an end of the mechanical arm in a plurality of preset directions; the plurality of preset directions comprise a first preset direction and a second preset direction;
[0008] An initial end force estimation model is adopted to predict, according to the sample state data of the plurality of joints and the sample force parameter of the end in the first preset direction, an estimated force parameter of the end in the second preset direction corresponding to the sample state data;
[0009] The model parameters of the initial end force estimation model are iteratively adjusted according to the sample force parameter of the second preset direction in the sample state data and the estimated force parameter of the end in the second preset direction corresponding to the sample state data, until the initial end force estimation model after parameter adjustment meets an iteration stop condition, to obtain a target end force estimation model.
[0010] In a second aspect, an embodiment of the present application provides an end force estimation method, and the method comprises:
[0011] State data of a plurality of joints in a mechanical arm to be estimated and a force parameter of an end of the mechanical arm to be estimated in a first preset direction are obtained.
[0012] According to the state data of the plurality of joints in the mechanical arm to be estimated and the force parameter of the end of the mechanical arm to be estimated in the first preset direction, an end force estimation model is adopted to estimate a force parameter of the end of the mechanical arm to be estimated in a second preset direction; wherein the end force estimation model is the target end force estimation model of any one of the first aspect.
[0013] In a third aspect, an embodiment of the present application provides an end force estimation model training device, and the device comprises:
[0014] A first obtaining module is configured to obtain a plurality of sets of sample state data of a mechanical arm in a plurality of motion states, and the sample state data comprises sample state data of a plurality of joints in the mechanical arm and sample force parameters of an end of the mechanical arm in a plurality of preset directions; the plurality of preset directions comprise a first preset direction and a second preset direction.
[0015] A prediction module is configured to adopt an initial end force estimation model to predict, according to the sample state data of the plurality of joints and the sample force parameter of the end in the first preset direction, an estimated force parameter of the end in the second preset direction corresponding to the sample state data.
[0016] The adjusting module is configured to iteratively adjust model parameters of the initial end-effector force estimation model according to sample force parameters of the second preset direction in the sample state data and estimated force parameters of the end-effector corresponding to the sample state data in the second preset direction, until the initial end-effector force estimation model after parameter adjustment meets an iteration stop condition, and a target end-effector force estimation model is obtained.
[0017] In a fourth aspect, an embodiment of the present application provides an end-effector force estimation device, and the device comprises:
[0018] The second obtaining module is configured to obtain state data of a plurality of joints in a to-be-estimated robot arm and force parameters of an end-effector of the to-be-estimated robot arm in a first preset direction.
[0019] The estimation module is configured to estimate force parameters of the end-effector of the to-be-estimated robot arm in a second preset direction according to the state data of the plurality of joints in the to-be-estimated robot arm and the force parameters of the end-effector of the to-be-estimated robot arm in the first preset direction, and by using an end-effector force estimation model, wherein the end-effector force estimation model is the target end-effector force estimation model of any one of the first aspect.
[0020] In a fifth aspect, an embodiment of the present application provides an electronic device, which comprises a processor and a storage medium, the processor and the storage medium are communicatively connected through a bus, the storage medium stores program instructions executable by the processor, and the processor invokes the program stored in the storage medium to execute steps of the end-effector force estimation model training method of any one of the first aspect or the steps of the end-effector force estimation method of any one of the second aspect.
[0021] In a sixth aspect, an embodiment of the present application provides a storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to execute steps of the end-effector force estimation model training method of any one of the first aspect or the steps of the end-effector force estimation method of any one of the second aspect.
[0022] Compared with the prior art, the present application has the following beneficial effects:
[0023] The application provides an end force estimation model training method, an estimation method, a device, equipment and a medium. A plurality of groups of sample state data of a mechanical arm in a plurality of motion states are obtained, the sample state data comprising: sample state data of a plurality of joints in the mechanical arm and sample force parameters of an end of the mechanical arm in a plurality of preset directions; the plurality of preset directions comprise a first preset direction and a second preset direction; an initial end force estimation model is used to predict, according to the sample state data of the plurality of joints in the sample state data and the sample force parameters of the end in the first preset direction, an estimated force parameter of the end in the second preset direction corresponding to the sample state data; and the model parameters of the initial end force estimation model are iteratively adjusted according to the sample force parameters in the second preset direction in the sample state data and the estimated force parameter of the end in the second preset direction corresponding to the sample state data, until the initial end force estimation model after parameter adjustment meets an iteration stop condition, to obtain a target end force estimation model. Thus, the sample data is more real, the cost is reduced, and the end force of the mechanical arm is accurately obtained. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiments. It should be understood that the following drawings only show some of the embodiments of the application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0025] Figure 1 A flowchart of an end force estimation model training method provided by the application is shown in the figure;
[0026] Figure 2 A flowchart of a method for obtaining sample force parameters of an end of a mechanical arm in a plurality of directions provided by the embodiment of the application is shown in the figure;
[0027] Figure 3 A flowchart of a sample force parameter calibration method provided by the embodiment of the application is shown in the figure;
[0028] Figure 4 A flowchart of a data preprocessing method provided by the embodiment of the application is shown in the figure;
[0029] Figure 5 A flowchart of another end force estimation model training method provided by the embodiment of the application is shown in the figure;
[0030] Figure 6 A flowchart of an end force estimation method provided by the application is shown in the figure;
[0031] Figure 7Another method for obtaining the force parameter in the first preset direction provided by the embodiment of the present application is shown in the flowchart.
[0032] Figure 8 A calibration method for the initial force parameter in the first preset direction provided by the embodiment of the present application is shown in the flowchart.
[0033] Figure 9 A data processing method for estimating the end force provided by the embodiment of the present application is shown in the flowchart.
[0034] Figure 10 A schematic diagram of an end force estimation model training device provided by the embodiment of the present application is shown in the flowchart.
[0035] Figure 11 A schematic diagram of an end force estimation device provided by the embodiment of the present application is shown in the flowchart.
[0036] Figure 12 A schematic diagram of an electronic device provided by the embodiment of the present application is shown in the flowchart.
[0037] Icon: 1001-first acquisition module, 1002-prediction module, 1003-adjustment module, 1101-second acquisition module, 1102-estimation module, 1201-processor, 1202-storage medium. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all embodiments of the present application. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.
[0039] Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without making creative efforts are within the scope of protection of the present application.
[0040] It should be noted that similar reference numerals 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.
[0041] In addition, if the terms "first", "second", etc. are used only to distinguish description, and cannot be understood as indicating or implying relative importance.
[0042] It should be noted that the features in the embodiments of the application can be combined with each other without conflict.
[0043] In order to accurately estimate the end force of the robot arm, the application provides an end force estimation model training method, an estimation method, a device, equipment and a medium.
[0044] Before explaining the end force estimation model training method and estimation method provided by the application, the end force estimation system to which the end force estimation model training method and estimation method are applied is explained first.
[0045] The end force estimation system comprises a processor, a torque sensor, a force sensor and a robot arm.
[0046] The processor is connected with the torque sensor, the force sensor and the robot arm respectively. The torque sensor is arranged at each joint of the robot arm to obtain joint torque state data, and the force sensor is arranged at the end of the robot arm.
[0047] The joint torque sensor and the end force sensor are added to the robot arm. The processor can obtain the joint torque through the torque sensor and the end force of the robot arm through the end force sensor. The processor can obtain the joint angle, angular velocity and other state data of the robot arm in different states through the interface of the robot arm itself.
[0048] For example, the robot arm can be a six-axis robot arm, and the torque sensor is arranged at each joint of the six-axis robot arm, and the force sensor is arranged at the end of the six-axis robot arm.
[0049] For example, the processor can be an electronic device with computing processing capability arranged on the site of the robot arm, or an electronic device or server with computing processing capability arranged outside the site of the robot arm.
[0050] The end force estimation model training method provided by the application is explained and described below through a specific example. Figure 1 The flowchart of the end force estimation model training method provided by the application is shown in the figure. The execution subject of the method can be an electronic device, which can be a device with computing processing function, such as desktop computer, notebook computer, etc. As shown in the figure, the method comprises: Figure 1
[0051] S101, obtaining a plurality of groups of sample state data of the robot arm in a plurality of motion states.
[0052] The sample state data comprises sample state data of a plurality of joints of the robot arm and sample force parameters of the end of the robot arm in a plurality of directions; the plurality of preset directions comprise a first preset direction and a second preset direction. The sample state data comprises joint angle, angular velocity and joint torque.
[0053] For example, the sample force parameters of multiple directions are end forces in X (lateral direction), Y (longitudinal direction) and Z (vertical direction) directions, and can also be end forces in multiple directions under other direction division rules.
[0054] It should be noted that when the end force estimation model is trained, the force sensor is a multi-axis (dimension) force sensor. For example, the multi-axis force sensor is a three-axis sensor, which can simultaneously obtain the end forces of the robot arm in three directions. Although the three-axis sensor is expensive, it is only used when obtaining sample data for training the end force estimation model.
[0055] For example, when collecting sample data for training the model, only a few robot arms collecting data need to be installed with a three-axis sensor, and multiple three-axis sensors are needed. Multiple robot arms can work in parallel to collect data. Alternatively, if time permits, only one three-axis sensor can be used, and multiple robot arms can use the three-axis sensor to collect data in turn. The three-axis sensor is only used during the sample data collection stage, so the number of sensors used is small. After the training is completed, the three-axis sensor is not needed, and the cost of end force estimation is reduced.
[0056] When the robot arm is working normally, it is in a motion state and will make a plurality of actions. A plurality of sets of sample state data of the robot arm in a plurality of motion states are obtained to enrich the sample data. For example, data can be obtained at a fixed frequency (for example, 1000 Hz). Thus, complex calibration is not required, the process is simple, and the data collected comes from a real robot arm working scene, and the data has a certain robustness to environmental noise such as temperature and friction.
[0057] S102, using a preset initial end force estimation model, according to the sample state data of the plurality of joints and the sample force parameter of the end in the first preset direction, predicting an estimated force parameter of the end in a second preset direction corresponding to the sample state data.
[0058] Wherein, the plurality of directions are XYZ three directions, and the first preset direction is any one of the XYZ three directions, and the second preset direction is the remaining two directions of the XYZ three directions.
[0059] The input data of the end force estimation model is the detection data of the plurality of joints and the force of the end in the first preset direction, and the output data of the end force estimation model is the force of the end in the second preset direction. In order to estimate the force of the end in the second preset direction according to the detection data of the plurality of joints and the force of the end in the first preset direction.
[0060] For example, the initial end force estimation model can be a fully connected neural network model.
[0061] S103, iteratively adjust the model parameters of the initial end effector force estimation model according to the sample force parameter in the second preset direction in the sample state data and the estimated force parameter of the end effector corresponding to the sample state data in the second preset direction, until the initial end effector force estimation model after parameter adjustment meets the iteration stop condition, to obtain the target end effector force estimation model.
[0062] According to the sample force parameter in the second preset direction in the sample state data and the estimated force parameter of the end effector corresponding to the sample state data in the second preset direction, the loss function of the force parameter in the second preset direction is calculated. If the loss function value is greater than or equal to the preset threshold, the model parameters of the initial end effector force estimation model are adjusted, and the model is continuously trained using the sample data. The iteration stop condition can include a preset threshold or a preset number of times. If the loss function value is less than the preset threshold, the current trained model is taken as the target end effector force estimation model. Alternatively, if the number of model training times reaches the preset number of times, the current trained model is taken as the target end effector force estimation model. So that the model training accuracy meets the preset requirement.
[0063] The loss function can be a MSE (Mean-Square Error) function.
[0064] By training to obtain a target end effector force estimation model that meets the accuracy requirement, only the detection data of multiple joints and the force parameter of the end effector in the first preset direction need to be collected to estimate the accurate force parameter in the second preset direction. Compared with a multi-axis force sensor, the acquisition cost is reduced.
[0065] In summary, in the embodiment, by obtaining multiple sets of sample state data of the robot arm in multiple motion states, the sample state data includes: sample state data of multiple joints in the robot arm and sample force parameters of the end effector of the robot arm in multiple preset directions; the multiple preset directions include a first preset direction and a second preset direction; using a preset initial end effector force estimation model, according to the sample state data of multiple joints in the sample state data and the sample force parameter of the end effector in the first preset direction, the estimated force parameter of the end effector corresponding to the sample state data in the second preset direction is predicted; according to the sample force parameter in the second preset direction in the sample state data and the estimated force parameter of the end effector corresponding to the sample state data in the second preset direction, the model parameters of the initial end effector force estimation model are iteratively adjusted, until the initial end effector force estimation model after parameter adjustment meets the iteration stop condition, to obtain the target end effector force estimation model. Thus, the sample data is more realistic, and the end force of the robot arm is accurately obtained while reducing the cost.
[0066] In Figure 1Based on the corresponding embodiment, the embodiment of the present application further provides a method for acquiring sample force parameters of the end of the mechanical arm in multiple directions. Figure 2 A flowchart of a method for acquiring sample force parameters of the end of the mechanical arm in multiple directions provided by the embodiment of the present application is shown in FIG. 2. Figure 2 As shown in FIG. 2, the step S101 of acquiring sample force parameters of the end of the mechanical arm in multiple directions includes:
[0067] S201, acquiring initial sample force parameters of the end of the mechanical arm in multiple directions under multiple motion states of the mechanical arm.
[0068] The step S201 is similar to the step S101 in the above embodiment, and will not be described herein.
[0069] S202, calibrating the initial sample force parameters of the end of the mechanical arm in multiple directions to generate sample force parameters of the end of the mechanical arm in multiple directions.
[0070] The force sensor mounted at the end of the mechanical arm may have an offset, which may affect the final model training result. Therefore, after the initial sample force parameters of the end of the mechanical arm in multiple directions are acquired, the initial sample force parameters are calibrated to reduce the influence of the offset on the model training result as much as possible. And the calibrated sample force parameters are used for further training.
[0071] For example, the preset calibration method can be used for calibration, and the empirical value can also be used for calibration.
[0072] In summary, in the embodiment, the initial sample force parameters of the end of the mechanical arm in multiple directions are acquired under multiple motion states of the mechanical arm; the initial sample force parameters of the end of the mechanical arm in multiple directions are calibrated to generate sample force parameters of the end of the mechanical arm in multiple directions. Thus, accurate sample force parameters of the end of the mechanical arm in multiple directions are obtained.
[0073] In Figure 2 Based on the corresponding embodiment, the embodiment of the present application further provides a calibration method of sample force parameters. Figure 3 A flowchart of a calibration method of sample force parameters provided by the embodiment of the present application is shown in FIG. 2. Figure 3 As shown in FIG. 2, before the step S202 of calibrating the initial sample force parameters of the end of the mechanical arm in multiple directions to generate sample force parameters of the end of the mechanical arm in multiple directions, the method further includes:
[0074] S301, acquiring sample force parameters of the end of the mechanical arm in multiple directions under a state that the mechanical arm is static and the end is suspended.
[0075] Since the offset of the force sensor is caused by the mounting relationship between the force sensor and the robot arm, and the end force is 0 when the robot arm is static and the end is suspended, the offset can be measured. Therefore, in order to reduce the influence of the offset on the model training result, the end force of the robot arm in the static and suspended state is obtained by the force sensor as a reference for calibration.
[0076] For example, a pose is randomly selected, the joint angle value of the pose is determined, the angular velocity is 0, and the robot arm end does not contact with external objects, and the force parameter measured by the force sensor is read at this time. In theory, the end force in multiple directions should be 0 at this time, but in fact it is not 0 due to the existence of the offset; therefore, the force parameter measured by the force sensor at this time is the offset value.
[0077] Further, the initial sample force parameters of the end of the robot arm in multiple directions in S202 are calibrated to generate sample force parameters of the end of the robot arm in multiple directions.
[0078] S302, according to the sample force parameters of the robot arm in multiple directions in the static and suspended state, the initial sample force parameters of the end of the robot arm in multiple directions are calibrated to generate sample force parameters of the end of the robot arm in multiple directions.
[0079] On the basis of the initial sample force parameters of the end of the robot arm in multiple directions, the sample force parameters of the robot arm in multiple directions in the static and suspended state are subtracted to generate sample force parameters of the end of the robot arm in multiple directions. Thus, the offset is eliminated, and the sample force parameters are calibrated.
[0080] In summary, in the embodiment, the sample force parameters of the robot arm in multiple directions in the static and suspended state are obtained; according to the sample force parameters of the robot arm in multiple directions in the static and suspended state, the initial sample force parameters of the end of the robot arm in multiple directions are calibrated to generate sample force parameters of the end of the robot arm in multiple directions. Thus, the offset is eliminated, and the sample force parameters are calibrated.
[0081] In Figure 1 Based on the corresponding embodiment, the embodiment of the present application further provides a data preprocessing method. Figure 4 A flowchart of a data preprocessing method provided by the embodiment of the present application is shown in FIG. 2. As shown in FIG. 2, after the multiple sets of sample state data of the robot arm in multiple motion states are obtained in S101, the method further includes: Figure 4
[0082] S401, performing feature analysis on the multiple sets of sample state data to obtain a feature analysis result.
[0083] In acquiring the multiple sets of sample state data, due to hardware or software, etc., the data may be abnormal or missing. In order to make the training result more accurate, the data needs to be preprocessed to make the data more reasonable.
[0084] The feature analysis result can represent normal data features. For example, the feature analysis result can be a visual angle change curve, etc.
[0085] S402, according to the feature analysis result, pre-processing the multiple sets of sample state data.
[0086] According to the feature analysis result, the abnormal data in the multiple sets of sample state data is eliminated, and the missing data is filled. For example, the average method can be used to fill the missing data.
[0087] In summary, in this embodiment, the feature analysis result is obtained by analyzing the multiple sets of sample state data, and the multiple sets of sample state data are preprocessed according to the feature analysis result. Thus, more accurate sample state data is obtained.
[0088] In another embodiment of the present application, after acquiring the multiple sets of sample state data of the robot arm in multiple motion states in S101, the method further comprises:
[0089] The multiple sets of sample state data are normalized.
[0090] In order to make the model calculation more accurate, the multiple sets of sample state data are normalized according to the data range of each feature. And the data is dispersed to meet the independent and identically distributed requirement.
[0091] In summary, in this embodiment, the multiple sets of sample state data are normalized. Thus, the model calculation accuracy is improved.
[0092] In Figure 1 On the basis of the corresponding embodiment, the present application embodiment further provides another end force estimation model training method. Figure 5 The flowchart of another end force estimation model training method provided by the embodiment of the present application.
[0093] The multiple sets of sample state data include: training set and test set. For example, 70% of the sample state data is used as the training set, and 30% of the sample state data is used as the test set.
[0094] As Figure 5 As shown in S102, using the preset initial end force estimation model, according to the sample state data of the multiple joints in the sample state data and the sample force parameters of the end in the first preset direction, the estimated force parameters of the end in the second preset direction corresponding to the sample state data are predicted, comprising:
[0095] S501, adopting the preset initial end force estimation model, according to the sample state data of multiple joints in the training set and the sample force parameters of the end in the first preset direction, the estimation force parameters of the end in the second preset direction corresponding to the training set are predicted.
[0096] Similar to the content in the above step S102, details are not repeated here.
[0097] Further, in S103, the model parameters of the initial end force estimation model are adjusted according to the sample force parameters of the second preset direction in the sample state data and the estimation force parameters of the second preset direction corresponding to the sample state data, to obtain the target end force estimation model, including:
[0098] S502, according to the sample force parameters of the second preset direction in the training set and the estimation force parameters of the second preset direction corresponding to the training set, the model parameters of the initial end force estimation model are adjusted to obtain the test end force estimation model.
[0099] Similar to the content in the above step S103, details are not repeated here.
[0100] S503, using the test set to test the test end force estimation model to obtain the test result.
[0101] During the model training, the test end force estimation model is tested by using the test set to obtain the test result. The test result represents the estimation accuracy of the model, and the training degree of the test model is represented.
[0102] S504, according to the test result, the model parameters of the test end force estimation model are adjusted to obtain the target end force estimation model.
[0103] If the test result represents that the estimation accuracy is greater than or equal to the preset accuracy value, the model parameters of the test end force estimation model are adjusted, and the test end force estimation model is continued to be trained.
[0104] If the test result represents that the estimation accuracy is less than the preset accuracy value, the test end force estimation model is determined as the target end force estimation model.
[0105] To sum up, in the embodiment, the multiple sets of sample state data include: a training set and a test set; an initial end force estimation model is adopted to predict the estimated force parameter of the end in the second preset direction corresponding to the training set according to the sample state data of the multiple joints in the training set and the sample force parameter of the end in the first preset direction; the model parameter of the initial end force estimation model is adjusted according to the sample force parameter of the second preset direction in the training set and the estimated force parameter of the second preset direction corresponding to the training set, to obtain a to-be-tested end force estimation model; the to-be-tested end force estimation model is tested by using the test set to obtain a test result; and the model parameter of the to-be-tested end force estimation model is adjusted according to the test result to obtain a target end force estimation model. Thus, the target end force estimation model is accurately trained.
[0106] The end force estimation method provided in the application is explained and described below through specific examples. Figure 6 A flowchart of the end force estimation method provided in the application is shown in FIG. 1. The execution subject of the method can be an electronic device, which can be a device with a computing processing function, such as a desktop computer, a notebook computer, etc. As shown in FIG. 1, the method includes: Figure 6
[0107] S601, obtaining state data of multiple joints in a to-be-estimated robot arm and a force parameter of an end of the to-be-estimated robot arm in a first preset direction.
[0108] It should be noted that when the end force is estimated, the force sensor is a single-axis sensor, which can obtain the end force of the end of the robot arm in the first preset direction. The cost of the single-axis sensor is lower than that of a multi-axis sensor, thereby reducing the cost of end force estimation.
[0109] The state data includes: joint angle, angular velocity, joint torque. The joint angle and angular velocity transmitted by the robot arm are obtained, the joint torque transmitted by the torque sensor is obtained, and the force parameter in the first preset direction transmitted by the single-axis force sensor is obtained.
[0110] S602, estimating the force parameter of the end of the to-be-estimated robot arm in a second preset direction by using an end force estimation model according to the state data of the multiple joints in the to-be-estimated robot arm and the force parameter of the end of the to-be-estimated robot arm in the first preset direction.
[0111] The end force estimation model is the target end force estimation model in any of the above embodiments.
[0112] The trained end force estimation model only needs to be substituted with the state data of the multiple joints in the to-be-estimated robot arm and the force parameter of the end of the to-be-estimated robot arm in the first preset direction, so as to accurately obtain the force parameter of the end of the to-be-estimated robot arm in the second preset direction.
[0113] The force parameter of the end of the mechanical arm to be estimated in the first preset direction is combined with the force parameter in the second preset direction, so that the end force of the mechanical arm to be estimated is obtained. Thus, the end force of the mechanical arm is accurately obtained while reducing the cost.
[0114] To sum up, in the embodiment, the state data of the plurality of joints in the mechanical arm to be estimated and the force parameter of the end of the mechanical arm to be estimated in the first preset direction are obtained; the force parameter of the end of the mechanical arm to be estimated in the second preset direction is estimated according to the state data of the plurality of joints in the mechanical arm to be estimated and the force parameter of the end of the mechanical arm to be estimated in the first preset direction, and by using the end force estimation model; wherein the end force estimation model is the target end force estimation model in any of the above embodiments. Thus, the end force of the mechanical arm is accurately obtained while reducing the cost.
[0115] In Figure 6 Based on the corresponding embodiment, the embodiment of the present application further provides another method for obtaining the force parameter in the first preset direction. Figure 7 The flowchart of another method for obtaining the force parameter in the first preset direction provided by the embodiment of the present application is shown. As Figure 7 shown, the force parameter of the end of the mechanical arm to be estimated in the first preset direction in S601 includes:
[0116] S701, obtaining the initial force parameter of the end of the mechanical arm to be estimated in the first preset direction.
[0117] Similar to step S601 in the above embodiment, details are not repeated here.
[0118] S702, calibrating the initial force parameter in the first preset direction to generate the force parameter in the first preset direction.
[0119] The force sensor mounted at the end of the mechanical arm may have an offset, and the model trained above uses calibrated data. Therefore, after obtaining the force parameter of the end in the first preset direction, the force parameter in the first preset direction is calibrated first. For example, a preset calibration method can be used for calibration, or an empirical value can be used for calibration.
[0120] To sum up, in the embodiment, the initial force parameter of the end of the mechanical arm to be estimated in the first preset direction is obtained; the initial force parameter in the first preset direction is calibrated to generate the force parameter in the first preset direction. Thus, the accurate force parameter in the first preset direction is obtained.
[0121] In Figure 7 Based on the corresponding embodiment, the embodiment of the present application further provides a calibration method for the initial force parameter in the first preset direction. Figure 8A flowchart of a calibration method of an initial force parameter of a first preset direction provided by an embodiment of the present application is shown in FIG. 7. As shown in FIG. 7, before the calibration of the initial force parameter of the first preset direction in S702 and the generation of the force parameter of the first preset direction, the method further includes: Figure 8
[0122] S801, acquiring the force parameter of the first preset direction of the mechanical arm to be estimated in the state of being static and having a suspended end.
[0123] Since the offset of the force sensor is caused by the mounting relationship between the force sensor and the mechanical arm, and the end force is 0 in the state of the mechanical arm being static and having a suspended end, the offset can be measured. Therefore, in order to reduce the influence of the offset on the model training result, the end force of the mechanical arm in the state of being static and having a suspended end acquired by the force sensor is taken as a reference to perform calibration.
[0124] For example, a pose is randomly selected, the joint angle values of the pose are determined, the angular velocity is 0, and the end of the mechanical arm does not contact with external objects, and at this time, the force parameter measured by the force sensor is read. In theory, the end force of the first preset direction should be 0 at this time, but in fact, it is not 0 due to the existence of the offset; therefore, the force parameter measured by the force sensor at this time is the offset value.
[0125] Further, the calibration of the initial force parameter of the first preset direction in S702 and the generation of the force parameter of the first preset direction include:
[0126] S802, calibrating the initial force parameter of the first preset direction according to the force parameter of the first preset direction of the mechanical arm to be estimated in the state of being static and having a suspended end, and generating the force parameter of the first preset direction.
[0127] On the basis of the initial force parameter of the first preset direction, the force parameter of the first preset direction of the mechanical arm to be estimated in the state of being static and having a suspended end is subtracted to generate the force parameter of the first preset direction. Thus, the offset is eliminated, and the calibration of the force parameter of the first preset direction is realized.
[0128] In summary, in the embodiment, the force parameter of the first preset direction of the mechanical arm to be estimated in the state of being static and having a suspended end is acquired; the initial force parameter of the first preset direction is calibrated according to the force parameter of the first preset direction of the mechanical arm to be estimated in the state of being static and having a suspended end, and the force parameter of the first preset direction is generated. Thus, the offset is eliminated, and the calibration of the force parameter of the first preset direction is realized.
[0129] In Figure 6 On the basis of the corresponding embodiment, the present embodiment further provides a data processing method for estimating an end force. Figure 9 A flowchart of a data processing method for estimating an end force provided by an embodiment of the present application is shown in FIG. 8. As shown in FIG. 8, the method includes:Figure 9 As shown in the above, after obtaining the state data of the plurality of joints in the estimated mechanical arm and the force parameter of the end of the estimated mechanical arm in the first preset direction in S601, the method further comprises:
[0130] S901, the state data of the plurality of joints in the estimated mechanical arm and the force parameter of the end of the estimated mechanical arm in the first preset direction are normalized.
[0131] In order to make the model calculation more accurate, the plurality of sets of sample state data are normalized according to the data range of each feature. Moreover, the training model adopts the normalized data, and therefore, the data needs to be normalized when the model is used.
[0132] Further, after obtaining the state data of the plurality of joints in the estimated mechanical arm and the force parameter of the end of the estimated mechanical arm in the first preset direction in S602, and using the end force estimation model to estimate the force parameter of the end of the estimated mechanical arm in the second preset direction, the method further comprises:
[0133] S902, the force parameter of the end of the estimated mechanical arm in the second preset direction is de-normalized.
[0134] After obtaining the force parameter of the end of the estimated mechanical arm in the second preset direction, the de-normalization is performed, so that the force parameter of the end in the second preset direction is more visualized.
[0135] In summary, in the embodiment, the state data of the plurality of joints in the estimated mechanical arm and the force parameter of the end of the estimated mechanical arm in the first preset direction are normalized, and the force parameter of the end of the estimated mechanical arm in the second preset direction is de-normalized. Thus, the end force is accurately estimated.
[0136] The following describes a kind of end force estimation model training device, equipment and storage medium provided by the present application to be executed, and its specific implementation process and technical effect refer to the above, the following will not be repeated.
[0137] Figure 10 The schematic diagram of a kind of end force estimation model training device provided by the embodiment of the present application is as shown in Figure 10 The device comprises:
[0138] The first acquisition module 1001 is used to obtain a plurality of sets of sample state data of the mechanical arm in a plurality of motion states, and the sample state data includes: sample state data of a plurality of joints in the mechanical arm and sample force parameters of the end of the mechanical arm in a plurality of directions;A plurality of preset directions include a first preset direction and a second preset direction.
[0139] The prediction module 1002 is configured to adopt a preset initial end force estimation model, and predict an estimated force parameter of an end in a second preset direction corresponding to sample state data according to sample state data of multiple joints in the sample state data and a sample force parameter of the end in a first preset direction.
[0140] The adjustment module 1003 is configured to iteratively adjust a model parameter of the initial end force estimation model according to a sample force parameter of the second preset direction in the sample state data and the estimated force parameter of the end in the second preset direction corresponding to the sample state data, until the initial end force estimation model after parameter adjustment satisfies an iteration stop condition, and obtain a target end force estimation model.
[0141] Further, the first acquisition module 1001 is specifically configured to acquire initial sample force parameters of an end of a robot arm in multiple directions under multiple motion states of the robot arm; and calibrate the initial sample force parameters of the end of the robot arm in the multiple directions to generate sample force parameters of the end of the robot arm in the multiple directions.
[0142] Further, the first acquisition module 1001 is specifically configured to acquire sample force parameters of the end of the robot arm in the multiple directions in a state that the robot arm is static and the end is suspended; and calibrate the initial sample force parameters of the end of the robot arm in the multiple directions according to the sample force parameters of the end of the robot arm in the multiple directions in the state that the robot arm is static and the end is suspended, to generate the sample force parameters of the end of the robot arm in the multiple directions.
[0143] Further, the first acquisition module 1001 is specifically configured to perform feature analysis on multiple groups of sample state data to obtain a feature analysis result; and pre-process the multiple groups of sample state data according to the feature analysis result.
[0144] Further, the first acquisition module 1001 is specifically configured to perform normalization processing on the multiple groups of sample state data.
[0145] Further, the prediction module 1002 is specifically configured to include a training set and a test set in the multiple groups of sample state data; and adopt a preset initial end force estimation model, and predict an estimated force parameter of an end in a second preset direction corresponding to a training set according to sample state data of multiple joints in the training set and a sample force parameter of the end in a first preset direction.
[0146] Further, the adjustment module 1003 is specifically configured to adjust a model parameter of the initial end force estimation model according to a sample force parameter of the second preset direction in the training set and an estimated force parameter of the second preset direction corresponding to the training set, to obtain a to-be-tested end force estimation model; test the to-be-tested end force estimation model by using a test set to obtain a test result; and adjust the model parameter of the to-be-tested end force estimation model according to the test result to obtain a target end force estimation model.
[0147] The following describes an end force estimation device, equipment, and storage medium provided by the present application, and the specific implementation process and technical effects are described above. The following will not be described again.
[0148] Figure 11 A schematic diagram of an end force estimation device provided by an embodiment of the present application is shown in Figure 11 The device includes:
[0149] The second acquisition module 1101 is configured to acquire state data of a plurality of joints in the mechanical arm to be estimated and a force parameter of the end of the mechanical arm to be estimated in a first preset direction.
[0150] The estimation module 1102 is configured to estimate a force parameter of the end of the mechanical arm to be estimated in a second preset direction according to the state data of the plurality of joints in the mechanical arm to be estimated and the force parameter of the end of the mechanical arm to be estimated in the first preset direction, and adopt an end force estimation model.
[0151] Further, the second acquisition module 1101 is configured to acquire an initial force parameter of the end of the mechanical arm to be estimated in the first preset direction; and calibrate the initial force parameter in the first preset direction to generate the force parameter in the first preset direction.
[0152] Further, the second acquisition module 1101 is specifically configured to acquire the force parameter in the first preset direction of the mechanical arm to be estimated in a state of being static and having the end suspended; and calibrate the initial force parameter in the first preset direction according to the force parameter in the first preset direction of the mechanical arm to be estimated in the state of being static and having the end suspended to generate the force parameter in the first preset direction.
[0153] Further, the second acquisition module 1101 is specifically configured to perform normalization processing on the state data of the plurality of joints in the mechanical arm to be estimated and the force parameter of the end of the mechanical arm to be estimated in the first preset direction.
[0154] Further, the estimation module 1102 is specifically configured to perform inverse normalization processing on the force parameter of the end of the mechanical arm to be estimated in the second preset direction.
[0155] Figure 12 A schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure. The electronic device can be a device with computing processing function.
[0156] The electronic device includes a processor 1201 and a storage medium 1202. The processor 1201 and the storage medium 1202 are connected through a bus.
[0157] The storage medium 1202 is configured to store a program, and the processor 1201 invokes the program stored in the storage medium 1202 to execute the method embodiments described above. The specific implementation and technical effects are similar, and will not be described here.
[0158] Optionally, the present application also provides a storage medium comprising a program which, when executed by a processor, is configured to perform the method embodiments described above. In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method can be implemented in other manners. For example, the described apparatus embodiments are merely schematic. The division of the units is merely a logical function division. There can be another division manner for the actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or other forms.
[0159] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0160] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically, or two or more units can be integrated into one unit. The integrated unit can be implemented in the form of hardware, or in the form of hardware plus software function units.
[0161] The integrated unit implemented in the form of software function units can be stored in a storage medium. The software function unit stored in the storage medium includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, and various program code storage media.
Claims
1. A method for training an end-force estimation model, characterized in that, The method includes: The system acquires multiple sets of sample state data of the robotic arm under multiple motion states. The sample state data includes: sample state data of multiple joints in the robotic arm and sample force parameters of the end effector of the robotic arm in multiple preset directions; the multiple preset directions include a first preset direction and a second preset direction. Using a preset initial end force estimation model, based on the sample state data of the multiple joints in the sample state data and the sample force parameters of the end in the first preset direction, the estimated force parameters of the end in the second preset direction corresponding to the sample state data are predicted. Based on the sample force parameters in the second preset direction in the sample state data and the estimated force parameters of the end in the second preset direction corresponding to the sample state data, the model parameters of the initial end force estimation model are iteratively adjusted until the initial end force estimation model after parameter adjustment meets the iteration stopping condition, and the target end force estimation model is obtained.
2. The method according to claim 1, characterized in that, The step of obtaining sample force parameters of the robotic arm's end effector in multiple preset directions includes: In multiple motion states of the robotic arm, the initial sample force parameters of the end effector of the robotic arm in multiple directions are obtained; The initial sample force parameters of the end effector of the robotic arm in multiple directions are calibrated to generate sample force parameters of the end effector of the robotic arm in multiple directions.
3. The method according to claim 2, characterized in that, Before calibrating the initial sample force parameters of the robotic arm's end effector in multiple directions to generate sample force parameters of the robotic arm's end effector in multiple directions, the method further includes: Obtain sample force parameters in multiple directions of the robotic arm when it is stationary and its end effector is suspended in the air; The calibration of the initial sample force parameters of the robotic arm's end effector in multiple directions, to generate sample force parameters of the robotic arm's end effector in multiple directions, includes: Based on the sample force parameters of the robotic arm in multiple directions when it is stationary and its end effector is suspended, the initial sample force parameters of the end effector in multiple directions are calibrated to generate sample force parameters of the end effector in multiple directions.
4. The method according to claim 1, characterized in that, After acquiring multiple sets of sample state data of the robotic arm in multiple motion states, the method further includes: Feature analysis is performed on the multiple sets of sample state data to obtain feature analysis results; Based on the feature analysis results, the multiple sets of sample state data are preprocessed.
5. The method according to claim 1, characterized in that, After acquiring multiple sets of sample state data of the robotic arm in multiple motion states, the method further includes: The multiple sets of sample state data are normalized.
6. The method according to claim 1, characterized in that, The multiple sets of sample state data include: training set and test set; The method employs a preset initial end-effector force estimation model, which, based on the sample state data of the multiple joints in the sample state data and the sample force parameters of the end effector in a first preset direction, predicts the estimated force parameters of the end effector in a second preset direction corresponding to the sample state data, including: Using the preset initial end-effector force estimation model, based on the sample state data of the multiple joints in the training set and the sample force parameters of the end in the first preset direction, the estimated force parameters of the end in the second preset direction corresponding to the training set are predicted. The step of adjusting the model parameters of the initial end force estimation model based on the sample force parameters in the second preset direction in the sample state data and the estimated force parameters in the second preset direction corresponding to the sample state data to obtain the target end force estimation model includes: Based on the sample force parameters of the second preset direction in the training set and the estimated force parameters of the second preset direction corresponding to the training set, the model parameters of the initial end force estimation model are adjusted to obtain the end force estimation model to be tested. The test set was used to test the end force estimation model under test, and the test results were obtained. The model parameters of the end force estimation model to be tested are adjusted based on the test results to obtain the target end force estimation model.
7. A method for estimating end force, characterized in that, The method includes: Acquire the state data of multiple joints in the robotic arm to be estimated, and the force parameters of the end effector of the robotic arm to be estimated in a first preset direction; Based on the state data of multiple joints in the robotic arm to be estimated, and the force parameters of the end effector of the robotic arm to be estimated in a first preset direction, the force parameters of the end effector of the robotic arm to be estimated in a second preset direction are estimated using an end effector force estimation model; wherein, the end effector force estimation model is a target end effector force estimation model trained by the end effector force estimation model training method according to any one of claims 1-6.
8. The method according to claim 7, characterized in that, The step of obtaining the force parameters of the end effector of the robotic arm to be estimated in a first preset direction includes: Obtain the initial force parameters of the end effector of the robotic arm to be estimated in a first preset direction; The initial force parameters in the first preset direction are calibrated to generate the force parameters in the first preset direction.
9. The method according to claim 8, characterized in that, Before calibrating the initial force parameters in the first preset direction and generating the force parameters in the first preset direction, the method further includes: Obtain the force parameters of the robotic arm to be estimated in a first preset direction when it is stationary and its end effector is suspended in the air; The calibration of the initial force parameters in the first preset direction to generate the force parameters in the first preset direction includes: Based on the force parameters of the robotic arm to be estimated in a first preset direction when it is stationary and its end effector is suspended, the initial force parameters of the first preset direction are calibrated to generate the force parameters of the first preset direction.
10. The method according to claim 7, characterized in that, After acquiring the state data of multiple joints in the robotic arm to be estimated, and the force parameters of the end effector of the robotic arm in a first preset direction, the method further includes: The state data of multiple joints in the robotic arm to be estimated, and the force parameters of the end effector of the robotic arm to be estimated in the first preset direction are normalized. After estimating the force parameters of the end effector in the second preset direction based on the state data of multiple joints in the robotic arm to be estimated and the force parameters of the end effector in the first preset direction using an end effector force estimation model, the method further includes: The force parameters of the end effector of the robotic arm to be estimated in the second preset direction are inversely normalized.
11. A training device for an end-force estimation model, characterized in that, The device includes: The first acquisition module is used to acquire multiple sets of sample state data of the robotic arm in multiple motion states. The sample state data includes: sample state data of multiple joints in the robotic arm and sample force parameters of the end effector of the robotic arm in multiple preset directions; the multiple preset directions include a first preset direction and a second preset direction. The prediction module is used to use a preset initial end force estimation model to predict the estimated force parameters of the end in the second preset direction corresponding to the sample state data, based on the sample state data of the multiple joints in the sample state data and the sample force parameters of the end in the first preset direction. The adjustment module is used to iteratively adjust the model parameters of the initial end force estimation model based on the sample force parameters in the second preset direction in the sample state data and the estimated force parameters of the end in the second preset direction corresponding to the sample state data, until the initial end force estimation model after parameter adjustment meets the iteration stopping condition, and thus obtain the target end force estimation model.
12. An end-force estimation device, characterized in that, The device includes: The second acquisition module is used to acquire the state data of multiple joints in the robotic arm to be estimated, as well as the force parameters of the end effector of the robotic arm to be estimated in a first preset direction. An estimation module is used to estimate the force parameters of the end effector of the robotic arm in a second preset direction based on the state data of multiple joints in the robotic arm to be estimated and the force parameters of the end effector of the robotic arm in a first preset direction, and by using an end effector force estimation model; wherein the end effector force estimation model is a target end effector force estimation model trained by the end effector force estimation model training method according to any one of claims 1-6.
13. An electronic device, characterized in that, include: The processor and the storage medium are connected via a bus for communication. The storage medium stores program instructions executable by the processor. The processor calls the program stored in the storage medium to execute the steps of the end force estimation model training method as described in any one of claims 1 to 6, or the steps of the end force estimation method as described in any one of claims 7 to 10.
14. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the steps of the end force estimation model training method as described in any one of claims 1 to 6, or the steps of the end force estimation method as described in any one of claims 7 to 10.
Citation Information
Patent Citations
Mechanical arm external force estimating method and device
CN107590340A
3P3R mechanical arm tail end force estimation method based on motor current measurement
CN108638063A