Introduction - City University of New York

Download Report

Transcript Introduction - City University of New York

Introduction to ROBOTICS
Course Summary
Dr. John (Jizhong) Xiao
Department of Electrical Engineering
City College of New York
[email protected]
City College of New York
1
Mobile Robot
City College of New York
2
Mobot System Overview
high-level
Motion Planning: Given a known world and a
cooperative mechanism, how do I
get there from here ?
Localization: Given sensors and a map, where am I ?
Vision: If my sensors are eyes, what do I do?
Mapping: Given sensors, how do I create a useful map?
Abstraction level
Bug Algorithms: Given an unknowable world but a
known goal and local sensing, how
can I get there from here?
Kinematics: if I move this motor somehow, what
happens in other coordinate systems ?
Control (PID): what voltage should I set over time ?
low-level
Motor Modeling: what voltage should I set now ?
City College of New York
3
Mobile Robot Locomotion
Locomotion: the process of causing a robot to move
 Differential Drive
 Tricycle
R
 Synchronous Drive
 Ackerman Steering
City College of New York
Swedish Wheel
 Omni-directional
4
Differential Drive
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.,
L
L
 ( R  )  VR
 ( R  )  VL
2
2
• Kinematic equation

90  
• Nonholonomic Constraint
 x 
sin   cos    x sin   y cos  0
 y 
City College of New York
5
Differential Drive
• Basic Motion Control
R : Radius of rotation
• Straight motion
R = Infinity
• Rotational motion
R= 0
City College of New York
VR = VL
VR = -VL
6
Tricycle
• Steering and power are provided through the front wheel
• control variables:
– angular velocity of steering wheel ws(t)
– steering direction α(t)
d: distance from the front wheel to the rear axle
City College of New York
7
Tricycle
Kinematics model in the world frame
---Posture kinematics model
City College of New York
8
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
9
Ackerman Steering (Car Drive)
• The Ackerman Steering equation:
– :
d
cot  i  cot  o  
l
cos 
cot  
sin 
cot i  cot o
Rd /2 Rd /2


l
l
d

l
R
City College of New York
10
Car-like Robot
Driving type: Rear wheel drive, front wheel steering
  R  u1
l


 u1
tan
Rear wheel drive car model:
ICC
Y


R
x  u1 cos
y  u1 sin 

l
u1

  tan
l
  u2
X
non-holonomic constraint:
x sin   y cos  0
x, y
u1 : forward velocity of the rear wheels
u2 : angular velocity of the steering wheels
l : length between the front and rear wheels
City College of New York
11
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
12
Gas Sensor
Gyro
Accelerometer
Pendulum Resistive
Tilt Sensors
Metal Detector
Piezo Bend Sensor
Gieger-Muller
Radiation Sensor
Pyroelectric Detector
UV Detector
Resistive Bend Sensors
Digital Infrared Ranging
CDS Cell
Resistive Light Sensor
Pressure Switch
Miniature Polaroid Sensor
Limit Switch
Touch Switch
Mechanical Tilt Sensors
IR Pin
Diode
IR Sensor w/lens
Thyristor
Magnetic Sensor
IR Reflection
Sensor
Magnetic Reed Switch
IR Amplifier Sensor
Hall Effect
Magnetic Field
Sensors
Polaroid Sensor Board
IRDA Transceiver
Lite-On IR
Remote Receiver
Radio Shack
Remote Receiver
IR Modulator
Receiver
Solar Cell
Compass
City College of New
York
Compass
13
Piezo Ultrasonic Transducers
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
14
Incremental Optical Encoders
• Incremental Encoder:
• It generates pulses proportional to the rotation speed of the shaft.
• Direction can also be indicated with a two phase encoder:
A
B
A leads B
ChA
ChB
DIR
Encoder pulse and motor direction
City College of New York
15
Motion Planning
Path Planning: Find a path connecting an
initial configuration to goal configuration
without collision with obstacles
– Configuration Space
– Motion Planning Methods
•
•
•
•
Roadmap Approaches
Cell Decomposition
Potential Fields
Bug Algorithms
City College of New York
16
Motion Planning
• Motion Planning Methodololgies
– Roadmap
– Cell Decomposition
– Potential Field
Global methods
Local methods
• 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
City College of New York
17
Full-knowledge motion planning
Roadmaps
Cell decompositions
visibility graph
exact free space
represented via
convex polygons
voronoi diagram
approximate free
space represented
via a quadtree
City College of New York
18
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
19
Introduction to ROBOTICS
Mobile Robot Mapping
Dr. John (Jizhong) Xiao
Department of Electrical Engineering
City College of New York
[email protected]
City College of New York
20
Sonar sensing
“The sponge”
0
a “chirp” is emitted
into the environment
sonar timeline
75ms
typically when
reverberations
from the initial
chirp have stopped
the transducer goes into
“receiving” mode and
awaits a signal...
.5s
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
Polaroid sonar emitter/receivers
Attenuation
Why is sonar sensing limited to
between ~12 in. and ~25 feet ?
City College of New York
21
Using sonar to create maps
What should we conclude if this sonar reads 10 feet?
there isn’t
something here
10 feet
there is
something
somewhere
around here
Local Map
unoccupied
or ...
no information
occupied
City College of New York
22
Using sonar to create maps
What should we conclude if this sonar reads 10 feet...
10 feet
10 feet
and how do we add the information that the next
sonar reading (as the robot moves) reads 10 feet, too?
City College of New York
23
What is it a map of ?
Several answers to this question have been tried:
cell (x,y) is
occupied
pre ‘83
It’s a map of occupied cells.
‘83 - ‘88
It’s a map of probabilities: p( o | S1..i )
oxy
p( o | S1..i )
It’s a map of odds.
oxy
cell (x,y) is
unoccupied
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.
evidence = log2(odds)
probabilities
The odds that a cell is occupied, given
the sensor readings S1, S2, …, Si
odds( o | S1..i ) =
City College of New York
p( o | S1..i )
p( o | S1..i )
24
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 -the old value of a cell in the
map (before sonar reading S2)
odds( o | S1)
p( Si | o ) & p( Si | o )
the probabilities that a certain obstacle
causes the sonar reading Si
City College of New York
25
Combining evidence
odds( o | S2  S1) =
p( o | S2  S1 )
p( o | S2  S1 )
def’n of odds
.
=
p( S2  S1 | o ) p(o)
p( S2  S1 | o ) p(o)
.
=
p( S2 | o ) p( S1 | o ) p(o)
p( S2 | o ) p( S1 | o ) p(o)
conditional
independence
of S1 and S2
=
p( S2 | o ) p( o | S1 )
p( S2 | o ) p( o | S1 )
Bayes’ rule (+)
.
precomputed values
the sensor model
Bayes’ rule (+)
previous odds
Update step = multiplying the previous odds by a precomputed weight.
City College of New York
26
Introduction to ROBOTICS
A Taste of Localization Problem
Dr. John (Jizhong) Xiao
Department of Electrical Engineering
City College of New York
[email protected]
City College of New York
27
Bayes Formula
P( x, y)  P( x | y) P( y)  P( y | x) P( x)

P( y | x) P( x)
P( x y ) 
P( y )
If y is a new sensor reading
 Prior probability distribution
p(x)
p( x y )

Posterior probability distribution
p( y x)
p( y)

Generative model, characteristics of the sensor

Does not depend on x
City College of New York
28
Bayes Rule
with Background Knowledge
P( y | x, z ) P( x | z )
P( x | y, z ) 
P( y | z )
City College of New York
29
Markov assumption
(or static world assumption)
City College of New York
30
Markov Localization
• Measurement
• Action
City College of New York
31
Measurement: Update Phase
a
City College of New York
b
c
32
Measurement: Update Phase
City College of New York
33
Recursive Bayesian Updating
P( zn | x, z1,, zn  1) P( x | z1,, zn  1)
P( x | z1,, zn) 
P( zn | z1,, zn  1)
Markov assumption: zn is independent of z1,...,zn-1 if
we know x.
P( zn | x) P( x | z1,, zn  1)
P( x | z1,, zn) 
P( zn | z1,, zn  1)
  P( zn | x) P( x | z1,, zn  1)
 1...n
 P( z | x) P( x)
i
i 1...n
City College of New York
34
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
35
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
36
Integrating the Outcome of Actions
Continuous case:
P ( x | u )   P ( x | u , x' ) P ( x' ) dx '
Discrete case:
P( x | u)   P( x | u, x' )P( x' )
City College of New York
37
Summary
• Measurement
• Action
City College of New York
38
Bayes Filters: Framework
• Given:
– Stream of observations z and action data u:
dt  {u1, z1 , ut , zt }
– 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:
Bel( xt )  P( xt | u1 , z1 , ut , zt )
City College of New York
39
Markov Assumption
p( zt | x0:t , z1:t , u1:t )  p( zt | xt )
 Measurement probability
p( xt | x1:t 1, z1:t , u1:t )  p( xt | xt 1, ut )  State transition probability
Markov Assumption:
–past and future data are independent if one knows the current state
Underlying Assumptions
• Static world, Independent noise
• Perfect model, no approximation errors
City College of New York
40
Bayes Filters
z = observation
u = action
x = state
Bel( xt )  P( xt | u1, z1 , ut , zt )
Bayes
  P( zt | xt , u1, z1, , ut ) P( xt | u1, z1, , ut )
Markov
  P( zt | xt ) P( xt | u1, z1, , ut )
Total prob.
  P( zt | xt )  P( xt | u1 , z1 , , ut , xt 1 )
P( xt 1 | u1 , z1 , , ut ) dxt 1
Markov
  P( zt | xt )  P( xt | ut , xt 1 ) P( xt 1 | u1 , z1 , , ut ) dxt 1
Markov
  P ( zt | xt )  P ( xt | ut , xt 1 ) P ( xt 1 | u1 , z1 ,  , zt 1 ) dxt 1
  P( zt | xt )  P( xt | ut , xt 1 ) Bel ( xt 1 ) dxt 1
City College of New York
41
Bayes Filters are Family
Bel ( xt )   P( zt | xt )  P( xt | ut , xt 1 ) Bel ( xt 1 ) dxt 1
• 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
42
Thank you!
Next Class: Final Exam
Time: 6:30pm-8:30pm, Dec. 9, 2013,
Coverage: Mobile Robot
Close-book with 1 page cheat sheet, but Do Not Cheat
City College of New York
43