City College of New York
1
Dr. John (Jizhong) Xiao
Department of Electrical Engineering
City College of New York
Course Summary
Introduction to ROBOTICS
City College of New York
2
Mobile Robot
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?
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
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
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
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)
City College of New York
8
Tricycle Kinematics model in the world frame---Posture kinematics model
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)
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
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
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
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
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, …
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:
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
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
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
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.
City College of New York
20
Dr. John (Jizhong) Xiao
Department of Electrical Engineering
City College of New York
Mobile Robot Mapping
Introduction to ROBOTICS
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
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
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
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)
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
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
City College of New York
27
Dr. John (Jizhong) Xiao
Department of Electrical Engineering
City College of New York
A Taste of Localization Problem
Introduction to ROBOTICS
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
City College of New York
29
Bayes Rule with Background Knowledge
)|(
)|(),|(),|(
zyP
zxPzxyPzyxP
City College of New York
30
Markov assumption(or static world assumption)
City College of New York
31
Markov Localization
• Measurement
• Action
City College of New York
32
Measurement: Update Phasea b c
City College of New York
33
Measurement: Update Phase
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
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?
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.
City College of New York
37
Integrating the Outcome of Actions
')'()',|()|( dxxPxuxPuxP
)'()',|()|( xPxuxPuxP
Continuous case:
Discrete case:
City College of New York
38
Summary
• Measurement
• Action
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
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
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
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.
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