0% found this document useful (0 votes)
104 views260 pages

Robotics Tapas

This document provides information about the IE410 Introduction to Robotics course offered in the winter 2023 semester, including the instructor, class and lab times, evaluation criteria, textbook recommendations, and lab information for using Robot Operating System (ROS). Students will learn basic robotics concepts, kinematics, dynamics, sensing, control and trajectory planning over the course of the semester. Evaluation will be based on in-semester exams, end-semester exam, and lab assignments using ROS.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views260 pages

Robotics Tapas

This document provides information about the IE410 Introduction to Robotics course offered in the winter 2023 semester, including the instructor, class and lab times, evaluation criteria, textbook recommendations, and lab information for using Robot Operating System (ROS). Students will learn basic robotics concepts, kinematics, dynamics, sensing, control and trajectory planning over the course of the semester. Evaluation will be based on in-semester exams, end-semester exam, and lab assignments using ROS.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 260

Welcome to

IE410-Introduction to Robotics

Credit Structure (L-T-P-Cr): 3-0-2-4


Semester: Winter 2023

Instructor: Tapas Kumar Maiti


Mode of Delivery:
Lectures and Labs delivery mode: Physical
Course materials are available in Google-Classroom.

Lecture time in each week (CEP110):


Monday, Wednesday, and Friday: 12:00 - 12:50

Lab time in each week (LAB104/107):


Monday and Tuesday: 2:00PM - 4:00PM
Robot Operating System (ROS)

No class and Lab on holiday


Course Contents
1. Basic of Robotics
2. Robot Coordinate Systems
3. Forward Kinematics
4. Inverse Kinematics
5. Sensor and Actuators
6. Robot Dynamic and Force Analysis
7. Trajectory Planning
8. Robot-Control
Evaluation Scheme

• In-Sem Exam: 30%


• End Sem Exam: 40%
• Labs : 30%
Suggested Textbooks
• Introduction to Robotics: Analysis, Control,
Applications, 3rd Ed. Saeed B. Niku, Wiley, 2019.

• Introduction to Robotics: Mechanics and Control,


3rd Ed. John J. Craig, Addison-Wesley Publishing
Company, 2003.

• ROS Robot Programming, 1stt Ed. YoonSeok Pyo,


HanCheol Cho, RyuWoon Jung, and TaeHoon Lim,
ROBOTIS Co., Ltd. 2017.
Lab Information
Practical will be carried out using Robot-Operating-System
(ROS). Please download and install the software on your
computer/laptop.
1. ROS2 Installation
https://www.youtube.com/watch?v=ehtUb55Rmmg&lis
t=PLk51HrKSBQ8-jTgD0qgRp1vmQeVSJ5SQC
2. ROS book:
http://wiki.ros.org/Books/ROS_Robot_Programming_En
glish
3. Materials on ROS2 website:
http://wiki.ros.org/kinetic/Installation/Ubuntu
http://wiki.ros.org/ROS/Tutorials
Related Resources
1. Essence of Linear Algebra:
https://www.youtube.com/playlist?list=PLZHQObOW
TQDPD3MizzM2xVFitgF8hE_ab

2. Python Tutorial: https://cs231n.github.io/python-


numpy-tutorial/

3. ROS (Robot Operating System), 2020.


https://www.ros.org
EL410: Introduction to Robotics
Lecture-2

1
Recent Trends in IT
1990 1995 2000 2005 2010 2015 2020 2025 2050

PC Mobile Smart Edge Computing

Rise of AI/ML
OpenCV
Robotics RTM Robot-Operating-System

RSi RobotEarth Robotics IoT

Industry 4.0

IoT, Big-Data & Cloud Computing


2
What is Robot
Robot
Term invented in 1920 by Karol and Josef Čapek
Used to describe autonomous machines

“…capable of carrying out a complex series of actions


automatically”
Wikipedia

3
Implementation of Robots

• Employ engineering and computer science


