CN114454155A - Robot control method, robot control device, computer equipment, medium and robot - Google Patents
Robot control method, robot control device, computer equipment, medium and robot Download PDFInfo
- Publication number
- CN114454155A CN114454155A CN202011247263.4A CN202011247263A CN114454155A CN 114454155 A CN114454155 A CN 114454155A CN 202011247263 A CN202011247263 A CN 202011247263A CN 114454155 A CN114454155 A CN 114454155A
- Authority
- CN
- China
- Prior art keywords
- robot
- matrix
- rotation
- center point
- tool center
- 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.)
- Withdrawn
Links
- 238000000034 method Methods 0.000 title claims abstract description 54
- 239000011159 matrix material Substances 0.000 claims abstract description 248
- 230000008859 change Effects 0.000 claims abstract description 67
- 230000009466 transformation Effects 0.000 claims description 59
- 238000004364 calculation method Methods 0.000 claims description 45
- 238000004590 computer program Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 description 16
- 239000013598 vector Substances 0.000 description 8
- 230000006870 function Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 2
- 101150118300 cos gene Proteins 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 101100234408 Danio rerio kif7 gene Proteins 0.000 description 1
- 101100221620 Drosophila melanogaster cos gene Proteins 0.000 description 1
- 101100398237 Xenopus tropicalis kif11 gene Proteins 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1602—Programme controls characterised by the control system, structure, architecture
- B25J9/161—Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J13/00—Controls for manipulators
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1628—Programme controls characterised by the control loop
- B25J9/163—Programme controls characterised by the control loop learning, adaptive, model based, rule based expert control
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1628—Programme controls characterised by the control loop
- B25J9/1633—Programme controls characterised by the control loop compliant, force, torque control, e.g. combined with position control
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B25—HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
- B25J—MANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
- B25J9/00—Programme-controlled manipulators
- B25J9/16—Programme controls
- B25J9/1656—Programme controls characterised by programming, planning systems for manipulators
- B25J9/1661—Programme controls characterised by programming, planning systems for manipulators characterised by task planning, object-oriented languages
Landscapes
- Engineering & Computer Science (AREA)
- Robotics (AREA)
- Mechanical Engineering (AREA)
- Automation & Control Theory (AREA)
- Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Fuzzy Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Manipulator (AREA)
- Numerical Control (AREA)
Abstract
The invention discloses a robot control method, a device, computer equipment, a storage medium and a robot, which are used for controlling a multi-axis robot, wherein the method comprises the following steps: acquiring a D-H table of the robot according to the current pose of the robot; calculating a first rotation change matrix of a tool center point of the robot relative to a base according to the D-H table; calculating the cylindrical coordinate of the tool center point of the robot according to the first rotation change matrix; and controlling the robot to move to a target position according to the cylindrical coordinates, and the method can reduce the calculated amount when the pose of the robot is changed and is simple and convenient to operate.
Description
Technical Field
The invention relates to the field of robots, in particular to a robot control method, a robot control device, computer equipment, a medium and a robot.
Background
At present, multi-axis robots in the market, such as construction robots, mostly perform pose control, i.e., motion control, on tool center points or mechanical arms of the robots based on rectangular coordinates. However, the general motion of the robot is usually circular motion, the circular motion of the robot cannot be accurately described by controlling the motion of the robot based on rectangular coordinates, and when the motion of the robot is controlled by inching (i.e. controlling the motion amount of the robot by a button), the circular motion of the robot can be realized only by inputting the X-axis motion amount and then inputting the Y-axis motion amount according to the rectangular coordinates, so the operation is complicated, and the calculation amount during pose transformation is large.
Disclosure of Invention
The embodiment of the invention provides a robot control method and device, computer equipment, a storage medium and a robot, which are used for reducing the calculated amount during pose change of the robot and are simple and convenient to operate.
The embodiment of the invention provides a robot control method, which is used for controlling a multi-axis robot and comprises the following steps:
acquiring a D-H table of the robot according to the current pose of the robot;
calculating a first rotation change matrix of the tool center point of the robot relative to the base according to the D-H table;
calculating the cylindrical coordinate of the tool center point of the robot according to the first rotation change matrix;
and controlling the tool center point of the robot to move to a target position according to the cylindrical coordinates.
Preferably, said calculating a first rotation variation matrix of the base of the robot with respect to the tool center point of the robot from the D-H table comprises:
calculating a rotation transformation matrix according to the D-H table, wherein the rotation transformation matrix is used for describing a coordinate axis transformation matrix obtained after the D-H coordinate axes of all rotating shafts of the robot are subjected to rotation transformation, and the D-H coordinate axes are generated by modeling in advance;
calculating a first intermediate matrix and a tool center point matrix according to the rotation transformation matrix, wherein the first intermediate matrix is a rotation change matrix of a last rotating shaft of the robot relative to a base, and the tool center point matrix is a rotation change matrix of a tool center point of the robot relative to the last rotating shaft;
and calculating the first rotation change matrix according to the tool center point matrix and the first intermediate matrix.
Preferably, the cylindrical coordinate of the tool center point of the robot is (r, θ, z), the coordinate type of the target position is a cylindrical coordinate, and the controlling the tool center point of the robot to move to the target position according to the cylindrical coordinate includes:
acquiring coordinates of the target position, wherein the coordinates of the target position are (r ', θ ', z '), r + a first fixed quantity, θ + a second fixed quantity, z + a third fixed quantity, and the first fixed quantity, the second fixed quantity and the third fixed quantity are obtained by performing inching control on the robot by an operator;
calculating a second rotation change matrix of the central point of the robot tool relative to the base according to the coordinates of the target position;
calculating the rotation angle of each rotating shaft of the robot according to the second rotation change matrix;
and controlling each rotating shaft of the robot to perform rotary motion according to the rotating angle of the corresponding shaft so as to enable the tool center point of the robot to move to the target position.
Preferably, the coordinates of the target position are cylindrical coordinates; the calculating a second rotation variation matrix of the robot tool center point relative to the base according to the coordinates of the target position includes:
converting the coordinates of the target position into rectangular coordinates;
and calculating the second rotation change matrix according to the pose variable and the rectangular coordinate of the first rotation change matrix.
Preferably, the calculating the rotation angles of the respective axes of the robot according to the second rotation variation matrix includes:
performing matrix inverse operation on the second rotation change matrix and the tool central point matrix to obtain a second intermediate matrix, wherein the second intermediate matrix is a rotation change matrix of the last rotating shaft of the robot relative to the base;
and performing algebraic operation based on the second intermediate matrix to obtain the rotation angle of each rotating shaft of the robot.
The embodiment of the invention also provides a robot control device, which comprises:
the D-H table acquisition module is used for acquiring a D-H table of the robot according to the current pose of the robot;
the matrix calculation module is used for calculating a first rotation change matrix of the tool center point of the robot relative to the base of the robot according to the D-H table;
the coordinate calculation module is used for calculating the cylindrical coordinate of the tool center point of the robot according to the first rotation change matrix;
and the control module is used for controlling the tool center point of the robot to move to a target position according to the cylindrical coordinates.
Preferably, the matrix calculation module includes:
the first matrix calculation unit is used for calculating a rotation transformation matrix according to the D-H table, the rotation transformation matrix is used for describing a coordinate axis transformation matrix obtained after rotation transformation is carried out on D-H coordinate axes of all rotating shafts of the robot, and the D-H coordinate axes are generated by modeling in advance;
the second matrix calculation unit is used for calculating a first intermediate matrix and a tool center point matrix according to the rotation transformation matrix, wherein the first intermediate matrix is a rotation transformation matrix of the last rotating shaft of the robot relative to the base, and the tool center point matrix is a rotation transformation matrix of the tool center point of the robot relative to the last rotating shaft;
and the third matrix transformation unit is used for calculating the first rotation change matrix according to the tool center point matrix and the first intermediate matrix.
Preferably, the cylindrical coordinates of the tool center point of the robot are (r, θ, z), and the control module includes:
an acquiring unit, configured to acquire coordinates of the target position, where the coordinates of the target position are (r ', θ ', z '), where r ═ r + a first fixed amount, θ ═ θ + a second fixed amount, and z ═ z + a third fixed amount, and the first fixed amount, the second fixed amount, and the third fixed amount are obtained based on a position control instruction of a robot;
the third matrix calculation unit is used for calculating a second rotation change matrix of the base of the robot relative to the tool center point of the robot according to the coordinates of the target position;
a rotation angle calculation unit for calculating rotation angles of respective axes of the robot according to the second rotation change matrix;
and the control unit is used for controlling each rotating shaft of the robot to perform rotating motion according to the rotating angle of the corresponding shaft so as to enable the tool center point of the robot to move to the target position.
Preferably, the rotation angle calculation unit includes:
the first operation subunit is used for performing matrix inverse operation on the second rotation change matrix and the tool central point matrix to obtain a second intermediate matrix, and the second intermediate matrix is a rotation change matrix from the base of the robot to the last rotating shaft;
and the second operation subunit is used for performing algebraic operation on the basis of the second intermediate matrix to obtain the rotation angle of each rotation shaft of the robot.
The embodiment of the invention also provides computer equipment which comprises a memory and a processor, wherein the memory stores the robot control program, and the processor is used for realizing the steps of the robot control method when executing the robot control program.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the steps of the robot control method are implemented.
An embodiment of the present invention further provides a robot, including: the robot is controlled by adopting the robot control method.
According to the robot control method, the robot control device, the robot control equipment, the robot control medium and the robot, the D-H table is obtained according to the current pose of the robot, the first rotation change matrix is calculated according to the D-H table, the cylindrical coordinate of the tool center point is further calculated, and finally the robot is controlled to move to the target position according to the cylindrical coordinate. In addition, the robot performs circular motion, so that the robot motion is controlled based on the cylindrical coordinates, and the pose motion of the robot can be described more accurately.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a flow chart of a robot control method in one embodiment of the present invention;
fig. 2 is a schematic pose diagram of a 6-axis robot;
FIG. 3 is a flow chart of a robot control method in another embodiment of the present invention;
fig. 4 is a schematic block diagram of a robot control apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. 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 invention.
In the description of the present invention, it should be noted that the terms "first", "second", "third", and the like are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
The robot control method provided by the embodiment of the invention can be used for controlling the pose, namely the motion of the multi-axis robot, and particularly can control the motion of the robot by controlling each rotating shaft of the robot to rotate. The multiple axes may be a robot with more than 2 axes, and it should be noted that the present embodiment will be described by taking a 6-axis robot as an example, but this does not mean that the technical solution proposed by the present invention can only be used for controlling a 6-axis robot.
Fig. 1 is a flowchart of a robot control method according to an embodiment of the present invention, and as shown in fig. 1, the method includes the following steps:
s10: acquiring a D-H table of the robot according to the current pose of the robot;
the pose refers to the position and the pose of the robot. Illustratively, fig. 2 is a pose of the robot. The pose of the robot can be generally described by one or more of coordinates, vectors or matrices; the D-H table of the robot is obtained based on the robot under a D-H coordinate system, wherein, as shown in fig. 2, the D-H coordinate system includes a plurality of sub-coordinate systems with the rotating shaft as the origin, and the number of the sub-coordinate systems is the number of the rotating shafts of the robot, wherein each sub-coordinate system may include X, Y, Z axes. The D-H coordinate system can be realized by modeling based on a Krig method (Craig Version), and the process is as follows:
establishing a D-H coordinate system based on the robot according to the current pose of the robot, and specifically referring to FIG. 2, wherein the system establishing criterion of the D-H coordinate system is as follows:
along the connecting rod aiDirection (if a)iNot equal to 0), orAndperpendicular to each other (if a)i=0);
wherein i represents the ith axis of the robot, the same applies below.
After establishing the D-H coordinate system, obtaining a D-H table based on a Kreger method:
ai-1: the shortest distance between two adjacent Z axes, wherein, alongThe Z axis is at Z when viewed from the directioni-1In front of the shaft, ai-1Is positive;
αi-1: the Z-axis angle between the two connecting rods is positive anticlockwise according to right-hand rules;
di: the shortest distance between two adjacent X axes;
θi: the angle between two adjacent X-axes is positive counterclockwise according to the right-hand rule.
Taking a 6-axis robot as an example, the D-H table is calculated as follows:
axle numbering | αi-1Connecting rod torsion angle | ai-1Length of connecting rod | diDistance of joint | θiJoint angle |
1 | 0 | 0 | d1 | θ1 |
2 | -90° | 0 | d2 | θ2 |
3 | 0 | a2 | 0 | θ3 |
4 | 0 | a3 | -d4 | θ4 |
5 | 90° | 0 | d5 | θ5 |
6 | -90° | 0 | d6 | θ6 |
S20: and calculating a first rotation change matrix of the base of the robot relative to the tool center point of the robot according to the D-H table.
Wherein, the tool center point is also called as a flange center point or a tcp (toolcenter position); specifically, when the first rotation variation matrix is calculated in a matrix transformation manner, the following calculation results:
s21: calculating a rotation transformation matrix according to the D-H table, wherein the rotation transformation matrix is used for describing a coordinate axis transformation matrix obtained after rotation transformation is carried out on D-H coordinate axes of all rotating shafts of the robot;
according to the establishment rule of the D-H coordinate system and the parameters of the D-H table, the rotation transformation matrix can be sequentially calculated: first, the sub-coordinate system in the D-H coordinate system is rotated by a certain angle around the X axis, such as alphai-1The X-axis remains unchanged, and a two-dimensional rotation is performed on the plane of yoz (o is the origin of coordinates, which in this embodiment may be the base of the robot) consisting of the Y-axis and the Z-axis, so that:
Similarly, rotated by a certain angle about the Z-axis, e.g. thetaiThe X-axis remains unchanged, and the Yz (o is the origin of coordinates which in this embodiment may beReferring to the base of the robot) performs a two-dimensional rotation in the plane, thus:
moving the coordinate system along the X axis and the Z axis to obtain:
it should be noted that the D-H coordinate system and its sub-coordinate system are generated in advance for easy observation or description, and in the actual operation process, the D-H coordinate system is established as an optional operation.
The rotation transformation matrix is obtained, and then the rotation transformation matrix, namely the first intermediate matrix, of the last rotating shaft of the robot relative to the base is calculated according to the rotation transformation matrix, and the tool center point matrix of the robot is calculated. It should be noted that the last rotating shaft mentioned here is the rotating shaft farthest from the base, or the rotating shaft connected to the tool of the robot; the first intermediate matrix is also a homogeneous transformation matrix of the robot, and the specific calculation process is as follows:
according to the formula:
by substituting the above D-H table into the above results, it is possible to obtain:
because the secondary shaft rotates based on the rotation of the front shaft according to the secondary shaft of the robot, Z-Y-Z Euler is adopted
angles (euler angles) calculate the rotation change matrix from each rotating shaft of the robot to the base:
wherein i represents the ith rotating shaft of the robot, and n represents the number of the rotating shafts of the robot. Of course, since the first intermediate matrix represents the rotation variation matrix from the last rotation axis of the robot to the base, the formula can also be used to calculate the first intermediate matrix.
Taking 6-axis robot as an example, a rotation change matrix from the sixth rotating shaft of the robot to the base (i.e. rotation change matrix of the robot from the sixth rotating shaft to the base) is calculated according to the formulaThe first intermediate matrix) is:
illustratively, the following calculation is performed first using a step-by-step calculation methodRecalculationThen calculateRecalculationFinal calculation
Wherein,
wherein,
due to the fact thatThe calculated data is relatively long and will be represented here by the variables:
it will be appreciated that the above description has been madeThat is, the first intermediate matrix represents the pose of fig. 2, and the above calculation process is only for the pose of fig. 2, and the specific calculation process when the robot is in another pose may refer to the overall idea of the above calculation process, and this embodiment is not limited in particular.
Calculating a tool center point matrix of the robot:
the tool center point matrix is a rotation change matrix of the tool center point of the robot relative to the last rotating shaft:
referring to fig. 2, it can be seen that the tool center point matrix (i.e., the homogeneous transformation matrix of the tool center points) is:
wherein B represents the center point of the tool of the robot, d7See fig. 2.
S23: and calculating a first rotation change matrix according to the tool center point matrix and the first intermediate matrix.
calculated, Px、Py、PzThe values of (A) are respectively:
Px=[(cosθ1·cosθ2·cosθ3-cosθ1·sinθ2·sinθ3·cosθ4sinθ5+-cosθ1·sinθ2·cosθ3-cosθ1·cosθ2·sinθ3·-sinθ4·sinθ5+-sinθ4·cosθ5·d7+cosθ1·cosθ2·cosθ3-cosθ1·sinθ2·sinθ3·-cosθ4·sinθ5·d6+sinθ4·d5+a3+-cosθ1·sinθ2·cosθ3-cosθ1·cos2·sinθ3·-sinθ4·sinθ5·d6-cosθ4·d5+-sinθ1·cosθ5·d6-d4+cosθ1·cosθ2·a2-sinθ1·d2:
Py=[(sinθ1·cosθ2·cosθ3-sinθ1·sinθ2·sinθ3)·(cosθ4sinθ5)+(-sinθ1·cosθ2·sinθ3-sinθ1·sinθ2·cosθ3)·(-sinθ4·sinθ5)+(cosθ1)·(cosθ5)]·d7+(sinθ1·cosθ2·cosθ3-sinθ1·sinθ2·sinθ3)·(-cosθ4·sinθ5·d6+sinθ4·d5+a3)+(-sinθ1·cosθ2·sinθ3-sinθ1·sinθ2·cosθ3)·(-sinθ4·sinθ5·d6-cosθ4·d5)+(cosθ1)·(cosθ5·d6-d4)+(s inθ1·co sθ2·a2+sinθ1·d2);
Pz=[(-sinθ2·cosθ3-cosθ2·sinθ3)·(cosθ4sinθ5)+sinθ2·sinθ3-sinθ3·cosθ3·-sinθ4·sinθ5·d7+-sinθ2·cosθ3-cosθ2·sinθ3·-cosθ4·sinθ5·d6+sinθ4·d5+a3+sinθ2·sinθ3-sinθ3·cosθ3·-sinθ4·sinθ5·d6-cosθ4·d5+-sinθ2·a2+d1。
note that, in the first rotation variation matrix, the 3 × 3 part represents the pose of the robot, and the fourth column represents a vector from the base to the tool center point.
The steps S21-S23 are that the rotation transformation matrix is calculated according to the D-H table, the first intermediate matrix and the tool center point matrix are further calculated, and finally the first rotation transformation matrix is calculated, so that the calculation process is simple and convenient, and the calculation amount is small.
S30: and calculating the cylindrical coordinates of the tool center point of the robot according to the first rotation change matrix.
From the nature of the cylindrical coordinates, the cylindrical coordinates consist of three parameters: r, θ and z, since the first rotation variation matrix is the base of the robot relative to the tool center point in this embodiment, the first rotation variation matrix describes the pose of the robot and the vector of the base to the tool center point, and thus the coordinate transformation of the vector of the base to the tool center point in the first rotation variation matrix can obtain the cylindrical coordinate:
z=Pz;
it can be understood that, this embodiment is equivalent to establishing a cylindrical coordinate system with the base as the origin, and the cylindrical coordinate of the tool center point is a point on the cylindrical coordinate system.
S40: and controlling the robot to move to the target position according to the cylindrical coordinates.
The step is mainly to control the robot to carry out pose transformation according to the cylindrical coordinates calculated in the step, and the robot is moved to a target position by carrying out pose transformation on the robot. Specifically, the robot motion control may be manual jog control, that is, the robot is moved by manually operating a position control button on the robot, or the robot is moved to a target position by inputting coordinates of the target position. In this embodiment, the moving direction of the robot may be a rotation around the Z axis of the cylindrical coordinate system (corresponding to changing θ), and/or a movement parallel to the Z axis (corresponding to changing Z), and/or a movement perpendicular to the Z axis (corresponding to changing r) based on the cylindrical coordinate system described in step S30.
Specifically, as shown in fig. 3, controlling the robot to move to the target position according to the cylindrical coordinates includes the following steps:
s41: the method comprises the steps of acquiring coordinates of a target position, wherein the coordinates of the target position are (r ', theta', z '), wherein r' is r + a first fixed quantity, theta 'is theta + a second fixed quantity, z' is z + a third fixed quantity, and the first fixed quantity, the second fixed quantity and the third fixed quantity are obtained based on a position control command of the robot.
The coordinates of the target position referred to herein are cylindrical coordinates, and if rectangular coordinates are obtained, the rectangular coordinates should be converted into cylindrical coordinates. Exemplarily, it is assumed that the coordinates of the target position are (r ', θ ', z '), and r ═ r + a first fixed amount, θ ═ θ + a second fixed amount, and z ═ z + a third fixed amount; the position control instruction of the robot may be generated by the operator performing manual jog operation on the robot, may also be generated by direct input of the operator, and may also be generated in other manners, such as remote control, wireless control, and the like, where the generation manner of the position control instruction of the robot is not limited. If the robot is controlled by manual jog control, the moving amount (i.e., the first fixed amount, the second fixed amount, and the third fixed amount) of each manual jog may be obtained, and the coordinates of the target position may be calculated according to the relationship between the coordinates of the target position, the fixed amount, and the cylindrical coordinates.
S42: and calculating a second rotation change matrix of the central point of the robot tool relative to the base according to the coordinates of the target position.
And the second rotation change matrix represents the pose of the robot at the current position and the vector from the tool center point to the base when the robot is at the target position. It can be understood that, since the robot has not calculated the pose at the target position, that is, the robot has not undergone pose transformation, the pose at the current position here refers to the pose of the robot when pose transformation has not occurred.
Specifically, calculating the second rotation variation matrix may include the steps of:
s421: the coordinates of the target position are converted into rectangular coordinates.
Because the second rotation change matrix is required to be calculated subsequently and contains the vector from the tool center point to the base, the coordinate of the target position is converted into a rectangular coordinate form for facilitating subsequent calculation; for example, taking the coordinates of the target position as (r ', θ', z '), the rectangular coordinates obtained after the coordinate conversion are (r' cos θ ', r' sin θ ', z').
S422: and obtaining a second rotation change matrix according to the pose variable and the rectangular coordinate of the first rotation change matrix.
Because the first rotation change matrix contains the pose of the robot at the current position, the transformed coordinates of the target position are brought into the first rotation change matrix to replace a vector part. Illustratively, taking the first rotation variation matrix in step S23 as an example, the coordinates of the target position after conversion are substituted into the first rotation variation matrix, and the obtained second rotation variation matrix is:
s43: and calculating the rotation angle of each axis of the robot according to the second matrix and the second rotation change matrix.
This step is in effect the process of inverse solving the point matrix of the base of the robot to the various axes of rotation. Specifically, calculating the rotation angles of the respective rotation axes of the robot may include the steps of:
s431: and performing matrix inverse operation on the second rotation change matrix and the tool central point matrix to obtain a second intermediate matrix, wherein the second intermediate matrix is a rotation change matrix from the base of the robot to the last rotating shaft.
It should be noted that, although the first intermediate matrix and the second intermediate matrix each represent a rotation transformation matrix of the last rotation axis of the robot relative to the base, the first intermediate matrix and the second intermediate matrix are two parameters that are completely different: the first intermediate matrix is calculated from the known pose, the parameters are used to calculate the current cylindrical coordinates of the robot, and the second intermediate matrix is calculated from the second rotation variation matrix and the tool center point matrix, the rotation axis angle.
As can be seen from the above-mentioned steps,by solving the second rotation variation matrix in an inverse manner, a second intermediate matrix can be calculated
It is abbreviated as:
s432: and performing algebraic operation based on the second intermediate matrix to obtain the rotation angle of each rotating shaft of the robot.
Using a 6-axis robot as an example, θ 'was first obtained'1、θ′5、θ′6:
Because:
the following can be obtained:
this can be deduced:
through simplification:
-sθ′1·n13·d′6+cθ′1·n23·d′6+sθ′1·n14-cθ′1·n24=d4-d2sθ′1·(n14-n13·d′6)+cθ′1·(n23·d′6-n24)=d4-d2
setting: i.e. i1=n14-n13·d6;j1=n23·d6-n24
when i + d4-d2When equal to 0, theta1=180°
[ theta ] was calculated'6:
Through simplification: (s θ'1·n11-Cθ′1·n21)·sθ′6-(cθ′1·n22-sθ′1·n12)·cθ′6=0
Due to theta'62 values within 360 DEG, take | theta'6-θ6The minimum value, |;
calculate θ5:
θ′5=arcsin[(-sθ′1·n11+cθ′1·n21)·cθ′6-(-sθ′1·n12+cθ′1·n22)·sθ6)]
θ′5=arccos(-sθ1·n13+cθ1·n23)
Theta 'can be directly obtained from the above formula'5。
Has calculated theta'1、θ′5、θ′6Wherein θ 'is calculated from the inverse matrix'2、θ′3、θ′4:
it is subjected to 4-dimensional matrix inversion to calculate:
due to theta'22 values within 360 DEG, take | theta'2-θ2The minimum value, |;
from this, θ 'can be calculated'3The value of (c):
because:
similarly, θ 'can be calculated'4The value of (c).
The rotation angle theta of each axis of the robot can be calculated through the calculation process'1,θ′2,θ′3,θ′4,θ′5And θ'6. It should be noted that the above calculation process is only an exemplary illustration, and the calculation process does not represent that the rotation angle of the 6-axis robot can be calculated only in the embodiment of the present invention, and the rotation angles of the multi-axis robots, such as 2-axis, 3-axis, and 4-axis robots, may also be calculated, and it is understood that when the rotation angles of other multi-axis robots are calculated, the solution may be performed according to the rotation angles included by the vectors or elements in the second intermediate matrix and other point matrices.
In the steps S431 to S432, matrix inversion is performed on the second rotation variation matrix and the tool center point matrix to obtain a second intermediate matrix, and then an algebraic operation is performed based on the second intermediate matrix to calculate the rotation angle of each rotating shaft of the robot, so that the calculation process is simple.
S44: and controlling each shaft of the robot to perform rotary motion according to the rotating angle of the corresponding shaft so as to enable the robot to move to the target position.
Calculating the rotation angle theta of each axis of the robot'1、θ′2、θ′3、θ′4、θ′5And θ'6. And then, the robot can be controlled to move to the target position only by controlling the rotation angle corresponding to the rotation of each shaft of the robot.
The steps S41 to S44 are to calculate the second rotation change matrix according to the coordinates of the target position, and then calculate the rotation angle of each rotation axis of the robot according to the second rotation change matrix, and control each rotation axis of the robot to rotate according to the rotation angle of the corresponding axis, so that the robot can be effectively controlled to perform pose transformation, and the robot can be accurately controlled to move to the target position by calculating the rotation angle of each rotation axis.
According to the embodiment, the D-H table is obtained according to the current pose of the robot, the first rotation change matrix is calculated according to the D-H table, the cylindrical coordinate of the center point of the tool is calculated, and finally the robot is controlled to move to the target position according to the cylindrical coordinate, so that the calculation amount of the robot during pose change can be effectively reduced. In addition, the robot performs circular motion, so that the robot motion is controlled based on the cylindrical coordinates, and the pose motion of the robot can be described more accurately.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In one embodiment, a robot control apparatus is provided, which corresponds one-to-one to the robot control method in the above-described embodiment. As shown in fig. 4, the robot controller includes:
the D-H table acquisition module 10 is used for acquiring a D-H table of the robot according to the current pose of the robot;
a matrix calculation module 20, configured to calculate a first rotation variation matrix of the tool center point of the robot with respect to the base of the robot according to the D-H table;
a coordinate calculation module 30, configured to calculate a cylindrical coordinate of a tool center point of the robot according to the first rotation change matrix;
and the control module 40 is used for controlling the tool center point of the robot to move to a target position according to the cylindrical coordinates.
The matrix calculation module includes:
a first matrix calculation unit for calculating a rotation transformation matrix from the D-H table;
the second matrix calculation unit is used for calculating a first intermediate matrix and a tool center point matrix according to the rotation transformation matrix, wherein the first intermediate matrix is a rotation transformation matrix of the last rotating shaft of the robot relative to the base, and the tool center point matrix is a rotation transformation matrix of the tool center point of the robot relative to the last rotating shaft;
and the third matrix transformation unit is used for calculating the first rotation change matrix according to the tool center point matrix and the first intermediate matrix.
The control module 40 includes:
an acquisition unit configured to acquire coordinates of the target position;
the first calculation unit is used for calculating a second rotation change matrix of the base of the robot relative to the tool center point of the robot according to the coordinates of the target position;
a second calculation unit configured to calculate a rotation angle of each axis of the robot according to the second rotation variation matrix;
and the control unit is used for controlling each rotating shaft of the robot to perform rotating motion according to the rotating angle of the corresponding shaft so as to enable the tool center point of the robot to move to the target position.
The second calculation unit includes:
the first operation subunit is used for performing matrix inverse operation on the second rotation change matrix and the tool central point matrix to obtain a second intermediate matrix, and the second intermediate matrix is a rotation change matrix from the base of the robot to the last rotating shaft;
and the second operation subunit is used for performing algebraic operation on the basis of the second intermediate matrix to obtain the rotation angle of each rotation shaft of the robot.
Optionally, the matrix calculation module includes:
the third matrix calculation unit is used for calculating a rotation transformation matrix according to the D-H table, the rotation transformation matrix is used for describing a coordinate axis transformation matrix obtained after rotation transformation is carried out on D-H coordinate axes of all rotating shafts of the robot, and the D-H coordinate axes are generated in a modeling mode in advance;
a fourth matrix calculation unit, configured to calculate a first intermediate matrix and a tool center point matrix according to the rotation transformation matrix, where the first intermediate matrix is a rotation transformation matrix of a last rotating shaft of the robot relative to a base, and the tool center point matrix is a rotation transformation matrix of the last rotating shaft of the robot relative to a tool center point;
and the fifth matrix calculation unit is used for calculating the first rotation change matrix according to the tool center point matrix and the first intermediate matrix.
For specific limitations of the robot control device, reference may be made to the above limitations of the robot control method, which are not described herein again. The respective modules in the robot control device described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the above units.
In one embodiment, a robot is provided, which is controlled using the above-described robot control method.
In one embodiment, a computer device is provided, comprising 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 control method described above when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, realizes the steps of the above-mentioned robot control method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases or other media used in the embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.
Claims (12)
1. A robot control method for controlling a multi-axis robot, comprising:
acquiring a D-H table of the robot according to the current pose of the robot;
calculating a first rotation change matrix of the tool center point of the robot relative to the base according to the D-H table;
calculating the cylindrical coordinate of the tool center point of the robot according to the first rotation change matrix;
and controlling the tool center point of the robot to move to a target position according to the cylindrical coordinates.
2. The robot control method of claim 1, wherein said calculating a first rotation variation matrix of a tool center point of the robot relative to a base from the D-H table comprises:
calculating a rotation transformation matrix according to the D-H table, wherein the rotation transformation matrix is used for describing a coordinate axis transformation matrix obtained after rotation transformation is carried out on D-H coordinate axes corresponding to all rotating shafts of the robot, and the D-H coordinate axes are generated by modeling in advance;
calculating a first intermediate matrix and a tool center point matrix according to the rotation transformation matrix, wherein the first intermediate matrix is a rotation change matrix of a last rotating shaft of the robot relative to a base, and the tool center point matrix is a rotation change matrix of a tool center point of the robot relative to the last rotating shaft;
and calculating the first rotation change matrix according to the tool center point matrix and the first intermediate matrix.
3. The robot control method according to claim 2, wherein the cylindrical coordinates of the tool center point of the robot are (r, θ, z), the coordinate type of the target position is cylindrical coordinates, and the controlling the tool center point of the robot to move to the target position according to the cylindrical coordinates comprises:
acquiring coordinates of the target position, wherein the coordinates of the target position are (r ', theta ', z '), r + a first fixed quantity, theta + a second fixed quantity, z + a third fixed quantity, and the first fixed quantity, the second fixed quantity and the third fixed quantity are obtained based on a robot position control instruction;
calculating a second rotation change matrix of the central point of the robot tool relative to the base according to the coordinates of the target position;
calculating the rotation angle of each rotating shaft of the robot according to the second rotation change matrix;
and controlling each rotating shaft of the robot to perform rotary motion according to the rotating angle of the corresponding shaft so as to enable the tool center point of the robot to move to the target position.
4. A robot control method according to claim 3, wherein said calculating a second rotation variation matrix of the robot tool center point relative to the base based on the coordinates of the target position comprises:
converting the coordinates of the target position into rectangular coordinates;
and calculating the second rotation change matrix according to the pose variable and the rectangular coordinate of the first rotation change matrix.
5. The robot control method according to claim 3, wherein the calculating the rotation angle of each axis of the robot from the second rotation variation matrix includes:
performing matrix inverse operation on the second rotation change matrix and the tool central point matrix to obtain a second intermediate matrix, wherein the second intermediate matrix is a rotation change matrix of the last rotating shaft of the robot relative to the base;
and performing algebraic operation based on the second intermediate matrix to obtain the rotation angle of each rotating shaft of the robot.
6. A robot control apparatus, comprising:
the D-H table acquisition module is used for acquiring a D-H table of the robot according to the current pose of the robot;
the matrix calculation module is used for calculating a first rotation change matrix of the tool center point of the robot relative to the base of the robot according to the D-H table;
the coordinate calculation module is used for calculating the cylindrical coordinate of the tool center point of the robot according to the first rotation change matrix;
and the control module is used for controlling the tool center point of the robot to move to a target position according to the cylindrical coordinates.
7. The robot control method according to claim 6, wherein the matrix calculation module comprises:
the first matrix calculation unit is used for calculating a rotation transformation matrix according to the D-H table, the rotation transformation matrix is used for describing a coordinate axis transformation matrix obtained after rotation transformation is carried out on D-H coordinate axes of all rotating shafts of the robot, and the D-H coordinate axes are generated by modeling in advance;
the second matrix calculation unit is used for calculating a first intermediate matrix and a tool center point matrix according to the rotation transformation matrix, wherein the first intermediate matrix is a rotation transformation matrix of the last rotating shaft of the robot relative to the base, and the tool center point matrix is a rotation transformation matrix of the tool center point of the robot relative to the last rotating shaft;
and the third matrix transformation unit is used for calculating the first rotation change matrix according to the tool center point matrix and the first intermediate matrix.
8. The robot control method according to claim 7, wherein the cylindrical coordinates of the tool center point of the robot are (r, θ, z), and the control module comprises:
an obtaining unit, configured to obtain coordinates of the target position, where the coordinates of the target position are (r ', θ', z '), where r' ═ r + a first fixed amount, θ '═ θ + a second fixed amount, and z' ═ z + a third fixed amount, and the first fixed amount, the second fixed amount, and the third fixed amount are obtained according to a jog control performed on the robot by an operator;
the third matrix calculation unit is used for calculating a second rotation change matrix of the base of the robot relative to the tool center point of the robot according to the coordinates of the target position;
a rotation angle calculation unit for calculating rotation angles of respective axes of the robot according to the second rotation change matrix;
and the control unit is used for controlling each rotating shaft of the robot to perform rotating motion according to the rotating angle of the corresponding shaft so as to enable the tool center point of the robot to move to the target position.
9. The robot control method according to claim 8, wherein the rotation angle calculation unit includes:
the first operation subunit is used for performing matrix inverse operation on the second rotation change matrix and the tool central point matrix to obtain a second intermediate matrix, and the second intermediate matrix is a rotation change matrix from the base of the robot to the last rotating shaft;
and the second operation subunit is used for performing algebraic operation on the basis of the second intermediate matrix to obtain the rotation angle of each rotating shaft of the robot.
10. A computer arrangement comprising a memory in which a robot control program is stored and a processor for implementing the steps of the robot control method according to any of claims 1 to 5 when executing the robot control program.
11. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the robot control method according to any one of claims 1 to 5.
12. A robot, comprising: the robot is controlled using the robot control method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011247263.4A CN114454155A (en) | 2020-11-10 | 2020-11-10 | Robot control method, robot control device, computer equipment, medium and robot |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011247263.4A CN114454155A (en) | 2020-11-10 | 2020-11-10 | Robot control method, robot control device, computer equipment, medium and robot |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114454155A true CN114454155A (en) | 2022-05-10 |
Family
ID=81404790
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011247263.4A Withdrawn CN114454155A (en) | 2020-11-10 | 2020-11-10 | Robot control method, robot control device, computer equipment, medium and robot |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114454155A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020173878A1 (en) * | 2001-04-16 | 2002-11-21 | Fanuc Ltd. | Robot controller |
CN103481288A (en) * | 2013-08-27 | 2014-01-01 | 浙江工业大学 | 5-joint robot end-of-arm tool pose controlling method |
CN109262610A (en) * | 2018-08-30 | 2019-01-25 | 珠海格力电器股份有限公司 | Method and system for solving tail end pose of serial multi-degree-of-freedom robot and robot |
CN110411338A (en) * | 2019-06-24 | 2019-11-05 | 武汉理工大学 | The welding gun tool parameters 3-D scanning scaling method of robot electric arc increasing material reparation |
CN110757454A (en) * | 2019-10-12 | 2020-02-07 | 广州中国科学院先进技术研究所 | Path planning method and device for cooperative rotation of double robots |
-
2020
- 2020-11-10 CN CN202011247263.4A patent/CN114454155A/en not_active Withdrawn
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020173878A1 (en) * | 2001-04-16 | 2002-11-21 | Fanuc Ltd. | Robot controller |
CN103481288A (en) * | 2013-08-27 | 2014-01-01 | 浙江工业大学 | 5-joint robot end-of-arm tool pose controlling method |
CN109262610A (en) * | 2018-08-30 | 2019-01-25 | 珠海格力电器股份有限公司 | Method and system for solving tail end pose of serial multi-degree-of-freedom robot and robot |
CN110411338A (en) * | 2019-06-24 | 2019-11-05 | 武汉理工大学 | The welding gun tool parameters 3-D scanning scaling method of robot electric arc increasing material reparation |
CN110757454A (en) * | 2019-10-12 | 2020-02-07 | 广州中国科学院先进技术研究所 | Path planning method and device for cooperative rotation of double robots |
Non-Patent Citations (1)
Title |
---|
郝丽娜: "《工业机器人控制技术》", 华中科技大学出版社 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109829953B (en) | Image acquisition device calibration method and device, computer equipment and storage medium | |
JP4673346B2 (en) | Numerical controller | |
CN111037561B (en) | Space registration method and device | |
CN110561428B (en) | Method, device and equipment for determining pose of robot base coordinate system and readable medium | |
CN109702751A (en) | A kind of location class of seven freedom series connection mechanical arm is against solution method | |
CN112975954B (en) | Control method of robot arm, computer device, and storage medium | |
CN112123341B (en) | Robot double-arm coordinated motion control method and device and electronic equipment | |
CN110625600A (en) | Robot tail end workpiece coordinate system calibration method | |
US7248012B2 (en) | Teaching data preparing method for articulated robot | |
CN112454011A (en) | Method and device for correcting coordinate offset of workpiece of multi-axis machine tool, computer equipment and medium | |
TW201918348A (en) | Posture positioning system for machine and the method thereof | |
CN116038702B (en) | Seven-axis robot inverse solution method and seven-axis robot | |
CN110682293A (en) | Robot arm correction method, robot arm correction device, robot arm controller and storage medium | |
Shimizu | Analytical inverse kinematics for 5-DOF humanoid manipulator under arbitrarily specified unconstrained orientation of end-effector | |
CN116141330A (en) | Robot motion control method and device, robot equipment and storage medium | |
CN112828862A (en) | Master-slave mapping method for parallel platform, mechanical arm system and storage medium | |
CN114952806A (en) | Constraint motion control method, device and system and electronic equipment | |
CN114454155A (en) | Robot control method, robot control device, computer equipment, medium and robot | |
CN107703744B (en) | Numerical control machine tool motion chain design method considering nonlinear error and generalized mode | |
WO2020010628A1 (en) | Positioner axis coordinate system calibration method, robot system, and storage device | |
CN117340879A (en) | Industrial machine ginseng number identification method and system based on graph optimization model | |
CN109822571B (en) | Control method, device and equipment for mechanical arm of assembling machine | |
CN116597056A (en) | Animation processing method, device, equipment and storage medium | |
CN116587289A (en) | Seven-degree-of-freedom wrist joint bias mechanical arm inverse solution method, system and medium | |
CN115805587A (en) | Motion analysis method and device of seven-axis robot and electronic equipment |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20220510 |