程序代写代做代考 matlab chain scheme AI arm Rigid Body Rotations and Transformations

Rigid Body Rotations and Transformations

Rigid Body Rotations and Transformations

Rigid Body Transformation

Any kind of transformation that preserves the size, and shape of a body. Ex: rotation and translation.

Some properties:

1. Lengths are preserved
‖𝑔(𝑝)−𝑔(𝑞)‖=‖𝑝−𝑞‖, where g() in this case is a rotation. (See image.)

Slide by Prof. Yiannis Aloimonos

Note that the transformed vector is represented as g*
and not just g. This is because the points are transformed by g. Vectors need not always follow the same transformation.
2

Rigid Body Transformation

Any kind of transformation that preserves the size, and shape of a body. Ex: rotation and translation.

Some properties:

1. Lengths are preserved
‖𝑔(𝑝)−𝑔(𝑞)‖=‖𝑝−𝑞‖, where g() in this case is a rotation. (See image.)

Slide by Prof. Yiannis Aloimonos

Note that the transformed vector is represented as g*
and not just g. This is because the points are transformed by g. Vectors need not always follow the same transformation.
3

Rigid Body Transformation

Slide by Prof. Yiannis Aloimonos

Some properties:
2. Cross products are preserved
𝑔∗(𝑣)×𝑔∗(𝑤)=𝑔∗(𝑣×𝑤)

What does this mean?
Two vectors on a plane (𝑣 and 𝑤 in image)
will continue to be on the same plane after transformation. Shape is preserved.
The “area” formed by the two vectors remains the same. Size is preserved.

Area formed by vectors a and b.

4

Non-Rigid Transformations

Here, the size and shape of the object is not preserved.
Another non-physical example: Dilation of an image.

Example:

Rigid Body Transformation Properties
Rigid body transformations (or maps) that satisfy these important properties
The map preserves lengths
Cross products are preserved by the induced map
Transformations are generally used to describe relationship (position and orientation) between “reference frames” attached to different rigid bodies

Slide by Prof. Yiannis Aloimonos

6

Describing Rigid Body Pose
Once a coordinate “frame” is chosen, a rigid body is described in space by its position and orientation with respect to that reference frame.
Slide by Prof. Yiannis Aloimonos

7

Describing Rigid Body Pose
For 2-D scenarios, 3 values are needed to describe the position and orientation of a body.
x, and y coordinates for position.
ψ for orientation.
For 3-D scenarios, 6 values are needed.
x, y, and z coordinates for position.
Φ, θ and ψ for orientation

Defining Points, Vectors and Frames
Consider a single point and a single free vector in the plane or in three dimensional space.
The free vector has only length (magnitude) and direction (angle). It does not intrinsically have a location.
In order to compute anything about these two physical objects we need to create numbers that uniquely define them.
The first step in accomplishing this is to create a world (or inertial) coordinate system or a world frame.
Define the origin.
Define orthogonal coordinate axes.

Point (x, y) and free vector

p

9

Representation in different frames
Consider 2 coordinate systems (see figure)
Let 0 denote the world frame.
Let 1 denote another arbitrary frame.
We can represent point p and vector in both frame 0 and frame 1.
In frame 0 they are written as p0 and .
In frame 1 they are written as p1 and
Without a world coordinate system, we cannot assign numbers to point p or the free vector .

Representing point and vector in different frames.

p0 = [8 4]T
p1 = (2)1/2[-6 2]T

During lecture: Note that the origin of frame 1 is also a point in the world frame.
Note the different coordinates for the same point and vector in different frames.
10

Representation in different frames
Note that p=p0=p1 and
In the sense that they are the same point/vector written in different coordinates.
Also note that frame 1’s origin can be represented in frame 0 coordinates.
Notation: Superscripts denote which frames the point or vector coordinates are with respect to.
Vectors are represented with arrow on top.

p0 = [8 4]T
p1 = (2)1/2[-6 2]T

MATH SYMBOLS AND BULLETS DO NOT SHOW UP WELL. CAN YOU FIX THAT? WHAT DO THE SUBSCRIPTS AND SUPERSCRIPTS ON THESE MATH SYMBOLS REFER TO?
11

Where is this used?

We need frames and point and vector representations on these frames to:
Denote position and orientation of points on a robot’s body wrt a reference (say center of mass).
Without frames and transformations, robots with complex dynamics cannot be handled.
Frame assignment in PR2 robot