disciplines in its implementation.

• Computing system uses inputs from


environment sensors to provide control for
robot.

4
Types of Robots

Source: Sensors for Drone and Robots, March 2016, Yole Development

5
Quiz: What are the common components?

Personal Computer Personal Phone

https://pixabay.com/en/computer-desktop-modern-device-154114/
https://commons.wikimedia.org/wiki/File:Samsung-Galaxy-S7-Edge-Smartphone.jpg 6
Hardware Components

Personal Computer Personal Phone


7
Software Components

iOS

Personal Computer Personal Phone

8
9
Electronics Components
servo in each joint

Camera

for (int i = 0; i < interpreter.outputs_size(); i++) {


TfLiteTensor* output = interpreter.output(i);
print_output_data(output);
if (i != interpreter.outputs_size() - 1) {
printf(",\n");
}
Microcontroller }

AI/ML Coding in C++

10
Hardware Components in Robots

Proximity
Sensor
Motor
Raspberry Pi

GPS

Battery Motor pan-tilt


jetson nano

IMU

Sensor Controller Actuator 11


Software Components in Robots

Galapagos
Open source
Closed source

http:// ros.org kr.forwallpaper.com http://www.softbank.jp/en/corp/group/sbr/ http://www.opros.or.kr/ http://www.openrtm.org/ http://schools-wikipedia.org/

12
Robotics Components

Resource: ROBOMECH, 2019, Hiroshima, Japan


13
High-Speed Robotic Computing
Software Based
• Slow: 5 min. for recognition
2 min. for actuation
• Less-Accuracy
• High-Power

×102 ~103 faster


Circuit Based
• High-Speed
• High-Accuracy
• Low-Power

AI/ML Algorithm Based on Verilog HDL

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

Robot Body Human Body 3


Basic Parts

• Joint: A point at which parts of an


artificial structure are joined

• Link: A connector between two joints

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

85° 55° 35° 45° front

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

• Degrees of Freedom (DoF): number of independent


variables required to define a system. Ex: robot system

• Configuration space (C-space): DOF-dimension space of


all configurations

• DOF of a planar body: m = 3

• DOF of a spatial body: m = 6


3
Degree of Freedom (DOF)
DOF = Σ (body freedoms) – Σ (independent constraints)
from joints
Joint Types:

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

Grübler’s Formula : 3(5-1-4) + 4 = 4

8
Example 2: Find DOF ?

9
Example 2: Find DOF ?

m = 3; N = 5; J = 5; and f = 5

Grübler’s Formula : 3(5-1-5) + 5 = 2

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 ?

m = 6; N = 14; J = 18; and f = 36


Grübler’s Formula : 6(14-1-18) + 36 = 6 14
Example 5: Find DOF ?

Hexrotor with two 5-DOF arms


https://www.prodrone.com/archives/1420/

15
Example 6: Find DOF ?

KUKA youBot

mecanum-wheel omnidirectional base moving on flat ground


plus 5-DOF robot arm + gripper
16
Task Space and Work Space

• Task Space: The task space is the space in which a task is


most naturally represented. It is independent of a robot.

• Work Space: The workspace is usually a specification of the


reachable space by a robot (or its wrist, or end-effector).

• Often defined in terms of (x,y,z) translational positions only.

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?

4 DoF: planar body + height

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

JVRC Robot model represent in


3D Computer Graphics (CG)
4
What is URDF

• URDF (Unified Robot Description Format) is an XML


format for describing the structure of a robot.

• URDF can be displayed in 3D with rviz or physically


simulated with Gazebo.

• URDF files have a .urdf file extension.

• The description in URDF consists of Link and Joint.

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

Set value meaning


cylinder Cylinder
box box
sphere ball
mesh mesh

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

Ixx Ixy Ixz


Iyx Iyy Iyz
Izx Iyz Izz

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

• Cartesian coordinate system


Quaternion notation (x, y, z, w)

