Robotics Tapas
Robotics Tapas
IE410-Introduction to Robotics
1
Recent Trends in IT
1990 1995 2000 2005 2010 2015 2020 2025 2050
Rise of AI/ML
OpenCV
Robotics RTM Robot-Operating-System
Industry 4.0
3
Implementation of Robots
4
Types of Robots
Source: Sensors for Drone and Robots, March 2016, Yole Development
5
Quiz: What are the common components?
https://pixabay.com/en/computer-desktop-modern-device-154114/
https://commons.wikimedia.org/wiki/File:Samsung-Galaxy-S7-Edge-Smartphone.jpg 6
Hardware Components
iOS
8
9
Electronics Components
servo in each joint
Camera
10
Hardware Components in Robots
Proximity
Sensor
Motor
Raspberry Pi
GPS
IMU
Galapagos
Open source
Closed source
12
Robotics Components
14
Adaptive Robotic Computing
Embedded AI/ML
15
ICT in Robotics
PC PP PR
(Personal Computer) (Personal Phone) (Personal Robot)
User
Service
Operating
System
iOS
Hardware
16
EL410: Introduction to Robotics
Lecture-3
Robot Anatomy
2
Humanoid vs Human Anatomy
4
Example 1: JVRC Humanoid Robot
Joints
5
Example 1: KUKA Robot Arm
Joints
6
Example 1: UR3 Robot Arm
Joints
7
Quiz 1: How many joints are in MIT Cheetah?
8
Quiz 2: How many joints are in ATLAS Robot ?
9
Quiz 3: How many joints are in dinosaur Robot ?
10
Joints
R
P
Prismatic joint
Revolute joint [Linear]
[Rotation]
11
Robot Arm: PPP
12
Robot Arm: RPP
13
Robot Arm: RPR
14
Robot Arm: RRR
15
PPP RPP
RPR RRR 16
Q:What about this ?
17
Robot Hip
18
Robot Head
50° 50°
50° 60°
70° 70°
19
Robot Hand
20
Robot Elbow
145o
21
Robot Wrist
22
Robot Fingers
90°90°
90°
90°
45° 23
Robot Crotch
45° 20°
30° 45°
120° 45°
24
Robot Knee
150°
< front
25
Robot Foot
26
Hyundai Tiger-X1
27
EL410: Introduction to Robotics
Lecture-4
Configuration Space
2
Important concepts, symbols, and equations
• Configuration: a specification of the positions of all points
of a mechanism
4
5
Grübler’s Formula
DOF
3 or 6
#bodies #joints # of freedoms
provided by joints
6
Example 1: Find DOF ?
7
Example 1: Find DOF ?
m = 3; N = 5; J = 4; and f = 4
8
Example 2: Find DOF ?
9
Example 2: Find DOF ?
m = 3; N = 5; J = 5; and f = 5
10
Example 3: Find DOF ?
3 x PPRS parallel manipulator
P
R
P
KUKA Systems North America LLC
(patent pending)
11
2 prismatic + link
Example 3: Find DOF ? between R and S joints
3 x PPRS parallel manipulator
m = 6 (spatial)
N = 1 (ground) + 1(platform) + 3 (legs)x(3) = 11
J = 3 (R) * 4 (S) joints
f = 3x(1+1+1+3)
DoF = 6*(11 – 1 -12) + 18 = -12 + 18 = 6
P
R
P
KUKA Systems North America LLC
(patent pending)
12
Example 4: Find DOF ?
13
Example 4: Find DOF ?
15
Example 6: Find DOF ?
KUKA youBot
17
A slice of a position-only workspace for a typical 6R robot
(here, the Mecademic Meca500)
18
Task spaces for:
• manipulating a rigid object?
6 DoF
• operating a laser pointer?
5 DoF
• carrying a tray of glasses to keep them vertical?
19
EL410: Introduction to Robotics
Lecture-5
Robotic Arm
Digikey: https://www.digikey.in/en/products/detail/arduino/T050000/6829063
https://media.digikey.com/pdf/Data%20Sheets/Arduino%20PDFs/Braccio_QSG.pdf
Arduino
https://docs.arduino.cc/retired/getting-started-guides/Braccio
ROS
https://github.com/smart-methods/arduino_robot_arm
https://github.com/smart-methods/robot_arm_arduino_python
https://github.com/smart-methods/arduino_robot_arm_gripper
2
Robotics Graphics
3
Languages for 3D Robot Modeling
• URDF
• Xacro
5
Robot Model
6
Coordinate System
z
Yaw
Pitch
Roll y
x
• Cartesian coordinate system (x, y z)
• Rotational coordinate system (Roll, Pitch, Yaw)7
Units
Set value unit
length m
angle radian
mass Kg
Power (translation) N-m
Force (rotation) N
Speed (translation) m/s
Speed (rotation) radian / s
8
Joint
Set value meaning
fixed Fixed
Rotation with limited
revolute
operating angle
continuous Continuous rotation
floating -------
planar -------
9
Basic Shape
10
Writing URDF File
<robot name="test_robot"> <link name="body2_link">
<material name="red"> <visual>
<color rgba="1.0 0.0 0.0 2.0"/> <geometry>
</material> <box size="0.1 0.1 0.4"/>
</geometry>
<link name="base_link"/> <origin xyz="0 0 0.2" rpy="0 0 0"/>
<material name="red"/>
<joint name="body1_joint" type="fixed"> </visual>
<parent link="base_link"/> </link>
<child link="body1_link"/>
</joint> <joint name="body3_joint" type="revolute">
<parent link="body2_link"/>
<link name="body1_link"> <child link="body3_link"/>
<visual> <origin xyz="0.1 0 0.4" rpy="0 0 0"/>
<geometry> <limit lower="-1.5" upper="1.5" effort="0" velocity="0"/>
<box size="0.1 0.1 0.5"/> </joint>
</geometry>
<origin xyz="0 0 0.25" rpy="0 0 0"/> <link name="body3_link">
<material name="red"/> <visual>
</visual> <geometry>
</link> <box size="0.1 0.1 0.4"/>
</geometry>
<joint name="body2_joint" type="revolute"> <origin xyz="0 0 0.2" rpy="0 0 0"/>
<parent link="body1_link"/> <material name="red"/>
<child link="body2_link"/> </visual>
<origin xyz="0.1 0 0.5" rpy="0 0 0"/> </link>
<limit lower="-1.5" upper="1.5" effort="0" velocity="0"/> 11
</joint> </robot>
3D Computer Graphics Created using URDF File
12
Definition for Physics Simulation
<link name="base">
:
<!--collision detect area-->
<collision>
<geometry>
<box size="0.02 0.02 0.1"/>
</geometry>
</collision>
<!--inertia matrix-->
<inertial>
<mass value="0.1"/>
<inertia ixx="1.0" ixy="0.0" ixz="0.2" iyy="1.0" iyz="0.0" izz="0.0"/>
</inertial>
:
</link>
13
Calculation Formula of Inertia Matrix
14
Box Inertia Matrix
c
a
b
1
𝐼𝑥𝑥 = 𝑚 𝑏 2 + 𝑐 2
2
1
𝐼𝑦𝑦 = 𝑚 𝑐 2 + 𝑎2
2
1
𝐼𝑧𝑧 = 𝑚 𝑎2 + 𝑏 2
2 15
Solid Sphere Inertia Matrix
1
𝐼𝑧𝑧 = 𝑚𝑅2
2
1
𝐼𝑥𝑥 = 𝐼𝑦𝑦 = 𝑚 3𝑅2 + ℎ2
12
16
Cylindrical Inertial Matrix
2
𝐼𝑥𝑥 = 𝐼𝑦𝑦 = 𝐼𝑧𝑧 = 𝑚𝑅2
5
17
Homework: JVRC Humanoid Robot Model
18
Humanoid Links and Joint Connections
19
EL410: Introduction to Robotics
Lecture-6
Robot Coordinate Systems
(Overview of TF)
2
Requirements
• Origin position z
• X-axis direction
• Y-axis direction y
• Z-axis direction
x
3
Robot Position
y2 x2
𝜃1
y1
/Base link
/World x1
4
Tree Coordinate Relationship
𝑥: 𝑥1
𝑦: 𝑦1
𝜃: 𝜃1
/World /Base link
5
Coordinate System
z
Yaw
Pitch
Roll y
x
6
Coordinate System Notations
7
Coordinate Systems
y z
x x y
2-D 3-D
8
Coordinates
Cartesian Polar
9
Position Representation
y
P (a, b)
b
a x
Vector form: P = ai + bj
10
Programming
𝑎
Matrix form: P =
𝑏
11
Transformation Matrix
12
EL410: Introduction to Robotics
Lecture-7
Coordinate Systems
2
Coordinates
Cartesian Polar
3
Cartesian Coordinate System
1-D o x
y
2-D P(x, y)
o x
x
𝑥 = 𝑟𝑐𝑜𝑠𝜃 𝑟= 𝑥2 + 𝑦2
𝑦 = 𝑟𝑠𝑖𝑛𝜃 𝑦
−1
𝜃 = 𝑡𝑎𝑛
𝑥 5
Example: Robot Arm
𝑙3
𝜃3
y
𝑙2
𝜃2
𝑙1
𝜃1
x
6
3-D Cartesian Coordinate System
z
P(a, b, c)
c
y
b
a
x
X, Y, and Z coordinates are perpendicular to each other. 7
3-D Polar Coordinate System
z
𝑟𝑠𝑖𝑛𝜃
𝑟𝑐𝑜𝑠𝜃 P(r, θ, ϕ)
θ
r
y
ϕ 𝑟𝑠𝑖𝑛𝜃
x 𝑥 = 𝑟𝑠𝑖𝑛𝜃𝑐𝑜𝑠𝜙
𝑦 = 𝑟𝑠𝑖𝑛𝜃𝑠𝑖𝑛𝜙
𝑧 = 𝑟𝑐𝑜𝑠𝜃 8
Coordinate Transformations
Transformations
Passive Active
y2
y1 v-t
x2
v 𝜃1
x1 10
Active Transformations
T: Translation
R: Rotation
Generational Transformation:
G=R+T
12
How to Perform Transformations
13
Rotation in Plane
X
P(x/, y/ )
P(x, y)
Y 14
Rotational Matrix
𝑥/ 𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃 𝑥
=
𝑦 / 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 𝑦
𝑥/ 𝑥
/ =𝑅 𝑦
𝑦
𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃
𝑅=
𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃
15
Rotation in Plane
X
P(x/, y/ )
r/ = r
r/ P(x, y)
θ+φ
𝜃
φ
Y 16
Rotational Matrix
𝑥 𝑟𝑐𝑜𝑠ϕ 𝑥 = 𝑟𝑐𝑜𝑠ϕ
Step1: 𝑦 = 𝑟𝑠𝑖𝑛ϕ 𝑦 = 𝑟𝑠𝑖𝑛ϕ
𝑥/ 𝑟𝑐𝑜𝑠(𝜃 + ϕ) 𝑥 = 𝑟𝑐𝑜𝑠(θ + ϕ)
Step2: / = 𝑟𝑠𝑖𝑛(𝜃 + ϕ) 𝑦 = 𝑟𝑠𝑖𝑛(θ + ϕ)
𝑦
𝑥/ 𝑥𝑐𝑜𝑠𝜃 − 𝑦𝑠𝑖𝑛𝜃
/ = Since
𝑦 𝑥𝑠𝑖𝑛𝜃 + 𝑦𝑐𝑜𝑠𝜃
𝑥 = 𝑟𝑐𝑜𝑠ϕ
𝑦 = 𝑟𝑠𝑖𝑛ϕ
𝑥/ 𝑐𝑜𝑠𝜃 − 𝑠𝑖𝑛𝜃 𝑥
=
𝑦 / 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 𝑦
𝑥/ 𝑥 𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃
=𝑅 𝑦 𝑅=
𝑦 / 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃
18
Two Successive Rotation
X r// = r/ = r
P(x/, y/ )
r/ P(x, y)
𝜃2
𝜃1
𝜃1 + 𝜃2
φ
Y 19
𝑐𝑜𝑠𝜃1 −𝑠𝑖𝑛𝜃1
𝑅(θ1) =
𝑠𝑖𝑛𝜃1 𝑐𝑜𝑠𝜃1
𝑐𝑜𝑠𝜃2 −𝑠𝑖𝑛𝜃2
𝑅(θ2) =
𝑠𝑖𝑛𝜃2 𝑐𝑜𝑠𝜃2
= 𝑅(θ2 + θ1)
20
EL410: Introduction to Robotics
Lecture-8
Rigid Transformation
2
Translation in Plane
X
P(x/, y/ )
r/ t
P(x, y)
r
Y 3
Translation
𝑟/ = 𝑟 + 𝑡
𝑥/ 𝑥 𝑡𝑥
/ = 𝑦 + 𝑡𝑦
𝑦
4
Transformations
T: Translation
R: Rotation
Generational Transformation:
G=R+T
5
How to Perform Transformations
6
General Transformations
t
r /
7
General Translation Matrix
𝑟/ = 𝑅 θ ∗ 𝑟 + 𝑡
𝑥/
𝑐𝑜𝑠θ −𝑠𝑖𝑛θ 𝑥 𝑡𝑥
/ = 𝑠𝑖𝑛θ 𝑐𝑜𝑠 𝑦 + 𝑡𝑦
𝑦
𝑥
𝑥/ 𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃 𝑡𝑥
/ = 𝑠𝑖𝑛𝜃 𝑦
𝑦 𝑐𝑜𝑠𝜃 𝑡𝑦
1
8
Homogeneous Form
𝑥/ 𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃 𝑡𝑥 𝑥
𝑦 / = 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 𝑡𝑦 𝑦
1 0 0 1 1
𝑥𝑐𝑜𝑠𝜃 − 𝑦𝑠𝑖𝑛𝜃 + 𝑡𝑥
= 𝑥𝑠𝑖𝑛𝜃 + 𝑦𝑐𝑜𝑠𝜃 + 𝑡𝑦
1
9
Homogeneous Transformation
𝑅(𝜃) 𝑡
𝑃/ = 𝑃
0 1
10
3-D Translation
P(x, y, z)
z
Y
y
x
X
X, Y, and Z coordinates are perpendicular to each other. 11
X Z
12
APOLLO Spacecraft
13
Rotation in 3D
z
P(x, y, z) = P/(x/, y/, z/)
x
14
Rotational Matrix
x-axis y-axis z-axis
𝑥/ 𝑟11 𝑟12 𝑟13 𝑥
/ = 𝑟 𝑟22 𝑟23 𝑦
𝑦 21
𝑧 / 𝑟31 𝑟32 𝑟33 𝑧
𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃 0
𝑅𝑧 (𝜃) = 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 0
0 0 1 16
Rotation Angle Sequences in 3D
17
Rotation Sequences
18
Euler Angles
19
Cardan Angles
20
EL410: Introduction to Robotics
Lecture-9
General Transformation in 3-D
2
• Rotation in 3-D
• Euler Angles
• Vector Rotation
• Quaternion
• Homogeneous Transformation
3
Rotation in 3D
z
P(x, y, z) = P/(x/, y/, z/)
ψ
θ
y
ϕ
x
4
Rotational Matrix
𝑥/ 𝑟11 𝑟12 𝑟13 𝑥
/ = 𝑟 𝑟22 𝑟23 𝑦
𝑦 21
𝑧 / 𝑟31 𝑟32 𝑟33 𝑧
𝑐𝑜𝑠𝜃 0 𝑠𝑖𝑛𝜃
𝑅𝑦 (𝜃) = 0 1 0
−𝑠𝑖𝑛𝜃 0 𝑐𝑜𝑠𝜃
𝑐𝑜𝑠𝜓 −𝑠𝑖𝑛𝜓 0
𝑅𝑧 (𝜓) = 𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓 0
0 0 1
6
Product of Three Rotations
𝑅 𝜙, 𝜃, 𝜓 = 𝑅𝑧 𝜓 ∗ 𝑅𝑦 𝜃 ∗ 𝑅𝑥 (𝜙)
y
• Axis of rotation is a vector v
x • Angle of rotation about the vector is θ
skew
symmetric
matrix
0 −𝑣𝑧 𝑣𝑦
𝑹 = 𝑰3×3 + 𝑠𝑖𝑛𝜃 𝑣𝑧 0 −𝑣𝑥 + 1 − 𝑐𝑜𝑠𝜃 𝑣𝑣 𝑇 − 𝑰3×3
−𝑣𝑦 𝑣𝑥 0
11
Quaternion
12
i = √-1
i = i
4i i2 = -1
i3 = -i
3i
i4 = 1
2i
-4 -3 -2 -1 -i 1 2 3 4
-2i
-3i
-4i
13
Example: 1•I or 3•i1/2
•i → 90o Rotation
4i •i1/2 → 45o Rotation
3i
2i
i
45o
-4 -3 -2 -1 -i 1 2 3 4
-2i
-3i
-4i
14
We can simplify
𝜃
𝑖 90𝑜 →𝜃
Multiplied by vector V
𝜃
𝑉∙𝑖 90𝑜 →𝜃
i•j•k=-1
16
Representations
k
ω→ Real
x→i im
y→j im i
z→k im
j
𝑞 = 𝑞1 𝑞2 𝑞3 𝑞4 𝑇
= 𝑞𝑤 𝑞𝑥 𝑞𝑦 𝑞𝑧 𝑇
𝑞 2
= 𝑞12 + 𝑞22 + 𝑞32 + 𝑞32 = 𝑞𝑤
2
+ 𝑞𝑥2 + 𝑞𝑦2 + 𝑞𝑧2
17
Quaternion to Euler Angles Conversion
https://en.wikipedia.org/wiki/Conversion_between_quaternions_and_Euler_angles
18
General Transformations
19
P/(x/, y/, z/)
ψ
t
z θ
r /
r ϕ
y
x 20
Representing Pose in 3-D
21
General Transformations
T: Translation
R: Rotation
G=R+T
22
How to Perform Transformations
23
Homogeneous Transformation
𝑟/ = 𝑅 θ ∗ 𝑟 + 𝑡
𝑅 𝑡 4 × 4 Matrix
𝑃/ = 𝑃
0 1
25
Examples: Niku book
26
EL410: Introduction to Robotics
Lecture-10
Kinematics:
Forward/Inverse Kinematics of Planar Robot
2
Robot Joints and Links
q3
L4
L3
q2
q4
L2 End Effector
positionp
q1 f
L1
3
(1) Forward Kinematics
4
(3) Jacobian
𝝏𝑭(𝒒)
𝑱 𝒒 = 𝝉 = 𝑱𝑻 𝒒 𝒇
𝝏𝒒
5
Kinematics
Relation between the joint angles and the end-effector’s
position & altitude x, y θ
l3
Planar 3-DOF robot q3
l2 q
𝑥 = 𝑙1 cos(𝑞1 ) + 𝑙2 cos(𝑞1 + 𝑞2 ) + 𝑙3 cos(𝑞1 + 𝑞2 + 𝑞3 ) 2
l1
𝑦 = 𝑙1 sin(𝑞1 ) + 𝑙2 sin(𝑞1 + 𝑞2 ) + 𝑙3 sin(𝑞1 + 𝑞 + 𝑞3 ) q1
𝜃 = 𝑞1 + 𝑞2 + 𝑞3
Nonlinear function
𝑥 𝑞1
Joint coordinate
Task coordinate 𝑦 = 𝒇 𝑞2 vector
vector 𝜃 𝑞3
𝜃 = 𝑞1 + 𝑞2 + 𝑞3 Just compute it
7
Usually easy in calculation
Inverse Kinematics
“Task” space to “Joint” space
−1
𝒒≔𝒇 (𝒑)
𝑥 = 𝑙1 cos(𝑞1 ) + 𝑙2 cos(𝑞1 + 𝑞2 ) + 𝑙3 cos(𝑞1 + 𝑞2 + 𝑞3 )
𝑦 = 𝑙1 sin(𝑞1 ) + 𝑙2 sin(𝑞1 + 𝑞2 ) + 𝑙3 sin(𝑞1 + 𝑞 + 𝑞3 )
𝜃 = 𝑞1 + 𝑞2 + 𝑞3 Solve it as simultaneous
equations
• Usually complicated
• May need inverse function such as arcsin
• Solution may not be unique
8
Example
Forward Kinematics x, y
θ
𝑥 = 𝑙1 cos(𝑞1 ) + 𝑙2 cos(𝑞1 + 𝑞2 )
l2 q
2
𝑦 = 𝑙1 sin(𝑞1 ) + 𝑙2 sin(𝑞1 + 𝑞2 )
l1
𝜃 = 𝑞1 + 𝑞2 q1
Inverse Kinematics
2 2 2 + 𝑦2
𝑦 𝑙1 − 𝑙2 + 𝑥
𝑞1 = 𝑡𝑎𝑛−1 − 𝑐𝑜𝑠 −1
𝑥 2𝑙1 ∙ 𝑥 2 + 𝑦 2
𝑙12 + 𝑙22 − 𝑥 2 + 𝑦 2
𝑞2 = 𝜋 − 𝑐𝑜𝑠 −1
2𝑙1 𝑙2
𝜃 = 𝑞1 + 𝑞2 9
EL410: Introduction to Robotics
Lecture-11
Inverse Kinematics
2
Inverse Kinematic Solutions
• Cosine Method
• Numerical Method
3
Cosine Method
In this case, cosine theorem is used.
C
γ
b a
α β
A B
c
𝑎2 = 𝑏 2 + 𝑐 2 − 2𝑏𝑐 ∗ cos𝛼
𝑏 2 = 𝑎2 + 𝑐 2 − 2𝑎𝑐 ∗ cos𝛽
𝑐 2 = 𝑎2 + 𝑏 2 − 2𝑎b ∗ cos𝛾 4
Example
Forward Kinematics P(x, y)
θ
𝑥 = 𝑙1 cos(𝑞1 ) + 𝑙2 cos(𝑞1 + 𝑞2 )
l2 q
2
𝑦 = 𝑙1 sin(𝑞1 ) + 𝑙2 sin(𝑞1 + 𝑞2 )
l1
𝜃 = 𝑞1 + 𝑞2 q1
Inverse Kinematics
5
P(x, y)
θ
l2
q2
β α
𝜋
γ q 1 l1
2
(1) 𝑙22 = 𝑙12 + 𝑥2 + 𝑦2 − 2𝑙1 𝑥 2 + 𝑦 2 ∗ cos𝛽
𝑦 𝑦
(2) tan 𝛾 = or 𝛾 = tan−1
𝑥 𝑥
(3) 𝑞1 = 𝛾 − 𝛽 6
Calculation of q1
2
(𝟏) 𝑙22 = 𝑙12 + 𝑥2 + 𝑦2 − 2𝑙1 𝑥 2 + 𝑦 2 ∗ cos𝛽
𝑙 2 −𝑙 2 + 𝑥 2 +𝑦 2
Or 𝛽 = 𝑐𝑜𝑠 −1 1 2
2𝑙1 ∙ 𝑥 2 +𝑦 2
𝑦
𝟐 we have 𝛾 = tan−1
𝑥
(3) 𝑞1 = 𝛾 − 𝛽
2 2 2 + 𝑦2
𝑦 𝑙1 − 𝑙2 + 𝑥
or, 𝑞1 = 𝑡𝑎𝑛−1 − 𝑐𝑜𝑠 −1
𝑥 2𝑙1 ∙ 𝑥 2 + 𝑦 2
7
Calculation of q2
2
𝟏 𝑥2 + 𝑦2 = 𝑙12 + 𝑙22 − 2𝑙1 𝑙2 ∗ cos𝛼
2 2 2 2
−1 𝑙1 +𝑙2 − 𝑥 +𝑦
Or 𝛼 = 𝑐𝑜𝑠
2𝑙1 ∙𝑙2
(2) 𝑞2 = 𝜋 − 𝛼
𝑙12 + 𝑙22 − 𝑥 2 + 𝑦 2
Or, 𝑞2 = 𝜋 − 𝑐𝑜𝑠 −1
2𝑙1 𝑙2
8
Example
Forward Kinematics x, y
θ
𝑥 = 𝑙1 cos(𝑞1 ) + 𝑙2 cos(𝑞1 + 𝑞2 )
l2 q
2
𝑦 = 𝑙1 sin(𝑞1 ) + 𝑙2 sin(𝑞1 + 𝑞2 )
l1
𝜃 = 𝑞1 + 𝑞2 q1
Inverse Kinematics
2 2 2 + 𝑦2
𝑦 𝑙1 − 𝑙2 + 𝑥
𝑞1 = 𝑡𝑎𝑛−1 − 𝑐𝑜𝑠 −1
𝑥 2𝑙1 ∙ 𝑥 2 + 𝑦 2
𝑙12 + 𝑙22 − 𝑥 2 + 𝑦 2
𝑞2 = 𝜋 − 𝑐𝑜𝑠 −1
2𝑙1 𝑙2
𝜃 = 𝑞1 + 𝑞2 9
Numerical Method
10
Steps of Numerical Solution
Step 1: Prepare the position p of the base link
Step 2: Prepare the position pref of the target link
Step 3: Define q which holds the joint angles at base link
Step 4: Use forward kinematics to calculate the position p of the target link
Step 5: Calculate the difference in position and attitude (Δp =pref − p)
Step 6: If Δp are small enough stop the calculation
Step 7: If Δp are not small enough calculate Δq which would reduce the error
Step 8: Update joint angles by q := q + Δq and return to Step 4
11
EL410: Introduction to Robotics
Lecture-12
Jacobian
2
Jacobian of Planar Robots
• Relation among velocity ?
𝑝=𝒇 𝑞 𝑝 = 𝑥, 𝑦, 𝜃 𝑇 𝑥, 𝑦
𝜃
𝑑 𝑞 = 𝑞1 , 𝑞2 𝑇
𝑑𝑡 l2
Joint velocity 𝑞2
vector
𝑝=𝑱 𝑞 𝑞 l1
𝑞1
End-effector
velocity 𝜕𝒇 𝑞
vector 𝑱 𝑞 = Jacobian (Jacobian Matrix)
𝜕𝑞
𝜕𝑓𝑖
𝛿𝑦𝑖 = 𝛿𝑥𝑗 (4)
𝜕𝑥𝑗
5
We can simplify (4) as:
𝑑𝑥 𝐽𝑎𝑐𝑜𝑏𝑖𝑎𝑛 𝑑𝜃1
𝑑𝑦 ⋮ 𝑑𝜃2
𝑑𝑧 𝑜𝑓 𝑑𝜃3
= (5)
𝛿𝑥 ⋮ 𝑑𝜃4
𝛿𝑦 ⋮ 𝑑𝜃5
𝛿𝑧 𝑅𝑜𝑏𝑜𝑡 𝑑𝜃6
Jacobian Matrix
• Here dx, dy, and dz in [D] represent the differential linear-motion along x-, y-, and z-axes
• δx, δy, and δz in [D] represent differential rotations along x-, y-, and z-axes
• [Dθ] represents the differential motions of the joints
6
𝑝 = 𝑥, 𝑦 𝑇 𝑥, 𝑦
Example 𝑞 = 𝜃1 , 𝜃2 𝑇
𝑥 = 𝑙1 cos(𝑞1 ) + 𝑙2 cos(𝑞1 + 𝑞2 ) l2
𝜃2
𝑦 = 𝑙1 sin(𝑞1 ) + 𝑙2 sin(𝑞1 + 𝑞2 )
l1
𝜃1
Differentiating above equations w. r. to
the two variables θ1 and θ2 will yield:
𝑑𝑥 = −𝑙1 sin𝜃1 𝑑𝜃1 − 𝑙2 sin(𝜃1 + 𝜃2 ) (𝑑𝜃1 + 𝑑𝜃2 )
𝑑𝑦 = 𝑙1 cos𝜃1 𝑑𝜃1 + 𝑙2 cos(𝜃1 + 𝜃2 ) (𝑑𝜃1 + 𝑑𝜃2 )
Jacobian Differential 7
Differential motion
motion of joints
If we defied previous equations by dt, the they will represent velocities instead of differentiation
motion which is:
𝑑𝑥 −𝑙1 sin𝜃1 𝑑𝜃1 − 𝑙2 sin 𝜃1 + 𝜃2 −𝑙2 sin 𝜃1 + 𝜃2 𝑑𝜃1
/𝑑𝑡 = /𝑑𝑡
𝑑𝑦 𝑙1 cos𝜃1 𝑑𝜃1 + 𝑙2 cos 𝜃1 + 𝜃2 𝑙2 cos 𝜃1 + 𝜃2 𝑑𝜃2
Writing above velocity equation more simplified matrix format will gives:
• Here, dx/dt and dy/dt are vx and vy, respectively, and dθ1/dt and dθ2 are 𝜃1 and 𝜃2 ,
respectively.
8
Inverse Jacobian
We know that forward Jacobian can be written as:
𝐷 = 𝐽 𝐷𝜃
Now multiply both sides of the above equation multiplied by J-1 which gives:
𝐽−1 𝐷 = 𝐽−1 𝐽 𝐷𝜃
Or, 𝐷𝜃 = 𝐽−1 𝐷
9
Statics
10
Statics
It deals with equilibrium
“Reverse” version of kinematics
mz
𝑓𝑥
: force/moment from (fx, fy)
𝑓 = 𝑓𝑦 end-effector to the environment τ3
𝑚𝑧 τ2
𝜏1 τ1
𝜏 = 𝜏2 : Joint torque vector
𝜏3
𝛿𝑊 = 𝛿𝑞 𝑇 𝜏 − 𝛿𝑝 𝑇 𝑓
12
Duality
Torque vs force 𝜏 = 𝐽 𝑞 𝑇 𝑓
13
EL410: Introduction to Robotics
Lecture-13
Robotic Mechanism in 3-D
2
Position, Velocity, Angular Velocity
𝑝𝑥
Position: 𝑝 = 𝑝𝑦
𝑝𝑧
derivative
𝑝𝑥
Velocity: 𝑣 = 𝑝 = 𝑝𝑦
𝑝𝑧
3
𝜔𝑥
Angular velocity: 𝜔 = 𝜔𝑦
𝜔𝑧
4
3-Angle Representations
Euler angles Roll/pitch/yaw angles
5
Denavit-Hartenberg Representations
• No. of Joints: N
• No. of Links: N+1
• Links may not be straight line
Joints
6
D-H Representations
7
D-H Representation
base
link j-1 tool
link j
xj
8
D-H Notation
base
link j-1 tool
link j
xj
j-1ξ
j
9
D-H Notation
j-1ξ =R (θ )T (d )T (a )R (α )
j z j z j x j x j
• Very concise
Only four parameters: θ, d, a, α
10
D-H Representation: Step 1
base
link j-1 tool
link j
θj
11
D-H Representation: Step 2
base
link j-1 tool
link j
dj
12
D-H Representation: Step 3
base
link j-1 tool
link j
aj
13
D-H Representation: Step 4
base
link j-1 tool
link j
αj
14
Stack links Transformation
End-Effector
Base
TE = Rz(θ1)Tz(d1)Tx(a1)Rx(α1) Rz(θ2)Tz(d2)Tx(a2)Rx(α2)……Rz(θN)Tz(dN)Tx(aN)Rx(αN)
15
All Revolute Joints (RRRRRR)
End-Effector
Base
q1 q2 qn
TE = Rz(θ1)Tz(d1)Tx(a1)Rx(α1) Rz(θ2)Tz(d2)Tx(a2)Rx(α2)……Rz(θN)Tz(dN)Tx(aN)Rx(αN)
Revolute joint Revolute joint Revolute joint
16
Revolute and prismatic Joints (RPRRRR)
End-Effector
Base
q1 q2 qn
TE = Rz(θ1)Tz(d1)Tx(a1)Rx(α1) Rz(θ2)Tz(d2)Tx(a2)Rx(α2)……Rz(θN)Tz(dN)Tx(aN)Rx(αN)
Revolute joint Prismatic joint Revolute joint
17
D-H Parameters for Two Links Robot
P(x, y) θj dj aj αj
θ
l2 q
2
l1 q1 0 l1 0
q1
q2 0 l2 0
θj dj aj αj
q1 0.0000 0.0000 π/2
q2 0.0000 0.4318 0
q3 0.1500 0.0203 -π/2
q4 0.4318 0.0000 π/2
q5 0.0000 0.0000 -π/2
q6 0.0000 0.0000 0
19
Robot Dynamics
Lecture 14
Motion
FK
angles position
IK
statics
torque force
Dynamics: Force and Motion
Dynamics
Why we study dynamics ?
• Translational motion
• Rotational motion
Translational Motion (Newton’s EOM)
𝒊 i = 1, 2, 3,………., N
𝒊 𝟏
V: total potential energy of the all links of the robot
𝒏
𝒊
i = 1, 2, 3,………., N
𝒊 𝟏
Robot Dynamics: Lagrangian
Lecture 15
1
Lagrangian Formulation
m2
m1
Position:
Velocity:
4
Here, robot mass m of the link is concentrated at its center of mass
(COM) and v is the 3-D velocity which can be written as follows,
m2
m1
5
Step (1) : Kinetic Energy
II) Rotational motion
For 1-D motion
6
In robotics angular velocity is (3×1) vector
Angular velocity:
Inertia matrix:
7
MOI Depends on:
• Shape of the link
• Density of the link material
8
Step (2) : Potential Energy
Potential energy due to gravitational forces on masses when
there are certain height from the reference frame
m2
m1
10
Putting all together
Step(1): Calculate Lagrangian based on total K.E and total P.E
12
• Translational domain:
• Rotational domain:
14
Example (1): Simple cart-spring system
k
m F
x
• The motion is linear along x-axis, therefore
15
Therefore,
16
Newtonian Mechanics
mg
kx F
= ma
17
Example (2): Potential Energy
y
x
• Kinetic Energy (K.E):
l
θ
m
g
• Potential Energy (P.E):
18
• The Lagrangian (L):
19
Applications of Lagrangian in Robotics
Lecture 16
1
General form of Lagrangian EOM
2
• Lagrangian EOM in Translational domain:
4
Two-Link Robot (Pendulum Model)
• Position of m1 and m2: y
1 1 1
x
τ1
1 1 1
l1
2 1 1 2 1 2
θ1 m1
2 1 1 2 1 2
1 τ2
l2 m
2
• Velocity of m1 and m2:
g
1 1 1 1
θ2 2
1 1 1 1
2 1 1 1 2 1 2 1 2
2 1 1 1 2 1 2 1 2 5
• Kinetic Energy (K.E) of m1:
1
2 2 2 2
1 1 1 1 1
2 2
1 1 1
2
2 2
1 1
2 2
2 1 2 1 2
1 2 1 1 2 1 1 2
2 2 2 1 2 2
6
• Total Kinetic Energy (K.E):
1 2
1 2 2 2 1 2 2
2 1 1 2 2 1 2
1 2 2 2 1 2 2
1 2 1 1 2 2 1 2 7
• The derivatives of the Lagrangian are:
̇ 1 2 1 2 2 1 2 2 2 1 2 2
1 2 2 2 1 2 2 1 2 2 1 2 2 2
2 1 2 2 2 2 1 2 2
1 2 1 1 2 2 1 2
1 1
1 2 2 2 1 2 2 1 2 2 1 2 2 2
2 1 2 2 2 2 1 2 2 1 2 1 1 2 2 1 2
8
• Similarly:
2 2 1 2 2
2 1 2 2 1 2 2 1 2 1 2 2 2
2 1 2 2 2 2 1 2
2 2
2 2 1 2 2 1 2 2 2 1 2 2 2 2 1 2
9
• The matrix form of previous two Lagrangian:
1 2 2 2 1 2 2 2 2 1 2 2 1
2 2 1 2 2 2 2
2 1 2 2 2 1 2 2 2 1 2 2 2
2 1 2 2 1
1 2 1 1 2 2 1 2
2 2 1 2
• General form
10
• General form of Lagrangian
Here,
1 2 2 2 1 2 2 2 2 1 2 2
2 2 1 2 2 2
2 1 2 2
2 1 2 2
2 1 2 2 2 1 2 2
1 2 1 1 2 2 1 2
2 2 1 2 11