You are on page 1of 35

Control of

Mobile Robots
Module 2
Dr. Magnus Egerstedt
Professor
School of Electrical and
Mobile Robots
Computer Engineering

How make mobile robots move in effective, safe,


predictable, and collaborative ways using modern
control theory?

School  of  Electrical  and  Computer  Engineering  


Lecture 2.1 – Driving Robots Around?
•  What does it take to drive a robot from point A to point B?

?
controller

robot model sensors

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.1.1
Divide and Conquer
•  The world is dynamic and fundamentally unknown
•  The controller must be able to respond to environmental
conditions
•  Instead of building one complicated controller – divide and
conquer: Behaviors
–  Go-to-goal
–  Avoid-obstacles
–  Follow-wall
–  Track-target

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.1.2
Behaviors

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.1.3
Behaviors

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.1.4
Lecture 2.2 – Differential Drive Robots
•  In order to control mobile robots, we need models
•  Differential drive wheeled robots – a very common type

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.2.1
Model 1.0
v� vr
R
φ

(x, y)
L  R

 ẋ = 2 (vr + v� ) cos φ



R
ẏ = 2 (vr + v� ) sin φ




 R
φ̇ = L (vr − v� )

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.2.2
The “Unicycle” Model
•  But it is not very natural to “think” in terms of wheel velocities
•  Go directly for translational and angular velocities

•  Inputs:
v
ω
φ •  Dynamics:

 ẋ = v cos φ
(x, y) ẏ = v sin φ

φ̇ = ω

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.2.3
Model 2.0

 ẋ = v cos φ R 2v
ẏ = v sin φ v = (vr + v� ) ⇒ = vr + v�
 2 R
φ̇ = ω R ωL
Design for this model! ω = (vr − v� ) ⇒ = vr − v�
L R
 R

 ẋ = 2 (vr + v� ) cos φ 2v + ωL

 vr =
 2R
R
ẏ = 2 (vr + v� ) sin φ 2v − ωL

 v� =


 R 2R
φ̇ = L (vr − v� )
Implement this model!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.2.4
Lecture 2.3 – Odometry
•  The state of the robot is (x, y, φ)
•  How do we obtain this state information?
•  Two possibilities:
–  External sensors
–  Internal sensors
•  Orientation: Compass, …
•  Position: Accelerometers, Gyroscopes, …
•  Wheel Encoders

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.3.1
Wheel Encoders
•  Wheel encoders give the distance moved by each wheel
•  Assume the wheels are following an arc (short time scale)

Dr D� + Dr
Dc =
Dc
2
D!

x� = x + Dc cos(φ)
y � = y + Dc sin(φ)
� Dr − D�
φ =φ+
L
Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.3.2
Wheel Encoders
•  But how do we know how far each wheel has moved?

Dr •  Assume each wheel has N


Dc “ticks” per revolution
D! •  Most wheel encoders give the
total tick count since the
beginning
•  For both wheels:
∆tick = tick� − tick
∆tick
D = 2πR
N

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.3.3
A Major Disclaimer

DRIFT!!!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.3.4
Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.3.5
Lecture 2.4 – Sensors
•  Robots need to know what the world around them looks like
•  The standard sensor suite includes a “skirt” of range sensors:
–  IR, Ultra-Sound, LIDAR,…
•  Other standard external sensors include
–  Vision
–  Tactile
–  “GPS”

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.4.1
Range-Sensor Skirts
•  We will mainly deal with range-sensors

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.4.2
The Disk Abstraction
•  Instead of worrying about the resolution of the sensors, assume
we know the distance and direction to all obstacles around us
(that are close enough)

(d2 , φ2 ) Angles are relative to


the robot’s heading

(d1 , φ1 )

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.4.3
The Disk Abstraction
•  Instead of worrying about the resolution of the sensors, assume
we know the distance and direction to all obstacles around us
(that are close enough)

•  If we know our own pose


(d2 , φ2 ) (position and orientation):
x1 = x + d1 cos(φ1 + φ)
y1 = y + d1 sin(φ1 + φ)
(d1 , φ1 )

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.4.3
Example: Rendezvous

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.4.4
Example: Rendezvous

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.4.4
Lecture 2.5 – Behavior-Based Robotics

•  The world is fundamentally


unknown and changing
•  Does not make sense to over-plan
•  Key idea: Develop a library of
useful controllers (=behaviors)
•  Switch among controllers in
response to environmental
changes

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.5.1
Building a Behavior v.1
•  Assume we have a differential-drive, wheeled mobile robot
driving at a constant speed

 ẋ = v0 cos φ
ẏ = v0 sin φ

φ̇ = ω

φd •  Want to drive in a desired heading


ω =???
φ

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.5.2
Building a Behavior v.1
•  We have a reference, a model, a control input, and a tracking
error:
r = φd , e = φd − φ, φ̇ = ω
•  We not use PID?

ω = KP e + KI edτ + KD ė

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.5.3
Dealing with Angles
•  This typically will not work since we are dealing with angles:

φd = 0, φ = 100π ⇒ e = −100π

•  Solution: Ensure that e ∈ [−π, π]


•  Standard trick is to use atan2!

e� = atan2(sin(e), cos(e)) ∈ [−π, π]

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.5.4
Example: Navigation
•  Problem: Go to a goal location without bumping in to
obstacles:

•  At a minimum, we need two behaviors: Go-to-goal and Avoid-


obstacles!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.5.5
Lecture 2.6 – Go-To-Goal
•  How drive a robot to a goal location?

 ẋ = v0 cos φ
ẏ = v0 sin φ e = φd − φ, ω = PID(e)

φ̇ = ω

(xg , yg )
� �
yg − y
φd = arctan
xg − x
(x, y)

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.6.1
Attempt 1
ω = K(φd − φ)

ANGLES!!!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.6.2
Attempt 2
“ω = K(φd − φ)”

GAIN TOO LOW!!!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.6.3
Attempt 3
“ω = Kbig (φd − φ)”

JUST RIGHT!!!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.6.4
Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.6.5
Lecture 2.7 – The GRITS Robot Simulator
•  A MATLAB-based
simulator
•  Simulates Khepera III
differential drive mobile
robot(-s) with IR range-
sensors and wheel-encoders
in cluttered environments

•  Available at
http://gritslab.gatech.edu/projects/robot-simulator/
as stand-alone executable and MATLAB package

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.7.1
Lecture 2.8 – Obstacle-Avoidance
•  How avoid driving into obstacles?
•  We can use the same idea by defining a desired heading

(xo , yo )

(x, y) There is no obvious


“correct” answer

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.8.1
Where to Go?
Choice depends on direction to goal.
Not “pure” but “blended”
π
φ2 = φobst ±
2
φ3 = φgoal
Pure go-to-goal
φ4 = F (φobst , φgoal )
Blended
φ1 = φobst + π
This is “pure” avoidance

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.8.2
Arbitration Mechanisms
•  This example illustrate two fundamentally different
“arbitration mechanisms”
–  Winner takes all = Hard switches
–  Blending = Combined behaviors

•  Both approaches have merit in different situations


–  Performance?
–  Analysis?
•  We will see how to design systematic behaviors and
arbitration mechanisms

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.8.3
Module 2: Mobile Robots

•  Module 2: Mobile robots

•  Module 3: Enough chit-chat! Let’s start over in a more


systematic and formal manner!
–  Linear Systems

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
2.8.4

You might also like