Lecture1-Module1-Introduction and Basics

You might also like

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

EE565:Mobile Robotics

Lecture 1
Welcome
Dr. –Ing. Ahmad Kamal Nasir
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Course Objectives
• Hands-on experience on real aerial and
ground mobile robots.
• Provides an overview of problems and
approaches in mobile robotics.
• Introducing probabilistic algorithms to solve
mobile robotics problems.
• Implement state of the art probabilistic
algorithms for mobile robots with a strong
focus on vision as the main sensor.
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 2
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Organization
• Tuesday: 0800-0915
– Lectures and Discussion
– Lecturer: Ahmad Kamal Nasir
– My Office hours:
• Thursday [1100-1200]
• Friday [1100-1200]
• Thursday: 0800-0915
– Lab course, lab work and home exercises
– Teaching Assistance:
– TA Office hours:
• Tuesday [TBA]
• Thursday[TBA]

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 3


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Course Material

Probabilistic Introduction to Autonomous Multiple View


Robotics by Autonomous Land Vehicles by Geometry In
Sebastian Thurn, Mobile Robots Karsten Berns , Computer Vision by
MIT Press 2005 by Roland Springer, 2009 Richard Hartely,
Siegwart , MIT Cambridge University
Press , 2004 Press, 2004

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 4


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Week
Module Lecture Topics
No.
Course Introduction and Objectives, Short notes on Linear Algebra, Recap of Probability
1
Mobile Robot Rules, 2D/3D Geometry, Transformations, 3D-2D Projections
Kinematics
2 Wheel Kinematics and Robot Pose calculation, Mobile robot sensors and actuators

3 Motion Models (Velocity and Odometry), Sensor Models (Beam, Laser, Kinect, Camera)
Sensor Fusion
Recursive State Estimation: Least Square, Bayes Filter,Linear Kalman Filter, Extended
4 and State
Kalman Filter
Estimation
5* Non-parametric filters, Histogram filters, Particle filters
Inertial sensors models, Gyroscope, Accelerometer, Magnetometer, GPS, Inertial
6
Odometry, Mid-Term Examination
Inertial and
Visual Odometry: Camera model, calibration, Feature detection: Harris corners,
7 Visual
SIFT/SURF etc., Kanade-Lucas-Tomasi Tracker (Optical Flow)
Odometry
Epi-polar geometry for multi-view Camera motion estimation, Structure From Motion
8
(SFM): Environment mapping (Structure), Robot/Camera pose estimation (Motion)
Natural, Artificial and GPS based localization, Kalman Filter based localization, Optical
9
flow based localization
Localization and Map representation, Feature mapping, Grid Mapping, Introduction to SLAM,
10 Mapping Feature/Landmark SLAM, Grid Mapping (GMapping) , Mid-Term Examination
11* RGBD SLAM
Obstacle avoidance: configuration/work spaces, Bug Algorithm, Path Planning algorithms:
12
Dijkstra, Greedy First, A*
Navigation and
13* Path Planning Exploration, Roadmaps

14 Recap, Recent research works and future directions

15 Final Presentations
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 5
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Week
Module Lab Tasks / Tutorials
No.
1 Introduction to ROS
Mobile Robot
Kinematics
2 ROS interface with simulation environment

3 ROS Interface with low level control


Sensor Fusion and
4 IRobot setup with ROS and implement odometeric motion model
State Estimation
AR Drone setup with ROS and Sensor data fusion using AR Drone’s accelerometer and
5
gyroscope
6 Mid-Term Examination
Inertial and Visual
7 Inertial Odometry using AR Drone’s IMU and calculating measurement’s covariance
Odometry
8 Calibrate AR Drone’s camera and perform online optical flow.

9 Using AR Drone’s camera, perform visual odometry by SFM algorithm


Localization and
10 Mid-Term Examination
Mapping
11 Creating grid map using IRobot equipped with laser scanner.

12 Create a 3D grid map using IRobot equipped with Microsoft Kinect.


Navigation and
13 Setup and perform navigation using ROS navigation stack and stored map.
Path Planning
Hands-on introduction to sampling based planners via Open Motion Planning Library
14
(OMPL)
15 Final Presentations
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 6
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Lab Resources
• Four IRobots, Four AR-Drone, Four MS Kinect,
One Laser Ranger Scanner
• 11 Students
• Sign-up for a team before Lab.
• Either use lab computers or bring your own
laptop (Recommended)

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 7


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Today’s Objectives:
• Course Introduction
• Introduction to mobile robotics
• Review of basic concepts
– Linear Algebra
• Vectors, Matrices and their operations
• Some important concepts in linear algebra
• Application of linear algebra
– Points, Lines, Plane
– Probability
• Discrete random variables
• Axioms and laws

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 8


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

What is a Robot?

• Public perception

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 9


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

What is a Robot?
A mechanical system that has sensing,
actuation and computation
capabilities.
Other names (in other disciplines)
• Autonomous system
• Intelligent agent
• Control system

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 10


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

What Makes a Robot?


• A robot consists of:
– sensors
– effectors/actuators
– communication
– controller

• A robot is a rational agent capable of


– acting autonomously
– achieving goals

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 11


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Current Trends In Mobile Robotics


• Robots are moving away from factory floors to
– Personal Service, Medical Surgery, Industrial
Automation (Mining, Harvesting), Hazardous
Environment (Space, Underwater) etc.
• Mobile Robots Domains

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 12


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Modern Robotics
Three broad categories
1. Industrial robots: manipulators (1970’s)
2. Mobile robots: platforms with autonomy (1980’s)
3. Mobile manipulators = manipulator + mobility (2000’s)

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 13


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Some Mobile Robots Terminology


• UAV: Unmanned Aerial Vehicle
• UGV: Unmanned Ground Vehicle
• UUV: Unmanned Undersea
(underwater) Vehicle
• AUV: Autonomous Underwater
Vehicle

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 14


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Autonomous Driving
• Market for advanced driver assistance systems
to grow from $10 billion now to $130 billion
in 2016
• Projected to reach $500 billion by 2020

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 15


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Self-Driving Trucks for Mining


• 17 Self-driving trucks deployed for mining in
Australia
• Increased accuracy in operation as compared
to humans
• Improved earth excavation

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 16


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Unmanned Agricultural Machines


• Efficient utilization of resources
• UAVs for spraying insecticides
• Driverless tractors

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 17


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Assistive Robots
• Robotic vacuum cleaners
• Global market share of robotic vacuum cleaners--
12% of $680 million
• Growing elderly population in developed
countries
• Demographics to change by 2050
• Over 60 to form 22% of the world population
compared to the 11% today
• Needs: visual assistance, emergency assistance,
mobility assistance

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 18


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Factories of the Future


• Declining costs
– Industrial grade manipulators ~ > $100,000
– Baxter (rethink robotics) costs $22,000
• Small & Medium Enterprises (SME’s) entering the fray
• Need consistent quality
• Lean operation
• Higher productivity
• Higher accuracy in
safety critical
applications

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 19


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Paradigms in Robotics
• Classical, until 1980
• Reactive, until 2000
– Behavior Based
– Hybrid
• Probabilistic, present

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 20


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Classical/hierarchical

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 21


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Reactive Paradigm

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 22


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Example Architecture for Mobile Robot

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 23


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Stanley’s Software Architecture

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 24


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Robot Operating System (ROS)


• We will use ROS in the lab course
– http://www.ros.org/
– Installation instructions, tutorials, docs

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 25


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Short Notes on Linear Algebra


• Vector • Matrix
• Vector Operations • Types of Matrices
– Scalar Multiplication • Matrix Operations
– Addition/Subtraction
– Transpose
– Length/Normalization
– Determinant
– Dot Product
– Inverse
– Cross Product
– Jacobian / Derivative
– Matrix Vector
multiplication

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 26


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Vector
• Vector in Rn is an ordered set of n real
numbers e.g. 𝑉 = [𝑣1 , 𝑣2 , 𝑣3 ] is in R3
𝑣1 v3

• 𝑉 = 𝑣2 is a column vector
 v1 
v   v2 

𝑣3  v3 

• 𝑉 = 𝑣1 𝑣2 𝑣3 is a row vector v2

• Think of a vector as a
point or line in a n-dimensional space
v1

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 27


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Vector Operations
(Scalar Multiplication)
• Changes only the length but keeps the
direction fixed
• 𝑎 ⋅ 𝑣1 𝑣2 𝑣3 = 𝑎 ⋅ 𝑣1 𝑎 ⋅ 𝑣2 𝑎 ⋅ 𝑣3
v3

v2

v
23 January 2018 Dr. -Ing. Ahmad Kamal 1Nasir 28
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Vector Operations
(Addition/Subtraction)
v3
• V±W=U
𝑢1 𝑣1 𝑢1 ± 𝑣1
• 𝑢2 ± 𝑣2 = 𝑢2 ± 𝑣2
𝑢3 𝑣3 𝑢3 ± 𝑣3

• Vectors can be added


v2

or subtracted graphically
using head and tail rule
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 29
v1
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Vector Operations
(Length/Normalization)
• If vector components are known then its magnitude or
length can be determined (L2 or Euclidean Norm)

– 𝑉 = 𝑣12 + 𝑣22 + 𝑣32


• Normalized or unit vector has
a magnitude of 1, it is used for 𝑣
direction
𝑉 v3
𝑣
• 𝑉= v1
𝑉
• L1 or Manhattan norm v2
𝑛

𝑥 1
= 𝑥𝑖
𝑖=0

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 30


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Vector Operations
(Dot Product)
• The dot product measures to what degree two
vectors are aligned in other words it can be used
to calculate the angle between two vectors
• 𝑉 ⋅ 𝑊 = 𝑉 𝑊 cos 𝜃
• For orthogonal vectors 𝑉 ⋅ 𝑊 = 0
• Magnitude is the dot product w
𝜃
of the vector with itself v
𝑣 𝑤 cos 𝜃
𝑇
• 𝑉 = 𝑉 ⋅ 𝑉 = 𝑥𝑖 ⋅ 𝑥𝑖

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 31


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Vector Operations
(Cross Product)
• Cross product of two vectors is a vector
perpendicular to both vectors i.e.
• 𝑈 =𝑉×𝑊
• Magnitude of the cross product
is the area of parallelogram i.e. u
• 𝑉 × 𝑊 = 𝑉 𝑊 sin 𝜃 v
𝜃 𝑣×𝑤
w

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 32


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrix
columns

• Matrix is a set of elements, 𝑎11 𝑎12 𝑎13


rows 𝑎
organized into rows and 21 𝑎22 𝑎23
columns 𝑎31 𝑎32 𝑎33
• Think of a matrix as a transformation on a
line/point or set of lines/points
V

 x  a b   x' 
 y   c d    y '
    
V’

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 33


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrices (Cont.)
When we multiply a matrix with a vector, it rotates and scales it to some amount

A
w3
v3

 v1 
v  v2 
 v3  w2
v2  w1 
w   w2   Av
 w3 

w1
v1

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 34


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrices as linear transformations


5 0 1  5

0 

 
  
 

 5 1  5 (stretching)

0  11   1

1 

 
  
 

 0 1  1  (rotation)

1 c  x   x  cy 

0 

 
  
 

 1  y   y  (shearing)

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 35


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Type of Matrices
Positive(Semi) Definite Matrix
If the matrix A is positive definite then the set of
points, x, that satisfy 𝑥 ′ 𝐴𝑥 = 𝑐 where c>0 are on
the surface of an n-dimensional ellipsoid
centered at the origin

Useful fact: Any matrix of


form ATA is positive
semi-definite

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 36


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Type of Matrices
Orthogonal/Orthonormal Matrix
1. Orthogonal matrices
– A matrix is orthogonal if PˊP = PPˊ = I
– In this cases P-1=Pˊ .
– Also the rows (columns) of P have length 1 and
are orthogonal to each other
• Symmetric (𝐴 = 𝐴𝑇 )

Orthogonal transformation preserve length and


angles
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 37
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrix Operation
(Matrix-Vector Multiplication)
• Matrix is like a function that transforms the vectors
on a plane
• Matrix operating on a general point => transforms x-
and y-components
• System of linear equations: matrix is just the bunch
of coeffs !

a b   x   x'
• x’ = ax + by  
   
• y’ = cx + dy c d   y  y'
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 38
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrix Operation
(Matrix-Matrix Multiplication)

L  MN

l11 l12 l13   m11 m12 m13   n11 n12 n13 


l     
 21 l22 l23   m21 m22 m23   n21 n22 n23 
l31 l32 l33  m31 m32 m33  n31 n32 n33 

l12  m11n12  m12n22  m13n32

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 39


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrix Operation
(Transposition)
• Consider the n × m matrix, A
 a11 a12 a1n 
a a2 n 
A   aij    21
a22
 
 
 am1 am 2 amn 
then the m × n matrix,A (also denoted by AT)
 a11 a21 am1 
a am 2 
A   a ji    a22
 12

 
 
 am1 am 2 amn 
Matrix A is symmetric if A = AT

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 40


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrix Operation
(Determinant)
• Used for inversion
• If det(A) = 0, then A has no inverse

• Multiplication of Eigen values

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 41


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrix Operation
(Inversion)
• A-1 does not exist for all matrices A
• A-1 exists only if A is a square matrix and |A| ≠ 0
• If A-1 exists then the system of linear equations
has a unique solution