Representing Rotations
We show a planar rotation of θ of frame 1 in the counter-clockwise direction wrt frame 0.
We consider frame 0 as the world frame.
The transformation from 0 to 1 can be defined by the matrix

Make what is in 0 with respect to 1: R10

YOU MENTION SYMBOLS 0 AND 1> ARE THEY SHOWN IN THE SUBSCRIPTS IN THE FIGURE. FIX THE BULLETS IN THE FIGURE.

13

Important Note on Notations

The superscript of R, (0 in this case) denotes the reference frame and the subscript (1) denotes the rotated frame.
is read as “Rotation of frame 1 with respect to frame 0.”
The words frame and coordinate system can be used interchangeably.
The words world frame and reference frame can be used interchangeably.
Exercise for students: Can you derive the above matrix?

Rotations Cont’d
Undoing the previous counter-clock wise rotation in 2-D:

You can also understand the rotation matrix in terms of the dot (inner) products of the unit vectors in the two frames and the image on the previous slide.
Let denote the unit vectors in frame 0 (reference frame) and denote the unit vectors in the frame1 (rotated frame). Then

NOTE: The 0 and 1 used in subscript is because they represent the orthogonal axes of frames 0 and 1 itself. If a free vector needs to be represented in the frames, we would use superscripts. This has been established in previous slides. This is the convention followed in textbooks.
15

Rotating a point (Example)
What use is this?
Suppose you have a point p = [x y] T in a
frame.
What are the coordinates of p in the same frame after we rotate p by ϑ?
New coordinates [x’ y’] T = R * [x y]T
Just pre-multiply by the rotation matrix R.
NOTE: New coordinates are also wrt the same frame.

Since all the coordinates are with respect to same frame, I have used ‘ in the superscript. This is followed in the textbooks.
16

Numerical Example
Suppose p=[3 1]T and we rotate p by θ = 30̊
Here is MATLAB code to compute the coordinates of the rotated p in the frame(see previous slide).

> clear
> theta=30;
> R=[cosd(theta) -sind(theta); sind(theta) cosd(theta)]; % Notice that sind, cosd use degrees
> p=[3;1]; % sin, cos have radians as input
> p’=R*p
p’ =

2.0981
2.3660 Therefore point p’s coordinates after rotation are approximately [2.1 2.4]T in the frame.
17

17

Other uses of Rotation Matrices
There are 3 different uses of a rotation matrix
To rotate a frame wrt another frame (already seen).
To give the coordinates of a point in the rotated frame in terms of the coordinates of the original frame.
To rotate a vector.

Rotating point and vector example
Let us consider a point p and a vector V.
p1 -> p coordinates in frame 1.
V0 -> representation of V in frame 0.
Notice that p and V are different but both are written as say [1 0]T in their respective frames.
Let us express p1 and V0 in frame 0 and frame 1 respectively.
19
It is important to be aware of the frame in which the point or vector is expressed.

19

Calculations in the Example
The rotation matrix is
R01 =

Given: p1 = V0 = [1 0]T

We can obtain p0 using (This also applies to vectors)

Thus, the point p1 in frame 0 coordinates is
p0 = [cos(θ) +sin(θ)]T
And the vector V0 in frame 1 is given by
V1 =

Note: The Rotation matrix used in the second case is R10.
20

20

Concatenated Rotations
What if we concatenate a rotation by ϑ with a further rotation by ψ?
This rotation can be represented by 3 frames and 3 rotation matrices.

There is R01, a rotation of frame 1 wrt frame 0 by angle ϑ.
There is R12 , a rotation of frame 2 wrt frame 1 by angle ψ.
There is R02 , a rotation by (ϑ+ ψ) of frame 2 wrt Frame 0.
R02 = R01 * R12

Superscripts denote reference frames and subscript denote rotated frame. See slide 13.
21

21

Rotations (continued)
Does the order of multiplication matter?
Note that determinant of a rotation matrix and that it is only plus one if you restrict yourself to right-handed coordinate systems.
In 2-D, the product of any two rotation matrices is also a rotation matrix;
Every rotation matrix has an inverse that is also a rotation matrix; and is the 2×2 identity matrix for this set of matrices.
This proves that the set of rotation matrices with matrix multiplication is a mathematical group, known as the special orthogonal group in two dimensions denoted by SO(2) (see next slide).

