city college of new york 1 dr. john (jizhong) xiao department of electrical engineering city college...

43
City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York [email protected] Course Summary Introduction to ROBOTICS

Post on 19-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

1

Dr. John (Jizhong) Xiao

Department of Electrical Engineering

City College of New York

[email protected]

Course Summary

Introduction to ROBOTICS

Page 2: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

2

Mobile Robot

Page 3: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

3

Mobot System Overview

Abstraction level

Motor Modeling: what voltage should I set now ?

Control (PID): what voltage should I set over time ?

Kinematics: if I move this motor somehow, what happens in other coordinate systems ?

Motion Planning: Given a known world and a cooperative mechanism, how do I get there from here ?

Bug Algorithms: Given an unknowable world but a known goal and local

sensing, how can I get there from here?

Mapping: Given sensors, how do I create a useful map?

low-level

high-level

Localization: Given sensors and a map, where am I ?Vision: If my sensors are eyes, what do I do?

Page 4: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

4

Mobile Robot Locomotion

Swedish Wheel

Locomotion: the process of causing a robot to move

Tricycle

Synchronous Drive Omni-directional

Differential Drive

R

Ackerman Steering

Page 5: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

5

Differential Drive

0cossincossin

yx

y

x

• Nonholonomic Constraint

90

Property: At each time instant, the left and right wheels must follow a trajectory that moves around the ICC at the same angular rate , i.e.,

RVL

R )2

( LVL

R )2