Ax  b
1
xA b

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 42


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrix Operation
(Moore-Penrose Pseudoinverse)
• Pseudoinverse (𝐴+ = 𝐴𝑇 𝐴 −1 𝐴𝑇 ) of a matrix
𝐴 is a generalization of a matrix.
– It is used to find a solution, with minimum
Euclidean norm (least square), to a system of
linear equation which has many solutions.
• Can be computed efficiently using
– SVD
– QR method

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 43


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Matrix Operations
(Jacobian/Derivative)
𝑥1 𝑓1 𝑥
Let 𝑥 = 𝑥2 denotes a vector and 𝑓 𝑥 = 𝑓2 𝑥
𝑥3 𝑓3 𝑥
denotes a vector of functions then the first derivative
or Jacobian is defined as
𝑑𝑓1 (𝑥) 𝑑𝑓1 (𝑥) 𝑑𝑓1 (𝑥)
𝑑𝑥1 𝑑𝑥2 𝑑𝑥3
𝑑𝑓(𝑥) 𝑑𝑓2 (𝑥) 𝑑𝑓2 (𝑥) 𝑑𝑓2 (𝑥)
= 𝑑𝑥1 𝑑𝑥2 𝑑𝑥3
𝑑𝑥
𝑑𝑓3 (𝑥) 𝑑𝑓3 (𝑥) 𝑑𝑓3 (𝑥)
𝑑𝑥1 𝑑𝑥2 𝑑𝑥3

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 44


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Eigenvectors and Eigenvalues


An eigenvector of a square matrix is a non zero vector
which when multiplied with the same matrix results into
the scaled version of the vector without change it’s
orientation i.e.
𝐴⋅𝑥 =𝜆⋅𝑥
Eigenvalues are determined as
follows
det 𝐴 − 𝜆 ⋅ 𝐼 = 0
In other words a linear transformation
matrix A when applied to vectors parallel
to it’s eigenvectors doesn’t change it’s
orientation but only magnitude

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 45


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Eigenvectors and Eigenvalues (Cont.)


• A nxn matrix has at most n eigenvalues i.e.
𝜆1 , 𝜆2 , … , 𝜆𝑛
• It holds the following properties
– A real symmetric positive definite (Hermitian) or
positive semi-definte matrix has all positive
eigenvalues
– 𝑇𝑟𝑎𝑐𝑒 𝐴 = 𝜆1 + 𝜆2 … + 𝜆𝑛 = 𝑛𝑖=1 𝜆𝑖
– Determinant 𝐴 = 𝜆1 ∙ 𝜆2 … ∙ 𝜆𝑛 = 𝑛𝑖=1 𝜆𝑖
𝑘 𝑘 𝑘
– 𝐴𝑘 = 𝜆1 , 𝜆2 … , 𝜆𝑛

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 46


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Singular Value Decomposition (SVD)


Since a matrix transforms, rotate and scale, a
vector. SVD of a matrix decomposes the given
matrix as composition of it’s characteristics
rotation 𝑈 and scale Σ matrix
𝐴 = 𝑈 ⋅ Σ ⋅ 𝑉𝑇
𝑈, 𝑉 are unitary (orthonormal matrix)
Σ is a diagonal matrix of singular values
The matrix A maps the basis vector 𝑣𝑖 to 𝜎𝑖 𝑢𝑖

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 47


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

2D and 3D Points
Let’s apply some concepts of matrix algebra
Consider 2D/3D points as column vector
𝑥
𝑦
𝑉= 𝑧
1
Transformations are represented as 4x4 matrix
𝑟11 𝑟11 𝑟11 𝑥
𝑟11 𝑟11 𝑟11 𝑦
𝐴= 𝑟
11 𝑟11 𝑟11 𝑧
0 0 0 1
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 48
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

2D/3D Line
Ways of representing lines
• Two points
• Slope-Intercept form
• Parametric form
The line which passes through point 𝑷𝟎 and parallel to vector (𝑷𝟏 − 𝑷𝟎 )
x  x0   x1  x0  t
L : y  y0   y1  y0  t 0  t  1
z  z0   z1  z0  t P1(x1,y1,z1)
V
L  P0  t ( P1  P0 )
P0(x0,y0,z0)

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 49


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

