 # Introduction to Robotics Lecture II Alfred Bruckstein Yaniv Altshuler.

## Presentation on theme: "Introduction to Robotics Lecture II Alfred Bruckstein Yaniv Altshuler."— Presentation transcript:

Introduction to Robotics Lecture II Alfred Bruckstein Yaniv Altshuler

Denavit-Hartenberg Specialized description of articulated figures Each joint has only one degree of freedom rotate around its z-axis translate along its z-axis

Denavit-Hartenberg One degree of freedom : very compact notation Only four parameters to describe a relation between two links : link length link twist link offset link rotation

Denavit-Hartenberg Link length a i The perpendicular distance between the axes of joint i and joint i+1

Link twist α i The angle between the axes of joint i and joint i+1 Angle around x i -axis Denavit-Hartenberg

Link offset d i The distance between the origins of the coordinate frames attached to joint i and joint i+1 Measured along the axis of joint i Denavit-Hartenberg

Link rotation (joint angle) φ i The angle between the link lenghts α i-1 and α i Angle around z i -axis Denavit-Hartenberg

1. Compute the link vector a i and the link length 2. Attach coordinate frames to the joint axes 3. Compute the link twist α i How to compute the parameters to describe an articulated figure :

Denavit-Hartenberg 4. Compute the link offset d i 5. Compute the joint angle φ i 6. Compute the transformation (i-1) T i which transforms entities from link i to link i-1

Denavit-Hartenberg 1. Compute the link vector a i and the link length 2. Attach coordinate frames to the joint axes 3. Compute the link twist α i 4. Compute the link offset d i 5. Compute the joint angle φ i 6. Compute the transformation (i-1) T i which transforms entities from link i to link i-1 Let’s do it step by step

Denavit-Hartenberg The link length a i is the shortest distance between the joint axes joint i and joint i+1. Let the joint axes be given by the expression : Where p i is a point on axis of joint i and u i is one of its direction vectors (analogous for joint i+1 ).

Denavit-Hartenberg

There are three methods to compute the link vector a i and the link length

Denavit-Hartenberg The shortest distance a i is the length of the vector connecting the two axes, and perpendicular to both of them. Which can be expressed : Method 1 : The Pseudo-naive approach

Denavit-Hartenberg Let’s find the points o i and o ai where this distance exists.

Denavit-Hartenberg We can go some distance s from p i along axis i, and then the distance a i along the unit vector and finally some distance t along axis i+1 to arrive at point p i+1.

Denavit-Hartenberg Multiplying respectively by u i and u i+1, we obtain the two following equations:

Denavit-Hartenberg Solution :

Denavit-Hartenberg Finally, using and we obtain :

Denavit-Hartenberg We can go some distance s from point p i along the axis i, and then go some distance k along u i x u i+1. Finally go some distance t along the axis i+1 to arrive at point p i+1. The vector u i x u i+1 gives the perpendicular vector to both axes. Let’s find out where it is located on the joint axes. Method 2 : The Geometric approach

Denavit-Hartenberg We obtain the equation : There are three unknowns.

Denavit-Hartenberg Let’s first eliminate the unknown k from the equation : by multiplying by u i :

Denavit-Hartenberg by multiplying by u i+1 : Let’s first eliminate the unknown k from the equation :

Denavit-Hartenberg by multiplying by u i x u i+1 : Now we shall eliminate the s and t from the equation :

Denavit-Hartenberg We have obtained a system of three equations in the unknowns s, t, k :

Denavit-Hartenberg From, it can be seen that the shortest distance between joint i and joint i+1 is given by the vector : Where

Denavit-Hartenberg From and, we can compute s and t :

Denavit-Hartenberg Finally, using and we obtain :

Denavit-Hartenberg The distance between two arbitrary points located on the joint axes joint i and joint i+1 is : Method 3 : The Analytic approach

Denavit-Hartenberg The link length of link i, a i, is the minimum distance between the joint axes :

Denavit-Hartenberg A necessary condition is :

Denavit-Hartenberg Which is equivalent to their numerators being equal to 0 :

Denavit-Hartenberg Rewriting this system yields :

Denavit-Hartenberg Whose solution are :

Denavit-Hartenberg Finally, using and we obtain :

Denavit-Hartenberg o i and o ai are the closest points on the axes of joint i and joint i+1. We deduce that the link vector a i and the link length a i :

Denavit-Hartenberg The link vector a i :

Denavit-Hartenberg Calculating the scalar products and, both equal to 0, proves that the vector a i is perpendicular to both axes of joint i and joint i+1

Denavit-Hartenberg Three methods How do we actually compute a i and ||ai|| 2 ?

Denavit-Hartenberg The link vector a i is perpendicular to both of the axes of joint i and joint i+1. The unit vector : is parallel to the link vector a i.

