CN112428263B - Mechanical arm control method and device and cluster model training method - Google Patents

Mechanical arm control method and device and cluster model training method Download PDF

Info

Publication number
CN112428263B
CN112428263B CN202011114459.6A CN202011114459A CN112428263B CN 112428263 B CN112428263 B CN 112428263B CN 202011114459 A CN202011114459 A CN 202011114459A CN 112428263 B CN112428263 B CN 112428263B
Authority
CN
China
Prior art keywords
force
divergence
mechanical arm
groups
coordinate system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011114459.6A
Other languages
Chinese (zh)
Other versions
CN112428263A (en
Inventor
段星光
田焕玉
崔腾飞
李健武
潘月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Technology BIT
Original Assignee
Beijing Institute of Technology BIT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Technology BIT filed Critical Beijing Institute of Technology BIT
Priority to CN202011114459.6A priority Critical patent/CN112428263B/en
Publication of CN112428263A publication Critical patent/CN112428263A/en
Application granted granted Critical
Publication of CN112428263B publication Critical patent/CN112428263B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J13/00Controls for manipulators
    • B25J13/08Controls for manipulators by means of sensing devices, e.g. viewing or touching devices
    • B25J13/085Force or torque sensors
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J18/00Arms
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1656Programme controls characterised by programming, planning systems for manipulators
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1679Programme controls characterised by the tasks executed

Abstract

The application discloses a mechanical arm control method and device and a clustering model training method. The mechanical arm control method comprises the steps of obtaining a force group of a mechanical arm; performing parameter regression on the force group to obtain a parameter regression value of the force group; determining KL divergence between the force group and a clustering model according to the parameter regression value and the clustering model, wherein the clustering model is a Gaussian mixture model trained through the force group of the mechanical arm; and automatically switching the virtual constraint according to the KL divergence. The method and the device solve the problems of poor flexibility and low efficiency of the statically generated virtual constraints.

Description

Mechanical arm control method and device and cluster model training method
Technical Field
The application relates to the field of mechanical arms, in particular to a mechanical arm control method and device and a clustering model training method.
Background
Task control such as drilling, milling and the like in orthopedic operation control is completed based on linear constraint of the mechanical arm, so that the linear constraint of the mechanical arm has strong practical significance. In the process of dragging the mechanical arm by hands, the mechanical arm is difficult to move linearly to work due to positioning errors of the hands.
The linear constraint solution of the mechanical arm is to introduce virtual constraint to carry out constraint control on the motion of the mechanical arm. A common method is to introduce static virtual constraints, but statically generated virtual constraints lack flexibility and have poor human interactivity, and an operator needs to configure an upper computer to switch the virtual constraints, which is inefficient.
Aiming at the problems of poor flexibility and low efficiency of statically generated virtual constraints in the related art, no effective solution is provided at present.
Disclosure of Invention
The main purpose of the present application is to provide a method for controlling a robot arm, so as to solve the problems of poor flexibility and low efficiency of statically generated virtual constraints.
In order to achieve the above object, the present application provides a robot arm control method.
In a first aspect, the present application provides a method for controlling a robot arm
The mechanical arm control method comprises the following steps:
acquiring a force group of the mechanical arm;
performing parameter regression on the force group to obtain a parameter regression value of the force group;
determining KL divergence between the force group and a clustering model according to the parameter regression value and the clustering model, wherein the clustering model is a Gaussian mixture model trained through the force group of the mechanical arm;
and automatically switching the virtual constraint according to the KL divergence.
Further, the automatically switching the virtual constraint according to the KL divergence includes:
judging whether the KL divergence is larger than a KL divergence threshold value or not;
if the KL divergence is larger than the KL divergence threshold value, generating anisotropic virtual constraint on the mechanical arm;
and if the KL divergence is not greater than the KL divergence threshold value, not virtually constraining the mechanical arm.
Further, after the determining whether the KL divergence is greater than a KL divergence threshold, the method further comprises:
and if the KL divergence is not greater than the KL divergence threshold value, generating isotropic virtual constraint on the mechanical arm.
Further, performing parameter regression on the force group to obtain a parameter regression value of the force group includes:
decomposing the force set in a spherical coordinate system to obtain an angle coordinate of the force set;
and performing parameter regression on the angle coordinates of the force groups by utilizing maximum likelihood estimation to obtain parameter regression values of the force groups.
Further, after the generating the anisotropic virtual constraint on the mechanical arm if the KL divergence is greater than the KL divergence threshold, the method further includes:
generating virtual constraints for the mechanical arm through the clustering model;
and determining the joint speed of the mechanical arm according to the virtual constraint so as to control the mechanical arm to move along a straight line in a joint speed control mode.
In a second aspect, the present application provides a clustering model training method, which is used to obtain a clustering model in the robot arm control method in the first aspect.
The clustering model training method comprises the following steps:
establishing a Gaussian mixture model, wherein the Gaussian mixture model has a first preset number of sub-models;
acquiring not less than two groups of training force groups of mechanical arms at different poses;
and taking the training force group as a parameter of the Gaussian mixture model and clustering to obtain a clustering model.
Further, the step of using the training force group as a parameter of the gaussian mixture model and clustering to obtain a clustering model comprises:
converting the training force set into an angle coordinate under a spherical coordinate system to obtain an angle coordinate of the training force set;
performing regression calculation by taking the training force group angle coordinates as regression variables of the Gaussian mixture model to obtain clustering results of a first preset number of sub-models;
and performing parameter set on the clustering result to obtain a clustering model.
In a third aspect, the present application provides a robot arm control apparatus.
The robot arm control device according to the present application includes:
the acquisition module is used for acquiring a force group of the mechanical arm;
the parameter regression module is used for performing parameter regression on the force group to obtain a parameter regression value of the force group;
the determining module is used for determining KL divergence between the force group and the clustering model according to the parameter regression value and the clustering model, wherein the clustering model is a Gaussian mixture model trained through the force group of the mechanical arm;
and the switching module is used for automatically switching the virtual constraint according to the KL divergence.
Further, the parameter regression module includes:
the decomposition unit is used for decomposing the force set in a spherical coordinate system to obtain the angle coordinate of the force set;
and the parameter regression unit is used for performing parameter regression on the angle coordinates of the force groups by utilizing maximum likelihood estimation to obtain parameter regression values of the force groups.
Further, the switching module includes:
the judging unit is used for judging whether the KL divergence is larger than a KL divergence threshold value or not;
the anisotropic constraint unit is used for generating anisotropic virtual constraint on the mechanical arm if the KL divergence is larger than a KL divergence threshold value;
and the isotropic constraint unit is used for generating isotropic virtual constraint on the mechanical arm if the KL divergence is not greater than the KL divergence threshold value.
Further, the switching module further includes:
and the control unit is used for determining the joint speed of the mechanical arm according to the anisotropic virtual constraint so as to control the movement of the mechanical arm in a joint speed control mode.
In a fourth aspect, the present application provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the robot arm control method provided by the first aspect and/or the cluster model training method provided by the second aspect.
In a fifth aspect, the present application provides a robot comprising a robot arm, a sensor, a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the robot arm control method provided in the first aspect and/or the cluster model training method provided in the second aspect when executing the program.
In the embodiment of the application, the method for acquiring the force group is adopted, the purpose of automatically switching the virtual constraints through the KL divergence is achieved by performing parameter regression on the force group and determining the KL divergence between the parameter regression value and the clustering model, so that the technical effect of automatically switching the virtual constraints is achieved, and the problems of poor flexibility and low efficiency of the statically generated virtual constraints are solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a schematic flow diagram of a robot arm control method according to an embodiment of the present application;
FIG. 2 is a schematic flow chart diagram of a cluster model training method according to an embodiment of the present application;
fig. 3 is a block diagram of a robot arm control device according to an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram of a robot arm control method according to another embodiment of the present application;
fig. 5 is a schematic diagram of virtual constraint switching of a robot arm in a robot arm control method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Moreover, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
According to an embodiment of the present application, there is provided a robot arm control method, as shown in fig. 1, the method including steps S11 to S14 as follows:
s11: and acquiring a force group of the mechanical arm.
The force sets may be acquired directly by force sensors mounted on the robotic arms. In particular, the force sensor is a multi-dimensional force sensor. In this embodiment, the force sensor is illustratively acquired by a three-dimensional force sensor or a six-dimensional force sensor. The force set acquired by the force sensor includes three force components corresponding to the X, Y, Z axes.
Specifically, the force groups of the second preset number of different postures dragged by the mechanical arm in one or more directions of the X, Y, Z axis are collected, and the force groups obtained by the force sensor are expressed as formula (1):
Figure BDA0002728557300000061
wherein f is a set of three force components corresponding to the X, Y, Z axes of the coordinate system acquired by the force sensor, and f isxForce, f, corresponding to the X-axis of the coordinate system acquired for the force sensoryForce, f, corresponding to the Y axis of the coordinate system acquired for the force sensorzA force corresponding to the Z-axis of the coordinate system acquired by the force sensor.
Specifically, the second predetermined number may be 3 to 10. Illustratively, the second preset number is 5, i.e. 5 sets of forces for different poses of one or more directional drags are acquired.
S12: and performing parameter regression on the force group to obtain a parameter regression value of the force group.
The specific steps of performing parameter regression on the force group to obtain a parameter regression value of the force group are as follows: decomposing the force set in a spherical coordinate system to obtain an angle coordinate of the force set; and performing parameter regression on the angle coordinates of the force set by utilizing maximum likelihood estimation to obtain a parameter regression value of the force set.
The force set may be obtained in step S11, and the obtained force set including three force components corresponding to the X, Y, Z axes is decomposed in a spherical coordinate system, so as to obtain an angular coordinate α of the force set.
As shown in equation (2), the angular coordinate α of the force set can be expressed as:
Figure BDA0002728557300000062
multiple angle coordinates { alpha ] corresponding to multiple sets of force sets can be obtained12,…,αkAnd k is a second preset number. Performing parametric regression on the plurality of angle coordinates, specifically, the parametric regression may be linear regression, may be a gradient descent method, or may be maximum likelihood estimation. In this embodiment, the parametric regression is illustratively a maximum likelihood estimate. Using maximum likelihood estimation, for a plurality of angular coordinates { alpha }12,…,αkPerforming parameter regression to obtain a plurality of angle coordinates (alpha)12,…,αkThe corresponding maximum likelihood estimate arI.e. the parametric regression value of the force set is alphar
S13: and determining KL divergence between the force group and a clustering model according to the parameter regression value and the clustering model, wherein the clustering model is a Gaussian mixture model trained by the force group of the mechanical arm.
The parameter regression value may be obtained by solving in step S12, and the clustering model may be a gaussian mixture model pre-stored in the control system of the robot arm, or may be a gaussian mixture model pre-stored in the control system of the robot armAnd training the force group acquired by the force sensor to obtain a Gaussian mixture model. In this embodiment, the clustering model is a gaussian mixture model obtained by training the force groups acquired by the force sensors. The Gaussian mixture model is a model consisting of not less than two Gaussian mixture models, namely, the clustering model has m Gaussian mixture models (m is more than or equal to 2). Respectively calculating m Gaussian component models and parameter regression value alpharAnd m KL divergences are determined.
S14: and switching the virtual constraint according to the KL divergence.
The "switching the virtual constraint according to the KL divergence" specifically includes: judging whether the KL divergence is larger than a KL divergence threshold value or not; if the KL divergence is larger than the KL divergence threshold value, generating anisotropic virtual constraint on the mechanical arm; and if the KL divergence is not greater than the KL divergence threshold value, not performing virtual constraint on the mechanical arm or generating isotropic virtual constraint on the mechanical arm.
FIG. 2 is a schematic diagram of switching virtual constraints of a robot arm during a human-computer interaction process, wherein a dotted circle part is a place for generating virtual constraints, { Ch1Is isotropic virtual constraint, { Ch2Is anisotropic virtual constraint, { ShThe reference coordinate system of the interaction force set in the step S12 is described above.
The KL divergence threshold may be a KL divergence threshold pre-stored in a control system of the robot arm, or may be a KL divergence threshold set by a user himself. In this embodiment, the KL divergence threshold is illustratively a KL divergence threshold set by the user himself.
Specifically, it is determined whether the m KL divergences obtained in the step S13 are greater than the KL divergence threshold, respectively, and when a KL divergence greater than the KL divergence threshold exists in the m KL divergences, an anisotropic virtual constraint is generated on the mechanical arm (for example, if the KL divergence threshold is-20, and 3 KL divergences are-10, -50, -100, and-10 > -20, respectively, an anisotropic virtual constraint is generated on the mechanical arm), where the anisotropic virtual constraint generated by the mechanical arm is an anisotropic virtual constraint generated based on the cluster model direction in the step S13 (where the cluster model direction is a unit vector of a direction corresponding to the cluster model);
when the KL divergence larger than the KL divergence threshold value does not exist in the m KL divergences, isotropic virtual constraint is generated on the mechanical arm or virtual constraint is not performed on the mechanical arm (if the KL divergence threshold value is-20, the 3 KL divergences are-30, -50, -100 respectively, and the KL divergence larger than the KL divergence threshold value does not exist, isotropic virtual constraint is generated on the mechanical arm or virtual constraint is not performed on the mechanical arm); the mechanical arm generates isotropic virtual constraint, and the virtual constraint adopts a default value and is set by a user.
Further, after generating the anisotropic virtual constraint on the mechanical arm if the KL divergence is greater than the KL divergence threshold, the method further comprises:
and determining the joint speed of the mechanical arm according to the anisotropic virtual constraint so as to control the movement of the mechanical arm in a joint speed control mode.
Through the force obtained in step S11 and the moment corresponding to the obtained force, the virtual constraint force direction and the virtual constraint moment direction are obtained according to the obtained force and moment, as shown in equation (3), which can be expressed as:
Figure BDA0002728557300000081
wherein, aiTo the direction of the virtual restraining force, fiFor the force obtained by a force sensor on the robot arm, biFor virtually constraining the torque direction, niIs the torque obtained by a force sensor on the mechanical arm.
The force and the moment can be obtained through a force sensor on the mechanical arm to obtain a virtual force subspace Cf=[f1 f2 … fi]And virtual moment subspace Cn=[n1 n2 … ni]. The generated force-rotation projection space synthesized by the force and the moment is expressed as formula (4):
Figure BDA0002728557300000082
wherein, PwProjection of spatially corresponding dimensionless diagonal matrices for the force vectors, CfAs a virtual force subspace, CnIs a virtual moment subspace. In a virtual force subspace CfAnd virtual moment subspace CnUnder the known condition, a dimensionless diagonal matrix P corresponding to the projection space of the force rotation amount can be obtainedw
Then, the corresponding velocity momentum projection space is a complementary space of the force momentum projection space, as shown in equation (5), and can be expressed as:
Figure BDA0002728557300000091
wherein, PtThe matrix is a dimensionless diagonal matrix corresponding to the projection space of the velocity vector, and I is an identity matrix. In a virtual force subspace CfVirtual moment subspace CnIdentity matrix I CnUnder the known condition, a dimensionless diagonal matrix P corresponding to the projection space of the velocity vector can be obtainedt
Then, the solution of the joint velocity of the mechanical arm is expressed by equation (6) as follows:
Figure BDA0002728557300000092
wherein the content of the first and second substances,
Figure BDA0002728557300000093
the joint speed of the mechanical arm; j. the design is a square*The code disc is a Jacobian matrix, belongs to the robotics consensus content, and can be measured through a code disc to calculate; pwA dimensionless diagonal matrix corresponding to the force rotation projection space can be obtained by the formula (4); kcartFor the admittance gain matrix, it can be derived by debugging, for example, for the UR5 robot of youao corporation, an identity matrix of 0.4 by six rows and six columns is often used; f. ofiAnd the man-machine interaction acting force is obtained through a force sensor on the mechanical arm. In the Jacobian matrix J*Dimensionless diagonal moment corresponding to force rotation projection spaceArray PwAdmittance gain matrix KcartHuman-computer interaction force fiIn known conditions, the joint velocity of the robot arm can be determined
Figure BDA0002728557300000094
Joint velocity to mechanical arm
Figure BDA0002728557300000095
The control belongs to high-rigidity control, and the existing robot controller or mechanical arm built-in function is adopted, so that the speed can be tracked, and the effect of controlling the mechanical arm is achieved.
The method for switching the virtual constraint is given by the step S14, through the parameter regression value alpha of the force set in the step S12rGenerating a unit vector, and generating virtual constraint through an equation (4) to obtain a virtual constraint matrix. For example, by parameter regression of value αrGenerating unit vectors at (50 degrees and 50 degrees), and generating virtual constraint on the unit vectors through an equation (4) to obtain a virtual constraint matrix
Figure BDA0002728557300000096
A flowchart of a robot arm control method according to another embodiment of the present application is shown in fig. 3, and includes: acquiring input information through a force sensor, and performing cluster analysis as training data, wherein the cluster analysis comprises the following steps: performing parameter estimation on input training data by using an EM algorithm (namely, maximum likelihood estimation) and generating a GMM (Gaussian mixture model) human intention model;
acquiring input information of force as real-time data through a force sensor, decomposing the input force in a spherical coordinate system to acquire an interaction force impulse, performing maximum likelihood estimation on the interaction force impulse, judging a KL divergence threshold value based on a GMM human intention model in cluster analysis, and if the input information is larger than the KL divergence threshold value, performing anisotropic constraint; if the divergence is smaller than the KL divergence threshold, isotropic constraint is performed.
From the above description, it can be seen that the following technical effects are achieved by the present application:
according to the embodiment of the application, the multiple force groups are obtained, the angle coordinates of the force groups are subjected to parameter regression by means of maximum likelihood estimation, the KL divergence between the angle coordinates of the force groups and each Gaussian mixture model in the clustering model is determined, each KL divergence and the preset KL divergence are judged, virtual constraints can be switched according to the judgment result, and therefore the effect of automatically switching the virtual constraints can be achieved.
According to an embodiment of the present application, there is also provided a method for obtaining a cluster model in the robot arm control method, as shown in fig. 4, the cluster model training method includes the following steps S21 and S22:
s21: and acquiring at least two training force groups of the mechanical arms at different poses.
The training force set may be directly acquired by a force sensor mounted on the robotic arm. In particular, the force sensor is a multi-dimensional force sensor. In this embodiment, the force sensor is illustratively acquired by a three-dimensional force sensor or a six-dimensional force sensor. The training force set obtained by the force sensor includes three training force components corresponding to the X, Y, Z axes.
Specifically, a third preset number of training force sets of different postures dragged by the mechanical arm in one or more directions of the X, Y, Z axis are collected, and the training force sets obtained by the force sensor are similar to those shown in the formula (1) in the step S11, and are not described herein again.
The third preset number of training force sets may be the same force sets obtained by the force sensors as the second preset number of force sets in step S11, or may be different force sets obtained by the force sensors. In this embodiment, the third preset number of training force sets and the second preset number of force sets are illustrated as different force sets acquired by the force sensors. Illustratively, the third preset number may range from 2-10. For example, the third predetermined number is 5.
Specifically, the training force set obtained by the force sensor is shown in formula (1), and can be expressed as:
Figure BDA0002728557300000111
s22: and training and clustering the Gaussian mixture models by the multiple groups of training force groups to obtain a clustering model.
The Gaussian mixture model is trained and clustered by a plurality of groups of training force groups to obtain a clustering model. The method specifically comprises the following steps: converting the multiple groups of training force groups into angle coordinates under a spherical coordinate system to obtain the angle coordinates of the multiple groups of training force groups; taking the multiple groups of training force group angle coordinates as regression variables, and performing regression calculation on the Gaussian mixture model to obtain a clustering result of a first preset number of sub-models; and performing parameter set on the clustering result to obtain a clustering model.
Specifically, a Gaussian mixture model is established, wherein the Gaussian mixture model has a first preset number of partial models. The gaussian mixture model is a model having not less than two gaussian component models, i.e., having a first predetermined number not less than 2. Illustratively, the first predetermined number is 2-6. For example, the first predetermined number is 3, i.e., the gaussian mixture model has 3 gaussian components.
Specifically, the training force set may be obtained through the step S21, and the method of converting the training force set into the angle coordinate in the spherical coordinate system is similar to the solving method of the formula (2) in the step S12, and is not described herein again. Multiple angle coordinates (alpha) corresponding to multiple groups of training force groups can be obtained12,…,αeE is a third preset number, and a plurality of angle coordinates { alpha ] corresponding to the plurality of training force sets are obtained12,…,αePerforming regression calculation as regression variables of the Gaussian mixture model to obtain a partial model clustering result, performing multiple calculations to obtain a first preset number of partial model clustering results, and displaying the results in a parameter combination mode (for example, training results of Gaussian mixture models with 2 partial models, such as (0.2), (30 degrees, 7 degrees), (50 degrees, 5 degrees) and (0.8, (53 degrees, 2 degrees), (10 degrees, 0 degrees))
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present application, there is also provided an apparatus 10 for implementing the robot arm control method described above, as shown in fig. 5, the robot arm control apparatus 10 including:
the acquisition module 11 is used for acquiring a force group of the mechanical arm;
the parameter regression module 12 is used for performing parameter regression on the force group to obtain a parameter regression value of the force group;
the determining module 13 is configured to determine a KL divergence between the force group and a clustering model according to the parameter regression value and the clustering model, where the clustering model is a gaussian mixture model trained by the force group of the mechanical arm;
and a switching module 14, configured to switch the virtual constraint according to the KL divergence.
Further, the parameter regression module 12 includes:
the decomposition unit is used for decomposing the force set in a spherical coordinate system to obtain the angle coordinate of the force set;
and the parameter regression unit is used for performing parameter regression on the angle coordinates of the force set by utilizing maximum likelihood estimation to obtain a parameter regression value of the force set.
Further, the switching module 14 includes:
the judging unit is used for judging whether the KL divergence is larger than a KL divergence threshold value or not;
the anisotropic constraint unit is used for generating anisotropic virtual constraint on the mechanical arm if the KL divergence is larger than a KL divergence threshold value;
and the isotropic constraint unit is used for generating isotropic virtual constraint on the mechanical arm if the KL divergence is not greater than a first KL divergence threshold value.
Further, the switching module 14 further includes:
and the control unit is used for determining the joint speed of the mechanical arm according to the anisotropic virtual constraint so as to control the movement of the mechanical arm in a joint speed control mode.
Specifically, the implementation of each module in this embodiment may refer to the related implementation in the method embodiment, and is not described again.
From the above description, it can be seen that the following technical effects are achieved by the present application:
according to the embodiment of the application, the multiple force groups are obtained, the angle coordinates of the force groups are subjected to parameter regression by means of maximum likelihood estimation, the KL divergence between the angle coordinates of the force groups and each Gaussian mixture model in the clustering model is determined, each KL divergence and the preset KL divergence are judged, virtual constraints can be switched according to the judgment result, and therefore the effect of automatically switching the virtual constraints can be achieved.
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (9)

1. A robot arm control method is characterized by comprising:
acquiring a force group of the mechanical arm;
acquiring a second preset number of force groups of different postures dragged by the mechanical arm in one or more directions of the X, Y, Z axis and expressions of the force groups, wherein the expressions of the force groups are as follows:
Figure FDA0003607326380000012
f is a set of three force components corresponding to the X, Y, Z axes of the coordinate system acquired by the force sensor, fxForce, f, corresponding to the X-axis of the coordinate system acquired for the force sensoryForce, f, corresponding to the Y axis of the coordinate system acquired for the force sensorzA force corresponding to the Z-axis of the coordinate system obtained for the force sensor;
performing parameter regression on the force group to obtain a parameter regression value of the force group; decomposing the force set in a spherical coordinate system to obtain the angle coordinate of the force set, wherein the angle coordinate expression of the force set is as follows:
Figure FDA0003607326380000011
performing parameter regression on the angle coordinates of the force groups by utilizing maximum likelihood estimation to obtain parameter regression values of the force groups;
determining KL divergence between the force group and a clustering model according to the parameter regression value and the clustering model, wherein the clustering model is a Gaussian mixture model trained through the force group of the mechanical arm;
and automatically switching the virtual constraint according to the KL divergence.
2. The mechanical arm control method according to claim 1, wherein the automatically switching virtual constraints according to the KL divergence comprises:
judging whether the KL divergence is larger than a KL divergence threshold value or not;
if the KL divergence is larger than the KL divergence threshold value, generating anisotropic virtual constraint on the mechanical arm;
and if the KL divergence is not greater than the KL divergence threshold value, not virtually constraining the mechanical arm.
3. The mechanical arm control method of claim 2, wherein after said determining whether the KL divergence is greater than a KL divergence threshold, the method further comprises:
and if the KL divergence is not greater than the KL divergence threshold value, generating isotropic virtual constraint on the mechanical arm.
4. The method of controlling a robotic arm of claim 2, wherein after said creating an anisotropic virtual constraint on the robotic arm if the KL divergence is greater than a KL divergence threshold, the method further comprises:
and determining the joint speed of the mechanical arm according to the anisotropic virtual constraint so as to control the movement of the mechanical arm in a joint speed control mode.
5. A cluster model training method for obtaining a cluster model in the robot arm control method according to any one of claims 1 to 4, the cluster model training method comprising:
acquiring not less than two groups of training force groups of mechanical arms at different poses;
acquiring a second preset number of force groups of different postures dragged by the mechanical arm in one or more directions of the X, Y, Z axis and expressions of the force groups, wherein the expressions of the force groups are as follows:
Figure FDA0003607326380000021
wherein f is a set of three force components corresponding to the X, Y, Z axes of the coordinate system acquired by the force sensor, and f isxForce, f, corresponding to the X-axis of the coordinate system acquired for the force sensoryForce, f, corresponding to the Y axis of the coordinate system acquired for the force sensorzA force corresponding to the Z-axis of the coordinate system obtained for the force sensor;
and training and clustering the Gaussian mixture models by the multiple groups of training force groups to obtain a clustering model.
6. The method for training the clustering model according to claim 5, wherein the training and clustering the Gaussian mixture model by the training force groups to obtain the clustering model comprises:
converting a plurality of groups of training force groups into angle coordinates under a spherical coordinate system to obtain a plurality of groups of training force group angle coordinates, wherein the expression of the force group angle coordinates is as follows:
Figure FDA0003607326380000031
taking the multiple groups of training force group angle coordinates as regression variables, and performing regression calculation on the Gaussian mixture model to obtain a clustering result of a first preset number of sub-models;
and performing parameter set on the clustering result to obtain a clustering model.
7. An apparatus for controlling a robot arm, comprising:
the acquisition module is used for acquiring a force group of the mechanical arm; acquiring force groups of a second preset number of different postures dragged by the mechanical arm in one or more directions of the X, Y, Z axis and expressions of the force groups, wherein the expressions of the force groups are as follows:
Figure FDA0003607326380000032
wherein f is a set of three force components corresponding to the X, Y, Z axes of the coordinate system acquired by the force sensor, and f isxForce, f, corresponding to the X-axis of the coordinate system acquired for the force sensoryForce, f, corresponding to the Y axis of the coordinate system acquired for the force sensorzA force corresponding to the Z axis of the coordinate system acquired by the force sensor;
the parameter regression module is used for performing parameter regression on the force group to obtain a parameter regression value of the force group; decomposing the force set in a spherical coordinate system to obtain an angle coordinate of the force set, wherein the angle coordinate expression of the force set is as follows:
Figure FDA0003607326380000041
performing parameter regression on the angle coordinates of the force group by using maximum likelihood estimation to obtain maximum likelihood estimation corresponding to a plurality of angle coordinates, namely parameter regression values of the force group;
the determining module is used for determining KL divergence between the force group and the clustering model according to the parameter regression value and the clustering model, wherein the clustering model is a Gaussian mixture model trained through the force group of the mechanical arm;
and the switching module is used for automatically switching the virtual constraint according to the KL divergence.
8. Computer-readable storage medium, characterized in that it stores computer instructions for causing the computer to execute the robot arm control method of any of claims 1-4 and/or the cluster model training method of any of claims 5-6.
9. A robot, comprising: a robotic arm, a sensor, at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the robot arm control method of any one of claims 1 to 4 and/or the cluster model training method of any one of claims 5 to 6.
CN202011114459.6A 2020-10-16 2020-10-16 Mechanical arm control method and device and cluster model training method Active CN112428263B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011114459.6A CN112428263B (en) 2020-10-16 2020-10-16 Mechanical arm control method and device and cluster model training method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011114459.6A CN112428263B (en) 2020-10-16 2020-10-16 Mechanical arm control method and device and cluster model training method

Publications (2)

Publication Number Publication Date
CN112428263A CN112428263A (en) 2021-03-02
CN112428263B true CN112428263B (en) 2022-06-10

Family

ID=74695632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011114459.6A Active CN112428263B (en) 2020-10-16 2020-10-16 Mechanical arm control method and device and cluster model training method

Country Status (1)

Country Link
CN (1) CN112428263B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110969081A (en) * 2019-10-24 2020-04-07 云南电网有限责任公司昆明供电局 Power transmission line external force damage detection method based on KL divergence of multi-module division
US10656638B1 (en) * 2019-04-11 2020-05-19 Sas Institute Inc. Visualization to support event monitoring system

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6066825B2 (en) * 2013-05-17 2017-01-25 株式会社日立製作所 Data analysis apparatus and health business support method
CN109171965B (en) * 2018-09-27 2021-06-04 上海电气集团股份有限公司 Control method and system of robot based on virtual fixture
CN109389166A (en) * 2018-09-29 2019-02-26 聚时科技(上海)有限公司 The depth migration insertion cluster machine learning method saved based on partial structurtes
CN109382828B (en) * 2018-10-30 2021-04-16 武汉大学 Robot shaft hole assembling system and method based on teaching learning
US11161244B2 (en) * 2019-01-22 2021-11-02 Mitsubishi Electric Research Laboratories, Inc. System and method for automatic error recovery in robotic assembly
CN109993763B (en) * 2019-03-28 2021-10-08 北京理工大学 Detector positioning method and system based on image recognition and force feedback fusion
CN110281237B (en) * 2019-06-17 2022-05-17 华南理工大学 Series robot joint friction force identification method based on machine learning
CN110929766B (en) * 2019-11-11 2023-02-03 南京航空航天大学 Self-adaptive pedestrian mobile phone attitude identification method based on Gaussian mixture clustering algorithm
CN110977974B (en) * 2019-12-11 2021-06-01 遨博(北京)智能科技有限公司 Admittance control method, device and system for avoiding singular position type of robot
CN111428768A (en) * 2020-03-18 2020-07-17 电子科技大学 Hellinger distance-Gaussian mixture model-based clustering method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10656638B1 (en) * 2019-04-11 2020-05-19 Sas Institute Inc. Visualization to support event monitoring system
CN110969081A (en) * 2019-10-24 2020-04-07 云南电网有限责任公司昆明供电局 Power transmission line external force damage detection method based on KL divergence of multi-module division

Also Published As

Publication number Publication date
CN112428263A (en) 2021-03-02

Similar Documents

Publication Publication Date Title
CN110076772B (en) Grabbing method and device for mechanical arm
US9311608B2 (en) Teaching system and teaching method
CN105291138B (en) It is a kind of to strengthen the visual feedback platform of virtual reality immersion sense
Salvietti et al. Multicontact bilateral telemanipulation with kinematic asymmetries
RU2308762C2 (en) Method for moving a virtual object in virtual environment without mutual interference between its jointed elements
JP2015102913A (en) Attitude estimation apparatus and attitude estimation method
EP2872954A1 (en) A method for programming an industrial robot in a virtual environment
CN111113429B (en) Action simulation method, action simulation device and terminal equipment
CN109311155B (en) Method and device for calibrating tool coordinate system origin of industrial robot
CN112428263B (en) Mechanical arm control method and device and cluster model training method
Mavridis et al. On the subjective difficulty of joystick-based robot arm teleoperation with auditory feedback
Campbell et al. Superpositioning of behaviors learned through teleoperation
Jiang et al. Kinematics modeling of geomagic touch x haptic device based on adaptive parameter identification
CN107738256A (en) A kind of teach-by-doing apery teaching robot's programing system
CN108829248A (en) A kind of mobile target selecting method and system based on the correction of user's presentation model
CN111002292B (en) Robot arm humanoid motion teaching method based on similarity measurement
Yun et al. Accurate, robust, and real-time estimation of finger pose with a motion capture system
CN112894794B (en) Human body arm action simulation method and device, terminal equipment and storage medium
Shchekoldin et al. Adaptive head movements tracking algorithms for AR interface controlled telepresence robot
Bing et al. System design and experiment of bionics robotic arm with humanoid characteristics
Varshney et al. Manipulator control using human arm imitation
CN112894828B (en) Robot motion simulation method, device, equipment and storage medium
Yang et al. Vision-based cutting control of deformable objects
Macchelli et al. Space robotics: An experimental set-up based on RTAI-linux
US20230125071A1 (en) Offline teaching device and motion-program generation method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant