Why probability in robotics? n Often state of robot and state of its - - PowerPoint PPT Presentation

why probability in robotics
SMART_READER_LITE
LIVE PREVIEW

Why probability in robotics? n Often state of robot and state of its - - PowerPoint PPT Presentation

Probability: Review Pieter Abbeel UC Berkeley EECS Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics Why probability in robotics? n Often state of robot and state of its environment are unknown and only noisy sensors


slide-1
SLIDE 1

Probability: Review

Pieter Abbeel UC Berkeley EECS

Many slides adapted from Thrun, Burgard and Fox, Probabilistic Robotics

slide-2
SLIDE 2

n Often state of robot and state of its environment are

unknown and only noisy sensors available

n Probability provides a framework to fuse sensory

information

à Result: probability distribution over possible states of

robot and environment

n Dynamics is often stochastic, hence can’t optimize for a

particular outcome, but only optimize to obtain a good distribution over outcomes

n Probability provides a framework to reason in this setting à Result: ability to find good control policies for stochastic

dynamics and environments

Why probability in robotics?

slide-3
SLIDE 3

n State: position, orientation, velocity, angular rate n Sensors:

n GPS : noisy estimate of position (sometimes also velocity) n Inertial sensing unit: noisy measurements from

(i)

3-axis gyro [=angular rate sensor],

(ii) 3-axis accelerometer [=measures acceleration +

gravity; e.g., measures (0,0,0) in free-fall],

(iii) 3-axis magnetometer

n Dynamics:

n Noise from: wind, unmodeled dynamics in engine, servos,

blades

Example 1: Helicopter

slide-4
SLIDE 4

n State: position and heading n Sensors:

n Odometry (=sensing motion of actuators): e.g., wheel

encoders

n Laser range finder:

n Measures time of flight of a laser beam between

departure and return

n Return is typically happening when hitting a surface

that reflects the beam back to where it came from

n Dynamics:

n Noise from: wheel slippage, unmodeled variation in floor

Example 2: Mobile robot inside building

slide-5
SLIDE 5

5

n n n

Axioms of Probability Theory

