Robotics 3
Robotics 3
By:
Dr. Hossam Ramadan
[email protected]
1
Course Assessment Proposal Plan
Title Date Marks
Year work All weeks 40
Mid. Term exam 7th week 20
Final Exam 14th week 40
Year Work
40
Practical
Quiz #1 Quiz #2
Reports
10 (4th week) 10 (10th week) 20
2
What is a Robot?
• A robot is a programmable multifunctional manipulator
designed to move material, parts, tools, or specialized
devices through variable programmed motions for the
performance of a variety of tasks.
3
Advantage of Robot
4
Introduction
Computer
Teleoperators Robot Numerical
Control (CNC)
• Teleoperators, or master-slave devices, were developed during the second world war to handle
radioactive materials.
• Computer numerical control (CNC) was developed because of the high precision required in the
machining of certain items, such as components of high-performance aircraft.
• The first robot essentially combined the mechanical linkages of the teleoperator with the
autonomy and programmability of CNC machines.
5
Introduction
• The first successful applications of robot manipulators generally
involved some sort of material transfer, such as injection molding or
stamping.
• The first robot could be programmed to execute a sequence of
movements, such a moving to location A, closing a gripper, moving to
a location B.
• More complex applications, such as welding, grinding, deburring, and
assembly require not only complex motion but also some form of
external sensing such as vision, tactile or force sensing.
6
Mechanical components of a robot
• Manipulator Robot / Arm Robot / Articulated Robot
• Composed of links connected by joints to form a
kinematic chain
• The mechanism of a robot manipulator consists of
two distinct subsystems, one (or more) end-
effectors and an articulated mechanical structure: Mechanical components of a robot
• by the term end-effector, we mean any device
intended to manipulate objects (magnetic, electric
or pneumatic grippers) or to transform them (tools,
welding torches, paint guns, etc.).
7
Types of Joints
Revolute Universal
Prismatic Spherical 8
Symbolic Representation of Robot
• Joints are typically rotary (Revolute) or
linear (Prismatic)
• A revolute joint is like a hinge and allows
relative rotation between two links.
• A prismatic joint allows a linear relative
motion between two links.
• We denote revolute joint by ( 𝑹 ) and
prismatic joints by ( 𝑷 ).
• Each joint represents the interconnection
between two links.
• The joint variables, denoted by ( 𝜽 ) for a Symbolic representation of robot joints
revolute joint and ( 𝒅 ) for the prismatic
joint, represent the relative displacement
between adjacent links.
9
Types of Manipulator Robots
10
Robot Joint
Configuration
11
Classification of robot Manipulators
• Power source: robots are either electrically, hydraulically, or
pneumatically powered. Hydraulic actuators are unrivaled in their
speed of response and torque producing capability. Therefore
hydraulic robots are used primarily for lifting heavy loads. The
drawbacks of hydraulic robots are that they tend to leak hydraulic
fluid, require much more peripheral equipment (such as pumps,
which require more maintenance), and they are noisy.
• Robots driven by DC- or AC-servo motors are increasingly popular
since they are cheaper, cleaner and quieter. Pneumatic robots are
inexpensive and simple but cannot be controlled precisely. As a result,
pneumatic robots are limited in their range of applications and
popularity.
12
Classification of robot Manipulators
• Application Area: Robots are often classified by application into
assembly and non-assembly robots. Assembly robots tend to be
small, electrically driven and either revolute or SCARA (described
below) in design. The main non-assembly application areas to date
have been in welding, spray painting, material handling, and machine
loading and unloading.
13
Classification of robot Manipulators
• Method of Control: Robots are classified by control method into
servo and non-servo robots. The earliest robots were non-servo
robots. These robots are essentially open-loop devices whose
movement is limited to predetermined mechanical stops, and they
are useful primarily for materials transfer. In fact, according to the
definition given previously, fixed stop robots hardly qualify as robots.
Servo robots use closed-loop computer control to determine their
motion and are thus capable of being truly multifunctional,
reprogrammable devices.
14
Classification of robot Manipulators
• Geometry: Most industrial manipulators at the present time have six
or fewer degrees-of-freedom. These manipulators are usually
classified kinematically on the basis of the first three joints of the
arm, with the wrist being described separately. The majority of these
manipulators fall into one of five geometric types: articulated (RRR),
spherical (RRP), SCARA (RRP), cylindrical (RPP), or Cartesian (PPP). We
discuss each of these below.
15
The Workspace
• The workspace of a manipulator is the total volume swept out by the
end effector as the manipulator executes all possible motions.
• The workspace is constrained by the geometry of the manipulator as
well as mechanical constraints on the joints. For example, a revolute
joint may be limited to less than a full 360 of motion.
• The workspace is often broken down into a reachable workspace and
a dexterous workspace.
• The reachable workspace is the entire set of points reachable by the
manipulator, whereas the dexterous workspace consists of those
points that the manipulator can reach with an arbitrary orientation of
the end-effector.
16
The Workspace
• Reachable workspace: is a specification of the configurations that the robot end-
effector can reach.
• Dexterous workspace: is a specification of the configurations that the robot end-
effector can reach with arbitrary orientation.
• Robot's workspace depends on: the kinematic configuration, the links'
dimension, the joints' range of motion.
17
Cartesian Manipulator SCARA Manipulator Cylindrical Manipulator
Manipulator Workspace
18
Robot Workspace
19
SCARA Robot
20
The configuration Space
• A configuration of a manipulator is a complete specification of the
location of every point on the manipulator.
• In our case, if we know the values for the joint variables (i.e., the joint
angle for revolute joints, or the joint offset for prismatic joints), then
it is straightforward to infer the position of any point on the
manipulator
• since the individual links of the manipulator are assumed to be rigid,
and the base of the manipulator is assumed to be fixed.
• For the manipulator robot, the number of joints determines the
number DOF.
21
Degree of Freedom(DOF):
• Robot’s Degrees of Freedom (n):
Is the smallest number n of real-valued coordinates needed
to represent the robot's configuration
• Rigid Body DoF (m):
A rigid body in three-dimensional space, which we call a
spatial rigid body, has six degrees of freedom, m = 6 (three
for position and three for orientation).
A rigid body moving in a two-dimensional plane, which we
call a planar rigid body, has three degrees of freedom, m = 3
(two for position and one for orientation).
22
Degree of Freedom(DOF):
• Defective manipulators:
If n < m, e.g., n = 4, 5 and m = 6 (spatial). It is not
possible to execute all the possible tasks in the
workspace, but only those defined in a proper
subspace (e.g., SCARA).
• Redundant manipulators:
• If n > m, for example n = 7,8, and m = 6. A given
task can be executed in infinite different manners.
23
Degree of Freedom(DOF):
• The number of degrees of freedom of a mechanism with links and joints can be
calculated using
Grubler's formula:
• DoF = (sum of freedoms of the bodies) - (number of independent constraints)
• If a mechanism has N links including ground , and J joints, its DoF is
determined by:
1 2 3 4
m =3 m =3 m=3
m=3
N = 5 links N = 6 links N = 6 links
N = 5 links
J = 4 joints J = 7 joints J = 7 joints
J = 5 joints
DoF =3(5−1−4)+4 DoF =3(6−1−7)+7 DoF = 3(6-1-7)+7
DoF = 3(5-1-5)+5
DoF =4 DoF=1 DoF = 1
DoF = 2
Redundant robot Defective mechanism Defective mechanism
25
Examples
Three links are connected at a single point A.
Since a joint connects exactly two links, the joint
at A is correctly interpreted as two revolute joints
overlapping each other.
m =3
N = 8 links
J = 9 joints
DoF =3(8−1−9)+9
DoF =3
Mechanism with two over lapping joints
26
Examples
m=3
N = 4 links
J = 4 joints
DoF = 3(4 - 1 - 4) + 4
DoF = 1
27
Examples
m=3
N = 7 links
J = 9 joints
DoF = 3(7 - 1 - 9) + 9(1)
DoF = 0
28
Examples
A B 29
Zero Dof
30
Example (spatial)
m=3 m=6
N = 5 links N = 6 links
J = 4 joints J = 5 joints
DoF = 3(5 - 1 - 4) + 4 DoF = 6(6 - 1 - 5) + 5
DoF = 4 DoF = 5
31
Parallel Robots
m=6
N = 17 links
J = 21 joints
DoF = 6(17 - 1 - 21) + 9(1) + 12(3)
DoF = 15
However, only three DoF are visible at the end
effector that moves parallel to the fixed
platform. So, the Delta robot acts as
an x , y , z Cartesian positioning device. Delta robot
32
Parallel Robots
m=6
N = 14 links
J = 18 joints (6 P, 6 U, 6 S)
DoF = 6(14-1-18)+6(1)+6(2)+6(3) Stewart-Gough platform
DoF = 6
The Stewart-Gough platform is a popular choice
for car and airplane cockpit simulators since it
moves with the full six degrees of freedom of
motion of a rigid body. Its parallel structure
means that each leg needs to support only a
fraction
of the weight of the payload.
33
Robotic Systems
35
Kinematics
• Kinematics is the study of how the robot moves not why it moves (Dynamics).
• In robotic manipulation we are concerned with two common kinematic problems:
38
Forward Kinematics ( two link planner)
Given: 𝜃1 , 𝜃2
Required: 𝑥, 𝑦
39
Inverse Kinematics (two link planner )
Given: 𝑥, 𝑦
Required: 𝜃1 , 𝜃2
40
Inverse Kinematics (two link planner )
Given: 𝑥, 𝑦
Required: 𝜃1 , 𝜃2
41
42
43
44
Cos(180-x)
45
46
47
48
49
summary
50
51
2 nd solution
52
53
54
55
Transformation matrix between vectors,
frames and screws
• Solving the manipulator kinematics requires the assignment of different coordinate frames on
each joint and the end-effector.
• The goal is to find the transformation between the end-effector and the base frames.
• In robotic manipulators, two basic transformations are used: Translation and Rotation.
56
Representation of a Point in Space
• A point P in space can be represented by its three
coordinates relative to a reference frame as:
57
Representation of a Vector in Space
𝑷𝑨𝑩 = (𝑩𝒙 − 𝑨𝒙 )𝒊 + 𝑩𝒚 − 𝑨𝒚 𝒋 + 𝑩𝒛 − 𝑨𝒛 𝒌
Specifically, if the vector starts at the origin
59
Example 1:
60
Example 1: Cont.
However, in order to make the vector into a unit vector, we normalize the length to
be equal to 1. To do this, each component of the vector is divided by the square
root of the sum of the squares of the three components:
Solution:
61
Example 2:
• A vector p is 5 units long and is in the direction of a unit vector q described below.
Express the vector in matrix form.
62
Representation of a Frame at the Origin of a
Fixed Reference Frame
• A frame is generally represented by three mutually orthogonal axes (such as x, y, and z).
• We will use axes 𝑥, 𝑦, 𝑎𝑛𝑑 𝑧 to represent the fixed Universe reference frame 𝐹𝑥,𝑦,𝑧
• And a set of axes 𝑛, 𝑜, 𝑎𝑛𝑑 𝑎 to represent another (moving) frame 𝐹𝑛,𝑜,𝑎 relative to the
reference frame. (The letters 𝑛, 𝑜, 𝑎𝑛𝑑 𝑎 are derived from the words normal, orientation, and
approach).
63
• Assume a moving frame 𝐹𝑛,𝑜,𝑎 with its origin is coincide with the universal origin,
as shown in figure. Since 𝑛, 𝑜, 𝑎𝑛𝑑 𝑎 and a are vectors in the frame 𝑥, 𝑦, 𝑎𝑛𝑑 𝑧 .
• Consequently, the three axes of the frame can be represented by three vectors in
matrix form as:
64
Representation of a Frame Relative to a Fixed
Reference Frame
65
Example:
66
Representation of a Rigid Body
• An object can be represented in space by attaching a frame to it and representing
the frame.
• Since the object is permanently attached to this frame, its position and orientation
relative to the frame is always known.
• As a result, so long as the frame can be described in space, the object’s location
and orientation relative to the fixed frame will be known.
67
Representation of a Rigid Body
• A point in space has only three degrees of freedom; it can only move along the three reference
axes.
• However, a rigid body in space has six degrees of freedom, meaning that not only can it move
along 𝑥−, 𝑦−, 𝑎𝑛𝑑 𝑧 −axes, it can also rotate about these three axes.
• All that is needed to completely define an object in space is six pieces of information describing
the location of the origin of the object in the reference frame and its orientation about the three
axes.
• The matrix includes twelve pieces of information are given: nine for orientation, and three for
position.
• There must be some constraints present in this representation to limit the above to six.
• We need 6 constraint equations to reduce the above from twelve to six.
68
Representation of a Rigid Body
The constraints come from the known characteristics of a frame that have not been used yet, that:
• The three-unit vectors n, o, a are mutually perpendicular, and
• Each unit vector’s length, represented by its directional cosines, must be equal to 1.
69
Example
70
Assignment
71
Homogeneous Transformation Matrices
Representation of Transformations
• A transformation is defined as making a movement in space.
• a vector or a body can move relative to a frame.
• transformation are represented in a form similar to frame representation (change
in position and orientation).
A transformation may be in one of the following forms:
• A pure translation
• A pure rotation about an axis
• A combination of translations and/or rotations
72
Representation of a Pure Translation
• If a frame (that may also be representing an object) moves in space without any change in its orientation.
• The only thing that changes is the location of the origin of the frame relative to the reference frame.
old
73
Example
old
74
Representation of a Pure Rotation about an
Axis
• If a frame (or object) rotates about an axis without changing its
origin, this is called Rotation.
• Rotation about x-axis, the origin of the frame is fixed.
75
Representation of a Pure Rotation about an
Axis
Coordinates of a point relative to the reference frame and rotating frame as
viewed from the x-axis.
76
Representation of a Pure Rotation about an
Axis
77
Example
78
Representation of Combined Transformations
• Combined transformations consist of a number of successive translations and
rotations about the fixed reference frame axes or the moving current frame axes.
(the order is very important)
• To see how combined transformations are handled, let’s assume that a frame
𝐹𝑛,𝑜,𝑎 is subjected to the following three successive transformations relative to
the reference frame 𝐹𝑥,𝑦,𝑧 :
1.Rotation of 𝜶 degrees about the 𝒙-axis,
2.Followed by a translation of [𝒍𝟏, 𝒍𝟐, 𝒍𝟑] (relative to the 𝒙−, 𝒚−, 𝑎𝑛𝑑 𝒛-axes
respectively),
3.Followed by a rotation of 𝜷 degrees about the 𝒚-axis.
79
80
81
Example 2 (relative to reference frame)
82
83
Then,
84
Representation in Space
85
Example 3 (relative to reference frame)
86
87
Transformations Relative to the Rotating
Frame (moving frame)
88
89
Example (relative to alternative reference
frame and moving frame)
90
Example (relative to alternative reference
frame and moving frame)
91
W.r.t = with reference
to
92
Denavit-Hartenberg Representation of Forward
Kinematics Equation of Robots (D-H Parameters)
D-H Representation:
• Simple way of modeling robot links and joints
for any robot configuration, regardless of its
sequence or complexity.
• is a systematic way to choose coordinate frames
for an articulated serial manipulator.
• Any possible combinations of joints and links
and all-revolute articulated robots can be
represented
93
Example [PUMA 560] Link 2
Joint 2 Link 1
• The PUMA (Programmable Universal Machine for Assembly,
J3 Link 3
or Programmable Universal Manipulation Arm) is an industrial robotic
arm. Joint 4
• Has six revolute joints.
J1 Joint 6
Joint 5
Link 0
94
Link
• A link is considered as a rigid body which defines the relationship
between two neighboring joint axes of a manipulator.
The Kinematics Functions of a Link
❑ The kinematics function of a link is to maintain a fixed relationship between
the two joint axes it supports.
❑ This relationship can be descried with
two parameters:
96
Link Length (𝒂𝒊 )
❑ Is measured along a line which is mutually
perpendicular to both axes.
❑ The mutually perpendicular always exists
and is unique except when both axes are
parallel.
97
Link Twist (𝜶𝒊 )
❑ Project both Axes 𝑖 − 1 and 𝑖 onto the
plane whose normal is the mutually
perpendicular line and measure the angle
between them.
❑ Right – hand sense.
98
Link offset (𝒅𝒊 )
❑ The relative position of two links is called link offset (𝒅𝒊 ) which is the
distance between the links (the displacement, along the joint axes
between the links).
99
D-H Parameters
100
D-H parameters
Link Parameter
❑Link Length (𝒂𝒊 )
❑Link Twist (𝜶𝒊 )
Joint Parameter
❑Joint Angle (𝜽𝒊 )
❑Link offset (𝒅𝒊 )
101
Link connection description
For revolute:
• 𝒂𝒊 , 𝜶𝒊 and 𝒅𝒊 are all fixed
• Then 𝜽𝒊 is the variable
For prismatic:
• 𝒂𝒊 , 𝜶𝒊 and 𝜽𝒊 are all fixed
• Then 𝒅𝒊 is the variable
102
Affixing frames to links
• In order to describe the location of each link relative to its neighbors,
we define a frame attached to each link.
• Case (1) distant
𝒛𝟎
𝒐𝟏
𝒙𝟏
𝒐𝟎
𝒛𝟏
𝒙𝟎 103
Affixing frames to links
• In order to describe the location of each link relative to its neighbors,
we define a frame attached to each link.
• Case (2) Cross
𝒛𝟎
𝒙𝟏 𝒐𝟏
𝒐𝟎
𝒛𝟏
𝒙𝟎 104
Affixing frames to links
• In order to describe the location of each link relative to its neighbors,
we define a frame attached to each link.
• Case (3) parallel
𝒛𝟏 𝒛𝟎
𝒐𝟏 𝒐𝟎
𝒙𝟏 𝒙𝟎 105
Affixing frames to links
• In order to describe the location of each link relative to its neighbors,
we define a frame attached to each link.
• Case (4) identical
𝒛𝟏
𝒛𝟎
𝒐𝟏
𝒐𝟎
𝒙𝟎
𝒙𝟏 106
D-H Parameter
107
D-H Parameter
108
D-H Parameter
109
D-H Parameter
110
D-H Parameter
111
112
113
Example: A 3 DOF RRR Robot
Link (0)
Frame Assignment
Z1
Y1
X1
Y1
Z1
Example: A 3 DOF RRR Robot
Frame Assignment
Z0, Z1
Y2
Y0, Y1
Z2
X0, X1 X2
Z2
Y2
Example: A 3 DOF RRR Robot
Frame Assignment
Z0, Z1
Y2 Y3
Y0, Y1
Z3
X0, X1 X2 X3
Z2 Z3
Y3
Example: A 3 DOF RRR Robot
Frame Assignment 1
Z0, Z1
Y2 Y3
2 3
Y0, Y1
X0, X1 X2 X3
Z2 Z3
Example: A 3 DOF RRR Robot
Y2 Y3
Y0, Y1
X0, X1 X2 X3
Z2 Z3
Y2 Y3
Y0, Y1
X0, X1 X2 X3
Z2 Z3
Y2 Y3
Y0, Y1
X0, X1 X2 X3
Z2 Z3
i=1 90° A 0 1
(1=0° at home
position)
i=2 0 B 0 2
(2=-0° at home
position)
i=3 … … 0 3
(3=-0° at home
position)
Example: A 3 DOF RRR Robot
0 = 0, a0 = 0, d1 = 0
cos(1 ) − sin(1 ) 0 0
sin( ) cos( ) 0 0
0
T = 1 1
0 0
1
0 1
0 1
0 0
Example: A 3 DOF RRR Robot
1 = 90 , a1 = A, d2 = 0
cos( 2 ) − sin( 2 ) 0 A
0 0 −1 0
2T =
1
sin( 2 ) cos( 2 ) 0 0
0 1
0 0
Example: A 3 DOF RRR Robot
2 = 0, a2 = B, d3 = 0
cos( 3 ) − sin( 3 ) 0 B
sin( ) cos( ) 0 0
2
T = 3 3
0 1 0
3
0
0 0 1
0
Example: A 3 DOF RRR Robot
Forward Kinematics
0 0 0 1
Example: A 3 DOF RRR Robot
A=3
B=2 C=1
Z0, Z1
What is the position of
point “P” at the home Y2 Y3
position? Y0, Y1
P
X0, X1 X2 X3
Z2 Z3
Solution:
1
3 p 0
0 p 0 3 p
= = 3T
1 0 1 1
1
Example: A 3 DOF RRR Robot
T =
0 1 2 3 1 2 3 1 2 1
0 0 0 1 1
1 0 0 5 1 6
0 p 0 3 p 0 0 0 0
0 −1
= 3T = 0 =
1 1 1 0 0 0 0
0 1 1 1
0 0
Example: A 3 DOF RRR Robot
Inverse Kinematics
nx ox ax px
n py 0 1 2
= ( 1T )( 2T )( 3T )= 03T
oy ay
y
nz oz az pz
0 0 0 1
0 0 0 1 1
Joints Representations
ẑi
joint i+1
ẑi
130
Case study #1
131
Step 1: Choose the z-axis for each frame
132
Step 2: Establish frame {0}
• place the origin o0 anywhere on z0
• often the choice of location is obvious
• choose x0 and y0 so that {0} is right-
handed
• often the choice of directions is obvious
133
Step 3: Iteratively construct {1}, {2}, ... {n-1}
Case #2 Case #3
Case #1
Case #4
134
Step 3: Iteratively construct {1}, {2}, ... {n-1}
135
Step 4: Place the end effector frame
136
Step 5: Find the DH parameters
137
Step 5: Find the DH parameters
138
𝑇10 𝑇21 𝑇32
139
Total transformation matrix
140
Link Link offset
Link i Twist I Joint angle i
length ai di
Example (1) 0-1
0 -90 L1 1
Link 1
1-2
0 -90 0 2
Link 2
2-3
0 0 L3 3
𝒙𝟐 Link 3
𝒛𝟏 𝒙𝟐
𝒛𝟐 𝒛𝟑
𝒙𝟏
𝒚𝟏 𝒚𝟐 𝒚𝟑
142
Example
𝒛𝟒
𝒛𝟏 𝒛𝟐 𝒙𝟒 𝒙𝟓 𝒙𝟔
𝒙𝟑 𝒚𝟑
𝒙𝟏 𝒙𝟐 𝒛𝟓 𝒛𝟔
𝒚𝟏 𝒚𝟒 𝒛𝟑 𝒚𝟓
𝒚𝟔
𝒚𝟐
143
The DH parameters
Link Link
Link i Twist i Joint angle i
length ai offset di
0-1
Link 1
1-2
Link 2
2-3
Link 3
3-4
Link 4
4-5
Link 5
5-6
Link 6
The DH parameters
Link Link
Link i Twist i Joint angle i
length ai offset di
0-1
0 -90° d1 1
Link 1
1-2
a2 0 0 2
Link 2
2-3
0 -90° 0 3
Link 3
3-4 d4
0 -90° 4
Link 4
4-5
0 90° 0 5
Link 5
5-6
0 0 d6 6
Link 6
Assignment
(A) (B)
Solve the Forward kinematic by:
a) Assign the coordinates for each joint
b) complete the DH-parameters in the empty table
c) find the representation matrix for each joint
d) find the final transformation matrix for the end effector 146
Inverse Kinematics
147
Link Link
Link i Twist i Joint angle i
length ai offset di
0-1
Link 1
1-2
Link 2
2-3
Link 3
3-4
Link 4
4-5
Link 5
5-6
Link 6 148
KUKA Kr6 R900
149
Workspace graphic
150
151
152
Link Twist Link offset Joint angle P 400 mm
Link i
length ai i di i
Q 25 mm
0-1
Q 90 P 1 E 455 mm
Link 1
1-2
D 35 mm
E 0 0 2
Link 2 W 420 mm
2-3
D -90 0 3
F 99 mm
Link 3
3-4 𝐶𝜃𝑖 −𝑆𝜃𝑖 𝐶𝛼𝑖 𝑆𝜃𝑖 𝑆𝛼𝑖 𝑎𝑖 𝐶𝜃𝑖
0 90 -W 4
Link 4
𝑆𝜃𝑖 𝐶𝜃𝑖 𝐶𝛼𝑖 −𝐶𝜃𝑖 𝑆𝛼𝑖 𝑎𝑖 𝑆𝜃𝑖
4-5 𝐴𝑖−1
𝑖 =
0 -90 0 5 0 𝑆𝛼𝑖 𝐶𝛼𝑖 𝑑𝑖
Link 5
5-6 0 0 0 1
0 0 -F 6
Link 6
153
1. Manipulator
2. smartPAD teach pendant
3. Connecting cable, smartPAD
4. Robot controller
5. Connecting cable, data cable
6. Connecting cable, motor cable
154
Inverse kinematics
finding the first three joint values 𝜃1 , 𝜃2 𝑎𝑛𝑑 𝜃3
(Translation Joints)
𝑦𝑐 1
Finding 𝜃1 : tan 𝜃1 = , 𝜃1 = atan2(𝑦𝑐 , 𝑥𝑐 ) 𝑐𝑜𝑠𝜃3 =
𝑥𝑐
1 + 𝑡𝑎𝑛2 𝜃3
Finding 𝜃3 : 𝑐 2 = 𝑟 2 + 𝑠 2 and 𝑟 2 = 𝑥𝑐2 + 𝑦𝑐2
𝜃3 = 𝑎𝑡𝑎𝑛2 1 − 𝐷2 𝐷
From using cosin law:
𝑙12 + 𝑙22 − 𝑐 2
𝑐𝑜𝑠𝛼 = Finding 𝜃2 : 𝛽 = 𝑎𝑡𝑎𝑛2(𝑙2 𝑠𝑖𝑛𝜃3 , 𝑙1 + 𝑙2 𝑐𝑜𝑠𝜃3 )
2𝑎1 𝑎2
𝑙12 + 𝑙22 − 𝑟 2 − 𝑠 2
𝑐𝑜𝑠𝛼 = 𝛾 = atan2(𝑠, 𝑟) = 𝑎𝑡𝑎𝑛2(𝑧𝑐 − 𝑑1 , 𝑥𝑐2 + 𝑦𝑐2 )
2𝑙1 𝑙2
𝑥𝑐2 + 𝑦𝑐2 + 𝑧𝑐 − 𝑑1 2
−𝑙12 −𝑙22
𝜃3 = 𝑐𝑜𝑠 −1
2𝑙1 𝑙2
Inverse kinematics
finding the last three joint values 𝜃4 , 𝜃5 𝑎𝑛𝑑 𝜃6
(spherical Joints)
𝑐4 𝑐5 𝑐6 −𝑠4 𝑠6 −𝑐4 𝑐5 𝑠6 −𝑠4 𝑐6 𝑐4 𝑠5 𝐶4 𝑆5 = 𝐶1 𝐶23 𝑟13 +𝑆1 𝐶23 𝑟23 +𝑆23 𝑟33
𝑅63 = 𝑠4 𝑐5 𝑐6 +𝑐4 𝑠6 −𝑠4 𝑐5 𝑠6 +𝑐4 𝑐6 𝑠4 𝑠5 𝑆4 𝑆5 = −𝐶1 𝑆23 𝑟13 −𝑆1 𝑆23 𝑟23 +𝐶23 𝑟33
−𝑐6 𝑠5 𝑠5 𝑠6 𝑐5
𝐶5 = 𝑆1 𝑟13 −𝐶1 𝑟23
158
Robotics toolbox (MATLAB)
Example: 2D Robot Arm
160
Adding movement (loop)
• for th1=0:0.1:pi/2
• robo.plot ([th1 0]);
• pause(0.25)
• end
161
162
163
Example: A 3 DOF RRR Robot
Inverse Kinematics
a x = sin(1 ) ax
1 = tan
−1
a y = − cos(1 ) − a
y
Provided that ( a x2 + a y2 ) = 1
1 px
p x = ( A + B cos( 2 )) cos(1 ) → cos( 2 ) = − A
B cos(1 )
1 py
p y = ( A + B cos( 2 )) sin(1 ) → sin( 2 ) = − A
B cos(1 )
Example: A 3 DOF RRR Robot
Inverse Kinematics
sin( 2 ) = 1 − cos 2 ( 2 )
sin( 2 )
2 = tan −1
cos( 2 )
Otherwise use py to find sin(2) and then solve using
cos( 2 ) = 1 − sin 2 ( 2 )
sin( 2 )
2 = tan −1
cos( 2 )
Example: A 3 DOF RRR Robot
Inverse Kinematics
nz = sin( 2 + 3 ) −1 n z
2
( + ) = tan
oz = cos( 2 + 3 )
3
oz
3 = ( 2 + 3 ) − 2
Now find 1, 2, and 3 given the orientation and position of point “P”:
nx ox ax px 0 1 0 5
n oy ay py 0 0 −1 0
y =
nz oz az p z − 1 0 0 − 1
0 1 0 1
0 0 0 0
z n+1
zn
zn an n+1
x n+1
n
xn
xn
Link n
Joint n+1
Joint n
167 167
Quiz 2
168
Quiz 2
169