Introduction To Robotics
Introduction To Robotics
1 1/12/2018
General Course Information
The course introduces the basic concepts of robotic
manipulators and autonomous systems. After a review of
some fundamental mathematics the course examines the
mechanics and dynamics of robot arms, mobile robots, their
sensors and algorithms for controlling them.
two robotic arms
everything in Matlab (and some Java)
2 1/12/2018
A150 Robotic Arm
link 3
link 2
4 1/12/2018
Kinematics
forward kinematics:
given the link lengths and joint angles compute the position and
orientation of the gripper relative to the base
for a serial manipulator there is only one solution
inverse kinematics:
given the position (and possibly the orientation) of the gripper and
the dimensions of the links, what are the joint variables?
for a serial manipulator there is often more than one mathematical solution
5 1/12/2018
Wheeled Mobile Robots
robot can have one or more wheels that can provide
steering (directional control)
power (exert a force against the ground)
an ideal wheel is
perfectly round (perimeter 2πr)
moves in the direction perpendicular to its axis
6 1/12/2018
Wheel
7 1/12/2018
Deviations from Ideal
8 1/12/2018
Differential Drive
two independently driven wheels mounted on a common axis
9 1/12/2018
Forward Kinematics
for a robot starting with pose [0 0 0]T moving with velocity
V(t) in a direction θ(t) :
t
x(t ) V (t ) cos( (t )) dt
0
t
y (t ) V (t ) sin( (t )) dt
0
t
(t ) (t ) dt
0
10 1/12/2018
Sensitivity to Wheel Velocity
vr (t ) 1 N (0, 2 )
v (t ) 1 N (0, 2 )
(0) 0 σ = 0.05
t 010
0.2 σ = 0.01
11 1/12/2018
Localization using Landmarks: RoboSoccer
12 1/12/2018
Maps
* goal
start *
13 1/12/2018
Path Finding
goal
start
14 1/12/2018
Localization
goal
start
15 1/12/2018
EKF SLAM Application
16
EKF SLAM Application
17
Day 02
18 1/12/2018
Robotic Manipulators
a robotic manipulator is a kinematic chain
i.e. an assembly of pairs of rigid bodies that can move respect to one
another via a mechanical constraint
the rigid bodies are called links
the mechanical constraints are called joints
link 3
link 2
link i
i
link i – 1
link i – 1 link i
di
2 3
shoulder
forearm
elbow
1
waist
z0
z1
d3
2
shoulder z2
1
waist
z1 z2
z0
2
d3
1
a2
2
a1
1
(x, y) ?
a2
2
y0
a1
1
x0
(x, y) ?
a2
2
y0
a1
1 ( a1 cos 1 , a1 sin 1 )
x0
(x, y) ?
y1
a2
2
y0
1
a1 x1
1 ( a1 cos 1 , a1 sin 1 )
x0
(x, y) ?
y1
a2
( a2 cos (1 + 2),
2 a2 sin (1 + 2) )
y0
1
a1 x1
1
( a1 cos 1 , a1 sin 1 )
x0
y1
a2
( a2 cos (1 + 2),
2 a2 sin (1 + 2) )
y0
1
a1 x1
1
( a1 cos 1 , a1 sin 1 )
x0
a2
2
y0
1
a1
1
x0
2
y0
1
a1
1
x0
2 ?
y0
a1
1 ?
x0
(x, y)
a2
y0
a1
x0
(x, y)
a2
b
2 ?
y0
a1
x0
x 2 y 2 a12 a22
cos( 2 )
2a1a2
and we have the trigonometric identity
cos( 2 ) cos(2 )
therefore,
x 2 y 2 a12 a22
cos 2 C2
2a1a2
We could take the inverse cosine, but this gives only one of the two solutions.
to obtain
1 C 2
2 tan 1 2
C2
which yields both solutions for 2 . In many programming languages you would use the
four quadrant inverse tangent function atan2
y 1 a2 sin 2
1 tan tan
1
x a1 a2 cos 2
Spatial Descriptions
43 1/12/2018
Points and Vectors
point : a location in space
vector : magnitude (length) and direction between two points
v
q
44 1/12/2018
Coordinate Frames
choosing a frame (a point and two perpendicular vectors of
unit length) allows us to assign coordinates
0
p
4
p
0
ŷ0 q0 2.5
2
q
0
x̂0 1.5
0 o0 2
v p q
0 0 0
1
45 1/12/2018
Coordinate Frames
the coordinates change depending on the choice of frame
1
p
1 o1
ŷ1 0.5
p
1
q1 4
0.5
x̂1 q
1
2
1
v p q
1 1 1
2
46 1/12/2018
Dot Product
the dot product of two vectors
u1 v1
u v
u 2 v 2 u v u1v1 u2v2 un vn u T v
u v u v cos
un vn
v
u cos
47 1/12/2018
Translation
ŷ0 ŷ1
x̂0 x̂1
o0 o1
0
1
suppose we are given o1 expressed in {0}
3
o
0
1
0
48 1/12/2018
Translation 1
ŷ0 ŷ1
x̂0 x̂1
o0 o1
0
1
the location of {1} expressed in {0}
49 1/12/2018
Translation 1
1. the translation vector d ij can be interpreted as the location
of frame {j} expressed in frame {i}
50 1/12/2018
Translation 2
a point expressed
in frame {1}
1
x̂0 x̂1
o0 o1
0
1
p1 expressed in {0}
51 1/12/2018
Translation 2
2. the translation vector d ij can be interpreted as a coordinate
transformation of a point from frame {j} to frame {i}
52 1/12/2018
Translation 3
1 ŷ0 2
p
0
q
0
1 1
x̂0
o0
0
q0 expressed in {0}
3 1 2
q d p
0 0
0 1 1
53 1/12/2018
Translation 3
3. the translation vector d can be interpreted as an operator
that takes a point and moves it to a new point in the same
frame
54 1/12/2018
Rotation
suppose that frame {1} is rotated relative to frame {0}
ŷ0
ŷ1
x̂1
sin
o0 o1 x̂0
cos
55 1/12/2018
Rotation 1
the orientation of frame {1} expressed in {0}
ŷ0
ŷ1
x̂1
o0 o1 x̂0
x1 x0 y1 x0
R
0
x1 y0 y1 y0
1
56 1/12/2018
Rotation 1
1. the rotation matrix R ij can be interpreted as the orientation
of frame {j} expressed in frame {i}
57 1/12/2018
Rotation 2
p1 expressed in {0}
1
p
1
ŷ0
1
ŷ1
x̂1
o0 o1 x̂0
58 1/12/2018
Rotation 2
2. the rotation matrix R ij can be interpreted as a coordinate
transformation of a point from frame {j} to frame {i}
59 1/12/2018
Rotation 3
q0 expressed in {0}
q0
ŷ0
0
p
o0 x̂0
60 1/12/2018
Rotation 3
3. the rotation matrix R can be interpreted as an operator
that takes a point and moves it to a new point in the same
frame
61 1/12/2018
Properties of Rotation Matrices
RT = R-1
the columns of R are mutually orthogonal
each column of R is a unit vector
det R = 1 (the determinant is equal to 1)
62 1/12/2018
Rotation and Translation
ŷ1
ŷ0 x̂1
o1
x̂0
1
o0
0
63 1/12/2018
Rotations in 3D
x1 x0 y1 x0 z1 x0
R10 x1 y0 y1 y0 z1 y0
x1 z0 y1 z0 z1 z0
64 1/12/2018
Day 04
Rotations
65 1/12/2018
Properties of Rotation Matrices
RT = R-1
the columns of R are mutually orthogonal
each column of R is a unit vector
det R = 1 (the determinant is equal to 1)
66 1/12/2018
Rotations in 3D
ẑ0
ŷ1
ẑ1
x̂1
ŷ0
o0 o1
x1 x0 y1 x0 z1 x0
x̂0
R10 x1 y0 y1 y0 z1 y0
x1 z0 y1 z0 z1 z0
67 1/12/2018
Rotation About z-axis
zˆ0 zˆ1
+'ve rotation
ŷ1
ŷ0
x̂0 x̂1
68 1/12/2018
Rotation About x-axis
ẑ0
ẑ1
ŷ1
ŷ0
+'ve rotation
x̂0 x̂1
69 1/12/2018
Rotation About y-axis
ẑ0
ẑ1
yˆ 0 yˆ1
+'ve rotation
x̂0 x̂1
70 1/12/2018
Relative Orientation Example
ẑ0
x̂1
45
x̂0
ŷ1
yˆ 0 zˆ1
71 1/12/2018
Successive Rotations in Moving Frames
1. Suppose you perform a rotation in frame {0} to obtain {1}.
2. Then you perform a rotation in frame {1} to obtain {2}.
RR 1
2 and R R R
0
2
0
1
1
2
R RR
0
2
0
1
74 1/12/2018
Rotation About a Unit Axis
ẑ0
kz
k̂
ky c cos
ŷ0
kx s sin
v 1 cos
x̂0
k x2 v c k x k y v k z s k x k z v k y s
Rk , k x k y v k z s k y2 v c k y k z v k x s
k x k z v k y s k y k z v k x s k z2 v c
75 1/12/2018
Day 05
76 1/12/2018
Homogeneous Representation
translation represented by a vector d
vector addition
rotation represented by a matrix R
matrix-matrix and matrix-vector multiplication
convenient to have a uniform representation of translation
and rotation
obviously vector addition will not work for rotation
can we use matrix multiplication to represent translation?
77 1/12/2018
Homogeneous Representation
consider moving a point p by a translation vector d
px d x px d x
p d p y d y p y d y
pz d z pz d z
px px d x
? p p d
y y y
pz pz d z
78 1/12/2018
Homogeneous Representation
consider an augmented vector ph and an augmented matrix D
px 1 0 0 dx
p 0
y 1 0 d y
ph D
pz 0 0 1 dz
1 0 0 0 1
1 0 0 d x px px d x
0 1 0 d y p y p y d y
Dp h
0 0 1 d z pz pz d z
0 0 0 1 1 1
79 1/12/2018
Homogeneous Representation
the augmented form of a rotation matrix R3x3
0
0
R3x3
R
0
0 0 0 1
0 p x
R3x3 0 p R p
Rp h y 3x3
0 p z
0 0 0
1 1 1
80 1/12/2018
Rigid Body Transformations in 3D
{1}
d 10
{0} d 12
{2}
81 1/12/2018
Rigid Body Transformations in 3D
suppose {1} is a rotated and translated relative to {0}
what is the pose (the orientation and position) of {1}
expressed in {0} ?
T 10 ?
{1}
d
{0}
82 1/12/2018
Rigid Body Transformations in 3D
suppose we use the moving frame interpretation (postmultiply
transformation matrices)
1. translate in {0} to get {0’} D00'
2. and then rotate in {0’} to get {1} D00' R10'
{0’}
d
{0}
{0’}
d {1}
Step 1 {0}
Step 2
83 1/12/2018
Rigid Body Transformations in 3D
suppose we use the fixed frame interpretation (premultiply
transformation matrices)
1. rotate in {0} to get {0’} R
2. and then translate in {0} in to get {1} DR
{0}
{0’} d {1}
Step 1 {0}
Step 2 {0’}
84 1/12/2018
Rigid Body Transformations in 3D
both interpretations yield the same transformation
T10 D R
1 0 0 0
0
0 1 0 d R3x3
0 0 1 0
0 0 0 1 0 0 0 1
d
R
3x3
0 0 0 1
85 1/12/2018
Homogeneous Representation
every rigid-body transformation can be represented as a
rotation followed by a translation in the same frame
as a 4x4 matrix
R d
T
0 0 0 1
86 1/12/2018
Homogeneous Representation
in some frame i
points
p i
P
i
1
vectors
v i
V
i
0
87 1/12/2018
Inverse Transformation
the inverse of a transformation undoes the original
transformation
if
R d
T
0 0 0 1
then
1 R T
R T
d
T
0 0 0 1
88 1/12/2018
Day 06
Forward Kinematics
89 1/12/2018
Transform Equations
T 12 {2}
{1}
T 10
4
T 2
{0}
0
T 3
T 34
{4}
{3}
90 1/12/2018
Transform Equations
give expressions for:
0
T 2
3
T 4
91 1/12/2018
Transform Equations
{1}
T 10
{0}
2
T 3
{3}
0
T 2
{2}
92 1/12/2018
Transform Equations
how can you find
T 10
0
T 2
2
T 3
T 13
93 1/12/2018
Links and Joints
joint n
joint 3 joint 4 joint n-1
link 3 .................
joint 1
link 2
link n-1
link 1 link n
joint 2
link 0
i revolute
qi
n joints, n + 1 links di prismatic
link 0 is fixed (the base)
joint i connects link i – 1 to link i
link i moves when joint i is actuated
94 1/12/2018
Forward Kinematics
given the joint variables and dimensions of the links what is
the position and orientation of the end effector?
p0 ?
a2
2
y0
a1
1
x0
y1
a2
( a2 cos (1 + 2),
2 a2 sin (1 + 2) )
y0
1
a1 x1
1
( a1 cos 1 , a1 sin 1 )
x0
1
x0
y2 x2
y1
a2
2
y0 x1
a1
1
x0
T Rz ,1 Dx, a1
0
1
T Rz ,2 Dx, a2
1
2
T T T
0
2
0
1
1
2
99 1/12/2018
Day 07
Denavit-Hartenberg
100 1/12/2018
Links and Joints
joint n
joint 3 joint 4 joint n-1
link 3 .................
joint 1
link 2
link n-1
link 1 link n
joint 2
link 0
i revolute
qi
n joints, n + 1 links di prismatic
link 0 is fixed (the base)
joint i connects link i – 1 to link i
link i moves when joint i is actuated
101 1/12/2018
Forward Kinematics
attach a frame {i} to link i
all points on link i are constant when expressed in {i}
if joint i is actuated then frame {i} moves relative to frame {i - 1}
motion is described by the rigid transformation
i 1
T i
the state of joint i is a function of its joint variable qi (i.e., is a function of qi)
T ii 1 T ii 1(qi )
this makes it easy to find the last frame with respect to the
base frame
n 1
T 0n T 10 T 12 T 32 T n
102 1/12/2018
Forward Kinematics
more generally
T ii 1 T ij12 T j 1
j if i j
i
T j I if i j
T j
i 1
if i j
103 1/12/2018
Forward Kinematics
Denavit J and Hartenberg RS, “A kinematic notation for lower-
pair mechanisms based on matrices.” Trans ASME J. Appl. Mech,
23:215–221, 1955
described a convention for standardizing the attachment of frames
on links of a serial linkage
common convention for attaching reference frames on links of
a serial manipulator and computing the transformations
between frames
104 1/12/2018
Denavit-Hartenberg
105 1/12/2018
Denavit-Hartenberg
notice the form of the rotation component
106 1/12/2018
Denavit-Hartenberg
yes, but we must choose the orientation and position of the
frames in a certain way
claim: if DH1 and DH2 are true then there exists unique
numbers
107 1/12/2018
Denavit-Hartenberg
0 s i c i di
0 0 0 1
ai link length
i link twist
di link offset
i joint angle
108 1/12/2018
Denavit-Hartenberg
proof: on blackboard in class
109 1/12/2018
Day 08
Denavit-Hartenberg
110 1/12/2018
Denavit-Hartenberg Forward Kinematics
RPP cylindrical manipulator
http://strobotics.com/cylindrical-format-robot.htm
111 1/12/2018
Denavit-Hartenberg Forward Kinematics
How do we place the frames?
112 1/12/2018
Step 1: Choose the z-axis for each frame
recall the DH transformation matrix
i 1
T Rz ,i Tz ,di Tx,ai Rx,i
i
0 s i c i di
0 0 0 1
xˆii 1 yˆ ii 1 zˆii 1
113 1/12/2018
Step 1: Choose the z-axis for each frame
ẑi axis of actuation for joint i+1
ẑi
ẑi
114 1/12/2018
Step 1: Choose the z-axis for each frame
Warning: the picture is deceiving. We do not yet know the origin of the
frames; all we know at this point is that each zi points along a joint axis
115 1/12/2018
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
116 1/12/2018
Step 2: Establish frame {0}
117 1/12/2018
Step 3: Iteratively construct {1}, {2}, ... {n-1}
using frame {i-1} construct frame {i}
DH1: xi is perpendicular to zi-1
DH2: xi intersects zi-1
3 cases to consider depending on the relationship between zi-1
and zi
118 1/12/2018
Step 3: Iteratively construct {1}, {2}, ... {n-1}
Case 1
zi-1 and zi are not coplanar (skew)
zˆi 1
shortest line between ẑi (out of page)
zˆi 1 and ẑi
x̂i
ai
oi point of intersection
119 1/12/2018
Step 3: Iteratively construct {1}, {2}, ... {n-1}
Case 2
zi-1 and zi are parallel ( i = 0 )
zˆi 1 ẑi
oi 1 x̂i
ai
oi point of intersection
120 1/12/2018
Step 3: Iteratively construct {1}, {2}, ... {n-1}
Case 3
zi-1 and zi intersect ( ai = 0 )
zˆi 1
oi point of intersection
x̂i
121 1/12/2018
Step 3: Iteratively construct {1}, {2}, ... {n-1}
122 1/12/2018
Step 3: Iteratively construct {1}, {2}, ... {n-1}
123 1/12/2018
Step 4: Place the end effector frame
“sliding”
“normal”
“approach”
124 1/12/2018
Step 4: Place the end effector frame
125 1/12/2018
Step 5: Find the DH parameters
ai : distance between zi-1 and zi measured along xi
i : angle from zi-1 and zi measured about xi
di : distance between oi-1 to the intersection of xi and zi-1
measured along zi-1
i : angle from xi-1 and xi measured about zi-1
126 1/12/2018
Step 5: Find the DH parameters
Link ai i di i
1 0 0 d1 1*
2 0 -90 d2* 0
3 0 0 d3* 0
* joint variable
127 1/12/2018
Day 09
128 1/12/2018
Step 5: Find the DH parameters
Link ai i di i
1 0 0 d1 1*
2 0 -90 d2* 0
3 0 0 d3* 0
* joint variable
129 1/12/2018
Step 6: Compute the transformation
once the DH parameters are known, it is easy to construct
the overall transformation
Link ai i di i
1 0 0 d1 1*
2 0 -90 d2* 0
3 0 0 d3* 0
* joint variable
c1 s1 0 0
s c 0 0
T 10 Rz ,1Tz ,d1Tx ,a1 Rx ,1 1 1
0 0 1 d1
0 0 0 1
130 1/12/2018
Step 6: Compute the transformation
Link ai i di i
1 0 0 d1 1*
2 0 -90 d2* 0
3 0 0 d3* 0
* joint variable
1 0 0 0
0 0 1 0
T 12 Rz , 2 Tz ,d 2 Tx,a2 Rx, 2
0 1 0 d2
0 0 0 1
131 1/12/2018
Step 6: Compute the transformation
Link ai i di i
1 0 0 d1 1*
2 0 -90 d2* 0
3 0 0 d3* 0
* joint variable
1 0 0 0
0 1 0 0
T 32 Rz ,3 Tz ,d3 Tx ,a3 Rx , 3
0 0 1 d3
0 0 0 1
132 1/12/2018
Step 6: Compute the transformation
c1 0 s1 s1d3
s 0 c c d
T 30 T 10T 12T 32 1 1 1 3
0 1 0 d1 d 2
0 0 0 1
133 1/12/2018
Spherical Wrist
134 1/12/2018
Spherical Wrist
135 1/12/2018
Spherical Wrist: Step 1
136 1/12/2018
Spherical Wrist: Step 2
137 1/12/2018
Spherical Wrist: Step 2
138 1/12/2018
Spherical Wrist: Step 4
139 1/12/2018
Step 5: DH Parameters
Link ai i di i
4 0 -90 0 4*
5 0 90 0 5*
6 0 0 d6 6*
* joint variable
140 1/12/2018
Step 6: Compute the transformation
s5c6 s5 s6 c5 c5 d 6
0 0 0 1
141 1/12/2018
RPP + Spherical Wrist
142 1/12/2018
RPP + Spherical Wrist
143 1/12/2018
Stanford Manipulator + Spherical Wrist
Link ai i di i
1 0 -90 0 1*
2 0 90 d2 2*
3 0 0 d3* 0
4 0 -90 0 4*
5 0 90 0 5*
6 0 0 d6 6*
* joint variable
144 1/12/2018
SCARA + 1DOF Wrist
Link ai i di i
1 a1 0 d1 1*
2 a2 180 0 2*
3 0 0 d3* 0
4 0 0 d4 4* * joint variable
145 1/12/2018