22

The subscript and superscript follow the same conventions as before.

22

Special Orthogonal group
The group of n x n orthogonal matrices, where the group operation is given by matrix multiplication is represented by O(n).
An important subgroup of O(n) is the special orthogonal group whose constituent matrices have determinant 1. This group is represented by SO(n).
The rotation matrices in 2D (n = 2) and 3D (n = 3) can be proven to be form SO(2) and SO(3) groups respectively.

Rotations in 3D
The simplest case is when the rotation is about one of the coordinate axes. If a frame 1 is rotated wrt frame 0, there are 3 possibilities.
Rotation about the x-axis of frame 0:
clockwise
Rotation about the y-axis of frame 0:
counter-clockwise
Rotation about the z-axis of frame 0 :
clockwise
24

Both notations are used in the textbook (Spong).
24

Rotations in 3D
By convention, the right-hand rule defines the positive direction of rotation:
Point your thumb in the axis direction. The way your fingers curl is the counter-clockwise direction.
Notation Rx,θ Ry,θ Rz,θ are used to represent rotation about a specific axis in 3D. For 2D, rotation is always about Z axis.
You can easily verify that these simple rotations do not commute:
E.g., simple matrix multiplication will show you that
Or, you could take a physical object and do the rotations.

25

25

General Rotations in 3D
As stated in slide 1-3, rotation being a rigid transformation, preserves the origin, the angles between axes, and the axis lengths.
Let us denote the orthogonal unit vectors for x, y, and z axes of two frames (0 and 1) by . (Similar to slide 14.)

Then the rotation matrix that denotes rotation of frame 1 wrt frame 0 is given by:
26

26

Properties for 3D rotation matrices
Based on the expression for on the previous slide, it is easy to verify that
(R01)-1 = (R01)T
The columns (and rows) of R01 are orthogonal and have unit length.
I.e. Let denote the ith column of R01.

Then

det(R01) = 1

The definitions in slides 18 and 19 can be extended to 3D.
The set of all 3D rotation matrices form a group called SO(3).

27

27

Rotation about current frame
Given a point, wrt a frame 2, the same point written in terms of its components in Frame 0 is

(Where frame 1 is an intermediate frame.)
The rotations can be visualized as multiple subsequent rotations:
Initially frames 0, 1, 2 coincide.
First rotate frame 1 wrt frame 0 about axis z­0 .
Second rotate frame 2 wrt frame 1 about axis z­1.
This is known as rotation wrt to current frame. The resultant rotation matrix we get is:

28

Suppose initially that all three of the coordinate frames coincide. We first rotate the frame o2 x2 y2 z2 relative to o0 x0 y0 z0 according to the transformation R01. Then, with the frames
o1x1y1z1 and o2x2y2z2 coincident, we rotate o2x2y2z2 relative to o1x1y1z1 according to the transformation R12. In each case we call the frame relative to which the rotation occurs the current frame.

28

Fixed Frame
Sometimes it is desired to perform a sequence of rotations, each about a given “fixed” frame, rather than about successive current frames (like in previous slide).
Example: We may wish to perform a rotation about axis x0 followed by a rotation about y0 and not y1.
In this case, we will refer to o­0 x0 y0 z­0 as the fixed frame.

Rotation wrt Fixed Frame
If we wish to rotate a frame wrt a fixed frame, then the equation given in slide 27 for R02 is not valid.
The rotation between frame 2 wrt frame 0 is given by

This is exactly the opposite when compared to the previous equation.
Note that the rotations are not preformed in the reverse order. Just about a fixed frame.
The above expression’s derivation can be found in Spong et. al. page 44.
30

This concept is used in one of the assignment questions.
30

Other ways to represent rotations
Any rotation matrix in 3-D is completely specified by 3 parameters.
You can prove this using the properties of rotation matrices.
Each column vector has unit length.
The column vectors are orthogonal.
There are many such parameterizations.
We will go through RPY, Euler angles, and quaternions.
Such parameters are useful in different circumstances.
Euler angles provide an intuitive sense of the orientation of a body.
Quaternions are extensively used in computer graphics.
31

31