• Rotational coordinate system


Euler Notation (Roll, Pitch, Yaw)

7
Coordinate Systems

y z

x x y

2-D 3-D
8
Coordinates

Cartesian Polar

1-D 2-D 3-D 2-D 3-D


Pos: (x) (x, y) (x, y, z) (r, θ) (r, θ, ϕ)
Circle Sphere
Velocity: dx/dt
(ρ, ϕ, z)
Cylinder
Acceleration: d2x/dt2

9
Position Representation

y
P (a, b)

b
a x

Vector form: P = ai + bj
10
Programming

𝑎
Matrix form: P =
𝑏

Python => Matrix Operation

11
Transformation Matrix

𝑥 𝑇11 𝑇12 𝑇13 𝑟


𝑦 = 𝑇21 𝑇22 𝑇23 θ
𝑦 𝑇31 𝑇32 𝑇33 ϕ

𝑇11 𝑇12 𝑇13


𝑇 = 𝑇21 𝑇22 𝑇23
𝑇31 𝑇32 𝑇33

12
EL410: Introduction to Robotics
Lecture-7
Coordinate Systems

2
Coordinates

Cartesian Polar

1-D 2-D 3-D 2-D 3-D


Pos: (x) (x, y) (x, y, z) (r, θ) (r, θ, ϕ)
Circle Sphere
Velocity: dx/dt
(ρ, ϕ, z)
Cylinder
Acceleration: d2x/dt2

3
Cartesian Coordinate System

1-D o x
y

2-D P(x, y)

o x
x

X and Y coordinates are perpendicular to each other. 4


2-D Polar Coordinate System
y
P(r, 𝜃)
r
y
𝜃
o x
x
Projection of P along x- and y- axis's

𝑥 = 𝑟𝑐𝑜𝑠𝜃 𝑟= 𝑥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

Transformations are characterized by the fact that they


preserve the distance between points.
9
Passive Transformations

y2
y1 v-t
x2
v 𝜃1

x1 10
Active Transformations

Embedded co-ordinate frames into robot


11
Transformations

T: Translation
R: Rotation

Generational Transformation:
G=R+T
12
How to Perform Transformations

Step1: Calculate Rotational Matrix


Step2: Calculate Translation Matrix

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: / = 𝑟𝑠𝑖𝑛(𝜃 + ϕ) 𝑦 = 𝑟𝑠𝑖𝑛(θ + ϕ)
𝑦

cos(A+B) = cosAcosB – sinAsinB


sin(A+B) = sinAcosB + cosAsinB
17
𝑥/ 𝑟𝑐𝑜𝑠𝜃𝑐𝑜𝑠ϕ − 𝑟𝑠𝑖𝑛𝜃𝑠𝑖𝑛ϕ
/ =
𝑦 𝑟𝑠𝑖𝑛𝜃𝑐𝑜𝑠ϕ + 𝑟𝑐𝑜𝑠𝜃𝑠𝑖𝑛ϕ

𝑥/ 𝑥𝑐𝑜𝑠𝜃 − 𝑦𝑠𝑖𝑛𝜃
/ = 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 −𝑠𝑖𝑛𝜃2 𝑐𝑜𝑠𝜃1 −𝑠𝑖𝑛𝜃1


𝑅(θ2)𝑅(θ1) =
𝑠𝑖𝑛𝜃2 𝑐𝑜𝑠𝜃2 𝑠𝑖𝑛𝜃1 𝑐𝑜𝑠𝜃1

𝑐𝑜𝑠𝜃2𝑐𝑜𝑠𝜃1 − 𝑠𝑖𝑛𝜃2𝑠𝑖𝑛𝜃1 𝑠𝑖𝑛𝜃2𝑐𝑜𝑠𝜃1 − 𝑐𝑜𝑠𝜃2𝑠𝑖𝑛𝜃1


