4.spatial Description
4.spatial Description
R O B OT I C S
(OEC-EE 703)
NIRMAL MURMU
D E PA RT M E N T O F A P P L I E D P H Y S IC S
U N I V E R S I TY O F C A LC U T TA
Department of Applied Physics, University of Calcutta
SYLLABUS
• Module 1: Basics of Robotics ( 10 Hours)
• Introduction, components and structure of robotics system.
INTRODUCTION TO ROBOTICS
• Industrial Manipulator
• Robot arm kinematics and dynamics
• Planning of manipulator trajectory
• Elementary steps for robot arm design
• Control of robot arm
• Force and Impedance Control
• Mobile Robot: Wheeled and legged robots, trajectory planning,
locomotion, SLAM.
OUTLINE
• Introductory overview
• Mathematical preliminaries
• Kinematics of serial manipulators
• Velocity analysis and statics of manipulator
• Dynamics of manipulators
• Trajectory planning
• Control of manipulators
ROBOT
“ A G OAL ORIENTED MAC HINE THAT CAN
S E N S E , P L A N A N D A C T. ”
(e) (d)
Fig: (a) Poster of the play “Rossum´s Universal Robots”, (b) Manipulator
(Industerial robot from ABB), (c) Honda’s Asimo humanoid robot, (d)
Wheeled robot- “Mars rover” (e) Quadcopter
ODD SEMESTER, 2022
Department of Applied Physics, University of Calcutta
INDUSTRIAL ROBOTS
• Mechanical manipulator
INTER-DISCIPLINARY
• Study of machines in static and dynamic situations:
Mechanical engineering
• Spatial motions and other attributes of manipulators:
Mathematics
• Designing and evaluating algorithms to realize desired
motions or force applications: Control theory
• Design of sensors and interfaces for industrial robots:
Electrical-engineering
• Programming these devices to perform a desired task:
Computer science
C O M P O N E N T S O F M A N I P U L ATO R
• Manipulators consist of nearly rigid links
• Links are connected by joints
• The joints are usually instrumented with position sensors
• For rotary or revolute joints, displacements are called joint angles
• Some manipulators contain sliding (or prismatic) joints, called the
joint offset
• Degrees of freedom: independent position variables
• Number of joints equals the number of degrees of freedom
K I N E M AT I C S
• Kinematics
The science of motion that treats the subject without
regard to the forces that cause it.
REFERENCE FRAME
• Robotic manipulation implies movement of its parts and tools
around in space
• All positions and orientations w.r.t the universe coordinate system
(Cartesian coordinate systems)
• Locate any point in the universe with a 3 x 1 position vector
• Body fixed reference frame
• Origin at the COM/COG of a rigid body
• Earth fixed reference frame
• Origin at the center of Earth
• Inertial reference frame
• Axes are align with star
D I R E C T & I N V E R S E K I N E M AT I C S
O F M A N I P U L ATO R S
• What are we trying to do ? (direct)
???
Go right
!!!
D I R E C T & I N V E R S E K I N E M AT I C S
O F M A N I P U L ATO R S
• What are we trying to do ? (inverse)
???
Take the
ball !!!
D I R E C T K I N E M AT I C S
I N V E R S E K I N E M AT I C S
D I R E C T & I N V E R S E K I N E M AT I C S
• Spatial description and transformation
oSpatial description
oTransformations
oPresentation of orientation
• Direct kinematics
• Inverse kinematics
S PAT I A L D E S C R I P T I O N A N D
T R A N S F O R M AT I O N
• We need to be able to describe the position and the
orientation of the robot’s parts.
• Suppose there’s a universe coordinate system to which
everything can be referenced.
S PAT I A L D E S C R I P T I O N A N D
T R A N S F O R M AT I O N
We need to be able to describe the position and the
orientation of the robot’s parts (relative to U)
P O S I T I O N S , O R I E N TAT I O N S A N D
FRAMES
• The position of a point p relative to a coordinate
system A (Ap)
𝑝𝑥
Ap = 𝑝
A
𝑦
ZA p
𝑝𝑧
YA
XA
P O S I T I O N S , O R I E N TAT I O N S A N D
FRAMES
• The orientation of a body is described by
• a coordinate system {B} attached to the body, and
• write the unit vectors of its three principal axes2 in terms of the
coordinate system {A}.
ZA ZB
XB YA
{B} relative
XA YB to (A)
P O S I T I O N S , O R I E N TAT I O N S A N D
FRAMES
• Write {B} coordinate system w.r.t {A}, known as rotation
matrix
P O S I T I O N S , O R I E N TAT I O N S A N D
FRAMES
• The orientation of a body is described by a coordinate
system B attached to the body, relative to A (a known
coordinate system). Projection of axis
𝐴 𝐴𝑋 𝐴𝑌 𝐴𝑍 of {B} on the
𝐵𝑅 = 𝐵 𝐵 𝐵 each axis of {A}
𝑋𝐵 ⋅ 𝑋𝐴 𝑌𝐵 ⋅ 𝑋𝐴 𝑍𝐵 ⋅ 𝑋𝐴
= 𝑋𝐵 ⋅ 𝑌𝐴 𝑌𝐵 ⋅ 𝑌𝐴 𝑍𝐵 ⋅ 𝑌𝐴
𝑋𝐵 ⋅ 𝑍𝐴 𝑌𝐵 ⋅ 𝑍𝐴 𝑍𝐵 ⋅ 𝑍𝐴
cosinus of the angle
2.
Department of Applied Physics, University of Calcutta
Department of Applied Physics, University of Calcutta
P O S I T I O N S , O R I E N TAT I O N S A N D
FRAMES
• A frame is a set of 4 vectors giving the position and
orientation.
ZB
• Example: frame B
A
P Borg
𝐴 𝐴𝑃 ZA
𝐵 = 𝐵 𝑅, 𝐵𝑜𝑟𝑔
XB
YB
YA
location
orientation
XA
• Positions is a frame with identity rotation-matrix
• Orientation is a frame with zero vector position-vector
P O S I T I O N S , O R I E N TAT I O N S A N D
FRAMES
{A} is known
relative to {U}
P O S I T I O N S , O R I E N TAT I O N S A N D
FRAMES
• Remember the robot’s part:
ZB
A
ZA P Borg
XB
YB
YA
orientation
XA position
D I R E C T & I N V E R S E K I N E M AT I C S
• Spatial description and transformation
oSpatial description
oTransformations
oPresentation of orientation
• Direct kinematics
• Inverse kinematics
MAPPING
• Until now, we say how to describe positions,
orientations and frames.
• We need to be able to change descriptions from one
frame to another: mapping.
• Mappings:
• translated frames
• rotated frames
• general frames
M A P P I N G S I N VO LV I N G
T R A N S L AT E D F R A M E S
• Expressing a point Bp in terms of frame {A}, when {A}
has the same orientation as {B}:
𝐴𝑝 =𝐵 𝑝 +𝐴 𝑝𝐵𝑜𝑟𝑔
B
A p
p ZB
A
pBorg
ZA YB
XB
YA
XA
M A P P I N G S I N V O LV I N G R OTAT E D
FRAMES
• Expressing a vector Bp in terms of frame {A}, when the
origins of frames {A} and {B} are coincident:
B
ZB p
ZA
XB YA
XA YB
ODD SEMESTER, 2022
Department of Applied Physics, University of Calcutta
M A P P I N G S I N V O LV I N G R OTAT E D
FRAMES
• Ap‘s components are Bp’s projections onto the unit
directions of {A}.
• Remember the rotation matrix : 𝐵𝐴𝑅
it’s columns are the unit vectors of {B} expressed in {A}.
𝐴 𝐵
• Thus: 𝐴𝑃 =𝐵 𝑅 𝑃
M A P P I N G S I N V O LV I N G R OTAT E D
FRAMES: EXAMPLE
• Given: Frame {B} is rotated relative to frame {A} about
Z by 30 degrees, and BP.
Calculate: AP
YA YB
B
p
ZA =ZB XA
XB
M A P P I N G S I N V O LV I N G R OTAT E D
FRAMES: EXAMPLE
• Solution:
𝑋𝐵 ⋅ 𝑋𝐴 𝑌𝐵 ⋅ 𝑋𝐴 𝑍𝐵 ⋅ 𝑋𝐴
𝐴
𝐵𝑅 = 𝑋𝐵 ⋅ 𝑌𝐴 𝑌𝐵 ⋅ 𝑌𝐴 𝑍𝐵 ⋅ 𝑌𝐴
𝑋𝐵 ⋅ 𝑍𝐴 𝑌𝐵 ⋅ 𝑍𝐴 𝑍𝐵 ⋅ 𝑍𝐴
cos 3 0∘ cos 1 20∘ 0
= cos 6 0∘ cos 3 0∘ 0
0 0 1
And:
𝐴𝑃 = 𝐴𝑅 𝐵𝑃
𝐵
M A P P I N G S I N VO LV I N G G E N E R A L
FRAMES
• {𝐴} and {𝐵} has different origins and orientations.
• Vector offset between origins: 𝐴𝑝𝐵𝑜𝑟𝑔
• {𝐵} is rotated in respect to {𝐴}: 𝐵𝐴𝑅
B
A ZB p
p
A
pBorg
ZA
XB
YB
YA
XA
M A P P I N G S I N VO LV I N G G E N E R A L
FRAMES
• First, describe 𝐵𝑝 relative to a frame that has the same
orientation of {𝐴}, but whose origin coincides with the
origin of {𝐵}
• Then add 𝐴𝑝𝐵𝑜𝑟𝑔 for the translation
𝐴
• Thus:𝐴𝑃 =𝐵 𝑅 𝐵 𝑃 +𝐴 𝑃𝐵𝑜𝑟𝑔 A
p ZB
B
p
A
pBorg
ZA
XB
YB
YA
XA
M A P P I N G S I N VO LV I N G G E N E R A L
FRAMES
• “Homogeneous transform”:
𝐴𝑃 𝐴 𝐴𝑃 𝐵𝑃
= 𝐵𝑅 𝐵𝑜𝑟𝑔
1 0 0 0 1 1
𝐴
⇒ 𝑃 =𝐵𝐴 𝑇 𝐵 𝑃
M U LT I P L I C AT I O N O F
TRANSFORMS
• Given Cp. We want to find Ap.
ZC
C
p
A ZB
p
YC
XC
ZA
XB
YB
YA
XA
COMPOUND TRANSFORMS
• Given Cp. We want to find Ap.
• Frame {𝐶} is known relative to frame {𝐵}, and frame
{𝐵} is known relative to frame {𝐴}.
𝐴
𝐵𝑃 =𝐵𝐶 𝑇𝐶 𝑃 𝑎𝑛𝑑 𝑃 =𝐵𝐴 𝑇 𝐵 𝑃
𝐴
⇒ 𝐶
𝑇 =𝐵𝐴 𝑇𝐶𝐵 𝑇
𝐴 𝐵 𝐴 𝐵
𝐵𝑅 𝐶 𝑅 𝐵𝑅 𝑃𝐶𝑜𝑟𝑔 + 𝐴 𝑃𝐵𝑜𝑟𝑔
=
0 0 0 1
INVERTING A TRANSFORM
• Frame {𝐵} is known relative to frame {𝐴}
• We want the description “frame {𝐴} relative to frame
{𝐵}”
• Straightforward way: Compute the inverse matrix (of a
4x4 matrix)
INVERTING A TRANSFORM
• Frame {𝐵} is known relative to frame {𝐴}
• We want the description “frame {𝐴} relative to frame
Calculate the
{𝐵}” inversion of
transform
• Better way: with the
knowledge of
0 =𝐵 (𝐴 𝑃𝐵𝑜𝑟𝑔 ) =BA 𝑅 𝐴 𝑃𝐵𝑜𝑟𝑔 +𝐵 𝑃𝐴𝑜𝑟𝑔 𝐴 𝑇
𝐵𝑅
⇒ 𝐵𝑃𝐴𝑜𝑟𝑔 = −BA 𝑅 𝐴 𝑃𝐵𝑜𝑟𝑔 = − 𝐵𝐴𝑅𝑇 𝐴𝑃𝐵𝑜𝑟𝑔
𝐴 𝑇
𝐵
𝐵𝑅 − 𝐵𝐴𝑅𝑇 𝐴𝑃𝐵𝑜𝑟𝑔
⇒ 𝐴
𝑇=
0 0 0 1
INVERTING A TRANSFORM
• Frame {𝐵} is known relative to frame {𝐴}
• We want the description “frame {𝐴} relative to frame
{𝐵}”
• Better way:
𝐴 𝑇 𝐴
⇒
𝐵
𝑇= 𝐵𝑅 −𝐵𝐴 𝑅𝑇 𝑃𝐵𝑜𝑟𝑔
𝐴
0 0 0 1
EXAMPLE: INVERTING A
TRANSFORM
• Description of {𝐵}w.r.t.{𝐴} is as follows,
• Rotation about 𝑍መ is 30° and translation about 𝑋 is 4 unit and
about 𝑌 is 3 unit
EXAMPLE: INVERTING A
TRANSFORM
𝐴𝑃 𝐴 𝐴𝑃 𝐵𝑃
= 𝐵𝑅 𝐵𝑜𝑟𝑔
1 0 0 0 1 1
𝐴
⇒ 𝑃 =𝐵𝐴 𝑇 𝐵 𝑃
EXAMPLE: INVERTING A
TRANSFORM
𝐵 𝐴 𝑇 𝐴 𝑇𝐴
⇒ 𝑇= 𝐵𝑅 −𝐵 𝑅 𝑃𝐵𝑜𝑟𝑔
𝐴
0 0 0 1
T R A N S F O R M E Q UAT I O N S :
G R A P H I C A L R E P R E S E N TAT I O N
• In graphical representation, the arrow head indicate in
which way frames are defined
𝑈
𝐶𝑇 = 𝑈𝐵𝑇 𝐵𝐶 𝑇
T R A N S F O R M AT I O N S : E X A M P L E
D I R E C T & I N V E R S E K I N E M AT I C S
• Spatial description and transformation
oSpatial description
oTransformations
oPresentation of orientation
• Direct kinematics
• Inverse kinematics
P R E S E N TAT I O N O F O R I E N TAT I O N
• Rotation matrices are useful as operator.
• Still, it’s “unnatural” to have to give elements of a matrix with
orthonormal columns as input.
• Rotations don't generally commute. That is, is not 𝐵𝐴𝑅 𝐵𝑐𝑅 the same
as 𝐵𝑐𝑅 𝐵𝐴𝑅
• There are several presentations which make that input process
easier:
• Fixed angles
• Euler angles
• Euler parameters
• Quaternions
FIXED ANGLES
• Start with the frame coincident with a known reference frame {A}
• Rotate {B} first about 𝑋𝐴 by an angle 𝛾, then about 𝑌𝐴 by an angle
𝛽 and, finally, about 𝑍መ𝐴 by an angle 𝛼.
𝑟21 𝑟11
➢𝛼 = 𝐴𝑡𝑎𝑛2 ,
𝑐𝛽 𝑐𝛽
𝑟32 𝑟33
➢𝛾 = 𝐴𝑡𝑎𝑛2 ,
𝑐𝛽 𝑐𝛽
EULER ANGLES
• Z-Y-X Euler angles
• Start with 2 frames: a moving reference(Euler angles) frame {B}
and a coinciding fixed frame {A}
• First rotate {B} by 𝛼 about ZB, then by 𝛽 about YBand finally by
𝛾 about XB.
EULER ANGLES
• Z-Y-X Euler angles
• The equivalent rotation matrix is:
𝑐𝛼 −𝑠𝛼 0 𝑐𝛽 0 𝑠𝛽 1 0 0
𝐴
𝐵 𝑅𝑍′𝑌′𝑋′ (𝛼, 𝛽, 𝛾) = 𝑠𝛼 𝑐𝛼 0 0 1 0 0 𝑐𝛾 −𝑠𝛾
0 0 1 −𝑠𝛽 0 𝑐𝛽 0 𝑠𝛾 𝑐𝛾
The final result
is the same as 𝑐𝛼𝑐𝛽 𝑐𝛼𝑠𝛽𝑠𝛾 − 𝑠𝛼𝑐𝛾 𝑐𝛼𝑠𝛽𝑐𝛾 + 𝑠𝛼𝑠𝛾
X-Y-Z fixed = 𝑠𝛼𝑐𝛽 𝑠𝛼𝑠𝛽𝑠𝛾 + 𝑐𝛼𝑐𝛾 𝑠𝛼𝑠𝛽𝑐𝛾 − 𝑐𝛼𝑠𝛾
angles!!! −𝑠𝛽 𝑐𝛽𝑠𝛾 𝑐𝛽𝑐𝛾
GIMBAL LOCK
• When an orientation sensor uses Euler Angles, it will
always fail to produce reliable estimates when the
pitch angle approaches 90°. This is a fundamental
problem of Euler Angles called Gimbal Lock.
• To solve this problem, unit-quaternions are used to
represent the orientation.
GIMBAL LOCK
▪ Gimbal locked
▪ Pitch (green) and yaw (magenta)
gimbals become aligned, changes to
roll (blue) and yaw apply the same
rotation to the airplane
(1 − cos 𝜃)
E U L E R PA R A M E T E R S
• Given an equivalent axis 𝐾 = [𝑘𝑋 𝑘𝑌 𝑘𝑍 ]𝑇 (an unit vector we want to rotate
about) and an angle 𝜃, the Euler parameters (unit quaternion) are defined as:
𝜃 𝜃 𝜃
𝜀1 = 𝑘𝑋 sin , 𝜀2 = 𝑘𝑌 sin , 𝜀3 = 𝑘𝑍 sin ,
2 2 2
𝜃
𝜀4 = cos
2
𝜀12 + 𝜀22 + 𝜀32 + 𝜀42 = 1
• The rotation matrix 𝑅𝜀 is:
V E C TO R R E P R E S E N TAT I O N
• Two vectors are equal if they have the same
dimensions, magnitude, and direction, e.g.
velocity
• Two vectors are equivalent in a certain capacity if
each produces the very same effect in this
capacity, e.g. distance
• Line vector refers to a vector that is dependent on
its line of action
• Free vector refers to a vector that may be
positioned anywhere without loss or change of
meaning, e.g. moment
K I N E M AT I C S
• The science of motion without regard to the forces
that cause it
• Within the science of kinematics, one studies
• position, velocity, the acceleration, and all higher order
derivatives of the position variables