Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

Robotics

Department of Electromechanical Engineering


Abu Dhabi Polytechnic

Module 5
Forward Kinematics
10-Oct-22 Robotics 1
Cosine Rule

10-Oct-22 Robotics 2
Introduction to Robot Kinematics
• Typically, the manipulator will be able to sense its own position in
some manner using internal sensors (position encoders located at
joints 1 and 2) that can measure directly the joint angles 1 and 2. We
also need therefore to express the positions A and B in terms of these
joint angles.
• This leads to the forward kinematics problem: motion of objects
without reference to the forces which cause the motion.
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

10-Oct-22 Symbolic Representation of Manipulators 4


Joints

• most manipulator joints are one of two types


1. revolute (or rotary)
• like a hinge
• allows relative rotation about a fixed axis between two links
• axis of rotation is the z axis by convention
2. prismatic (or linear)
• like a piston
• allows relative translation along a fixed axis between two links
• axis of translation is the z axis by convention
• our convention: joint i connects link i – 1 to link i
• when joint i is actuated, link i moves

10-Oct-22 Symbolic Representation of Manipulators 5


Joints

10-Oct-22 Robotics 6
Two Link manipulator Arm
Four Link manipulator Arm
Joint Variables
• revolute and prismatic joints are one degree of freedom (DOF)
joints; thus, they can be described using a single numeric value
called a joint variable
• qi : joint variable for joint i
1. revolute
• qi = qi : angle of rotation of link i relative to link i – 1
2. prismatic
• qi = di : displacement of link i relative to link i – 1

10-Oct-22 Symbolic Representation of Manipulators 9


Revolute Joint Variable
Revolute
• qi = θi : angle of rotation of link i relative to link i – 1
link i

θi
link i – 1

10-Oct-22 Symbolic Representation of Manipulators 10


Prismatic Joint Variable
Prismatic
• qi = di : displacement of link i relative to link i – 1

link i – 1 link i

di

10-Oct-22 Symbolic Representation of Manipulators 11


World or Base frame

• It is customary to establish a fixed coordinate system, called the world


or base frame to which all objects including the manipulator are
referenced. In this case we establish the base coordinate frame o(x0y0z0
) at the base of the robot
We are interested in two kinematics topics

Forward Kinematics (angles to position)


What you are given: The length of each link
The angle of each joint

What you can find: The position of any point


(i.e. it’s (x, y, z) coordinates

Inverse Kinematics (position to angles)


What you are given: The length of each link
The position of some point on the robot

What you can find: The angles of each joint needed to obtain
that position
Forward Kinematics
Given the joint variables and dimensions of the links what is the
position and orientation of the end effector?

a2

θ2

a1

θ1

10-Oct-22 Forward Kinematics 14


Two-Link Manipulator: FK
Forward Kinematics
Choose the base coordinate frame of the robot
• we want (x, y) to be expressed in this frame (x, y) ?

a2

θ2
y0

a1

θ1
x0

10-Oct-22 Forward Kinematics 16


Forward Kinematics
• Notice that link 1 moves in a circle centered on the base frame origin
(x, y) ?

a2

θ2
y0

a1

θ1 ( a1 cos θ1 , a1 sin θ1 )
x0

10-Oct-22 Forward Kinematics 17


Forward
ForwardKinematics
Kinematics
• choose a coordinate frame with origin located on joint 2 with the same
orientation as the base frame (x, y) ?

y1
a2

θ2
y0
θ1
a1 x1

θ1 ( a1 cos θ1 , a1 sin θ1 )
x0

10-Oct-22 Forward Kinematics 18


Forward
ForwardKinematics
Kinematics
• notice that link 2 moves in a circle centered on frame 1
(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

10-Oct-22 Forward Kinematics 19


Forward Kinematics
• because the base frame and frame 1 have the same orientation, we can
sum the coordinates to find the position of the end effector in the base
frame (a1 cos θ1 + a2 cos (θ1 + θ2),
a1 sin θ1 + a2 sin (θ1 + θ2) )

y1
a2
( a2 cos (θ1 + θ2),
θ2 a2 sin (θ1 + θ2) )
y0
θ1
a1 x1

θ1
( a1 cos θ1 , a1 sin θ1 )
x0

10-Oct-22 Forward Kinematics 20


Forward Kinematics
• we also want the orientation of frame 2 with respect to the base frame
• x2 and y2 expressed in terms
of x0 and y0 y2 x2

a2

θ2
y0
θ1
a1

θ1
x0

10-Oct-22 Forward Kinematics 21


Forward Kinematics
• without proof I claim:
y2 x2
x2 = (cos (θ1 + θ2),
sin (θ1 + θ2) )

y2 = (-sin (θ1 + θ2),


cos (θ1 + θ2) ) a2

θ2
y0
θ1
a1

θ1
x0

10-Oct-22 Forward Kinematics 22


Forward Kinematics

The coordinates (x, y) of the tool are expressed

in which α1 and α2 are the lengths of the two links, respectively


Orientation of the tool frame
• The orientation of the tool frame relative to the base frame is given
by the direction cosines of the x2 and y2 axes relative to the x0 and
y0 axes, that is,
Inverse Kinematics

• In order to command the robot to move to location A we need the the


joint variables θ1, θ2 in terms of the x and y coordinates of A. This is

the problem of inverse kinematics


Inverse Kinematics
y2 x2
• given the position (and possibly
the orientation) of the end (x, y)
effector, and the dimensions
a2
of the links, what are the joint
variables? θ2 ?
y0

a1

θ1 ?
x0

10-Oct-22 Inverse Kinematics 27


Inverse Kinematics
• harder than forward kinematics because there is often more than one
possible solution (x, y)

a2

y0

a1

x0

10-Oct-22 Inverse Kinematics 29


Inverse Kinematics

law of cosines
b 2 = a12 + a22 − 2a1a2 cos(π − θ 2 ) = x 2 + y 2 (x, y)

a2
b
θ2 ?
y0

a1

x0

10-Oct-22 Inverse Kinematics 30


Inverse Kinematics
x 2 + y 2 − a12 − a22
− cos(π − θ 2 ) =
and we have the trigonometric identity 2a1a2
− 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.

10-Oct-22 Inverse Kinematics 31


Inverse Kinematics
Instead, use the two trigonometric identities:
sin θ
sin 2 θ + cos 2 θ 2 = 1 tan θ =
cos θ
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

c2 = (x*x + y*y – a1*a1 – a2*a2) / (2*a1*a2);


s2 = sqrt(1 – c2*c2);
theta21 = atan2(s2, c2);
theta22 = atan2(-s2, c2);

10-Oct-22 Inverse Kinematics 32


Inverse Kinematics

• Exercise for the student: show that

 y −1  a2 sin θ 2 
θ1 = tan   − tan 
−1
 
x  a1 + a2 cos θ 2 

10-Oct-22 Inverse Kinematics 33


Inverse Kinematics
Forward Kinematics
The coordinates (x, y) of the tool are expressed

in which α1 and α2 are the lengths of the two links, respectively


Velocity Kinematics

You might also like