=
𝑠𝑖𝑛𝜃2𝑐𝑜𝑠𝜃1 + 𝑐𝑜𝑠𝜃2𝑠𝑖𝑛𝜃1 𝑐𝑜𝑠𝜃2𝑐𝑜𝑠𝜃1 − 𝑠𝑖𝑛𝜃2𝑠𝑖𝑛𝜃1

cos(𝜃1 + 𝜃2) −𝑠𝑖𝑛(𝜃1 + 𝜃2)


=
𝑠𝑖𝑛(𝜃1 + 𝜃2) 𝑐𝑜𝑠(𝜃1 + 𝜃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

Step1: Calculate Rotational Matrix


Step2: Calculate Translation Matrix

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 𝑧

𝑟11 𝑟12 𝑟13


𝑅 = 𝑟21 𝑟22 𝑟23
𝑟31 𝑟32 𝑟33
15
Elementary Rotation Matrices
1 0 0
𝑅𝑥 (𝜃) = 0 𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃
0 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃
𝑐𝑜𝑠𝜃 0 𝑠𝑖𝑛𝜃
𝑅𝑦 (𝜃) = 0 1 0
−𝑠𝑖𝑛𝜃 0 𝑐𝑜𝑠𝜃

𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃 0
𝑅𝑧 (𝜃) = 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 0
0 0 1 16
Rotation Angle Sequences in 3D

Euler’s rotation theorem


Any two independent orthonormal
coordinate frame can be related by a
sequence of rations (not more than 3)
about coordinate axes, where no two
successive rotations may be about the
same axis.

17
Rotation Sequences

XYX XYZ XZY XZX


YXY YXZ YZX YZY
ZXY ZXZ ZYX ZYZ

18
Euler Angles

XYX XYZ XZY XZX


YXY YXZ YZX YZY
Euler
ZXY ZXZ ZYX ZYZ Angles

19
Cardan Angles

XYX XYZ XZY XZX


YXY YXZ YZX YZY
ZXY ZXZ ZYX ZYZ

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 𝑧

x-axis y-axis z-axis


𝑟11 𝑟12 𝑟13
𝑅 = 𝑟21 𝑟22 𝑟23
𝑟31 𝑟32 𝑟33
5
Elementary Rotation Matrices
1 0 0
𝑅𝑥 (𝜙) = 0 𝑐𝑜𝑠𝜙 −𝑠𝑖𝑛𝜙
0 𝑠𝑖𝑛𝜙 𝑐𝑜𝑠𝜙

𝑐𝑜𝑠𝜃 0 𝑠𝑖𝑛𝜃
𝑅𝑦 (𝜃) = 0 1 0
−𝑠𝑖𝑛𝜃 0 𝑐𝑜𝑠𝜃

𝑐𝑜𝑠𝜓 −𝑠𝑖𝑛𝜓 0
𝑅𝑧 (𝜓) = 𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓 0
0 0 1
6
Product of Three Rotations
𝑅 𝜙, 𝜃, 𝜓 = 𝑅𝑧 𝜓 ∗ 𝑅𝑦 𝜃 ∗ 𝑅𝑥 (𝜙)

𝑐𝑜𝑠𝜓 −𝑠𝑖𝑛𝜓 0 𝑐𝑜𝑠𝜃 0 𝑠𝑖𝑛𝜃 1 0 0


𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓 0 0 1 0 0 𝑐𝑜𝑠𝜙 −𝑠𝑖𝑛𝜙
0 0 1 −𝑠𝑖𝑛𝜃 0 𝑐𝑜𝑠𝜃 0 𝑠𝑖𝑛𝜙 𝑐𝑜𝑠𝜙

Yaw Pitch Roll


𝑐𝑜𝑠𝜃𝑐𝑜𝑠𝜓 𝑠𝑖𝑛𝜙𝑠𝑖𝑛𝜃𝑐𝑜𝑠𝜓 − 𝑐𝑜𝑠𝜙𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜙𝑠𝑖𝑛𝜃𝑐𝑜𝑠𝜓 + 𝑠𝑖𝑛𝜙𝑠𝑖𝑛𝜓
= 𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜓 𝑠𝑖𝑛𝜙𝑠𝑖𝑛𝜃𝑠𝑖𝑛𝜓 + 𝑐𝑜𝑠𝜙𝑐𝑜𝑠𝜓 𝑐𝑜𝑠𝜙𝑠𝑖𝑛𝜃𝑠𝑖𝑛𝜓 − 𝑠𝑖𝑛𝜙𝑐𝑜𝑠𝜓
−𝑠𝑖𝑛𝜃 𝑠𝑖𝑛𝜙𝑐𝑜𝑠𝜃 𝑐𝑜𝑠𝜙𝑐𝑜𝑠𝜃
Equation looks terrible, we run into a problem
0 sin(𝜙 − 𝜓) cos(𝜙 − 𝜓)
π
𝑖𝑓 𝜃 = : 𝑅(𝜙, 𝜃, 𝜓) = 0 cos(𝜙 − 𝜓) −sin(𝜙 − 𝜓)
2 −1 0 0
7
We get the same results whenever ϕ= ψ + c, for any constant c
Euler Angles

XYX XYZ XZY XZX


YXY YXZ YZX YZY
Euler
ZXY ZXZ ZYX ZYZ Angles

Euler angles (φ, θ, ψ) define the following rotation:


Step1: rotate φ about z-axis
Step2: rotate θ about y-axis
Step3: rotate ψ about z-axis
8
Euler Angles
𝑅 𝜙, 𝜃, 𝜓 = 𝑅𝑧 𝜓 ∗ 𝑅𝑦 𝜃 ∗ 𝑅𝑧 (𝜙)

𝑐𝑜𝑠𝜓 −𝑠𝑖𝑛𝜓 0 𝑐𝑜𝑠𝜃 0 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜙 −𝑠𝑖𝑛𝜙 0


𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓 0 0 1 0 𝑠𝑖𝑛𝜙 𝑐𝑜𝑠𝜙 0
0 0 1 −𝑠𝑖𝑛𝜃 0 𝑐𝑜𝑠𝜃 0 0 1

𝑐𝑜𝑠𝜓𝑐𝑜𝑠𝜃𝑐𝑜𝑠𝜙 − 𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜙 −𝑠𝑖𝑛𝜓𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜙 − 𝑠𝑖𝑛𝜓𝑐𝑜𝑠𝜙 𝑐𝑜𝑠𝜓𝑠𝑖𝑛𝜃


= 𝑠𝑖𝑛𝜓𝑐𝑜𝑠𝜃𝑐𝑜𝑠𝜙 + 𝑐𝑜𝑠𝜓𝑠𝑖𝑛𝜙 −𝑠𝑖𝑛𝜓𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜙 + 𝑐𝑜𝑠𝜓𝑐𝑜𝑠𝜙 𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃
−𝑠𝑖𝑛𝜃𝑐𝑜𝑠𝜙 𝑠𝑖𝑛𝜃𝑠𝑖𝑛𝜙 𝑐𝑜𝑠𝜃

Here, 0 ≤ φ ≤ 2π, 0 ≤ ψ ≤ 2π, , and 0 ≤ θ ≤ π


9
Vector Rotation
z
v
θ

y
• Axis of rotation is a vector v
x • Angle of rotation about the vector is θ

Any two independent orthonormal coordinate frames can be related by a single


10
rotation about some axis.
Finding the Rotation Matrix

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𝑜 →𝜃

Multiplied by imaginary number is same as rotation


15
Representations
i2 = -1
k
j2 = -1
k2 = -1
i
i • j = k j • i = -k
j • k = i k • j = -i j
k • i = j i • k = -j

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

𝑎𝑡𝑎𝑛2 2 𝑞1 𝑞2 + 𝑞3 𝑞4 , 1 − 2 𝑞22 + 𝑞32


𝜙
𝜃 = 𝑎𝑠𝑖𝑛 2 𝑞1 𝑞3 − 𝑞4 𝑞2
𝜓
𝑎𝑡𝑎𝑛2 2 𝑞1 𝑞4 + 𝑞2 𝑞3 , 1 − 2 𝑞32 + 𝑞42

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

1: vector + roll-pitch-yaw angles


2: vector + Euler angles
3: vector + Quaternion
4: Homogeneous transformation

21
General Transformations

T: Translation
R: Rotation

G=R+T

22
How to Perform Transformations

Step1: Calculate Rotational Matrix


Step2: Calculate Translation Matrix

23
Homogeneous Transformation

𝑟/ = 𝑅 θ ∗ 𝑟 + 𝑡

𝑥/ 𝑅11 𝑅12 𝑅13 𝑥 𝑡𝑥


𝑦 / = 𝑅21 𝑅22 𝑅23 𝑦 + 𝑡𝑦
𝑧/ 𝑅31 𝑅32 𝑅33 𝑧 𝑡𝑧

/ 𝑅11 𝑅12 𝑅13 𝑡𝑥 𝑥


𝑥
𝑦
𝑦 / = 𝑅21 𝑅22 𝑅23 𝑡𝑦
𝑧
𝑧/ 𝑅31 𝑅32 𝑅33 𝑡𝑧 1 24
Homogeneous Transformation

𝑥/ 𝑅11 𝑅12 𝑅13 𝑡𝑥 𝑥


𝑦/ 𝑅21 𝑅22 𝑅23 𝑡𝑦 𝑦
= 𝑧
𝑧/ 𝑅31 𝑅32 𝑅33 𝑡𝑧
1 0 0 0 1 1

𝑅 𝑡 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

Joint coordinate Task coordinate


𝒑 = 𝑭(𝒒)

(2) Inverse Kinematics


Joint coordinate Task coordinate
𝒒 = 𝑭−1 (𝒑)

4
(3) Jacobian
𝝏𝑭(𝒒)
𝑱 𝒒 = 𝝉 = 𝑱𝑻 𝒒 𝒇
𝝏𝒒

(4) Dynamics - ODE


𝑴 𝒒 𝒗 + 𝑪 𝒒, 𝒗 + 𝑫 𝒗 + 𝑮 𝒒 = 𝝉 + 𝒖

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

This is the “Kinematics” of the robot 6


Forward Kinematics
“Joint” space to “Task” space
𝒑 ≔ 𝒇(𝒒)
𝑇
𝒒 = 𝑞1 𝑞2 𝑞3
𝑇
𝒑= 𝑥 𝑦 𝜃

𝑥 = 𝑙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 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

Find q1 and q2 when P(x, y) is given as depicted


in the above figure.

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)
𝜕𝑞

 Matrix J(q) only depend on q


 Relation between 𝑝 and 𝑞 is linear 3
