Robot Forward Kinematics and DH Parameter Method

1 concept

1.1 Robot

The robot discussed in this paper is a space open-chain linkage mechanism, in which the kinematic pairs (rotating or moving) are often called joints, and the number of joints is usually the number of degrees of freedom of the robot.
That is: the robot consists of a series of joints (Joint) and links (Link), these joints may be sliding (linear) or rotating (rotational), they can be placed in any order and in any plane, and the links are also It can be of any length (including zero), it can be bent or twisted, and it can lie in any plane, so any set of joints and links can make up a robot.
After the robot structure is given, we can determine the type of each joint, the size between adjacent joints and other parameters.

1.2 Robot Kinematics

Robot kinematics includes forward kinematics and inverse kinematics.
Forward kinematics is to calculate the position and posture of the end of the robot given the joint variables of the robot (generally the relative motion of adjacent joints);
inverse kinematics is to know the position of the end of the robot. Attitude, calculate the joint variables of each joint of the robot. This article does not discuss inverse kinematics for now.

1.3 DH parameter model of robot forward kinematics

In the forward kinematics solution of the robot, the pose (position and attitude) of each joint of the robot relative to the previous joint should theoretically have 6 degrees of freedom (3 positions, 3 attitudes), and a transformation matrix To express, the transformation matrix of each joint is multiplied in turn, and the forward kinematics equation of the robot is obtained, so as to solve the position and attitude of the robot end in the robot base coordinate system.
However, according to the relative relationship between the joints of the robot, there are actually constraints, so there is no need to use the above complicated description.
In 1955, Denavit and Hartenberg published a paper in the "ASME Journal of Applied Mechanics". Later, robot representation and modeling was based on this paper, which became the standard method for representing robots and modeling robot motion, known as Denavit-Hartenberg parameter model (Denavit–Hartenberg parameters), referred to as DH model.
The DH model represents a very simple way of modeling robot links and joints, and can be used for any robot configuration, regardless of the robot's structural order and complexity.

2 The process of forward kinematics solution by DH parameter method