3D Plane
N
• Ways of defining a plane
• 3 points P0, P1, P2 on the plane
P0 P2
• Plane Normal N & P0 on plane V
P1
• Plane Normal N & a vector V on the plane
Plane Passing through P0, P1, P2
N  P0 P1  P0 P2  Aiˆ  Bˆj  Ckˆ
if P(x, y, z) is on the plane
N  P0 P  0
 
 ( Aiˆ  Bˆj  Ckˆ)  ( x  x0 )iˆ  ( y  y0 ) ˆj  ( z  z0 )kˆ  0
 Ax  By  Cz  D  0
where D  ( Ax0  By 0  Cz0 )

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 50


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Recap of Probability Rules


• Discrete Random Variables
• Probability Density Functions
• Axioms of Probability Theory
• Joint and Conditional Probability
• Laws of Total Probability
– Marginalization
– Bayes Rule

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 51


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Random Variables (Discrete)


• 𝑋 represetns a random variable
• 𝑋 can take countable number of
values: 𝑥1 , 𝑥2 , . . , 𝑥𝑛
• 𝑃 ⋅ represents the probability function e.g.
Gaussian, Uniform etc.
• 𝑃(𝑋 = 𝑥𝑖 ) or 𝑃(𝑥𝑖 ) is
the probability of occurring
event 𝑥𝑖 using the probability
function 𝑃(⋅)
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 52
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Typical Distributions for Probabilistic


Motion Models
Normal distribution Triangular distribution

1 x2
0 if | x | 6 2
1  2 
  ( x) 
2 e 2   2 ( x)   6 2  | x |
2 2

 6 2
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 53
EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

How to Sample from Normal or


Triangular Distributions?
• Sampling from a normal distribution
1. Algorithm sample_normal_distribution(b):

2. return

• Sampling from a triangular distribution

1. Algorithm sample_triangular_distribution(b):

2. return
23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 54
Normally/Triangular Distributed
Samples

106 samples

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 55


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Axioms of Probability Theory


• 0 ≤ 𝑃(𝑋) ≤ 1
• 𝑃 𝑇𝑅𝑈𝐸 = 1
• 𝑃 𝐹𝐴𝐿𝑆𝐸 = 0
• 𝑃 𝑋∪𝑌 =𝑃 𝑋 +𝑃 𝑌 −𝑃 𝑋∩𝑌
• 𝑃 ¬𝑋 = 1 − 𝑃 𝑋
• 𝑥 𝑃 𝑥𝑖 = 1

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 56


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Joint and Conditional Probability


• Joint Probability
– 𝑃 𝑋 = 𝑥 𝑎𝑛𝑑 𝑌 = 𝑦 = 𝑃 𝑥 ∩ 𝑦 = 𝑃 𝑥, 𝑦
– If 𝑋 and 𝑌 are independent 𝑃 𝑥, 𝑦 = 𝑃 𝑥 ⋅ 𝑃 𝑦

• Conditional Probability
𝑃 𝑥,𝑦
–𝑃 𝑥 𝑦 = or 𝑃 𝑥, 𝑦 = 𝑃 𝑥 𝑦 ⋅ 𝑃 𝑦
𝑃 𝑦
– If 𝑋 and 𝑌 are independent 𝑃 𝑥|𝑦 = 𝑃 𝑥

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 57


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Law of Total Probability


Marginalization and Bayes Formula
• Law of Total Probability
–𝑃 𝑦 = 𝑥𝑃 𝑦 𝑥 ⋅𝑃 𝑥
• Marginalization
–𝑃 𝑥 = 𝑦 𝑃(𝑥, 𝑦)

• Bayes Formula
– 𝑃 𝑥, 𝑦 = 𝑃 𝑥 𝑦 ⋅ 𝑃 𝑦 = 𝑃 𝑦 𝑥 ⋅ 𝑃 𝑥
𝑃 𝑦 𝑥 ⋅𝑃 𝑥 𝑒𝑥𝑝𝑒𝑐𝑡𝑒𝑑 ⋅ 𝑝𝑖𝑟𝑜𝑟
⇒𝑃 𝑥𝑦 = =
𝑃 𝑦 𝑚𝑒𝑎𝑠𝑢𝑟𝑒𝑚𝑒𝑛𝑡

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 58


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

Summary
• Course Introduction
• Introduction to mobile robotics
• Review of basic concepts
– Linear Algebra
• Vectors, Matrices and their operations
• Some important concepts in linear algebra
• Application of linear algebra
– Points, Lines, Plane
– Probability
• Discrete random variables
• Axioms and laws

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 59


EE565: Mobile Robotics Module 1: Mobile Robot Kinematics

23 January 2018 Dr. -Ing. Ahmad Kamal Nasir 60

You might also like