Disclosure of Invention
The present invention is directed to solving, at least to some extent, one of the technical problems in the related art. Therefore, the invention aims to provide the teaching method for the indirect mechanical arm dragging, which has a wide application range.
The technical scheme adopted by the invention is as follows:
in a first aspect, the present invention provides a method for teaching indirect arm dragging, including:
performing plane teaching on a teaching plane for multiple times to obtain a teaching plane track;
executing a dynamic motion unit expression process on the teaching plane trajectory;
and selecting a new track starting point and a new track target point, carrying out track generalization on the teaching plane track according to the dynamic motion unit expression process, and obtaining the teaching track of the contact surface by combining with the contact force control process.
Further, obtaining the teaching trajectory plane further includes: and smoothing the teaching plane track to obtain a smooth teaching track.
Further, a Gaussian mixture model and Gaussian mixture regression are adopted to realize the smoothing processing.
Further, the dynamic motion unit expression process refers to: the teaching plane track is expressed by using a dynamic motion unit, and specifically comprises the following steps:
wherein x, v,
Respectively representing the position vector, the velocity vector and the acceleration vector, x of the track point in the teaching plane track
0And the vector of the position of the starting point of the teaching plane track is shown, g is the vector of the position of the target point of the teaching plane track, f is a forcing function, and both tau and K, D are constants.
Further, the forcing function is specifically:
ψi(s)=exp(-hi(s-μi)2)
wherein s denotes a phase variable, #i(s) represents the center and width respectively are muiAnd hiGaussian of ωiRepresenting dynamic motion unit weights, N tableThe number of gaussian basis functions is shown.
Further, the track generalization process specifically includes:
selecting a new track starting point and a new track target point;
obtaining a contact force of the tail end of the mechanical arm and the contact surface, wherein the contact force is smaller than a force error threshold;
and generating a teaching track of the contact surface according to the dynamic motion unit expression process and the contact force.
Further, the end of the mechanical arm is perpendicular to the contact surface.
In a second aspect, the present invention further provides an indirect arm drag teaching apparatus, including:
a plane trajectory acquisition module: the teaching plane track is used for carrying out plane teaching on a teaching plane for multiple times to obtain a teaching plane track;
the dynamic motion unit expression module: the dynamic motion unit expression process is executed on the teaching plane track;
a track generalization control module: and the dynamic motion unit expression process is used for selecting a new track starting point and a new track target point, carrying out track generalization on the teaching plane track according to the dynamic motion unit expression process, and obtaining the teaching track of the contact surface by combining with the contact force control process.
In a third aspect, the present invention provides an indirect-arm-drag teaching apparatus, including:
at least one processor, and a memory communicatively coupled to the at least one processor;
wherein the processor is adapted to perform the method of any of the first aspects by invoking a computer program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any of the first aspects.
The invention has the beneficial effects that:
according to the invention, a teaching plane track is obtained by carrying out plane teaching on a teaching plane for multiple times, a dynamic motion unit expression process is carried out on the teaching plane track, a new track starting point and a new track target point are selected, track generalization is carried out on the teaching plane track according to the dynamic motion unit expression process, and the teaching track of the contact surface is obtained by combining a contact force control process. The limitation of a direct-dragging teaching technology in the prior art is overcome, and the problems that the use process is limited, the specified operation requirement under the complex working condition is difficult to meet, the direct-dragging teaching technology cannot realize accurate teaching and the like in the occasions where operators cannot reach or the occasions where accurate tracks and force tracking are required are solved. The plane teaching learning of the mechanical arm and the teaching track generation on the contact surface are realized by combining the dynamic motion unit expression with the contact force control process, the dragging teaching on the contact surface is not needed, the contact force control is realized, and the problem that the teaching track on an operation object which cannot be reached by an operator cannot be generated by a direct teaching technology is solved.
The robot control teaching device can be widely applied to the robot control teaching field.
Detailed Description
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following description will be made with reference to the accompanying drawings. It is obvious that the drawings in the following description are only some examples of the invention, and that for a person skilled in the art, other drawings and embodiments can be derived from them without inventive effort.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
An embodiment of the present invention provides a teaching method for indirect dragging of a robot arm, and fig. 1 is a flowchart illustrating an implementation of the teaching method for indirect dragging of a robot arm according to the embodiment of the present invention, as shown in fig. 1, the method includes the following steps:
s1: in the embodiment, a focal plane is selected at first, in order to avoid a large teaching error caused by one-time teaching, multiple-time plane teaching is performed to obtain multiple teaching plane tracks, and a teaching process on the teaching plane is taught by using a conventional teaching method.
S2: in this embodiment, a gaussian mixture model and a gaussian mixture regression are adopted to perform smoothing processing, that is, in this embodiment, a smooth teaching trajectory can be obtained by processing using the gaussian mixture model and the gaussian mixture regression, and is used for executing the following steps.
S3: and executing a dynamic motion unit expression process on the smooth teaching track, namely expressing the smooth teaching track obtained by the steps by using a dynamic motion unit, wherein the dynamic motion unit can use a second-order differential equation to express any section of continuous track.
S4: and (3) carrying out track generalization to obtain a teaching track of the contact surface, specifically: and selecting a new track starting point and a new track target point, carrying out track generalization on the smooth teaching track according to the dynamic motion unit expression process, and obtaining the teaching track of the contact surface by combining with the contact force control process.
Specifically, in step S2, the gaussian mixture model is a probability model formed by overlapping a plurality of gaussian distributions, and as long as the number of gaussian distribution mixtures is sufficient, an arbitrary continuous distribution can be approximated by a weighted average of the gaussian mixtures with arbitrary accuracy, and the method is widely applied to trajectory generation of robot simulation learning and finally motion simulation, in this embodiment, the probability density function of the gaussian mixture model is represented as:
wherein y represents track points on the current teaching plane track, y | theta represents state quantity, alpha
kRepresents a weight coefficient, phi (y | theta)
k) Is conditional probability distribution and obeys gaussian distribution, K represents the number of gaussian distributions in the gaussian mixture model and has:
in this embodiment, the weight coefficient is a prior probability, and is estimated by using an expectation-maximization algorithm, which is described in detail in the prior art and is not described herein again.
After the acquired multiple pieces of teaching plane trajectory data are encoded by the gaussian mixture model, data reconstruction is performed in a gaussian mixture regression mode, and then after generalization processing, a general output, that is, a continuous motion trajectory, is obtained for trajectory reproduction of a motion behavior, that is, a smooth teaching trajectory in this embodiment. Specifically, a Gaussian mixture model is used for calculating the conditional probability phi (y | theta)k) Using the expected values as generalized reconstructed data points, generating a smooth teaching trajectory under covariance constraint, similar to a given θkAnd solving for y.
In addition, in this embodiment, the trajectory points reconstructed in the smooth teaching trajectory through the gaussian mixture regression method are not included in the rules of the multiple teaching planes, but have the characteristics of the teaching plane trajectory, and a smooth and reliable teaching trajectory is generated under constraint, so that effective control of the mechanical arm is realized.
As shown in fig. 2, the schematic diagram of the smoothing process in this embodiment is shown in the left drawing, which shows that the shape "2" is formed by combining a plurality of discrete track points, and the right drawing is a continuous smooth teaching track obtained by performing the smoothing process on a plurality of teaching plane tracks through a gaussian mixture model and a gaussian mixture regression, and the shape "2" is formed by combining the constraint relationship of the teaching plane tracks.
After the smooth teaching track is obtained, a dynamic motion unit expression process is executed on the smooth teaching track according to step S3, where the dynamic motion unit expression process refers to: the method utilizes a dynamic motion unit to express a smooth teaching track, and is specifically represented as follows:
wherein x, v,
Respectively representing the position vector, velocity vector and acceleration vector, x, of the locus point in the smooth teaching locus
0The vector represents the starting point position vector of the smooth teaching track, g represents the target point position vector of the smooth teaching track, f represents a forcing function, and is formed by combining a series of nonlinear functions, wherein tau and K, D are constants, and tau represents a time scaling factor for adjusting the attenuation speed of the system.
Further, the forcing function f is specifically:
ψi(s)=exp(-hi(s-μi)2) (4)
wherein s denotes a phase variable, #
i(s) represents the center and width respectively are mu
iAnd h
iGaussian of ω
iDisplay movementThe state motion unit weight can store the characteristics of a smooth teaching track after training, N represents the number of Gaussian basis functions and satisfies the following conditions:
α
sis constant to ensure the convergence of the system.
The weight omega of the dynamic motion unit is calculated according to the local weighted regression modeiIs called a dynamic motion unit trajectory learning process, and is expressed as:
the above equation (5) satisfies the following relationship:
wherein D represents a damping coefficient, x
demoA position vector representing the taught target point,
a velocity vector representing the taught target point,
acceleration vector representing teaching target point, f
targetRepresenting the objective forcing function.
In this embodiment, the target forcing function f can be obtained by smoothing the teaching trajectory informationtargetThereby weighting the dynamic motion unitiThe solution of (a) is converted into a function approximation problem, i.e. ω is determined by a local weighted regression algorithmiForcing functions f and ftargetAs close as possible, i.e. determining ωiIs such that f ≈ ftargetAnd a forcing function f is obtained.
In step S4, the track generalization process specifically includes:
s41: and selecting a new track starting point and a new track target point, wherein in the embodiment, the new track starting point and the new track target point are positioned on the contact surface, the contact surface can be a plane or a curved surface, selecting or carrying out coordinate axis transformation according to actual requirements, and calculating the teaching track of the contact surface by combining the new track starting point and the new track target point according to the formula (2).
S42: acquiring a contact force of the tail end of the mechanical arm and the contact surface, which is smaller than a force error threshold value, in a specific embodiment, the contact force between the tail end of the mechanical arm and the operation surface can be measured through a six-dimensional force sensor at the tail end of the mechanical arm, and the dragging teaching and force control operation of the mechanical arm can be realized by using the six-dimensional force sensor at the tail end, wherein the tail end of the mechanical arm and the contact surface are always kept perpendicular in the measurement process, and the magnitude of the contact force is smaller than the force error threshold value, which is defined:
Ferr=[F zd 0 0]T-[Fzt Mxt Myt]T (7)
wherein, FerrIndicating a force error threshold, FzdIndicating the desired contact force in the z-axis direction, FztRepresenting the actual contact force in the z-axis direction, MxtRepresenting the actual moment in the x-axis direction, MytThe y-axis direction actual moment is shown.
S43: generating a teaching track of the contact surface according to the dynamic motion unit expression process and the contact force, namely the teaching track has contact force size constraint and is expressed as six dynamic motion elementary equations:
in the above formula, the coordinate axis of the angular velocity is defined as α - β - γ, α represents the angular velocity in the α axis direction of the locus point in the smooth teaching trajectory, α0Alpha-axis direction angular velocity f representing starting point of smooth teaching trajectoryαRepresenting the forcing function of the alpha axis direction, the rest axes are analogized, FztRepresenting the actual contact force in the z-axis direction, MxtRepresenting the actual moment in the x-axis direction, MytRepresenting the actual moment in the y-axis direction, Kfα、Kfβ、KfzRepresenting the contact force error coefficient.
As shown in fig. 3, a schematic diagram of the indirect drag teaching according to the present embodiment is shown, which includes: the robot comprises a mechanical arm 01, a six-dimensional force sensor 02 on the tail end, a tail end tool 03, a contact surface 04, a teaching plane 05, a smooth teaching track 06 and a teaching track 07 of the contact surface, wherein the contact surface 04 is a curved surface, the smooth teaching track is obtained through teaching on the teaching plane, the smooth teaching track is expressed through a dynamic motion unit, then a new track starting point and a new track target point are selected on the contact surface, track generalization is carried out on the smooth teaching track according to the dynamic motion unit expression process, the teaching track of the contact surface is obtained by combining with a contact force control process, and the conversion process of converting the plane track into the curved surface track is a conventional mechanical arm coordinate system conversion process, which is not described in detail herein.
As shown in fig. 4, a schematic diagram of the end coordinate system and the tool coordinate system of the robot arm of the embodiment is shown, and it can be seen that the schematic diagram includes: the robot arm 01, the six-dimensional force sensor 02 on the tip, the tip tool 03 (length d), the contact surface 04 (optionally a curved surface), where the contact force matrix on the tool coordinate system is represented as: fzt-Mxt-MytIn particular, FztRepresenting the actual contact force in the z-axis direction, MxtRepresenting the actual moment in the x-axis direction, MytThe contact force matrix representing the actual moment in the y-axis direction, transformed by coordinates to the terminal coordinate system, is represented as: fz-Mx-MyIn particular, FzRepresenting tip contact force in z-axis direction, MxRepresenting the end moment in the x-axis direction, MyRepresenting the y-axis direction end moment.
In this embodiment, a teaching plane trajectory is obtained by performing multiple times of plane teaching on a teaching plane, a dynamic motion unit expression process is performed on the teaching plane trajectory, a new trajectory start point and a new trajectory target point are selected, trajectory generalization is performed on the teaching plane trajectory according to the dynamic motion unit expression process, and a teaching trajectory of a contact surface is obtained by combining a contact force control process. The limitation of a direct-dragging teaching technology in the prior art is overcome, and the problems that the use process is limited, the specified operation requirement under the complex working condition is difficult to meet, the direct-dragging teaching technology cannot realize accurate teaching and the like in the occasions where operators cannot reach or the occasions where accurate tracks and force tracking are required are solved.
Example two:
as shown in fig. 5, a block diagram of a robot indirect-dragging teaching apparatus according to this embodiment is suitable for executing the method according to the first embodiment, and includes:
the plane trajectory acquisition module 10: the teaching plane track is used for carrying out plane teaching on a teaching plane for multiple times to obtain a teaching plane track;
dynamic motion unit expression module 30: the dynamic motion unit expression process is executed on the teaching plane track;
the track generalization control module 40: the method is used for selecting a new track starting point and a new track target point, carrying out track generalization on the teaching plane track according to the dynamic motion unit expression process, and obtaining the teaching track of the contact surface by combining with the contact force control process.
The planar trajectory acquisition module 10 further comprises: and a smoothing module 20, configured to smooth the teaching plane trajectory to obtain a smooth teaching trajectory.
In addition, the invention also provides a mechanical arm indirect dragging teaching device, which comprises:
at least one processor, and a memory communicatively coupled to the at least one processor;
wherein the processor is configured to perform the method according to embodiment one by calling the computer program stored in the memory.
In addition, the present invention also provides a computer-readable storage medium, which stores computer-executable instructions for causing a computer to perform the method according to the first embodiment.
The invention realizes plane teaching learning of the mechanical arm and generation of a teaching track on the contact surface by combining dynamic motion unit expression with a contact force control process, does not need to drag teaching on the contact surface, simultaneously realizes contact force control, and solves the problem that a direct teaching technology cannot generate the teaching track on an operation object which cannot be reached by an operator. The robot control teaching device can be widely applied to the robot control teaching field.
The above embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same, although the present invention is described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.