Roll, Pitch, and Yaw Angles
Given a Frame with x, y, z axes oriented along the body as shown in the next slide.
Rotate about the x-axis by an angle ψ.
This is a yaw by definition.
Then rotate about the original y-axis by an angle ϑ.
This is a pitch by definition.
Finally, rotate about the original z-axis by an angle φ.
This is a roll by definition.
Finally, NOTE the order!
32

Roll, Pitch, and Yaw Angles (cont.)
These are very commonly used in describing aircraft and ship motion.

33

Image from Wikipedia

Euler Angles
Given an arbitrary Frame 0 with x, y, z axes.
Rotate about the z-axis by an angle ϕ.
Next rotate about the current y-axis by the angle ϑ.
Finally, rotate about the current z-axis by an angle ψ.
The resulting rotation matrix is then

It is well known that every general rotation matrix can be constructed this way but a proof requires finding the three angles given only a rotation matrix, R.
34

34

Euler Angles

Diagram representing rotations described in the previous slide.

Computing a Rotation Matrix from Euler Angles
% Script to compute rotation matrices from Euler angles

theta = 25; % All angles in degrees
phi = 40;
psi = 15;
Rzphi = [cosd(phi) -sind(phi) 0; sind(phi) cosd(phi) 0; 0 0 1];
Rytheta = [cosd(theta) 0 sind(theta); 0 1 0; -sind(theta) 0 cosd(theta)];
Rzpsi = [cosd(psi) -sind(psi) 0; sind(psi) cosd(psi) 0; 0 0 1];
R = Rzphi*Rytheta*Rzpsi % Equation in slide 36.

R =
0.5042 -0.8006 0.3237
0.7610 0.5892 0.2717
-0.4082 0.1094 0.9063
36

36

Euler Angles…Good and Bad
Euler angles can generate any possible orientation in 3D (Good!)
Euler angles are used in a lot of applications…they are intuitive (Good!)
They are compact…requiring only 3 numbers (Good!)
Ambiguous: Different triples can be same orientation (Bad!) (See Spong pg.48 for derivation)
They do not interpolate in a obvious way (Bad!)
Conversion to/from a matrix requires several trignometric operations (Bad!)

WHAT IS “Gimbal Lock”? CAN YOU EXPLAIN IT INTUITIVELY, BEFORE MORE DETAILS ON THE NEXT SLIDE!

I have attached a video that explains Gimbal lock problem for navigation in slide 38.

37

Degree of Freedom
DOF is the number of ways a body is allowed to move freely in the space that it operates.
A single rigid body in 3 dimensions has 6 degrees of freedom.
You need three coordinates, (x, y, z), to give the position of the center of mass
You need three angles (ϑ, φ, ψ) to give the orientation.
If the attachment was a ball joint, allowing two rotation angles, but not axial rotation—E.g., a human hip joint, then the number of degrees of freedom would be 8.
38

38

Quaternions
Quaternions were invented by Hamilton as a generalization of complex numbers.
They turn out to be very useful in describing satellite rotations.
The Apollo 13 problem: Issues in navigation measurements.
Problem solved in navigation with latest IMUs.
The underlying idea is to define three independent “square roots for -1” that satisfy the following equations.

39

WHAT IS UNIQUE ABOUT “Satellite rotations” THAT MAKES THEM VERY USEFUL?

Can view the Apollo 13 video in class or students can view it at home.

39

More Quaternions
Define the quaternion Q by

Write this in shorthand as four-tuple
Q = < q0 q1 q2 q3 >
It is useful to think of this as the scalar q0 and the 3-vector
40

Concept is used in assignment.
40

Quaternions to Rotation Matrix

The rotation matrix corresponding to the unit quaternion q = is

41

Rotation Matrix to Quaternion
Program for matrix to quaternion
conversion is not hard
It involves a few ‘if’ statements (check zeros for q0),
a square root,
three divisions,
and some other operations.
tr(M) is the trace
sum of the diagonal elements

42

Representing Rotations as Quaternions
A quaternion can represent a rotation by angle θ around a unit vector a:

Q =

OR

Q =

Note that the unit vector can be represented with different symbols in different texts.
If a is unit length, then Q will be also have unit length. (Can you prove it.)

43

Rotation using Quaternions
Let Q = cos(q/2) + sin(q/2) u be a unit quaternion: |Q| = |u| = 1

Let point p = (x,y,z) = x i + y j + z k

Then the product Q p Q-1 rotates the point p about axis u by angle q

Inverse of a unit quaternion is its conjugate