The DH parameter method fixedly connects a coordinate system for each connecting rod according to the set rules, and then can conveniently describe the transformation relationship from one connecting rod coordinate system to the next adjacent connecting rod coordinate system. The essence is to decompose the conversion of adjacent coordinate systems into several steps, and each step has only one parameter. The combination of corresponding transformations of these steps completes the transformation of adjacent coordinate systems.
insert image description here
The picture shows two adjacent links of the robot, that is, i − 1 i-1i1 joint, theni − 1 i-1i1 connecting rod,iii related,iiConnecting rod i , ..., set according to the coordinate system in the figure, the coordinate system { A i − 1 A_{i-1} Ai1} is fixed on the connecting rod i − 1 i-1i1 , the coordinate system { A i A_{i} Ai} is fixed on the connecting rod iiOn i , now we ask to find out from the coordinate system { A i − 1 A_{i-1} Ai1} to the coordinate system { A i A_{i} Ai} transformation matrix, as seen from the figure, can be decomposed into the following four steps to complete:
Step 1: The coordinate system is initially located in the coordinate system { A i − 1 A_{i-1} Ai1},X i − 1 X_{i-1}Xi1Axis rotation α i − 1 α_{i-1}ai1,Using ZZZ axisZ i Z_{i}Ziaxis parallel;
step 2: the coordinate system is along X i − 1 X_{i-1}Xi1轴平shift ai − 1 a_{i-1}ai1,Using ZZZ axisZ i Z_{i}ZiAxes are collinear;
Step 3: coordinate system around Z i − 1 Z_{i-1}Zi1(also Z i Z_{i}Zi) rotation θ i θ_{i}ii, so that XXX axis andX i X_{i}Xiaxis parallel;
step 4: the coordinate system is along Z i − 1 Z_{i-1}Zi1(also Z i Z_{i}Zi) translation di d_{i}di, which has been transformed into { A i A_{i} Ai}.
Described in the form of a homogeneous matrix, since the four steps are to perform the next transformation in the transformed coordinate system, so the matrix is ​​multiplied to the right, and we get the coordinate system { A i − 1 A_{i-1} Ai1} to the coordinate system { A i A_{i} Ai}的变换矩阵:
i i − 1 T = R o t ( X , α i − 1 ) T r a n s ( a i − 1 , 0 , 0 ) R o t ( Z , θ i ) T r a n s ( 0 , 0 , d i ) ^{i-1}_iT=Rot(X,α_{i-1})Trans(a_{i-1},0,0)Rot(Z,θ_{i})Trans(0,0,d_{i}) ii1T=Rot(X,ai1)Trans(ai1,0,0)Rot(Z,ii)Trans(0,0,di)
where:R ot RotR o t is the rotation matrix,Trans TransT r a n s a s t r o n g equationR ( X , θ ) = [ 1 0 0 0 0 cos θ − sin θ 0 0 sin θ cos θ 0 0 0 0 1 ] R(X,θ)=\left[\ begin{matrix} 1&0&0&0\\ 0&cosθ&-sinθ&0\\ 0&sinθ&cosθ&0\\ 0&0&0&1\\ \end{matrix}\right]R(X,i )=10000cosθsinθ00sinθcosθ00001, R ( Z , θ ) = [ cos θ − sin θ 0 0 sin θ cos θ 0 0 0 0 1 0 0 0 0 1 ] R(Z,θ)=\left[\begin{matrix} cosθ&-sinθ&0&0\ \ sinθ&cosθ&0&0\\ 0&0&1&0\\ 0&0&0&1\\ \end{matrix}\right]R(Z,i )=cosθsinθ00sinθcosθ0000100001 T r a n s ( x , y , z ) = [ 1 0 0 x 0 1 0 y 0 0 1 z 0 0 0 1 ] Trans(x,y,z)=\left[\begin{matrix} 1&0&0&x\\ 0&1&0&y\\ 0&0&1&z\\ 0&0&0&1\\ \end{matrix}\right] Trans(x,y,z)=100001000010xyz1
可计算出:
i i − 1 T = R o t ( X , α i − 1 ) T r a n s ( a i − 1 , 0 , 0 ) R o t ( Z , θ i ) T r a n s ( 0 , 0 , d i ) ^{i-1}_iT=Rot(X,α_{i-1})Trans(a_{i-1},0,0)Rot(Z,θ_{i})Trans(0,0,d_{i}) ii1T=Rot(X,ai1)Trans(ai1,0,0)Rot(Z,ii)Trans(0,0,di) = [ cos ( θ i ) − sin ( θ i ) 0 ai − 1 sin ( θ i ) cos ( α i − 1 ) cos ( θ i ) cos ( α i − 1 ) − sin ( α i − 1 ) − sin ( α i − 1 ) disin ( θ i ) sin ( α i − 1 ) cos ( θ i ) sin ( α i − 1 ) cos ( α i − 1 ) cos ( α i − 1 ) di 0 0 0 1 ] =\left[\begin{matrix} cos(θ_i)&-sin(θ_i)&0&a_{i-1}\\ sin(θ_i)cos(α_{i-1})&cos(θ_i)cos(α_{ i-1})&-sin(α_{i-1})&-sin(α_{i-1})d_i\\ sin(θ_i)sin(α_{i-1})&cos(θ_i)sin(α_ {i-1})&cos(α_{i-1})&cos(α_{i-1})d_i\\ 0&0&0&1\\ \end{matrix}\right]=c o s ( ii)s i n ( ii) c o s ( ai1)s i n ( ii) s i n ( ai1)0s i n ( ii)c o s ( ii) c o s ( ai1)c o s ( ii) s i n ( ai1)00s i n ( ai1)c o s ( ai1)0ai1s i n ( ai1)dic o s ( ai1)di1
Thus, in the end we can get a nnThe n- degree-of-freedom robot starts from the base coordinate system { A 0 A_0 A0} to the end coordinate system { A n A_n An} transformation homogeneous matrix:
n 0 T = 1 0 T 2 1 T . . . nn − 1 T ^0_nT=^0_1T^1_2T...^{n-1}_nTn0T=10T21T...nn1T
getsn 0 T ^0_nTn0Where , the input stringn 0 T = [ n 0 R n 0 p 0 0 0 1 ] ^0_nT=\left[\begin{matrix} & &^0_nR& &^0_np\\ &0&0&0&1\\ \end{matrix}\; right]n0T=[0n0R00n0p1] ’s upper left corner 3×3 matrixn 0 R ^0_nRn0R is the rotation matrix of the end in the base coordinate system, the vectorn 0 p ^0_npn0p is the spatial position coordinate of the end in the base coordinate system.