1 ) Pr( ≤ ≤ A

Pr(!) =1 Pr(A!B) = Pr(A)+ Pr(B)" Pr(A#B) Pr(!) = 0

Pr(A) denotes probability that the outcome ω is an element of the set of possible outcomes A. A is often called an event. Same for B. Ω is the set of all possible outcomes. ϕ is the empty set.

slide-6
SLIDE 6

6

A Closer Look at Axiom 3

A!B A B

Pr(A!B) = Pr(A)+ Pr(B)" Pr(A#B)

!

slide-7
SLIDE 7

7

Using the Axioms

Pr(A!(" \ A)) = Pr(A)+ Pr(" \ A)# Pr(A$(" \ A)) Pr(") = Pr(A)+ Pr(" \ A)# Pr(!) 1 = Pr(A)+ Pr(" \ A)# 0 Pr(" \ A) = 1# Pr(A)

slide-8
SLIDE 8

8

Discrete Random Variables

n X denotes a random variable. n X can take on a countable number of values in {x1, x2,

…, xn}.

n P(X=xi), or P(xi), is the probability that the random

variable X takes on value xi.

n P( ) is called probability mass function. n E.g., X models the outcome of a coin flip, x1 = head, x2 =

tail, P( x1 ) = 0.5 , P( x2 ) = 0.5

. x1

!

x2 x4 x3

slide-9
SLIDE 9

9

Continuous Random Variables

n X takes on values in the continuum. n p(X=x), or p(x), is a probability density function. n E.g.

= ∈

b a

dx x p b a x ) ( )) , ( Pr(

x p(x)

slide-10
SLIDE 10

10

Joint and Conditional Probability

n P(X=x and Y=y) = P(x,y) n If X and Y are independent then

P(x,y) = P(x) P(y)

n P(x | y) is the probability of x given y

P(x | y) = P(x,y) / P(y) P(x,y) = P(x | y) P(y)

n If X and Y are independent then

P(x | y) = P(x)

n Same for probability densities, just P à p

slide-11
SLIDE 11

11

Law of Total Probability, Marginals

=

y

y x P x P ) , ( ) (

=

y

y P y x P x P ) ( ) | ( ) (

=

x

x P 1 ) (

Discrete case

=1 ) ( dx x p

Continuous case

= dy y p y x p x p ) ( ) | ( ) (

= dy y x p x p ) , ( ) (

slide-12
SLIDE 12

12

Bayes Formula

evidence prior likelihood ) ( ) ( ) | ( ) ( ) ( ) | ( ) ( ) | ( ) , ( ⋅ = = ⇒ = = y P x P x y P y x P x P x y P y P y x P y x P

slide-13
SLIDE 13

13

Normalization

) ( ) | ( 1 ) ( ) ( ) | ( ) ( ) ( ) | ( ) (

1

x P x y P y P x P x y P y P x P x y P y x P

x

= = = =

η η

y x x y x y x

y x P x x P x y P x

| | |

aux ) | ( : aux 1 ) ( ) | ( aux : η η = ∀ = = ∀

Algorithm:

slide-14
SLIDE 14

14

Conditioning

n Law of total probability:

∫ ∫ ∫

= = = dz y z P z y x P y x P dz z P z x P x P dz z x P x P ) | ( ) , | ( ) ( ) ( ) | ( ) ( ) , ( ) (

slide-15
SLIDE 15

15

Bayes Rule with Background Knowledge

) | ( ) | ( ) , | ( ) , | ( z y P z x P z x y P z y x P =

slide-16
SLIDE 16

16

Conditional Independence

) | ( ) | ( ) , ( z y P z x P z y x P = ) , | ( ) ( y z x P z x P = ) , | ( ) ( x z y P z y P =

equivalent to and

slide-17
SLIDE 17

17

Simple Example of State Estimation

n Suppose a robot obtains measurement z n What is P(open|z)?

slide-18
SLIDE 18

18

Causal vs. Diagnostic Reasoning

n P(open|z) is diagnostic. n P(z|open) is causal. n Often causal knowledge is easier to obtain. n Bayes rule allows us to use causal knowledge:

) ( ) ( ) | ( ) | ( z P

  • pen

P

  • pen

z P z

  • pen

P =

count frequencies!

slide-19
SLIDE 19

19

Example

n P(z|open) = 0.6

P(z|¬open) = 0.3

n P(open) = P(¬open) = 0.5

67 . 3 2 5 . 3 . 5 . 6 . 5 . 6 . ) | ( ) ( ) | ( ) ( ) | ( ) ( ) | ( ) | ( = = ⋅ + ⋅ ⋅ = ¬ ¬ + = z

  • pen

P

  • pen

p

  • pen

z P

  • pen

p

  • pen

z P

  • pen

P

  • pen

z P z

  • pen

P

  • z raises the probability that the door is open.

P(open | z) = P(z | open)P(open) P(z)

slide-20
SLIDE 20

20

Combining Evidence

n Suppose our robot obtains another observation z2. n How can we integrate this new information? n More generally, how can we estimate

P(x| z1...zn )?

slide-21
SLIDE 21

21

Recursive Bayesian Updating

) , , | ( ) , , | ( ) , , , | ( ) , , | (

1 1 1 1 1 1 1 − − −

=

n n n n n n

z z z P z z x P z z x z P z z x P … … … …

Markov assumption: zn is independent of z1,...,zn-1 if we know x.

P(x | z1,…, zn) = P(zn | x) P(x | z1,…, zn ! 1) P(zn | z1,…, zn ! 1) =! P(zn | x) P(x | z1,…, zn ! 1) =!1...n P(zi | x)

i=1...n

"

# $ % & ' (P(x)

slide-22
SLIDE 22

22

Example: Second Measurement

n P(z2|open) = 0.5

P(z2|¬open) = 0.6

n P(open|z1)=2/3

625 . 8 5 3 1 5 3 3 2 2 1 3 2 2 1 ) | ( ) | ( ) | ( ) | ( ) | ( ) | ( ) , | (

1 2 1 2 1 2 1 2

= = ⋅ + ⋅ ⋅ = ¬ ¬ + = z

  • pen

P

  • pen

z P z

  • pen

P

  • pen

z P z

  • pen

P

  • pen

z P z z

  • pen

P

  • z2 lowers the probability that the door is open.
slide-23
SLIDE 23

23

A Typical Pitfall

n Two possible locations x1 and x2 n P(x1)=0.99 n P(z|x2)=0.09 P(z|x1)=0.07

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 5 10 15 20 25 30 35 40 45 50 p( x | d) Number of integrations p(x2 | d) p(x1 | d)