hi I'm Kerry Ann and welcome to crash
course computer science today
we're going to talk about robots the
first image that jumps into your mind is
probably a humanoid robot like we
usually see in shows or movies sometimes
they're our friends and colleagues but
more often they're sinister apathetic
and battle-hardened we also tend to
think of robots as a technology of the
future but the reality is they're
already here by the millions and they're
our workmates helping us to do things
harder better faster and stronger
[Music]
there are many definitions for robots
but in general these are machines
capable of carrying out a series of
actions automatically guided by computer
control how they look isn't part of the
equation robots can be industrial arms
that spray paint cars drones that fly
snake-like medical robots that assist
surgeons as well as humanoid robotic
assistance although the term robot is
sometimes applied to interactive virtual
characters it's more appropriate to call
these BOTS or even better agents that's
because the term robot carries a
physical connotation a machine that
lives in and acts on the real world the
word robot was first used in a 1920
Czech plate do no artificial humanoid
characters the word was derived from
rowboat er the Slovak language word for
a forced laborer indicating peasants in
compulsory service in feudal 19th
century Europe the plating would go too
much into technological details but even
a century later it's still a common
portrayal mass-produce efficient
tireless creatures that look human esque
but are emotional is indifferent to
self-preservation and lack creativity
the more general idea of self operating
machines goes back even further than the
1920s many ancient inventors created
mechanical devices that performed
functions automatically like keeping the
time from striking bells on the hour
there are plenty of examples of
automated animal and humanoid figures
that would perform dances sing songs
strike drums and do other physical
actions these non electrical and
certainly non electronic machines were
called automatons for instance an early
automaton created in 1739 by the
Frenchman Jacques de volcán son was the
canard ureter or digesting duck a
machine in the shape of a duck that
appeared to eat grain and then defecate
in 1739 Voltaire wrote without the voice
of lemare and Vulcan syns duck you would
have nothing to remind you of the glory
of France one of the most infamous
examples was the Mechanical Turk a
chess-playing humanoid automaton after
construction in 1770 it toured all over
Europe wowing audiences with its
surprisingly good chess playing it
appeared to be a mechanical artificial
intelligence unfortunately it was a hoax
there was a dainty human stuffed inside
the machine the first machines
controlled by computers emerged in the
late 1940s these computer new
control or CNC machines could run
programs that instructed a machine to
perform a series of operations this
level of control also enabled the
creation of new manufactured goods like
milling a complex propeller design out
of a block of aluminium something that
was difficult to do using standard
machine tools and with tolerance is too
small to be done by hand CNC machines
were a huge boon to industry not just
due to increased capability and
precision but also in terms of reducing
labor costs by automating human jobs a
topic we'll revisit in a later episode
the first commercial deployment was a
programmable industrial robot called the
unimate sold to General Motors in 1960
to lift hot pieces of metal from a die
casting machine and stack them this was
the start of the robotics industry soon
robots were stacking pallets welding
parts painting cars are much more for
simple motions like a robotic gripper
that moves back and forth on a track a
robot can be instructed to move to a
particular position and it will keep
moving in that direction until the
desired position is reached at which
point it will stop this behavior can be
achieved through a simple control loop
first since the robot position are we
there yet nope so keep moving
now sense position again are we there
yet no so keep moving are we there yet
yes so we can stop moving and also
please be quiet because we're trying to
minimize the distance between the sense
position and the desired position this
control loop is more specifically a
negative feedback loop a negative
feedback control loop has three key
pieces there's a sensor that measures
things in the real world like water
pressure motor position air temperature
or whatever you're trying to control
from this measurement we calculate how
far we are from where we want to be the
error the error is then interpreted by a
controller which decides how to instruct
the system to minimize that to error
then the system acts on the world
through pumps motors heating elements
and other physical actuators in tightly
controlled environments simple control
loops like this work okay but in many
real-world applications things are a tad
more complicated imagine that our
gripper is really heavy and even when
the control loop says to stop momentum
causes the gripper to overshoot the
desired position that would cause the
control loop to take over again this
time backing the gripper up a badly
tuned control loop might overshoot and
overshoot an overshoot and maybe even
forever to make matters worse in
real-world settings there are typically
external and variable forces acting on a
robot like friction wind and a lattin's
of different weight to handle this
gracefully more sophisticated control
logic is needed a widely used control
loop feedback mechanism is a
proportional integral derivative
controller that's a bit of a mouthful so
people call them PID controllers these
used to be mechanical devices but now
it's all done in software let's imagine
a robot that delivers coffee its goal is
to travel between customers at 2 m/s
which has been determined to be the idle
speed that's both safe and expedient of
course the environment doesn't always
cooperate
sometimes there's wind and sometimes
there's uphills and downhills and all
sorts of things that affect the speed of
the robot so it's going to have to
increase and decrease power to its
motors to maintain the desired speed
using the robot speed sensor we can keep
track of its actual speed and plot that
alongside its desired speed PID
controllers calculate 3 values from this
data first is the proportional value
which is the difference between the
desired value and the actual value at
the most recent instant in time or the
present this is what our simpler control
loop used before the bigger the gap
between actual and desired the harder
you'll push towards your target in other
words is proportional control next the
integral value is computed which is the
sum of error over a window of time like
the last few seconds this look-back
helps compensate for steady-state errors
resulting from things like motoring up a
long hill if the value is large it means
proportional control is not enough and
we have to push harder still finally
there's the derivative value which is
the rate of change between the desired
and actual values
this helps account for possible future
error and is sometimes called
anticipatory control for example if
you're screaming in towards your goal
too fast
y'all need to ease up a little to
prevent overshoots these three values
are some together with different
relative weights to produce a controller
output that's passed to the system PID
controllers are everywhere from cruise
control in your car to drones that
automatically adjust their rotor speed
to maintain level flight as well as more
exotic robots like this one the balance
is on a ball to move around advanced
robots often require many control loops
running in parallel working together
managing everything from robot balance
to limb position
as we've discussed control loops are
responsible for getting robot attributes
like location to desired values so you
may be wondering where these values come
from this is the responsibility of
higher-level robot software which plans
and executes robot actions like plotting
a path around sensed obstacles or
breaking down physical tasks like
picking up a ball into simple sequential
motions using these techniques robots
have racked up some impressive
achievements they've been to the deepest
depths of the Earth's oceans and roved
around on Mars for over a decade but
interestingly lots of problems that are
trivial for many humans have turned out
to be devilishly difficult for robots
like walking on two legs opening a door
picking up objects without crushing them
putting on a t-shirt or petting a dog
these are tasks you may be able to do
without thinking but a supercomputer pal
robot fails out spectacularly these
sorts of tasks are all active areas of
Robotics research artificial intelligent
techniques which we talked about a few
episodes ago and perhaps the most
promising Avenue to overcome these
challenges for example google has been
running an experiment with a series of
robotic arms that spend their days
moving miscellaneous objects from one
box to another learning from trial and
error after thousands of hours of
practice the robots had cut their error
rate in half of course unlike humans
robots can run 24 hours a day and
practice with many arms at the same time
so it may just be a matter of time until
they become adept at grasping things but
for the time being
toddlers can out grasp them one of the
biggest and most visible robotic
breakthroughs in recent years has been
self-driving autonomous cars if you
think about it can't don't have too many
system inputs you can speed up or slow
down and you can steer left or right the
tough part is sensing lanes reading
signs and anticipating and navigating
traffic pedestrians bicyclists and a
whole host of obstacles in addition to
being studied with proximity sensors
these robotic vehicles heavily rely on
computer vision algorithms which we
discussed in episode 35 we're also
seeing the emergence of very primitive
androids robots that look and act like
humans
arguably we're not close on either of
those goals as they tend to look pretty
weird and active weirder at least we'll
always have Westworld
but anyway these remain a tantalizing
golf roboticist that can buy many
computer science topics we've touched on
over the last few episodes like
artificial intelligence computer vision
and natural language processing
for why humans are so fascinated by
creating artificial embodiments of
ourselves you'll have to go to crash
course philosophy for that and for the
foreseeable future realistic androids
will continue to be the stuff of science
fiction militaries also have a great
interest in robots they're not only
replaceable but concer pass humans in
attributes like strength endurance
attention and accuracy bomb disposal
robots and reconnaissance drones are
fairly common today but fully autonomous
arm for the chief robots are slowly
appearing like the Samsung SGR a one
century gun deployed by South Korea
robots with the intelligence and
capability to take human lives
accordingly Thor autonomous weapons and
they're widely considered a complex and
thorny issue without doubt these systems
could save soldiers lives by taking them
off the battlefield and out of harm's
way
it might even discourage war together
though it's worth noting that people
said the same thing about dynamite and
nuclear weapons on the flip side we
might be creating ruthlessly efficient
killing machines that don't apply human
judgement or compassion to complex
situations and the fog of war is about
as complex and murky as they come these
robots would be taking orders and
executing them as efficiently as they
can and sometimes human orders turn out
to be really bad this debate is going to
continue for a long time and pundits on
both sides will grow louder as robotic
technology improves it's also an old
debate the danger was obvious to science
fiction writer Isaac Asimov who
introduced a fictional Three Laws of
Robotics in his 1942 short story run
around and then he later added a zero if
rule is short it's a code of conduct or
moral compass for robots guiding them to
do no harm especially to humans it's
pretty inadequate for practical
application and it leaves plenty of room
for equivocation but still Asimov's laws
inspired a ton of science fiction and
academic discussion and today there are
whole conferences on robot ethics
importantly Asimov crafted his fictional
rules as a way to push back on robot as
a menace means common in fiction from
his childhood these were stories where
robust went off the rails harming or
even destroying their creators in the
process Asimov on the other hand
envisioned robots as useful reliable and
even lovable machines and is this
duality I want to leave you thinking
about today like many of the
technologies we've discussed throughout
this series there are benevolent the
malicious uses our job is to carefully
I'm computing this potential and peril
and wield our inventive talents to
improve the state of the world and
robots are one of the most potent
reminders of this responsibility I'll
see you next week
crash course computer science is
produced in association with PBS Digital
Studios at their channel you can check
out our place two shows like physics
girl deep book and PBS space time this
episode was filmed at the chad and
stacey emigholz studio in indianapolis
and it was made with the help of all
these nice people and our wonderful
graphics team thought cafe
thanks for watching and try turning it
off and then back on again
[Music]