Denavit-Hartenberg Given two points p i and p i+1 on the axes of joint i and joint i+1, the link length can be computed as : And the link vector :

Denavit-Hartenberg Special cases : The joint axes intersect The shortest distance a i is equal to zero The link vector is the null vector

Denavit-Hartenberg The joint axes are parallel There is no unique shortest distance o i can be chosen arbitrarily, so we should chose values that offset the most of Denavit-Hartenberg parameters

Denavit-Hartenberg The first joint There is no link preceding it We use a base link : link 0 Its link frame should coincide with the link frame of link 1 Most of the Denavit-Hartenberg parameters will be equal to zero

Denavit-Hartenberg The last joint There is no link succeding it We use arbitrary values so that most of Denavit-Hartenberg parameters are equal to zero

Denavit-Hartenberg 1. Compute the link vector a i and the link lenght 2. Attach coordinate frames to the joint axes 3. Compute the link twist α i 4. Compute the link offset d i 5. Compute the joint angle φ i 6. Compute the transformation (i-1) T i which transforms entities from link i to link i-1

Denavit-Hartenberg Identify the joint axes Identify the common perpendiculars of successive joint axes Attach coordinate frames to each joint axes

Denavit-Hartenberg Identifying the joint axes

Denavit-Hartenberg Remember, is the point where the shortest distance to joint i+1 exists Identifying the common perpendiculars

Denavit-Hartenberg the origin Attaching the frames

Denavit-Hartenberg 1. Compute the link vector a i and the link lenght 2. Attach coordinate frames to the joint axes 3. Compute the link twist α i 4. Compute the link offset d i 5. Compute the joint angle φ i 6. Compute the transformation (i-1) T i which transforms entities from link i to link i-1

Denavit-Hartenberg Remember

Denavit-Hartenberg Let’s define the function

Denavit-Hartenberg We then have :

Denavit-Hartenberg 1. Compute the link vector a i and the link lenght 2. Attach coordinate frames to the joint axes 3. Compute the link twist α i 4. Compute the link offset d i 5. Compute the joint angle φ i 6. Compute the transformation (i-1) T i which transforms entities from link i to link i-1

Denavit-Hartenberg

1. Compute the link vector a i and the link lenght 2. Attach coordinate frames to the joint axes 3. Compute the link twist α i 4. Compute the link offset d i 5. Compute the joint angle φ i 6. Compute the transformation (i-1) T i which transforms entities from link i to link i-1

Denavit-Hartenberg

1. Compute the link vector a i and the link lenght 2. Attach coordinate frames to the joint axes 3. Compute the link twist α i 4. Compute the link offset d i 5. Compute the joint angle φ i 6. Compute the transformation (i-1) T i which transforms entities from link i to link i-1

Denavit-Hartenberg This transformation is done in several steps : Rotate the link twist angle α i-1 around the axis x i Translate the link length a i-1 along the axis x i Translate the link offset d i along the axis z i Rotate the joint angle φ i around the axis z i

Denavit-Hartenberg

Multiplying the matrices :

Denavit-Hartenberg By specifying the transformation for all joints we can specify a transformation form link N to the base link 0 : Let’s denote the joint parameters of joint i. We obtain :

End effector End effector - the last coordinate system of figure Located in joint N. But usually, we want to specify it in base coordinates.

End effector A transformation from the link N to the base :

End effector We can also express it as three rotations (around each of the coordinate axes) followed by a translation How can we establish a relation with the other expression ?

End effector Location The origin of a coordinate frame relative to some base coordinate frame is specified by the translation :

End effector Orientation Any 3D orientation relative to some base coordinate frame can be specified by : three rotations, one around each of the coordinate axes.

End effector Orientation These rotations are named roll, pitch, yaw We do them in this order : around x, y, z.

End effector Orientation The yaw transformation can be expressed :

End effector Orientation The pitch transformation can be expressed :

End effector Orientation The roll transformation can be expressed :

End effector Orientation The roll, pitch and yaw transformation is then expressed :

End effector Finally, the transformation from a coordinate frame to the base frame is expressed :

End effector Remember that can be expressed as a 4x4 matrix with elements m ij - functions of joint parameters θ 1,...,θ N. Let’s omit them for readability :

End effector As the two transformations and do the same thing :

End effector We obtain directly the translation vector :

End effector We can obtain the yaw angle : Because : arctan is π-periodic. Let’s use our function arctan 2 to get the right angle.

End effector Knowing the yaw angle, we can obtain the pitch angle : Because : Again, let’s use our function arctan 2 :

End effector We can obtain the roll angle : Because : Again, let’s use our function arctan 2 :

End effector Let’s define the state vector

End effector As previously shown, The state vector is composed of elements of this matrix. It’s also a function of joint parameters :