School of Electrical and Computer Engineering Control of Mobile Robots Dr. Magnus Egerstedt Professor School of Electrical and Computer Engineering Module 7 Putting It All Together How make mobile robots move in effective, safe, predictable, and collaborative ways using modern control theory?
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
School of Electrical and Computer Engineering
Control of Mobile Robots
Dr. Magnus Egerstedt Professor School of Electrical and Computer Engineering
Module 7 Putting It All Together
How make mobile robots move in effective, safe, predictable, and collaborative ways using modern control theory?
• We need to understand when and how our models are relevant!
Lecture 7.1 – Approximations and Abstractions
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.1.1
uGTGhuGTG, u
cFW i > 0
kx� x
o
k = � and
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
ccFW i > 0
ucFWucc
FW
kx� x
o
k < �
kx� xgk < d� and
uAO
kx� xgk �
u = 0
d� := kx� xgk
kx� x
o
k < �kx� x
o
k = � andhuGTG, u
ccFW i > 0
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
cFW i > 0
d� := kx� xgk
huAO, uGTGi > 0
• We need to understand when and how our models are relevant!
Lecture 7.1 – Approximations and Abstractions
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.1.1
“Slow and steady wins the race”
Don’t rush it when doing the quizzes…
• Dynamics:
• Sensors:
Main Assumptions Made So Far
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.1.2
x = u, x 2 <2
(d1,�1)
(d2,�2)
More or less ok…
Not even close to being reasonable!
• Recall the unicycle model (e.g., for describing differential drive mobile robots)
What’s The Problem?
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.1.3
x = u, x 2 <2
�
(x, y)
8<
:
x = v cos�y = v sin�˙� = ⇥
• How do we make a unicycle robot “act” like ?
Next Few Lectures…
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.1.4
x = u
• We have a problem: Even with a simple robot model, the navigation architecture becomes rather involved
• Would like to be able to reuse this while allowing for more realistic robot models
Lecture 7.2 – A Layered Architecture
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.2.1
uGTGhuGTG, u
cFW i > 0
kx� x
o
k = � and
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
ccFW i > 0
ucFWucc
FW
kx� x
o
k < �
kx� xgk < d� and
uAO
kx� xgk �
u = 0
d� := kx� xgk
kx� x
o
k < �kx� x
o
k = � andhuGTG, u
ccFW i > 0
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
cFW i > 0
d� := kx� xgk
huAO, uGTGi > 0
All Good Things Come in Threes
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.2.2
• Standard navigation systems are typically decoupled along three different levels of abstraction: – Strategic Level: Where to go (high-level, long-term)? – Operational Level: Where to go (low-level, short-term)? – Tactical Level: How to go there?
All Good Things Come in Threes
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.2.3
• Or slightly less militaristic: – High-Level Planning: Where should the (intermediary)
goal points be? – Low-Level Planning: Which “direction” to move in-
between goal points? – Execution: How make the robot move in those
directions?
Not in this course!
Use the navigation architecture!
Control design with reference signal!
High-Level Planning
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.2.3
• There are many AI methods (e.g., Dijkstra, Dynamic Programming, A*, D*, RRT…) for doing this!
Low-Level Planning
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.2.4
• We already know how to do this! Assume that
and get to work! • The “output” is a desired direction (and magnitude) of
travel
x = u, x 2 <2
Execution-Level
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.2.4
• This is where we make the unicycle (or any other mobile robot) act like a simpler system over which we are performing the low-level planning
The Architecture
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.2.5
PLAN
uGTGhuGTG, u
cFW i > 0
kx� x
o
k = � and
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
ccFW i > 0
ucFWucc
FW
kx� x
o
k < �
kx� xgk < d� and
uAO
kx� xgk �
u = 0
d� := kx� xgk
kx� x
o
k < �kx� x
o
k = � andhuGTG, u
ccFW i > 0
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
cFW i > 0
d� := kx� xgk
huAO, uGTGi > 0
TRACK
Intermediary Waypoints
Reference trajectory
Actual trajectory
x = f(x, u), u = g(x, r)
• Next time: Let’s do this for the differential-drive mobile robot
• How should we design the tracker when the robot is a differential-drive mobile robot?
Lecture 7.3 – Differential-Drive Trackers
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.3.1
PLAN TRACK
Intermediary Waypoints
Reference trajectory
Actual trajectory
Recap: The Model
7.3.2
L
R
vrv`
�
(x, y)
8<
:
x = v cos�y = v sin�˙� = ⇥
8>>>><
>>>>:
x =
R2 (vr + v�) cos�
y =
R2 (vr + v�) sin�
˙� =
RL (vr � v�)
vr =2v + �L
2R
v` =2v � �L
2R
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology
• How drive the robot in a specific direction?
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.3.3
Recap: Dealing With Angles
e = �d � �, ⇥ = PID(e)
(x, y)
�d
8<
:
x = v cos�y = v sin�˙� = ⇥
PID(e) = KP e(t) +KI
Z t
0e(�)d� +KD e(t)
• Let the output from the planner be
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.3.4
Adding In The Speed Component
(x, y)
u =
u1
u2
�(x = u)
�d = atan
✓u2
u1
◆8<
:
x = v cos�y = v sin�˙� = ⇥
u?
v = kuk ) v =qu21 + u2
2
px2
+ y2 =
qv2 cos2 �+ v2 sin2 � = v
The Complete Differential-Drive Architecture
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.3.5
PLAN
uGTGhuGTG, u
cFW i > 0
kx� x
o
k = � and
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
ccFW i > 0
ucFWucc
FW
kx� x
o
k < �
kx� xgk < d� and
uAO
kx� xgk �
u = 0
d� := kx� xgk
kx� x
o
k < �kx� x
o
k = � andhuGTG, u
ccFW i > 0
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
cFW i > 0
d� := kx� xgk
huAO, uGTGi > 0
TRACK
Intermediary Waypoints
(u1, u2) (vr, v�)
vr =2v + �L
2R
v` =2v � �L
2R
�d = atan
✓u2
u1
◆
v =qu21 + u2
2
! = PID(�d � �)
• We can use a layered architecture for making differential drive robots act like
• Key idea: Plan using the simple dynamics, then track using some clever controller (PID?)
• Today: We can be even more clever!
Lecture 7.4 – A Clever Trick
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.4.1
x = u
• What if we ignored the orientation and picked a different point on the robot as the point we care about?
Transforming the Unicycle
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.4.2
�
(x, y)
8<
:
x = v cos�y = v sin�˙� = ⇥
New point
⇢x = x+ ⇥ cos�y = y + ⇥ sin�
New Dynamics
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.4.3
8<
:
x = v cos�y = v sin�˙� = ⇥
⇢x = x+ ⇥ cos�y = y + ⇥ sin�
˙x = x� ⇥� sin�
˙y = y + ⇥ ˙� cos�
= v cos�� ⇤⇥ sin�
= v sin�+ ⇤⇥ cos�
New Inputs
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.4.4
• Let’s assume that we can control the new point directly
˙x = u1,
˙y = u2
˙x = v cos�� ⇤⇥ sin� = u1˙y = v sin�+ ⇤⇥ cos� = u2
cos� � sin�sin� cos�
� v⇤⇥
�=
u1
u2
�
R(�) 1 00 ⇥
� v�
�
New Inputs
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.4.4
• Let’s assume that we can control the new point directly
˙x = u1,
˙y = u2
R(�)
1 00 ⇤
� v⇥
�=
u1
u2
�
v⇥
�=
1 00 1
`
�R(��)
u1
u2
�
What’s The Point?
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.4.5
• Before:
(u1, u2)PLAN
uGTGhuGTG, u
cFW i > 0
kx� x
o
k = � and
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
ccFW i > 0
ucFWucc
FW
kx� x
o
k < �
kx� xgk < d� and
uAO
kx� xgk �
u = 0
d� := kx� xgk
kx� x
o
k < �kx� x
o
k = � andhuGTG, u
ccFW i > 0
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
cFW i > 0
d� := kx� xgk
huAO, uGTGi > 0
TRACK (v,�)
e = �d � �, ⇥ = PID(e)
v = kuk
What’s The Point?
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.4.5
• Now:
(u1, u2)PLAN
uGTGhuGTG, u
cFW i > 0
kx� x
o
k = � and
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
ccFW i > 0
ucFWucc
FW
kx� x
o
k < �
kx� xgk < d� and
uAO
kx� xgk �
u = 0
d� := kx� xgk
kx� x
o
k < �kx� x
o
k = � andhuGTG, u
ccFW i > 0
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
cFW i > 0
d� := kx� xgk
huAO, uGTGi > 0
TRANSFORM (v,�)
v⇥
�=
1 00 1
`
�R(��)
u1
u2
�
• Last time: It is indeed possible to make differential drive mobile robots “act” like – If we are willing to ignore orientation – And accept a small offset error
• Today: Does this generalize to other types of robots? And, what other types are there?
Lecture 7.5 – Other Robot Classes
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.5.1
x = u
• There are lots and lots of different types of robotic systems • We cannot cover them all. Instead, we will focus on what they
have in common:
Other Models
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.5.2
UNICYLE
x = v cos�y = v sin�˙� = ⇥
States: position and orientation Inputs: Angular and transl. velocities
• There are lots and lots of different types of robotic systems • We cannot cover them all. Instead, we will focus on what they
have in common:
Other Models
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.5.3
• Everything (almost) involves POSE = position and heading! • Everything (almost) with pose is almost a unicycle! • So we can (almost) use what we have already done and then
make the actual model class fit the unicycle – Just add a layer – Next lecture: Do this for the car robot!
Punchline
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.5.7
• A lot of times we actually need constraints, which unfortunately make it harder to control the robots (not in this class)
Adding Constraints
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.5.8
UNICYLE x = v cos�y = v sin�˙� = ⇥
x = v cos(�)y = v sin(�)˙� = ⇥v = 1, ⇥ 2 [�1, 1]
x = v cos(�)y = v sin(�)˙� = ⇥|v| = 1, ⇥ ⇥ [�1, 1]
DUBINS
REEDS-SHEPP
• Humanoids • Snakes • Mobile manipulators
• Next time: Cars (when it is ok…)
When is POSE Not Reasonable?
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.5.9
• Claims: – Pose (position and heading) is central – Other “pose-based” models can be made to look like a
unicycle • Today: Car-like robots
Lecture 7.6 – Car-Like Robots
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.6.1
• What’s different about the car is that it has four wheels. • Only the front wheels turn, which means that the steering
wheel angle (“=“ front wheel angle) becomes important
Car Kinematics
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.6.2
(x, y)`
�
x = v cos(⇥+ ⇤)y = v sin(⇥+ ⇤)˙⇥ =
v� sin(⇤)
˙⇤ = �
(x, y)�
states: position heading steering angle
v�
inputs: speed angular steering velocity
• How do we make this act like a unicycle? • Assume a unicycle is driving along a
circular arc
Curvature Control
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.6.3
x = v cos(⇥+ ⇤)y = v sin(⇥+ ⇤)˙⇥ =
v� sin(⇤)
˙⇤ = �
⇢
↵
�
↵ = �� ⇡
2
x = x0 + ⇥ cos(�)
= x0 + � sin(⇥)
x = ⇤� cos(⇥)= v cos(�)
� =v
⇥� =⇥
v
• Let’s redo this for the car
Curvature Control
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.6.4
⇢
↵
�+
↵ = �+ � ⇡
2
x = x0 + � sin(⇥+ ⇤)
x = �( ˙⇥+
˙⇤) cos(⇥+ ⇤)
= 0� =v
⇤sin(⇥)
= v cos(�+ ⇥)
⇢ =`
sin( )
=sin( )
`
Lining Up The Curvatures
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.6.5
UNICYCLE CAR
� =⇥
v =
sin( )
`
sin(�) =⇥⇤
v) �d = arcsin
✓⇥⇤
v
◆
But we can actually stay with sinus instead of dealing with arcsin!
An Almost P-Regulator
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.6.6
= �
� = C(⇥d � ⇥) � = C
✓⇤⌅
v� sin(⇥)
◆
An Almost P-Regulator
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.6.6
= �
� = C(⇥d � ⇥) � = C
✓⇤⌅
v� sin(⇥)
◆
Summing It Up
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.6.7
(u1, u2)PLAN TRANSFORM
(v,�)
TRACK (v,�)
� = C
✓⇤⌅
v� sin(⇥)
◆
• Believe it or not – there are lots of things not covered in this course!
Lecture 7.7 – To Probe Further
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.7.1
Nonlinear and Optimal Control
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.7.2
x = f(x, u)
minu
Z T
0L(x(t), u(t))dt+�(x(T ))
Machine Learning
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.7.3
V �(x0) =1X
k=0
�kc(xk,⇥(xk))
V �(x) = minu
{c(x, u) + �V �(f(x, u))}
Perception and Mapping
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.7.4
High-Level AI
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.7.5
• Not only are there things not covered in the class, there are lots of things we don’t know yet!
To Probe Further
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.7.6
• That’s it folks!
• Ambition with the course: – Learn how to make mobile robots move in effective and
safe ways using modern control theory – Appreciate the value of systematic thinking/design – Bridge the theory-practice gap – Have fun and spark further investigations
Lecture 7.8 – In Conclusion
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.8.1
• Without a model, we cannot say much about how the system will behave: – Need models to predict behavior forward in time – Need models to be able to derive control laws in a
systematic manner • The model should be rich enough to be relevant yet simple
enough to be useful • Bananas vs. Non-bananas
High-Level Punchline #1 – The Model
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.8.2
• Given a model, feedback control should be used to make the system behave the way we want it to (if possible)
• Stability, Tracking, Robustness • State feedback and observers
High-Level Punchline #2 – Feedback
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.8.3
y
x
x = Ax+Bu
y = Cx
u
˙x = Ax+Bu+ L(y � Cx)
u = �Kx
• Plan for simple systems, execute on the “real” system
High-Level Punchline #3 – Architectures
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.8.4
PLAN
uGTGhuGTG, u
cFW i > 0
kx� x
o
k = � and
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
ccFW i > 0
ucFWucc
FW
kx� x
o
k < �
kx� xgk < d� and
uAO
kx� xgk �
u = 0
d� := kx� xgk
kx� x
o
k < �kx� x
o
k = � andhuGTG, u
ccFW i > 0
d� := kx� xgk
kx� x
o
k = � andhuGTG, u
cFW i > 0
d� := kx� xgk
huAO, uGTGi > 0
TRACK
Intermediary Waypoints
Reference trajectory
Actual trajectory
x = f(x, u), u = g(x, r)
• Three abstraction layers • Differential-drive robots
• Don’t take my word for it • Experiment and tweak • The field is certainly not done yet
High-Level Punchline #4 – Whatever…
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.8.5
THANKS!
Magnus Egerstedt, Control of Mobile Robots, Georgia Ins<tute of Technology 7.8.6