(negate the imaginary part)

Q-1 = (cos(q/2) + sin(q/2) u)-1
= cos(-q/2) + sin(-q/2) u
= cos(q/2) – sin(q/2) u

Composition of rotations Q12 = Q1 Q2 Q2 Q1
u

q

p
Q p Q-1

Q =

44

Properties of Quaternions
A unit quaternion is a quaternion that has the property that

Given two quaternions, P and Q, one can multiply them using the rules for products of the i, j, k (see slide earlier).
This can get very tedious. One can instead write
If P = and Q =
Then P*Q = (p0q0 – p.q + p­0q + q0p + p x q)
The identity quaternion for unit quaternions is then just
45

45

More Properties
The conjugate, Q*, of the quaternion, Q, is given by

Multiplying gives
Thus, Q* is the inverse of Q.
Given a rotation matrix R,

The corresponding unit quaternion is

46

46

Advantages of Quaternions
Quaternions have two big advantages over the other Euler angles we have given.
They are unique.
They have no singularities.
Easy to convert to and from angle- axis representation.

Let be the vector from the origin of Frame 0 to the origin of Frame 1. Let p be a point whose coordinates in Frame 0 are (x, y, z). Let Q be the quaternion that specifies the orientation of Frame 1 wrt Frame 0.

Then gives the coordinates of p wrt Frame 0. As before, is the quaternion representation of p

47

47

Diagram

Rotation Summary
The most common calculation is to determine the coordinates of a point in some frame with respect to the world frame (Frame 0).
That is why the Spong et. al (pg. 42) defines the rotation matrix so that

For example, if we locate the wrist in a coordinate frame on the forearm and if we want to know where the wrist is wrt a world frame, we need the rotation matrix above.
We will now combine rotations with translations and then see how they can be used in Robot Kinematics problems.
49

49

Rigid Motions
A rigid motion is a pure rotation together with a pure translation.
Defn. 2.1: A rigid motion is an ordered pair (d,R) where

R is the rotation matrix that represents rotation θ, d represents the translation.
The rigid motions, together with the concatenation procedure defined on the next slide, form a group known as the Special Euclidean Group SE(3).

SE(3) group is defined as :

Group Multiplication and inverse are given by:
50

50

Concatenating Rigid Motions
Suppose the point p is represented in frame 1 with components [x1 y1].
Then p wrt frame 0 can be written as:

Now suppose point p is represented wrt a frame 2.
Obviously,
Then, concatenating
51
The superscripts and subscripts mean same as before.
d01 is read as translation of frame 1 wrt frame 0.

51

Concatenating Rigid Motions
We can rewrite the concatenation formula of the previous slide as

Define , H is called a homogeneous transformation.
It is easy to show that .
NOTE: This inverse is not same as HT

52

Note that 0 denotes a row of three zeros. There is an error in Eqn. 2.62 in Spong.

52

Concatenating Rigid Motions
If we redefine a point p by always adding a one as the last component of the vector, then

And
With these conventions, H acquires the same concatenation properties as R except for the different inverses.
I.e., If H is performed relative to the current frame, then

But, if H is performed relative to the fixed frame (see slide 29), then
53

53

Using concepts learnt so far
We have covered rotation in detail: rotation matrices, RPY, Euler angles and Quaternions.
All these concepts are useful in different applications:
Rotation Matrices: Perception (computer vision)
Euler angles: Flight simulators, mobile apps etc.
Quaternions: Predominantly used in robot orientation calculations, computer graphics, navigation.
We have also combined rotations with translations to form rigid motions and the transformation matrix to represent them.
Next we will see how transformation matrices can be used in solving Kinematics problems of high dimensions (when a manipulator has high no. of DOFs).

Robot Manipulators
Joints, how to assign frames, DH parameters

Joints in Robot Manipulators

Symbolic representations of robot joints

Linear vs. Rotational link motion

56

Robot Manipulators

Structure of a spherical wrist

Common Kinematic Arrangements
RRR Manipulator

Click on left image for video link
58

Common Kinematic Arrangements
RRP Manipulator

Stanford Arm

Click on left image for video link
59

Common Kinematic Arrangements
Cartesian Manipulator (PPP)

Epson Cartesian Robot

Click on left image for video link
60

