Module 2 PDF
Module 2 PDF
Module 2 PDF
Mobile Robots
Module 2
Dr. Magnus Egerstedt
Professor
School of Electrical and
Mobile Robots
Computer Engineering
?
controller
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?
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)
(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)
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
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 φ
φ̇ = ω
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π
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:
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 − φ)”
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 )
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
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
2.8.3
Module 2: Mobile Robots
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
2.8.4