Professional Documents
Culture Documents
Coordinate Transformation
end - effector←
is
Challenges: Joint (1)
\ , •
Pz
÷
- -
g-
frame ←
G
Position d
p=[
p
{ E.¥:
,
vector
d
Point
p=[IFg¥! pp=[IFs¥:
☐ ☐
B
P 2
,
Rigid Body : a set of points with fixed distance between each pair
'
-
{A}
Rotation Matrix
Q: What is the relation between frame {1} and frame {2}?
'
Rz Rotation of frame{2} w.r.t frame{1}
Ex =
É Ñ . = IF I III. . Cos (G)
↳ Projection of F on X
= to cos ( Zo)
direction
I =
É I = IÉI 191 Cos (90-0)
y
. . .
↳ Projection of F on y
= to sin ( zo)
direction
Let’s do the same but with frames
new
Fitz
I ✗, ✗2. ✗ I Yz
1 Xi / 2- 2.x ,
Rz={
-
y, I. 5,1-52.51-2-5.5
I. ZMT.EE I ZTÉ
-
Z
old
- -
, ,
,
I
✗z -
X, = 1. 1. Cos (8)
✗ c. Y
,
= 1.1 . Since )
✗ 2. Z ,
= 1. 1. Cos ( go )=o
✗z Yz Zz
[
Cos 0-1 Sin
)
0-1
5)
1
0
1 ×. -
,
'
R2 5.50--1-550--1 Xz ! 'y
-
-
i'
-
=
2
zz
-0--1--5 !
I
!
IT
-
z,
I o o CG SG
) f
o
Rx ,
a-
=/ o
o
ee
SO
-
CG
s Ry ,
a-
=/ -
o
SG
1
o
o
CG
Notes:
. R'
'
=
RT
co SG 0 det ( R ) It
J
__
-
Rz ,
a-
=/ O
so CG
O
o
l
.
.
R is
5G=
"
Sin
orthogonal
(G)
"
Angel-axis representation :
- Any two independent orthogonal frames can be related by a single
rotation about some axis. ( ①i
axis
d
angel
Angel-axis representation :
9
Rotation
Matrix
Axis-Angle 4
Euler
Angels 3
Quaternion
4
Notes:
- All representations can be used interchangeably
- Min number to represent Rotation -> 3
- Min number to represent Transformation -> 6
Relative Poses
Rotation Matrix -
between two frames R /d → Position vector between
H= -9×1 -1¥ the two frames
origin of
"
- -
the
- 04×31 ! I -
(4×4)
co - SG o / ✗
so co o
1 Y
G
H☐= -1--0
'
-0--0 -
-
-
o o o f ,
Note:
- This way, we have the ability to completely represent rigid Bodies
w.r.t global frame.
Q: But how?
1- Assign body frame
2- Find Transformation Matrix between
Body frame & Global frame
,
-
=
- -
=
-
Forward Kinematics
Given:
9
- Joint Variables
,
I
1
"
9
h
Find: ✗
Position of E. E
},
- Pose of the end-effector
y
z
①✗
Gy } → orientation of E. E
Gz
Revolute
Types of Joints:
: Prismatic
DOF
\ Over-Actuated
The map between Joint-space & Task-space:
Forward Kinematics
9, ✗
µ
92 y
2-
I
1
9h
↳ ex
C- y
Gz
Inverse Kinematics
Joint-space Task-space
DH-Convention :
Joint
JÉ
&
2
Step(1) : Assign Axes
Revolute Prismatic
Joint Joint
Rule(1): Xo 1- Zo
↳ in direction
any
Rule(2): ✗ i. J and A Zi , Zi -1
Gi : Rotation around Z
i. -1
between ✗
i. ,
and ✗i
i
-1Ti = T
rot * Ttnans *
Ttrans *
T
not
✗ it ✗i
Zi -1,8 Zi - , ,d ✗ i. a
CG -
SG o
o 1 O o o 1 I ° O o
o o ✗
C -0 -5-0
o
SG co o o 0 I 0 0 o 1 o 0
=
* *
o
☒
SG CG
0 0 I o o o 1 d o o , o
o o
O f 0 O l
o o o o o I O
-56cL Sosa CG
CG a
SG CGCX Casa
Soo
-
Sa ca d
O o I
o
Example (1): RP Robot
(1%+9) o o Th
°
(Lz -192) 0 0
T2 0T '
[ 5]
•
= * T R d-
(
=
, , z
o 1 Position of E. E
Orientation of E. E frame
W.r.to
global
went
global frame
Simulink Model
Example (2): d3
>k
14
24
↳ ↳
µ >< yk >
"
a- z.IT#z ,
Zs
1¥ I ✗
z
dz 0-4 %
2§gF
✗ ' × ✗ ✗
} 4. xg 6
I ✗,
L Zo
,
+ ¥09 .
old new
-0 , Li O O o → I 0T
,
O dz o -172 I → z
'
Tz
o dz o o 2 → 3 21-3
⑦
4
[
4 0 172 3-34 31-4
Gg O o - ith ↳→ 5 4T
,
-06 ↳ + LG o o 5→ 6 STG
# 'Tz .tt?T4?Tg.sTo
"
T
, .
Inverse Kinematics
Given: ✗
91
92
?
- Joint-variables
:
Q: But how?
1- Geometrical Approach
2- Numerical Approach
Unique
- Solution could be Multiple
No solution
- Energy Efficiency
\
- Trajectory Smoothness
- Collision Avoidance
Inverse Kinematics (Geometric Approach)
Example (1): RP Robot using “geometric method”
①
0-1
Find: = ?
Given:
⑤
Y tan '( Y
tan (g) = G. =
)
✗ ✗
( L
, + dzI= ✗2+92 ↳ + dz=
'
✗ + y
'
'
dz= ✗ '
L,
+ y -
g.
Ai ? Li
I Find G,
L,
?
i Project everything in x-y plane ¥Q=
T
tan G. =
G. = tail f)
✗
2+5=[42+4] Case 0-2512
☒ Find O-z.dz
⑦ z= tail ( Z - L,
)
yy
'
✗ +
dz=
'
Lz y' + (
'
+ ✗ + Z - L,)
dz = ✗ 2+5+(2--4)
'
- Lz
Laws used in geometric approach
☐ Pythagorean Theorem
C
b
92 +
bZ= C2
-
a
② SOHCAHTOA
sin (G) =
b
C
a
Cos (G) =
C
C
b
of •
tano)= be
a
③ Law of cosines
C
1) = a' + d- 2. a. c. cost)
%
Inverse Kinematics (Numerical Approach)
Q: Why?
Newton-Raphson Method:
r n
↳ initial
- guess
F- ( ✗ e.) by fcxol - o
f- ( xo )
= = =
Xo ✗
☐✗ Xo -
✗,
-
"
initial guess
"
9 → value at initial
guess
'
✗ ,
= Xo -
[f' (✗ dj fcxu)
General Equation :
"
✗n -11 = ✗n -
f ( ✗ ni 'f( ✗n )
Stopping Criteria:
Find: = ?
Given:
✗
E. [
= (4+92) Cos ( 9, )
Recall:
' '
F- .
f- =
91 =
91
-
§( ✗ jl a.
( 4+9276519 )
,
%
µ
92 ( L , -19 ,)sinC9 )
,
n+l n
9, 92
OF, OF
J=F ox, 0×2
c)Fz c) Fz
FZ
@✗ , 0×2
F. =
(4+92) Cos (9 ) ,
Fz= ( 4+9 ) ,
sin (9 ) ,
OF OF
= - ( 4+9 )Sin(9 ) , , ,
= Cost 9 )
,
29 ,
092
OF OF
= ( L -19 )Cos( 9.)
, , , = Sin( 9 ) ,
29 ,
092
9, 92
( L -19 )Sin(9 ) CosC9 )
g-=L
-
, , ,
, ,
"
9, 9, - ( 4+9 )Sin(9 ) , ,
cost 9 ) ( L , -19 ,)CosC9 ) -
z
= , ,
- -
I
It , F- ( In )
'
ÉC✗n)
Forward Velocity Kinematics
oi , i
9 j
& Forward Velocity Kinematics
,
iz
↳
1
l d- ✗
'
Ey
g n É
z
•X=J9
✓ 1h
velocity Jacobian Joint velocities
of .EE Matrix
Differentiation Approach
✗ E. E = ( L , -19 ) cos
,
( 9.)
d 091 ° 092
I =
✗
.
+
✗
•
09 , of
zg , gz
d b
ai ,
ai .
"
Translational velocity
velocity
" "
angular
"
c) ✗ = - ( L, +9 , ) 5inch )
09 ,
ox
= Cos (9 ) ,
092
I = -
(4+92) sin ( 9,79° +
Cos ( 9 ) -9 ,
, ,
←
-
ox
09 , 09,
similarly ,
D= I
.
y
- ( L , -19-2 )GsC9 )
( 4+921
,
Cos ( 9 )
,
-9 ,
FFF
Jacobian Matrix “General Approach”
01 :O
linear I -9 ,
"
9,
velocity j
of E. E É I
Angular Wy :
velocity Wz Gn
of E. E 6×1 N"
6in
g)
&
%
Jv ,
Jv , Jun
J =
↳ Rotational velocity
Q: How can we evaluate ( Jvi ) & ( Jwi ) for any joint based on its type?
Types of Joints
Revolute Prismatic
→ Direction of
Jvi = °Zi-1 velocity due to Ji
Jw :3Doesn’t contribute to
rotational velocity
Prismatic
Jv; = 2- i -
i
Jwi=[ :|
=> Revolute Joint
Jw Zi -1
Q: what about Jv ? i
V= W - r
Similarly,
•
•
Jv Zi ,
✗ Cow -
Oi )
, ,
↳ cross product
Recall: Dot product between 2-vectors
É j
=① vz=
✗2
--_c×,zz-z
✗, 9,2-2 - Z,Yz
v. , v. ✗ v5 ,
Z, Zz Xz Y , Z, X, Tz -
Y, ✗ z
?⃝
Types of Joints
Revolute Prismatic
Jv - i ✗( ON , ) -
i -1 Jwi=[ o o o
Example(1): RP-Robot
:p : / :| :
c. 9,
o
o
o
59
O
,
o
l -
☐
°
Zz
Oz
'
go yeah /
-59 (4+92) ( 9,
"
°T= c. 9, o 59
,
(4+92) 59,
2
0 I 0 O
O O O
f -
① 6×1
= Jv,
Jw ,
JVL
JWL 6×2
9 2×1
?⃝
I) For joint(2) -> prismatic
0
Jvz=°Zi→=°Z ,
=
09 ,
÷
II) For joint(1) -> revolute
°
Jw ,=°Ze , __°Zo=
:
Jv,=°Zi- , ✗ ( TN -00in ) ,
=
2-
c. ✗ Coz - °O°)
+ -
+
i j k -
( Li -19T) 5g ,
=
o o l =
1L , -1927C ,
(4+9219 (4+9,152 o o
|
I -
(4+92)<9 ,
C9 ,
yi ( L
, -19,759 , 59 ,
'
I o o 9,
=
☐ g.
Wy o o 2×1
Wz I o
6×1 d ↳ 6×2
Jw , Jwa
?⃝
Example(2): RR-Robot
Method(1): Diffrentiation
(G ) Lz since ,
YE .g= L, 5in
,
+
+ Gz)
IEE = 0×8 ,
+ 0×8 ,
00, 00-2
OTÉ 0T£
JEE =
06 ,
,
+
062
,
a) ✗ dy
|
= -
L 5
Lz 512 = L, C , + Lz Ciz
, -
gg , gg ,
ox o,
= - Lz 512 =
Lz Ch
O_0 , 00 ,
ÑE E -
-
L, S
,
-
Lzsiz - Lzsn É ,
JE E-
=
L, C, +
( 292 Lzciz ②2
Method(2): Using General Approach
=D
I
iy Jv, Tve
'" " ""
£ ⇐i
⇐
Wy Jw , Jw, 2×1
(3*1) (3×1)
Wz
6×1 6×2
H /?
→ °
"
oT,= S
,
C, o 45,
o o ° I -
/ / /
- C ,z 512 0 Llc, -11292
°Tz =
512 Ciz 0 L , S ,+LzS,z
O O , O
O O O l -
,=Zi→=°Zo=
o
Jw o
Jv ,=°Zi- , ✗ ( TN -00in ) ,
°O° )
☐
=
Zo ✗ ( Zz -
+ -
+
i j k -
LIS, -125,2
=
o o l =
L, C
,
+1242
44+129245 , + Lzsiz 0 0
?⃝
II) For joint(2) -> revolute
0
Jw;°Ze , -_°Z = o
Jv=°Zi-
2
, ✗ ( TN -00in ) ,
°O°)
☐
= 2-
,
✗ Coz -
+ -
+
j j k -
Lz 512
=
o o I = Lz Ciz
LLCIZ Lz 5,2 0
0
① |
I -
1,5 -125,2 ,
-
12512
j L
,
C
, + Lzciz L2 (
12
E- ° ° ⇐i
. ←
Wy o o
2×1
Wz 1 I
6×1 6×2
?⃝
Inverse Velocity Kinematics
ai , I -_ Joi i
9 j
& Forward Velocity Kinematics
,
if
↳
1
I d- ✗
'
Ey
g n É
z
Example: RP-Robot
(4+9215 C 09
I
-
, ,
= ,
7¥
y ( L , -19,1C Si
,
-
¥
- Inverse velocity kinematics
-1
i.
.
-
(↳+921s 9 ×
= ,
qj ( 4+9 )
,
e
,
5
,
j
1- det(J) = 0
?
-
Lis -125,2
,
-
Lzsiz
491-1292 Lzciz ?
Cases
of
D0fj< Doff .E Dofj-Dof.EE Dofg >☐ ⇐
" &
°y =
J % I
=J
9° ,
I
.
=
J %
Ñ
☒
É 3×2
2
2×2
92 y 2×3 %
z, , z✗ , z✗ , 2×1
zy , 3×1
J+=( JTJJIJT
"
J F- JTJJT )
Acceleration Kinematics
The map between Joint-space & Task-space:
ii
iii. is
1
\ Forward Velocity Kinematics y É
✗✗
I ✗y
in
Ñ=f°q )
4-
J
f
Joint-space Task-space
E-E
Joints Accelerations
Accelerations
Example: RP-Robot
(4+9215 C G
I
-
, ,
= ,
9,
""YF
y s
,
¥
Given: I -
- Toi
E- Jai Ii
Then +
'
Actual
Joint angels
Ñ=k* ✗ err
⑤ 7
Xd ✗err Controller ✗ Inverse velocity 9 9act
(MIMO) Kinematics ✗ volt
Desired
E- E
Pose
✗ act Actual
↳
E. E Pose
✗ Forward Position
9
Kinematics
Trajectory Planning
Joint-space
I /P o / P
Controller Plant
(MIMO)
+ -
Feedback
Path
"
Trajectory
"
Given:
1- start point
2- destination point
3- duration
Do the following :
1- Decompose the trajectory to equations (functions in time)
representing (x,y,z)
2- calculate inverse kinematics to compute joint values at each
time step
Given:
1- start point
2- destination point
3- duration
Do the following :
1- calculate values of joints at start & goal points
using inverse kinematics
2- define interpolation equation for each joint
Example: RP-Robot (Task-space Planning)
Given:
- start point : ①
- destination point :
- duration : to see
Find:
- Joint angels that make the
E.E move in straight line from
start to goal in the required
duration
Solution
✗ (t ) Xo ✗ it Yet )= Yo t
dy
=
+ + .
initial
goal q →
✗ =
✗ (t ) -
✗ (o)
✗
t
→ duration
-
Z -
Z
✗ = = -
, 4
✗ to
✗ (t ) = 2- ,4t
- Use table to compute joint velocities at each time step
" is 9,
t ✗ It 1=2 -
, 4. t tan (
✗
Co , - - -
not 92
Yet) = 2 -1,05 t .
✗2-1 y2 - L,
2 2 45 2,3
1,6 2,05
- 2 2,5
-
Solution / halves of
Joints to follow
Given:
- start point : ☐
2
- destination point :
- duration :
÷
Find:
- Joint angels that will move the
robot from start to goal smoothly
Solution
9 (t) = ao + 9
,
at + 92 .
É + 93 .
]
t + 94 .
t¥ ag .
É
Third-order Polynomial
- for simplicity we will use 3rd-order polynomial.
Always remember that we need to balance between
smoothness and execution time
t = 0 q(0) q(0)
t =T q(T)
i
q(T)
9 ( t) =
ao + 9. ot-az.tl + az.tl
9° (t) = a
, + 29 , . t +
3 a
}
.
the
-
at t=o at t= to
9 (o) = ao =
45 91101=45+921107+9,40}
§( o ) = 9, = o 91101=2921101+3921105
I
- equation of joint(1) 92 =
2
,
509
93 = 167
É
-
,
9 (t) = 45 +
2
,
so . t -
,
167 .
90=45; 9, = 0
;
92=2,5 ; 93=-1167 ;
9,
91=90+9 ,
-
t-ait-az.tt
t
similarly ,
compute
( o
,
- - -
,
10) bo bi bi bz
92
9i-botbi.t-bz.th-b.lt