Calculation of Jacobian
Suppose, we have a set of equation yi in terms of a set of variables xj as:
𝑦𝑖 = 𝑓𝑖 𝑥1 , 𝑥2 , 𝑥3 , … … … , 𝑥𝑗 (1)

The differential change in yi as a result of a differential change in xj will be:

𝜕𝑓1 𝜕𝑓1 𝜕𝑓1


𝛿𝑦1 = 𝛿𝑥1 + 𝛿𝑥2 + ⋯ + 𝛿𝑥𝑗
𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑗
𝜕𝑓2 𝜕𝑓2 𝜕𝑓2
𝛿𝑦2 = 𝛿𝑥1 + 𝛿𝑥2 + ⋯ + 𝛿𝑥𝑗
𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑗
(2)

𝜕𝑓𝑖 𝜕𝑓𝑖 𝜕𝑓𝑖


𝛿𝑦𝑖 = 𝛿𝑥1 + 𝛿𝑥2 + ⋯ + 𝛿𝑥𝑗
𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑗
4
Equation (2) can be written in matrix form:

𝛿𝑦1 𝜕𝑓1 𝜕𝑓1 𝜕𝑓1 𝛿𝑥1


𝛿𝑦2 𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑗 𝛿𝑥2
⋮ 𝜕𝑓2 𝜕𝑓2 𝜕𝑓2 ⋮
⋮ ⋮
= 𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑗 (3)
⋮ ⋮
⋮ ⋮ ⋮
𝜕𝑓𝑖 𝜕𝑓𝑖 𝜕𝑓𝑖 ⋮