3 Two types of DH parameter methods

DH parameter method actually has two methods: standard DH (classic DH parameters), improved DH (modified DH parameters)
The above is the improved DH.
The difference between the two is that the coordinate system fixed to the connecting rod is different, and the transformation order is different. The following figure describes the standard DH method.
insert image description here
Compared with the improved DH method described above, the coordinate system of the improved DH method is fixed at the head of each connecting rod, while the coordinate system of the standard DH is fixed at the end of each connecting rod.
At this time, it is also decomposed into four steps, but the transformation sequence is different from the improved DH:
1: The coordinate system is initially located in the coordinate system { A n A_{n} An}, 绕zn z_{n}znaxis rotation θ n + 1 θ_{n+1}in+1, so that xn x_nxnaxis with xn+1 x_{n+1}xn+1The axes are parallel;
2: The coordinate system is along zn z_{n}znAxis translation dn + 1 d_{n+1}dn+1, so that xn x_nxnaxis with xn+1 x_{n+1}xn+1The axes are collinear;
3: The coordinate system revolves around xn x_{n}xn(also xn + 1 x_{n+1}xn+1) rotation α n + 1 α_{n+1}an+1, use zn z_nznaxis with zn + 1 z_{n+1}zn+1The axes are parallel;
4: The coordinate system is along xn x_{n}xn(also xn + 1 x_{n+1}xn+1) transition an + 1 a_{n+1}an+1, which has been transformed to { A n + 1 A_{n+1} An+1}.
Correspondingly, the form of the transformation matrix is ​​also different. Here we list
n + 1 n T = R ot ( X , θ n + 1 ) T rans ( 0 , 0 , dn + 1 ) R ot ( X , α n + 1 ) T rans ( an + 1 , 0 , 0 ) ^n_{n+1}T=Rot(X,θ_{n+1})Trans(0,0,d_{n+1})Rot(X,α_{ n+1})Trans(a_{n+1},0,0)n+1nT=Rot(X,in+1)Trans(0,0,dn+1)Rot(X,an+1)Trans(an+1,0,0 ) = [ cos ( θ n + 1 ) − sin ( θ n + 1 ) cos ( α n + 1 ) sin ( θ n + 1 ) sin ( α n + 1 ) cos ( θ n + 1 ) an + 1 sin ( θ n + 1 ) cos ( θ n + 1 ) cos ( α n + 1 ) − cos ( θ n + 1 ) sin ( α n + 1 ) sin ( θ n + 1 ) an + 1 0 sin ( α n + 1 ) cos ( α n + 1 ) dn + 1 0 0 0 1 ] =\left[\begin{matrix} cos(θ_{n+1})&-sin(θ_{n+1})cos( α_{n+1})&sin(θ_{n+1})sin(α_{n+1})&cos(θ_{n+1})a_{n+1}\\ sin(θ_{n+1} )&cos(θ_{n+1})cos(α_{n+1})&-cos(θ_{n+1})sin(α_{n+1})&sin(θ_{n+1})a_{ n+1}\\ 0&sin(α_{n+1})&cos(α_{n+1})&d_{n+1}\\ 0&0&0&1\\ \end{matrix}\right]=c o s ( in+1)s i n ( in+1)00s i n ( in+1) c o s ( an+1)c o s ( in+1) c o s ( an+1)s i n ( an+1)0s i n ( in+1) s i n ( an+1)c o s ( in+1) s i n ( an+1)c o s ( an+1)0c o s ( in+1)an+1s i n ( in+1)an+1dn+11
No matter which method is used, the principle is the same. In fact, as long as you understand one of them, the other is just a different form. Below we still use the improved DH method.

4 Determination of DH coordinate system and establishment of DH table

From the above principle process, in the DH parameter method, after the coordinate system is selected, once the four parameters of every two adjacent connecting rods are determined: α i − 1 α_{i-1}ai1 a i − 1 a_{i-1} ai1 θ i θ_{i} ii d i d_{i} di, you can directly write its transformation homogeneous matrix. Therefore, an important step in the DH parameter method is to establish these four parameters of each connecting rod, which is called the DH parameter table. The establishment of the DH parameter table can be brought into the above formula to complete the robot. forward solution.

4.1 Selection of DH coordinate system

