Robot ModdelingLecture1Y4
Robot ModdelingLecture1Y4
Omar TAHRI
University of Burgundy
[email protected]
Useful formulas for robot modelling
• Rotation representation
• Homogeneous coordinates/Rigid transformation
Notations
2-D EUCLIDEAN SPACE
Rotation in a plane
𝒆𝟐
𝒆′𝟏
𝒆′𝟐
𝜃
𝒆𝟏
𝒆′𝟏
𝒆′𝟐 𝜃
𝜃
𝒆𝟏
𝑐𝛳 −𝑠𝛳
𝐑= ; c𝜃 = cos 𝜃 𝑎𝑛𝑑 s𝜃 = sin 𝜃
𝑠𝛳 𝑐𝛳
det 𝑹 ? 𝑎𝑛𝑑 𝑹−1 ?
2-D EUCLIDEAN SPACE
Rotation in a plane
𝑐𝛳 −𝑠𝛳
𝐑= ; c𝜃 = cos 𝜃 𝑎𝑛𝑑 s𝜃 = sin 𝜃
𝑠𝛳 𝑐𝛳
det 𝑹 ? 𝑎𝑛𝑑 𝑹−1 ?
det 𝑹 = c𝜃 2 + s𝜃 2 = 1 (1)
c𝜃 𝑠𝜃
𝑹−1 = = 𝑹⊤
−𝑠𝜃 c𝜃
𝑹𝑹⊤ = 𝑰 (2)
𝒆𝟐
𝒆′𝟏
𝒆′𝟐
𝜃
𝒆𝟏
𝑥′
• Let be the coordinates of a point 𝒑 in the frame defined
𝑦′
by the doublet (𝒆′𝟏 , 𝒆′𝟐 ).
𝑥′ 𝜃
𝑥 𝒆𝟏
𝑥′
• Let be the coordinates of a point 𝒑 in the frame defined by the doublet
𝑦′
(𝒆′𝟏 , 𝒆′𝟐 ) :
𝒑 = 𝒙′ 𝒆′𝟏 + 𝒚′ 𝒆′𝟐 = 𝒙′ 𝒄θ𝒆𝟏 + 𝒔θ𝒆𝟐 + 𝒚′ −𝒔θ𝒆𝟏 + 𝒄θ𝒆𝟐
𝒑 = (𝑥 ′ 𝑐𝜃 − 𝑠𝜃𝑦′)𝒆𝟏 + (𝑥 ′ 𝑠𝜃 + 𝑐𝜃𝑦′)𝒆𝟐
𝑥′ 𝜃
𝑥 𝒆𝟏
𝑥′
• Let be the coordinates of a point 𝒑 in the frame defined by the doublet
𝑦′
(𝒆′𝟏 , 𝒆′𝟐 ) :
𝒑 = 𝒙′ 𝒆′𝟏 + 𝒚′ 𝒆′𝟐 = 𝒙′ 𝒄θ𝒆𝟏 + 𝒔θ𝒆𝟐 + 𝒚′ −𝒔θ𝒆𝟏 + 𝒄θ𝒆𝟐
𝒑 = (𝑥 ′ 𝑐𝜃 − 𝑠𝜃𝑦′)𝒆𝟏 + (𝑥 ′ 𝑐𝜃 + 𝑐𝜃𝑦′)𝒆𝟐
𝑥′ 𝜃
𝑡𝑦 𝒆𝟏𝒕
𝒆𝟐 The frame 𝐹′defined by (𝒆′𝟏 , 𝒆′𝟐 ) is obtained by
translating, then rotating the frame F defined
(𝒆𝟏 , 𝒆𝟐 )
𝒆𝟏 𝑥 𝑡
𝑥
• We can show
𝑥 c𝜃 −𝑠𝜃 𝑡𝑥 𝑥′
𝑥 c𝜃 −𝑠𝜃 𝑥′ 𝑡𝑥 𝑦 = s𝜃 c𝜃 𝑡𝑦 𝑦′
𝑦 = + 𝑡
𝑠𝜃 c𝜃 𝑦′ 𝑦 1 0 0 1 1
2-D EUCLIDEAN SPACE
Point coordinates transformation after a rotational and a translational
𝒆𝟐𝒕 motions
𝒑
𝑦
𝒆′𝟐 𝒆′𝟏
𝑦′
𝑥′ 𝜃
𝑡𝑦 𝒆𝟏𝒕
𝒆𝟐 The frame 𝐹′defined by (𝒆′𝟏 , 𝒆′𝟐 ) is obtained by
translating, then rotating the frame F defined
(𝒆𝟏 , 𝒆𝟐 )
𝒆𝟏 𝑥 𝑡
𝑥
• We can show 𝑥 c𝜃 −𝑠𝜃 𝑡𝑥 𝑥′ 𝑥′
𝑥 c𝜃 −𝑠𝜃 𝑥′ 𝑡𝑥 𝑦 = s𝜃 c𝜃 𝑡𝑦
= + 𝑡 𝑦′ = 𝑻 𝑦′
𝑦 𝑠𝜃 c𝜃 𝑦′ 𝑦 1 0 0 1 1 1
𝑹 𝒕
Where 𝐓 = is an homogenous transformation
0 0 1
2-D EUCLIDEAN SPACE
𝒆′𝟐 𝒆′𝟏
𝑡𝑦2 𝑡𝑥2
𝜃1
𝑡𝑦1
𝒆𝟐
𝒆𝟏 𝑡𝑥1
𝒆′𝟐 𝒆′𝟏
𝑡𝑥2
𝜃1
𝑡𝑦1
𝒆𝟐
𝒆𝟏
𝑷
3-D EUCLIDEAN SPACE
Spherical coordinates
𝜃 𝑟
𝜑
3-D EUCLIDEAN SPACE
Cylindrical coordinates
𝜑 𝜌
3-D EUCLIDEAN SPACE - Vectors
• Cross Product:
: v 2 u3 − v 3 u 2 0 −v 3 v
2
v u = v u − v u = v u with v = v 0 −v
3 1 1 3 3 1
v u − v u
1 2 2 1 − v 2 v1 0
3D rotations
• 3D Rotation matrix
3D rotations
• 3D Rotation matrix
3D rotations
• 3D Rotation matrix
R=R R R ( ) ( ) ( )
R=R R R ( ) ( ) ( )
R=
cos cos − sin cos sin cos sin + sin cos cos sin sin
− sin cos − cos cos sin − sin sin + cos cos cos cos sin
sin sin − sin cos cos
Rotations
• Rotation from Euler angles:
✓ Gimbal Lock
Rotations
• Rotation from Euler angles: Gimbal Lock poblem
▪ Consider a three consecutive rotation around ZXZ
▪ If β =0
Changing the values or will have the same effect: a rotation around
Z. This means a lost of one degree of freedom
• Other examples of Gimbal lock problem (Refer to the shared
Matlab files)
Rotation defined by a rotation vector
u = u x uy uz
Right hand rule
Rotation defined by a rotation vector u
u = u x uy uz
• Rodrigues’ formula
0 − uz uy
u = u z 0 −u x
− u y ux 0
Rotation defined by a rotation vector u
u = u x uy uz
• Rodrigue’s formula
R = I + sin( ) u + (1 − cos( ))u u
0 − uz uy
u = u z 0 −u x
− u y ux 0
• and u can be obtained from the rotation matrix in the same way
as it is done for quaternions
Rotation defined by a rotation vector u
u = u x uy uz
• Rodrigue’s formula
R = I + sin( ) u + (1 − cos( ))u u
Tapez une équation ici.
0 − uz uy
u = u z 0 −u x
− u y ux 0
• and u can be obtained from the rotation matrix in the same way
as for quaternions
• The rotation vector is an invariant to its corresponding rotation
matrix Ru = u
• u suffers from discontinuity around π
Rotations: quaternions
• Invented by Sir William Hamilton (1843)
• Addition/subtraction:
𝑞10 + 𝑞11 𝑖 + 𝑞12 𝑗 + 𝑞13 𝑘 + 𝑞20 + 𝑞21 𝑖 + 𝑞22 𝑗 + 𝑞23 𝑘 = (𝑞10 +𝑞20 ) + (𝑞11 +𝑞21 )i + ⋯
𝑞10 + 𝑞11 𝑖 + 𝑞12 𝑗 + 𝑞13 𝑘 − 𝑞10 + 𝑞21 𝑖 + 𝑞22 𝑗 + 𝑞23 𝑘 = (𝑞10 −𝑞20 ) + (𝑞11 −𝑞21 )i + ⋯
• Conjugate:
𝑄 = 𝑞0 + 𝑞1 𝑖 + 𝑞2 𝑗 + 𝑞3 𝑘
𝑄′ = 𝑞0 − 𝑞1 𝑖 − 𝑞2 𝑗 − 𝑞3 𝑘
• Inverse of a quaternion:
𝑄1 𝑄1−1 = 1; 𝑄1−1 ?
𝑄𝑄′ = 𝑄 2 𝑄1−1 = 𝑄′ / 𝑄 2
From quaternion vector to rotation matrix R
q + q − q − q 2( q q − q q ) 2( q q + q q )
2 2 2 2
0 1 2 3 1 2 0 3 1 3 0 2
R = 2( q q + q q ) q −q +q −q
2 2 2 2
2( q q − q q )
1 2 0 3 0 1 2 3 2 3 0 1
2( q q − q q ) 2( q q + q q ) q −q −q +q
2 2 2 2
1 3 0 2 2 3 0 1 0 1 2 3
q2
0 = (1 + r11 + r22 + r33 )
1
q0 q1 = 1
4
(r32 − r23 )
4
q0 q2 = 14 (r13 − r31 )
= (1 + r11 − r22 − r33 )
1
q12
4 q0 q3 = 14 (r21 − r12 )
q1q2 = 14 (r12 + r21 )
= (1 − r11 + r22 − r33 )
1
q22
4 q1q3 = 14 (r13 + r31 )
q32 = (1 − r11 − r22 + r33 )
1 q2 q3 = 14 (r23 + r32 )
4
Rotation of a point/vector using quaternions
• Let us consider :
• Ex: Prove (1) and (2) using the quaternion product formula and
the expression of the rotation matrix from quaternions
Rotation of a point/vector using quaternions
• Lets us consider two rotational motions corresponding to two
unitary quaternions 𝑸𝟏 and 𝑸𝟐
• Mathematically stable
Frame change : rigid motion
• Rigid motion: combination of a rotation and a translation:
• The relation between the coordinates of point in two different frames is
given by
• For a vector: ?
Homogenous transformation in 3D
• Rigid transformation: combination of a rotation and a translation:
• The relation between the coordinates of point in two different frames is
given by
• Homogenous 3D coordinates
𝑥𝑒
Kinematics of Manipulators
Forward and Inverse Kinematics
• Serial robot:
▪ The forward kinematics problem has a unique solution
▪ The inverse kinematic problem for that same robot arm may have more
than one solution.
• Parallel manipulators,
▪ the forward kinematics has more than one solution
Link 1
𝑥1 Link 2
𝑦2
𝑧1 𝑦
1
𝛼 𝛽 𝑶𝟐
𝑙2 𝑙3
𝑥2
𝑶𝟏 𝑧0 𝑧2
Link 0 𝑥0
𝑑>0
𝑙1
𝑦0
𝑶𝟎
Base
Kinematics of Manipulators
Forward and Inverse Kinematics
Ex : find 𝑻02
Link 1
𝑥1 Link 2
𝑦2
𝑧1 𝑦
1
𝛼 𝛽 𝑶𝟐
𝑙2 𝑙3
𝑥2
𝑶𝟏 𝑧0 𝑧2
Link 0 𝑥0
𝑑>0 • is rigidly attached to the base
• is rigidly attached to the link 1
𝑙1 • is rigidly attached to the link2
𝑦0 • 𝛼 = 𝛽 = 0 : the robot arm is in a
𝑶𝟎
horizontal posture
Base
Kinematics of Manipulators
Forward and Inverse Kinematics
Ex : find 𝑻02
Link 1
𝑥1 Link 2
𝑦2
𝑧1 𝑦
1
𝛼 𝛽 𝑶𝟐
𝑙2 𝑙3
𝑥2
𝑶𝟏 𝑧0 𝑧2
Link 0 𝑥0
𝑑>0
𝑙1
𝑦0
𝑶𝟎
Base
Kinematics of Manipulators
Forward and Inverse Kinematics
Ex : find 𝑻02
Link 1
𝑥1 Link 2
𝑦2
𝑧1 𝑦
1
𝛼 𝛽 𝑶𝟐
𝑙2 𝑙3
𝑥2
𝑶𝟏 𝑧0 𝑧2
Link 0 𝑥0
𝑑>0
𝑙1
• Check for 𝛼 = 𝛽 = 0 : horizontal posture
𝑦0 𝜋
𝑶𝟎 • Check for 𝛼 = − 2 𝑎𝑛𝑑 𝛽 = 0 : vertical posture
Base
Kinematics of Manipulators
Link n
Link n-1
𝑞2 𝑞𝑛
Link 1
𝑞1
Link 0
General idea
• Attach a frame to each link of the robot
• Compute the homogeneous transformation between consecutive frames
• Deduce the homogeneous transformation between the robot base and the
end-effector/tools
Link: corps
Joint: articulation
Kinematics of Manipulators
Denavit/Hartenberg parameters : 4 parameters to describe the
motion between two consecutives links
• Link parameters
▪ The link length (𝑎𝑖−1 ): is the shortest distance
between the two joint axes 𝑖 and 𝑖 + 1
• Joint parameters:
▪ The link offset: the distance along the common joint axis from the
end of the link 𝑖 − 1 to the beginning of the link 𝑖.
▪ The joint angle: the relative rotation of link 𝑖 with respect to link
𝑖 − 1 , around the common joint axis 𝑖.
Kinematics of Manipulators
Defining the Link Reference Systems (DH method)
a. The origin of is defined as the intersection of the joint axis 𝑖 and the
line of the link length 𝑎𝑖
b. The axis 𝒛𝒊 is defined to be along the joint axis 𝑖 with a direction taking into
account the positive displacement unique definition
c. The axis 𝒙𝒊 of fig is defined to be along the line of the link length 𝑎𝑖 , with
the positive direction being from the joint axis 𝑖 to the joint axis 𝑖 + 1.
d. From 𝒙𝒊 and 𝒛𝒊 , the axis 𝒚𝒊 is defined such that the corresponding frame a
right-handed reference system.
Kinematics of Manipulators
Homogeneous transformation 𝑻𝑖−1,𝑖 from DH parameters
𝑻𝑖−1,𝑖 =
Kinematics of Manipulators
Defining the Link Reference Systems (DH method)
• For the first link 0: the fixed base of the robot arm
a. The axis 𝒛𝟎 is defined to be along the joint 1
b.
Kinematics of Manipulators
Defining the Link Reference Systems (DH method)
a.
b.
Kinematics of Manipulators
Denavit and Hartenberg method (D-H method)
• Example 6: six dofs Anthropomorphic robot (IRB 1400)
6 dofs robot
Lab : implement symbolic Matlab program to compute the forward kinematics:
▪ Define the reference systems according to DH
▪ Study the 3 first dofs and 3 last (wrist)
▪ Check your obtained result
Kinematics of Manipulators
Inverse Kinematics
• Problem: find the joint positions that are needed to put the
reference system in a specified position and orientation, with
respect to the base reference system.
• There are basically two kinds of methods for obtaining solutions for
the inverse kinematics:
▪ Analytical methods that give closed form solutions: not always possible
▪ Numerical methods that give iterative solutions.
Kinematics of Manipulators
Inverse Kinematics
• Find 𝛼 𝛽 𝑑 such that 𝑶𝒆 coincides with the point
𝛼 = 𝛽 = 0 : vertical posture
Link 2 𝛽
Link 3
𝑦𝑒
𝑧𝑒
𝛼 𝑶𝒆𝟐
𝑙2 𝑙3
𝑥𝑒
𝑧0
Link 1 𝑥0
𝑑>0
𝑙1
𝑦0
𝑶𝟎
𝑈𝑠𝑖𝑛𝑔 𝑚𝑎𝑡𝑙𝑎𝑏 𝑓𝑖𝑙𝑒𝑠
Base
Kinematics of Manipulators
Inverse Kinematics
• Find 𝛼 𝛽 𝑑 such that 𝑶𝒆 coincides with the point
(1)
(2)
(3)
(4)
(3)+(4)
𝐼𝑓 − 1 ≤ 𝑐 ≤ 1
Kinematics of Manipulators
Inverse Kinematics
• Find 𝛼 𝛽 𝑑 such that 𝑶𝒆 coincides with the point
With:
IRB 1400
Axis 3
Axis 1
𝒙𝟒 𝒙𝟔
𝑑1 𝑑4 𝒙𝟓
𝒙𝟑
𝒛𝟒
Axis 4 Axis 6
𝑑3
𝒛𝟔
𝒛𝟑 𝒛𝟓
𝑑2
𝒛𝟏 𝒙𝟐
Axis 5
𝒙𝟏
𝒛𝟎 𝑑0
𝒛𝟐
𝒙𝟎
Axis 2
Kinematics of Manipulators
Inverse Kinematics
• Find 𝛼 𝛽 𝑑 such that 𝑶𝒆 coincides with the point
𝛼 = 𝛽 = 0 : vertical posture
Link 2 𝛽
Link 3
𝑦𝑒
𝑧𝑒
𝛼 𝑶𝒆𝟐
𝑙2 𝑙3
𝑥𝑒
𝑧0
Link 1 𝑥0
𝑑>0
𝑙1
𝑦0
𝑶𝟎
𝑈𝑠𝑖𝑛𝑔 𝑚𝑎𝑡𝑙𝑎𝑏 𝑓𝑖𝑙𝑒𝑠
Base
Kinematics of Manipulators
Cartesian speeds
𝑑𝑡𝑥
𝑡ሶ𝑥 = =?
𝑡𝑥 = 𝑙1 + 𝑙3 cos(𝛼 + 𝛽) + 𝑙2 cos(𝛼) 𝑑𝑡
𝑑𝑡𝑦
൞ 𝑡𝑦 = 𝑙1 + 𝑙3 sin(𝛼 + 𝛽) + 𝑙2 sin(𝛼) 𝑡ሶ𝑦 = =?
𝑡𝑧 = 𝑑 𝑑𝑡
𝑑𝑡𝑧
𝑡ሶ𝑧 = =?
𝑑𝑡
Kinematics of Manipulators
Cartesian speeds
𝑑𝑡𝑥
𝑡ሶ𝑥 = = −𝑙3 𝛼ሶ + 𝛽ሶ sin 𝛼 + 𝛽 − 𝑙2 𝛼ሶ sin 𝛼
𝑡𝑥 = 𝑙1 + 𝑙3 cos(𝛼 + 𝛽) + 𝑙2 cos(𝛼) 𝑑𝑡
𝑑𝑡𝑦
൞ 𝑡𝑦 = 𝑙1 + 𝑙3 sin(𝛼 + 𝛽) + 𝑙2 sin(𝛼) 𝑡ሶ𝑦 = = 𝑙3 𝛼ሶ + 𝛽ሶ cos 𝛼 + 𝛽 + 𝑙2 𝛼ሶ cos 𝛼
𝑑𝑡
𝑡𝑧 = 𝑑 𝑑𝑡𝑧
𝑡ሶ𝑧 = = 𝑑ሶ
𝑑𝑡