𝛿𝑦𝑖 𝜕𝑥1 𝜕𝑥2 𝜕𝑥𝑗 𝛿𝑥𝑗

Equation (3) gives:

𝜕𝑓𝑖
𝛿𝑦𝑖 = 𝛿𝑥𝑗 (4)
𝜕𝑥𝑗
5
We can simplify (4) as:
𝑑𝑥 𝐽𝑎𝑐𝑜𝑏𝑖𝑎𝑛 𝑑𝜃1
𝑑𝑦 ⋮ 𝑑𝜃2
𝑑𝑧 𝑜𝑓 𝑑𝜃3
= (5)
𝛿𝑥 ⋮ 𝑑𝜃4
𝛿𝑦 ⋮ 𝑑𝜃5
𝛿𝑧 𝑅𝑜𝑏𝑜𝑡 𝑑𝜃6

We finally end up with:


𝐷 = 𝐽 𝐷𝜃 (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 )

and in matrix form:


𝑑𝑥 −𝑙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

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:

𝑣𝑥 −𝑙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

• 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 𝐷

This is known as “inverse Jacobian”

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

 What relation exists between τ and f ?


11
Statics: Principle of virtual work
 Virtual Work: the work done by virtual force causing
infinitesimal displacement.

𝛿𝑊 = 𝛿𝑞 𝑇 𝜏 − 𝛿𝑝 𝑇 𝑓

 “At equilibrium, the total work done by external forces causing