Kinematics
Kinematics is the study of “the motions of bodies and mechanisms without inquiring into the forces or other causes of those motions.”*
You can divide kinematics into two steps.
Step 1: Describe the geometry of the system
Step 2: Compute the velocities and accelerations of the bodies that form the system.
61
* Den Hartog, op. cit. p.1

Kinematics Cont’d
The geometry consists of two parts.
Part 1: The constant geometry of the component bodies.
Part 2: The angles and lengths that can vary with time
The fundamental concepts that follow will help us move toward forward and inverse kinematics.
Forward Kinematics – Find end effector pose when joint positions and orientations are known.
Inverse Kinematics – Given an end effector pose, find the joint positions and orientations that resulted in that pose.
We will learn the fundamentals used in FK in the following slides.

Example
The figure at the right is a kinematic diagram of a three joint, four link robotic arm.
The three red objects are the geometric features that are variable.
are the constant lengths of the links.
The last frame is an end effector that is rigidly attached to link 2.
63

The shading indicates the world frame.
The ground and the end effector are counted as links.
Link lengths can be represented using l, a or d in different texts.
Figure 1: Example of a kinematic diagram

63

Kinematic Chains

64
Figure 2: open chain in 2D
Figure 3: Closed chain in 2D
We will only consider open chains in our discussions.

I DO NOT SEE ANY VIDEOS?

I have embedded links to youtube videos in the images. Click on the image to play the video.
64

Defining frames at joints
We need to define a world frame plus at least one frame for each link of the chain (or a manipulator).
By convention, the world frame is frame 0.
The origin of the world frame is at joint 1.
The link attached to the moving side of joint 1 is link 1; and the unmoving frame attached to joint 1 is frame 0—the world frame.

65

65

Defining frames at joints
In general, the ith joint connects link i-1 with link i.
Frame i-1 has its origin at joint i.
Joint i will have a single variable associated with it*.
That variable will be (See Figure):

* We assume all joints have one degree of freedom

Example
The figure at the right illustrates the defining convention.
Notice that the frame labels start at 0 but the joints start at 1 and joint i attaches link i-1 to link i.
The frame orientation scheme will be described shortly.

67
Figure 1: Example of a kinematic diagram

67

Homogeneous Transformations
Establish a world frame, a frame at each joint, and the variable at each joint. (Demonstrated in previous slide)
Now the manipulator’s geometry can be expressed by multiplying homogeneous transformation matrices.

Where each T is a homogeneous transformation matrix.

We wish to denote all joint’s position and orientation wrt the world frame.

68

Notation
In Spong et. al (pg. 67), the authors introduce three new collections of matrices.
Definition: “The homogeneous transformation matrix that expresses the position and orientation of oj xj yj zj (AKA Frame j) wrt oi xi yi zi (AKA Frame i) is called a transformation matrix and denoted by Tij .
Then
69

69

Notation
Where
(similar to previous slide)

and

Which denotes the position of frame i’s origin (o) and the frame’s orientation R wrt frame i-1.

NOTE: For the sake of convenience, Aii-1 is written as Ai.

Refer to Spong Chapter 3 for detailed definitions.
70