(

• Kinematic equation

Page 6: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

6

Differential Drive• Basic Motion Control

• Straight motion R = Infinity VR =

VL

• Rotational motion R = 0 VR

= -VL

R : Radius of rotation

Page 7: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

7

Tricycle

d: distance from the front wheel to the rear axle

• Steering and power are provided through the front wheel

• control variables:– angular velocity of steering wheel ws(t)

– steering direction α(t)

Page 8: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

8

Tricycle Kinematics model in the world frame---Posture kinematics model

Page 9: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

9

Synchronous Drive

• All the wheels turn in unison– All wheels point in the

same direction and turn at the same rate

– Two independent motors, one rolls all wheels forward, one rotate them for turning

• Control variables (independent)– v(t), ω(t)

Page 10: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

10

Ackerman Steering (Car Drive)• The Ackerman Steering equation:

– :

sin

coscot

l

dl

dR

l

dRoi

2/2/

cotcot

l

doi cotcot

R

Page 11: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

11

Car-like Robot

1uR

2

1

1

1

tan

sin

cos

ul

u

uy

ux

0cossin yx non-holonomic constraint:

: forward velocity of the rear wheels

: angular velocity of the steering wheels

1u

2u

l : length between the front and rear wheels

X

Y

yx,

l

ICC

R

1tanu

l

Rear wheel drive car model:

Driving type: Rear wheel drive, front wheel steering

Page 12: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

12

Robot Sensing • Collect information about the world• Sensor - an electrical/mechanical/chemical device

that maps an environmental attribute to a quantitative measurement

• Each sensor is based on a transduction principle - conversion of energy from one form to another

• Extend ranges and modalities of Human Sensing

Page 13: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

13

Solar Cell

Digital Infrared Ranging

Compass

Touch Switch

Pressure Switch

Limit Switch

Magnetic Reed Switch

Magnetic Sensor

Miniature Polaroid Sensor

Polaroid Sensor Board

Piezo Ultrasonic Transducers

Pyroelectric Detector

Thyristor

Gas Sensor

Gieger-MullerRadiation Sensor

Piezo Bend Sensor

Resistive Bend Sensors

Mechanical Tilt Sensors

Pendulum Resistive Tilt Sensors

CDS Cell Resistive Light Sensor

Hall EffectMagnetic Field

Sensors

Compass

IRDA Transceiver

IR Amplifier Sensor

IR ModulatorReceiverLite-On IR

Remote Receiver

Radio ShackRemote Receiver

IR Sensor w/lens

GyroAccelerometer

IR Reflection Sensor

IR Pin Diode

UV Detector

Metal Detector

Page 14: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

14

Sensors Used in Robot• Resistive sensors:

– bend sensors, potentiometer, resistive photocells, ...

• Tactile sensors: contact switch, bumpers…• Infrared sensors

– Reflective, proximity, distance sensors…

• Ultrasonic Distance Sensor• Motor Encoder• Inertial Sensors (measure the second derivatives of

position)– Accelerometer, Gyroscopes,

• Orientation Sensors: Compass, Inclinometer• Laser range sensors• Vision, GPS, …

Page 15: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

15

Incremental Optical Encoders

A

BA leads B

• Incremental Encoder:

ChA

ChB

DIR

Encoder pulse and motor direction

• It generates pulses proportional to the rotation speed of the shaft.• Direction can also be indicated with a two phase encoder:

Page 16: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

16

Motion Planning

– Configuration Space– Motion Planning Methods

• Roadmap Approaches• Cell Decomposition• Potential Fields• Bug Algorithms

Path Planning: Find a path connecting an initial configuration to goal configuration without collision with obstacles

Page 17: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

17

Motion Planning• Motion Planning Methodololgies – Roadmap – Cell Decomposition – Potential Field

• Roadmap – From Cfree a graph is defined (Roadmap) – Ways to obtain the Roadmap

• Visibility graph• Voronoi diagram

• Cell Decomposition – The robot free space (Cfree) is decomposed into simple regions (cells) – The path in between two poses of a cell can be easily generated• Potential Field – The robot is treated as a particle acting under the influence of a potential field U, where: • the attraction to the goal is modeled by an additive field • obstacles are avoided by acting with a repulsive force that yields a negative field

Global methods

Local methods

Page 18: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

18

Full-knowledge motion planning

approximate free space

represented via a quadtree

Cell decompositionsRoadmaps

exact free space

represented via convex polygons

visibility graph

voronoi diagram

Page 19: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

19

Potential field Method• Usually assumes some knowledge at the global level

The goal is known; the obstacles sensed

Each contributes forces, and the robot follows the resulting gradient.

Page 20: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

20

Dr. John (Jizhong) Xiao

Department of Electrical Engineering

City College of New York

[email protected]

Mobile Robot Mapping

Introduction to ROBOTICS

Page 21: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

21

Sonar sensing

Why is sonar sensing limited to between ~12 in.

and ~25 feet ?

“The sponge”

Polaroid sonar emitter/receivers

sonar timeline

0

a “chirp” is emitted into the environment

75s

typically when reverberations from the initial chirp have stopped

.5sthe transducer goes into “receiving” mode and awaits a signal...

after a short time, the signal will be too weak to be detected

Sonar (sound navigation and ranging): range sensing using acoustic (i.e., sound) signal

Blanking time Attenuation

Page 22: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

22

Using sonar to create maps

What should we conclude if this sonar reads 10 feet?

10 feet

there is something somewhere around here

there isn’t something here

Local Mapunoccupied

occupied

or ...

no information

Page 23: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

23

Using sonar to create maps

What should we conclude if this sonar reads 10 feet...

10 feet

and how do we add the information that the next sonar reading (as the robot moves) reads 10 feet, too?

10 feet

Page 24: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

24

Several answers to this question have been tried:

It’s a map of occupied cells.

It’s a map of probabilities: p( o | S1..i )

p( o | S1..i )

It’s a map of odds.

The certainty that a cell is occupied, given the sensor readings S1, S2, …, Si

The certainty that a cell is unoccupied, given the sensor readings S1, S2, …, Si

The odds of an event are expressed relative to the complement of that event.

odds( o | S1..i ) = p( o | S1..i )p( o | S1..i )

The odds that a cell is occupied, given the sensor readings S1, S2, …,

Si

oxy oxy cell (x,y) is occupied

cell (x,y) is unoccupied

‘83 - ‘88

pre ‘83

What is it a map of ?

probabilities

evidence = log2(odds)

Page 25: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

25

Combining evidence

So, how do we combine evidence to create a map?

What we want --

odds( o | S2 S1) the new value of a cell in the map after the sonar reading S2

What we know --

odds( o | S1) the old value of a cell in the map (before sonar reading S2)

p( Si | o ) & p( Si | o ) the probabilities that a certain obstacle causes the sonar reading Si

Page 26: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

26

p( S2 | o ) p( S1 | o ) p(o)

Combining evidence

odds( o | S2 S1) = p( o | S2 S1 )

p( o | S2 S1 )

. =

. =

. =

p( S2 S1 | o ) p(o)

p( S2 S1 | o ) p(o)

p( S2 | o ) p( S1 | o ) p(o)

Update step = multiplying the previous odds by a precomputed weight.

def’n of odds

Bayes’ rule (+)

conditional independence of S1 and

S2

p( S2 | o ) p( o | S1 )p( S2 | o ) p( o | S1 ) Bayes’ rule

(+)

previous oddsprecomputed valuesthe sensor model

Page 27: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

27

Dr. John (Jizhong) Xiao

Department of Electrical Engineering

City College of New York

[email protected]

A Taste of Localization Problem

Introduction to ROBOTICS

Page 28: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

28

Bayes Formula

)( yxp

)(

)()|()(

yP

xPxyPyxP

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

Posterior probability distribution)( xyp

)(xp Prior probability distribution

If y is a new sensor reading

Generative model, characteristics of the sensor)(yp

Does not depend on x

Page 29: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

29

Bayes Rule with Background Knowledge

)|(

)|(),|(),|(

zyP

zxPzxyPzyxP

Page 30: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

30

Markov assumption(or static world assumption)

Page 31: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

31

Markov Localization

• Measurement

• Action

Page 32: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

32

Measurement: Update Phasea b c

Page 33: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

33

Measurement: Update Phase

Page 34: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

34

Recursive Bayesian Updating

),,|(

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

11

11111

nn

nnnn

zzzP

zzxPzzxzPzzxP

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

)()|(

),,|()|(

),,|(

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

...1...1

11

11

111

xPxzP

zzxPxzP

zzzP

zzxPxzPzzxP

ni

in

nn

nn

nnn

Page 35: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

35

Action: Prediction Phase

• The robot turns its wheels to move• The robot uses its manipulator to grasp an object• Plants grow over time…• Actions are never carried out with absolute

certainty.• In contrast to measurements, actions generally

increase the uncertainty.

• How can we incorporate such actions?

Page 36: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

36

Modeling Actions

• To incorporate the outcome of an action u into the current “belief”, we use the conditional pdf

P(x|u,x’)

• This term specifies the pdf that executing u changes the state from x’ to x.

Page 37: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

37

Integrating the Outcome of Actions

')'()',|()|( dxxPxuxPuxP

)'()',|()|( xPxuxPuxP

Continuous case:

Discrete case:

Page 38: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

38

Summary

• Measurement

• Action

Page 39: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

39

Bayes Filters: Framework

• Given:– Stream of observations z and action data u:

– Sensor model P(z|x).– Action model P(x|u,x’).– Prior probability of the system state P(x).

• Wanted: – Estimate of the state X of a dynamical system.– The posterior of the state is also called Belief:

),,,|()( 11 tttt zuzuxPxBel

},,,{ 11 ttt zuzud

Page 40: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

40

Markov Assumption

Underlying Assumptions• Static world, Independent noise• Perfect model, no approximation errors

),|(),,|( 1:1:11:1 ttttttt uxxpuzxxp )|(),,|( :1:1:0 tttttt xzpuzxzp

State transition probability

Measurement probability

Markov Assumption: –past and future data are independent if one knows the current state

Page 41: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

41111 )(),|()|( ttttttt dxxBelxuxPxzP

Bayes Filters

),,,|(),,,,|( 1111 ttttt uzuxPuzuxzP Bayes

z = observationu = actionx = state

),,,|()( 11 tttt zuzuxPxBel

Markov ),,,|()|( 11 tttt uzuxPxzP

Markov11111 ),,,|(),|()|( tttttttt dxuzuxPxuxPxzP

1111

111

),,,|(

),,,,|()|(

ttt

ttttt

dxuzuxP

xuzuxPxzP

Total prob.

Markov111111 ),,,|(),|()|( tttttttt dxzzuxPxuxPxzP

Page 42: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

42

Bayes Filters are Family

111 )(),|()|()( tttttttt dxxBelxuxPxzPxBel

• Bayes rule allows us to compute probabilities that are hard to assess otherwise.

• Under the Markov assumption, recursive Bayesian updating can be used to efficiently combine evidence.

• Bayes filters are a probabilistic tool for estimating the state of dynamic systems.

Page 43: City College of New York 1 Dr. John (Jizhong) Xiao Department of Electrical Engineering City College of New York jxiao@ccny.cuny.edu Course Summary Introduction

City College of New York

43

Thank you!

Next Class: Final Exam

Time: 6:30pm-8:30pm, Dec. 9, 2013,

Coverage: Mobile RobotClose-book with 1 page cheat sheet, but Do Not Cheat