any possible combination of infinitesimal displacement is zero.”

 For all {δp, δq} satisfying δp= J(q)δq, 𝛿𝑞 𝑇 𝜏 − 𝛿𝑝 𝑇 𝑓 = 0 is


satisfied, and thus τ = J(q)Tf is also satisfied.

 These τ and f are said to be “statically equivalent” to each other.

12
Duality

 Linear velocity vs angular velocity 𝑣=𝐽 𝑞 𝑞

 Torque vs force 𝜏 = 𝐽 𝑞 𝑇 𝑓

 Work 𝜏𝑇𝑞 = 𝑓𝑇𝑣

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

ψ around z yaw around x

θ around x and y pitch around y

ϕ around z roll around z

5
Denavit-Hartenberg Representations

• No. of Joints: N
• No. of Links: N+1
• Links may not be straight line

Joints

6
D-H Representations

• Developed a general theory to describe an


articulated sequence of joints

• Each joint in the robot is described by four


parameters

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

• Attach a coordinate frame to the far end of every link

• Describe the pose of a link frame with respect to the


previous link frame

• 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

• This table completely describes the kinematics of the robot


18
D-H Parameters for Puma

θ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

ang. vel velocity

ang. acc accel.


Force

statics

torque force
Dynamics: Force and Motion

Dynamics
Why we study dynamics ?

• Effect of robot material on the motion.

• Effect of object weight on joint torque

• Effect of external forces


Approaches
Newtonian Approach Lagrangian Approach

Uses Newton & Euler Uses Lagrange equations


equations

Analysis of forces and Analysis of energy


moments

Less common in robotics Commonly used in


robotics
Equations of Motion (EOM)

• Translational motion
• Rotational motion
Translational Motion (Newton’s EOM)

 M: mass of the body (scalar)


 p: position of the body (3-vector)
 f: net force acting on the body (3-vector)