4.1.1 DH coordinate system

For each connecting rod, a coordinate system fixed on it is established, the base can also be regarded as a connecting rod, and the end of the robot (hand) is also considered to be connected to a connecting rod (only the length is zero), so A robot with n degrees of freedom has n+1 connecting rods, and accordingly, there are n+1 coordinate systems.
Here is a reminder: the coordinate system is fixed on the connecting rod, not on the joint. I used to read information and blogs to say what I said, and I was very confused. It was only later that I figured out that the coordinate system is fixed on the joint. On the rod, if you think that the coordinate system is fixed on the joint, it will be very frustrating when analyzing the problem.

4.1.2 Principles of Coordinate System Establishment

The following is subject to the improved DH method.
1 Base link coordinate system: defined as coordinate system 0 { A 0 A_0 A0}, which is also the base coordinate system of the robot. The position and direction of the 0th coordinate system on the base are optional, but generally z 0 z_0z0Axis and joint 1 axis z 1 z_1z1coincide or intersect.
2 The principles for determining the coordinate system of each connecting rod except the base are as follows:

Z axis determined

The Z axis must pass through the rotation axis (or sliding axis) of the joint at the head end of the connecting rod;

X-axis OK

The position of the X-axis is determined according to the relationship between the Z-axis of this coordinate system and the Z-axis of the next connecting rod fixed coordinate system. The direction of the X-axis is optional, but generally points to the next joint. Let’s take a 4-axis robot in the figure below as an example. illustrate.
Situation 1: The Z axes of the two joints are neither parallel nor intersecting, as shown in the case of connecting rod 3 in the figure below.
Take the common vertical line of the two Z axes as the X axis, and the direction generally points to the next joint;
Situation 2: The Z axes of the two joints are parallel, as shown in the figure below. In the case of rod 2
, there are countless common perpendicular lines between the two Z axes. You can choose a common perpendicular line that intersects the Z axis common perpendicular line of the previous joint, and the direction generally points to the next joint. Situation 3: Two joint Z
axes Intersect, as shown in the case of connecting rod 1 as shown in the figure below.
Take the cross product (vector product) direction of the two Z axes as the X axis, that is, take the line perpendicular to the two Z axes as the X axis. At this time, the direction of the X axis can be selected from the above figure
insert image description here
. The coordinate system of connecting rod 1 may surprise many people. Why the origin has moved to the end joint of the connecting rod, so when understanding the above-mentioned "the coordinate system of the connecting rod is established at the joint at the head end of the connecting rod", pay attention to the fact that the coordinate origin It is not necessarily at the point at the center of the joint at the head end of the connecting rod . This is something that I figured out after being confused for a while. Maybe the above picture is a bit unclear. It is still the 4-axis robot in the above picture. Let us bend the connecting rod 1. Then it may be easier to understand why the origin ran away.
insert image description here

Y axis is determined

After the X-axis and Z-axis are determined, determine the Y-axis according to the right-hand rule.

4.2 DH table establishment

After the coordinate system is determined, the DH table can be established, that is, to determine the above four parameters, or take the above four-axis robot as an example, we build the DH table, because it is for an example of a hypothetical robot, so some fixed values ​​are not here Give specific numbers, but in a descriptive way.

i i i α i − 1 α_{i-1}ai1 a i − 1 a_{i-1} ai1 θ i θ_i ii d i d_i di
1 0 0 θ 1 θ_1i1 Vertical height from base to joint 2 (fixed value)
2 90 0 θ 2 θ_2i2 0
3 0 Length of connecting rod 2 (fixed value) θ 3 θ_3i3 0
4 -90 The distance between joint 3 and joint 4 along the Z4 axis radial direction (fixed value) θ 4 θ_4i4 Distance between joint 3 and joint 4 along the Z4 axis (fixed value)

When building this table, don’t memorize the meaning of each parameter. It is recommended to combine the four transformation steps described above to easily determine each parameter. In the table θ 1 θ_1i1~ θ 4 θ_4i4are the rotation angles of each connecting rod relative to the previous connecting rod.
Another point to note: the DH table is established after the coordinate system of each connecting rod is determined. For the same robot, the DH table is different if the coordinate system is established differently .

references

https://www.docin.com/p-1249134279.html

Guess you like

Origin blog.csdn.net/hangl_ciom/article/details/102752733