Example
Consider the point
[1 1 1]T in frame 1 (origin at joint 2) coordinates when ϑ2=25o and ϑ1=0o
In world coordinates, it is (augmented by a 1 in the last (irrelevant) row.
The coordinate of point [1 1 1]T in frame 0 is given by:
71

EXAMPLE FOR WHAT? CAN YOU ADD MORE DETAILS?

Ans: This example illustrated how to represent any random point on the manipulator with respect to frame 0 (ground frame). This is not a new example. It is similar to the examples
we saw in rotation matrices and quaternions.

71

The DH Convention
The four parameters of Ai are then
Link length = ai
Link twist = αi
Link offset = di
Joint angle = ϑi
Note that three of the four are always constants for any link.

72

DH Convention (Denavit Hartenberg)
Each Ai is represented as the product of four basic transformations.
I.e.,
Note that this order is not commutative.
where

and
73

73

D-H Convention Pros and Cons
This convention has two advantages.
It simplifies the analysis considerably.
It provides a universal language for describing robot manipulators.
It has the (minor) disadvantage that it is not completely general.
Note that we do not have an easy tool for solving the kinematic equations
74

74

Assigning the Coordinate Frames
Assume we have a kinematic chain with n+1 links.
We have to assign n+1 frames, 0, 1, …, n.
Place the Z-axis of each frame at the axes of actuation of each of the links.
Label them so that zi corresponds to the axis of rotation of joint i+1 if it is a rotary joint and to the axis of translation if it is a prismatic joint.
75

DH Frame Assignment

Joint i is a revolute joint.
Note how Zi-1 is assigned along the axis of rotation.

76

Assigning the Coordinate Frames
Next choose the origin of the world frame.
You can place it anywhere along z0.
x0 and y0 are then arbitrary but right handed.
Once frame 0 has been chosen, choose frame 1.
There are 3 cases:
z0 and z1 are not coplanar.
z0 and z1 intersect.
z0 and z1 are parallel.

77

WHAT DO THE LAST 3 CASES REFER TO? CAN YOU FIND FIGURES CORRESPONDING TO THESE 3 CASES?

I couldn’t find different diagrams for the 3 cases. But the figure I have used is general which shows the 4 DH parameters for an example scenario.
77

Assigning the Coordinate Frames
z0 and z1 are not coplanar.
Then there exists a unique shortest line segment that intersects and is perpendicular to both.
Define the intersection with z1 to be 01.
Define x1 to start at 01 and continue the line segment.
Choose y1 to complete a right handed coordinate frame.
z0 and z1 intersect.
Choose x1 perpendicular to the plane of z0 and z1.
The direction is arbitrary.
A convenient choice for 01 is the intersection point.
Choose y1 to complete a right handed coordinate frame.

78

Assigning the Coordinate Frames
z0 and z1 are parallel.
There are infinitely many lines connecting, and perpendicular to, both of them.
Thus, you can choose 01 anywhere along z1.
Given the arbitrariness, choose a convenient spot.
Choose x1 to lie on the line connecting z0 to z1 and pointing in either direction.
Then choose y1 to complete the right handed frame.
This completes the assignment of frame 1.

79

Assigning the Coordinate Frames
Apply the same process to assign frames 2, 3, …,n-1.
Frame n is special—it usually is assigned to the end effector and is often called the tool frame.
The choice of axes depends on the specific device.
80

WHAT PROPERTY ARE YOU PROVING BY INDUCTION HERE?

The previous sentence was misleading. We were not proving anything by induction. We just apply the same conventions stated in previous slides to assign the
Subsequent frames in the manipulator.
80

Assigning the End Frame
Gripper example:
Assume the gripper approaches its target along a vector a and the gripper closes along a vector s.
Choose zn to align with a and yn to align with s.
Then choose xn  the plane of yn and zn.

81
Figure 8: Illustration of an end effector

Example: 3-Link Cylindrical Manipulator
The diagram on the right describes a 3-link cylindrical manipulator according to the DH convention.
Note especially the coordinate frames for the prismatic joint and the gripper (frame 2 and 3).
82
Kinematic representation of the manipulator

DH Parameters for 3-link cylindrical Manipulator
The derived matrices:

83
Each row specifies a DH matrix
Each entry specifies a DH sub matrix.

DH parameters of Stanford Manipulator
Let’s write the DH parameters for the Stanford Arm
The end effector is not included in the kinematic diagram.
The world frame is established at the bottom of the first joint, not at the bottom of the base.
All three joints are at the same point so all three frames have the same origin.
84
Kinematic diagram of the Stanford Arm without the end effector.

84

DH Parameters for the Stanford Arm
The rotation at joint 2 is confusing because of the picture. Remember that the joint rotates and the diagram only shows one orientation.
85
Link ai ai di qi
1 0 -90 0 q1*

2 0 90 0 q2*
3 0 0 d3* 0

x-default

ú
ú
ú
û
ù
ê
ê
ê
ë
é



+
+




+


2
2
2
1
1
0
3
2
2
0
3
1
1
0
3
2
2
3
2
1
3
0
2
1
2
0
3
1
3
0
2
1
2
3
2
2
2
2
1
2
2
2
2
2
2
2
2
1
2
2
2
2
2
2
2
2
1
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q
q

q0 =
1
2

tr(M)

q1 =
m21 −m12
4q0

q2 =
m02 −m20
4q0

q3 =
m10 −m01
4q0

q
0
=
1
2
tr(M)
q
1
=
m
21
-m
12
4q
0
q
2
=
m
02
-m
20
4q
0
q
3
=
m
10
-m
01
4q
0