Rotational Motion (Euler’s EOM)

 I: Inertia tensor seen from the fixed frame


(3×3 matrix)
 N: external moment of force (3-vector)
 ω: angular velocity (3-vector)
Why we don’t use Newtonian Approach that much ?

For each link we have to compute:


 Inertial forces
Complex !
 Acceleration
Why we don’t use Newtonian Approach that much ?

For each link we have to compute:


 Inertial forces
Complex !
 Acceleration
Lagrangian Formulation
The Lagrangian (L) is defined as the difference between:

 Total Kinetic Energy (T)


 Total Potential Energy (V)

 T: total kinetic energy of all links of the robot


𝒏

𝒊 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

The Lagrangian (L) is defined as

m2
m1

 T: total Kinetic Energy


 V: total Potential Energy (V)

How to calculate the energies for each link ?


2
Step (1) : Kinetic Energy
I) Translational motion

For 1-D motion


m v
x

m: robot body mass


v: robot body velocity
3
In robotics velocity is (3×1) vector

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

Kinetic energy of link i, due to translation is

5
Step (1) : Kinetic Energy
II) Rotational motion
For 1-D motion

I: robot body moment of inertia (MOI) about the axis of rotation


ω: robot body angular velocity

6
In robotics angular velocity is (3×1) vector

Angular velocity:

Moment of inertia (MOI) differs based on which axis is the body


rotating about. Therefore, let’s define Inertia Tensor:

Inertia matrix:

7
MOI Depends on:
• Shape of the link
• Density of the link material

Kinetic energy of link i, due to rotation is

8
Step (2) : Potential Energy
Potential energy due to gravitational forces on masses when
there are certain height from the reference frame

For 1-D motion g


h

m: mass of the robot body


g: acceleration due to gravity
v: height of the robot body w.r.t reference frame 9
In robotics the potential energy of link (i)

m2
m1

g is the gravitational acceleration vector w.r.t global frame


pi is the position vector of COM of link i, w.r.t global frame

10
Putting all together
Step(1): Calculate Lagrangian based on total K.E and total P.E

• Compute translational kinetic energy of link i,

• Compute rotational kinetic energy of link i,

• Compute potential energy of link i,


11
• Compute total K.E (T) and P.E (V)

• Compute the Lagrangian (L)

Step(2): Calculate required torque for each joint

12
• Translational domain:

Summation of all external forces for a linear motion.

• Rotational domain:

Summation of all external torques for a rotational motion.


13
General form

Inertia/Mass Non-Linear Forces Gravitational Forces


Matrix (Centrifugal + Coriolis)

• Similar to (in 1-D):

14
Example (1): Simple cart-spring system
k
m F
x
• The motion is linear along x-axis, therefore

15
Therefore,

• The derivatives of the Lagrangian are:

• Therefore the equation of motion for cart-system:

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):

• We obtained from above equation:

• Now, putting these last two equations together:

• Simplify, we obtained the equation of motion :

19
Applications of Lagrangian in Robotics
Lecture 16

1
General form of Lagrangian EOM

Inertia/Mass Non-Linear Forces Gravitational Forces


Matrix (Centrifugal + Coriolis)

• Similar to (in 1-D):

2
• Lagrangian EOM in Translational domain:

Summation of all external forces for a linear motion.

• Lagrangian EOM Rotational domain:

Summation of all external torques for a rotational motion.


3
Examples

• Two-Link Robot: Pendulum Model


• Two-Link Robot: Inverted Pendulum Model

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

• Kinetic Energy (K.E) of m2:

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

• Potential Energy (P.E) due to mass m1 and m2 are,


1 1 1

2 1 1 2 2 1 2

• Total Potential Energy (P.E) :


1 2
1 2 1 1 2 2 1 2

• The Lagrangian for the system will be:

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

• Lagrangian for mass m1: Combining above three equations

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

• Lagrangian for mass m2: Combining above three equations

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy