You are on page 1of 42

CT002-3-2 AI Methods

Robotics Control
Learning Outcomes

• At the end of the session, you should be


able to:
– Describe what perception in the context of human and
robots.
– Understand various definitions related to
sensing/perception
– Understand variety of sensing techniques
– Understand challenges of sensing and perception in
robotics

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Robots

• Manufacturing robots
• Autonomous mobile robots
• Humanoid robots

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Manufacturing robots

• Consists of a joint arm with a device or


end effector at the end of it such as a
gripper.
• Examples: welding, assembly and spray
painting

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Autonomous mobile robots

• Remotely operated by human who can


see what the robot sees through its
camera and can directly control the
movements and actions of robot.
• Example: deliver food and medical
supplies to refugees in war.

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
:: QUESTION ::

Choose THREE(3) worlds from Webots,


discuss the list of actuators and sensors
with each its functionality.

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Humanoid robots

• A complete robot which can interact with


their surroundings in much the same way
as human can, with head, eye, arm,
fingers and possibly even legs
• Example “Cog” developed at MIT
(Massachusetts Institute of Technology) by
Rodney Brooks and team.

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Robot Architecture

Perception
The

Cognition Physical

World
Action

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
How Do You Design Smart Robots?

n icate
o mmu Sense Reason Act
C

Sense Reason Act

Environment
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
How Does a Robot “Sense”?
Can use vision…
Raw
data

Camera

“Perceived” info. (using Marker 1: Marker 2: Marker 3:


intelligent software ID = 1010110 ID = 0101010 ID = 0011000
d = 23” d = 42” d = 26”
algorithms on robot): q = 117o q = 86o q = 61o
a = 76o a = 0o a = 32o

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
How Does a Robot “Sense”?
Can use laser range scanner…

Raw data
(multiple scans)

Laser range
scanner

“Perceived” info. (using


intelligent software
algorithms on robot):

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Example of Robots Using Laser
Range Scanners to
Cooperatively Follow the Leader

Parker, ORNL, 2002

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
And, there are lots of other
sensors…
• “Low-end” camera
• Infrared
• Sonar
• Microphone
• DGPS
• Compass
• Odometry (wheel encoders)
• Inclinometer (tilt)
• Tactile
• Chemical, radiation, wind, …

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
But it’s not so easy to sense…

What if camera breaks,


or the grass is too high,
or the lens gets dirty,
or the sensor gives bad data,
or 2 sensors tell you contradictory things,
or the lights get turned off,
or it starts raining,
or, … ?

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
How Does a Robot “Reason”?

“Hmm … I see that the blue


block is on the table. But I
want the blue block to be on
the red block. So, I’ll pick up
the blue block and move it.”

Current Situation Desired Situation

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Other ways to “reason”…

• Constraint propagation
• Production (“expert”)
systems
• Decision networks
• Probabilistic reasoning
• Dynamic Bayesian networks
• Hidden Markov Models
• Genetic algorithms
• Neural networks

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
But it’s not so easy to reason…

What if blue block is glued to table,


or you accidentally drop your block,
or somebody keeps knocking down your blocks,
or the pathway is blocked,
or the building catches on fire,
or your Mom is calling,
or, … ?

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
How Does a Robot Convert
“Potential Fields” to Motion?

• “Go forward at 1 meter


per second”
– SetMotorState(1)
– SetSpeed(1000,0)
• “Steer hard to the right”
– SetMotorState(1)
– SetSpeed(50,90)
• “Stop!”
– SetSpeed(0,0)
– SetMotorState(0)

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
And, there are lots of other ways to
move…

• Legs

• Tracks

• Arms

• Wings…

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Example of Robots Using Grippers to
Cooperate

Parker, ORNL, 1998

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
But, it’s not so easy to cooperate…

What if some of the robots fail,


or the wireless communication goes down,
or robots can’t find each other,
or one robot un-does what another robot just did,
or one robots thinks push while the other thinks
pull,
or one robot refuses to help another,
or, … ?

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Why do we care about
Cooperating Autonomous Mobile
Robots?
• Teams of robots for search and rescue:

Robots at World Trade Center, September 2001

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Teams of robots for hazardous
duty

Robots in Iraq and Afghanistan, current day

(development funded by DARPA, many contributors)

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Teams of Robots for
Reconnaissance
and Homeland Security

DARPA’s vision

Parker, ORNL, 2002

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Teams of Robots for Space
Exploration

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
And, Robots to Entertain You!

Veloso, CMU, 2003

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
“Old View” of Perception vs. “New
View”

• Traditional (“old view”) approach:


– Perception considered in isolation (i.e.,
disembodied)

– Perception “as king” (e.g., computer vision is


“the” problem)

– Universal reconstruction (i.e., 3D world


models)
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
“New View” of Perception
Perception without the context of action is meaningless.
• Action-oriented perception
– Perceptual processing tuned to meet motor activities’
needs
• Expectation-based perception
– Knowledge of world can constrain interpretation of what
is present in world
• Focus-of-attention methods
– Knowledge can constrain where things may appear in
the world

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
“New View” of Perception

• Active perception
– Agent can use motor control to enhance perceptual
processing via sensor positioning
• Perceptual classes
– Partition world into various categories of potential
interaction

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
“Open-loop” vs. “Closed-loop”
Control

• Closed-loop control system: Uses


sensory feedback from results of its output
to help compute subsequent controller
outputs

• Open-loop control system: Does not use


sensory feedback to evaluate the results
of its actions

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Sensing/Perception Definitions

• Sensor: Device that measures some attribute of the world


• Transducer: Mechanism that transforms the energy
associated with what is being measured into another form of
energy
– Often used interchangeably with “sensor”
• Passive sensor: relies on environment to provide
medium/energy for observation (e.g., ambient light for
computer vision)
• Active sensor: puts out energy into the environment to
either change energy or enhance it (e.g., laser in a laser
range scanner)
• Active sensing: system for using an effector to dynamically
position a sensor for a “better look”
• “Active sensor” = “Active sensing”:
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Behavioral Sensor Fusion

• Sensor suite: set of sensors for a particular robot


• Sensor fusion: any process that combines information
from multiple sensors into a single percept
• Multiple sensors used when:
– A particular sensor is too imprecise or noisy to give
reliable data
• Sensor reliability problems:
– False positive:
• Sensor leads robot to believe a percept is present
when it isn’t
– False negative:
• Sensor causes robot to miss a percept that is
actually present
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Exercise

Describe the following perception in


robotics:

•Action-oriented perception
•Expectation-based perception
•Focus-of-attention methods
•Active perception
•Perceptual classes

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Localization : Using
Kalman filter

Initial state
detects nothing:

Moves and
detects landmark:

Moves and
detects nothing:

Moves and
detects landmark:
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
The Kalman Filter
• Motion model is Gaussian…
• Sensor model is Gaussian…
• Each belief function is uniquely characterized
by its mean m and covariance matrix 
• Computing the posterior means computing a
new mean m and covariance  from old data
using actions and sensor readings
• What are the key limitations?

1) Unimodal distribution
2) Linear assumptions
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Kalman Filter Components
(also known as: Way Too Many Variables…)

Linear discrete time dynamic system (motion model)


State Control input Process noise

xt 1  Ft xt  Bt ut  Gt wt

State transition Control input Noise input


function function function with covariance Q

Measurement equation (sensor model)


Sensor reading State Sensor noise with covariance R

zt 1  H t 1 xt 1  nt 1
Sensor function Note:Write these down!!!
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
The Kalman Filter…

Propagation (motion model):

xˆt 1/ t  Ft xˆt / t  Bt ut - State estimate is updated from system dynamics

T T
Pt 1/ t  Ft Pt / t Ft  Gt Qt Gt - Uncertainty estimate GROWS

Update (sensor model):


zˆt 1  H t 1 xˆt 1/ t - Compute expected value of sensor reading

rt 1  zt 1  zˆt 1 - Compute the difference between expected and “true”


T
St 1  H t 1 Pt 1/ t H t 1  Rt 1 - Compute covariance of sensor reading

T 1
K t 1  Pt 1/ t H t 1 St 1 - Compute the Kalman Gain (how much to correct est.)

xˆt 1/ t 1  xˆt 1/ t  K t 1rt 1 - Multiply residual times gain to correct state estimate
T 1
Pt 1/ t 1  Pt 1/ t  Pt 1/ t H t 1 S t 1 H t 1 Pt 1/ t - Uncertainty estimate SHRINKS

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Kalman Filter Block Diagram

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Some observations

• The larger the error, the smaller the effect on the final
state estimate
– If process uncertainty is larger, sensor updates will dominate
state estimate
– If sensor uncertainty is larger, process propagation will
dominate state estimate
• Improper estimates of the state and/or sensor
covariance may result in a rapidly diverging estimator
– As a rule of thumb, the residuals must always be bounded
within a ±3s region of uncertainty
– This measures the “health” of the filter
• Many propagation cycles can happen between
updates
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Problems with the
Linear Model Assumption
• Many systems of interest are highly non-
linear, such as mobile robots
• In order to model such systems, a linear
process model must be generated out of the
non-linear system dynamics
• The Extended Kalman filter is a method by
which the state propagation equations and
the sensor models can be linearized about
the current state estimate
• Linearization will increase the state error
residual because it is not the best estimate
CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Q&A

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions
Next Topic

Simulation and Modeling

Distinguish between simulation and modelling


What is :-
a. Simulator
b. Model
c. Real system
Process of simulation
Issues in simulation

CT002-3.5-2 AI-Methods
CE00371-1: Introduction to Software Development Problem Solving using programmed solutions

You might also like