Control of
Mobile Robots
Dr. Magnus Egerstedt
Professor
School of Electrical and
Computer Engineering
Module 2
Mobile Robots
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?
?
sensors
controller
robot model
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
vr
(x, y)
L
x =
y =
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:
(x, y)
Dynamics:
x = v cos
y = v sin
=
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
2.2.3
Model 2.0
x = v cos
y = v sin
=
Design for this model!
x =
y =
R
2v
v = (vr + v )
= vr + v
2
R
R
L
= (vr v )
= vr v
L
R
R
2 (vr
+ v ) cos
R
2 (vr
+ v ) sin
R
L (vr
v )
2v + L
vr =
2R
2v L
v =
2R
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
Dc
D + Dr
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
Dc
D!
For both wheels:
Assume each wheel has N
ticks per revolution
Most wheel encoders give the
total tick count since the
beginning
tick = tick tick
tick
D = 2R
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 robots 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)
(d2 , 2 )
If we know our own pose
(position and orientation):
(d1 , 1 )
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
x1 = x + d1 cos(1 + )
y1 = y + d1 sin(1 + )
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
x = v0 cos
y = v0 sin
=
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 e
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 Avoidobstacles!
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?
x = v0 cos
y = v0 sin
=
(xg , yg )
d = arctan
(x, y)
e = d , = PID(e)
yg y
xg x
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 rangesensors 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 )
1 = obst +
Blended
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! Lets 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